Path: ns-mx!uunet!sun-barr!newstop!sun!amdahl!fadden From: fadden@uts.amdahl.com (Andy McFadden) Newsgroups: comp.binaries.apple2 Subject: NuLib v3.10 (UNIX) nulib.01 Message-ID: <562i02jr09y500@amdahl.uts.amdahl.com> Date: 1 Nov 91 04:11:02 GMT Reply-To: fadden@amdahl.uts.amdahl.com (Andy McFadden) Organization: Amdahl Corporation, Sunnyvale CA Lines: 1238 This is NuLib v3.1. New features include: - LZW-II uncompression - Faster ShrinkIt LZW - Better System V support Runs under most UNIX systems, MS-DOS, and APW/Orca on the //gs. ---- Cut Here and feed the following to sh ---- #!/bin/sh # This is a shell archive (produced by shar 3.49) # To extract the files from this archive, save it to a file, remove # everything above the "!/bin/sh" line above, and type "sh file_name". # # made 10/31/1991 21:42 UTC by fadden@hermes.Berkeley.EDU # Source directory /a/postgres/fadden/ocf/nulib # # existing files will NOT be overwritten unless -c is specified # # This shar contains: # length mode name # ------ ---------- ------------------------------------------ # 4314 -rw-r--r-- README # 7454 -rw-r--r-- Benchmarks # 5652 -rw-r--r-- Speedup # 1860 -rw-r--r-- Makefile # 652 -rw-r--r-- make.apw # 97 -rw-r--r-- linker.scr # 2224 -rw-r--r-- linked.scr # 737 -rwxr-xr-x mkshk # 1744 -rw-r--r-- nulib.mak # 185 -rw-r--r-- nulib.lnk # 6766 -rw-r--r-- apwerr.h # 3321 -rw-r--r-- crc.h # 956 -rw-r--r-- nuadd.h # 181 -rw-r--r-- nublu.h # 18755 -rw-r--r-- nucomp.h # 2397 -rw-r--r-- nucompfn.h # 3997 -rw-r--r-- nudefs.h # 1366 -rw-r--r-- nuetc.h # 250 -rw-r--r-- nuext.h # 883 -rw-r--r-- nupak.h # 217 -rw-r--r-- nupdel.h # 4187 -rw-r--r-- nuread.h # 630 -rw-r--r-- nuview.h # 21905 -rw-r--r-- nuadd.c # 11154 -rw-r--r-- nublu.c # 30783 -rw-r--r-- nucomp.c # 16532 -rw-r--r-- nuetc.c # 19160 -rw-r--r-- nuext.c # 16586 -rw-r--r-- numain.c # 15017 -rw-r--r-- nupak.c # 13985 -rw-r--r-- nupdel.c # 19109 -rw-r--r-- nuread.c # 26909 -rw-r--r-- nushk.c # 7425 -rw-r--r-- nusq.c # 17646 -rw-r--r-- nuview.c # # ============= README ============== if test -f 'README' -a X"$1" != X"-c"; then echo 'x - skipping README (File already exists)' else echo 'x - extracting README (Text)' sed 's/^X//' << 'SHAR_EOF' > 'README' && NuLib v3.1 README (November 1991) X New items in 3.1: - GS/ShrinkIt LZW-II uncompression (finally!) - All ShrinkIt compression/uncompression routines are about 15% faster X Nulib v3.03 (February 1991) - Fixed XENIX problems with includes and libs (Ron Higgins). - Fixed bug in directory expansion (Larry W. Virden). NuLib v3.02 - Silenced screaming about bad dates (Larry W. Virden). - Fixed glitches in nulib.lnk and nulib.mak (Bruce Kahn). NuLib v3.01 - Fixed non-compression bug in ShrinkIt LZW (Scott Blackman). X NuLib v3.0 (September 1990) X New items in 3.0: - ShrinkIt LZW compression - UNIX 12-bit and 16-bit compression - New archive listing format (similar to ARC and ZOO) X ============================================================================== X Things work much better if you read the documentation file (now available on the archive site... sorry I didn't put it up sooner). If you want to use UNIX compress to store files, READ THE DOCUMENTATION FIRST. Not only does it tell you how to do it, but it has some warnings about compatibility. X To compile this on a UNIX-type system, edit the file "nudefs.h". Several systems are predefined; the default is a BSD UNIX system. If you want to run this on something other than BSD, comment out the #define statements (using "/*" and "*/"), and uncomment the appropriate statements (several systems are defined... if yours is an AT&T System V system, try the defines for Amdahl UTS). Then, type "make" to execute the Makefile. If all goes well, you will be left with an executable file called "nulib". If all does not go well, double check "nudefs.h". Send some mail to me if you can't get it to work at all. X Currently AT&T 3B2 machines seem to be very uncooperative. If somebody gets NuLib to run on one, please let me know. The problem is in the directory manipulation routines (struct dirent, opendir(), readdir(), etc). This now runs under Amdahl UTS 2.1, which is pretty close to SVR3.2. Hopefully compatibility with SYSV will be better. X To make the MS-DOS version, use the nulib.mak and nulib.lnk files with MS C (supplied by Bruce Kahn). To make the APW C version (NOT Orca/C), put all the files in one directory, and make a subdirectory called "OBJ". Put the "linked.scr" and "linker.scr" files in OBJ, and then "make.apw". This will compile all the files. When it finishes, change to OBJ and "alink linked.scr" (standard linker) or "alink linker.scr" (ZapLink). The makefile used to do this automatically, but with only 1.25MB of RAM you have to exit APW to purge all the memory used by the compiler, and and then restart APW and run the linker. X In both cases, BE SURE to modify "nudefs.h" first. If you don't, the compilation will halt in "numain.c" on a line which reminds you to change "nudefs.h" (I tended to forget about this). Also, under APW make sure all the file types are set to SRC, and the auxtype to CC. These are changed with the commands "filetype" and "change", respectively. X As of the time of this release, NuLib is not compatible with the GNO shell. X Please send bug reports, ideas, or gripes to fadden@uts.amdahl.com, or to one of the addresses mentioned in the documentation or under the "-hw" option. X Known bugs: X - Under some systems, using UNIX compress on a file which does not compress will cause the archive's EOF to be larger than it should be. This slack space will be used up if you add more files to the archive (with NuLib anyway; no guarantees about ShrinkIt or GS/ShrinkIt, but there's no reason why they shouldn't work). X (just to make things clear: if the file being compressed doesn't get any smaller, the compression halts and the file is simply stored uncompressed. Because of the way compress works, on some systems the space that would have been occupied by more compressed data is left attached to the file. The ShrinkIt compression does not suffer from this problem. If you add more stuff to the file, NuLib will fill the slack space first, NOT just append to the end of the file). X I can be reached at: X fadden@uts.amdahl.com (preferred) X fadden@hermes.berkeley.edu X fadden@cory.berkeley.edu (expiring soon) X All this stuff, and documentation as well, is available via anonymous FTP at: X avalanche.berkeley.edu X tornado.berkeley.edu X headcrash.berkeley.edu X ... in pub/Apple2 X SHAR_EOF chmod 0644 README || echo 'restore of README failed' Wc_c="`wc -c < 'README'`" test 4314 -eq "$Wc_c" || echo 'README: original size 4314, current size' "$Wc_c" fi # ============= Benchmarks ============== if test -f 'Benchmarks' -a X"$1" != X"-c"; then echo 'x - skipping Benchmarks (File already exists)' else echo 'x - extracting Benchmarks (Text)' sed 's/^X//' << 'SHAR_EOF' > 'Benchmarks' && ***** //gs Benchmarks X All benchmarks performed with Moria GS, which compressed from 577K to 320K (to 312K with LZW-II). "ZIP" means the test was performed on a //gs with an 8MHz/16K ZipGS. All tests compressed to and from a 1.5MB RAM disk. X X Program Run / Machine Used Run Time ---------------------------------------------- -------------- NuLib v3.03 compress LZW-I 12:44 NuLib v3.03 uncompress LZW-I 11:50 X NuLib v3.03 compress LZW-I (ZIP) 5:43 NuLib v3.03 uncompress LZW-I (ZIP) 5:24 NuLib v3.1 compress LZW-I (ZIP) 3:45 NuLib v3.1 uncompress LZW-I (ZIP) 4:46 NuLib v3.1 uncompress LZW-II (ZIP) 4:49 X ShrinkIt v3.2.3 compress LZW-I (ZIP) 0:50 ShrinkIt v3.2.3 uncompress LZW-I (ZIP) 0:45 GS/ShrinkIt v1.0.4 compress LZW-II (ZIP) 0:59 GS/ShrinkIt v1.0.4 uncompress LZW-I (ZIP) 0:45 X ***** UNIX Benchmarks X These were performed on a lightly loaded Sequent Symmetry. X "Run Time" is total time from start to finish. "CPU Time" is the actual time spent by the CPU (separated from time waiting for I/O or time spent sleeping). X Program Run / Machine Used Run Time CPU Time ---------------------------------------------- -------------- -------------- NuLib v3.03 compress LZW-I 0:22 0:21.4 NuLib v3.03 uncompress LZW-I 0:15 0:13.1 NuLib v3.1 compress LZW-I 0:20 0:19.2 NuLib v3.1 uncompress LZW-I 0:13 0:11.5 NuLib v3.1 uncompress LZW-I 0:13 0:11.7 X X ***** Some (old) benchmarks for NuLib v2.1: X Uncompressing Moria GS (from 320K to 577K, ShrinkIt Type I LZW): X Program Run / Machine Used Run Time CPU Time ---------------------------------------------- -------------- -------------- NuLib v2.1 (APW C), running on a //gs 12 min ShrinkIt v3.0.1, running on a //gs (HD) 2 min 03 sec ShrinkIt v3.0.1, running on a //gs (RAM disk) 1 min 21 sec GS/ShrinkIt v1.0.2 (HD) 1 min 30 sec NuLib v2.2 on a lightly loaded VAX 11/750 1 min 33 sec 1 min 28.4 sec NuLib v2.2 on a lightly loaded VAX 11/785 38 sec 34.0 sec NuLib v2.2 on a lightly loaded Sun 3/50 17 sec 13.0 sec NuLib v2.2 on an empty Apollo workstation 12 sec 11.5 sec NuLib v2.2 on an empty DEC 3100 9 sec 2.6 sec NuLib v2.2 on an empty Sun 4 7 sec 2.2 sec X "Run Time" is total time from start to finish. "CPU Time" is CPU time actually used under a multiprogrammed OS (in this case, UNIX). X The hard drive (HD) used on the //gs is an AI InnerDrive 20. The results obtained from running on a RAM disk could almost be considered the CPU time, but I've decided to keep them separate. All versions of NuLib running on UNIX systems used the optimization features of the C compiler. X Doing an uncompressed extract can produce remarkable results... like running to completion in less than one second on the Apollo (local disk). X Interestingly enough, 16-bit UNIX uncompress works faster than NuLib does. The reason for this is that the compression code in NuLib actually makes two passes, one to undo the LZW compression, and the other to undo non-repeat compression. Was it worth it do to both kinds? For Moria it was; even though "uncompress" ran faster, ShrinkIt's 12-bit LZW packed the file smaller than compress's 16-bit LZW. X No benchmarks for compress yet. X ********** X Raw data for Nulib v2.1 UNIX benchmarks X Times on the //gs were from start to finish of compression. The times for ShrinkIt were measured with a stop watch. APW NuLib times were done with "show time ; nulib ... ; show time", minus five seconds for overhead. X All tests were performed in verbose mode (i.e., the filename was printed as the file was extracted, etc). This is how I would expect it to be run under "normal" conditions. It does add to the overhead, which you can pull out by looking at the data below. X /bin/csh time format appears to be (the man page is most unhelpful): user_time system_time real_time cpu% ??+??k ??+??io page_faults+??w X user_time is the time actually spent grinding along. This is what appears X in the "CPU time" column. system_time is for I/O (disk accesses, writing to terminal). real_time is how long a stopwatch would show (user_time + system_time + X overhead starting/stopping NuLib + time spent running other processes X on a multiprogrammed OS like UNIX). This appears in the "Run Time" col. cpu% appears to be some kind of estimate of how much time was spent doing X useful work. If you don't know what a page fault is, don't worry about it. X Both cory and holden used the same copy of NuLib (well not the *same* copy, but they're identical), so any differences in speed can be attributed to the processor. X Note: I couldn't repeat these tests for NuLib v3.1 because I don't have access to any of these accounts anymore. X ***** holden.berkeley.edu, a VAX 11/750 ***** Script started on Sun Mar 25 11:52:52 1990 --- reading aliases...done holden 1 c184-cz% ls -s tmp/nulib X 68 tmp/nulib* holden 2 c184-cz% uptime X 11:52am up 26 days, 3:59, 4 users, load average: 0.31, 0.17, 0.13 holden 3 c184-cz% time tmp/nulib xv moria.shk Extracting 'MORIA' (data)...unshrinking (I)...-\|/-done. 88.4u 3.3s 1:33 98% 83+252k 49+89io 9pf+0w holden 4 c184-cz% exit holden 5 c184-cz% script done on Sun Mar 25 11:55:34 1990 X ***** cory.berkeley.edu, a VAX 11/785 ***** Script started on Sun Mar 25 11:50:07 1990 --- reading aliases...done cory 1 foo% ls -s ../bin/nulib X 68 ../bin/nulib* cory 2 foo% uptime X 11:50am up 2 days, 2:04, 6 users, load average: 0.55, 0.39, 0.27 cory 3 foo% time nulib xv moria.shk Extracting 'MORIA' (data)...unshrinking (I)...-\|/-done. 34.0u 1.6s 0:37 95% 51+244k 46+82io 5pf+0w cory 4 foo% exit cory 5 foo% script done on Sun Mar 25 11:51:29 1990 X ***** a Sun 3/50 ***** Script started on Sat Apr 21 17:00:43 1990 ux1:nulib% ls -s nulib X 64 nulib* ux1:nulib% uptime X 5:01pm up 2 days, 10:06, 6 users, load average: 1.84, 1.66, 1.51 ux1:nulib% time nulib xv moria.shk Extracting 'MORIA' (data)...unshrinking (I)...-\|/-done. 13.0u 0.6s 0:17 76% 0+168k 1+78io 0pf+0w ux1:nulib% exit ux1:nulib% script done on Sat Apr 21 17:02:33 1990 X ***** avalanche.berkeley.edu, an Apollo DN3500 ***** Script started Sat Apr 21 17:04:53 1990 --- reading aliases...done avalanche 1 nulib% ls -s nulib X 85 nulib* avalanche 2 nulib% uptime X 5:05pm up 1 day, 1:50, 3 users, load average: 0.06, 0.16, 0.00 avalanche 3 nulib% time nulib xv ../dwn/moria.shk Extracting 'MORIA' (data)...unshrinking (I)...-\|/-done. 11.5u 2.6s 0:16 86% 0+0k 577+0io 0pf+0w avalanche 6 nulib% exit avalanche 7 nulib% Script done Sat Apr 21 17:06:59 1990 X ***** a DEC 3100 ***** Script started on Sat Apr 21 16:18:10 1990 vampire:nulib% ls -s nulib X 88 nulib* vampire:nulib% uptime X 4:18pm up 30 days, 5 hrs, 2 users, load average: 0.57, 0.25, 0.00 vampire:nulib% time nulib xv moria.shk Extracting 'MORIA' (data)...unshrinking (I)...-\|/-done. 2.6u 0.5s 0:09 32% 163+404k 71+71io 3pf+0w vampire:nulib% exit vampire:nulib% script done on Sat Apr 21 16:19:40 1990 X ***** a Sun 4 ***** Script started on Sat Apr 21 16:23:47 1990 ux5:nulib% ls -s nulib X 64 nulib* ux5:nulib% uptime X 4:23pm up 2 days, 8:50, 7 users, load average: 0.15, 0.24, 0.03 ux5:nulib% time nulib xv moria.shk Extracting 'MORIA' (data)...unshrinking (I)...-\|/-done. 2.2u 0.2s 0:07 34% 0+368k 0+71io 0pf+0w ux5:nulib% exit ux5:nulib% script done on Sat Apr 21 16:25:20 1990 X SHAR_EOF chmod 0644 Benchmarks || echo 'restore of Benchmarks failed' Wc_c="`wc -c < 'Benchmarks'`" test 7454 -eq "$Wc_c" || echo 'Benchmarks: original size 7454, current size' "$Wc_c" fi # ============= Speedup ============== if test -f 'Speedup' -a X"$1" != X"-c"; then echo 'x - skipping Speedup (File already exists)' else echo 'x - extracting Speedup (Text)' sed 's/^X//' << 'SHAR_EOF' > 'Speedup' && Speed improvement for NuLib v3.1 -------------------------------- X I clocked each twice with the "time" command, once for LZW-I, once for LZW-II. Then I recompiled all of NuLib with the -p option and got profiling statistics (some procedure). X All tests performed on an Amdahl 580 mainframe (70% of a 2-way MP). X Format is (as far as I can tell): cpu-time system-time elapsed-"wall-clock"-time %time-doing-something-useful X ============================================================================== X ***** Unpacking LZW-I ***** X v3.03: X Extracting 'MORIA' (data)...unshrinking (I)...done. 2.70u 0.15s 0:11.90 23.9% Extracting 'MORIA' (data)...overwriting...unshrinking (I)...done. 2.73u 0.15s 0:06.61 43.5% X X %Time Seconds Cumsecs #Calls msec/call Name X 33.7 1.15 1.15 141 8.13 undo_LZW X 31.9 1.08 2.23 247023 0.0044 get_code X 17.1 0.58 2.81 147 3.96 CalcCRC X 5.8 0.20 3.29 90 2.2 undo_RLE X 0.2 0.01 3.39 38 0.1 BCopy X X %Time Seconds Cumsecs #Calls msec/call Name X 32.6 1.09 1.09 141 7.71 undo_LZW X 31.7 1.06 2.14 247023 0.0043 get_code X 17.2 0.57 2.72 147 3.89 CalcCRC X 5.7 0.19 3.21 90 2.1 undo_RLE X 0.2 0.01 3.32 38 0.1 BCopy X v3.1: X Extracting 'MORIA' (data)...overwriting...unshrinking (I)...done. 2.30u 0.13s 0:06.53 37.2% Extracting 'MORIA' (data)...overwriting...unshrinking (I)...done. 2.30u 0.15s 0:06.18 39.6% X X %Time Seconds Cumsecs #Calls msec/call Name X 33.4 0.99 0.99 247023 0.0040 get_code X 26.2 0.78 1.77 141 5.51 undo_LZW X 19.5 0.58 2.34 147 3.94 CalcCRC X 6.2 0.19 2.82 90 2.1 undo_RLE X X %Time Seconds Cumsecs #Calls msec/call Name X 32.7 0.97 0.97 247023 0.0039 get_code X 27.0 0.80 1.77 141 5.67 undo_LZW X 19.6 0.58 2.35 147 3.95 CalcCRC X 6.3 0.19 2.82 90 2.1 undo_RLE X (I switched bcopy() or memcpy() for BCopy(), and it practically vanished.) X X ============================================================================== X ***** Unpacking LZW-II ***** X v3.1 (based on v3.03): X tde 29 nulib% time ./nulib xv moria2.shk Extracting 'MORIA' (data)...overwriting...unshrinking (II)...done. 2.68u 0.15s 0:05.86 48.2% time ./nulib xv moria2.shk Extracting 'MORIA' (data)...overwriting...unshrinking (II)...done. 2.70u 0.13s 0:08.10 34.9% X X %Time Seconds Cumsecs #Calls msec/call Name X 35.1 1.16 1.16 141 8.21 undo_LZW_2 X 30.2 1.00 2.15 224721 0.0044 get_code X 17.6 0.58 2.73 147 3.94 CalcCRC X 6.0 0.20 3.18 90 2.2 undo_RLE X 0.1 0.00 3.29 49 0.1 BCopy X X %Time Seconds Cumsecs #Calls msec/call Name X 34.2 1.11 1.11 141 7.88 undo_LZW_2 X 30.3 0.99 2.10 224721 0.0044 get_code X 17.6 0.57 2.67 147 3.90 CalcCRC X 5.9 0.19 3.14 90 2.1 undo_RLE X 0.1 0.00 3.24 49 0.1 BCopy X v3.1: X Extracting 'MORIA' (data)...overwriting...unshrinking (II)...done. 2.31u 0.15s 0:13.63 18.0% Extracting 'MORIA' (data)...overwriting...unshrinking (II)...done. 2.28u 0.11s 0:04.45 53.9% X X %Time Seconds Cumsecs #Calls msec/call Name X 31.0 0.90 0.90 224721 0.0040 get_code X 29.4 0.85 1.75 141 6.04 undo_LZW_2 X 20.0 0.58 2.33 147 3.94 CalcCRC X 6.3 0.18 2.75 90 2.0 undo_RLE X X 31.7 0.92 0.92 224721 0.0041 get_code X 28.2 0.81 1.73 141 5.78 undo_LZW_2 X 20.0 0.58 2.31 147 3.93 CalcCRC X 6.3 0.18 2.74 90 2.0 undo_RLE X X ============================================================================== X ***** Packing LZW-I ***** X v3.03: X tde 56 nulib% time ./nulib cv foo.shk MORIA Adding 'MORIA' (data)...shrinking...done. 4.41u 0.31s 0:11.98 39.4% time ./nulib cv foo.shk MORIA Adding 'MORIA' (data)...shrinking...done. 4.41u 0.23s 0:19.90 23.3% X X X %Time Seconds Cumsecs #Calls msec/call Name X 37.9 1.94 1.94 141 13.75 do_LZW X 20.5 1.05 2.99 247011 0.0042 put_code X 11.0 0.56 3.55 145 3.87 CalcCRC X 9.9 0.51 4.06 141 3.59 do_RLE X 7.1 0.36 4.42 141 2.58 ClearTab X X %Time Seconds Cumsecs #Calls msec/call Name X 38.3 1.98 1.98 141 14.04 do_LZW X 20.2 1.05 3.03 247011 0.0042 put_code X 10.9 0.56 3.59 145 3.89 CalcCRC X 9.9 0.51 4.10 141 3.62 do_RLE X 7.1 0.37 4.47 141 2.60 ClearTab X v3.1: X Adding 'MORIA' (data)...shrinking...done. 3.83u 0.18s 0:10.90 36.7% Adding 'MORIA' (data)...shrinking...done. 3.83u 0.18s 0:16.05 24.9% X X %Time Seconds Cumsecs #Calls msec/call Name X 32.1 1.48 1.48 141 10.49 do_LZW X 22.8 1.05 2.53 247011 0.0042 put_code X 12.2 0.56 3.09 145 3.87 CalcCRC X 10.0 0.46 3.55 141 3.28 do_RLE X 5.2 0.24 4.06 141 1.68 ClearTab X X %Time Seconds Cumsecs #Calls msec/call Name X 32.7 1.47 1.47 141 10.43 do_LZW X 22.7 1.02 2.49 247011 0.0041 put_code X 12.4 0.56 3.05 145 3.86 CalcCRC X 10.4 0.47 3.52 141 3.31 do_RLE X 5.2 0.24 4.05 141 1.67 ClearTab X X ============================================================================== X I'd say the speed improvements are around 15%. X SHAR_EOF chmod 0644 Speedup || echo 'restore of Speedup failed' Wc_c="`wc -c < 'Speedup'`" test 5652 -eq "$Wc_c" || echo 'Speedup: original size 5652, current size' "$Wc_c" fi # ============= Makefile ============== if test -f 'Makefile' -a X"$1" != X"-c"; then echo 'x - skipping Makefile (File already exists)' else echo 'x - extracting Makefile (Text)' sed 's/^X//' << 'SHAR_EOF' > 'Makefile' && # # UNIX Makefile for NuLib v3.0 # X # To make a smaller executable, you can exclude the Binary II routines # by setting CFLAGS= -DNO_BLU # To exclude the UNIX compression routines, add -DNO_UCOMP X # Select appropriate flag... -g for debugging, -O for optimized. #CFLAGS=-g CFLAGS=-O X HDRS=nudefs.h nuread.h nuview.h nuadd.h nuext.h nupdel.h nupak.h nuetc.h \ X nublu.h nucomp.h nucompfn.h SRCS=numain.c nuread.c nuview.c nuadd.c nuext.c nupdel.c nupak.c nuetc.c \ X nublu.c nucomp.c nushk.c nusq.c OBJS=numain.o nuread.o nuview.o nuadd.o nuext.o nupdel.o nupak.o nuetc.o \ X nublu.o nucomp.o nushk.o nusq.o ARCFILES=README Benchmarks Speedup Makefile make.apw linker.scr linked.scr \ X mkshk nulib.mak nulib.lnk *.h *.c X LIBS= #LIBS= -lx # For XENIX/386 users CC=cc X nulib: ${OBJS} X ${CC} ${CFLAGS} ${OBJS} -o nulib ${LIBS} X numain.o: numain.c nudefs.h nuread.h nuview.h nuadd.h nuext.h nupdel.h nublu.h\ X nuetc.h X nuread.o: nuread.c nudefs.h nuread.h nupak.h nuetc.h crc.h X nuview.o: nuview.c nudefs.h nuview.h nuread.h nuetc.h X nuadd.o: nuadd.c nudefs.h nuadd.h nuread.h nuadd.h nupak.h nuetc.h X nuext.o: nuext.c nudefs.h nuext.h nuread.h nuext.h nupak.h nuetc.h X nupdel.o: nupdel.c nudefs.h nupdel.h nuread.h nuadd.h nupak.h nupdel.h nuetc.h X nupak.o: nupak.c nudefs.h nupak.h nuetc.h nucomp.h nucompfn.h X nublu.o: nublu.c nudefs.h nublu.h nuview.h nuetc.h X nushk.o: nushk.c nudefs.h nupak.h X nusq.o: nusq.c nudefs.h nupak.h X nuetc.o: nuetc.c nudefs.h nuetc.h X nucomp.o: nucomp.c nudefs.h nucomp.h nucompfn.h nuetc.h X # shar version 3.49 # -c : add "cut here" line at top # -o : base name for output files # -l48 : max size is 48KB, but don't split files # -v : (not used) turn off verbose msgs shar: X shar349 -c -osh.files/nulib -l48 $(ARCFILES) X tar: X tar cvf nulib.tar $(ARCFILES) X clean: X rm -f $(OBJS) X clobber: clean X rm -f nulib X SHAR_EOF chmod 0644 Makefile || echo 'restore of Makefile failed' Wc_c="`wc -c < 'Makefile'`" test 1860 -eq "$Wc_c" || echo 'Makefile: original size 1860, current size' "$Wc_c" fi # ============= make.apw ============== if test -f 'make.apw' -a X"$1" != X"-c"; then echo 'x - skipping make.apw (File already exists)' else echo 'x - extracting make.apw (Text)' sed 's/^X//' << 'SHAR_EOF' > 'make.apw' && * * NuLib AGE script (A pseudo-makefile for APW and ORCA) * X for file in numain nuread nuview nuadd nuext nupdel nupak nuetc nublu nushk nusq nucomp X age obj/{file}.root {file}.c X if {age} != 0 X echo compiling {file}.c X delete obj/{file}.root X compile {file}.c keep=obj/{file} X end end X * Once everything is compiled, I test the final * program file against the object modules that build it. * If linking is required, it is performed next followed * by a series of other statements to complete it: X age cshk obj/=.root purge * if {age} != 0 * delete nulib * prefix obj * alink linker.scr * prefix .. * end SHAR_EOF chmod 0644 make.apw || echo 'restore of make.apw failed' Wc_c="`wc -c < 'make.apw'`" test 652 -eq "$Wc_c" || echo 'make.apw: original size 652, current size' "$Wc_c" fi # ============= linker.scr ============== if test -f 'linker.scr' -a X"$1" != X"-c"; then echo 'x - skipping linker.scr (File already exists)' else echo 'x - extracting linker.scr (Text)' sed 's/^X//' << 'SHAR_EOF' > 'linker.scr' && 2/start numain nuread nuview nuadd nuext nupdel nuetc nublu nucomp nupak nushk nusq X keep=nulib X SHAR_EOF chmod 0644 linker.scr || echo 'restore of linker.scr failed' Wc_c="`wc -c < 'linker.scr'`" test 97 -eq "$Wc_c" || echo 'linker.scr: original size 97, current size' "$Wc_c" fi # ============= linked.scr ============== if test -f 'linked.scr' -a X"$1" != X"-c"; then echo 'x - skipping linked.scr (File already exists)' else echo 'x - extracting linked.scr (Text)' sed 's/^X//' << 'SHAR_EOF' > 'linked.scr' && ; APW LinkEd script file for NuLib ; ; Does not search for segments with blank load segment names. ; Does not search files for DIRECT segments (only the CLIB). ; Does not search any libraries other than 2/clib. X keep ../nulib X * This is the main code segment (type = code) segment/$00 main X loadselect 2/start.root main X loadselect numain.root main X loadselect nuread.root main X loadselect nuetc.root main X loadselect nuview.root main X loadselect nuadd.root main X loadselect nuext.root main X loadselect nupdel.root main X library/loadselect 2/clib main X * This contains compression/Binary II code (type = dynamic) segment/dynamic Compress X loadselect nupak.root main X loadselect nublu.root main X loadselect nucomp.root main X loadselect nushk.root main X loadselect nusq.root main X library/loadselect 2/clib main X * This contains all global definitions (type = private data) segment/$41 Globals X loadselect 2/start.root ~globals X loadselect numain.root ~globals X loadselect nuread.root ~globals X loadselect nuetc.root ~globals X loadselect nuview.root ~globals X loadselect nuadd.root ~globals X loadselect nuext.root ~globals X loadselect nupdel.root ~globals X loadselect nupak.root ~globals X loadselect nublu.root ~globals X loadselect nucomp.root ~globals X loadselect nushk.root ~globals X loadselect nusq.root ~globals X library/loadselect 2/clib ~globals X * This holds all arrays (type = private data) segment/$41 Arrays X loadselect 2/start.root ~arrays X loadselect numain.root ~arrays X loadselect nuread.root ~arrays X loadselect nuetc.root ~arrays X loadselect nuview.root ~arrays X loadselect nuadd.root ~arrays X loadselect nuext.root ~arrays X loadselect nupdel.root ~arrays X loadselect nupak.root ~arrays X loadselect nublu.root ~arrays X loadselect nucomp.root ~arrays X loadselect nushk.root ~arrays X loadselect nusq.root ~arrays X library/loadselect 2/clib ~arrays X * This has direct page stuff, like the stack segment/$12 Direct (type = direct-page/stack) X library/loadselect 2/clib DIRECT X list on * One other segment, SEGJPTBL, appears here... SHAR_EOF chmod 0644 linked.scr || echo 'restore of linked.scr failed' Wc_c="`wc -c < 'linked.scr'`" test 2224 -eq "$Wc_c" || echo 'linked.scr: original size 2224, current size' "$Wc_c" fi # ============= mkshk ============== if test -f 'mkshk' -a X"$1" != X"-c"; then echo 'x - skipping mkshk (File already exists)' else echo 'x - extracting mkshk (Text)' sed 's/^X//' << 'SHAR_EOF' > 'mkshk' && #! /bin/csh # Make NuLib shk file for download. # Puts a copy of the files (without tabs and linefeeds) in ./trans, and then # adds them to "nulib.shk" # # ("detab" converts tabs to spaces) # # This is intended as an example; it may or may not work on your system. X X echo "--- Converting tabs and linefeeds" foreach file (README Benchmarks Makefile make.apw linker.scr linked.scr \ X mkshk *.h *.c nulib.mak nulib.lnk) X echo $file X detab $file | tr '\012' '\015' >! trans/$file end X cd trans nulib cvftxt/0000 nulib.shk README Benchmarks Makefile nulib.mak nulib.lnk nulib avfsrc/0006 nulib.shk make.apw mkshk nulib avfsrc/0009 nulib.shk linked.scr nulib avfsrc/0109 nulib.shk linker.scr nulib avfsrc/000a nulib.shk *.h *.c cd .. SHAR_EOF chmod 0755 mkshk || echo 'restore of mkshk failed' Wc_c="`wc -c < 'mkshk'`" test 737 -eq "$Wc_c" || echo 'mkshk: original size 737, current size' "$Wc_c" fi # ============= nulib.mak ============== if test -f 'nulib.mak' -a X"$1" != X"-c"; then echo 'x - skipping nulib.mak (File already exists)' else echo 'x - extracting nulib.mak (Text)' sed 's/^X//' << 'SHAR_EOF' > 'nulib.mak' && X # NuLib v3.02 makefile for Microsoft C X #=================================================================== X # X # Standard command line definitions X # X # Note /DIAPX286 can also be used, but it is not a real indicator X # of the system hardware X # X # Leaving out the /W3 will reduce the flood of warning messages. X # X #=================================================================== X X #cp=cl /c /AL /W3 /Ot /Zpei /DIAPX386 X cp=cl /c /AL /W3 /Os /Zpei /DIAPX386 X X #=================================================================== X # X # Default inference rules X # X #=================================================================== X X .c.obj: X $(cp) $*.c X X #=================================================================== X # X # Dependencies X # X #=================================================================== X X nuadd.obj: nuadd.c nudefs.h nuread.h nuview.h nuadd.h nupak.h nuetc.h X X nublu.obj: nublu.c nudefs.h nuview.h nuadd.h nupak.h nuetc.h X X nuetc.obj: nuetc.c nudefs.h apwerr.h nuetc.h X X nuext.obj: nuext.c nudefs.h nuread.h nuext.h nupak.h nuetc.h X X numain.obj: numain.c nudefs.h nuread.h nuview.h nuadd.h nuext.h nupdel.h \ X nublu.h nupak.h nuetc.h X X nupak.obj: nupak.c nudefs.h nupak.h nuetc.h nucomp.h compfns.h X X nupdel.obj: nupdel.c nudefs.h nuread.h nuadd.h nupak.h nupdel.h nuetc.h X X nuread.obj: nuread.c nudefs.h crc.h nuread.h nupak.h nuetc.h X X nushk.obj: nushk.c nudefs.h nuread.h nupak.h nuetc.h X X nusq.obj: nusq.c nudefs.h nuetc.h X X nuview.obj: nuview.c X nucomp.obj: nucomp.c nudefs.h nucomp.h nucompfn.h X X NULIB.exe: nuadd.obj nublu.obj nuetc.obj nuext.obj numain.obj nupak.obj \ X nupdel.obj nuread.obj nushk.obj nusq.obj nuview.obj nucomp.obj X link @NuLib.lnk X SHAR_EOF chmod 0644 nulib.mak || echo 'restore of nulib.mak failed' Wc_c="`wc -c < 'nulib.mak'`" test 1744 -eq "$Wc_c" || echo 'nulib.mak: original size 1744, current size' "$Wc_c" fi # ============= nulib.lnk ============== if test -f 'nulib.lnk' -a X"$1" != X"-c"; then echo 'x - skipping nulib.lnk (File already exists)' else echo 'x - extracting nulib.lnk (Text)' sed 's/^X//' << 'SHAR_EOF' > 'nulib.lnk' && X nuadd.obj+nublu.obj+nuetc.obj+nuext.obj+numain.obj+nupak.obj+nupdel.obj+ X nuread.obj+nushk.obj+nusq.obj+nuview.obj+nucomp.obj X NuLib X NuLib.Map X /STACK:10000 /NOI /EXE /FAR /PACKC X ; X SHAR_EOF chmod 0644 nulib.lnk || echo 'restore of nulib.lnk failed' Wc_c="`wc -c < 'nulib.lnk'`" test 185 -eq "$Wc_c" || echo 'nulib.lnk: original size 185, current size' "$Wc_c" fi # ============= apwerr.h ============== if test -f 'apwerr.h' -a X"$1" != X"-c"; then echo 'x - skipping apwerr.h (File already exists)' else echo 'x - extracting apwerr.h (Text)' sed 's/^X//' << 'SHAR_EOF' > 'apwerr.h' && /* X * apwerr.h - text versions of APW and ProDOS 16 error codes X * X * NuLib v3.1 November 1991 Freeware (distribute, don't sell) X * By Andy McFadden (fadden@cory.berkeley.edu) X */ /* X * (ERROR() didn't cut it, and I'm trying to separate things from the shell.) X */ X /* APW-specific UNIX-like errors */ X /* X [ this is derived from: ] X errno.h -- error return codes X X Copyright American Telephone & Telegraph X Modified and used with permission, Apple Computer Inc. X Copyright Apple Computer Inc. 1985, 1986, 1987 X All rights reserved. */ /* @(#)errno.h 2.1 */ /* 3.0 SID # 1.3 */ X #define sys_nerr 35 /* err must be < Max APW Err */ static char *sys_errlist[sys_nerr] = { X /* 0 (no err) */ "[ call successful ]", X /* 1 EPERM */ "permission denied", X /* 2 ENOENT */ "no such file or directory", X /* 3 ENORSRC */ "no such resource", X /* 4 EINTR */ "interrupted system call", X /* 5 EIO */ "I/O error", X /* 6 ENXIO */ "no such device or address", X /* 7 E2BIG */ "insufficient space for return argument", X /* 8 ENOEXEC */ "exec format error", X /* 9 EBADF */ "bad file number", X /* 10 ECHILD */ "no children", X /* 11 EAGAIN */ "no more processes", X /* 12 ENOMEM */ "not enough memory", X /* 13 EACCES */ "permission denied", X /* 14 EFAULT */ "bad address", X /* 15 ENOTBLK */ "block device required", X /* 16 EBUSY */ "mount device busy", X /* 17 EEXIST */ "file exists", X /* 18 EXDEV */ "cross-device link", X /* 19 ENODEV */ "no such device", X /* 20 ENOTDIR */ "not a directory", X /* 21 EISDIR */ "is a directory", X /* 22 EINVAL */ "invalid argument", X /* 23 ENFILE */ "file table overflow", X /* 24 EMFILE */ "too many open files", X /* 25 ENOTTY */ "not a typewriter (sorry)", X /* 26 ETXTBSY */ "text file busy", X /* 27 EFBIG */ "file too large", X /* 28 ENOSPC */ "no space left on device", X /* 29 ESPIPE */ "illegal seek", X /* 30 EROFS */ "read only file system", X /* 31 EMLINK */ "too many links", X /* 32 EPIPE */ "broken pipe", X /* 33 EDOM */ "math arg out of domain of func", X /* 34 ERANGE */ "math result not representable" }; X X /* ProDOS errors */ X /* [ This is derived from: ] /******************************************** ; File: ProDos.h ; ; ; Copyright Apple Computer, Inc. 1986, 1987 ; All Rights Reserved ; ********************************************/ X #define MPErr 0x61 /* err must be < Max ProDOS Err # */ static char *ProDOSErr[MPErr] = { X /* 00 (no error) */ "[ ProDOS call successful ]", X /* 01 invalidCallNum */ "invalid call number / (fatal) unclaimed intr", X /* 02 */ "", X /* 03 */ "", X /* 04 */ "(ProDOS 8 invalid parameter count)", X /* 05 badPBlockPtr */ "call pointer out of bounds", X /* 06 pdosActiveErr */ "ProDOS is active", X /* 07 pdosBusyErr */ "ProDOS is busy", X /* 08 */ "", X /* 09 */ "", X /* 0a vcbUnusable */ "(fatal) VCB is unusable", X /* 0b fcbUnusable */ "(fatal) FCB is unusable", X /* 0c badBlockZero */ "(fatal) block zero allocated illegally", X /* 0d shdwInterruptErr */ "(fatal) interrupt occurred while I/O shadowing off", X /* 0e */ "", X /* 0f */ "", X /* 10 devNotFound */ "device not found", X /* 11 badDevRefNum */ "invalid device ref# / (fatal) wrong OS version", X /* 12 */ "", X /* 13 */ "", X /* 14 */ "", X /* 15 */ "", X /* 16 */ "", X /* 17 */ "", X /* 18 */ "", X /* 19 */ "", X /* 1a */ "", X /* 1b */ "", X /* 1c */ "", X /* 1d */ "", X /* 1e */ "", X /* 1f */ "", X /* 20 badReqCode */ "invalid request code", X /* 21 */ "", X /* 22 */ "", X /* 23 */ "", X /* 24 */ "", X /* 25 intTableFull */ "interrupt table full", X /* 26 invalidOperation */ "invalid operation", X /* 27 ioError */ "I/O error", X /* 28 noDevConnect */ "no device connected", X /* 29 */ "", X /* 2a */ "", X /* 2b writeProtectErr */ "write protect error", X /* 2c */ "", X /* 2d */ "", X /* 2e diskSwitchErr */ "disk switched error", X /* 2f */ "device not online", X /* 30 */ "device-specific err $30", X /* 31 */ "device-specific err $31", X /* 32 */ "device-specific err $32", X /* 33 */ "device-specific err $33", X /* 34 */ "device-specific err $34", X /* 35 */ "device-specific err $35", X /* 36 */ "device-specific err $36", X /* 37 */ "device-specific err $37", X /* 38 */ "device-specific err $38", X /* 39 */ "device-specific err $39", X /* 3a */ "device-specific err $3a", X /* 3b */ "device-specific err $3b", X /* 3c */ "device-specific err $3c", X /* 3d */ "device-specific err $3d", X /* 3e */ "device-specific err $3e", X /* 3f */ "device-specific err $3f", X /* 40 badPathName */ "invalid pathname syntax", X /* 41 */ "", X /* 42 fcbFullErr */ "FCB full error (too many files open)", X /* 43 badFileRefNum */ "invalid file reference number", X /* 44 pathNotFound */ "path not found", X /* 45 volumeNotFound */ "volume not found", X /* 46 fileNotFound */ "file not found", X /* 47 dupFileName */ "duplicate file name", X /* 48 volumeFullErr */ "volume full error", X /* 49 dirFullErr */ "directory full error", X /* 4a versionErr */ "version error (incompatible file format)", X /* 4b badStoreType */ "unsupported (or incorrect) storage type", X /* 4c eofEncountered */ "end-of-file encountered", X /* 4d positionRangeErr */ "position out of range", X /* 4e accessErr */ "access not allowed", X /* 4f */ "", X /* 50 fileOpenErr */ "file already open", X /* 51 dirDamaged */ "directory structure is damaged (file count?)", X /* 52 badVolType */ "unsupported volume type", X /* 53 paramRangeErr */ "parameter out of range", X /* 54 memoryFullErr */ "out of memory", X /* 55 vcbFullErr */ "VCB full error", X /* 56 */ "(ProDOS 8 bad buffer address)", X /* 57 dupVolumeErr */ "duplicate volume error", X /* 58 notBlkDevErr */ "not a block device", X /* 59 invalidLevel */ "invalid level", X X /* 5a */ "block number out of range (bad vol bitmap?)", X /* 5b */ "illegal pathname change", X /* 5c */ "not an executable file", X /* 5d */ "file system not available", X /* 5e */ "cannot deallocate /RAM", X /* 5f */ "return stack overflow", X /* 60 */ "data unavailable" }; SHAR_EOF chmod 0644 apwerr.h || echo 'restore of apwerr.h failed' Wc_c="`wc -c < 'apwerr.h'`" test 6766 -eq "$Wc_c" || echo 'apwerr.h: original size 6766, current size' "$Wc_c" fi # ============= crc.h ============== if test -f 'crc.h' -a X"$1" != X"-c"; then echo 'x - skipping crc.h (File already exists)' else echo 'x - extracting crc.h (Text)' sed 's/^X//' << 'SHAR_EOF' > 'crc.h' && /* X * crc.h - tables for fast computation of 16-bit CRCS X * X * NuLib v3.1 October 1991 Freeware (distribute, don't sell) X * By Andy McFadden (fadden@cory.berkeley.edu) X */ X /* X * updcrc macro derived from article Copyright (C) 1986 Stephen Satchell. X * NOTE: First srgument must be in range 0 to 255. X * Second argument is referenced twice. X * X * Programmers may incorporate any or all code into their programs, X * giving proper credit within the source. Publication of the X * source routines is permitted so long as proper credit is given X * to Stephen Satchell, Satchell Evaluations and Chuck Forsberg, X * Omen Technology. X */ X X /*#define updcrc(cp, crc) ( crctab[((crc >> 8) & 255)] ^ (crc << 8) ^ cp)*/ #define updcrc(cp, crc) ( (crctab[((crc >> 8) & 0xFF) ^ cp] ^ (crc << 8)) & 0xFFFF) X X /* crctab calculated by Mark G. Mendel, Network Systems Corporation */ static unsigned short crctab[256] = { X 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, X 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, X 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, X 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, X 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, X 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, X 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, X 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, X 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, X 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, X 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, X 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, X 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, X 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, X 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, X 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, X 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, X 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, X 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, X 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, X 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, X 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, X 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, X 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, X 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, X 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, X 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, X 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, X 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, X 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, X 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8, X 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0 }; X SHAR_EOF chmod 0644 crc.h || echo 'restore of crc.h failed' Wc_c="`wc -c < 'crc.h'`" test 3321 -eq "$Wc_c" || echo 'crc.h: original size 3321, current size' "$Wc_c" fi # ============= nuadd.h ============== if test -f 'nuadd.h' -a X"$1" != X"-c"; then echo 'x - skipping nuadd.h (File already exists)' else echo 'x - extracting nuadd.h (Text)' sed 's/^X//' << 'SHAR_EOF' > 'nuadd.h' && /* X * nuadd.h - declarations for nuadd.c X * X * NuLib v3.1 October 1991 Freeware (distribute, don't sell) X * By Andy McFadden (fadden@cory.berkeley.edu) X */ X /* information is copied from file-dependent structures (FileRec) to here */ typedef struct { X char *pathname; /* as much of the path as we need to know */ X char *store_name; /* what name the file will be stored under */ X fourbyt eof; /* length of file */ X fourbyt fAccess; /* was Word */ X fourbyt fileType; /* was Word */ X fourbyt auxType; X twobyt storageType; X Time create_dt; /* Time = TimeRec = 8 bytes in misctool.h/nuread.h */ X Time mod_dt; X twobyt fileSysID; /* these two are non-standard */ X onebyt fileSysInfo; X int marked; /* application specific */ } file_info; X #define MAXARGS 255 /* max #of files specified on command line; signed int */ X extern void NuAdd(); extern long AddFile(); extern onebyt *MakeMHblock(); extern int EvalArgs(); X SHAR_EOF chmod 0644 nuadd.h || echo 'restore of nuadd.h failed' Wc_c="`wc -c < 'nuadd.h'`" test 956 -eq "$Wc_c" || echo 'nuadd.h: original size 956, current size' "$Wc_c" fi # ============= nublu.h ============== if test -f 'nublu.h' -a X"$1" != X"-c"; then echo 'x - skipping nublu.h (File already exists)' else echo 'x - extracting nublu.h (Text)' sed 's/^X//' << 'SHAR_EOF' > 'nublu.h' && /* X * nublu.h - declarations for nublu.c X * X * NuLib v3.1 October 1991 Freeware (distribute, don't sell) X * By Andy McFadden (fadden@cory.berkeley.edu) X */ X extern void NuBNY(); X SHAR_EOF chmod 0644 nublu.h || echo 'restore of nublu.h failed' Wc_c="`wc -c < 'nublu.h'`" test 181 -eq "$Wc_c" || echo 'nublu.h: original size 181, current size' "$Wc_c" fi true || echo 'restore of nucomp.h failed' echo End of part 1, continue with part 2 exit 0 -- fadden@uts.amdahl.com (Andy McFadden) fadden@cory.berkeley.edu (expires in December) [ Above opinions are mine, Amdahl has nothing to do with them, etc, etc. ]