summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/cwebdir/ctangle.c
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2023-09-24 19:54:24 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2023-09-24 19:54:24 +0000
commitfa88a7494a3abf74d91855f07fb8702ac5e3850f (patch)
tree77d5ef7cf18a4337f22427b0710455b83a27d933 /Build/source/texk/web2c/cwebdir/ctangle.c
parentbdcc3b635c62be2f70fd82ffa9037c6b450c8fe6 (diff)
[CWEB] Avoid shadow variables.
There are far too many single-character variables around. Sigh! (See also https://github.com/ascherer/mmix/commit/ed0c894d09df3b35479fdd18c8f5564f0b8bf691 for a similar situation in MMIX, where such global (sic!) variables weren't even put in the index across module borders.) git-svn-id: svn://tug.org/texlive/trunk@68358 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/cwebdir/ctangle.c')
-rw-r--r--Build/source/texk/web2c/cwebdir/ctangle.c73
1 files changed, 35 insertions, 38 deletions
diff --git a/Build/source/texk/web2c/cwebdir/ctangle.c b/Build/source/texk/web2c/cwebdir/ctangle.c
index f01fc24f206..2ea47459543 100644
--- a/Build/source/texk/web2c/cwebdir/ctangle.c
+++ b/Build/source/texk/web2c/cwebdir/ctangle.c
@@ -230,7 +230,7 @@ extern name_pointer name_dir_end;
extern name_pointer name_ptr;
extern name_pointer hash[];
extern hash_pointer hash_end;
-extern hash_pointer h;
+extern hash_pointer hash_ptr;
/*:11*//*13:*/
#line 193 "common.h"
@@ -351,7 +351,7 @@ static name_pointer cur_section_name;
static boolean no_where;
/*:68*//*82:*/
-#line 1184 "ctangle.w"
+#line 1185 "ctangle.w"
static text_pointer cur_text;
static eight_bits next_control;
@@ -424,11 +424,11 @@ static eight_bits skip_ahead(void);
static boolean skip_comment(boolean);
/*:65*//*70:*/
-#line 917 "ctangle.w"
+#line 918 "ctangle.w"
static eight_bits get_next(void);
/*:70*//*84:*/
-#line 1210 "ctangle.w"
+#line 1211 "ctangle.w"
static void scan_repl(eight_bits);
/*:84*//*91:*/
@@ -506,7 +506,7 @@ ccode['<']= ccode['(']= section_name;
ccode['\'']= ord;
/*:63*//*78:*/
-#line 1105 "ctangle.w"
+#line 1106 "ctangle.w"
section_text[0]= ' ';
/*:78*/
@@ -947,12 +947,12 @@ if(loc> limit){
if(preprocessing&&*(limit-1)!='\\')preprocessing= false;
if(get_line()==false)return new_section;
else if(print_where&&!no_where){
+sixteen_bits a;
print_where= false;
/*85:*/
-#line 1220 "ctangle.w"
+#line 1221 "ctangle.w"
{
-eight_bits a;
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
id_first= change_file_name;
@@ -966,7 +966,7 @@ store_id(a);
}
/*:85*/
-#line 886 "ctangle.w"
+#line 887 "ctangle.w"
}
else return(eight_bits)'\n';
@@ -979,7 +979,7 @@ else continue;
}
loc++;
if(xisdigit(c)||c=='.')/*73:*/
-#line 958 "ctangle.w"
+#line 959 "ctangle.w"
{
boolean hex_flag= false;
id_first= loc-1;
@@ -1013,13 +1013,13 @@ return constant;
}
/*:73*/
-#line 897 "ctangle.w"
+#line 898 "ctangle.w"
else if(c=='\''||c=='"'
||((c=='L'||c=='u'||c=='U')&&(*loc=='\''||*loc=='"'))
||((c=='u'&&*loc=='8')&&(*(loc+1)=='\''||*(loc+1)=='"')))
/*74:*/
-#line 995 "ctangle.w"
+#line 996 "ctangle.w"
{
char delim= (char)c;
id_first= section_text+1;
@@ -1063,11 +1063,11 @@ return string;
}
/*:74*/
-#line 901 "ctangle.w"
+#line 902 "ctangle.w"
else if(isalpha((int)c)||isxalpha(c)||ishigh(c))
/*72:*/
-#line 949 "ctangle.w"
+#line 950 "ctangle.w"
{
id_first= --loc;
do
@@ -1078,10 +1078,10 @@ id_loc= loc;return identifier;
}
/*:72*/
-#line 903 "ctangle.w"
+#line 904 "ctangle.w"
else if(c=='@')/*75:*/
-#line 1040 "ctangle.w"
+#line 1041 "ctangle.w"
switch(c= ccode[(eight_bits)*loc++]){
case ignore:continue;
@@ -1096,11 +1096,11 @@ continue;
case section_name:
cur_section_name_char= *(loc-1);
/*77:*/
-#line 1085 "ctangle.w"
+#line 1086 "ctangle.w"
{
char*k= section_text;
/*79:*/
-#line 1107 "ctangle.w"
+#line 1108 "ctangle.w"
while(true){
if(loc> limit&&get_line()==false){
@@ -1110,7 +1110,7 @@ loc= buffer+1;break;
}
c= (eight_bits)*loc;
/*80:*/
-#line 1130 "ctangle.w"
+#line 1131 "ctangle.w"
if(c=='@'){
c= (eight_bits)*(loc+1);
@@ -1129,7 +1129,7 @@ err_print("! Nesting of section names not allowed");break;
}
/*:80*/
-#line 1115 "ctangle.w"
+#line 1116 "ctangle.w"
loc++;if(k<section_text_end)k++;
if(xisspace(c)){
@@ -1146,7 +1146,7 @@ printf("...");mark_harmless();
if(*k==' '&&k> section_text)k--;
/*:79*/
-#line 1087 "ctangle.w"
+#line 1088 "ctangle.w"
if(k-section_text> 3&&strncmp(k-2,"...",3)==0)
cur_section_name= section_lookup(section_text+1,k-3,true);
@@ -1169,16 +1169,16 @@ else overflow("output files");
}
/*:47*/
-#line 1095 "ctangle.w"
+#line 1096 "ctangle.w"
return section_name;
}
/*:77*/
-#line 1053 "ctangle.w"
+#line 1054 "ctangle.w"
case string:/*81:*/
-#line 1152 "ctangle.w"
+#line 1153 "ctangle.w"
id_first= loc++;*(limit+1)= '@';*(limit+2)= '>';
while(*loc!='@'||*(loc+1)!='>')loc++;
@@ -1188,10 +1188,10 @@ id_loc= loc;loc+= 2;
return string;
/*:81*/
-#line 1054 "ctangle.w"
+#line 1055 "ctangle.w"
case ord:/*76:*/
-#line 1065 "ctangle.w"
+#line 1066 "ctangle.w"
id_first= loc;
if(*loc=='\\')
@@ -1213,13 +1213,13 @@ loc++;
return ord;
/*:76*/
-#line 1055 "ctangle.w"
+#line 1056 "ctangle.w"
default:return c;
}
/*:75*/
-#line 904 "ctangle.w"
+#line 905 "ctangle.w"
else if(xisspace(c)){
if(!preprocessing||loc> limit)continue;
@@ -1229,7 +1229,7 @@ else return(eight_bits)' ';
}
else if(c=='#'&&loc==buffer+1)preprocessing= true;
mistake:/*71:*/
-#line 926 "ctangle.w"
+#line 927 "ctangle.w"
switch(c){
case'+':if(*loc=='+')compress(plus_plus);break;
@@ -1254,14 +1254,14 @@ case'!':if(*loc=='=')compress(non_eq);break;
}
/*:71*/
-#line 912 "ctangle.w"
+#line 913 "ctangle.w"
return c;
}
}
/*:69*//*83:*/
-#line 1188 "ctangle.w"
+#line 1189 "ctangle.w"
static void
scan_repl(
@@ -1269,10 +1269,9 @@ eight_bits t)
{
sixteen_bits a;
if(t==section_name)/*85:*/
-#line 1220 "ctangle.w"
+#line 1221 "ctangle.w"
{
-eight_bits a;
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
id_first= change_file_name;
@@ -1286,7 +1285,7 @@ store_id(a);
}
/*:85*/
-#line 1194 "ctangle.w"
+#line 1195 "ctangle.w"
while(true)switch(a= get_next()){
/*86:*/
@@ -1322,10 +1321,9 @@ a= cur_section_name-name_dir;
app_repl((a/0400)+0250);
app_repl(a%0400);
/*85:*/
-#line 1220 "ctangle.w"
+#line 1221 "ctangle.w"
{
-eight_bits a;
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
id_first= change_file_name;
@@ -1351,10 +1349,9 @@ a= output_defs_flag;
app_repl((a/0400)+0200);
app_repl(a%0400);
/*85:*/
-#line 1220 "ctangle.w"
+#line 1221 "ctangle.w"
{
-eight_bits a;
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
id_first= change_file_name;
@@ -1456,7 +1453,7 @@ err_print("! @d, @f and @c are ignored in C text");continue;
case new_section:goto done;
/*:86*/
-#line 1199 "ctangle.w"
+#line 1200 "ctangle.w"
case')':app_repl(a);
if(t==macro)app_repl(' ');