home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d8xx / d848 / cweb.lha / CWeb / CWeb27.lha / examples / readme < prev    next >
Encoding:
Text File  |  1993-03-13  |  2.6 KB  |  51 lines

  1. This directory contains several files for programs that are tutorial
  2. and/or useful. If you are new to CWEB, read "wc.w" first; it's a
  3. typical example of CWEB applied to system programming.
  4.  
  5. The Makefile on this directory is a generic way to build applications
  6. written in CWEB. Say, for example, "make wc.run" to get an executable
  7. program "wc" from wc.w. Say "make wc.dvi" to get a printable listing
  8. of its documentation. The program "wc" is a slight improvement over
  9. UNIX's standard word-count utility. (Try it, for example, with "wc *".)
  10.  
  11. The treeprint program, by Norman Ramsey, generates tree-structured
  12. representations of file hierarchies. To use it, say "make treeprint.run"
  13. and then
  14.    find dir -type p -print | sort | treeprint
  15. (on a UNIX system), where dir is a directory with interesting subdirectories.
  16.  
  17. The wmerge program, by Silvio Levy, produces a single CWEB file from a
  18. given CWEB file and a change file. It expands any "include"
  19. specifications in the original CWEB file. To use it, say "make wmerge.run"
  20. and then, e.g., "wmerge foo.w bar.ch > foobar.w". Both CTANGLE and
  21. CWEAVE already accept change files, so you need not merge anything yourself
  22. in normal day-to-day operations; but wmerge can be useful in connection with
  23. the spelling checker described below.
  24.  
  25. If you intend to read the source code of CTANGLE and CWEAVE, you may
  26. well wish to read wmerge.w first, or the hardcopy version obtained from
  27. "make wmerge.dvi"; it is similar but much simpler.
  28.  
  29. The files xview_types.w and xlib_types.w are examples of @i (include) files
  30. that can be used when writing XView programs. They are based on the header
  31. files in OpenWindows Version 3.0.
  32.  
  33. The extex and wordtest programs, by Don Knuth, are useful spellcheckers.
  34. After "make extex.run" say also "ln extex excweb"; this gives
  35. you two filter programs, extex and excweb, that remove extraneous
  36. material from TeX and CWEB source files, respectively. To use them,
  37. you can say for example
  38.    cat foo.w | excweb | spell
  39. (or replace "cat foo.w" with "wmerge foo.w bar.ch"). A similar pipeline
  40. for TeX files would be
  41.    cat foo.tex | extex | spell
  42. Even better is to replace "spell" by "wordtest /usr/local/lib/dict/words",
  43. if you have a suitable dictionary. One such dictionary in the public domain
  44. can be found in directory ~ftp/pub/dict at labrea.stanford.edu, available
  45. via anonymous ftp. To make your own dictionary from given ones,
  46.    cat dict1 dict2 dict3 dict4 | wordtest > words
  47. is quick and effective. See the documentation of wordtest for more info.
  48.  
  49. A file kspell.el that provides an emacs user interface to extex+excweb+wordtest
  50. also appears in this directory. (Somebody should write ELWEB...)
  51.