home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1485 < prev    next >
Internet Message Format  |  1990-12-28  |  32KB

  1. From: wht@n4hgf.uucp (Warren Tucker)
  2. Newsgroups: alt.sources
  3. Subject: u386mon, UNIX/386 system monitor, part 01/02
  4. Message-ID: <102@n4hgf.uucp>
  5. Date: 20 Jun 90 01:47:42 GMT
  6.  
  7. Archive-name: u386mon008/part01
  8. Submitted-by: wht@n4hgf
  9.  
  10. Well, here is u386mon, a hack monitor for SCO UNIX V/386.  It may work
  11. with other UNIX systems with a little work.  It requires terminfo
  12. style curses and will use color if you have it.
  13.  
  14.  
  15. #!/bin/sh
  16. # This is u386mon.x0.08, a shell archive (shar 3.27)
  17. # made 06/20/1990 01:39 UTC by wht@n4hgf
  18. # Source directory /u1/src/u386mon
  19. #
  20. # existing files WILL be overwritten
  21. #
  22. # This shar contains:
  23. # length  mode       name
  24. # ------ ---------- ------------------------------------------
  25. #   6572 -rw-r--r-- README
  26. #   4178 -rw-r--r-- Makefile
  27. #   2768 -rw-r--r-- sco_c16.t.src
  28. #   4869 -rw-r--r-- nlsym.h
  29. #    551 -rw-r--r-- libnlsym.h
  30. #    584 -rw-r--r-- libkmem.h
  31. #   2233 -rw-r--r-- libkmem.c
  32. #   2146 -rw-r--r-- libnlsym.c
  33. #   2390 -rw-r--r-- nlsym.c
  34. #  25595 -rw-r--r-- u386mon.c
  35. #
  36. if touch 2>&1 | fgrep 'mmdd' > /dev/null
  37.  then TOUCH=touch
  38.  else TOUCH=true
  39. fi
  40. # ============= README ==============
  41. echo "x - extracting README (Text)"
  42. sed 's/^X//' << 'SHAR_EOF' > README &&
  43. XWhat
  44. X====
  45. X
  46. XWell, here is u386mon, a hack monitor for SCO UNIX V/386.  It may work
  47. Xwith other UNIX systems with a little work.  It requires terminfo
  48. Xstyle curses and will use color if you have it.
  49. X
  50. X
  51. XApology
  52. X=======
  53. X
  54. XThis is a horribly unreleasable, preliminary, experimental, hacked
  55. Xlittle light show, but it has already helped me diagnose the
  56. Xtraditional "stop-the-world-and-beat-disk-continually-for-15-seconds"
  57. Xproblem as memory exhaustion.
  58. X
  59. X
  60. XSample output
  61. X=============
  62. X(with 43-line screen)
  63. X
  64. X u386mon x0.08   n4hgf - i386 3.2                                     wht@n4hgf
  65. X---- CPU --- tot usr ker brk ---------------------------------------------------
  66. X Instant %    17   4  13   0 uukkkkkk
  67. X 5 Sec Avg %  71  48  23   0 uuuuuuuuuuuuuuuuuuuuuuuukkkkkkkkkkk
  68. X10 Sec Avg %  82  66  16   0 uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuukkkkkkkk
  69. X---- Wait -- tot  io swp pio -- (% of real time) -------------------------------
  70. X Instant %     0   0   0   0
  71. X 5 Sec Avg %   2   2   0   0 i
  72. X10 Sec Avg %   1   1   0   0
  73. X---- Sysinfo/Minfo --- (last 1 second activity) --------------------------------
  74. Xbread       0  rawch      0     pswitch    8    vfault    0    unmodfl   0
  75. Xbwrite      7  canch      0     syscall   16    demand    0    psoutok   0
  76. Xlread       0  outch   3076     sysread    4    pfault    0    psinfai   0
  77. Xlwrite      7                   syswrit    5    cw        0    psinok    0
  78. Xphread      0  msg        0     sysfork    0    steal     0    rsout     0
  79. Xphwrit      0  sema       0     sysexec    0    frdpgs    0    rsin      0
  80. Xiget        0                                   vfpg      0
  81. Xnamei       0  maxmem    5716k  runque     1    sfpg      0    pages on
  82. Xdirblk      0  frmem     3036k  runocc     1    vspg      0    swap      0
  83. Xreadch  34680  mem used    47%  swpque     0    sspg      0    cache     0
  84. Xwritch   3076  nswap    10000k  swpocc     0    unmodsw   0    file      0
  85. X               frswp    10000k
  86. X               swp used     0%
  87. X
  88. X
  89. X
  90. X-- var ---------  -- bootinfo ----------  -- tune ---------  -- proc ---
  91. Xv_buf        600  basemem    655360       t_gpgslo       25  sleep    23
  92. Xv_inode      200  extmem    6291456       t_gpgshi       40  run       0
  93. Xv_file       200  bflags   00000000       t_gpgsmsk   0x420  zombie    0
  94. Xv_mount        5  memory avail            t_ageintvl      9  stop      0
  95. Xv_proc       100  00000000 000a0000       t_maxsc         1  idle      0
  96. Xv_clist      200  00100000 00600000       t_maxfc         1  onproc    1
  97. Xv_sptmap      50  00f40000 00060000 NODM  t_maxumem    2560  xbrk      0
  98. Xv_vhndfrac    16  memory used             t_bdflushr      1  total    24
  99. Xv_maxpmem      0  00000000 00004000 RSVD  t_minarmem     25  in mem   24
  100. X                  006b9000 00038000 KBSS  t_minasmem     25
  101. X                  006f1000 0000f000 KDTA
  102. X                  00fa5000 0005b000 KTXT
  103. X
  104. X
  105. XWhat the display means
  106. X======================
  107. X
  108. XA brief description of reported information:
  109. X
  110. X1.  The CPU utilization is shown with smoothing of 1 ("instant"),
  111. X    5 and 10 seconds.  Total CPU usage is shown, with user, kernel
  112. X    and "break" subdivided.  Most performance utilities (vmstat)
  113. X    lump kernel (CPU_KERNEL) and wait (CPU_WAIT) times together
  114. X    as kernel time.  u386mon considers CPU_WAIT time as idle (the
  115. X    CPU could have been doing something if an otherwise ready process
  116. X    wasn't waited).
  117. X
  118. X    On a color display, total cpu utilization is displayed in
  119. X    green if the cpu utilization is below 70%, yellow (brown, sigh)
  120. X    if utilization is between 70% and 89% and red if 90% or above.
  121. X
  122. X2.  The Wait display shows the 1 ("instant"), 5 and 10 second smoothed
  123. X    percentages of real time no process could be run because otherwise
  124. X    ready to run processes were waiting on logical, swap or physical I/O.
  125. X
  126. X3.  Sysinfo/Minfo display shows, generally, the number of events for a
  127. X    measured value since the last display update.  For example, runque
  128. X    shows the number of times a process was placed on the run queue.
  129. X    An exception is the memory and swap space fields:  These numbers
  130. X    reflect absolute current utilization.
  131. X
  132. X4.  If you run u386mon on a 43 line display, extra information is displayed
  133. X    on the bottom of the screen (from the struct var v, bootinfo
  134. X    and proc kernel databases).
  135. X
  136. X5.  On a color display, static numeric values, such as maxmem appear
  137. X    in blue (the same color as screen literals/labels).  Dynamic
  138. X    numeric values are displayed in green, red or yellow.
  139. X
  140. X6.  An "INEXACT" indication on the top line means that u386mon was
  141. X    not scheduled quickly enough to capture accurate 1 second
  142. X    values.  Continued INEXACT indication suggests the 5 and 10
  143. X    second smoothed values are also wrong.
  144. X
  145. X    An "INVALID" indication means u386mon was not scheduled for 4
  146. X    seconds or more.  All dynamic values are suspect.
  147. X
  148. X
  149. XA $0.0002 tour
  150. X==============
  151. X
  152. XAccess to kernel memory is required for u386mon to do its thing.
  153. X
  154. XThe 'nlist' procedure is performed by a separate program (nlsym)
  155. Xand the resulting nlist structure array is stored in /unix.nlsym.
  156. Xu386mon thus may obtain nlist information rapidly without nlist(S) each
  157. Xtime it is executed.  Also stored in /unix.nlsym is a stat structure of
  158. X/unix at the time of nlsym execution.  A unique word is stored at the
  159. Xend of the file in case /unix.nlsym's nlist structure is expanded for
  160. Xother applications.  The u386mon program reads /unix.nlsym by means
  161. Xof facilities in libnlsym.c.  If the stat structure in /unix.nlsym
  162. Xdoes not match a dynamic stat of /unix or if the unique word does
  163. Xnot match, the nlist information is not trusted and u386mon prompts
  164. Xthe user to run (or have run) the nlsym program to update /unix.nlsym.
  165. X
  166. XHow to get going
  167. X================
  168. X
  169. X1.  you must run the make as root
  170. X
  171. X2.  nlsym must be run by root (the Makefile will do this the first time)
  172. X
  173. X3.  making against Makefile as root will
  174. X    a. make nlsym
  175. X    b. make u386mon and set-gid to group 'mem'
  176. X    c. run nlsym to produce /unix.nlsym
  177. X
  178. X4.  Sources are in 4-spaced tab format (please don't flame :-)).
  179. X
  180. X5.  You MAY wish to use my hacked up terminfo for 'ansi' to get
  181. X    better colors.  I am new at color curses and probably took a
  182. X    bad approach to getting 16 colors instead of 8.  Rather than
  183. X    using the "standard ANSI" color sequences, sco_c16.t.src
  184. X    uses the SCO extensions for 16-color selection.  Just tic
  185. X    sco_c16.t.src and use -DCOLOR_16_TERMINFO in the Makefile CFLAGS.
  186. X    Re-tic the standard source to get back to released reality.
  187. X
  188. XComments are appreciated.
  189. XWarren Tucker N4HGF emory!n4hgf!wht -or- wht%n4hgf.uucp@emory.mathcs.emory.edu
  190. X
  191. SHAR_EOF
  192. $TOUCH -am 0619212990 README &&
  193. chmod 0644 README ||
  194. echo "restore of README failed"
  195. set `wc -c README`;Wc_c=$1
  196. if test "$Wc_c" != "6572"; then
  197.     echo original size 6572, current size $Wc_c
  198. fi
  199. # ============= Makefile ==============
  200. echo "x - extracting Makefile (Text)"
  201. sed 's/^X//' << 'SHAR_EOF' > Makefile &&
  202. X#+--------------------------------------------------------------
  203. X#  Makefile for nlsym utilities for SCO UNIX V/386
  204. X#  ...!emory!n4hgf!wht
  205. X#---------------------------------------------------------------
  206. X#+:EDITS:
  207. X#:06-19-1990-21:37-wht@n4hgf-get ready for 0.08 release
  208. X
  209. XVERSION = x0.08
  210. X
  211. X#handle Sys V make "feature" of using SHELL
  212. XSHELL = /bin/sh
  213. X
  214. XCFLAGS = -c -Octl -DLINT_ARGS
  215. X
  216. X#if you use my hacked 16-color terminfo
  217. X#CFLAGS = -c -Octl -DLINT_ARGS -D COLOR_16_TERMINFO
  218. X
  219. XLIB = -lpanel -lcurses -lx
  220. X#FCRC = fcrc -u $*.c ;
  221. X
  222. X.c.o:;    $(FCRC) cc $(CFLAGS) $*.c 
  223. X
  224. XSRC = \
  225. X    bootinfo.c\
  226. X    disputil.c\
  227. X    libkmem.c\
  228. X    libnlsym.c\
  229. X    nlsym.c\
  230. X    proc.c\
  231. X    tune.c\
  232. X    u386mon.c\
  233. X    var.c
  234. X
  235. XNLSYM_OBJ =\
  236. X    nlsym.o
  237. X
  238. XU386MON_OBJ =\
  239. X    u386mon.o\
  240. X    bootinfo.o\
  241. X    proc.o\
  242. X    tune.o\
  243. X    var.o\
  244. X    disputil.o\
  245. X    libkmem.o\
  246. X    libnlsym.o
  247. X
  248. Xall: nlsym u386mon /unix.nlsym
  249. X
  250. Xnlsym: $(NLSYM_OBJ)
  251. X    cc -o $@ $(NLSYM_OBJ) $(LIB)
  252. X
  253. Xu386mon: $(U386MON_OBJ)
  254. X    cc -o $@ $(U386MON_OBJ) $(LIB)
  255. X    chmod 2711 u386mon
  256. X    chgrp mem u386mon
  257. X
  258. X/unix.nlsym: nlsym /unix
  259. X    nlsym
  260. X    chmod 644 /unix.nlsym
  261. X
  262. X#not delivered
  263. X#src.fls: $(SRC) Makefile
  264. X#    ls $(SRC) > src.fls
  265. X#
  266. X#lint: src.fls
  267. X#    echo ' ' > lint_args.h
  268. X#    csh zgcc src.fls lint_args.h $(CFLAGS)
  269. X
  270. Xclean:
  271. X    rm -f $(U386MON_OBJ) $(NLSYM_OBJ)
  272. X
  273. Xclobber: clean
  274. X    rm -f nlsym u386mon u386mon.sh.0[1234]
  275. X
  276. X#for shar 3.27 or later
  277. Xshar:
  278. X    shar -l 50 -n u386mon.$(VERSION) -o u386mon.sh \
  279. X        README Makefile sco_c16.t.src nlsym.h libnlsym.h libkmem.h \
  280. X        libkmem.c libnlsym.c nlsym.c u386mon.c 
  281. X
  282. X# MAKE DEPEND: regenerate .c:.h, .ol:.c, .ol:.asm dependencies automatically
  283. X#
  284. Xdepend:
  285. X        rm -f depend.tmp
  286. X        if test '$(SRC)' ;\
  287. X        then (grep '^#include' $(SRC) \
  288. X        | sed    -e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
  289. X            -e 's?:[^"]*"\([^"]*\)".*?: \1?'\
  290. X            -e 's?\(.*\)\.c?\1.o?'\
  291. X         >> depend.tmp) ;\
  292. X        fi
  293. X
  294. X        echo '/^# DO NOT DELETE THIS LINE' >exdep.tmp
  295. X        echo '.+1,$$d' >>exdep.tmp
  296. X        echo 'r depend.tmp' >> exdep.tmp
  297. X        echo 'w' >> exdep.tmp
  298. X        cp Makefile Makefile.new
  299. X        ex Makefile.new < exdep.tmp
  300. X        rm exdep.tmp depend.tmp
  301. X        echo '#    DEPENDENCIES MUST END AT END OF    FILE' >>Makefile.new
  302. X        echo '#    IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  303. X        echo '#    see make depend    above'>>Makefile.new
  304. X        mv Makefile Makefile.bak
  305. X        mv Makefile.new Makefile
  306. X
  307. X# DO NOT DELETE THIS LINE
  308. Xbootinfo.o: /usr/include/curses.h
  309. Xbootinfo.o: /usr/include/panel.h
  310. Xbootinfo.o: /usr/include/sys/types.h
  311. Xbootinfo.o: /usr/include/sys/bootinfo.h
  312. Xbootinfo.o: u386mon.h
  313. Xdisputil.o: /usr/include/curses.h
  314. Xdisputil.o: /usr/include/panel.h
  315. Xdisputil.o: u386mon.h
  316. Xlibkmem.o: /usr/include/sys/types.h
  317. Xlibkmem.o: /usr/include/fcntl.h
  318. Xlibkmem.o: libkmem.h
  319. Xlibnlsym.o: /usr/include/stdio.h
  320. Xlibnlsym.o: /usr/include/sys/types.h
  321. Xlibnlsym.o: /usr/include/sys/stat.h
  322. Xlibnlsym.o: /usr/include/fcntl.h
  323. Xlibnlsym.o: /usr/include/nlist.h
  324. Xlibnlsym.o: nlsym.h
  325. Xlibnlsym.o: libnlsym.h
  326. Xnlsym.o: /usr/include/stdio.h
  327. Xnlsym.o: /usr/include/sys/types.h
  328. Xnlsym.o: /usr/include/sys/stat.h
  329. Xnlsym.o: /usr/include/fcntl.h
  330. Xnlsym.o: /usr/include/nlist.h
  331. Xnlsym.o: nlsym.h
  332. Xtune.o: /usr/include/curses.h
  333. Xtune.o: /usr/include/panel.h
  334. Xtune.o: /usr/include/sys/types.h
  335. Xtune.o: /usr/include/sys/tuneable.h
  336. Xtune.o: u386mon.h
  337. Xu386mon.o: /usr/include/curses.h
  338. Xu386mon.o: /usr/include/panel.h
  339. Xu386mon.o: /usr/include/signal.h
  340. Xu386mon.o: /usr/include/string.h
  341. Xu386mon.o: /usr/include/fcntl.h
  342. Xu386mon.o: /usr/include/nlist.h
  343. Xu386mon.o: /usr/include/errno.h
  344. Xu386mon.o: /usr/include/time.h
  345. Xu386mon.o: /usr/include/sys/types.h
  346. Xu386mon.o: /usr/include/sys/utsname.h
  347. Xu386mon.o: /usr/include/sys/stat.h
  348. Xu386mon.o: /usr/include/sys/ascii.h
  349. Xu386mon.o: /usr/include/sys/param.h
  350. Xu386mon.o: /usr/include/sys/bootinfo.h
  351. Xu386mon.o: /usr/include/sys/tuneable.h
  352. Xu386mon.o: /usr/include/sys/sysinfo.h
  353. Xu386mon.o: /usr/include/sys/sysmacros.h
  354. Xu386mon.o: /usr/include/sys/immu.h
  355. Xu386mon.o: /usr/include/sys/region.h
  356. Xu386mon.o: /usr/include/sys/proc.h
  357. Xu386mon.o: /usr/include/sys/var.h
  358. Xu386mon.o: nlsym.h
  359. Xu386mon.o: libkmem.h
  360. Xu386mon.o: libnlsym.h
  361. Xu386mon.o: u386mon.h
  362. Xvar.o: /usr/include/curses.h
  363. Xvar.o: /usr/include/panel.h
  364. Xvar.o: /usr/include/sys/types.h
  365. Xvar.o: /usr/include/sys/var.h
  366. Xvar.o: u386mon.h
  367. X#    DEPENDENCIES MUST END AT END OF    FILE
  368. X#    IF YOU PUT STUFF HERE IT WILL GO AWAY
  369. X#    see make depend    above
  370. SHAR_EOF
  371. $TOUCH -am 0619213990 Makefile &&
  372. chmod 0644 Makefile ||
  373. echo "restore of Makefile failed"
  374. set `wc -c Makefile`;Wc_c=$1
  375. if test "$Wc_c" != "4178"; then
  376.     echo original size 4178, current size $Wc_c
  377. fi
  378. # ============= sco_c16.t.src ==============
  379. echo "x - extracting sco_c16.t.src (Text)"
  380. sed 's/^X//' << 'SHAR_EOF' > sco_c16.t.src &&
  381. X#this is a hacked terminfo to allow direct 16-color access
  382. X#using the SCO video driver extensions
  383. X
  384. Xansi|ansic|ansi80x25|Ansi standard console,
  385. X    am, eo, xon, bce,
  386. X    cols#80, lines#25, colors#16, pairs#64,
  387. X    initc=, op=\E[=11F\E[=0G\E[=4H\E[=7I\E[m,
  388. X    setf=\E[=%p1%dF\E[m,
  389. X    setb=\E[=%p1%dG\E[m,
  390. X    bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,
  391. X    clear=\E[2J\E[H, cr=\r, cub1=\b, cud1=\E[B, cuf1=\E[C,
  392. X    cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
  393. X    dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H,
  394. X    ht=\t, ich1=\E[@, il1=\E[L, ind=\E[S, kbs=\b,
  395. X    kb2=\E[E,
  396. X    kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
  397. X    kf0=\E[V, kf1=\E[M, kf2=\E[N, kf3=\E[O, kf4=\E[P,
  398. X    kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U,
  399. X    khome=\E[H, kend=\E[F, kpp=\E[I, knp=\E[G,
  400. X    ri=\E[T, rmso=\E[m,
  401. X    rmul=\E[m, sgr0=\E[m, smso=\E[7m, smul=\E[4m,
  402. X    it#8, ht=^I, cbt=\E[Z,
  403. X#wht additions
  404. X    civis=\E[=8;7C,cnorm=\E[=4;8C,cvvis=\E[=0;8C,
  405. X    kb2=\E[E,
  406. X#wht changes
  407. X    setf=\E[=%p1%dF\E[=0E\E[m,
  408. X    setb=\E[=%p1%dG\E[=0E\E[m,
  409. X    kich1=\E[L,kdch1=\177
  410. X    kf10=\E[U, kf11=\E[V,
  411. X    cols#80, lines#43, colors#16, pairs#64,
  412. X
  413. X
  414. Xansi43|ansi80x43|Ansi standard console 80x43,
  415. X    am, eo, xon, bce,
  416. X    initc=, op=\E[=11F\E[=0G\E[=4H\E[=7I\E[m,
  417. X    bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,
  418. X    clear=\E[2J\E[H, cr=\r, cub1=\b, cud1=\E[B, cuf1=\E[C,
  419. X    cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
  420. X    dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H,
  421. X    ht=\t, ich1=\E[@, il1=\E[L, ind=\E[S, kbs=\b,
  422. X    kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
  423. X    kf0=\E[V, kf1=\E[M, kf2=\E[N, kf3=\E[O, kf4=\E[P,
  424. X    kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U,
  425. X    khome=\E[H, kend=\E[F, kpp=\E[I, knp=\E[G,
  426. X    ri=\E[T, rmso=\E[m,
  427. X    rmul=\E[m, sgr0=\E[m, smso=\E[7m, smul=\E[4m,
  428. X    it#8, ht=^I, cbt=\E[Z,
  429. X#wht additions
  430. X    civis=\E[=8;7C,cnorm=\E[=4;8C,cvvis=\E[=0;8C,
  431. X    kb2=\E[E,
  432. X#wht changes
  433. X    setf=\E[=%p1%dF\E[=0E\E[m,
  434. X    setb=\E[=%p1%dG\E[=0E\E[m,
  435. X    kich1=\E[L,kdch1=\177
  436. X    kf10=\E[U, kf11=\E[V,
  437. X    cols#80, lines#43, colors#16, pairs#64,
  438. X
  439. Xansi24|ansi80x24|Ansi standard console 80x24,
  440. X    am, eo, xon, bce,
  441. X    initc=, op=\E[=11F\E[=0G\E[=4H\E[=7I\E[m,
  442. X    bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,
  443. X    clear=\E[2J\E[H, cr=\r, cub1=\b, cud1=\E[B, cuf1=\E[C,
  444. X    cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
  445. X    dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H,
  446. X    ht=\t, ich1=\E[@, il1=\E[L, ind=\E[S, kbs=\b,
  447. X    kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
  448. X    kf0=\E[V, kf1=\E[M, kf2=\E[N, kf3=\E[O, kf4=\E[P,
  449. X    kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U,
  450. X    khome=\E[H, kend=\E[F, kpp=\E[I, knp=\E[G,
  451. X    ri=\E[T, rmso=\E[m,
  452. X    rmul=\E[m, sgr0=\E[m, smso=\E[7m, smul=\E[4m,
  453. X    it#8, ht=^I, cbt=\E[Z,
  454. X#wht additions
  455. X    civis=\E[=8;7C,cnorm=\E[=4;8C,cvvis=\E[=0;8C,
  456. X    kb2=\E[E,
  457. X#wht changes
  458. X    setf=\E[=%p1%dF\E[=0E\E[m,
  459. X    setb=\E[=%p1%dG\E[=0E\E[m,
  460. X    kich1=\E[L,kdch1=\177
  461. X    kf10=\E[U, kf11=\E[V,
  462. X    cols#80, lines#24, colors#16, pairs#64,
  463. X
  464. SHAR_EOF
  465. $TOUCH -am 0617055290 sco_c16.t.src &&
  466. chmod 0644 sco_c16.t.src ||
  467. echo "restore of sco_c16.t.src failed"
  468. set `wc -c sco_c16.t.src`;Wc_c=$1
  469. if test "$Wc_c" != "2768"; then
  470.     echo original size 2768, current size $Wc_c
  471. fi
  472. # ============= nlsym.h ==============
  473. echo "x - extracting nlsym.h (Text)"
  474. sed 's/^X//' << 'SHAR_EOF' > nlsym.h &&
  475. X/*+-------------------------------------------------------------------------
  476. X    nlsym.h -- utility nlist - fast access to kernel /dev/kmem offsets
  477. X    ...!gatech!emory!tridom!wht
  478. X
  479. XThe nlsym file contains three records:
  480. X1.  struct stat unixstat - stat buffer from /unix at file creation time
  481. X2.  struct nlist nlsym - the structure of nlist'd information
  482. X3.  long unique - a unique identifier to help ensure correct nlsym length
  483. X
  484. X--------------------------------------------------------------------------*/
  485. X/*+:EDITS:*/
  486. X/*:10-27-1988-11:07-wht-creation */
  487. X
  488. X#define UNIX_KERNEL        "/unix"
  489. X#define UNIX_NLSYM        "/unix.nlsym"
  490. X#define NLSYM_UNIQUE    0xEFBC9A78L
  491. X
  492. X#define Nindex_AVAILRMEM       0
  493. X#define Nindex_AVAILSMEM       1
  494. X#define Nindex_BDEVCNT         2
  495. X#define Nindex_BDEVSW          3
  496. X#define Nindex_BOOTINFO        4
  497. X#define Nindex_CDEVCNT         5
  498. X#define Nindex_CDEVSW          6
  499. X#define Nindex_CFREE           7
  500. X#define Nindex_CFREECNT        8
  501. X#define Nindex_CFREELIST       9
  502. X#define Nindex_CMASK          10
  503. X#define Nindex_CONSSW         11
  504. X#define Nindex_CURPROC        12
  505. X#define Nindex_DINFO          13
  506. X#define Nindex_DISKINFO       14
  507. X#define Nindex_DSTFLAG        15
  508. X#define Nindex_DUMPDEV        16
  509. X#define Nindex_EMAP           17
  510. X#define Nindex_FFREELIST      18
  511. X#define Nindex_FILE           19
  512. X#define Nindex_FMODCNT        20
  513. X#define Nindex_FMODSW         21
  514. X#define Nindex_FREEMEM        22
  515. X#define Nindex_FSINFO         23
  516. X#define Nindex_FSTYPSW        24
  517. X#define Nindex_HZ             25
  518. X#define Nindex_IDLESERVER     26
  519. X#define Nindex_IFREELIST      27
  520. X#define Nindex_INODE          28
  521. X#define Nindex_KPTBL          29
  522. X#define Nindex_LBOLT          30
  523. X#define Nindex_LINECNT        31
  524. X#define Nindex_LINESW         32
  525. X#define Nindex_MAXCLICK       33
  526. X#define Nindex_MAXMEM         34
  527. X#define Nindex_MFMAP          35
  528. X#define Nindex_MFMAX          36
  529. X#define Nindex_MINFO          37
  530. X#define Nindex_MOUNT          38
  531. X#define Nindex_MSGLISTCNT     39
  532. X#define Nindex_NFSTYP         40
  533. X#define Nindex_NPTALLOCED     41
  534. X#define Nindex_NPTFREE        42
  535. X#define Nindex_NSERVERS       43
  536. X#define Nindex_NSWAP          44
  537. X#define Nindex_NSYSENT        45
  538. X#define Nindex_OLDPROC        46
  539. X#define Nindex_OLD_CURPROC    47
  540. X#define Nindex_PANICSTR       48
  541. X#define Nindex_PHYSMEM        49
  542. X#define Nindex_PIPEDEV        50
  543. X#define Nindex_PROC           51
  544. X#define Nindex_RCINFO         52
  545. X#define Nindex_ROOTDEV        53
  546. X#define Nindex_RUNQ           54
  547. X#define Nindex_SHLBINFO       55
  548. X#define Nindex_SWAPDEV        56
  549. X#define Nindex_SWPLO          57
  550. X#define Nindex_SYSERR         58
  551. X#define Nindex_SYSINFO        59
  552. X#define Nindex_SYSSEGS        60
  553. X#define Nindex_SYSWAIT        61
  554. X#define Nindex_TIME           62
  555. X#define Nindex_TIMEZONE       63
  556. X#define Nindex_TTHIWAT        64
  557. X#define Nindex_TTLOWAT        65
  558. X#define Nindex_TTNULQ         66
  559. X#define Nindex_TTYHOG         67
  560. X#define Nindex_TUNE           68
  561. X#define Nindex_U              69
  562. X#define Nindex_USERTABLE      70
  563. X#define Nindex_V              71
  564. X#define Nindex_WIN_UBLK       72
  565. X
  566. X#define bootinfoaddr (nlsym[Nindex_BOOTINFO].n_value)
  567. X#define freememaddr (nlsym[Nindex_FREEMEM].n_value)
  568. X#define lboltaddr (nlsym[Nindex_LBOLT].n_value)
  569. X#define maxmemaddr (nlsym[Nindex_MAXMEM].n_value)
  570. X#define minfoaddr (nlsym[Nindex_MINFO].n_value)
  571. X#define nswapaddr (nlsym[Nindex_NSWAP].n_value)
  572. X#define physmemaddr (nlsym[Nindex_PHYSMEM].n_value)
  573. X#define procaddr (nlsym[Nindex_PROC].n_value)
  574. X#define sysinfoaddr (nlsym[Nindex_SYSINFO].n_value)
  575. X#define tuneaddr (nlsym[Nindex_TUNE].n_value)
  576. X#define vaddr (nlsym[Nindex_V].n_value)
  577. X
  578. X#ifdef DEFINE_NLSYM
  579. Xstruct nlist nlsym[] =
  580. X{
  581. X    { "availrmem" },
  582. X    { "availsmem" },
  583. X    { "bdevcnt" },
  584. X    { "bdevsw" },
  585. X    { "bootinfo" },
  586. X    { "cdevcnt" },
  587. X    { "cdevsw" },
  588. X    { "cfree" },
  589. X    { "cfreecnt" },
  590. X    { "cfreelist" },
  591. X    { "Cmask" },
  592. X    { "conssw" },
  593. X    { "curproc" },
  594. X    { "dinfo" },
  595. X    { "diskinfo" },
  596. X    { "Dstflag" },
  597. X    { "dumpdev" },
  598. X    { "emap" },
  599. X    { "ffreelist" },
  600. X    { "file" },
  601. X    { "fmodcnt" },
  602. X    { "fmodsw" },
  603. X    { "freemem" },
  604. X    { "fsinfo" },
  605. X    { "fstypsw" },
  606. X    { "Hz" },
  607. X    { "idleserver" },
  608. X    { "ifreelist" },
  609. X    { "inode" },
  610. X    { "kptbl" },
  611. X    { "lbolt" },
  612. X    { "linecnt" },
  613. X    { "linesw" },
  614. X    { "maxclick" },
  615. X    { "maxmem" },
  616. X    { "mfmap" },
  617. X    { "mfmax" },
  618. X    { "minfo" },
  619. X    { "mount" },
  620. X    { "msglistcnt" },
  621. X    { "nfstyp" },
  622. X    { "nptalloced" },
  623. X    { "nptfree" },
  624. X    { "nservers" },
  625. X    { "nswap" },
  626. X    { "nsysent" },
  627. X    { "oldproc" },
  628. X    { "old_curproc" },
  629. X    { "panicstr" },
  630. X    { "physmem" },
  631. X    { "pipedev" },
  632. X    { "proc" },
  633. X    { "rcinfo" },
  634. X    { "rootdev" },
  635. X    { "runq" },
  636. X    { "shlbinfo" },
  637. X    { "swapdev" },
  638. X    { "swplo" },
  639. X    { "syserr" },
  640. X    { "sysinfo" },
  641. X    { "syssegs" },
  642. X    { "syswait" },
  643. X    { "time" },
  644. X    { "Timezone" },
  645. X    { "tthiwat" },
  646. X    { "ttlowat" },
  647. X    { "ttnulq" },
  648. X    { "ttyhog" },
  649. X    { "tune" },
  650. X    { "u" },
  651. X    { "usertable" },
  652. X    { "v" },
  653. X    { "win_ublk" },
  654. X    { (char *)0 }
  655. X};
  656. X#else
  657. Xextern struct nlist nlsym[];
  658. X#endif
  659. X
  660. X/* vi: set tabstop=4 shiftwidth=4: */
  661. SHAR_EOF
  662. $TOUCH -am 0619213590 nlsym.h &&
  663. chmod 0644 nlsym.h ||
  664. echo "restore of nlsym.h failed"
  665. set `wc -c nlsym.h`;Wc_c=$1
  666. if test "$Wc_c" != "4869"; then
  667.     echo original size 4869, current size $Wc_c
  668. fi
  669. # ============= libnlsym.h ==============
  670. echo "x - extracting libnlsym.h (Text)"
  671. sed 's/^X//' << 'SHAR_EOF' > libnlsym.h &&
  672. X/*+-----------------------------------------------------------------------
  673. X    libnlsym.h
  674. X    ...!gatech!emory!tridom!wht
  675. X------------------------------------------------------------------------*/
  676. X/*+:EDITS:*/
  677. X/*:10-28-1988-14:47-afterlint-creation */
  678. X
  679. X#ifndef BUILDING_LINT_ARGS
  680. X#ifdef LINT_ARGS
  681. X
  682. X/* libnlsym.c */
  683. Xvoid nlsym_error(char * );
  684. Xvoid nlsym_read(void);
  685. X
  686. X#else        /* compiler doesn't know about prototyping */
  687. X
  688. X/* libnlsym.c */
  689. Xvoid nlsym_error();
  690. Xvoid nlsym_read();
  691. X
  692. X#endif /* LINT_ARGS */
  693. X#endif /* BUILDING_LINT_ARGS */
  694. X
  695. X/* end of libnlsym.h */
  696. SHAR_EOF
  697. $TOUCH -am 0619213490 libnlsym.h &&
  698. chmod 0644 libnlsym.h ||
  699. echo "restore of libnlsym.h failed"
  700. set `wc -c libnlsym.h`;Wc_c=$1
  701. if test "$Wc_c" != "551"; then
  702.     echo original size 551, current size $Wc_c
  703. fi
  704. # ============= libkmem.h ==============
  705. echo "x - extracting libkmem.h (Text)"
  706. sed 's/^X//' << 'SHAR_EOF' > libkmem.h &&
  707. X/*+-----------------------------------------------------------------------
  708. X    libkmem.h
  709. X    ...!gatech!emory!tridom!wht
  710. X------------------------------------------------------------------------*/
  711. X/*+:EDITS:*/
  712. X/*:10-28-1988-14:46-afterlint-creation */
  713. X
  714. X#ifndef BUILDING_LINT_ARGS
  715. X#ifdef LINT_ARGS
  716. X
  717. X/* libkmem.c */
  718. Xvoid kinit(int );
  719. Xvoid kread(char  *,long ,int );
  720. Xvoid kwrite(long ,char  *,int );
  721. X
  722. X#else        /* compiler doesn't know about prototyping */
  723. X
  724. X/* libkmem.c */
  725. Xvoid kinit();
  726. Xvoid kread();
  727. Xvoid kwrite();
  728. X
  729. X#endif /* LINT_ARGS */
  730. X#endif /* BUILDING_LINT_ARGS */
  731. X
  732. X/* end of libkmem.h */
  733. SHAR_EOF
  734. $TOUCH -am 0619213490 libkmem.h &&
  735. chmod 0644 libkmem.h ||
  736. echo "restore of libkmem.h failed"
  737. set `wc -c libkmem.h`;Wc_c=$1
  738. if test "$Wc_c" != "584"; then
  739.     echo original size 584, current size $Wc_c
  740. fi
  741. # ============= libkmem.c ==============
  742. echo "x - extracting libkmem.c (Text)"
  743. sed 's/^X//' << 'SHAR_EOF' > libkmem.c &&
  744. X/*+-------------------------------------------------------------------------
  745. X    libkmem.c -- /dev/kmem routines for SCO UNIX V/286 (maybe other *NIX)
  746. X    ...!gatech!emory!tridom!wht
  747. X
  748. X  Defined functions:
  749. X    kinit(write_needed)
  750. X    kread(caddr,kaddr,len)
  751. X    kwrite(kaddr,caddr,len)
  752. X
  753. X routines were originally written by Mike "Ford" Ditto: kudos!!!
  754. X--------------------------------------------------------------------------*/
  755. X/*+:EDITS:*/
  756. X/*:12-07-1988-22:06-wht-put in test for initialized fdkmem */
  757. X/*:10-27-1988-22:44-wht-creation of file */
  758. X
  759. X#include <sys/types.h>
  760. X#include <fcntl.h>
  761. X#include "libkmem.h"
  762. X
  763. Xextern int errno;
  764. X
  765. Xstatic int fdkmem = -2;
  766. Xdaddr_t lseek();
  767. X
  768. X/*+-------------------------------------------------------------------------
  769. X    kinit(write_needed)
  770. X--------------------------------------------------------------------------*/
  771. Xvoid
  772. Xkinit(write_needed)
  773. Xint write_needed;
  774. X{
  775. X    if((fdkmem=open("/dev/kmem",(write_needed) ? O_RDWR : O_RDONLY,0)) < 0)
  776. X        leave_text("can't open /dev/kmem",1);
  777. X
  778. X}    /* end of kinit */
  779. X
  780. X/*+-------------------------------------------------------------------------
  781. X    kread(caddr,kaddr,len)
  782. X--------------------------------------------------------------------------*/
  783. Xvoid
  784. Xkread(caddr,kaddr,len)
  785. Xcaddr_t caddr;
  786. Xdaddr_t kaddr;
  787. Xint len;
  788. X{
  789. Xchar s80[80];
  790. X
  791. X#if defined(M_I286)
  792. X    kaddr &= 0xFFFFL;
  793. X#endif
  794. X
  795. X    if(fdkmem == -2)
  796. X        leave_text("kinit() not called",1);
  797. X
  798. X    if(lseek(fdkmem,kaddr,0) == -1L)
  799. X    {
  800. X        sprintf(s80,"kmem seek err (%08lx)",kaddr);
  801. X        leave_text(s80,1);
  802. X    }
  803. X
  804. X    if(read(fdkmem,caddr,len) != len)
  805. X    {
  806. X        sprintf(s80,"kmem read errno %d len %d addr %08lx",errno,len,kaddr);
  807. X        leave_text(s80,1);
  808. X    }
  809. X}    /* end of kread */
  810. X
  811. X/*+-------------------------------------------------------------------------
  812. X    kwrite(kaddr,caddr,len)
  813. X--------------------------------------------------------------------------*/
  814. Xvoid
  815. Xkwrite(kaddr,caddr,len)
  816. Xdaddr_t kaddr;
  817. Xcaddr_t caddr;
  818. Xint len;
  819. X{
  820. Xchar s80[80];
  821. X
  822. X#if defined(M_I286)
  823. X    kaddr &= 0xFFFFL;
  824. X#endif
  825. X
  826. X    if(fdkmem == -2)
  827. X        leave_text("kinit() not called",1);
  828. X
  829. X    if((lseek(fdkmem,kaddr,0) < 0L) || (write(fdkmem,caddr,len) != len))
  830. X    {
  831. X        sprintf(s80,"/dev/kmem write addr %08lx len %08lx",kaddr,len);
  832. X        leave_text(s80,1);
  833. X    }
  834. X}    /* end of kwrite */
  835. X
  836. X/* vi: set tabstop=4 shiftwidth=4: */
  837. SHAR_EOF
  838. $TOUCH -am 0619213490 libkmem.c &&
  839. chmod 0644 libkmem.c ||
  840. echo "restore of libkmem.c failed"
  841. set `wc -c libkmem.c`;Wc_c=$1
  842. if test "$Wc_c" != "2233"; then
  843.     echo original size 2233, current size $Wc_c
  844. fi
  845. # ============= libnlsym.c ==============
  846. echo "x - extracting libnlsym.c (Text)"
  847. sed 's/^X//' << 'SHAR_EOF' > libnlsym.c &&
  848. X/*+-------------------------------------------------------------------------
  849. X    libnlsym.c -- common runtime for nlsym users
  850. X    ...!gatech!emory!tridom!wht
  851. X
  852. X  Defined functions:
  853. X    nlsym_error(text)
  854. X    nlsym_read()
  855. X
  856. X--------------------------------------------------------------------------*/
  857. X/*+:EDITS:*/
  858. X/*:10-27-1988-11:44-wht-creation */
  859. X
  860. X#include <stdio.h>
  861. X#include <sys/types.h>
  862. X#include <sys/stat.h>
  863. X#include <fcntl.h>
  864. X#include <nlist.h>
  865. X
  866. X#define DEFINE_NLSYM
  867. X#include "nlsym.h"
  868. X#include "libnlsym.h"
  869. X
  870. Xextern int errno;
  871. Xextern char *sys_errlist[];
  872. X
  873. X/*+-------------------------------------------------------------------------
  874. X    nlsym_error(text)
  875. X--------------------------------------------------------------------------*/
  876. Xvoid
  877. Xnlsym_error(text)
  878. Xchar *text;
  879. X{
  880. Xchar s128[128];
  881. X
  882. X    strcpy(s128,text);
  883. X    if(errno)
  884. X    {
  885. X        strcat(s128," (");
  886. X        strcat(s128,sys_errlist[errno]);
  887. X        strcat(s128,")");
  888. X    }
  889. X    strcat(s128," run nlsym");
  890. X    leave_text(s128,1);
  891. X}    /* end of nlsym_error */
  892. X
  893. X/*+-------------------------------------------------------------------------
  894. X    nlsym_read()
  895. X--------------------------------------------------------------------------*/
  896. Xvoid
  897. Xnlsym_read()
  898. X{
  899. Xchar s80[80];
  900. Xint itmp;
  901. Xint fdnlsym;
  902. Xstruct stat curstat;    /* current /unix status */
  903. Xstruct stat unixstat;        /* /unix status at nlsym run time */
  904. Xlong unique;
  905. X
  906. X    if(stat(UNIX_KERNEL,&curstat) < 0)
  907. X    {
  908. X        sprintf(s80,"cannot stat %s",UNIX_KERNEL);
  909. X        nlsym_error(s80);
  910. X    }
  911. X
  912. X    errno = 0;
  913. X    if((fdnlsym = open(UNIX_NLSYM,O_RDONLY,0)) < 0)
  914. X    {
  915. X        sprintf(s80,"%s open error\n",UNIX_NLSYM);
  916. X        nlsym_error(s80);
  917. X    }
  918. X
  919. X    if((itmp = read(fdnlsym,&unixstat,sizeof(unixstat))) != sizeof(unixstat))
  920. X        nlsym_error("unix stat error");
  921. X
  922. X    if((itmp = read(fdnlsym,nlsym,sizeof(nlsym))) != sizeof(nlsym))
  923. X        nlsym_error("nlsym error: ");
  924. X
  925. X    if((itmp = read(fdnlsym,&unique,sizeof(unique))) != sizeof(unique))
  926. X        nlsym_error("`unique' read error");
  927. X
  928. X    close(fdnlsym);
  929. X
  930. X    if( (unique != NLSYM_UNIQUE) ||
  931. X        (unixstat.st_ino != curstat.st_ino) ||
  932. X        (unixstat.st_mtime != curstat.st_mtime) ||
  933. X        (unixstat.st_size != curstat.st_size))
  934. X    {
  935. X        sprintf(s80,"%s out of date\n",UNIX_NLSYM);
  936. X        nlsym_error(s80);
  937. X    }
  938. X
  939. X}    /* end of nlsym_read */
  940. SHAR_EOF
  941. $TOUCH -am 0619213490 libnlsym.c &&
  942. chmod 0644 libnlsym.c ||
  943. echo "restore of libnlsym.c failed"
  944. set `wc -c libnlsym.c`;Wc_c=$1
  945. if test "$Wc_c" != "2146"; then
  946.     echo original size 2146, current size $Wc_c
  947. fi
  948. # ============= nlsym.c ==============
  949. echo "x - extracting nlsym.c (Text)"
  950. sed 's/^X//' << 'SHAR_EOF' > nlsym.c &&
  951. X/*+-------------------------------------------------------------------------
  952. X    nlsym.c -- utility nlist - fast access to kernel /dev/kmem offsets
  953. X    ...!gatech!emory!tridom!wht
  954. X
  955. X  Defined functions:
  956. X    main(argc,argv,envp)
  957. X    nlsym_write_error(code)
  958. X
  959. X--------------------------------------------------------------------------*/
  960. X/*+:EDITS:*/
  961. X/*:05-12-1989-18:27-wht-fix endless loop error on cannot nlist */
  962. X/*:10-27-1988-10:58-wht-creation */
  963. X
  964. X#include <stdio.h>
  965. X#include <sys/types.h>
  966. X#include <sys/stat.h>
  967. X#include <fcntl.h>
  968. X#include <nlist.h>
  969. X
  970. X#define DEFINE_NLSYM
  971. X#include "nlsym.h"
  972. X
  973. X/*+-------------------------------------------------------------------------
  974. X    nlsym_write_error(code)
  975. X--------------------------------------------------------------------------*/
  976. Xvoid
  977. Xnlsym_write_error(code)
  978. Xint code;
  979. X{
  980. X    fprintf(stderr,"code %d: ",code);
  981. X    perror(UNIX_NLSYM);
  982. X    exit(1);
  983. X}    /* end of nlsym_write_error */
  984. X
  985. X/*+-------------------------------------------------------------------------
  986. X    main(argc,argv,envp)
  987. X--------------------------------------------------------------------------*/
  988. Xmain(argc,argv,envp)
  989. Xint argc;
  990. Xchar **argv;
  991. Xchar **envp;
  992. X{
  993. Xregister int itmp;
  994. Xregister struct nlist *nn;
  995. Xstruct stat unixstat;        /* /unix status at nlsym run time */
  996. Xint fdnlsym;
  997. Xint nlist_error = 0;
  998. Xlong unique;
  999. XFILE *kludge;
  1000. X
  1001. X    nlist(UNIX_KERNEL,nlsym);
  1002. X
  1003. X    nn = nlsym;
  1004. X    while(nn->n_name)
  1005. X    {
  1006. X        if(!nn->n_sclass)
  1007. X        {
  1008. X            printf("%s: can't nlist\n", nn->n_name);
  1009. X            nlist_error = 1;
  1010. X            nn++;
  1011. X            continue;
  1012. X        }
  1013. X        printf("%-12.12s  storage class: %04x value: %08lx\n",
  1014. X            nn->n_name,
  1015. X            nn->n_sclass,
  1016. X            nn->n_value);
  1017. X        nn++;
  1018. X    }
  1019. X
  1020. X    if(nlist_error)
  1021. X    {
  1022. X        fprintf(stderr,"%s NOT produced\n",UNIX_NLSYM);
  1023. X        exit(1);
  1024. X    }
  1025. X
  1026. X    if((kludge = fopen(UNIX_NLSYM,"w")) == NULL)    /* scratch/create */
  1027. X        nlsym_write_error(-1);
  1028. X    fclose(kludge);
  1029. X
  1030. X    if((fdnlsym = open(UNIX_NLSYM,O_WRONLY,0)) < 0)
  1031. X        nlsym_write_error(fdnlsym);
  1032. X
  1033. X    if(stat(UNIX_KERNEL,&unixstat) < 0)
  1034. X    {
  1035. X        fputs("cannot stat ",stderr);
  1036. X        perror(UNIX_KERNEL);
  1037. X        exit(1);
  1038. X    }
  1039. X
  1040. X    if((itmp = write(fdnlsym,&unixstat,sizeof(unixstat))) != sizeof(unixstat))
  1041. X        nlsym_write_error(itmp);
  1042. X
  1043. X    if((itmp = write(fdnlsym,nlsym,sizeof(nlsym))) != sizeof(nlsym))
  1044. X        nlsym_write_error(itmp);
  1045. X
  1046. X    unique = NLSYM_UNIQUE;
  1047. X    if((itmp = write(fdnlsym,&unique,sizeof(unique))) != sizeof(unique))
  1048. X        nlsym_write_error(itmp);
  1049. X
  1050. X    close(fdnlsym);
  1051. X    exit(0);
  1052. X}    /* end of main */
  1053. X
  1054. X/* vi: set tabstop=4 shiftwidth=4: */
  1055. SHAR_EOF
  1056. $TOUCH -am 0619213590 nlsym.c &&
  1057. chmod 0644 nlsym.c ||
  1058. echo "restore of nlsym.c failed"
  1059. set `wc -c nlsym.c`;Wc_c=$1
  1060. if test "$Wc_c" != "2390"; then
  1061.     echo original size 2390, current size $Wc_c
  1062. fi
  1063. echo "End of part 1, continue with part 2"
  1064. exit 0
  1065.  
  1066. ---------------------------------------------------------------------
  1067. Warren Tucker, TuckerWare    gatech!n4hgf!wht or wht%n4hgf@gatech.edu
  1068. Any perceptible delay will eventually get on your nerves. --Bob Hyers
  1069.