Discussion:
[tex-k] [CWEB] Cleanup release 3.64ae
Andreas Scherer
2016-02-01 10:51:41 UTC
Permalink
Dear all,

a few days ago, DEK released 'CWEB 3.64ae' and directed support questions to
your address. Following is a list of issues I'd like to see addressed:

* Do not pack backup files, ctangled sources, and executables in the archive;
this concerns the 'examples/' subdirectory.

* The expanded 'ctangle.c' somehow doesn't match its origin 'ctangle.w';
it uses '<stdlib.h>' instead of predeclaring 'string' functions and it is
unclear, where this (manual?) change comes from.

* 'wordtest.w' should define 'PHICLONE' as 'unsigned' by appending a 'u'
to the numeric value to avoid a compiler warning.

A multi-decade project to improve and extend CWEB can be found at
https://github.com/ascherer/cwebbin – it contains far too many details to list
here, but at least on Linux (both RPM and DEB) it makes use of the unmodified
source drop 'cweb-3.64ae.tar.gz' and applies its stuff on top.

Cheers,
Andreas Scherer
Andreas Scherer
2016-02-01 14:22:54 UTC
Permalink
Post by Andreas Scherer
* The expanded 'ctangle.c' somehow doesn't match its origin 'ctangle.w';
it uses '<stdlib.h>' instead of predeclaring 'string' functions
Here, I am obviously refering to <string.h>, whose usage stands in
contradiction to the associated commentary in 'ctangle.w'.
Karl Berry
2016-02-01 22:58:23 UTC
Permalink
Hi Andreas - thanks for the report. I'll tell DEK. No idea how he will
want to proceed.

* The expanded 'ctangle.c' somehow doesn't match its origin 'ctangle.w';

Looks to me like the web2c change file was applied.

https://github.com/ascherer/cwebbin

Would you like to write an article for TUGboat about it?

k
Andreas Scherer
2016-02-02 10:34:18 UTC
Permalink
Hi Karl,
Post by Andreas Scherer
* The expanded 'ctangle.c' somehow doesn't match its origin 'ctangle.w';
Looks to me like the web2c change file was applied.
I doubt that. The obvious changes – adding "#include <string.h>" and removing
the "prototypes" – were _not_ done via a change file, because else "ctangle.c"
would contain some "#line" statements refering to "ctangle.ch" (or similar).
Post by Andreas Scherer
https://github.com/ascherer/cwebbin
Would you like to write an article for TUGboat about it?
Interesting idea. That would probably go under the header "software
archaelogy" and not under "literate programming" or "software & tools". :o)

Greetings,
Andreas
Andreas Scherer
2016-02-06 15:32:57 UTC
Permalink
adding "#include <string.h>" and removing the "prototypes"
This curious manipulation of 'ctangle.c' is just the tip of the iceberg.
('common.c' still has '(signed) int' for 'strlen()'s return type, so inside
'ctangle' two _different_ return types are present.)

When I take a closer look at the differences between CWEB 3.64ad (2006-10-24)
and CWEB 3.64ae (2016-01-20)
(https://github.com/ascherer/cweb/commit/3293426537ae9f416f80653f98d0ff355d87989a),
I find that 'examples/wmerge.w' changes the return type of 'strlen()' from
'int' to the more appropriate 'size_t' (while still sticking to 'copy-from-
instead-of-including-the-system-header'), while 'examples/extex.w' adds
'#include <string.h>' (and still misses '#include <stdlib.h>' for 'extern void
exit();').

All this mismatching string handling has been straightened by Klaus Guntermann
no later than July 2nd, 1994, in the patches to CWEB 3.1
(https://github.com/ascherer/cweb/tree/cweb-3.1) and should IMHO finally be
cleared in CWEB proper.

Andreas Scherer
Karl Berry
2016-02-06 23:46:35 UTC
Permalink
should IMHO finally be cleared in CWEB proper.

I don't disagree, but Knuth has not replied to the latest batch of
cweb things yet. It would be pointless to send him more until he does.
I will do so when and if the time comes.

All this mismatching string handling has been straightened by Klaus
Guntermann no later than July 2nd, 1994, in the patches to CWEB 3.1
(https://github.com/ascherer/cweb/tree/cweb-3.1)

Can you please send me the exact patches to the cweb source files that
you think Knuth should apply?

Thanks,
Karl
Andreas Scherer
2016-02-07 11:54:10 UTC
Permalink
Post by Karl Berry
Can you please send me the exact patches to the cweb source files that
you think Knuth should apply?
I prepared a new branch for my 'cweb' project

https://github.com/ascherer/cweb/tree/cweb-for-the-21st-century

and my fondest hope is that the two commits changing the proper source files
would be applied. (The two other commits simply show the resulting C sources
after extracting the .w files with ctangle. I was not able to compile 'oemacs'
because of deprecated system features.)

Attached is a tarball containing four separate patch files. Only '0001' and
'0003' should be applied, '0002' and '0004' result automatically.

Thanks,
Andreas

Loading...