home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / text / tex / 9425 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  2.9 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!noiro.acs.uci.edu!unogate!mvb.saic.com!info-tex
  2. From: "George D. Greenwade" <bed_gdg@SHSU.edu>
  3. Newsgroups: comp.text.tex
  4. Subject: KR-CWEB-SAMPLE on FILESERV/Niord
  5. Message-ID: <0095DF6C.F4A1E380.30298@SHSU.edu>
  6. Date: Wed, 22 Jul 1992 17:30:57 CDT
  7. Organization: Info-Tex<==>Comp.Text.Tex Gateway
  8. X-Gateway-Source-Info: Mailing List
  9. Lines: 50
  10.  
  11. Cameron Smith forwarded his samples, as he promised in an earlier posting
  12. today on comp.text.tex.  Below is the description file with retrieval
  13. instructions.  Thanks to Cameron for sharing this example of literate
  14. programming!!
  15.  
  16. --George
  17. ===========================================================================
  18.                               KR-CWEB-SAMPLE
  19.                               --------------
  20. The KR-CWEB-SAMPLE package includes a sample of CWEB usage provided by
  21. Cameron Smith <cameron@symcom.math.uiuc.edu>.  It illustrates one way of
  22. using CWEB with multiple source files that are compiled separately.  A
  23. Makefile is provided to direct the construction of the executable program
  24. and the typeset listings.  This program was originally created for the
  25. enlightenment of its author, as a novice CWEB programmer, after realizing
  26. that each of the demonstration programs included in the CWEB distribution
  27. consists of a single "monolithic" source file -- which is not how most
  28. non-trivial C programs are structured.  The goal of this package is to
  29. provide a simple example showing how to use CWEB for more realistic
  30. programming tasks.
  31.  
  32. This program is based very closely on the calculator program from Chapter 4
  33. of Kernighan and Ritchie's "The C Programming Language" (2nd edition). 
  34. That program was chosen because it is short and easy to understand, so you
  35. can concentrate on the way it is implemented in CWEB rather than how it
  36. works (although of course you ordinarily want the focus to be exactly
  37. reversed -- on the algorithm rather than the implementation!).
  38.  
  39. To retrieve the set of 7 files, include the command:
  40.  SENDME KR-CWEB-SAMPLE
  41. in the body of a mail message to FILESERV@SHSU.BITNET (FILESERV@SHSU.edu). 
  42. To retrieve a specific file, such as KR-CWEB-SAMPLE.README, include:
  43.  KR-CWEB-SAMPLE.README
  44. in your mail message to FILESERV.  The files are available individually, as
  45. well as packaged in compressed tar format and ZIP format, for anonymous ftp
  46. retrieval from Niord.SHSU.edu (192.92.115.8) in the directory
  47. [FILESERV.KR-CWEB-SAMPLE].
  48.  
  49. Files in this package: (1 Block = 512 bytes)
  50. File                  Blocks  Save file as:
  51. -------------------------------------------------------------------------------
  52. KR-CWEB-SAMPLE.CALC_W     17  calc.w    
  53. KR-CWEB-SAMPLE.GETCH_W     6  getch.w   
  54. KR-CWEB-SAMPLE.GETOP_W     7  getop.w   
  55. KR-CWEB-SAMPLE.MAIN_W      7  main.w    
  56. KR-CWEB-SAMPLE.MAKEFILE   12  Makefile  
  57. KR-CWEB-SAMPLE.README     36  ReadMe    
  58. KR-CWEB-SAMPLE.STACK_W     6  stack.w   
  59.  
  60. Approximate total blocks in full KR-CWEB-SAMPLE package = 91
  61.