summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/ctangleboot.cin
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2021-07-14 09:23:02 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2021-07-14 09:23:02 +0000
commit274b2b3e8a9a283ddf07c2e4b7c4fc39cb889a2e (patch)
tree8f0b9090b8e5691b7bc2969a3dd6f6f1b8411776 /Build/source/texk/web2c/ctangleboot.cin
parentfe3a5e65c56c42bd8598b2a8c110ec250eb5214d (diff)
[CWEB] New release 4.5.
This is a service release for CWEB 4.0. * Upstream CWEB 4.5 was reviewed with the 'splint' utility. This resulted in lots of cast changes and a few code improvements. * All 'length' variables are retyped to 'size_t'. * <stdbool.h> is replaced by <kpathsea/simpletypes.h> to keep CWEB compatible with antique systems that still support TeX Live. git-svn-id: svn://tug.org/texlive/trunk@59926 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/ctangleboot.cin')
-rw-r--r--Build/source/texk/web2c/ctangleboot.cin474
1 files changed, 240 insertions, 234 deletions
diff --git a/Build/source/texk/web2c/ctangleboot.cin b/Build/source/texk/web2c/ctangleboot.cin
index 02eef23e706..bdd9262516b 100644
--- a/Build/source/texk/web2c/ctangleboot.cin
+++ b/Build/source/texk/web2c/ctangleboot.cin
@@ -15,7 +15,7 @@
#endif
#include <ctype.h>
-#include <stdbool.h>
+#include <kpathsea/simpletypes.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
@@ -25,7 +25,7 @@
/*:4*/
#line 67 "cwebdir/ctangle.w"
-#define banner "This is CTANGLE, Version 4.4" \
+#define banner "This is CTANGLE, Version 4.5" \
\
#define _(s) gettext(s) \
@@ -48,12 +48,12 @@
#define compress(c) if(loc++<=limit) return c \
-#define xisalpha(c) (isalpha((eight_bits) (c) ) &&((eight_bits) (c) <0200) )
-#define xisdigit(c) (isdigit((eight_bits) (c) ) &&((eight_bits) (c) <0200) )
-#define xisspace(c) (isspace((eight_bits) (c) ) &&((eight_bits) (c) <0200) )
-#define xislower(c) (islower((eight_bits) (c) ) &&((eight_bits) (c) <0200) )
-#define xisupper(c) (isupper((eight_bits) (c) ) &&((eight_bits) (c) <0200) )
-#define xisxdigit(c) (isxdigit((eight_bits) (c) ) &&((eight_bits) (c) <0200) )
+#define xisalpha(c) (isalpha((int) (c) ) &&((eight_bits) (c) <0200) )
+#define xisdigit(c) (isdigit((int) (c) ) &&((eight_bits) (c) <0200) )
+#define xisspace(c) (isspace((int) (c) ) &&((eight_bits) (c) <0200) )
+#define xislower(c) (islower((int) (c) ) &&((eight_bits) (c) <0200) )
+#define xisupper(c) (isupper((int) (c) ) &&((eight_bits) (c) <0200) )
+#define xisxdigit(c) (isxdigit((int) (c) ) &&((eight_bits) (c) <0200) )
#define isxalpha(c) ((c) =='_'||(c) =='$') \
#define ishigh(c) ((eight_bits) (c) > 0177) \
@@ -135,7 +135,7 @@
#define max_files 256
#define C_printf(c,a) fprintf(C_file,c,a)
-#define C_putc(c) putc(c,C_file) \
+#define C_putc(c) putc((int) (c) ,C_file) \
#define translit_length 10 \
@@ -150,11 +150,14 @@
#define section_name 0311
#define new_section 0312 \
-#define app_repl(c) {if(tok_ptr==tok_mem_end) overflow(_("token") ) ;*(tok_ptr++) = c;} \
+#define app_repl(c) { \
+if(tok_ptr==tok_mem_end) overflow(_("token") ) ; \
+else*(tok_ptr++) = (eight_bits) c; \
+} \
-#define store_id(a) a= id_lookup(id_first,id_loc,0) -name_dir; \
+#define store_id(a) a= id_lookup(id_first,id_loc,'\0') -name_dir; \
app_repl((a/0400) +0200) ; \
-app_repl(a%0400) ; \
+app_repl(a%0400) \
#define keep_digit_separators flags['k'] \
@@ -164,9 +167,8 @@ app_repl(a%0400) ; \
#line 68 "cwebdir/ctangle.w"
/*3:*/
-#line 33 "cwebdir/comm-w2c.h"
+#line 34 "cwebdir/comm-w2c.h"
-typedef bool boolean;
typedef uint8_t eight_bits;
typedef uint16_t sixteen_bits;
typedef enum{
@@ -269,7 +271,7 @@ extern FILE*active_file;
extern FILE*check_file;
/*:15*//*115:*/
-#line 481 "cwebdir/ctang-w2c.ch"
+#line 487 "cwebdir/ctang-w2c.ch"
extern char cb_banner[];
@@ -331,13 +333,13 @@ static stack_pointer stack_ptr;
static int cur_val;
/*:37*//*42:*/
-#line 458 "cwebdir/ctangle.w"
+#line 459 "cwebdir/ctangle.w"
static eight_bits out_state;
static boolean protect;
/*:42*//*45:*/
-#line 489 "cwebdir/ctangle.w"
+#line 490 "cwebdir/ctangle.w"
static name_pointer output_files[max_files];
static name_pointer*cur_out_file,*end_output_files,*an_output_file;
@@ -345,33 +347,33 @@ static char cur_section_name_char;
static char output_file_name[longest_name+1];
/*:45*//*52:*/
-#line 589 "cwebdir/ctangle.w"
+#line 590 "cwebdir/ctangle.w"
static boolean output_defs_seen= false;
/*:52*//*57:*/
-#line 701 "cwebdir/ctangle.w"
+#line 703 "cwebdir/ctangle.w"
static char translit[128][translit_length];
/*:57*//*62:*/
-#line 777 "cwebdir/ctangle.w"
+#line 779 "cwebdir/ctangle.w"
static eight_bits ccode[256];
/*:62*//*66:*/
-#line 837 "cwebdir/ctangle.w"
+#line 839 "cwebdir/ctangle.w"
static boolean comment_continues= false;
/*:66*//*68:*/
-#line 874 "cwebdir/ctangle.w"
+#line 876 "cwebdir/ctangle.w"
static name_pointer cur_section_name;
static boolean no_where;
/*:68*//*82:*/
-#line 1188 "cwebdir/ctangle.w"
+#line 1193 "cwebdir/ctangle.w"
static text_pointer cur_text;
static eight_bits next_control;
@@ -390,7 +392,7 @@ extern void reset_input(void);
#line 184 "cwebdir/comm-w2c.h"
extern boolean names_match(name_pointer,const char*,size_t,eight_bits);
-extern name_pointer id_lookup(const char*,const char*,char);
+extern name_pointer id_lookup(const char*,const char*,eight_bits);
extern name_pointer section_lookup(char*,char*,boolean);
extern void init_node(name_pointer);
@@ -425,47 +427,47 @@ static void push_level(name_pointer);
static void pop_level(boolean);
/*:35*//*39:*/
-#line 403 "cwebdir/ctangle.w"
+#line 404 "cwebdir/ctangle.w"
static void get_output(void);
/*:39*//*44:*/
-#line 479 "cwebdir/ctangle.w"
+#line 480 "cwebdir/ctangle.w"
static void flush_buffer(void);
/*:44*//*49:*/
-#line 556 "cwebdir/ctangle.w"
+#line 557 "cwebdir/ctangle.w"
static void phase_two(void);
/*:49*//*53:*/
-#line 592 "cwebdir/ctangle.w"
+#line 593 "cwebdir/ctangle.w"
static void output_defs(void);
static void out_char(eight_bits);
/*:53*//*65:*/
-#line 817 "cwebdir/ctangle.w"
+#line 819 "cwebdir/ctangle.w"
static eight_bits skip_ahead(void);
static boolean skip_comment(boolean);
/*:65*//*70:*/
-#line 924 "cwebdir/ctangle.w"
+#line 926 "cwebdir/ctangle.w"
static eight_bits get_next(void);
/*:70*//*84:*/
-#line 1214 "cwebdir/ctangle.w"
+#line 1219 "cwebdir/ctangle.w"
static void scan_repl(eight_bits);
/*:84*//*91:*/
-#line 1397 "cwebdir/ctangle.w"
+#line 1404 "cwebdir/ctangle.w"
static void scan_section(void);
/*:91*//*99:*/
-#line 1474 "cwebdir/ctangle.w"
+#line 1481 "cwebdir/ctangle.w"
static void phase_one(void);
/*:99*//*101:*/
-#line 1507 "cwebdir/ctangle.w"
+#line 1514 "cwebdir/ctangle.w"
static void skip_limbo(void);
/*:101*/
@@ -498,12 +500,12 @@ init_node(name_dir);
last_unnamed= text_info;text_info->text_link= macro;
/*:27*//*46:*/
-#line 499 "cwebdir/ctangle.w"
+#line 500 "cwebdir/ctangle.w"
cur_out_file= end_output_files= output_files+max_files;
/*:46*//*58:*/
-#line 704 "cwebdir/ctangle.w"
+#line 706 "cwebdir/ctangle.w"
{
int i;
@@ -511,14 +513,14 @@ for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned int)(128+i));
}
/*:58*//*63:*/
-#line 780 "cwebdir/ctangle.w"
+#line 782 "cwebdir/ctangle.w"
{
int c;
for(c= 0;c<256;c++)ccode[c]= ignore;
}
ccode[' ']= ccode['\t']= ccode['\n']= ccode['\v']= ccode['\r']= ccode['\f']
= ccode['*']= new_section;
-ccode['@']= '@';ccode['=']= string;
+ccode['@']= (eight_bits)'@';ccode['=']= string;
ccode['d']= ccode['D']= definition;
ccode['f']= ccode['F']= ccode['s']= ccode['S']= format_code;
ccode['c']= ccode['C']= ccode['p']= ccode['P']= begin_C;
@@ -531,11 +533,11 @@ ccode['<']= ccode['(']= section_name;
ccode['\'']= ord;
/*:63*//*78:*/
-#line 1112 "cwebdir/ctangle.w"
+#line 1114 "cwebdir/ctangle.w"
section_text[0]= ' ';
/*:78*//*116:*/
-#line 484 "cwebdir/ctang-w2c.ch"
+#line 490 "cwebdir/ctang-w2c.ch"
strncpy(cb_banner,banner,max_banner-1);
@@ -645,10 +647,10 @@ else if(a<0200)out_char(a);
else{
a= (a-0200)*0400+*cur_byte++;
switch(a/024000){
-case 0:cur_val= a;out_char(identifier);break;
+case 0:cur_val= (int)a;out_char(identifier);break;
case 1:if(a==output_defs_flag)output_defs();
else/*40:*/
-#line 408 "cwebdir/ctangle.w"
+#line 409 "cwebdir/ctangle.w"
{
a-= 024000;
@@ -656,7 +658,7 @@ if((a+name_dir)->equiv!=(void*)text_info)push_level(a+name_dir);
else if(a!=0){
#line 85 "cwebdir/ctang-w2c.ch"
fputs(_("\n! Not present: <"),stdout);
-#line 414 "cwebdir/ctangle.w"
+#line 415 "cwebdir/ctangle.w"
print_section_name(a+name_dir);err_print(">");
}
@@ -667,14 +669,15 @@ goto restart;
#line 395 "cwebdir/ctangle.w"
break;
-default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val;
+default:cur_val= (int)a-050000;
+if(cur_val> 0)cur_section= (sixteen_bits)cur_val;
out_char(section_number);
}
}
}
/*:38*//*43:*/
-#line 466 "cwebdir/ctangle.w"
+#line 467 "cwebdir/ctangle.w"
static void
flush_buffer(void)
@@ -689,7 +692,7 @@ cur_line++;
}
/*:43*//*48:*/
-#line 518 "cwebdir/ctangle.w"
+#line 519 "cwebdir/ctangle.w"
static void
phase_two(void){
@@ -703,21 +706,21 @@ stack_ptr= stack+1;cur_name= name_dir;cur_repl= text_info->text_link+text_info;
cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start;cur_section= 0;
/*:33*/
-#line 524 "cwebdir/ctangle.w"
+#line 525 "cwebdir/ctangle.w"
/*51:*/
-#line 585 "cwebdir/ctangle.w"
+#line 586 "cwebdir/ctangle.w"
if(!output_defs_seen)
output_defs();
/*:51*/
-#line 525 "cwebdir/ctangle.w"
+#line 526 "cwebdir/ctangle.w"
if(text_info->text_link==macro&&cur_out_file==end_output_files){
#line 97 "cwebdir/ctang-w2c.ch"
fputs(_("\n! No program text was specified."),stdout);mark_harmless;
-#line 528 "cwebdir/ctangle.w"
+#line 529 "cwebdir/ctangle.w"
}
else{
@@ -725,7 +728,7 @@ if(cur_out_file==end_output_files){
if(show_progress){
#line 103 "cwebdir/ctang-w2c.ch"
printf(_("\nWriting the output file (%s):"),C_file_name);
-#line 534 "cwebdir/ctangle.w"
+#line 535 "cwebdir/ctangle.w"
update_terminal;
}
}
@@ -733,7 +736,7 @@ else{
if(show_progress){
#line 109 "cwebdir/ctang-w2c.ch"
fputs(_("\nWriting the output files:"),stdout);
-#line 540 "cwebdir/ctangle.w"
+#line 541 "cwebdir/ctangle.w"
printf(" (%s)",C_file_name);
update_terminal;
@@ -747,11 +750,11 @@ writeloop:/*50:*/
fclose(C_file);C_file= NULL;
/*105:*/
-#line 364 "cwebdir/ctang-w2c.ch"
+#line 370 "cwebdir/ctang-w2c.ch"
if((C_file= fopen(C_file_name,"r"))!=NULL){
/*106:*/
-#line 371 "cwebdir/ctang-w2c.ch"
+#line 377 "cwebdir/ctang-w2c.ch"
boolean comparison= false;
@@ -760,7 +763,7 @@ fatal(_("! Cannot open output file "),check_file_name);
if(check_for_change)/*107:*/
-#line 385 "cwebdir/ctang-w2c.ch"
+#line 391 "cwebdir/ctang-w2c.ch"
do{
char x[BUFSIZ],y[BUFSIZ];
@@ -770,17 +773,17 @@ comparison= (x_size==y_size)&&!memcmp(x,y,x_size);
}while(comparison&&!feof(C_file)&&!feof(check_file));
/*:107*/
-#line 378 "cwebdir/ctang-w2c.ch"
+#line 384 "cwebdir/ctang-w2c.ch"
fclose(C_file);C_file= NULL;
fclose(check_file);check_file= NULL;
/*:106*/
-#line 366 "cwebdir/ctang-w2c.ch"
+#line 372 "cwebdir/ctang-w2c.ch"
/*108:*/
-#line 396 "cwebdir/ctang-w2c.ch"
+#line 402 "cwebdir/ctang-w2c.ch"
if(comparison)
remove(check_file_name);
@@ -790,7 +793,7 @@ rename(check_file_name,C_file_name);
}
/*:108*/
-#line 367 "cwebdir/ctang-w2c.ch"
+#line 373 "cwebdir/ctang-w2c.ch"
}else
rename(check_file_name,C_file_name);
@@ -817,14 +820,14 @@ cur_end= (cur_repl+1)->tok_start;
while(stack_ptr> stack)get_output();
flush_buffer();fclose(C_file);C_file= NULL;
/*109:*/
-#line 409 "cwebdir/ctang-w2c.ch"
+#line 415 "cwebdir/ctang-w2c.ch"
if(0==strcmp("/dev/stdout",output_file_name))
/*111:*/
-#line 436 "cwebdir/ctang-w2c.ch"
+#line 442 "cwebdir/ctang-w2c.ch"
{
/*114:*/
-#line 467 "cwebdir/ctang-w2c.ch"
+#line 473 "cwebdir/ctang-w2c.ch"
char in_buf[BUFSIZ+1];
int in_size;
@@ -834,7 +837,7 @@ fatal(_("! Cannot open output file "),check_file_name);
/*:114*/
-#line 437 "cwebdir/ctang-w2c.ch"
+#line 443 "cwebdir/ctang-w2c.ch"
do{
in_size= fread(in_buf,sizeof(char),BUFSIZ,check_file);
@@ -843,7 +846,7 @@ fprintf(stdout,"%s",in_buf);
}while(!feof(check_file));
fclose(check_file);check_file= NULL;
/*110:*/
-#line 426 "cwebdir/ctang-w2c.ch"
+#line 432 "cwebdir/ctang-w2c.ch"
if(comparison)
remove(check_file_name);
@@ -853,19 +856,19 @@ rename(check_file_name,output_file_name);
}
/*:110*/
-#line 444 "cwebdir/ctang-w2c.ch"
+#line 450 "cwebdir/ctang-w2c.ch"
}
/*:111*/
-#line 411 "cwebdir/ctang-w2c.ch"
+#line 417 "cwebdir/ctang-w2c.ch"
else if(0==strcmp("/dev/stderr",output_file_name))
/*112:*/
-#line 449 "cwebdir/ctang-w2c.ch"
+#line 455 "cwebdir/ctang-w2c.ch"
{
/*114:*/
-#line 467 "cwebdir/ctang-w2c.ch"
+#line 473 "cwebdir/ctang-w2c.ch"
char in_buf[BUFSIZ+1];
int in_size;
@@ -875,7 +878,7 @@ fatal(_("! Cannot open output file "),check_file_name);
/*:114*/
-#line 450 "cwebdir/ctang-w2c.ch"
+#line 456 "cwebdir/ctang-w2c.ch"
do{
in_size= fread(in_buf,sizeof(char),BUFSIZ,check_file);
@@ -884,7 +887,7 @@ fprintf(stderr,"%s",in_buf);
}while(!feof(check_file));
fclose(check_file);check_file= NULL;
/*110:*/
-#line 426 "cwebdir/ctang-w2c.ch"
+#line 432 "cwebdir/ctang-w2c.ch"
if(comparison)
remove(check_file_name);
@@ -894,20 +897,20 @@ rename(check_file_name,output_file_name);
}
/*:110*/
-#line 457 "cwebdir/ctang-w2c.ch"
+#line 463 "cwebdir/ctang-w2c.ch"
}
/*:112*/
-#line 413 "cwebdir/ctang-w2c.ch"
+#line 419 "cwebdir/ctang-w2c.ch"
else if(0==strcmp("/dev/null",output_file_name))
/*113:*/
-#line 462 "cwebdir/ctang-w2c.ch"
+#line 468 "cwebdir/ctang-w2c.ch"
{
boolean comparison= true;
/*110:*/
-#line 426 "cwebdir/ctang-w2c.ch"
+#line 432 "cwebdir/ctang-w2c.ch"
if(comparison)
remove(check_file_name);
@@ -917,17 +920,17 @@ rename(check_file_name,output_file_name);
}
/*:110*/
-#line 464 "cwebdir/ctang-w2c.ch"
+#line 470 "cwebdir/ctang-w2c.ch"
}
/*:113*/
-#line 415 "cwebdir/ctang-w2c.ch"
+#line 421 "cwebdir/ctang-w2c.ch"
else{
if((C_file= fopen(output_file_name,"r"))!=NULL){
/*106:*/
-#line 371 "cwebdir/ctang-w2c.ch"
+#line 377 "cwebdir/ctang-w2c.ch"
boolean comparison= false;
@@ -936,7 +939,7 @@ fatal(_("! Cannot open output file "),check_file_name);
if(check_for_change)/*107:*/
-#line 385 "cwebdir/ctang-w2c.ch"
+#line 391 "cwebdir/ctang-w2c.ch"
do{
char x[BUFSIZ],y[BUFSIZ];
@@ -946,17 +949,17 @@ comparison= (x_size==y_size)&&!memcmp(x,y,x_size);
}while(comparison&&!feof(C_file)&&!feof(check_file));
/*:107*/
-#line 378 "cwebdir/ctang-w2c.ch"
+#line 384 "cwebdir/ctang-w2c.ch"
fclose(C_file);C_file= NULL;
fclose(check_file);check_file= NULL;
/*:106*/
-#line 418 "cwebdir/ctang-w2c.ch"
+#line 424 "cwebdir/ctang-w2c.ch"
/*110:*/
-#line 426 "cwebdir/ctang-w2c.ch"
+#line 432 "cwebdir/ctang-w2c.ch"
if(comparison)
remove(check_file_name);
@@ -966,7 +969,7 @@ rename(check_file_name,output_file_name);
}
/*:110*/
-#line 419 "cwebdir/ctang-w2c.ch"
+#line 425 "cwebdir/ctang-w2c.ch"
}else
rename(check_file_name,output_file_name);
@@ -977,22 +980,22 @@ rename(check_file_name,output_file_name);
}
strcpy(check_file_name,"");
-#line 580 "cwebdir/ctangle.w"
+#line 581 "cwebdir/ctangle.w"
/*:50*/
-#line 548 "cwebdir/ctangle.w"
+#line 549 "cwebdir/ctangle.w"
if(show_happiness){
if(show_progress)new_line;
#line 115 "cwebdir/ctang-w2c.ch"
fputs(_("Done."),stdout);
-#line 552 "cwebdir/ctangle.w"
+#line 553 "cwebdir/ctangle.w"
}
}
}
/*:48*//*54:*/
-#line 599 "cwebdir/ctangle.w"
+#line 600 "cwebdir/ctangle.w"
static void
output_defs(void)
@@ -1016,13 +1019,14 @@ else if(a<0200)out_char(a);
else{
a= (a-0200)*0400+*cur_byte++;
if(a<024000){
-cur_val= a;out_char(identifier);
+cur_val= (int)a;out_char(identifier);
}
#line 167 "cwebdir/ctang-w2c.ch"
else if(a<050000)confusion(_("macro defs have strange char"));
-#line 625 "cwebdir/ctangle.w"
+#line 626 "cwebdir/ctangle.w"
else{
-cur_val= a-050000;cur_section= cur_val;out_char(section_number);
+cur_val= (int)a-050000;cur_section= (sixteen_bits)cur_val;
+out_char(section_number);
}
}
@@ -1034,7 +1038,7 @@ pop_level(false);
}
/*:54*//*55:*/
-#line 642 "cwebdir/ctangle.w"
+#line 644 "cwebdir/ctangle.w"
static void
out_char(
@@ -1047,7 +1051,7 @@ case'\n':if(protect&&out_state!=verbatim)C_putc(' ');
if(protect||out_state==verbatim)C_putc('\\');
flush_buffer();if(out_state!=verbatim)out_state= normal;break;
/*59:*/
-#line 710 "cwebdir/ctangle.w"
+#line 712 "cwebdir/ctangle.w"
case identifier:
if(out_state==num_or_id)C_putc(' ');
@@ -1059,25 +1063,25 @@ else C_printf("%s",translit[(eight_bits)(*j)-0200]);
out_state= num_or_id;break;
/*:59*/
-#line 653 "cwebdir/ctangle.w"
+#line 655 "cwebdir/ctangle.w"
/*60:*/
-#line 720 "cwebdir/ctangle.w"
+#line 722 "cwebdir/ctangle.w"
case section_number:
if(cur_val> 0)C_printf("/*%d:*/",cur_val);
else if(cur_val<0)C_printf("/*:%d*/",-cur_val);
else if(protect){
cur_byte+= 4;
-cur_char= '\n';
+cur_char= (eight_bits)'\n';
goto restart;
}else{
sixteen_bits a;
a= *cur_byte++*0400;
a+= *cur_byte++;
-C_printf("\n#line %d \"",a);
+C_printf("\n#line %d \"",(int)a);
-cur_val= (*cur_byte++-0200)*0400;
+cur_val= (int)(*cur_byte++-0200)*0400;
cur_val+= *cur_byte++;
for(j= (cur_val+name_dir)->byte_start,k= (cur_val+name_dir+1)->byte_start;
j<k;j++){
@@ -1089,10 +1093,10 @@ C_putc('"');C_putc('\n');
break;
/*:60*/
-#line 654 "cwebdir/ctangle.w"
+#line 656 "cwebdir/ctangle.w"
/*56:*/
-#line 672 "cwebdir/ctangle.w"
+#line 674 "cwebdir/ctangle.w"
case plus_plus:C_putc('+');C_putc('+');out_state= normal;break;
case minus_minus:C_putc('-');C_putc('-');out_state= normal;break;
@@ -1113,7 +1117,7 @@ case minus_gt_ast:C_putc('-');C_putc('>');C_putc('*');out_state= normal;
break;
/*:56*/
-#line 655 "cwebdir/ctangle.w"
+#line 657 "cwebdir/ctangle.w"
case'=':case'>':C_putc(cur_char);C_putc(' ');
out_state= normal;break;
@@ -1132,7 +1136,7 @@ default:C_putc(cur_char);out_state= normal;break;
}
/*:55*//*64:*/
-#line 801 "cwebdir/ctangle.w"
+#line 803 "cwebdir/ctangle.w"
static eight_bits
skip_ahead(void)
@@ -1150,7 +1154,7 @@ if(c!=ignore||*(loc-1)=='>')return c;
}
/*:64*//*67:*/
-#line 840 "cwebdir/ctangle.w"
+#line 842 "cwebdir/ctangle.w"
static boolean skip_comment(
boolean is_long_comment)
@@ -1163,7 +1167,7 @@ if(get_line())return comment_continues= true;
else{
#line 173 "cwebdir/ctang-w2c.ch"
err_print(_("! Input ended in mid-comment"));
-#line 851 "cwebdir/ctangle.w"
+#line 853 "cwebdir/ctangle.w"
return comment_continues= false;
}
@@ -1178,7 +1182,7 @@ if(c=='@'){
if(ccode[(eight_bits)*loc]==new_section){
#line 179 "cwebdir/ctang-w2c.ch"
err_print(_("! Section name ended in mid-comment"));loc--;
-#line 864 "cwebdir/ctangle.w"
+#line 866 "cwebdir/ctangle.w"
return comment_continues= false;
}
@@ -1188,7 +1192,7 @@ else loc++;
}
/*:67*//*69:*/
-#line 881 "cwebdir/ctangle.w"
+#line 883 "cwebdir/ctangle.w"
static eight_bits
get_next(void)
@@ -1202,7 +1206,7 @@ if(get_line()==false)return new_section;
else if(print_where&&!no_where){
print_where= false;
/*85:*/
-#line 1224 "cwebdir/ctangle.w"
+#line 1229 "cwebdir/ctangle.w"
{
eight_bits a;
@@ -1219,21 +1223,20 @@ store_id(a);
}
/*:85*/
-#line 893 "cwebdir/ctangle.w"
+#line 895 "cwebdir/ctangle.w"
}
-else return'\n';
+else return(eight_bits)'\n';
}
-c= *loc;
+c= (eight_bits)*loc;
if(comment_continues||(c=='/'&&(*(loc+1)=='*'||*(loc+1)=='/'))){
-skip_comment(comment_continues||*(loc+1)=='*');
+if(skip_comment(comment_continues||*(loc+1)=='*'))return'\n';
-if(comment_continues)return'\n';
else continue;
}
loc++;
if(xisdigit(c)||c=='.')/*73:*/
-#line 965 "cwebdir/ctangle.w"
+#line 967 "cwebdir/ctangle.w"
{
boolean hex_flag= false;
id_first= loc-1;
@@ -1267,15 +1270,15 @@ return constant;
}
/*:73*/
-#line 905 "cwebdir/ctangle.w"
+#line 906 "cwebdir/ctangle.w"
else if(c=='\''||c=='"'
||((c=='L'||c=='u'||c=='U')&&(*loc=='\''||*loc=='"'))
||((c=='u'&&*loc=='8')&&(*(loc+1)=='\''||*(loc+1)=='"')))
/*74:*/
-#line 1002 "cwebdir/ctangle.w"
+#line 1004 "cwebdir/ctangle.w"
{
-char delim= c;
+char delim= (char)c;
id_first= section_text+1;
id_loc= section_text;*++id_loc= delim;
if(delim=='L'||delim=='u'||delim=='U'){
@@ -1287,33 +1290,33 @@ if(loc>=limit){
if(*(limit-1)!='\\'){
#line 185 "cwebdir/ctang-w2c.ch"
err_print(_("! String didn't end"));loc= limit;break;
-#line 1014 "cwebdir/ctangle.w"
+#line 1016 "cwebdir/ctangle.w"
}
if(get_line()==false){
#line 191 "cwebdir/ctang-w2c.ch"
err_print(_("! Input ended in middle of string"));loc= buffer;break;
-#line 1018 "cwebdir/ctangle.w"
+#line 1020 "cwebdir/ctangle.w"
}
else if(++id_loc<=section_text_end)*id_loc= '\n';
}
-if((c= *loc++)==delim){
-if(++id_loc<=section_text_end)*id_loc= c;
+if((c= (eight_bits)*loc++)==delim){
+if(++id_loc<=section_text_end)*id_loc= (char)c;
break;
}
if(c=='\\'){
if(loc>=limit)continue;
if(++id_loc<=section_text_end)*id_loc= '\\';
-c= *loc++;
+c= (eight_bits)*loc++;
}
-if(++id_loc<=section_text_end)*id_loc= c;
+if(++id_loc<=section_text_end)*id_loc= (char)c;
}
if(id_loc>=section_text_end){
#line 197 "cwebdir/ctang-w2c.ch"
fputs(_("\n! String too long: "),stdout);
-#line 1036 "cwebdir/ctangle.w"
+#line 1038 "cwebdir/ctangle.w"
term_write(section_text+1,25);
err_print("...");
@@ -1323,94 +1326,94 @@ return string;
}
/*:74*/
-#line 909 "cwebdir/ctangle.w"
+#line 910 "cwebdir/ctangle.w"
-else if(isalpha(c)||isxalpha(c)||ishigh(c))
+else if(isalpha((int)c)||isxalpha(c)||ishigh(c))
/*72:*/
-#line 956 "cwebdir/ctangle.w"
+#line 958 "cwebdir/ctangle.w"
{
id_first= --loc;
do
++loc;
-while(isalpha((eight_bits)*loc)||isdigit((eight_bits)*loc)
-||isxalpha((eight_bits)*loc)||ishigh((eight_bits)*loc));
+while(isalpha((int)*loc)||isdigit((int)*loc)
+||isxalpha(*loc)||ishigh(*loc));
id_loc= loc;return identifier;
}
/*:72*/
-#line 911 "cwebdir/ctangle.w"
+#line 912 "cwebdir/ctangle.w"
else if(c=='@')/*75:*/
-#line 1047 "cwebdir/ctangle.w"
+#line 1049 "cwebdir/ctangle.w"
switch(c= ccode[(eight_bits)*loc++]){
case ignore:continue;
#line 203 "cwebdir/ctang-w2c.ch"
case translit_code:err_print(_("! Use @l in limbo only"));continue;
-#line 1051 "cwebdir/ctangle.w"
+#line 1053 "cwebdir/ctangle.w"
case control_text:while((c= skip_ahead())=='@');
if(*(loc-1)!='>')
#line 209 "cwebdir/ctang-w2c.ch"
err_print(_("! Double @ should be used in control text"));
-#line 1056 "cwebdir/ctangle.w"
+#line 1058 "cwebdir/ctangle.w"
continue;
case section_name:
cur_section_name_char= *(loc-1);
/*77:*/
-#line 1092 "cwebdir/ctangle.w"
+#line 1094 "cwebdir/ctangle.w"
{
char*k= section_text;
/*79:*/
-#line 1114 "cwebdir/ctangle.w"
+#line 1116 "cwebdir/ctangle.w"
while(true){
if(loc> limit&&get_line()==false){
#line 227 "cwebdir/ctang-w2c.ch"
err_print(_("! Input ended in section name"));
-#line 1118 "cwebdir/ctangle.w"
+#line 1120 "cwebdir/ctangle.w"
loc= buffer+1;break;
}
-c= *loc;
+c= (eight_bits)*loc;
/*80:*/
-#line 1137 "cwebdir/ctangle.w"
+#line 1139 "cwebdir/ctangle.w"
if(c=='@'){
-c= *(loc+1);
+c= (eight_bits)*(loc+1);
if(c=='>'){
loc+= 2;break;
}
if(ccode[(eight_bits)c]==new_section){
#line 239 "cwebdir/ctang-w2c.ch"
err_print(_("! Section name didn't end"));break;
-#line 1145 "cwebdir/ctangle.w"
+#line 1147 "cwebdir/ctangle.w"
}
if(ccode[(eight_bits)c]==section_name){
#line 245 "cwebdir/ctang-w2c.ch"
err_print(_("! Nesting of section names not allowed"));break;
-#line 1149 "cwebdir/ctangle.w"
+#line 1151 "cwebdir/ctangle.w"
}
*(++k)= '@';loc++;
}
/*:80*/
-#line 1122 "cwebdir/ctangle.w"
+#line 1124 "cwebdir/ctangle.w"
loc++;if(k<section_text_end)k++;
if(xisspace(c)){
-c= ' ';if(*(k-1)==' ')k--;
+c= (eight_bits)' ';if(*(k-1)==' ')k--;
}
-*k= c;
+*k= (char)c;
}
if(k>=section_text_end){
#line 233 "cwebdir/ctang-w2c.ch"
fputs(_("\n! Section name too long: "),stdout);
-#line 1131 "cwebdir/ctangle.w"
+#line 1133 "cwebdir/ctangle.w"
term_write(section_text+1,25);
printf("...");mark_harmless;
@@ -1418,7 +1421,7 @@ printf("...");mark_harmless;
if(*k==' '&&k> section_text)k--;
/*:79*/
-#line 1094 "cwebdir/ctangle.w"
+#line 1096 "cwebdir/ctangle.w"
if(k-section_text> 3&&strncmp(k-2,"...",3)==0)
cur_section_name= section_lookup(section_text+1,k-3,true);
@@ -1427,7 +1430,7 @@ else cur_section_name= section_lookup(section_text+1,k,false);
if(cur_section_name_char=='(')
/*47:*/
-#line 503 "cwebdir/ctangle.w"
+#line 504 "cwebdir/ctangle.w"
{
for(an_output_file= cur_out_file;
@@ -1438,36 +1441,36 @@ if(cur_out_file> output_files)
*--cur_out_file= cur_section_name;
#line 91 "cwebdir/ctang-w2c.ch"
else overflow(_("output files"));
-#line 512 "cwebdir/ctangle.w"
+#line 513 "cwebdir/ctangle.w"
}
}
/*:47*/
-#line 1102 "cwebdir/ctangle.w"
+#line 1104 "cwebdir/ctangle.w"
return section_name;
}
/*:77*/
-#line 1060 "cwebdir/ctangle.w"
+#line 1062 "cwebdir/ctangle.w"
case string:/*81:*/
-#line 1159 "cwebdir/ctangle.w"
+#line 1161 "cwebdir/ctangle.w"
id_first= loc++;*(limit+1)= '@';*(limit+2)= '>';
while(*loc!='@'||*(loc+1)!='>')loc++;
#line 251 "cwebdir/ctang-w2c.ch"
if(loc>=limit)err_print(_("! Verbatim string didn't end"));
-#line 1163 "cwebdir/ctangle.w"
+#line 1165 "cwebdir/ctangle.w"
id_loc= loc;loc+= 2;
return string;
/*:81*/
-#line 1061 "cwebdir/ctangle.w"
+#line 1063 "cwebdir/ctangle.w"
case ord:/*76:*/
-#line 1072 "cwebdir/ctangle.w"
+#line 1074 "cwebdir/ctangle.w"
id_first= loc;
if(*loc=='\\')
@@ -1477,7 +1480,7 @@ if(*loc=='@'){
if(*(loc+1)!='@')
#line 215 "cwebdir/ctang-w2c.ch"
err_print(_("! Double @ should be used in ASCII constant"));
-#line 1080 "cwebdir/ctangle.w"
+#line 1082 "cwebdir/ctangle.w"
else loc++;
}
@@ -1485,7 +1488,7 @@ loc++;
if(loc> limit){
#line 221 "cwebdir/ctang-w2c.ch"
err_print(_("! String didn't end"));loc= limit-1;break;
-#line 1086 "cwebdir/ctangle.w"
+#line 1088 "cwebdir/ctangle.w"
}
}
@@ -1493,22 +1496,23 @@ loc++;
return ord;
/*:76*/
-#line 1062 "cwebdir/ctangle.w"
+#line 1064 "cwebdir/ctangle.w"
default:return c;
}
/*:75*/
-#line 912 "cwebdir/ctangle.w"
+#line 913 "cwebdir/ctangle.w"
else if(xisspace(c)){
if(!preprocessing||loc> limit)continue;
-else return' ';
+else return(eight_bits)' ';
+
}
else if(c=='#'&&loc==buffer+1)preprocessing= true;
mistake:/*71:*/
-#line 933 "cwebdir/ctangle.w"
+#line 935 "cwebdir/ctangle.w"
switch(c){
case'+':if(*loc=='+')compress(plus_plus);break;
@@ -1533,14 +1537,14 @@ case'!':if(*loc=='=')compress(non_eq);break;
}
/*:71*/
-#line 919 "cwebdir/ctangle.w"
+#line 921 "cwebdir/ctangle.w"
return c;
}
}
/*:69*//*83:*/
-#line 1192 "cwebdir/ctangle.w"
+#line 1197 "cwebdir/ctangle.w"
static void
scan_repl(
@@ -1548,7 +1552,7 @@ eight_bits t)
{
sixteen_bits a;
if(t==section_name)/*85:*/
-#line 1224 "cwebdir/ctangle.w"
+#line 1229 "cwebdir/ctangle.w"
{
eight_bits a;
@@ -1565,38 +1569,38 @@ store_id(a);
}
/*:85*/
-#line 1198 "cwebdir/ctangle.w"
+#line 1203 "cwebdir/ctangle.w"
while(true)switch(a= get_next()){
/*86:*/
-#line 1239 "cwebdir/ctangle.w"
+#line 1244 "cwebdir/ctangle.w"
case identifier:store_id(a);break;
case section_name:if(t!=section_name)goto done;
else{
/*87:*/
-#line 1270 "cwebdir/ctangle.w"
+#line 1278 "cwebdir/ctangle.w"
{
char*try_loc= loc;
while(*try_loc==' '&&try_loc<limit)try_loc++;
if(*try_loc=='+'&&try_loc<limit)try_loc++;
while(*try_loc==' '&&try_loc<limit)try_loc++;
-#line 281 "cwebdir/ctang-w2c.ch"
+#line 287 "cwebdir/ctang-w2c.ch"
if(*try_loc=='=')err_print(_("! Missing `@ ' before a named section"));
-#line 1276 "cwebdir/ctangle.w"
+#line 1284 "cwebdir/ctangle.w"
}
/*:87*/
-#line 1243 "cwebdir/ctangle.w"
+#line 1248 "cwebdir/ctangle.w"
a= cur_section_name-name_dir;
app_repl((a/0400)+0250);
app_repl(a%0400);
/*85:*/
-#line 1224 "cwebdir/ctangle.w"
+#line 1229 "cwebdir/ctangle.w"
{
eight_bits a;
@@ -1613,12 +1617,13 @@ store_id(a);
}
/*:85*/
-#line 1247 "cwebdir/ctangle.w"
-break;
+#line 1252 "cwebdir/ctangle.w"
+
}
-#line 269 "cwebdir/ctang-w2c.ch"
+break;
+#line 275 "cwebdir/ctang-w2c.ch"
case output_defs_code:if(t!=section_name)err_print(_("! Misplaced @h"));
-#line 1250 "cwebdir/ctangle.w"
+#line 1256 "cwebdir/ctangle.w"
else{
output_defs_seen= true;
@@ -1626,7 +1631,7 @@ a= output_defs_flag;
app_repl((a/0400)+0200);
app_repl(a%0400);
/*85:*/
-#line 1224 "cwebdir/ctangle.w"
+#line 1229 "cwebdir/ctangle.w"
{
eight_bits a;
@@ -1643,39 +1648,40 @@ store_id(a);
}
/*:85*/
-#line 1256 "cwebdir/ctangle.w"
+#line 1262 "cwebdir/ctangle.w"
}
break;
case constant:case string:
/*88:*/
-#line 1287 "cwebdir/ctangle.w"
+#line 1295 "cwebdir/ctangle.w"
app_repl(a);
while(id_first<id_loc){
if(*id_first=='@'){
if(*(id_first+1)=='@')id_first++;
-#line 287 "cwebdir/ctang-w2c.ch"
+#line 293 "cwebdir/ctang-w2c.ch"
else err_print(_("! Double @ should be used in string"));
-#line 1293 "cwebdir/ctangle.w"
+#line 1301 "cwebdir/ctangle.w"
}
else if(a==constant&&*id_first=='\''&&!keep_digit_separators)
id_first++;
app_repl(*id_first++);
}
-app_repl(a);break;
+app_repl(a);
/*:88*/
-#line 1260 "cwebdir/ctangle.w"
+#line 1266 "cwebdir/ctangle.w"
+break;
case ord:
/*89:*/
-#line 1305 "cwebdir/ctangle.w"
+#line 1313 "cwebdir/ctangle.w"
{
-int c= (eight_bits)*id_first;
+int c= (int)((eight_bits)*id_first);
if(c=='\\'){
-c= *++id_first;
+c= (int)((eight_bits)*++id_first);
if(c>='0'&&c<='7'){
c-= '0';
if(*(id_first+1)>='0'&&*(id_first+1)<='7'){
@@ -1694,49 +1700,49 @@ case'r':c= '\r';break;
case'a':c= '\7';break;
case'?':c= '?';break;
case'x':
-if(xisdigit(*(id_first+1)))c= *(++id_first)-'0';
+if(xisdigit(*(id_first+1)))c= (int)(*(++id_first)-'0');
else if(xisxdigit(*(id_first+1))){
++id_first;
-c= toupper((eight_bits)*id_first)-'A'+10;
+c= toupper((int)*id_first)-'A'+10;
}
-if(xisdigit(*(id_first+1)))c= 16*c+*(++id_first)-'0';
+if(xisdigit(*(id_first+1)))c= 16*c+(int)(*(++id_first)-'0');
else if(xisxdigit(*(id_first+1))){
++id_first;
-c= 16*c+toupper((eight_bits)*id_first)-'A'+10;
+c= 16*c+toupper((int)*id_first)-(int)'A'+10;
}
break;
case'\\':c= '\\';break;
case'\'':c= '\'';break;
case'\"':c= '\"';break;
-#line 293 "cwebdir/ctang-w2c.ch"
+#line 299 "cwebdir/ctang-w2c.ch"
default:err_print(_("! Unrecognized escape sequence"));
-#line 1342 "cwebdir/ctangle.w"
+#line 1350 "cwebdir/ctangle.w"
}
}
app_repl(constant);
-if(c>=100)app_repl('0'+c/100);
-if(c>=10)app_repl('0'+(c/10)%10);
-app_repl('0'+c%10);
+if(c>=100)app_repl((int)'0'+c/100);
+if(c>=10)app_repl((int)'0'+(c/10)%10);
+app_repl((int)'0'+c%10);
app_repl(constant);
}
-break;
/*:89*/
-#line 1262 "cwebdir/ctangle.w"
+#line 1269 "cwebdir/ctangle.w"
+break;
case definition:case format_code:case begin_C:if(t!=section_name)goto done;
else{
-#line 275 "cwebdir/ctang-w2c.ch"
+#line 281 "cwebdir/ctang-w2c.ch"
err_print(_("! @d, @f and @c are ignored in C text"));continue;
-#line 1266 "cwebdir/ctangle.w"
+#line 1274 "cwebdir/ctangle.w"
}
case new_section:goto done;
/*:86*/
-#line 1203 "cwebdir/ctangle.w"
+#line 1208 "cwebdir/ctangle.w"
case')':app_repl(a);
if(t==macro)app_repl(' ');
@@ -1744,14 +1750,14 @@ break;
default:app_repl(a);
}
done:next_control= (eight_bits)a;
-#line 263 "cwebdir/ctang-w2c.ch"
+#line 269 "cwebdir/ctang-w2c.ch"
if(text_ptr> text_info_end)overflow(_("text"));
-#line 1211 "cwebdir/ctangle.w"
+#line 1216 "cwebdir/ctangle.w"
cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr;
}
/*:83*//*90:*/
-#line 1364 "cwebdir/ctangle.w"
+#line 1371 "cwebdir/ctangle.w"
static void
scan_section(void)
@@ -1761,12 +1767,12 @@ text_pointer q;
sixteen_bits a;
section_count++;no_where= true;
if(*(loc-1)=='*'&&show_progress){
-printf("*%d",section_count);update_terminal;
+printf("*%d",(int)section_count);update_terminal;
}
next_control= ignore;
while(true){
/*92:*/
-#line 1405 "cwebdir/ctangle.w"
+#line 1412 "cwebdir/ctangle.w"
while(next_control<definition)
@@ -1775,17 +1781,17 @@ loc-= 2;next_control= get_next();
}
/*:92*/
-#line 1378 "cwebdir/ctangle.w"
+#line 1385 "cwebdir/ctangle.w"
if(next_control==definition){
/*93:*/
-#line 1412 "cwebdir/ctangle.w"
+#line 1419 "cwebdir/ctangle.w"
while((next_control= get_next())=='\n');
if(next_control!=identifier){
-#line 299 "cwebdir/ctang-w2c.ch"
+#line 305 "cwebdir/ctang-w2c.ch"
err_print(_("! Definition flushed, must start with identifier"));
-#line 1416 "cwebdir/ctangle.w"
+#line 1423 "cwebdir/ctangle.w"
continue;
}
@@ -1797,7 +1803,7 @@ scan_repl(macro);
cur_text->text_link= macro;
/*:93*/
-#line 1380 "cwebdir/ctangle.w"
+#line 1387 "cwebdir/ctangle.w"
continue;
}
@@ -1807,14 +1813,14 @@ p= name_dir;break;
if(next_control==section_name){
p= cur_section_name;
/*94:*/
-#line 1434 "cwebdir/ctangle.w"
+#line 1441 "cwebdir/ctangle.w"
while((next_control= get_next())=='+');
if(next_control!='='&&next_control!=eq_eq)
continue;
/*:94*/
-#line 1388 "cwebdir/ctangle.w"
+#line 1395 "cwebdir/ctangle.w"
break;
}
@@ -1822,20 +1828,20 @@ return;
}
no_where= print_where= false;
/*95:*/
-#line 1439 "cwebdir/ctangle.w"
+#line 1446 "cwebdir/ctangle.w"
/*96:*/
-#line 1444 "cwebdir/ctangle.w"
+#line 1451 "cwebdir/ctangle.w"
store_two_bytes((sixteen_bits)(0150000+section_count));
/*:96*/
-#line 1440 "cwebdir/ctangle.w"
+#line 1447 "cwebdir/ctangle.w"
scan_repl(section_name);
/*97:*/
-#line 1448 "cwebdir/ctangle.w"
+#line 1455 "cwebdir/ctangle.w"
if(p==name_dir||p==NULL){
last_unnamed->text_link= cur_text-text_info;last_unnamed= cur_text;
@@ -1852,16 +1858,16 @@ cur_text->text_link= section_flag;
/*:97*/
-#line 1442 "cwebdir/ctangle.w"
+#line 1449 "cwebdir/ctangle.w"
/*:95*/
-#line 1394 "cwebdir/ctangle.w"
+#line 1401 "cwebdir/ctangle.w"
}
/*:90*//*98:*/
-#line 1463 "cwebdir/ctangle.w"
+#line 1470 "cwebdir/ctangle.w"
static void
phase_one(void){
@@ -1874,7 +1880,7 @@ check_complete();
}
/*:98*//*100:*/
-#line 1479 "cwebdir/ctangle.w"
+#line 1486 "cwebdir/ctangle.w"
static void
skip_limbo(void)
@@ -1888,15 +1894,15 @@ char c= *loc++;
if(ccode[(eight_bits)c]==new_section)break;
switch(ccode[(eight_bits)c]){
case translit_code:/*102:*/
-#line 1509 "cwebdir/ctangle.w"
+#line 1516 "cwebdir/ctangle.w"
while(xisspace(*loc)&&loc<limit)loc++;
loc+= 3;
if(loc> limit||!xisxdigit(*(loc-3))||!xisxdigit(*(loc-2))
||(*(loc-3)>='0'&&*(loc-3)<='7')||!xisspace(*(loc-1)))
-#line 317 "cwebdir/ctang-w2c.ch"
+#line 323 "cwebdir/ctang-w2c.ch"
err_print(_("! Improper hex number following @l"));
-#line 1515 "cwebdir/ctangle.w"
+#line 1522 "cwebdir/ctangle.w"
else{
unsigned int i;
@@ -1906,9 +1912,9 @@ while(xisspace(*loc)&&loc<limit)loc++;
beg= loc;
while(loc<limit&&(xisalpha(*loc)||xisdigit(*loc)||*loc=='_'))loc++;
if(loc-beg>=translit_length)
-#line 323 "cwebdir/ctang-w2c.ch"
+#line 329 "cwebdir/ctang-w2c.ch"
err_print(_("! Replacement string in @l too long"));
-#line 1525 "cwebdir/ctangle.w"
+#line 1532 "cwebdir/ctangle.w"
else{
strncpy(translit[i-0200],beg,(size_t)(loc-beg));
@@ -1917,21 +1923,21 @@ translit[i-0200][loc-beg]= '\0';
}
/*:102*/
-#line 1491 "cwebdir/ctangle.w"
+#line 1498 "cwebdir/ctangle.w"
break;
case format_code:case'@':break;
case control_text:if(c=='q'||c=='Q'){
-while((c= skip_ahead())=='@');
+while((c= (char)skip_ahead())=='@');
if(*(loc-1)!='>')
-#line 305 "cwebdir/ctang-w2c.ch"
+#line 311 "cwebdir/ctang-w2c.ch"
err_print(_("! Double @ should be used in control text"));
-#line 1497 "cwebdir/ctangle.w"
+#line 1504 "cwebdir/ctangle.w"
break;
}
-#line 311 "cwebdir/ctang-w2c.ch"
+#line 317 "cwebdir/ctang-w2c.ch"
default:err_print(_("! Double @ should be used in limbo"));
-#line 1501 "cwebdir/ctangle.w"
+#line 1508 "cwebdir/ctangle.w"
}
}
@@ -1939,22 +1945,22 @@ default:err_print(_("! Double @ should be used in limbo"));
}
/*:100*//*103:*/
-#line 1535 "cwebdir/ctangle.w"
+#line 1542 "cwebdir/ctangle.w"
void
print_stats(void){
-#line 336 "cwebdir/ctang-w2c.ch"
+#line 342 "cwebdir/ctang-w2c.ch"
puts(_("\nMemory usage statistics:"));
-printf(_("%ld names (out of %ld)\n"),
+printf(_("%td names (out of %ld)\n"),
(ptrdiff_t)(name_ptr-name_dir),(long)max_names);
-printf(_("%ld replacement texts (out of %ld)\n"),
+printf(_("%td replacement texts (out of %ld)\n"),
(ptrdiff_t)(text_ptr-text_info),(long)max_texts);
-printf(_("%ld bytes (out of %ld)\n"),
+printf(_("%td bytes (out of %ld)\n"),
(ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes);
-printf(_("%ld tokens (out of %ld)\n"),
-#line 1546 "cwebdir/ctangle.w"
+printf(_("%td tokens (out of %ld)\n"),
+#line 1553 "cwebdir/ctangle.w"
(ptrdiff_t)(tok_ptr-tok_mem),(long)max_toks);
}
-#line 349 "cwebdir/ctang-w2c.ch"
+#line 355 "cwebdir/ctang-w2c.ch"
/*:103*/