diff options
Diffstat (limited to 'Build/source/texk/web2c/cwebdir/ctwill-w2c.ch')
-rw-r--r-- | Build/source/texk/web2c/cwebdir/ctwill-w2c.ch | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch b/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch index 4a20bd73f49..0849495bd85 100644 --- a/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch @@ -331,7 +331,7 @@ boolean ms_mode; /* are we outputting to |ministring_buf|? */ @ @<Set init...@>= max_temp_meaning_ptr=temp_meaning_stack; title_code_ptr=title_code; -ms_mode=0; +ms_mode=false; @ Here's a routine that converts a program title from the buffer into an internal number for the |prog_no| field of a meaning. @@ -383,7 +383,7 @@ new_meaning( name_pointer p) { struct perm_meaning *q=p-name_dir+cur_meaning; - ms_mode=0; + ms_mode=false; if (q->stamp!=section_count) { if (*(ministring_ptr-1)==' ') ministring_ptr--; if (ministring_ptr>=&ministring_buf[max_tex_chars]) @@ -513,9 +513,9 @@ part of all meanings. @z @x - if (loc>limit && get_line()==0) return; + if (loc>limit && get_line()==false) return; @y - if (loc>limit && get_line()==0) return; + if (loc>limit && get_line()==false) return; if (loc==buffer && strncmp(buffer,"\\def\\title{",11)==0) { loc=buffer+10; title_lookup(); /* this program's title will be code zero */ @@ -569,8 +569,8 @@ skip_TeX(void) case underline: xref_switch=def_flag; continue; @y case underline: xref_switch=def_flag; continue; - case temp_meaning: temp_switch=1-temp_switch; continue; - case right_start: right_start_switch=1; continue; + case temp_meaning: temp_switch=true-temp_switch; continue; + case right_start: right_start_switch=true; continue; @z @x @@ -692,7 +692,7 @@ skip_restricted(void) @z @x - skip_limbo(); change_exists=0; + skip_limbo(); change_exists=false; @y skip_limbo(); @<Give a default title to the program, if necessary@>; @@ -712,12 +712,12 @@ skip_restricted(void) @x changed_section[section_count]=changing; - /* it will become 1 if any line changes */ + /* it will become |true| if any line changes */ @y @z @x - if (changed_section[section_count]) change_exists=1; + if (changed_section[section_count]) change_exists=true; @y @z @@ -831,7 +831,7 @@ the section is changed, we output `\.{\\*}' just after the number. @x default: err_print("! Double @@ should be used in limbo"); @y - case right_start: right_start_switch=1; break; + case right_start: right_start_switch=true; break; default: err_print(_("! Double @@ should be used in limbo")); @z @@ -964,7 +964,7 @@ static token_pointer tok_loc; /* where the first identifier appears */ @ \.{CTWILL} needs the following procedure, which appends tokens of a translated text until coming to |tok_loc|, then suppresses text that may appear between parentheses or brackets. The calling routine should set -|ident_seen=0| first. (This is admittedly tricky.) +|ident_seen=false| first. (This is admittedly tricky.) @c boolean ident_seen; static boolean app_supp( @@ -982,15 +982,15 @@ static boolean app_supp( } for (j=*p;j<*(p+1);j++) { if (*j<tok_flag) { - if (*j==inserted) return 0; - if (j==tok_loc) ident_seen=1; + if (*j==inserted) return false; + if (j==tok_loc) ident_seen=true; else app(*j); } else if (*j>=inner_tok_flag) confusion(_("inner")); else if (app_supp(*j-tok_flag+tok_start)) goto catch14;; } - return 0; -catch14: if (*(*(p+1)-1)=='9') return 1; /* production 14 was used */ - else return 0; + return false; +catch14: if (*(*(p+1)-1)=='9') return true; /* production 14 was used */ + else return false; } @ The trickiest part of \.{CTWILL} is the procedure |make_ministring(l)|, @@ -1016,10 +1016,10 @@ make_ministring( /* now we're ready for the mathness that follows (I think) */ /* (without the mod 4 times 5, comments posed a problem) */ /* (namely in cases like |int a(b,c)| followed by comment) */ - ident_seen=0;@+app_supp((pp+l)->trans); + ident_seen=false;@+app_supp((pp+l)->trans); null_scrap.mathness=10; big_app1(&null_scrap); /* now |cur_mathness==no_math| */ - ms_mode=1; ministring_ptr=ministring_buf; + ms_mode=true; ministring_ptr=ministring_buf; if (l==2) *ministring_ptr++='='; make_output(); /* translate the current text into a ministring */ tok_ptr=*(--text_ptr); /* delete that text */ @@ -1041,8 +1041,8 @@ if (l==0) { app(int_loc+res_flag); app(' '); cur_mathness=no_math; } else { q=(pp+l-1)->trans; ast_count=0; - non_ast_seen=0; - while (1) { + non_ast_seen=false; + while (true) { if (*(q+1)==*q+1) { r=q;@+break; /* e.g. \&{struct}; we're doing production 45 or 46 */ } @@ -1051,7 +1051,7 @@ else { if ((t=*(*(q+1)-2))>=tok_flag && **(t-tok_flag+tok_start)=='*') { /* production 34 */ if (!non_ast_seen) ast_count++; /* count immediately preceding |*|'s */ - } else non_ast_seen=1; + } else non_ast_seen=true; if (*(*q+1)==' ' && *(q+1)==*q+2) break; /* production 27 */ if (*(*q+1)=='{' && *(*q+2)=='}' && *(*q+3)=='$' && *(*q+4)==' '@| && *(q+1)==*q+5) break; /* production 27 in disguise */ @@ -1397,11 +1397,11 @@ reset_input(); if (show_progress) fputs(_("\nWriting the output file..."),stdout @z @x -section_count=0; format_visible=1; copy_limbo(); +section_count=0; format_visible=true; copy_limbo(); @y -temp_switch=0; temp_meaning_ptr=temp_meaning_stack; +temp_switch=false; temp_meaning_ptr=temp_meaning_stack; @<Read the \.{.aux} file, if present; then open it for output@>; -section_count=0; format_visible=1; right_start_switch=0; copy_limbo(); +section_count=0; format_visible=true; right_start_switch=false; copy_limbo(); @z @x @@ -1439,19 +1439,19 @@ if ((aux_file=fopen(aux_file_name,"wb"))==NULL) @z @x -boolean group_found=0; /* has a starred section occurred? */ +boolean group_found=false; /* has a starred section occurred? */ @ @<Translate the current section@>= { section_count++; @y -boolean group_found=0; /* has a starred section occurred? */ +boolean group_found=false; /* has a starred section occurred? */ boolean right_start_switch; /* has `\.{@@r}' occurred recently? */ boolean temp_switch; /* has `\.{@@\%}' occurred recently? */ @ @d usage_sentinel (struct perm_meaning *)1 @<Translate the current section@>= { section_count++; - temp_switch=0; temp_meaning_ptr=temp_meaning_stack; + temp_switch=false; temp_meaning_ptr=temp_meaning_stack; top_usage=usage_sentinel; @z @@ -1460,7 +1460,7 @@ if (*(loc-1)!='*') out_str("\\M"); @y if (*(loc-1)!='*') { if (right_start_switch) { - out_str("\\shortpage\n"); right_start_switch=0; + out_str("\\shortpage\n"); right_start_switch=false; @.\\shortpage@> } out_str("\\M"); @@ -1472,7 +1472,7 @@ if (*(loc-1)!='*') { @y @.\\N@> if (right_start_switch) { - out_str("N"); right_start_switch=0; + out_str("N"); right_start_switch=false; @.\\NN@> } @z @@ -1481,15 +1481,15 @@ if (*(loc-1)!='*') { out_str("{");out_section(section_count); out_str("}"); @y out_str("{");out_section(section_count); out_str("}"); -flush_buffer(out_ptr,0,0); +flush_buffer(out_ptr,false,false); @z @x case '@@': out('@@'); break; @y case '@@': out('@@'); break; - case temp_meaning: temp_switch=1-temp_switch; break; - case right_start: right_start_switch=1; break; + case temp_meaning: temp_switch=true-temp_switch; break; + case right_start: right_start_switch=true; break; @z @x @@ -1512,14 +1512,14 @@ flush_buffer(out_ptr,0,0); @z @x - outer_parse(); finish_C(format_visible); format_visible=1; - doing_format=0; + outer_parse(); finish_C(format_visible); format_visible=true; + doing_format=false; } @y outer_parse(); if (is_macro) @<Make ministring for a new macro@>; - finish_C(format_visible); format_visible=1; - doing_format=0; + finish_C(format_visible); format_visible=true; + doing_format=false; } @ @<Glob...@>= @@ -1532,7 +1532,7 @@ name_pointer id_being_defined; /* the definee */ @<Start a macro...@>= { @y @<Start a macro...@>= { - is_macro=1; + is_macro=true; @z @x @@ -1544,12 +1544,12 @@ name_pointer id_being_defined; /* the definee */ @x @.Improper macro definition@> else { - app('$'); app_cur_id(0); + app('$'); app_cur_id(false); @y @.Improper macro definition@> else { id_being_defined=id_lookup(id_first,id_loc,normal); - app('$'); app_cur_id(0); + app('$'); app_cur_id(false); def_diff=*loc-'('; @z @@ -1561,11 +1561,11 @@ name_pointer id_being_defined; /* the definee */ @x @ @<Start a format...@>= { - doing_format=1; + doing_format=true; @y @ @<Make ministring for a new macro@>= { - ms_mode=1; ministring_ptr=ministring_buf; + ms_mode=true; ministring_ptr=ministring_buf; *ministring_ptr++='='; if (def_diff) { /* parameterless */ scrap_pointer s=scrap_ptr; @@ -1581,8 +1581,8 @@ name_pointer id_being_defined; /* the definee */ } @ @<Start a format...@>= { - doing_format=1; - is_macro=0; + doing_format=true; + is_macro=false; @z @x @@ -1606,14 +1606,14 @@ name_pointer id_being_defined; /* the definee */ @x out_str("\\fi"); finish_line(); @.\\fi@> -flush_buffer(out_buf,0,0); /* insert a blank line, it looks nice */ +flush_buffer(out_buf,false,false); /* insert a blank line, it looks nice */ @y finish_line(); out_str("\\mini"); finish_line(); @.\\mini@> @<Output information about usage of id's defined in other sections@>; out_str("}\\FI"); finish_line(); @.\\FI@> -flush_buffer(out_buf,0,0); /* insert a blank line, it looks nice */ +flush_buffer(out_buf,false,false); /* insert a blank line, it looks nice */ @ The following code is performed for each identifier parsed during a section. Variable |top_usage| is always nonzero; it has the sentinel @@ -1696,7 +1696,7 @@ lowcase: out_str("\\\\"); default: out_str("\\&"); @.\\\&@> } -out_name(cur_name,1); +out_name(cur_name,true); name_done: @z @@ -1813,7 +1813,7 @@ rest of the job. @z @x - case roman: not_an_identifier: out_name(cur_name,0); goto name_done; + case roman: not_an_identifier: out_name(cur_name,false); goto name_done; case custom: {char *j; out_str("$\\"); for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++) out(*j=='_'? 'x': *j=='$'? 'X': *j); @@ -1821,15 +1821,15 @@ rest of the job. goto name_done; } @y -not_an_identifier: out_name(cur_name,0); goto name_done; +not_an_identifier: out_name(cur_name,false); goto name_done; case custom: out_str("\\$"); break; @.\\\$@> @z @x -out_name(cur_name,1); +out_name(cur_name,true); @y -if (proofing) out_name(cur_name,1); +if (proofing) out_name(cur_name,true); else { out('{'); {char *j; |