texlive[74967] Build/source/texk/web2c: [CWEB] Make proper use of
commits+ascherer at tug.org
commits+ascherer at tug.org
Thu Apr 17 17:04:23 CEST 2025
Revision: 74967
https://tug.org/svn/texlive?view=revision&revision=74967
Author: ascherer
Date: 2025-04-17 17:04:23 +0200 (Thu, 17 Apr 2025)
Log Message:
-----------
[CWEB] Make proper use of 'ishigh' macro.
Modified Paths:
--------------
trunk/Build/source/texk/web2c/ChangeLog
trunk/Build/source/texk/web2c/ctangleboot.cin
trunk/Build/source/texk/web2c/cwebboot.cin
trunk/Build/source/texk/web2c/cwebdir/ChangeLog
trunk/Build/source/texk/web2c/cwebdir/Makefile
trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h
trunk/Build/source/texk/web2c/cwebdir/common.c
trunk/Build/source/texk/web2c/cwebdir/common.h
trunk/Build/source/texk/web2c/cwebdir/ctang-w2c.ch
trunk/Build/source/texk/web2c/cwebdir/ctangle.c
trunk/Build/source/texk/web2c/cwebdir/ctangle.w
Modified: trunk/Build/source/texk/web2c/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ChangeLog 2025-04-17 14:42:56 UTC (rev 74966)
+++ trunk/Build/source/texk/web2c/ChangeLog 2025-04-17 15:04:23 UTC (rev 74967)
@@ -1,3 +1,8 @@
+2025-04-17 Andreas Scherer <https://ascherer.github.io>
+
+ * ctangleboot.cin,
+ * cwebboot.cin: Make proper use of 'ishigh' macro.
+
2025-04-09 Andreas Scherer <https://ascherer.github.io>
* ctangleboot.cin,
Modified: trunk/Build/source/texk/web2c/ctangleboot.cin
===================================================================
--- trunk/Build/source/texk/web2c/ctangleboot.cin 2025-04-17 14:42:56 UTC (rev 74966)
+++ trunk/Build/source/texk/web2c/ctangleboot.cin 2025-04-17 15:04:23 UTC (rev 74967)
@@ -46,12 +46,12 @@
#define period_ast 026
#define minus_gt_ast 027
#define compress(c) if(loc++<=limit) return c
-#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 xisalpha(c) (isalpha((int) (c) ) &&!ishigh(c) )
+#define xisdigit(c) (isdigit((int) (c) ) &&!ishigh(c) )
+#define xisspace(c) (isspace((int) (c) ) &&!ishigh(c) )
+#define xislower(c) (islower((int) (c) ) &&!ishigh(c) )
+#define xisupper(c) (isupper((int) (c) ) &&!ishigh(c) )
+#define xisxdigit(c) (isxdigit((int) (c) ) &&!ishigh(c) )
#define isxalpha(c) ((c) =='_'||(c) =='$')
#define ishigh(c) ((eight_bits) (c) > 0177)
#define max_include_depth 10
@@ -245,7 +245,7 @@
extern FILE*check_file;
/*:16*//*116:*/
-#line 541 "cwebdir/ctang-w2c.ch"
+#line 539 "cwebdir/ctang-w2c.ch"
extern char cb_banner[];
@@ -503,7 +503,7 @@
section_text[0]= ' ';
/*:78*//*117:*/
-#line 544 "cwebdir/ctang-w2c.ch"
+#line 542 "cwebdir/ctang-w2c.ch"
strncpy(cb_banner,banner,max_banner-1);
@@ -715,11 +715,11 @@
if(check_for_change){
fclose(C_file);C_file= NULL;
/*106:*/
-#line 424 "cwebdir/ctang-w2c.ch"
+#line 422 "cwebdir/ctang-w2c.ch"
if((C_file= fopen(C_file_name,"r"))!=NULL){
/*107:*/
-#line 431 "cwebdir/ctang-w2c.ch"
+#line 429 "cwebdir/ctang-w2c.ch"
bool comparison= false;
@@ -728,7 +728,7 @@
/*108:*/
-#line 445 "cwebdir/ctang-w2c.ch"
+#line 443 "cwebdir/ctang-w2c.ch"
do{
char x[BUFSIZ],y[BUFSIZ];
@@ -738,7 +738,7 @@
}while(comparison&&!feof(C_file)&&!feof(check_file));
/*:108*/
-#line 438 "cwebdir/ctang-w2c.ch"
+#line 436 "cwebdir/ctang-w2c.ch"
fclose(C_file);C_file= NULL;
@@ -745,10 +745,10 @@
fclose(check_file);check_file= NULL;
/*:107*/
-#line 426 "cwebdir/ctang-w2c.ch"
+#line 424 "cwebdir/ctang-w2c.ch"
/*109:*/
-#line 456 "cwebdir/ctang-w2c.ch"
+#line 454 "cwebdir/ctang-w2c.ch"
if(comparison)
remove(check_file_name);
@@ -758,7 +758,7 @@
}
/*:109*/
-#line 427 "cwebdir/ctang-w2c.ch"
+#line 425 "cwebdir/ctang-w2c.ch"
}else
rename(check_file_name,C_file_name);
@@ -771,7 +771,7 @@
an_output_file--;
sprint_section_name(output_file_name,*an_output_file);
if(check_for_change)/*105:*/
-#line 415 "cwebdir/ctang-w2c.ch"
+#line 413 "cwebdir/ctang-w2c.ch"
{
if((C_file= fopen(output_file_name,"a"))==NULL)
fatal(_("! Cannot open output file "),output_file_name);
@@ -816,14 +816,14 @@
if(check_for_change){
fclose(C_file);C_file= NULL;
/*110:*/
-#line 469 "cwebdir/ctang-w2c.ch"
+#line 467 "cwebdir/ctang-w2c.ch"
if(0==strcmp("/dev/stdout",output_file_name))
/*112:*/
-#line 496 "cwebdir/ctang-w2c.ch"
+#line 494 "cwebdir/ctang-w2c.ch"
{
/*115:*/
-#line 527 "cwebdir/ctang-w2c.ch"
+#line 525 "cwebdir/ctang-w2c.ch"
char in_buf[BUFSIZ+1];
int in_size;
@@ -833,7 +833,7 @@
/*:115*/
-#line 497 "cwebdir/ctang-w2c.ch"
+#line 495 "cwebdir/ctang-w2c.ch"
do{
in_size= fread(in_buf,sizeof(char),BUFSIZ,check_file);
@@ -842,7 +842,7 @@
}while(!feof(check_file));
fclose(check_file);check_file= NULL;
/*111:*/
-#line 486 "cwebdir/ctang-w2c.ch"
+#line 484 "cwebdir/ctang-w2c.ch"
if(comparison)
remove(check_file_name);
@@ -852,19 +852,19 @@
}
/*:111*/
-#line 504 "cwebdir/ctang-w2c.ch"
+#line 502 "cwebdir/ctang-w2c.ch"
}
/*:112*/
-#line 471 "cwebdir/ctang-w2c.ch"
+#line 469 "cwebdir/ctang-w2c.ch"
else if(0==strcmp("/dev/stderr",output_file_name))
/*113:*/
-#line 509 "cwebdir/ctang-w2c.ch"
+#line 507 "cwebdir/ctang-w2c.ch"
{
/*115:*/
-#line 527 "cwebdir/ctang-w2c.ch"
+#line 525 "cwebdir/ctang-w2c.ch"
char in_buf[BUFSIZ+1];
int in_size;
@@ -874,7 +874,7 @@
/*:115*/
-#line 510 "cwebdir/ctang-w2c.ch"
+#line 508 "cwebdir/ctang-w2c.ch"
do{
in_size= fread(in_buf,sizeof(char),BUFSIZ,check_file);
@@ -883,7 +883,7 @@
}while(!feof(check_file));
fclose(check_file);check_file= NULL;
/*111:*/
-#line 486 "cwebdir/ctang-w2c.ch"
+#line 484 "cwebdir/ctang-w2c.ch"
if(comparison)
remove(check_file_name);
@@ -893,20 +893,20 @@
}
/*:111*/
-#line 517 "cwebdir/ctang-w2c.ch"
+#line 515 "cwebdir/ctang-w2c.ch"
}
/*:113*/
-#line 473 "cwebdir/ctang-w2c.ch"
+#line 471 "cwebdir/ctang-w2c.ch"
else if(0==strcmp("/dev/null",output_file_name))
/*114:*/
-#line 522 "cwebdir/ctang-w2c.ch"
+#line 520 "cwebdir/ctang-w2c.ch"
{
bool comparison= true;
/*111:*/
-#line 486 "cwebdir/ctang-w2c.ch"
+#line 484 "cwebdir/ctang-w2c.ch"
if(comparison)
remove(check_file_name);
@@ -916,17 +916,17 @@
}
/*:111*/
-#line 524 "cwebdir/ctang-w2c.ch"
+#line 522 "cwebdir/ctang-w2c.ch"
}
/*:114*/
-#line 475 "cwebdir/ctang-w2c.ch"
+#line 473 "cwebdir/ctang-w2c.ch"
else{
if((C_file= fopen(output_file_name,"r"))!=NULL){
/*107:*/
-#line 431 "cwebdir/ctang-w2c.ch"
+#line 429 "cwebdir/ctang-w2c.ch"
bool comparison= false;
@@ -935,7 +935,7 @@
/*108:*/
-#line 445 "cwebdir/ctang-w2c.ch"
+#line 443 "cwebdir/ctang-w2c.ch"
do{
char x[BUFSIZ],y[BUFSIZ];
@@ -945,7 +945,7 @@
}while(comparison&&!feof(C_file)&&!feof(check_file));
/*:108*/
-#line 438 "cwebdir/ctang-w2c.ch"
+#line 436 "cwebdir/ctang-w2c.ch"
fclose(C_file);C_file= NULL;
@@ -952,10 +952,10 @@
fclose(check_file);check_file= NULL;
/*:107*/
-#line 478 "cwebdir/ctang-w2c.ch"
+#line 476 "cwebdir/ctang-w2c.ch"
/*111:*/
-#line 486 "cwebdir/ctang-w2c.ch"
+#line 484 "cwebdir/ctang-w2c.ch"
if(comparison)
remove(check_file_name);
@@ -965,7 +965,7 @@
}
/*:111*/
-#line 479 "cwebdir/ctang-w2c.ch"
+#line 477 "cwebdir/ctang-w2c.ch"
}else
rename(check_file_name,output_file_name);
@@ -1007,7 +1007,7 @@
C_printf("%s","#define ");
out_state= normal;
protect= true;
-do macro_end--;while('\n'==*macro_end||' '==*macro_end);
+do macro_end--;while(isspace(*macro_end)&&plus_plus!=*macro_end);
while(cur_byte<=macro_end){
a= *cur_byte++;
@@ -1057,7 +1057,7 @@
if(out_state==num_or_id)C_putc(' ');
for(j= (cur_val+name_dir)->byte_start;
j<(cur_val+name_dir+1)->byte_start;j++)
-#line 200 "cwebdir/ctang-w2c.ch"
+#line 199 "cwebdir/ctang-w2c.ch"
if(ishigh(*j)){
if(transliterate_utf_eight){
@@ -1067,8 +1067,8 @@
}
C_printf("%s",translit[(eight_bits)(*j)-0200]);
}
+#line 710 "cwebdir/ctangle.w"
else C_putc(*j);
-#line 711 "cwebdir/ctangle.w"
out_state= num_or_id;break;
/*:59*/
@@ -1174,7 +1174,7 @@
if(is_long_comment){
if(get_line())return comment_continues= true;
else{
-#line 215 "cwebdir/ctang-w2c.ch"
+#line 213 "cwebdir/ctang-w2c.ch"
err_print(_("! Input ended in mid-comment"));
#line 841 "cwebdir/ctangle.w"
@@ -1189,7 +1189,7 @@
}
if(c=='@'){
if(ccode[(eight_bits)*loc]==new_section){
-#line 221 "cwebdir/ctang-w2c.ch"
+#line 219 "cwebdir/ctang-w2c.ch"
err_print(_("! Section name ended in mid-comment"));loc--;
#line 854 "cwebdir/ctangle.w"
@@ -1297,13 +1297,13 @@
while(true){
if(loc>=limit){
if(*(limit-1)!='\\'){
-#line 227 "cwebdir/ctang-w2c.ch"
+#line 225 "cwebdir/ctang-w2c.ch"
err_print(_("! String didn't end"));loc= limit;break;
#line 1005 "cwebdir/ctangle.w"
}
if(get_line()==false){
-#line 233 "cwebdir/ctang-w2c.ch"
+#line 231 "cwebdir/ctang-w2c.ch"
err_print(_("! Input ended in middle of string"));loc= buffer;break;
#line 1009 "cwebdir/ctangle.w"
@@ -1323,7 +1323,7 @@
if(++id_loc<=section_text_end)*id_loc= (char)c;
}
if(id_loc>=section_text_end){
-#line 239 "cwebdir/ctang-w2c.ch"
+#line 237 "cwebdir/ctang-w2c.ch"
printf("%s",_("\n! String too long: "));
#line 1027 "cwebdir/ctangle.w"
@@ -1357,7 +1357,7 @@
switch(c= ccode[(eight_bits)*loc++]){
case ignore:continue;
-#line 245 "cwebdir/ctang-w2c.ch"
+#line 243 "cwebdir/ctang-w2c.ch"
case translit_code:err_print(_("! Use @l in limbo only"));continue;
#line 1042 "cwebdir/ctangle.w"
@@ -1364,7 +1364,7 @@
case control_text:while((c= skip_ahead())=='@');
if(*(loc-1)!='>')
-#line 251 "cwebdir/ctang-w2c.ch"
+#line 249 "cwebdir/ctang-w2c.ch"
err_print(_("! Double @ should be used in control text"));
#line 1047 "cwebdir/ctangle.w"
@@ -1380,7 +1380,7 @@
while(true){
if(loc> limit&&get_line()==false){
-#line 269 "cwebdir/ctang-w2c.ch"
+#line 267 "cwebdir/ctang-w2c.ch"
err_print(_("! Input ended in section name"));
#line 1109 "cwebdir/ctangle.w"
@@ -1396,13 +1396,13 @@
loc+= 2;break;
}
if(ccode[(eight_bits)c]==new_section){
-#line 281 "cwebdir/ctang-w2c.ch"
+#line 279 "cwebdir/ctang-w2c.ch"
err_print(_("! Section name didn't end"));break;
#line 1136 "cwebdir/ctangle.w"
}
if(ccode[(eight_bits)c]==section_name){
-#line 287 "cwebdir/ctang-w2c.ch"
+#line 285 "cwebdir/ctang-w2c.ch"
err_print(_("! Nesting of section names not allowed"));break;
#line 1140 "cwebdir/ctangle.w"
@@ -1420,7 +1420,7 @@
*k= (char)c;
}
if(k>=section_text_end){
-#line 275 "cwebdir/ctang-w2c.ch"
+#line 273 "cwebdir/ctang-w2c.ch"
printf("%s",_("\n! Section name too long: "));
#line 1122 "cwebdir/ctangle.w"
@@ -1468,7 +1468,7 @@
id_first= loc++;*(limit+1)= '@';*(limit+2)= '>';
while(*loc!='@'||*(loc+1)!='>')loc++;
-#line 293 "cwebdir/ctang-w2c.ch"
+#line 291 "cwebdir/ctang-w2c.ch"
if(loc>=limit)err_print(_("! Verbatim string didn't end"));
#line 1154 "cwebdir/ctangle.w"
@@ -1487,7 +1487,7 @@
while(*loc!='\''){
if(*loc=='@'){
if(*(loc+1)!='@')
-#line 257 "cwebdir/ctang-w2c.ch"
+#line 255 "cwebdir/ctang-w2c.ch"
err_print(_("! Double @ should be used in ASCII constant"));
#line 1071 "cwebdir/ctangle.w"
@@ -1495,7 +1495,7 @@
}
loc++;
if(loc> limit){
-#line 263 "cwebdir/ctang-w2c.ch"
+#line 261 "cwebdir/ctang-w2c.ch"
err_print(_("! String didn't end"));loc= limit-1;break;
#line 1077 "cwebdir/ctangle.w"
@@ -1600,7 +1600,7 @@
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 329 "cwebdir/ctang-w2c.ch"
+#line 327 "cwebdir/ctang-w2c.ch"
if(*try_loc=='=')err_print(_("! Missing `@ ' before a named section"));
#line 1279 "cwebdir/ctangle.w"
@@ -1635,7 +1635,7 @@
}
break;
-#line 317 "cwebdir/ctang-w2c.ch"
+#line 315 "cwebdir/ctang-w2c.ch"
case output_defs_code:if(t!=section_name)err_print(_("! Misplaced @h"));
#line 1251 "cwebdir/ctangle.w"
@@ -1673,7 +1673,7 @@
while(id_first<id_loc){
if(*id_first=='@'){
if(*(id_first+1)=='@')id_first++;
-#line 335 "cwebdir/ctang-w2c.ch"
+#line 333 "cwebdir/ctang-w2c.ch"
else err_print(_("! Double @ should be used in string"));
#line 1296 "cwebdir/ctangle.w"
@@ -1727,7 +1727,7 @@
case'\\':c= '\\';break;
case'\'':c= '\'';break;
case'\"':c= '\"';break;
-#line 341 "cwebdir/ctang-w2c.ch"
+#line 339 "cwebdir/ctang-w2c.ch"
default:err_print(_("! Unrecognized escape sequence"));
#line 1345 "cwebdir/ctangle.w"
@@ -1747,7 +1747,7 @@
break;
case definition:case format_code:case begin_C:if(t!=section_name)goto done;
else{
-#line 323 "cwebdir/ctang-w2c.ch"
+#line 321 "cwebdir/ctang-w2c.ch"
err_print(_("! @d, @f and @c are ignored in C text"));continue;
#line 1269 "cwebdir/ctangle.w"
@@ -1763,7 +1763,7 @@
default:app_repl(a);
}
done:next_control= (eight_bits)a;
-#line 311 "cwebdir/ctang-w2c.ch"
+#line 309 "cwebdir/ctang-w2c.ch"
if(text_ptr> text_info_end)overflow(_("text"));
#line 1205 "cwebdir/ctangle.w"
cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr;
@@ -1802,7 +1802,7 @@
while((next_control= get_next())=='\n');
if(next_control!=identifier){
-#line 347 "cwebdir/ctang-w2c.ch"
+#line 345 "cwebdir/ctang-w2c.ch"
err_print(_("! Definition flushed, must start with identifier"));
#line 1418 "cwebdir/ctangle.w"
@@ -1913,7 +1913,7 @@
loc+= 3;
if(loc> limit||!xisxdigit(*(loc-3))||!xisxdigit(*(loc-2))
||(*(loc-3)>='0'&&*(loc-3)<='7')||!xisspace(*(loc-1)))
-#line 367 "cwebdir/ctang-w2c.ch"
+#line 365 "cwebdir/ctang-w2c.ch"
err_print(_("! Improper hex number following @l"));
#line 1517 "cwebdir/ctangle.w"
@@ -1925,7 +1925,7 @@
beg= loc;
while(loc<limit&&(xisalpha(*loc)||xisdigit(*loc)||isxalpha(*loc)))loc++;
if(loc-beg>=translit_length)
-#line 373 "cwebdir/ctang-w2c.ch"
+#line 371 "cwebdir/ctang-w2c.ch"
err_print(_("! Replacement string in @l too long"));
#line 1527 "cwebdir/ctangle.w"
@@ -1942,12 +1942,12 @@
case control_text:if(c=='q'||c=='Q'){
while((c= (char)skip_ahead())=='@');
if(*(loc-1)!='>')
-#line 353 "cwebdir/ctang-w2c.ch"
+#line 351 "cwebdir/ctang-w2c.ch"
err_print(_("! Double @ should be used in control text"));
#line 1499 "cwebdir/ctangle.w"
break;
-#line 360 "cwebdir/ctang-w2c.ch"
+#line 358 "cwebdir/ctang-w2c.ch"
}/* otherwise fall through */
default:err_print(_("! Double @ should be used in limbo"));
#line 1503 "cwebdir/ctangle.w"
@@ -1962,7 +1962,7 @@
void
print_stats(void){
-#line 386 "cwebdir/ctang-w2c.ch"
+#line 384 "cwebdir/ctang-w2c.ch"
puts(_("\nMemory usage statistics:"));
printf(_("%td names (out of %ld)\n"),
(ptrdiff_t)(name_ptr-name_dir),(long)max_names);
@@ -1975,5 +1975,5 @@
(ptrdiff_t)(tok_ptr-tok_mem),(long)max_toks);
}
-#line 399 "cwebdir/ctang-w2c.ch"
+#line 397 "cwebdir/ctang-w2c.ch"
/*:103*/
Modified: trunk/Build/source/texk/web2c/cwebboot.cin
===================================================================
--- trunk/Build/source/texk/web2c/cwebboot.cin 2025-04-17 14:42:56 UTC (rev 74966)
+++ trunk/Build/source/texk/web2c/cwebboot.cin 2025-04-17 15:04:23 UTC (rev 74967)
@@ -72,12 +72,12 @@
#define period_ast 026
#define minus_gt_ast 027
#define compress(c) if(loc++<=limit) return c
-#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 xisalpha(c) (isalpha((int) (c) ) &&!ishigh(c) )
+#define xisdigit(c) (isdigit((int) (c) ) &&!ishigh(c) )
+#define xisspace(c) (isspace((int) (c) ) &&!ishigh(c) )
+#define xislower(c) (islower((int) (c) ) &&!ishigh(c) )
+#define xisupper(c) (isupper((int) (c) ) &&!ishigh(c) )
+#define xisxdigit(c) (isxdigit((int) (c) ) &&!ishigh(c) )
#define isxalpha(c) ((c) =='_'||(c) =='$')
#define ishigh(c) ((eight_bits) (c) > 0177)
#define max_include_depth 10
Modified: trunk/Build/source/texk/web2c/cwebdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ChangeLog 2025-04-17 14:42:56 UTC (rev 74966)
+++ trunk/Build/source/texk/web2c/cwebdir/ChangeLog 2025-04-17 15:04:23 UTC (rev 74967)
@@ -1,3 +1,13 @@
+2025-04-17 Andreas Scherer <https://ascherer.github.io>
+
+ * Makefile,
+ * comm-w2c.h,
+ * common.c,
+ * common.h,
+ * ctang-w2c.ch,
+ * ctangle.c,
+ * ctangle.w: Make proper use of 'ishigh' macro.
+
2025-04-09 Andreas Scherer <https://ascherer.github.io>
* comm-bs.ch,
Modified: trunk/Build/source/texk/web2c/cwebdir/Makefile
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/Makefile 2025-04-17 14:42:56 UTC (rev 74966)
+++ trunk/Build/source/texk/web2c/cwebdir/Makefile 2025-04-17 15:04:23 UTC (rev 74967)
@@ -56,7 +56,7 @@
#LINKFLAGS = -s # for smaller (stripped) executables on many UNIX systems
# What C compiler are you using?
-CC = cc
+#CC = cc
# RM and CP are used below in case rm and cp are aliased
RM= /bin/rm
Modified: trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h 2025-04-17 14:42:56 UTC (rev 74966)
+++ trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h 2025-04-17 15:04:23 UTC (rev 74967)
@@ -97,12 +97,12 @@
extern char *id_loc; /* just after the current identifier in the buffer */
@ Code related to input routines:
- at d xisalpha(c) (isalpha((int)(c))&&((eight_bits)(c)<0200))
- at d xisdigit(c) (isdigit((int)(c))&&((eight_bits)(c)<0200))
- at d xisspace(c) (isspace((int)(c))&&((eight_bits)(c)<0200))
- at d xislower(c) (islower((int)(c))&&((eight_bits)(c)<0200))
- at d xisupper(c) (isupper((int)(c))&&((eight_bits)(c)<0200))
- at d xisxdigit(c) (isxdigit((int)(c))&&((eight_bits)(c)<0200))
+ at d xisalpha(c) (isalpha((int)(c))&&!ishigh(c))
+ at d xisdigit(c) (isdigit((int)(c))&&!ishigh(c))
+ at d xisspace(c) (isspace((int)(c))&&!ishigh(c))
+ at d xislower(c) (islower((int)(c))&&!ishigh(c))
+ at d xisupper(c) (isupper((int)(c))&&!ishigh(c))
+ at d xisxdigit(c) (isxdigit((int)(c))&&!ishigh(c))
@d isxalpha(c) ((c)=='_' || (c)=='$')
/* non-alpha characters allowed in identifier */
@d ishigh(c) ((eight_bits)(c)>0177)
Modified: trunk/Build/source/texk/web2c/cwebdir/common.c
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/common.c 2025-04-17 14:42:56 UTC (rev 74966)
+++ trunk/Build/source/texk/web2c/cwebdir/common.c 2025-04-17 15:04:23 UTC (rev 74967)
@@ -33,12 +33,12 @@
#define period_ast 026
#define minus_gt_ast 027
#define compress(c) if(loc++<=limit) return c
-#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 xisalpha(c) (isalpha((int) (c) ) &&!ishigh(c) )
+#define xisdigit(c) (isdigit((int) (c) ) &&!ishigh(c) )
+#define xisspace(c) (isspace((int) (c) ) &&!ishigh(c) )
+#define xislower(c) (islower((int) (c) ) &&!ishigh(c) )
+#define xisupper(c) (isupper((int) (c) ) &&!ishigh(c) )
+#define xisxdigit(c) (isxdigit((int) (c) ) &&!ishigh(c) )
#define isxalpha(c) ((c) =='_'||(c) =='$')
#define ishigh(c) ((eight_bits) (c) > 0177)
#define max_include_depth 10
Modified: trunk/Build/source/texk/web2c/cwebdir/common.h
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/common.h 2025-04-17 14:42:56 UTC (rev 74966)
+++ trunk/Build/source/texk/web2c/cwebdir/common.h 2025-04-17 15:04:23 UTC (rev 74967)
@@ -81,12 +81,12 @@
extern char *id_loc; /* just after the current identifier in the buffer */
@ Code related to input routines:
- at d xisalpha(c) (isalpha((int)(c))&&((eight_bits)(c)<0200))
- at d xisdigit(c) (isdigit((int)(c))&&((eight_bits)(c)<0200))
- at d xisspace(c) (isspace((int)(c))&&((eight_bits)(c)<0200))
- at d xislower(c) (islower((int)(c))&&((eight_bits)(c)<0200))
- at d xisupper(c) (isupper((int)(c))&&((eight_bits)(c)<0200))
- at d xisxdigit(c) (isxdigit((int)(c))&&((eight_bits)(c)<0200))
+ at d xisalpha(c) (isalpha((int)(c))&&!ishigh(c))
+ at d xisdigit(c) (isdigit((int)(c))&&!ishigh(c))
+ at d xisspace(c) (isspace((int)(c))&&!ishigh(c))
+ at d xislower(c) (islower((int)(c))&&!ishigh(c))
+ at d xisupper(c) (isupper((int)(c))&&!ishigh(c))
+ at d xisxdigit(c) (isxdigit((int)(c))&&!ishigh(c))
@d isxalpha(c) ((c)=='_' || (c)=='$')
/* non-alpha characters allowed in identifier */
@d ishigh(c) ((eight_bits)(c)>0177)
Modified: trunk/Build/source/texk/web2c/cwebdir/ctang-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctang-w2c.ch 2025-04-17 14:42:56 UTC (rev 74966)
+++ trunk/Build/source/texk/web2c/cwebdir/ctang-w2c.ch 2025-04-17 15:04:23 UTC (rev 74967)
@@ -193,9 +193,8 @@
@z
@x [6.59] l.708
- if ((eight_bits)(*j)<0200) C_putc(*j);
+ if (ishigh(*j)) C_printf("%s",translit[(eight_bits)(*j)-0200]);
@^high-bit character handling@>
- else C_printf("%s",translit[(eight_bits)(*j)-0200]);
@y
if (ishigh(*j)) {
@^high-bit character handling@>
@@ -206,7 +205,6 @@
}
C_printf("%s",translit[(eight_bits)(*j)-0200]);
}
- else C_putc(*j);
@z
@x [7.67] l.840
Modified: trunk/Build/source/texk/web2c/cwebdir/ctangle.c
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctangle.c 2025-04-17 14:42:56 UTC (rev 74966)
+++ trunk/Build/source/texk/web2c/cwebdir/ctangle.c 2025-04-17 15:04:23 UTC (rev 74967)
@@ -34,12 +34,12 @@
#define period_ast 026
#define minus_gt_ast 027
#define compress(c) if(loc++<=limit) return c
-#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 xisalpha(c) (isalpha((int) (c) ) &&!ishigh(c) )
+#define xisdigit(c) (isdigit((int) (c) ) &&!ishigh(c) )
+#define xisspace(c) (isspace((int) (c) ) &&!ishigh(c) )
+#define xislower(c) (islower((int) (c) ) &&!ishigh(c) )
+#define xisupper(c) (isupper((int) (c) ) &&!ishigh(c) )
+#define xisxdigit(c) (isxdigit((int) (c) ) &&!ishigh(c) )
#define isxalpha(c) ((c) =='_'||(c) =='$')
#define ishigh(c) ((eight_bits) (c) > 0177)
#define max_include_depth 10
@@ -721,7 +721,7 @@
C_printf("%s","#define ");
out_state= normal;
protect= true;
-do macro_end--;while('\n'==*macro_end||' '==*macro_end);
+do macro_end--;while(isspace(*macro_end)&&plus_plus!=*macro_end);
while(cur_byte<=macro_end){
a= *cur_byte++;
@@ -768,9 +768,9 @@
if(out_state==num_or_id)C_putc(' ');
for(j= (cur_val+name_dir)->byte_start;
j<(cur_val+name_dir+1)->byte_start;j++)
-if((eight_bits)(*j)<0200)C_putc(*j);
+if(ishigh(*j))C_printf("%s",translit[(eight_bits)(*j)-0200]);
-else C_printf("%s",translit[(eight_bits)(*j)-0200]);
+else C_putc(*j);
out_state= num_or_id;break;
/*:59*/
Modified: trunk/Build/source/texk/web2c/cwebdir/ctangle.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctangle.w 2025-04-17 14:42:56 UTC (rev 74966)
+++ trunk/Build/source/texk/web2c/cwebdir/ctangle.w 2025-04-17 15:04:23 UTC (rev 74967)
@@ -600,8 +600,8 @@
C_printf("%s","#define ");
out_state=normal;
protect=true; /* newlines should be preceded by |'\\'| */
- do macro_end--; while ('\n'==*macro_end||' '==*macro_end);
- /* discard trailing whitespace */
+ do macro_end--; while (isspace(*macro_end)&&plus_plus!=*macro_end);
+ /* discard trailing whitespace; |plus_plus=='\v'| */
while (cur_byte<=macro_end) {
a=*cur_byte++;
if (out_state==verbatim && a!=string && a!=constant && a!='\n')
@@ -705,9 +705,9 @@
if (out_state==num_or_id) C_putc(' ');
for (j=(cur_val+name_dir)->byte_start;
j<(cur_val+name_dir+1)->byte_start; j++)
- if ((eight_bits)(*j)<0200) C_putc(*j);
+ if (ishigh(*j)) C_printf("%s",translit[(eight_bits)(*j)-0200]);
@^high-bit character handling@>
- else C_printf("%s",translit[(eight_bits)(*j)-0200]);
+ else C_putc(*j);
out_state=num_or_id; break;
@ @<Case of a sec...@>=@t\1\quad@>
More information about the tex-live-commits
mailing list.