Archive-Date: Thu, 01 Oct 1992 07:49:37 CDT Date: Thu, 1 Oct 92 10:54:21 +0100 From: jmu@ccr.jussieu.fr (Johannes MULLER p73413) Reply-To: LitProg@SHSU.edu Message-ID: <9210010954.AA18952@ccr-p6.ccr.jussieu.fr> To: litprog@shsu.edu Subject: debug macro in FWEB? From (Pascal-)WEB I was used to define two macros "debug" and "gubed" which enclosed optional code for debugging purposes. I tried the following within FWEB to produce similar results: @m debug @( @m gubed @) @f debug do @f gubed while FTANGLE worked fine, but FWEAVEs output was somewhat strange. In some cases the use of these macros changed the outfit of the whole WEB-part, also before the first appearance of "debug" in that part. ("part" is that, what is formerly called "module", could we say "WEB-module" to limit the scope of this predefined name?) It appears that the output is fine, if I preceed and terminate debug code with newlines, but I would like a more elegant solution. Especially the "retroaction" of these macros troubles me. Perhaps there is also a better idea to the @f, the original formatted to "begin" and "end", which is doubtless better adapted than "do" and "while". I forgot: my overall language is C++. I had also a look at FWEB's source, there this sort of debugging is done with #if(DEBUG) ... #endif. Ok, but I prefer a (working) solution of the above type. Thanks for any suggestions Johannes Mueller ================================================================================ Archive-Date: Thu, 01 Oct 1992 14:45:36 CDT Date: Thu, 01 Oct 1992 14:20:59 CDT From: "George D. Greenwade" Reply-To: LitProg@SHSU.edu To: litprog@SHSU.edu Message-ID: <0096171D.2E14BD80.14154@SHSU.edu> Subject: CWEB-to-Pascal??? This came up on another list altogether. >>> This program should be written in >>> eithher Pascal WEB or C WEB for maximum ease of porting. I can see that using Pascal WEB gives ease of porting, since it is processable both by native mode Tangle/Pascal and via Web-to-C, but I cannot see how the use of `C' WEB gives such portability; surely there does not exist a `CWEB-to-Pascal' utility? (Also, I assume it would require implementation-specific change files to be written in C-WEB rather than standard WEB). Does anyone know of such a beast?? Regards, George %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% George D. Greenwade, Ph.D. Bitnet: BED_GDG@SHSU Department of Economics and Business Analysis THEnet: SHSU::BED_GDG College of Business Administration Voice: (409) 294-1266 P. O. Box 2118 FAX: (409) 294-3612 Sam Houston State University Internet: bed_gdg@SHSU.edu Huntsville, TX 77341 bed_gdg%SHSU.decnet@relay.the.net %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ================================================================================ Archive-Date: Fri, 02 Oct 1992 01:16:46 CDT Subject: Re: FWEB for C++ with LaTeX... To: LitProg@SHSU.edu Date: Thu, 1 Oct 92 23:14:48 Message-ID: <9210012314.AA45869@cambria.columbus.oh.us> From: bjones@cambria.columbus.oh.us (Bill Jones) Reply-To: LitProg@SHSU.edu According to Tero Laakkonen: > >i wrote to this mailing list about a week ago asking if anyone knew of a >web that can handle C++. > > >i got several replies;everyone recommended using FWEB. > >i managed to compile FWB on my 80386-with-linux096c-and-gcc222, but i >have some more questions: I have been trying to compile FWEB under linux 0.97.6 and the latest gcc. I have been sucessful and fweave will run without core dumps (at least I haven't had one in my tests on the web sources included with FWEB) but it will not produce an index of modules or an index of variables and function calls. If your version does, please let me know what you've done. Better yet, mail me a copy of your system header file and I'll go back to testing. > >thanks, >tero. Thanks also, Bill -- ---------------------------------------------------------------------------- Bill Jones bjones@cambria.columbus.oh.us ---------------------------------------------------------------------------- ================================================================================ Archive-Date: Fri, 02 Oct 1992 23:28:53 CDT Date: Thu, 1 Oct 1992 23:35:39 -0500 From: Cameron Smith Reply-To: LitProg@SHSU.edu Message-ID: <199210020435.AA18183@spica.math.uiuc.edu> To: litprog@shsu.edu Subject: Fix needed for CWEB sample program Makefile I'm running a not-quite-curent TeX (the banner line says it's "CTeX, NeXT Version 3.1a"), so I wasn't aware that the current version (under UNIX, at least) has been modified to allow the TeXing of files that don't have extensions. Apparently the current TeX, given the command "tex foo", will process a file "foo" if one exists, and only if there is no "foo" will it proceed to look for "foo.tex". You have to explicitly say "tex foo.tex" if you want the new version to look only at "foo.tex". Nelson Beebe has kindly alerted me to the fact that this new behavior breaks the Makefile I'm distributing with my KR-CW-SAMPLE sample CWEB program: the suffix rules for .tex.dvi and .w.dvi cause the command "tex calc" rather than "tex calc.tex" to be executed, so if the executable file "calc" has been built, TeX tries to process it. The best fix I've thought of is to modify the Makefile as follows: change the rules for building DVI files, which currently are .tex.dvi: $(TEX) $* .w.dvi: $(CWEAVE) $* $(TEX) $* to use these actions instead: .tex.dvi: $(TEX) $< .w.dvi: make $*.tex make $*.dvi (Note that simply changing "$*" to "$<" works in the .tex.dvi rule, but in the .w.dvi rule it would cause TeX to process "calc.w".) In a day or two I shall send off to the archives a new version of the sample program incorporating this change. If you've tried the program and you have comments about its use of C, CWEB, make, TeX, or the English language -- in short, if you have any suggestions for any kind of improvement -- and you've been putting off sending them to me, now would be an excellent time to do so. Thanks to Nelson Beebe for drawing my attention to this, and thanks to the many other users of the program who've sent in helpful comments! The time you've taken to help improve this sample program is appreciated by me and also by everyone else who's using it to learn CWEB! --Cameron Smith cameron@symcom.math.uiuc.edu ================================================================================ Archive-Date: Fri, 02 Oct 1992 23:33:01 CDT From: Joachim Schrod Reply-To: LitProg@SHSU.edu Message-ID: <9210021239.AA06392@hp5.iti.informatik.th-darmstadt.de> Subject: Re: Problems with | in text... To: LitProg@SHSU.edu Date: Fri, 2 Oct 92 13:39:27 MEZ dan@minster.york.ac.uk wrote: > > Does anyone have a ready solution to the problem of using | in text > 'bits' (not modules ... happy?). :-) :-) :-) > I am trying to use xypic with CWEB and > when I try to produce a stopped arrow with \rto|>\stop TeX naturally > complains. I suppose I could look through the macros (web) and fix it, > but I would rather have a ready made solution. Since nobody answered I'll give it a try. Does TeX complain? I think CWEAVE will complain. Actually, I tried it, CWEAVE told me: ! Missing '|' after C text. (l. 3) That's because the vertical bar is a special character to CWEAVE, not to TeX. In fact, TeX will not see the bar anymore, CWEAVE will have it removed. So, it's unnecessary to look through the web macros -- you cannot fix it there. I see three possible solutions: 1) Write your graph into another file and \input this file. (This is the ``When in doubt, use brute force'' approach. [cf. the Turing Award Lecture of Ritchie] ) 2) Change xypic so that another character is used instead of the vertical bar. 3) Use the CWEB construction which is exemplified below: @ some text. bla bla. And now we'll show you the great picture: |@t\vbox{% }@>| @c foo() ... Ugly, isn't it? Vertical bars can occur in a TeX string, ie, in stuff between `@t' and `@>'. But a ``TeX string should be in C text only'' (this is the error message of CWEAVE ;-); so we put the TeX string in vertical bars itself which tag restricted C text (for CWEAVE). Since a TeX string is enclosed in an \hbox in the woven output, we'll add another \vbox. (I assume that xypic stuff must be typeset in vertical mode. If it can be typeset in restricted horizontal mode one can discard the \vbox.) Enjoy. -- Joachim =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Joachim Schrod Email: schrod@iti.informatik.th-darmstadt.de Computer Science Department Technical University of Darmstadt, Germany ================================================================================ Archive-Date: Mon, 05 Oct 1992 20:25:30 CDT Subject: Problems with FWEB v1.23a To: LITPROG@SHSU.edu Date: Sun, 4 Oct 92 2:11:36 CC: krommes@princeton.edu Message-ID: <9210040211.AA01604@cambria.columbus.oh.us> From: bjones@cambria.columbus.oh.us (Bill Jones) Reply-To: LitProg@SHSU.edu I have been trying to compile FWEB v1.23a under linux 0.97.6 and the latest GCC (version 2.2.2d7 for those who care). After getting my config.h, defaults.mk, and setup.mk files edited correctly, I ran the make bootstrap. ftangle compiled without incident except for warning that memcpy, memcmp, strcmp, strcpy, and strlen were being multiply declared. The resulting ftangle was called by the makefile to create fweave. The following appeared: ftangle /usr/users/bjones/src/fweb/web/fweave -uANSI -mANSI -mGCC -=/usr/users/bjones/src/fweb/web/fweave.c This is FTANGLE [ANSI/Linux version 1.23a (April 13, 1992)]. Reading /usr/users/bjones/src/fweb/web/fweave.web... !!! I'M CONFUSED; this shouldn't happen. PLEASE REPORT THIS. At ini_reserved: Language should already be defined here. CPU = 0.6 sec.; REAL = 3.0 sec. CPU/REAL = 20.7%. [FTANGLE: That was a fatal error, my friend.] make: *** [/usr/users/bjones/src/fweb/web/fweave.c] Error 1 I have gone through and recompiled using a number of different flags to GCC (-ansi always, -traditional sometimes, -m486 occasionally). I have turned on the debugging and turned off the optimization but still no luck. Anyone have any pointers on what I can try next? I am in the process of trying to compile version 1.22 but am getting numerous parse errors (something that I also got when trying to compile it on a DECStation) and since the only extant versions of 1.22 listed on archie are in Europe, I don't want to keep trying to get new copies unless necessary. Thanks, Bill -- ---------------------------------------------------------------------------- Bill Jones bjones@cambria.columbus.oh.us ---------------------------------------------------------------------------- ================================================================================ Archive-Date: Mon, 05 Oct 1992 20:40:24 CDT Date: Sun, 4 Oct 1992 11:16:01 -0700 (PDT) From: BEEZER@UPS.EDU (Rob Beezer) Reply-To: LitProg@SHSU.edu Message-ID: <921004111601.1828@UPS.EDU> Subject: Summary: WEB for the Macintosh To: litprog@shsu.edu A while back I inquired about finding a version of the original WEB (for Pascal source) that would run on the Macintosh. With courteous assistance and direction from Jean-Claude Darchen (darchen@cicb.fr), I have found such a thing (and what appears to be a version of WEB for C on the Mac). For future reference (and ultimately an FAQ?) here are the results of my search: ftp site: ftp.uni-stuttgart.de [129.69.1.12] directory: /soft/tex/machines/mac/directtex 512 Sep 22 10:40 ./ 1024 Sep 23 10:19 ../ 30798 Apr 7 1992 DiskCopy.hqx 1012746 Sep 21 14:20 DiskImg1.hqx 1065629 Sep 21 15:16 DiskImg2.hqx 929284 Sep 21 16:07 DiskImg3.hqx 947224 Sep 21 16:45 DiskImg4.hqx 913067 Sep 21 17:18 DiskImg5.hqx 942914 Sep 21 17:39 DiskImg6.hqx 1048740 Sep 21 17:57 DiskImg7.hqx 1859 Sep 21 18:09 ReadMe 706129 Sep 21 18:09 TeXShell.hqx DirectTeX is what appears to be a *very* complete version of TeX and Metafont which runs under MPW (Macintosh Programmers Workbench). The DiskCopy program is needed to copy the 7 image files (after they have been unpacked) to diskettes. Then installation can take place from the diskettes. When running the installation, it is necessary to do a custom installation and to ask for "additional tools" in order to get tangle and weave - they are *not* part of the "easy install." I did a complete installation (very time-consuming), and then installed the extra tools - you might be able to install just the tools using only disks 1 and 3. The TeXShell appears to be a customized version of MPW to work with DirectTeX. It (or MPW) is needed to use tangle and weave. I have only tested tangle on the standard demo program, knights.web, and it seems to work fine. There are also tools called ctangle and cweave, but I have not experimented with them. DirectTeX also lives at ftp.uni-kl.de [131.246.9.95] in /pub/mac/tex/directtex. ............................................................................ : Robert Beezer : Internet: beezer@ups.edu : : Dept. of Mathematics and CS : Voice: 206.756.3564 : : University of Puget Sound : Fax: 206.756.3500 : : Tacoma, WA 98416 : : ............................................................................ ================================================================================ Archive-Date: Thu, 15 Oct 1992 20:10:39 CDT From: Robert Raschke Message-ID: <199210141423.AA24496@mail.cs.tu-berlin.de> Subject: WEB with LaTeX ? To: litprog@shsu.edu Date: Wed, 14 Oct 92 15:23:48 MET Reply-To: LitProg@SHSU.edu Hello, We're trying to implement a WEB for a new language using Spidery WEB. The resulting WEB should work with LaTeX. But Spidery WEB only works with TeX. Does anyone have expierience adapting WEB to LaTeX ? Any hints on how to rewrite the WEB macros for LaTeX are welcome. thanks, rob. -- TU-Berlin, Germany E-Mail : Robert.Raschke@cs.tu-berlin.de ================================================================================ Archive-Date: Sun, 18 Oct 1992 02:34:31 CDT Date: 13 Oct 1992 21:25:02 -0700 (PDT) From: Don Hosek Reply-To: LitProg@SHSU.edu Subject: Re: CWEB-to-Pascal??? To: LitProg@SHSU.edu Message-ID: <01GPWXI3IIRS8WW2F9@HMCVAX.CLAREMONT.EDU> It's not likely to be possible since C provides certain useful features which are not generally available in Pascal (e.g., pointers to functions). On the other hand, we are at a stage where I don't think that there's a platform which doesn't have C widely available--it's as close to a universal programming language as we can get. The one concern might be Ansi C vs. K&R C since the former is not yet universal, but an Ansi to K&R filter should be relatively easy to write. -dh ================================================================================ Archive-Date: Mon, 19 Oct 1992 09:47:07 CDT From: dk-b@minster.york.ac.uk Reply-To: LitProg@SHSU.edu Date: Sun, 18 Oct 92 21:19:33 Message-ID: Subject: appologies To: LitProg@shsu.edu I appologise for this message. It shouldn't be posted to the group, I know, but I couldn't do anything else. My old username dan@minster.york.ac.uk is not existant any more, so any mail sent to it was probably bounced. I was away for a few weeks, and noone told me about my old a/c being removed so... All the LitProg info was lost (well... dumped on a tape). I would like to be re-named to dk-b@minster.york.ac.uk This was a public anouncment. Ta. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Daniel Kustrin, Computer Science, University of York, England ~ ~ dk-b@minster.york.ac.uk ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================================================ Archive-Date: Mon, 19 Oct 1992 22:54:29 CDT From: dk-b@minster.york.ac.uk Reply-To: LitProg@SHSU.edu Date: Mon, 19 Oct 92 11:31:38 Message-ID: Subject: Re: Problems with | in text... To: LitProg@SHSU.edu, LitProg@SHSU.edu > I see three possible solutions: > > 1) Write your graph into another file and \input this file. > (This is the ``When in doubt, use brute force'' approach. > [cf. the Turing Award Lecture of Ritchie] ) Good idea... > > 2) Change xypic so that another character is used instead of the > vertical bar. Rather not :) > > 3) Use the CWEB construction which is exemplified below: > > @ some text. bla bla. > > And now we'll show you the great picture: > > |@t\vbox{% > > }@>| > > @c > foo() ... > > Ugly, isn't it? yes. > I solved it by defining new commands in limbo area. that felt as the best solution. Ta. (I like the brute force approach.) > > -- > Joachim > Dan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Daniel Kustrin, Computer Science, University of York, England ~ ~ dk-b@minster.york.ac.uk ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================================================ Archive-Date: Mon, 19 Oct 1992 22:55:06 CDT From: dk-b@minster.york.ac.uk Reply-To: LitProg@SHSU.edu Date: Mon, 19 Oct 92 11:31:38 Message-ID: Subject: Re: Problems with | in text... To: LitProg@SHSU.edu, LitProg@SHSU.edu > I see three possible solutions: > > 1) Write your graph into another file and \input this file. > (This is the ``When in doubt, use brute force'' approach. > [cf. the Turing Award Lecture of Ritchie] ) Good idea... > > 2) Change xypic so that another character is used instead of the > vertical bar. Rather not :) > > 3) Use the CWEB construction which is exemplified below: > > @ some text. bla bla. > > And now we'll show you the great picture: > > |@t\vbox{% > > }@>| > > @c > foo() ... > > Ugly, isn't it? yes. > I solved it by defining new commands in limbo area. that felt as the best solution. Ta. (I like the brute force approach.) > > -- > Joachim > Dan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Daniel Kustrin, Computer Science, University of York, England ~ ~ dk-b@minster.york.ac.uk ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================================================ Archive-Date: Tue, 20 Oct 1992 15:41:41 CDT From: bright@SCTC.COM (David A. Bright) Reply-To: LitProg@SHSU.edu Message-ID: <9210201337.AA23268@SCTC.COM> Subject: Re: Problems with | in text... To: LitProg@SHSU.edu Date: Tue, 20 Oct 92 8:37:11 CDT >dan@minster.york.ac.uk wrote: >> >> Does anyone have a ready solution to the problem of using | in text >> 'bits' (not modules ... happy?). > For text in the "TeX" part of a "bit," I fixed this by modifying CWEB to accept @| (math break) and output a vertical bar. In other words, I added the marked (with ! in col 1) lines in the following bit: ----- @ In the \TeX\ part of a module, we simply copy the source text, except that index entries are not copied and \cee\ text within \pb\ is translated. @= do { next_control=copy_TeX(); switch (next_control) { case '|': init_stack; output_C(); break; case '@@': out('@@'); break; ! case math_break: /* In \TeX\ mode, allow the |math_break| to ! appear and use it to produce a vertical bar in ! the \TeX\ section. */ ! out('|'); ! break; case TeX_string: case xref_roman: case xref_wildcard: case xref_typewriter: case module_name: loc-=2; next_control=get_next(); /* skip to \.{@@>} */ if (next_control==TeX_string) err_print("! TeX string should be in C text only"); break; @.TeX string should be...@> case thin_space: case line_break: case big_line_break: case no_line_break: case join: case pseudo_semi: err_print("! You can't do that in TeX text"); break; @.You can't do that...@> } } while (next_control Reply-To: LitProg@SHSU.edu Message-ID: <9210201621.AA02791@naoma.uniandes.edu.co> To: LitProg%shsu%ANDESCOL.BITNET@SHSU.edu Subject: Subscribe SUB Martin Soto