home *** CD-ROM | disk | FTP | other *** search
- -*-Text-*-
- % This file is part of CWEBBIN (Version 3.4 [p13]).
- % (Set TAB to 8 spaces to get the indentations right.)
- % The CWEB programs by Silvio Levy are based on programs by D. E. Knuth.
- % They are distributed WITHOUT ANY WARRANTY, express or implied.
-
- % This README file was last updated September 19, 1995 by Andreas Scherer
-
- % The following copyright notices extend to the respective parts of the
- % changed or added source code introduced in this patch only, not to
- % the original CWEB distribution, which is copyright (C) 1987,1990,1993
- % by Silvio Levy and Donald E. Knuth.
- %
- % Copyright (C) 1991-1993 Hans-Hermann Bode
- % Copyright (C) 1992 Klaus Guntermann
- % Copyright (C) 1991,1993 Carsten Steger
- % Copyright (C) 1993-1995 Andreas Scherer
-
- % Permission is granted to make and distribute verbatim copies of this
- % document provided that the copyright notice and this permission notice
- % are preserved on all copies.
-
- % Permission is granted to copy and distribute modified versions of this
- % document under the conditions for verbatim copying, provided that the
- % entire resulting derived work is distributed under the terms of a
- % permission notice identical to this one.
-
- % Please send comments, suggestions, etc., concerning the original CWEB
- % implementation to levy@geom.umn.edu.
-
- % Please send comments, suggestions, etc., related to changes specific
- % for this modified distribution CWEBBIN 3.4 [p13], especially language
- % catalog translations to <scherer@genesis.informatik.rwth-aachen.de>.
- % Postal address: Roland-Stra{\sse} 16, 52070 Aachen, Germany.
-
- This is the ANSI-C/C++ implementation of Silvio Levy's and Donald E.
- Knuth's CWEB system, compiled and provided with changefiles for ANSI-C
- and makefiles for Borland C/C++ 3.1, SAS/C++ 6.55, and UNIX-(g)cc.
- Additional features differing from the original distribution are
- described further below. As can be seen from the name CWEBBIN, this
- distribution comes with BINary executables for CTANGLE, CWEAVE, and
- WMERGE for AmigaOS and MS/DOS
-
- It is based on the CWEB 3.1 Amiga port by Tomas Charles Willis and the
- CWEB 2.8 Amiga port by Carsten Steger and the CWEB-PC 3.0 distribution
- by Hans-Hermann Bode and Klaus Guntermann, including all features of
- the original UNIX implementation and all enhancements made in these
- Amiga and MS/DOS ports.
-
- This distribution consists of the additional files for this patch only.
- The complete contents of the original distribution is a prerequisite.
- CWEB can be retrieved via anonymous ftp at
-
- labrea.stanford.edu:/pub/cweb
- CTAN:/tex-archive/web/c_cpp/cweb
-
- To apply this patched version of CWEB, extract the original distribution
- and afterwards extract the patch archive. Care has been taken to avoid
- collisions with any files from the original distribution and the Makefiles
- provide a target to cleanly remove the patch leaving only the files of the
- original distribution.
-
- The following files were added to this distribution by various contributors:
-
- GENERAL:
-
- ./comm-p13.ch change file for common.w
- ./comm-p13.h wmerged product of common.h and comm-p13.hch
- ./comm-p13.hch change file for common.h
- ./common.cxx ctangled product of common.w and comm-p13.ch
- ./ctang-p13.ch change file for ctangle.w
- ./ctangle.cxx ctangled product of ctangle.w and ctang-p13.ch
- ./cweav-p13.ch change file for cweave.w
- ./cwebmana.ch change file for cwebman.tex
- ./README.p13 this file
- ./wmerg-p13.ch change file for wmerge.w
- ./wmerge.cxx ctangled product from wmerge.w and wmerg-p13.ch
- ./cwebinputs/amiga_types.w AMIGA specific keywords by Commodore and SAS
- ./cwebinputs/ecma94.w Transliteration table for Latin-1
- ./cwebinputs/hp8.w Transliteration table for HP Roman 8
- ./cwebinputs/mac8.w Transliteration table for Macintosh 8-bit font
- ./cwebinputs/pc850.w Transliteration table for Codepage 850
- ./examples/cct.w program to translate between character code tables
- ./examples/commonwords.w program to count word frequencies in text files
- ./examples/extex.ch change file for extex.w
- ./examples/matrix.wxx C++ program to invert complex 4x4 matrices
- ./examples/primes.ch changes for the first 1000000 prime numbers
- ./examples/primes.w program to print the first 1000 prime numbers
- ./examples/README.p11 extended description for the new examples
- ./examples/sample.w program to produce random numbers
- ./examples/treeprint.ch change file for treeprint.w
- ./examples/wc.ch change file for wc.w
- ./examples/wordtest.ch change file for wordtest.w
- ./texinputs/dcweb.sty German captions in addition to cweb.cls
- ./texinputs/dcwebmac.tex German captions in addition to cwebmac.tex
- ./texinputs/ecma94.sty Umlauts and special characters for Latin-1
- ./texinputs/fcweb.sty French captions in addition to cweb.cls
- ./texinputs/fcwebmac.tex French captions in addition to cwebmac.tex
- ./texinputs/hp8.sty Umlauts and special characters for HP Roman 8
- ./texinputs/icweb.sty Italian captions in addition to cweb.cls
- ./texinputs/icwebmac.tex Italian captions in addition to cwebmac.tex
- ./texinputs/mac8.sty Umlauts and special characters for Macintosh 8-bit
- ./texinputs/pc850.sty Umlauts and special characters for Codepage 850
- ./texinputs/Xcwebmac.tex beautifications for cwebmac.tex
-
- SPECIAL FOR AMIGA USERS BY ANDREAS SCHERER:
-
- ./Makefile.sas makefile for SAS/C compiler 6.0 and up
- ./arexx/compile.ced ARexx script to start SAS/C 6.x from CED (V3.5+)
- ./arexx/start_web.ced ARexx script to start cweave and ctangle from CED
- ./arexx/catalogs/cweb_arexx.cd catalog description for German defaults
- ./arexx/catalogs/cweb_arexx.e.ct catalog translation for English users
- ./arexx/catalogs/cweb_arexx.f.ct catalog translation for French users
- ./arexx/catalogs/cweb_arexx.i.ct catalog translation for Italian users
- ./arexx/catalogs/english/cweb_arexx.catalog message catalog for English users
- ./arexx/catalogs/francais/cweb_arexx.catalog message catalog for French users
- (for compatibility reasons, the cedilla was
- replaced by an ordinary `c'. when you use
- this on the AMIGA you have to rename it again.)
- ./arexx/catalogs/italiano/cweb_arexx.catalog message catalog for Italian users
- ./bin/ctangle executable ctangle processor, AMIGA version
- ./bin/cweave executable cweave processor, AMIGA version
- ./bin/wmerge executable WEB merge program, AMIGA version
- ./bin/catalogs/cweb.cd catalog description for English defaults
- ./bin/catalogs/cweb.d.ct catalog translation for German users
- ./bin/catalogs/cweb.h header file with the English defaults
- ./bin/catalogs/cweb.i.ct catalog translation for Italian users
- ./bin/catalogs/dcweb.h header file with the German defaults
- ./bin/catalogs/icweb.h header file with the Italian defaults
- ./bin/catalogs/deutsch/cweb.catalog message catalog for German users
- ./bin/catalogs/italiano/cweb.catalog message catalog for Italian users
- ./examples/Makefile.sas makefile for SAS/C compiler 6.0 and up
-
- SPECIAL FOR MS/DOS USERS BY HANS-HERMANN BODE MODIFIED BY ANDREAS SCHERER:
-
- ./Makefile.bcc makefile for Borland C/C++
- ./bin/ctangle.exe executable CTANGLE processor, MS/DOS version
- ./bin/cweave.exe executable CWEAVE processor, MS/DOS version
- ./bin/wmerge.exe executable WMERGE processor, MS/DOS version
-
- SPECIAL FOR USERS OF CC, C89, GCC OR OTHER ANSI C COMPILERS FOR UNIX
- BY KLAUS GUNTERMANN MODIFIED BY ANDREAS SCHERER ACCORDING TO THE ORIGINAL
- MAKEFILE FROM THE CWEB DISTRIBUTION:
-
- ./Makefile.unix makefile for cc, c89, gcc, ... on several machines
-
- The additional files with extensions .tex and .cxx are reproducable from
- the other sources by means of an executable wmerge, ctangle, cweave, and
- an ANSI-C compiler.
-
- Before starting, you should run cwebmana.tex (needs cwebmac.tex and
- (X|d|f|i)cwebmac.tex!) through TeX and print out the manual.
-
- How to create the binaries:
-
- 1. Rename `Makefile.sas' to `SMakefile', for use with SMAKE. If you
- want to install the package on a UNIX system with CC, C89 or GCC, use
- `Makefile.unix' instead. If you want to install the package on MS/DOS
- with Borland C/C++, use `Makefile.bcc' instead or set up three projects
- for CTANGLE, CWEAVE, WMERGE (see the end of this description).
-
- 2. Check the entries in the Makefile for local conditions like a different
- compiler name or additional compiler options you want to use. Check also
- the other lines in the makefile so that all directory definitions are set
- properly for your local system configuration.
-
- 3. Touch common.cxx, ctangle.cxx, and wmerge.cxx to make them up-to-date.
- To make ctangle, cweave and the wmerge processor say `make progs'; this
- should produce actions similar to the following, possibly with harmless
- warning messages from the compiler (there won't be any if you use the
- SAS/C 6.x compiler, except some optimizer messages), and e.g., the options
- and the name of the compiler may be as modified in the makefile:
-
- sc $(CFLAGS) ctangle.cxx
- sc $(CFLAGS) common.cxx
- slink FROM $(OBJS) ctangle.o TO ctangle LIB $(LIBS)
- ctangle cweave cweav-p13
- sc $(CFLAGS) cweave.cxx
- slink FROM $(OBJS) cweave.o TO cweave LIB $(LIBS)
- sc $(CFLAGS) link wmerge.cxx
-
- or on UNIX systems
-
- cc -g -w -c ctangle.cxx
- cc -g -w -DCWEBINPUTS=\"/usr/local/lib/cweb\" -c common.cxx
- cc -g -o ctangle ctangle.o common.o
- ./ctangle cweave cweav-p13
- cc -g -w -c cweave.cxx
- cc -g -w -o cweave cweave.o common.o
- cc -g -w -o wmerge wmerge.cxx
-
- To get some reassurance that things are OK, you can say `make cautiously',
- which ensures that ctangle will reproduce itself. (Otherwise the source
- files common.w and ctangle.w won't actually have been used.)
-
- To install cweave, ctangle, wmerge, cwebmac.tex, and (X|d|f|i)cwebmac.tex,
- the manual page, an emacs macro file, and the ARexx script files and
- associated language catalogs, say `make install'. You probably need to
- be superuser to do this; but it's wise to `make all'áfirst, BEFORE becoming
- superuser and saying `make install'. You may also decide to move the files
- manually to their proper places. See the makefile for details, what to move,
- and for suggestions, where to move it.
- And see the ARexx script itself for details how to make use of it
- from the CygnusEd Professional Editor.
-
- If you want to recompile the programs for another system, you should
- take a look inside the change files comm-p13.ch, ctang-p13.ch, and
- cweav-p13.ch. All change files are set up to work for AMIGA with
- SAS/C++ 6.55, MS/DOS with Borland C/C++ 3.1, and UNIX with CC/GCC
- identically, so no further changes will be needed if you use one of
- these systems. Please send suggestions and bug reports to the
- coordinator of this patch if you encounter problems with other
- operating systems and/or compilers on these or other systems.
- (I'm especially interested in other AMIGA compilers like Aztec,
- Manx, and DICE, and other MS/DOS compilers like MSC. Also it would
- be fun to learn about GCC portability between these three and even
- more operating systems.)
-
- Incidentally, if you try the recompilation with another compiler for
- another system, you may have no luck without changing the sources.
- In this case, it is necessary to do all the required changes in the
- .cxx file first, until you can compile ctangle.cxx and common.cxx. But
- it is necessary then, to add the same modifications to the change file
- (never make any changes to the .w files!). Finally processing ctangle.w
- and the extended change file for ctangle with the modified ctangle will
- create the same contents as the modifications made by hand. If such
- changes are needed for a common compiler, please notify the distributor
- about this and send the extended changes.
-
- Do not edit one of the .w files under any circumstances. Do all
- modifications in the associated .ch files, but keep in mind that
- you'll need a working ctangle processor to generate the updated .cxx
- files. And beware: CWEB version 3 needs a ctangle and cweave with
- `longest_name==1000', so any older version with `longest_name==400' will
- fail! Furthermore, do not edit common.h, prod.w, or cwebmac.tex. All
- system dependent changes to common.h are to be made in ctang-p13.ch AND
- cweav-p13.ch, changes to the productions and macros should be made in
- additional change files. To incorporate the changes you will need a
- working wmerge program. This will be prepared when ctangle and cweave
- are created. There is a tangled wmerge.c also in case you don't have
- a working ctangle processor so far. However, feel free to make changes
- to the macro files (X|d|f|i)cwebmac.tex in the ./texinputs subdirectory,
- but notify the authors about any improvements.
-
- If you want a full documentation of the tangle and weave programs,
- type `make docs'. The documentation created will include all changes
- introduced by the .ch files. To get a list of all catalog strings, you
- should also print the file ./bin/catalogs/cweb.h with the original set
- of output strings and possibly ./bin/catalogs/cweb.d.ct for a clue to
- translations. If you want to use CWEB on a system without localization,
- there is the file ./bin/catalogs/dcweb.h, so German program versions
- can be created easily. Thanks to Giuseppe Ghib≥ same holds for Italian.
-
- To delete all intermediate files created in the make processes say
- `make clean'. You will be left with the files in this distribution.
-
- To remove the complete patch from the installed CWEB system, say
- `make remove'. You will be left with the original CWEB 3.4 system.
-
- The weave and tangle processors as well as wmerge now recognize a
- CWEBINPUTS environment variable. When an include file name (argument
- to the @i command) can not be found in the current directory or in the
- absolute path, a multi-path search is performed. CWEBINPUTS---if not
- empty---may contain a list of search path names, delimited by
- PATH_SEPARATORs, e.g., commas. The current directory is represented
- by an empty path entry, but it is searched first anyway. Device names
- must end in an DEVICE_SEPARATOR, i.e., colons. Example for AmigaOS:
-
- setenv CWEBINPUTS "RAM:,Local:cwebinputs"
-
- In the respective makefiles for AMIGA, UNIX and MS/DOS some decent defaults
- are set in the compile time constant CWEBINPUTS, which always is appended
- to any environment variable, so you don't have to repeat the defaults.
-
- The tangle and weave processors of this implementation are able to
- process traditional K&R C, ANSI C, and C++. Note that ctangle always
- uses a default extension .c for its output file; this may not be
- appropriate for some C++ compilers, but you can work around this
- by supplying a third argument in the command line (see cwebman).
-
-
- After the announcement of CWEB 3.3 [p11a] there have been questions:
- ``What's different in your CWEB system in respect to the original system?
- Why should programmers use your's instead of the Levy/Knuth distribution?''
-
- So here are some words about the `special features':
-
- - The complete source code is capable of being recompiled with SAS/C for
- AmigaOS, with Borland C/C++ 3.1 for MS/DOS, and with CC, C89, and GCC
- for UNIX without the need for further changes. The Amiga and MS/DOS
- versions of all three system programs are compiled and linked in C++
- mode. For compilation in ANSI-C mode rename the .cxx files to their
- .c form, and modify the EXTENSION field in the makefile accordingly.
-
- - The `+l' option with its argument `X' causes CWEAVE to prepend `X' to
- `cwebmac.tex' in the first line of the output file. `X' may be any
- string of characters (case dependent and possibly empty), e.g., if you
- called CWEAVE with the option `+ldansk', the danish macro file
- `danskcwebmac.tex' would be included instead of `cwebmac.tex'. The
- macro file `Xcwebmac.tex' itself contains some modifications to the
- original `cwebmac.tex' file as described in the documentation. There
- are macro packages `dcwebmac.tex' by Andreas Scherer for German users,
- `icwebmac.tex' by Giuseppe Ghib≥ for Italian users, and lately even
- `fcwebmac.tex' by Denis B. Roegel for French CWEB programmers. These
- macro files translate all captions used by the CWEAVE processor into
- the respective languages and also include support for special
- characters like umlauts (diacritics) and some other frequently used
- specials according to ISO Latin-1, IBM PC International Codepage 850,
- Macintosh 8-bit font table and HP Roman 8. Similar packages for other
- languages can easily be added to this scheme. To date there are no
- conflicting languages, so single-character strings are used.
-
- - There are TeX macro files `ecma94.sty', `hp8.sty', `mac8.sty', and
- `pc850.sty' for support of extended code tables. These have been
- set up to work as `packages' for LaTeX2e too. Also included are the
- files `ecma94.w', `hp8.w', `mac8.w', and `pc850.w' with appropriate
- transliteration tables. The option `+a' of former versions of the
- AMIGA installation is now replaced by the file `amiga_types.w', which
- can be `@i'ncluded in the source files where needed.
-
- - Two AREXX scripts for use with the CygnusEd Professional Editor were
- added to this package, one for CTANGLE and CWEAVE, localized with the
- help of language catalogs under AmigaOS version 2.1 or 3.0, the other
- for use with the SAS/C 6.x compiler in connection with CED V3.5.
-
- - Both CTANGLE and CWEAVE are fully localized with the help of language
- catalogs and the `locale.library' of AmigaOS 2.1/3.0. Default is (of
- course) English; catalogs for German and Italian are provided and
- other language catalogs can easily be added. #include files with the
- English, German, and Italian strings are provided for non-localized
- operating systems.
-
- - An algorithm for recursive `@i'nclude file search was adapted from the
- TeX and METAFONT implementation. The current directory is searched
- first, then the contents of the (possibly empty) environment variable
- CWEBINPUTS, and then the (system dependent) internal defaults given in
- the compile-time constants CWEBINPUTS in the respective makefiles.
-
- - The `-o' option was added in connection with `-i' by Carsten Steger.
-
- - Five additional CWEB example programs are included as examples for the
- portability between PASCAL-WEB and C-CWEB and for the usage of the C++
- features of version 3.1. The fifth example program is a simple text
- converter for files with extended character codes of ISO-Latin-1,
- PC-850, MAC 8-bit font, and HP 8-bit font.
-
- - All three system programs support the `version' information command.
-
- - All three system programs are compiled in the NEAR data segment and
- can be made `resident'.
-
- - The `+m' option enables ARexx communication between CWEB and the SAS/C
- message browser SCMSG. Any warnings or error messages are transferred
- to its list window. The behaviour of this feature can be controlled
- via the external environment variable SCMSGOPT, which may be set to
- any legal option string as described in the documentation of the SAS/C
- development system by SAS Institute.
-
- - The output files are only written when there are significant changes
- to their contents, i.e., when a CWEB source creates multiple output
- files, only those modules effected by changes will be recompiled in
- the `make' process. This mechanism was taken from Preston Briggs's
- NUWEB program, to whom credit is due.
-
- Patch level [p9b] of this implementation introduced localization to other
- languages than English. All output strings of ctangle and cweave were
- replaced by variable references to an array AppStrings in cweb.h (also new),
- set to the English defaults at startup time. This works for all systems and
- compilers in a compatible way. However, version 2.1 of the AMIGA operating
- system introduced the use of language catalogs, thus enabling programs and
- applications to be inherently multilingual without recompilation. To
- activate this feature, you only have to install AmigaOS 2.1/3.0. Catalogs
- for various natural languages are already present at the correct place
- (./bin/catalogs/), so ctangle and cweave will greet you in any of these
- languages, if you start them from their home directory ./bin and if your
- system default language is supported. If you want to use CTANGLE, CWEAVE,
- and WMERGE as resident programs, you have to move the language catalogs to
- the appropriate directories of the LOCALE: drawer. Catalog translations for
- other languages can easily be installed. The author of this distribution
- would be grateful to receive catalog translations for other languages for
- inclusion in future versions.
-
- Patch level [p9d] of this implementation introduced dynamic memory allocation
- for all internal arrays except for `flags[256]'. By this method both ctangle
- and cweave can be compiled in the `NEAR' data segment, so on the AMIGA they
- can be made `resident', i.e., they can reside in RAM and don't have to be
- loaded from disk after the first time. Patch level [p9d] also introduced an
- ARexx communication facility between CWEB (i.e., ctangle and cweave) and the
- `Message Browser' SCMSG, included in the SAS/C 6.X development system. If
- you run CWEB with the `+m' option, any error messages will be displayed in
- the window of SCMSG. The default setting is `off'. You can control the
- behaviour of this feature by setting the environment variable SCMSGOPT to
- a string with any legal command line options for SCMSG as described in the
- documentation provided with the compiler package by SAS Institute. If the
- environment variable is not set, the default behaviour of SCMSG will be used.
- Patch level [p9d] was evaluated on July 1, 1994, by Andreas Scherer and
- Burkhard Schmitt of Bayreuth University with CC and GCC on a HP Apollo
- workstation and a Sun 4 workstation and a SGI workstation, and on July 2,
- with Borland C/C++ version 3.1 on a MS/DOS machine without any problems.
-
- Patch level [p10] was released to the AmiNet and the Comprehensive TeX
- Archive Network (CTAN) in August 1994. At least one user had problems
- installing the MS/DOS version.
-
- Patch level [p11] was released to the AmiNet and the Comprehensive TeX
- Archive Network (CTAN) in December 1994. Only two days later another
- update of CWEB 3.3 was released in Stanford, so a new patch level [p11a]
- had to be created and released in mid-December 1994. In January 1995 the
- successful installation on at least two more systems has been notified.
- The first is MS/DOS with GCC, the second OS/2 in genuine mode, both working
- with Makefile.unix (and the obvious modifications).
-
-
- SPECIAL NOTES for installation of CWEBBIN (Version 3.4 [p13]) with
- Borland C++ 3.1 for MS/DOS in form of projects:
-
- In order to create decent binaries for the three system programs CTANGLE,
- CWEAVE, and WMERGE the suggestions from the change files provided for
- MS/DOS with the original distribution had to be followed. `max_toks'
- in CTANGLE had to be reduced from the obviously horribly high value
- 270,000 to 170,000 (AMIGA and UNIX still use the original value).
- This is done internally, so you don't have to care about changing anything.
- 170,000 still is conveniently high enough to process for example CWEAVE.W.
- No other values have been changed, and the resulting binaries (after
- applying TDSTRIP) worked on several PC. Even CWEAVE worked on two out
- of three IBM 286, but could not be started due to "! Memory allocation
- failure" on the third. There shouldn't be a problem nowadays in respect
- to 386, 486, and PENTII.
-
- Set up three projects for CTANGLE, CWEAVE, and WMERGE. The first two
- consist of (COMMON.CXX + CTANGLE.CXX) and (COMMON.CXX + CWEAVE.CXX, you
- will have to successfully install CTANGLE first and then "MAKE CWEAVE.CXX",
- i.e., ``ctangle cweave cweav-p13 cweave.cxx''), the last works from the
- single source WMERGE.CXX.
-
- Select the HUGE memory model from the options menue. (WMERGE may be
- compiled in the SMALL memory model.)
-
- Add "./bin/catalogs" to the search path for header files. ("cweb.h" is
- located there.)
-
- Add DEFINE's _DEV_NULL="NUL", CWEBINPUTS=".\\cwebinputs", SEPARATORS="\;\\:".
- (Be careful with the protective backslashes! The first is for BCC, the
- second for C.)
-
- Borland C++ 3.1 seems to be totally braindead when acting on CWEB, so:
-
- DON'T SELECT ANY OPTIMIZATION.
- DON'T SET THE PROCESSOR TO MORE THAN XT.
- DON'T USE THE MATH COPROCESSOR.
-
- After creating the binaries you can strip the debug info by applying
- TDSTRIP to CTANGLE.EXE, CWEAVE.EXE, and WMERGE.EXE.
-
- Good luck.
-
- The binaries supplied with this distribution were created according to the
- rules just described and were successfully used on 80486/33, 80386/20, and
- 80286/12 processors.
-