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

  1. From: jac@yoko.rutgers.edu (Jonathan A. Chandross)
  2. Newsgroups: comp.sources.apple2
  3. Subject: v001SRC040:  Nulib - Archive Library Tools (Unix) 09/10
  4. Message-ID: <May.1.18.15.04.1991.23541@yoko.rutgers.edu>
  5. Date: 1 May 91 22:15:06 GMT
  6. Approved: jac@paul.rutgers.edu
  7.  
  8.  
  9. Submitted-by: Andy McFadden (fadden@cory.berkeley.edu)
  10. Posting-number: Volume 1, Source:40
  11. Archive-name: archive/unix/nulib/part09.10
  12. Architecture: UNIX
  13. Version-number: 3.03
  14.  
  15.  
  16. =nupak.h
  17. -/*
  18. - * nupak.h - declarations for nupak.c
  19. - *
  20. - * This has function declarations for all of the pack routines; that way we
  21. - *   don't have to include .h files for all of the pack code.
  22. - *
  23. - * NuLib v3.0  February 1991  Freeware (distribute, don't sell)
  24. - * By Andy McFadden (fadden@cory.berkeley.edu)
  25. - */
  26. -
  27. -/* Pack/unpack buffer size; should be as big as read() & malloc() can take */
  28. -/* Note: must be AT LEAST 8200 bytes or things may break */
  29. -/*       Bad things could happen if it's less than 12K   */
  30. -#define PAKBUFSIZ   0xff80
  31. -
  32. -extern long packedSize;
  33. -extern onebyt lastseen;
  34. -
  35. -extern twobyt PackFile();
  36. -extern int UnpackFile();  /* BOOLEAN */
  37. -extern unsigned int crlf();
  38. -extern void Spin(),
  39. -        FCopy();
  40. -
  41. -extern long pak_SHK();    /* pack P8 ShrinkIt format, in nushk.c */
  42. -extern void unpak_SQU();  /* unsqueeze, in nusq.c */
  43. -extern void unpak_SHK();  /* unShrink, in nushk.c */
  44. -
  45. =mkshk
  46. -#! /bin/csh
  47. -# Make NuLib shk file for download.
  48. -# Puts a copy of the files (without tabs and linefeeds) in ./trans, and then
  49. -#   adds them to "nulib.shk"
  50. -#
  51. -# ("detab" converts tabs to spaces, "lfstrip" converts LF -> CR)
  52. -#
  53. -# This is intended as an example; it may or may not work on your system.
  54. -
  55. -echo "--- Converting tabs and linefeeds"
  56. -foreach file (README Benchmarks Makefile make.apw linkcom mkshk *.h *.c \
  57. -    nulib.mak nulib.lnk)
  58. -    echo $file
  59. -    detab $file >! nul.tmp
  60. -    lfstrip nul.tmp trans/$file
  61. -end
  62. -
  63. -rm nul.tmp
  64. -
  65. -cd trans
  66. -nulib cvftxt/0000 nulib.shk README Benchmarks Makefile nulib.mak nulib.lnk
  67. -nulib avfsrc/0006 nulib.shk make.apw mkshk
  68. -nulib avfsrc/0009 nulib.shk linkcom
  69. -nulib avfsrc/000a nulib.shk *.h *.c
  70. -cd ..
  71. -
  72. =nuview.h
  73. -/*
  74. - * nuview.h - declarations for nuview.c
  75. - *
  76. - * NuLib v3.0  February 1991  Freeware (distribute, don't sell)
  77. - * By Andy McFadden (fadden@cory.berkeley.edu)
  78. - */
  79. -
  80. -typedef enum { NAMEONLY, PROSHK, ARCZOO, FULL } outtype;
  81. -
  82. -/* constant string declarations */
  83. -extern char *unknownStr;
  84. -extern char *WD[];
  85. -extern char *MO[];
  86. -#define TCn 4
  87. -extern char *TC[];
  88. -#define TKn 3
  89. -extern char *TK[][TKn];
  90. -#define TFn 6
  91. -extern char *TF[];
  92. -#define BTFn 6
  93. -extern char *BTF[];
  94. -#define QTFn 6
  95. -extern char *QTF[];
  96. -#define FIDn 14
  97. -extern char *FID[];
  98. -#define STn 14
  99. -extern char *ST[];
  100. -extern char *FT[];
  101. -
  102. -extern void NuView();
  103. -extern char *PrintDate();
  104. -
  105. =make.apw
  106. -*
  107. -* NuLib AGE script (A pseudo-makefile for APW and ORCA)
  108. -*
  109. -
  110. -for file in numain nuread nuview nuadd nuext nupdel nupak nuetc nublu nushk nusq nucomp
  111. -    age obj/{file}.root {file}.c
  112. -    if {age} != 0
  113. -    echo compiling {file}.c
  114. -    delete obj/{file}.root
  115. -    compile {file}.c keep=obj/{file}
  116. -    end
  117. -end
  118. -
  119. -* Once everything is compiled, I test the final
  120. -* program file against the object modules that build it.
  121. -* If linking is required, it is performed next followed
  122. -* by a series of other statements to complete it:
  123. -
  124. -age cshk obj/=.root
  125. -purge
  126. -* if {age} != 0
  127. -*     delete nulib
  128. -*     prefix obj
  129. -*     alink linker.scr
  130. -*     prefix ..
  131. -* end
  132. =nuext.h
  133. -/*
  134. - * nuext.h - declarations for nuext.c
  135. - *
  136. - * NuLib v3.0  February 1991  Freeware (distribute, don't sell)
  137. - * By Andy McFadden (fadden@cory.berkeley.edu)
  138. - */
  139. -
  140. -#define MAXDEPTH    64       /* max subdir depth we will unpack */
  141. -
  142. -extern void NuExtract();
  143. -
  144. + END OF ARCHIVE
  145.