summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/cwebdir/comm-mac.ch
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2021-04-16 12:49:28 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2021-04-16 12:49:28 +0000
commit611b225a456949639e46d4ccb7d458761c3dc818 (patch)
tree23077732a961b5fcd9c25530d594a0ac2cd6fb1a /Build/source/texk/web2c/cwebdir/comm-mac.ch
parent296df34bd02be9e066be5af0f934d493916b2c67 (diff)
[CWEB] New release 4.3.
This release introduces new features to CWEB 4: * Former option '-t' is now called '-c'. - New option '-t' for CWEAVE when dealing with 'typename' in C++ templates. - New option '-k' for CTANGLE to keep '-separators in numeric literals. * Support for "variadic macros" along "variadic functions". * @d is printed similar to #define (and vice versa): - '#' is no longer printed in boldface. - Spacing is similar in most cases. * Support for extended C99/C++ numeric literals: - hexadecimal, octal, and -- new! -- binary numbers. - NOTE: 'cwebmac.tex 4.3' is NOT compatible with CWEAVE 4.2 and older and vice versa. * Long parameter lists in ANSI function definitions are indented similar to old-style function parameters. - Option '-i' works similar for old-style and modern function headers. * Additional C99/C++ keywords -- from 'alignas' to 'thread_local' -- are supported internally. * '@i'nclude file 'iso_types.w' for numeric types (in addition to 'c++lib.w'). * Countless code modifications, including some corrections amd improvements. Thanks and cudos to Github user "@texdraft" for numerous contributions to this feature release! git-svn-id: svn://tug.org/texlive/trunk@58884 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/cwebdir/comm-mac.ch')
-rw-r--r--Build/source/texk/web2c/cwebdir/comm-mac.ch49
1 files changed, 21 insertions, 28 deletions
diff --git a/Build/source/texk/web2c/cwebdir/comm-mac.ch b/Build/source/texk/web2c/cwebdir/comm-mac.ch
index aa3a77fed4e..895566d43d3 100644
--- a/Build/source/texk/web2c/cwebdir/comm-mac.ch
+++ b/Build/source/texk/web2c/cwebdir/comm-mac.ch
@@ -4,27 +4,24 @@ No changes to CTANGLE or CWEAVE are needed.
(Contributed 13 Oct 2000 by AndPio@aol.com; slightly edited by Don Knuth)
@x in limbo, change the title page document to specify Mac version
- \centerline{(Version 4.2)}
+ \centerline{(Version 4.3)}
@y
- \centerline{(Version 4.2 for MacOS)}
+ \centerline{(Version 4.3 for MacOS)}
@z
-@x sections 23/24: Make input_ln accept \n, \r, \n\r, or \r\n as line endings
+@x section 23: Make input_ln accept \n, \r, \n\r, or \r\n as line endings
@ In the unlikely event that your standard I/O library does not
support |feof|, |getc|, and |ungetc| you may have to change things here.
@^system dependencies@>
-@<Predecl...@>=
-static boolean input_ln(FILE *);@/
-
-@ @c
-static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns |false| */
-FILE *fp@t\2\2@>) /* what file to read from */
+@c
+static boolean input_ln( /* copies a line into |buffer| or returns |false| */
+FILE *fp) /* what file to read from */
{
- register int c=EOF; /* character read; initialized so some compilers won't complain */
- register char *k; /* where next character goes */
- if (feof(fp)) return false; /* we have hit end-of-file */
- limit = k = buffer; /* beginning of buffer */
+ register int c=EOF; /* character read; initialized so some compilers won't complain */
+ register char *k; /* where next character goes */
+ if (feof(fp)) return false; /* we have hit end-of-file */
+ limit = k = buffer; /* beginning of buffer */
while (k<=buffer_end && (c=getc(fp)) != EOF && c!='\n')
if ((*(k++) = c) != ' ') limit = k;
if (k>buffer_end)
@@ -32,7 +29,7 @@ FILE *fp@t\2\2@>) /* what file to read from */
ungetc(c,fp); loc=buffer; err_print("! Input line too long");
@.Input line too long@>
}
- if (c==EOF && limit==buffer) return false; /* there was nothing after
+ if (c==EOF && limit==buffer) return false; /* there was nothing after
the last newline */
return true;
}
@@ -45,17 +42,14 @@ line endings, so that \.{CWEB} will works with ASCII files stored in
\UNIX/, {\mc DOS} or {\mc MAC} format.
@^system dependencies@>
-@<Predecl...@>=
-static boolean input_ln(FILE *);@/
-
-@ @c
-static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns |false| */
-FILE *fp@t\2\2@>) /* what file to read from */
+@c
+static boolean input_ln( /* copies a line into |buffer| or returns |false| */
+FILE *fp) /* what file to read from */
{
register int c=EOF; /* character read; initialized so some compilers won't complain */
- register char *k; /* where next character goes */
- if (feof(fp)) return false; /* we have hit end-of-file */
- limit = k = buffer; /* beginning of buffer */
+ register char *k; /* where next character goes */
+ if (feof(fp)) return false; /* we have hit end-of-file */
+ limit = k = buffer; /* beginning of buffer */
while (true) {
c = getc(fp);
if (c==EOF) return limit!=buffer; /* |false|, if there was nothing after
@@ -77,7 +71,7 @@ FILE *fp@t\2\2@>) /* what file to read from */
}
@z
-@x section 28, simply return if no change file was specified
+@x section 27, simply return if no change file was specified
change_limit=change_buffer; /* this value is used if the change file ends */
@<Skip over comment lines in the change file; |return| if end of file@>@;
@y
@@ -121,20 +115,19 @@ An omitted change file argument means that |"/dev/null"| should be used,
@y
An omitted change file argument means that no change file should be used,
@z
-
-@x section 76, make change file name empty when it is unspecified
+@x section 75, make change file name empty when it is unspecified
strcpy(change_file_name,"/dev/null");
@y
change_file_name[0]='\0'; /* empty string */
@z
-@x section 76, use the Metrowerks |ccommand| to access command lines
+@x section 75, use the Metrowerks |ccommand| to access command lines
while (--argc > 0) {
@y
argc = ccommand (&argv); /* use Mac interface to command line */
@^system dependencies@>
while (--argc > 0) {
@z
-@x section 76, use the path separator constant
+@x section 75, use the path separator constant
else if (*s=='/') dot_pos=NULL,name_pos=++s;
@y
else if (*s==PATH_SEP) dot_pos=NULL,name_pos=++s;