🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #346

KR-CWEB-SAMPLE on FILESERV/Niord

#346
From: George D. Greenwade
Date: Wed, 22 Jul 1992 22:30
50 lines
3025 bytes
Cameron Smith forwarded his samples, as he promised in an earlier posting
today on comp.text.tex.  Below is the description file with retrieval
instructions.  Thanks to Cameron for sharing this example of literate
programming!!

--George
===========================================================================
                              KR-CWEB-SAMPLE
                              --------------
The KR-CWEB-SAMPLE package includes a sample of CWEB usage provided by
Cameron Smith <cameron@symcom.math.uiuc.edu>.  It illustrates one way of
using CWEB with multiple source files that are compiled separately.  A
Makefile is provided to direct the construction of the executable program
and the typeset listings.  This program was originally created for the
enlightenment of its author, as a novice CWEB programmer, after realizing
that each of the demonstration programs included in the CWEB distribution
consists of a single "monolithic" source file -- which is not how most
non-trivial C programs are structured.  The goal of this package is to
provide a simple example showing how to use CWEB for more realistic
programming tasks.

This program is based very closely on the calculator program from Chapter 4
of Kernighan and Ritchie's "The C Programming Language" (2nd edition). 
That program was chosen because it is short and easy to understand, so you
can concentrate on the way it is implemented in CWEB rather than how it
works (although of course you ordinarily want the focus to be exactly
reversed -- on the algorithm rather than the implementation!).

To retrieve the set of 7 files, include the command:
 SENDME KR-CWEB-SAMPLE
in the body of a mail message to FILESERV@SHSU.BITNET (FILESERV@SHSU.edu). 
To retrieve a specific file, such as KR-CWEB-SAMPLE.README, include:
 KR-CWEB-SAMPLE.README
in your mail message to FILESERV.  The files are available individually, as
well as packaged in compressed tar format and ZIP format, for anonymous ftp
retrieval from Niord.SHSU.edu (192.92.115.8) in the directory
[FILESERV.KR-CWEB-SAMPLE].

Files in this package: (1 Block = 512 bytes)
File                  Blocks  Save file as:
-------------------------------------------------------------------------------
KR-CWEB-SAMPLE.CALC_W     17  calc.w    
KR-CWEB-SAMPLE.GETCH_W     6  getch.w   
KR-CWEB-SAMPLE.GETOP_W     7  getop.w   
KR-CWEB-SAMPLE.MAIN_W      7  main.w    
KR-CWEB-SAMPLE.MAKEFILE   12  Makefile  
KR-CWEB-SAMPLE.README     36  ReadMe    
KR-CWEB-SAMPLE.STACK_W     6  stack.w   

Approximate total blocks in full KR-CWEB-SAMPLE package = 91
Technical Details
Message-ID: <0095DF6C.F4A1E380.30298@SHSU.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!usc!noiro.acs.uci.edu!unogate!mvb.saic.com!info-tex

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!usc!noiro.acs.uci.edu!unogate!mvb.saic.com!info-tex
From: "George D. Greenwade" <bed_gdg@SHSU.edu>
Newsgroups: comp.text.tex
Subject: KR-CWEB-SAMPLE on FILESERV/Niord
Message-ID: <0095DF6C.F4A1E380.30298@SHSU.edu>
Date: Wed, 22 Jul 1992 17:30:57 CDT
Organization: Info-Tex<==>Comp.Text.Tex Gateway
X-Gateway-Source-Info: Mailing List
Lines: 50