home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / new / dev / misc / cweb / readme < prev    next >
Encoding:
Text File  |  1993-12-21  |  12.0 KB  |  249 lines

  1.                             -*-Text-*-
  2. % This file, README.AMIGA, is part of CWEB-p.
  3. % The CWEB programs by Silvio Levy are based on programs by D. E. Knuth.
  4.  
  5. % Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
  6. % Copyright (C) 1991,1992,1993 Hans-Hermann Bode
  7. % Copyright (C) 1992 Klaus Guntermann
  8. % Copyright (C) 1991,1993 Carsten Steger
  9. % Copyright (C) 1993 Andreas Scherer
  10.  
  11. % Permission is granted to make and distribute verbatim copies of this
  12. % document provided that the copyright notice and this permission notice
  13. % are preserved on all copies.
  14.  
  15. % Permission is granted to copy and distribute modified versions of this
  16. % document under the conditions for verbatim copying, provided that the
  17. % entire resulting derived work is distributed under the terms of a
  18. % permission notice identical to this one.
  19.  
  20. % Please send comments, suggestions, etc. to levy@geom.umn.edu.
  21. % If related to changes specific for MSDOS, however,
  22. % send them to Hans-Hermann Bode,
  23. % hhbode@@dosuni1.rz.uni-osnabrueck.de or HHBODE@@DOSUNI1.BITNET.
  24. % If related to changes specific for AMIGA, however,
  25. % send them to Andreas Scherer,
  26. % Abt-Wolf-Straße 17, 96215 Lichtenfels, Germany.
  27.  
  28. This is the ANSI-C/C++ implementation of Silvio Levy's and Donald E.
  29. Knuth's CWEB system, compiled and provided with changefiles for ANSI C and
  30. Turbo C++ and a makefile for Turbo Make by Hans-Hermann Bode, including
  31. additional changes to improve support of ANSI-C compilers and a makefile
  32. for c89 by Klaus Guntermann, and including additional changes for full
  33. support of ANSI-C compilers and to support the SAS/C 6.0 compiler on the
  34. AMIGA by Andreas Scherer.
  35.  
  36. Note that the changes for the Turbo-C++ compiler are made conditional
  37. (they will become effective only if the symbol __TURBOC__ is defined,
  38. which automatically is the case when compiled with Turbo C++), so users
  39. of other systems with ANSI-C compilers might be able to compile the
  40. sources without editing.
  41.  
  42. Note that the changes for the AMIGA and SAS/C 6.0 compiler support are
  43. made conditional (they will become effective only if the symbol _AMIGA
  44. is defined, which automatically is the case when compiled with the SAS/C
  45. compiler).  AMIGA patch 2.8 [p7] was recently evaluated on a HP Apollo
  46. workstation and absolutely no change to the AMIGA source had to be made,
  47. only the makefile for the C89 compiler proved to include to few dependencies.
  48.  
  49. This directory contains the following files from the original CWEB
  50. distribution (`.' denotes the local directory):
  51.  
  52. ./makefile.org        makefile from the original distribution
  53. ./readme.org        readme file from the original distribution
  54. ./common.h        header file to be included in ctangle.w and cweave.w
  55. ./common.w        common code for ctangle and cweave
  56. ./common-man.ch        change file for the complete documentation
  57. ./common-vms.ch        example change file for VAX/VMS (not incorporated)
  58. ./ctangle.w        the tangle processor
  59. ./ctangle-man.ch    change file for the complete documentation
  60. ./ctangle-vms.ch    example change file for VAX/VMS (not icorporated)
  61. ./cweave.w        the weave processor
  62. ./cweave-man.ch        change file for the complete documentation
  63. ./cweave-vms.ch        example change file for VAX/VMS (not incorporated)
  64. ./cweb.1        manual page (nroff format)
  65. ./cweb.el        elisp file for GNU Emacs
  66. ./cwebmac.tex        macros for formatting
  67. ./cwebman.tex        the user manual
  68. ./prod.w        production rules to be included in cweave.w
  69. ./examples        directory containing examples of CWEB programming
  70. ./examples/extex.w    - spellchecking filter for TeX and CWEB by Don Knuth
  71. ./examples/kspell.el    - Emacs interface to extex/wordtest
  72. ./examples/makefile    - generic makefile for CWEB applications
  73. ./examples/oemacs.el    - Emacs interface to oemacs
  74. ./examples/oemacs.w    - non-portable example program for OpenWindows
  75. ./examples/readme    - readme file from the examples directory
  76. ./examples/treeprint.w    - tree-structured directory lister by Norman Ramsey
  77. ./examples/wc.w        - UNIX word-count utility
  78. ./examples/wmerge.w    - WEB-like file merger by Silvio Levy
  79. ./examples/wordtest.w    - spellchecker by Don Knuth
  80. ./examples/xlib_types.w    - include file for XView programs
  81. ./examples/xview_types.w- ditto
  82.  
  83. The following files are added in this distribution by various contributors:
  84.  
  85. general:
  86. ./cweb.man        manual page (ASCII format)
  87. ./common-p.hch        change file for common.h
  88. ./common-p.ch        change file for common.w
  89. ./ctangle-p.ch        change file for ctangle.w
  90. ./cweave-p.ch        change file for cweave.w
  91. ./prod-p.ch        change file for prod.w
  92. ./cwebmang.ch        change file for cwebman.tex
  93. ./macros/ccwebmac.tex    beautifications for cwebmac.tex
  94. ./macros/gcwebmac.tex    German version of cwebmac.tex
  95. ./common.c        CTANGLEd product of common.w and common-p.ch
  96. ./ctangle.c        CTANGLEd product of ctangle.w and ctangl-p.ch
  97. ./examples/commonwords.w program to count word frequencies in text files
  98. ./examples/extex-p.ch    change file for extex.w
  99. ./examples/primes.w     program to print the first 1000 prime numbers
  100. ./examples/sample.w     program to produce random numbers
  101. ./examples/treeprint-p.ch change file for treeprint.w (doesn't work for Amiga!)
  102. ./examples/wc-p.ch    change file for wc.w
  103. ./examples/wordtest-p.ch change file for wordtest.w
  104. ./examples/wmerge.c    CTANGLEd product of wmerge.w and wmerge-p.ch
  105. ./examples/wmerge-p.ch    change file for wmerge.w
  106.  
  107. special for users of c89 or other ANSI C compilers by Klaus Guntermann:
  108. ./makefile.c89        makefile for c89
  109. ./readme.c89        this file for users of c89
  110.  
  111. special for PC users by Hans-Hermann Bode:
  112. ./makefile.pc        makefile for Turbo C++
  113. ./readme.pc        informations for PC users
  114.  
  115. special for AMIGA users by Andreas Scherer:
  116. ./readme.amiga        informations for AMIGA users (this file)
  117. ./makefile.amiga    makefile for SAS/C compiler 6.0 and up
  118. ./bin/ctangle        executable tangle processor, Amiga version
  119. ./bin/cweave        executable weave processor, Amiga version
  120. ./bin/wmerge        executable WEB merge program, Amiga version
  121. ./examples/smakefile    MAKEFILE for SAS/C compiler 6.0 and up
  122. ./ARexx/Start_Web.ced    ARexx script to start cweave and ctangle from CED
  123. ./ARexx/Catalogs/cweb.cd Catalog description for German defaults
  124. ./ARexx/Catalogs/cweb.e.ct Catalog translation for English users
  125. ./ARexx/Catalogs/english/cweb.catalog Message catalog for English users
  126. ./ARexx/Compile.ced    ARexx script to start SAS/C 6.3 from CED (V3.5+)
  127.  
  128. The additional files with extensions .h, .w, .tex, and .c are
  129. reproducable from the other sources by means of an executable WMERGE,
  130. CTANGLE, CWEAVE, and an ANSI-C compiler.
  131.  
  132. Before starting, you should run cwebmang.tex (needs ccwebmac.tex and
  133. gcwebmac.tex!) through TeX and print out the manual.  If you are not
  134. going to use this distribution on an AMIGA, you can reclaim some disk
  135. space by removing all AMIGA related files.  You will have to compile
  136. the binaries using your ANSI-C compiler.
  137.  
  138. Make sure, that the files you got are in proper format (if you took
  139. them from a ZIP archive, line ends might still contain carriage return
  140. and linefeed characters, which may not be appropriate for your
  141. operating system).  Make sure, that you do *not* use one of those stupid
  142. operating systems with only eight+three (ridiculous) significant characters
  143. in file names, because there are several files in this distribution with
  144. longer names (see the list above).  You will have to rename some files,
  145. when you use DOS.
  146.  
  147. How to create the binaries:
  148.  
  149. 1.  Rename the makefile.amiga to Makefile or SMakefile, for use with
  150. SMake.  Note that makefile.org is lacking some dependencies, so you
  151. better start from makefile.c89 when on a Un*x system.  And even this
  152. proved to be no good: When recompiling the AMIGA source on a HP Apollo
  153. workstation with C89, absolutely *no* change had to be made to the
  154. common.c and ctangle.c source files, but the makefile included to few
  155. dependencies.
  156.  
  157. 2.  If your compiler is not named SC, you have to change the CC
  158. definition to the proper call in the Makefile, e.g., for the ANSI-C
  159. version of gcc use
  160.     CC = gcc -ansi 
  161. Check also the other lines in Makefile so that all directory
  162. definitions are set properly for your local system and configuration.
  163.  
  164. 3.  Touch common.c, ctangle.c, and examples/wmerge.c to make them
  165. up-to-date.  To make ctangle, cweave and the wmerge processor say
  166. `make programs'; this should  produce actions similar to the following,
  167. possibly with harmless warning messages from the compiler (there won't
  168. be any if you use SAS/C 6.3!), and e.g. the options and the name of the
  169. compiler may be as modified in Makefile:
  170.  
  171. sc nolink ctangle.c
  172. sc nolink common.c
  173. slink FROM $(OBJS) ctangle.o TO ctangle LIB $(LIBS)
  174. ./ctangle cweave cweave-p.ch
  175. sc code=FAR nolink cweave.c
  176. slink FROM $(OBJS) cweave.o  TO cweave LIB $(LIBS)
  177. (cd examples; sc link wmerge.c)
  178.  
  179. To get some reassurance that things are OK, you can say `make
  180. cautiously', which ensures that CTANGLE will reproduce itself.
  181. (Otherwise the source files common.w and ctangle.w won't actually
  182. have been used.)
  183.  
  184. To install cweave, ctangle, wmerge, ccwebmac.tex and gcwebmac.tex,
  185. the manual page, an emacs macro file, and the ARexx script files,
  186. say `make install'.  You may also decide to move the files manually
  187. to their proper places.  See the Makefile for details, what to move,
  188. and for suggestions, where to move it.
  189.  
  190. Incidentally, if you try the recompilation with another compiler, you
  191. may have no luck without changing the sources.  In this case, it is
  192. necessary to do all the required changes in the .c file first, until
  193. you can compile ctangle.c and common.c.  But it is necessary then, to
  194. add the same modifications to the change file (never make any changes
  195. to the .w files!).  Finally processing ctangle.w and the extended
  196. change file for ctangle with the modified ctangle will create the same
  197. contents as the manual modifications.  If such changes are needed for
  198. a common compiler, please notify the authors about this and send the
  199. extended changes.
  200.  
  201. 4.  Do not edit one of the .w files under any circumstances.  Do all
  202. modifications in the associated .ch files, but keep in mind that
  203. you'll need a working ctangle processor to generate the updated .c
  204. files.  And beware:  CWEB version 3.0 needs a CTANGLE and CWEAVE with
  205. `longest_name==1000', so any older version with `longest_name==400' will
  206. fail!  Furthermore, do not edit common.h, prod.w, or cwebmac.tex.
  207. Make your modifications to common-p.hch or prod-p.ch.  To incorporate the
  208. changes you will need a working wmerge program.  This will be prepared
  209. when ctangle and cweave are created.  There is a tangled wmerge.c also
  210. in case you don't have a working ctangle processor so far.  However, you
  211. are allowed to make changes to ccwebmac.tex and gcwebmac.tex in the
  212. ./macros subdirectory.
  213.  
  214. 5.  If you want a full documentation of the tangle and weave programs,
  215. type `make docs'.  The documentation created will include the changes
  216. needed for the ANSI-C/C++ and the AMIGA extensions.
  217.  
  218. 6.  To delete all intermediate files created in the make processes say
  219. `make clean'.  You will be left with the files in this distribution.
  220.  
  221. 7.  The weave and tangle processors as well as wmerge in the example
  222. directory now recognize a CWEBINPUTS environment variable.  When an
  223. include file name (argument to the @i command) can not be found in the
  224. current directory or in the absolute path, a multi-path search is
  225. performed.  CWEBINPUTS---if not empty---may contain a list of search
  226. path names, delimited by PATH_SEPARATORs.  The current directory is
  227. represented by an empty path entry, but it is search first anyway.
  228. Device names must end in an DEVICE_SEPARATOR.  Example for AmigaOS:
  229.  
  230.     setenv CWEBINPUTS "RAM:,CWEB:includes"
  231.  
  232. If CWEBINPUTS is not set, some sensible defaults are searched (honest!).
  233.  
  234. 8.  The tangle and weave processors of this implementation are able to
  235. process traditional C, ANSI C, and C++.  Note that CTANGLE always uses
  236. a default extension .c for its output file; this may not be appropriate
  237. for C++ compilers, but you can work around this by supplying a third
  238. argument in the command line (see cwebman).
  239.  
  240. 9.  You can define a font for comments in the C part of the modules by means
  241. of the \cmntfont macro.  It defaults to \tenrm, i.e., ten-point roman;
  242. if you don't like this, say, e.g.,
  243.  
  244.   \let\cmntfont=\tenss
  245.  
  246. to get a ten-point sans-serif comment font or whatever.  This command
  247. should be placed in the limbo section of your sources or in your own
  248. version of cwebmac.tex, e.g., like in ccwebmac.tex.
  249.