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

  1.                             -*-Text-*-
  2. % This file, README.C89, is part of CWEB-p.
  3. % The CWEB programs by Silvio Levy are based on programs by D. E. Knuth.
  4. % ANSI-C conforming changes and Turbo-C++ implementation are made by
  5. % Hans-Hermann Bode <HHBODE@DOSUNI1.BITNET or
  6. % hhbode@dosuni1.rz.uni-osnabrueck.de>, additional support for other
  7. % ANSI-C compilers (e.g. c89) provided by Klaus Guntermann
  8. % <guntermann@iti.informatik.th-darmstadt.de>.
  9. % The programs are distributed WITHOUT ANY WARRANTY, express or implied.
  10. % This readme file last updated October 1993 by Andreas Scherer
  11.  
  12. % Copyright (C) 1987,1990,1992 Silvio Levy and Donald E. Knuth
  13. % Copyright (C) 1991,1992 Hans-Hermann Bode
  14. % Copyright (C) 1992 Klaus Guntermann
  15.  
  16. % Permission is granted to make and distribute verbatim copies of this
  17. % document provided that the copyright notice and this permission notice
  18. % are preserved on all copies.
  19.  
  20. % Permission is granted to copy and distribute modified versions of this
  21. % document under the conditions for verbatim copying, provided that the
  22. % entire resulting derived work is distributed under the terms of a
  23. % permission notice identical to this one.
  24.  
  25. % Please send comments, suggestions, etc. concerning to the original CWEB to
  26. % levy@math.berkeley.edu.
  27. % Send suggestions and complaints concerning to the ANSI-C/Turbo-C++
  28. % implementation to HHBODE@DOSUNI1.BITNET.
  29.  
  30. This is the ANSI-C/Turbo-C++ implementation of Silvio Levy's and
  31. Donald E. Knuth's CWEB system, compiled and provided with changefiles
  32. for ANSI C and Turbo C++ and a makefile for Turbo Make by
  33. Hans-Hermann Bode, including additional changes to improve support of
  34. ANSI-C compilers and a makefile for c89 by Klaus Guntermann. Note
  35. that the changes for the Turbo-C++ compiler are made conditional
  36. (they will become effective only if the symbol __TURBOC__ is defined,
  37. which automatically is the case when compiled with Turbo C++), so
  38. users of other systems with ANSI-C compilers might be able to compile
  39. the sources without editing.
  40.  
  41. This directory contains the following files from the original CWEB
  42. distribution:
  43.  
  44. ./makefile.org        makefile from the original distribution
  45. ./readme.org        readme file from the original distribution
  46. ./common.h        header file to be included in ctangle.w and cweave.w
  47. ./common.w        common code for ctangle and cweave
  48. ./ctangle.w        the tangle processor
  49. ./cweave.w        the weave processor
  50. ./cweb.1        manual page (nroff format)
  51. ./cweb.el        elisp file for GNU Emacs
  52. ./cwebmac.tex        macros for formatting
  53. ./cwebman.tex        the user manual
  54. ./prod.w        production rules to be included in cweave.w
  55. ./examples        directory containing examples of CWEB programming
  56. ./examples/wc.w        - UNIX word-count utility
  57. ./examples/treeprin.w    - tree-structured directory lister by Norman Ramsey
  58. ./examples/wmerge.w    - WEB-like file merger by Silvio Levy
  59. ./examples/extex.w    - spellchecking filter for TeX and CWEB by Don Knuth
  60. ./examples/wordtest.w    - spellchecker by Don Knuth
  61. ./examples/xlib_typ.w    - include file for XView programs
  62. ./examples/xview_ty.w    - ditto
  63. ./examples/kspell.el    - Emacs interface to extex/wordtest
  64. ./examples/makefile    - generic makefile for CWEB applications
  65. ./examples/readme    - readme file from the examples directory
  66.  
  67. Note that the changefiles provided in the original distribution for vms are
  68. removed here.
  69.  
  70. The following files are added in this distribution:
  71.  
  72. general:
  73. ./cweb.man        manual page (ASCII format)
  74. ./common-p.hch        change file for common.h
  75. ./common-p.ch        change file for common.w
  76. ./ctangl-p.ch        change file for ctangle.w
  77. ./cweave-p.ch        change file for cweave.w
  78. ./prod-p.ch        change file for prod.w
  79. ./ccwebmac.ch        change file for cwebmac.tex (including C++ macros)
  80. ./common-p.h        WMERGEd product of common.h and common-p.hch
  81. ./prod-p.w        WMERGEd product of prod.w and prod-p.ch
  82. ./ccwebmac.tex        WMERGEd product of cwebmac.tex and ccwebmac.ch
  83. ./common.c        CTANGLEd product of common.w and common-p.ch
  84. ./ctangle.c        CTANGLEd product of ctangle.w and ctangl-p.ch
  85. ./examples/wmerge-p.ch    change file for wmerge.w
  86. ./examples/wmerge.c    CTANGLEd product of wmerge.w and wmerge-p.ch
  87.  
  88. special for users of c89 or other ANSI C compilers:
  89. ./makefile.c89        makefile for c89
  90. ./readme.c89        this file for users of c89
  91.  
  92. special for PC users:
  93. ./readme.pc        informations for PC users
  94. ./makefile.pc        makefile for Turbo C++
  95. ./ctangle.exe        executable tangle processor, ANSI-C/Turbo-C++ version
  96. ./cweave.exe        executable weave processor, ANSI-C/Turbo-C++ version
  97. ./wmerge.exe        executable WEB merge program, from examples directory
  98.  
  99. Please note that most examples have not been converted to ANSI C yet.
  100.  
  101. The additional files with extensions .h, .w, .tex, and .c are
  102. reproducable from the other sources by means of an executable WMERGE,
  103. CTANGLE, and an ANSI-C compiler.
  104.  
  105. Before starting, you should run cwebman.tex (needs cwebmac.tex!)
  106. through TeX and print out the manual.
  107. If you are not going to use this distribution on a PC, you can 
  108. reclaim some disk space by removing all PC related files. You will have
  109. to compile the binaries using your ANSI-C compiler.
  110.  
  111. Make sure, that the files you got are in proper format (if you
  112. took them from a ZIP archive, line ends might still contain carriage
  113. return and linefeed characters, which may not be appropriate for your
  114. operating system).
  115.  
  116.  
  117. How to create the binaries:
  118.  
  119. 1. Rename the makefile.c89 to Makefile, for use with make. 
  120. Note that makefile.org is lacking some dependencies, so better start
  121. from makefile.c89 when on a Un*x system.
  122.  
  123. 2. If your compiler is not named c89, you have to change the CC
  124. definition to the proper call in the Makefile, e.g. for the
  125. ANSI-C version of gcc use
  126.     CC = gcc -ansi 
  127. Check also the other lines in Makefile so that all directory
  128. definitions are set properly for your local system and configuration.
  129.  
  130. 3. Touch common.c, ctangle.c, and examples/wmerge.c to make them
  131. up-to-date. To make ctangle, cweave and the wmerge processor say
  132. `make all'; this should  produce actions similar to the following,
  133. possibly with harmless warning messages from the compiler, and e.g.
  134. the options and the name of the compiler may be as modified in
  135. Makefile:
  136.  
  137. c89 -c ctangle.c
  138. c89 -c common.c
  139. c89 -o ctangle ctangle.o common.o 
  140. ./ctangle cweave cweave-p.ch
  141. c89 -c cweave.c
  142. c89 -o cweave cweave.o common.o
  143. (cd examples; c89 -o wmerge wmerge.c)
  144.  
  145. To get some reassurance that things are OK, you can say `make
  146. cautiously', which ensures that CTANGLE will reproduce itself.
  147. (Otherwise the source files common.w and ctangle.w won't actually
  148. have been used.)
  149.  
  150. To install cweave, ctangle, wmerge, ccwebmac.tex, the manual page,
  151. and an emacs macro file, say `make install'. You may also decide to
  152. move the files manually to their proper places. See the Makefile for
  153. details, what to move, and for suggestions, where to move it.
  154.  
  155. Incidentally, if you try the recompilation with another compiler, you
  156. may have no luck without changing the sources. In this case, it is
  157. necessary to do all the required changes in the .c file first, until
  158. you can compile ctangle.c and common.c. But it is necessary then, to
  159. add the same modifications to the change file. Finally processing
  160. ctangle.w and the extended change file for ctangle with the modified
  161. ctangle will create the same contents as the manual modifications. 
  162. If such changes are needed for a common compiler, please notify the
  163. authors about this and send the extended changes.
  164.  
  165. 4. Do not edit one of the .w files under any circumstances. Do all
  166. modifications in the associated .ch files, but keep in mind that
  167. you'll need a working ctangle processor to generate the updated .c
  168. files. 
  169. Furthermore, do not edit common.h, prod.w, or cwebmac.tex. Make your
  170. modifications to common-p.hch, prod-p.ch, or ccwebmac.ch instead. To
  171. incorporate the changes you will need a working wmerge program. This
  172. will be prepared when ctangle and cweave are created. There is a
  173. tangled wmerge.c also in case you don't have a working ctangle
  174. processor so far.
  175.  
  176. 5. If you want a full documentation of the tangle and weave programs,
  177. type `make doc'. The documentation created will include the changes
  178. needed for the ANSI-C/C++ extensions.
  179.  
  180. 6. To delete all intermediate files created in the make processes say
  181. `make clean'.
  182.  
  183. 7. The weave and tangle processors as well as wmerg