home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / apple2 / 57 < prev    next >
Encoding:
Internet Message Format  |  1991-05-02  |  8.2 KB

  1. From: jac@yoko.rutgers.edu (Jonathan A. Chandross)
  2. Newsgroups: comp.sources.apple2
  3. Subject: v001SRC039:  Nulib - Archive Library Tools (Unix) 08/10
  4. Message-ID: <May.1.18.14.21.1991.23531@yoko.rutgers.edu>
  5. Date: 1 May 91 22:14:23 GMT
  6. Approved: jac@paul.rutgers.edu
  7.  
  8.  
  9. Submitted-by: Andy McFadden (fadden@cory.berkeley.edu)
  10. Posting-number: Volume 1, Source:39
  11. Archive-name: archive/unix/nulib/part08.10
  12. Architecture: UNIX
  13. Version-number: 3.03
  14.  
  15.  
  16. =Makefile
  17. -#
  18. -# UNIX Makefile for NuLib v3.0
  19. -#
  20. -
  21. -# To make a smaller executable, you can exclude the Binary II routines
  22. -# by setting CFLAGS= -DNO_BLU
  23. -# To exclude the UNIX compression routines, add -DNO_UCOMP
  24. -
  25. -# Select appropriate flag... -g for debugging, -O for optimized.
  26. -#CFLAGS=-g
  27. -CFLAGS=-O
  28. -
  29. -HDRS=nudefs.h nuread.h nuview.h nuadd.h nuext.h nupdel.h nupak.h nuetc.h \
  30. -  nublu.h nucomp.h nucompfn.h
  31. -SRCS=numain.c nuread.c nuview.c nuadd.c nuext.c nupdel.c nupak.c nuetc.c \
  32. -  nublu.c nucomp.c nushk.c nusq.c 
  33. -OBJS=numain.o nuread.o nuview.o nuadd.o nuext.o nupdel.o nupak.o nuetc.o \
  34. -  nublu.o nucomp.o nushk.o nusq.o
  35. -ARCFILES=README Benchmarks Makefile make.apw linker.scr linked.scr mkshk \
  36. -  nulib.mak nulib.lnk *.h *.c
  37. -
  38. -LIBS=
  39. -#LIBS= -lx        # For XENIX/386 users
  40. -CC=cc
  41. -
  42. -nulib: ${OBJS}
  43. -    ${CC} ${CFLAGS} ${OBJS} -o nulib ${LIBS} 
  44. -
  45. -numain.o: numain.c nudefs.h nuread.h nuview.h nuadd.h nuext.h nupdel.h nublu.h\
  46. -  nuetc.h
  47. -
  48. -nuread.o: nuread.c nudefs.h nuread.h nupak.h nuetc.h crc.h
  49. -
  50. -nuview.o: nuview.c nudefs.h nuview.h nuread.h nuetc.h
  51. -
  52. -nuadd.o:  nuadd.c  nudefs.h nuadd.h nuread.h nuadd.h nupak.h nuetc.h
  53. -
  54. -nuext.o:  nuext.c  nudefs.h nuext.h nuread.h nuext.h nupak.h nuetc.h
  55. -
  56. -nupdel.o: nupdel.c nudefs.h nupdel.h nuread.h nuadd.h nupak.h nupdel.h nuetc.h
  57. -
  58. -nupak.o:  nupak.c  nudefs.h nupak.h nuetc.h nucomp.h nucompfn.h
  59. -
  60. -nublu.o:  nublu.c  nudefs.h nublu.h nuview.h nuetc.h
  61. -
  62. -nushk.o:  nushk.c  nudefs.h nupak.h
  63. -
  64. -nusq.o:   nusq.c   nudefs.h nupak.h
  65. -
  66. -nuetc.o:  nuetc.c  nudefs.h nuetc.h
  67. -
  68. -nucomp.o:    nucomp.c nudefs.h nucomp.h nucompfn.h nuetc.h
  69. -
  70. -# shar version 3.21
  71. -#    -c : add "cut here" line at top
  72. -#    -o : base name for output files
  73. -#    -l48 : max size is 48KB, but don't split files
  74. -#    -v : (not used) turn off verbose msgs
  75. -shar:
  76. -    shar349 -c -osh.files/nulib -l48 $(ARCFILES)
  77. -
  78. -tar:
  79. -    tar cvf nulib.tar $(ARCFILES)
  80. -
  81. =nulib.mak
  82. - # NuLib v3.02 makefile for Microsoft C
  83. - #===================================================================
  84. - #
  85. - #  Standard command line definitions
  86. - #
  87. - #  Note /DIAPX286 can also be used, but it is not a real indicator
  88. - #  of the system hardware
  89. - #
  90. - #  Leaving out the /W3 will reduce the flood of warning messages.
  91. - #
  92. - #===================================================================
  93. - #cp=cl /c /AL /W3 /Ot /Zpei /DIAPX386
  94. - cp=cl /c /AL /W3 /Os /Zpei /DIAPX386
  95. - #===================================================================
  96. - #
  97. - #  Default inference rules
  98. - #
  99. - #===================================================================
  100. - .c.obj:
  101. -    $(cp) $*.c
  102. - #===================================================================
  103. - #
  104. - #  Dependencies
  105. - #
  106. - #===================================================================
  107. - nuadd.obj: nuadd.c nudefs.h nuread.h nuview.h nuadd.h nupak.h nuetc.h
  108. - nublu.obj: nublu.c nudefs.h nuview.h nuadd.h nupak.h nuetc.h
  109. - nuetc.obj: nuetc.c nudefs.h apwerr.h nuetc.h
  110. - nuext.obj: nuext.c nudefs.h nuread.h nuext.h nupak.h nuetc.h
  111. - numain.obj: numain.c nudefs.h nuread.h nuview.h nuadd.h nuext.h nupdel.h \
  112. -       nublu.h nupak.h nuetc.h
  113. - nupak.obj: nupak.c nudefs.h nupak.h nuetc.h nucomp.h compfns.h
  114. - nupdel.obj: nupdel.c nudefs.h nuread.h nuadd.h nupak.h nupdel.h nuetc.h
  115. - nuread.obj: nuread.c nudefs.h crc.h nuread.h nupak.h nuetc.h
  116. - nushk.obj: nushk.c nudefs.h nuread.h nupak.h nuetc.h
  117. - nusq.obj: nusq.c nudefs.h nuetc.h
  118. - nuview.obj: nuview.c
  119. -
  120. -nucomp.obj: nucomp.c nudefs.h nucomp.h nucompfn.h
  121. - NULIB.exe: nuadd.obj nublu.obj nuetc.obj nuext.obj numain.obj nupak.obj  \
  122. -        nupdel.obj nuread.obj nushk.obj nusq.obj nuview.obj nucomp.obj
  123. -        link @NuLib.lnk
  124. =linked.scr
  125. -; APW LinkEd script file for NuLib
  126. -;
  127. -; Does not search for segments with blank load segment names.
  128. -; Does not search files for DIRECT segments (only the CLIB).
  129. -; Does not search any libraries other than 2/clib.
  130. -
  131. -keep ../nulib
  132. -
  133. -* This is the main code segment (type = code)
  134. -segment/$00 main
  135. -  loadselect 2/start.root   main
  136. -  loadselect numain.root    main
  137. -  loadselect nuread.root    main
  138. -  loadselect nuetc.root     main
  139. -  loadselect nuview.root    main
  140. -  loadselect nuadd.root     main
  141. -  loadselect nuext.root     main
  142. -  loadselect nupdel.root    main
  143. -  library/loadselect 2/clib main
  144. -
  145. -* This contains compression/Binary II code (type = dynamic)
  146. -segment/dynamic Compress
  147. -  loadselect nupak.root     main
  148. -  loadselect nublu.root     main
  149. -  loadselect nucomp.root    main
  150. -  loadselect nushk.root     main
  151. -  loadselect nusq.root      main
  152. -  library/loadselect 2/clib main
  153. -
  154. -* This contains all global definitions (type = private data)
  155. -segment/$41 Globals
  156. -  loadselect 2/start.roott    ~globals
  157. -  loadselect nupak.root     ~globals
  158. -  loadselect nublu.root     ~globals
  159. -  loadselect nucomp.root    ~globals
  160. -  loadselect nushk.root     ~globals
  161. -  loadselect n     ~arrays
  162. -  loadselect nuview.root    ~arrays
  163. -  loadselect nuadd.root     ~arrays
  164. -  loadselect nuext.root     ~arrays
  165. -  loadselect nupdel.root    ~arrays
  166. -  loadselect nupak.root     ~arrays
  167. -  loadselect nublu.root     ~arrays
  168. -  loadselect nucomp.root    ~arrays
  169. -  loadselect nushk.root     ~arrays
  170. -  loadselect nusq.root      ~arrays
  171. -  library/loadselect 2/clib ~arrays
  172. -
  173. -* This has direct page stuff, like the stack
  174. -segment/$12 Direct (type = direct-page/stack)
  175. -  library/loadselect 2/clib DIRECT
  176. -
  177. -list on
  178. -* One other segment, SEGJPTBL, appears here...
  179. =nuetc.h
  180. -/*
  181. - * nuetc.h - declarations for nuetc.c
  182. - *
  183. - * (this will be included by almost all source files; it should come last)
  184. - *
  185. - * NuLib v3.0  February 1991  Freeware (distribute, don't sell)
  186. - * By Andy McFadden (fadden@cory.berkeley.edu)
  187. - */
  188. -
  189. -/* define these if they haven't been already */
  190. -/* (typedef int BOOLEAN caused too many problems... #define is easier) */
  191. -#ifndef BOOLEAN
  192. -# define BOOLEAN int
  193. -#endif
  194. -
  195. -#ifndef TRUE
  196. -# define TRUE     1
  197. -# define FALSE     0
  198. -#endif
  199. -
  200. -#ifdef UNIX
  201. -# ifdef BSD43
  202. -   extern char *index();    /* BSD version */
  203. -   extern char *rindex();
  204. -#  define INDEX(s, c)  index(s, c)
  205. -#  define RINDEX(s, c) rindex(s, c)
  206. -# else
  207. -   extern char *strchr();   /* AT&T version */
  208. -   extern char *strrchr();
  209. -#  define INDEX(s, c)  strchr(s, c)
  210. -#  define RINDEX(s, c) strrchr(s, c)
  211. -# endif
  212. -#else
  213. -  extern char *strchr();    /* APW, MSC */
  214. -  extern char *strrchr();
  215. -# define INDEX(s, c)  strchr(s, c)
  216. -# define RINDEX(s, c) strrchr(s, c)
  217. -#endif
  218. -
  219. -extern char tmpNameBuf[];
  220. -
  221. -/* external function declarations */
  222. -extern void Fatal(),
  223. -        Quit();
  224. -extern void free();
  225. -extern char *Malloc();
  226. -
  227. -#ifdef APW
  228. -extern void ToolErrChk(),
  229. -        perror();
  230. -#endif
  231. -
  232. -extern int strcasecmp(),
  233. -       strncasecmp();
  234. -
  235. -extern void ArcfiCreate(),
  236. -        Rename();
  237. -extern BOOLEAN Exists();
  238. -extern char *MakeTemp();
  239. -
  240. -extern void ExpandTime();
  241. -extern long ReduceTime();
  242. -extern Time *GetTime();
  243. -
  244. =nuadd.h
  245. -/*
  246. - * nuadd.h - declarations for nuadd.c
  247. - *
  248. - * NuLib v3.0  February 1991  Freeware (distribute, don't sell)
  249. - * By Andy McFadden (fadden@cory.berkeley.edu)
  250. - */
  251. -
  252. -/* information is copied from file-dependent structures (FileRec) to here */
  253. -typedef struct {
  254. -    char *pathname;     /* as much of the path as we need to know */
  255. -    char *store_name;  /* what name the file will be stored under */
  256. -    fourbyt eof;  /* length of file */
  257. -    fourbyt fAccess;  /* was Word */
  258. -    fourbyt fileType;  /* was Word */
  259. -    fourbyt auxType;
  260. -    twobyt storageType;
  261. -    Time create_dt;  /* Time = TimeRec = 8 bytes in misctool.h/nuread.h */
  262. -    Time mod_dt;
  263. -    twobyt fileSysID;  /* these two are non-standard */
  264. -    onebyt fileSysInfo;
  265. -    int marked;  /* application specific */
  266. -} file_info;
  267. -
  268. -#define MAXARGS 255  /* max #of files specified on command line; signed int */
  269. -
  270. -extern void NuAdd();
  271. -extern long AddFile();
  272. -extern onebyt *MakeMHblock();
  273. -extern int  EvalArgs();
  274. -
  275. + END OF ARCHIVE
  276.