diff options
Diffstat (limited to 'Build/source/texk/web2c/cwebdir/cweav-w2c.ch')
-rw-r--r-- | Build/source/texk/web2c/cwebdir/cweav-w2c.ch | 82 |
1 files changed, 44 insertions, 38 deletions
diff --git a/Build/source/texk/web2c/cwebdir/cweav-w2c.ch b/Build/source/texk/web2c/cwebdir/cweav-w2c.ch index 26c6c6699f8..3f63105075a 100644 --- a/Build/source/texk/web2c/cwebdir/cweav-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/cweav-w2c.ch @@ -17,15 +17,15 @@ @q Please send comments, suggestions, etc. to tex-k@@tug.org. @> @x -\def\title{CWEAVE (Version 4.3)} +\def\title{CWEAVE (Version 4.2)} @y -\def\title{CWEAVE (Version 4.3 [\TeX~Live])} +\def\title{CWEAVE (Version 4.2 [\TeX~Live])} @z @x - \centerline{(Version 4.3)} + \centerline{(Version 4.2)} @y - \centerline{(Version 4.3 [\TeX~Live])} + \centerline{(Version 4.2 [\TeX~Live])} @z @x @@ -41,9 +41,9 @@ @z @x -@d banner "This is CWEAVE (Version 4.3)" +@d banner "This is CWEAVE (Version 4.2)" @y -@d banner "This is CWEAVE, Version 4.3" +@d banner "This is CWEAVE, Version 4.2" /* will be extended by the \TeX~Live |versionstring| */ @z @@ -252,14 +252,14 @@ tex_puts("cwebma"); @c static void -print_text( /* prints a token list for debugging; not used in |main| */ +print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */ @y @d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */ @c #if 0 -@t\4\4@>static void -print_text( /* prints a token list for debugging; not used in |main| */ +static void +print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */ @z @x @@ -281,13 +281,16 @@ static void print_text(text_pointer p); @x @<Cases for |exp|@>= if (cat1==lbrace || cat1==int_like || cat1==decl) { - make_underlined(pp); big_app(dindent); big_app1(pp); + make_underlined(pp); big_app1(pp); big_app(indent); app(indent); reduce(pp,1,fn_decl,0,1); } @y @<Cases for |exp|@>= if(cat1==lbrace || cat1==int_like || cat1==decl) { - make_underlined(pp); if (indent_param_decl) big_app(dindent); big_app1(pp); + make_underlined(pp); big_app1(pp); + if (indent_param_decl) { + big_app(indent); app(indent); + } reduce(pp,1,fn_decl,0,1); } @z @@ -298,7 +301,8 @@ if (cat1==comma) { big_app2(pp); big_app(' '); reduce(pp,2,decl_head,-1,33); } else if (cat1==ubinop) { - big_app1_insert(pp,'{'); big_app('}'); reduce(pp,2,decl_head,-1,34); + big_app1(pp); big_app('{'); big_app1(pp+1); big_app('}'); + reduce(pp,2,decl_head,-1,34); } else if (cat1==exp && cat2!=lpar && cat2!=exp && cat2!=cast) { make_underlined(pp+1); squash(pp,2,decl_head,-1,35); @@ -308,7 +312,7 @@ else if ((cat1==binop||cat1==colon) && cat2==exp && (cat3==comma || squash(pp,3,decl_head,-1,36); else if (cat1==cast) squash(pp,2,decl_head,-1,37); else if (cat1==lbrace || cat1==int_like || cat1==decl) { - big_app(dindent); big_app1(pp); reduce(pp,1,fn_decl,0,38); + big_app1(pp); big_app(indent); app(indent); reduce(pp,1,fn_decl,0,38); } else if (cat1==semi) squash(pp,2,decl,-1,39); @y @@ -317,7 +321,7 @@ if (cat1==comma) { big_app2(pp); big_app(' '); reduce(pp,2,decl_head,-1,33); } else if (cat1==ubinop) { - big_app1_insert(pp,'{'); big_app('}'); + big_app1(pp); big_app('{'); big_app1(pp+1); big_app('}'); reduce(pp,2,decl_head,-1,34); } else if (cat1==exp && cat2!=lpar && cat2!=exp && cat2!=cast) { @@ -328,7 +332,10 @@ else if ((cat1==binop||cat1==colon) && cat2==exp && (cat3==comma || squash(pp,3,decl_head,-1,36); else if (cat1==cast) squash(pp,2,decl_head,-1,37); else if (cat1==lbrace || cat1==int_like || cat1==decl) { - if (indent_param_decl) big_app(dindent); big_app1(pp); + big_app1(pp); + if (indent_param_decl) { + big_app(indent); app(indent); + } reduce(pp,1,fn_decl,0,38); } else if (cat1==semi) squash(pp,2,decl,-1,39); @@ -337,26 +344,31 @@ else if (cat1==semi) squash(pp,2,decl,-1,39); @x @ @<Cases for |decl|@>= if (cat1==decl) { - big_app1_insert(pp,force); reduce(pp,2,decl,-1,40); + big_app1(pp); big_app(force); big_app1(pp+1); + reduce(pp,2,decl,-1,40); } else if (cat1==stmt || cat1==function) { - big_app1_insert(pp,big_force); reduce(pp,2,cat1,-1,41); + big_app1(pp); big_app(big_force); + big_app1(pp+1); reduce(pp,2,cat1,-1,41); } @y @ @<Cases for |decl|@>= if (cat1==decl) { - big_app1_insert(pp,force); reduce(pp,2,decl,-1,40); + big_app1(pp); big_app(force); big_app1(pp+1); + reduce(pp,2,decl,-1,40); } else if (cat1==stmt || cat1==function) { - big_app1_insert(pp,order_decl_stmt ? big_force : force); - reduce(pp,2,cat1,-1,41); + big_app1(pp); + if(order_decl_stmt) big_app(big_force); + else big_app(force); + big_app1(pp+1); reduce(pp,2,cat1,-1,41); } @z @x @ @<Cases for |fn_decl|@>= if (cat1==decl) { - big_app1_insert(pp,force); reduce(pp,2,fn_decl,0,51); + big_app1(pp); big_app(force); big_app1(pp+1); reduce(pp,2,fn_decl,0,51); } else if (cat1==stmt) { big_app1(pp); app(outdent); app(outdent); big_app(force); @@ -365,25 +377,19 @@ else if (cat1==stmt) { @y @ @<Cases for |fn_decl|@>= if (cat1==decl) { - big_app1_insert(pp,force); reduce(pp,2,fn_decl,0,51); + big_app1(pp); big_app(force); big_app1(pp+1); reduce(pp,2,fn_decl,0,51); } else if (cat1==stmt) { big_app1(pp); if (indent_param_decl) { app(outdent); app(outdent); } - big_app(force); big_app1(pp+1); reduce(pp,2,function,-1,52); + big_app(force); + big_app1(pp+1); reduce(pp,2,function,-1,52); } @z @x - big_app1_insert(pp,dindent); reduce(pp,2,fn_decl,0,73); -@y - big_app1(pp); if (indent_param_decl) big_app(dindent); - big_app1(pp+1); reduce(pp,2,fn_decl,0,73); -@z - -@x overflow("token"); @y overflow(_("token")); @@ -614,17 +620,17 @@ finish_line(); fclose(active_file); active_file=NULL; @x @** Index. @y -@** Extensions to {\tentex CWEB}. The following sections introduce new or -improved features that have been created by numerous contributors over the -course of a quarter century. +@** Extensions to \.{CWEB}. The following sections introduce new or improved +features that have been created by numerous contributors over the course of a +quarter century. Care has been taken to keep the original section numbering intact, so this new -material should nicely integrate with the original ``\&{272.~Index}.'' +material should nicely integrate with the original ``\&{263.~Index}.'' @* Formatting alternatives. -\.{CWEAVE} indents declarations after old-style function definitions and -long parameter lists of modern function definitions. -With the \.{-i} option they will come out flush left. +\.{CWEAVE} indents declarations after old-style function definitions. +With the \.{-i} option they will come out flush left. You won't see +any difference if you use ANSI-style function definitions. @d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */ @@ -658,7 +664,7 @@ if((tex_file=fopen(tex_file_name,"r"))!=NULL) { fatal(_("! Cannot open output file "),check_file_name); @.Cannot open output file@> - if (check_for_change) @<Compare the temporary output...@>@; + if (temporary_output) @<Compare the temporary output...@>@; fclose(tex_file); tex_file=NULL; fclose(check_file); check_file=NULL; |