texlive[74891] Build/source/texk/web2c: [CWEB] Revert bool change for
commits+ascherer at tug.org
commits+ascherer at tug.org
Wed Apr 9 12:41:10 CEST 2025
Revision: 74891
https://tug.org/svn/texlive?view=revision&revision=74891
Author: ascherer
Date: 2025-04-09 12:41:10 +0200 (Wed, 09 Apr 2025)
Log Message:
-----------
[CWEB] Revert bool change for C23.
Plain CWEB 4 uses <stdbool.h> all along.
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/comm-w2c.ch
trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h
trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
Modified: trunk/Build/source/texk/web2c/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ChangeLog 2025-04-08 23:42:11 UTC (rev 74890)
+++ trunk/Build/source/texk/web2c/ChangeLog 2025-04-09 10:41:10 UTC (rev 74891)
@@ -1,3 +1,8 @@
+2025-04-09 Andreas Scherer <https://ascherer.github.io>
+
+ * ctangleboot.cin,
+ * cwebboot.cin: Revert bool change for C23.
+
2025-03-31 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-08 23:42:11 UTC (rev 74890)
+++ trunk/Build/source/texk/web2c/ctangleboot.cin 2025-04-09 10:41:10 UTC (rev 74891)
@@ -2,10 +2,10 @@
#line 66 "cwebdir/ctangle.w"
/*5:*/
-#line 57 "cwebdir/comm-w2c.h"
+#line 54 "cwebdir/comm-w2c.h"
#include <ctype.h>
-#include <kpathsea/simpletypes.h>
+#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
@@ -15,15 +15,15 @@
#ifndef HAVE_GETTEXT
#define HAVE_GETTEXT 0
#endif
-#line 69 "cwebdir/comm-w2c.h"
+#line 66 "cwebdir/comm-w2c.h"
#if HAVE_GETTEXT
#include <libintl.h>
#else
-#line 73 "cwebdir/comm-w2c.h"
+#line 70 "cwebdir/comm-w2c.h"
#define gettext(a) a
#endif
-#line 75 "cwebdir/comm-w2c.h"
+#line 72 "cwebdir/comm-w2c.h"
/*:5*/
#line 67 "cwebdir/ctangle.w"
@@ -140,8 +140,9 @@
#line 68 "cwebdir/ctangle.w"
/*3:*/
-#line 33 "cwebdir/comm-w2c.h"
+#line 32 "cwebdir/comm-w2c.h"
+typedef bool boolean;
typedef uint8_t eight_bits;
typedef uint16_t sixteen_bits;
typedef enum{
@@ -151,7 +152,7 @@
extern int phase;
/*:3*//*6:*/
-#line 97 "cwebdir/comm-w2c.h"
+#line 94 "cwebdir/comm-w2c.h"
extern char section_text[];
extern char*section_text_end;
@@ -159,7 +160,7 @@
extern char*id_loc;
/*:6*//*7:*/
-#line 115 "cwebdir/comm-w2c.h"
+#line 112 "cwebdir/comm-w2c.h"
extern char buffer[];
extern char*buffer_end;
@@ -167,7 +168,7 @@
extern char*limit;
/*:7*//*8:*/
-#line 132 "cwebdir/comm-w2c.h"
+#line 129 "cwebdir/comm-w2c.h"
extern int include_depth;
extern FILE*file[];
@@ -184,7 +185,7 @@
extern boolean web_file_open;
/*:8*//*10:*/
-#line 153 "cwebdir/comm-w2c.h"
+#line 150 "cwebdir/comm-w2c.h"
extern sixteen_bits section_count;
extern boolean changed_section[];
@@ -192,7 +193,7 @@
extern boolean print_where;
/*:10*//*11:*/
-#line 168 "cwebdir/comm-w2c.h"
+#line 165 "cwebdir/comm-w2c.h"
typedef struct name_info{
char*byte_start;
@@ -217,12 +218,12 @@
extern hash_pointer hash_ptr;
/*:11*//*13:*/
-#line 213 "cwebdir/comm-w2c.h"
+#line 210 "cwebdir/comm-w2c.h"
extern int history;
/*:13*//*15:*/
-#line 234 "cwebdir/comm-w2c.h"
+#line 231 "cwebdir/comm-w2c.h"
extern int argc;
extern char**argv;
@@ -235,7 +236,7 @@
extern const char*use_language;
/*:15*//*16:*/
-#line 250 "cwebdir/comm-w2c.h"
+#line 247 "cwebdir/comm-w2c.h"
extern FILE*C_file;
extern FILE*tex_file;
@@ -358,7 +359,7 @@
extern void common_init(void);
/*:4*//*9:*/
-#line 147 "cwebdir/comm-w2c.h"
+#line 144 "cwebdir/comm-w2c.h"
extern boolean get_line(void);
extern void check_complete(void);
@@ -365,7 +366,7 @@
extern void reset_input(void);
/*:9*//*12:*/
-#line 191 "cwebdir/comm-w2c.h"
+#line 188 "cwebdir/comm-w2c.h"
extern name_pointer id_lookup(const char*,const char*,eight_bits);
@@ -379,7 +380,7 @@
extern void init_node(name_pointer);
/*:12*//*14:*/
-#line 216 "cwebdir/comm-w2c.h"
+#line 213 "cwebdir/comm-w2c.h"
extern int wrap_up(void);
extern void err_print(const char*);
Modified: trunk/Build/source/texk/web2c/cwebboot.cin
===================================================================
--- trunk/Build/source/texk/web2c/cwebboot.cin 2025-04-08 23:42:11 UTC (rev 74890)
+++ trunk/Build/source/texk/web2c/cwebboot.cin 2025-04-09 10:41:10 UTC (rev 74891)
@@ -2,10 +2,10 @@
#line 62 "cwebdir/common.w"
/*4:*/
-#line 57 "cwebdir/comm-w2c.h"
+#line 54 "cwebdir/comm-w2c.h"
#include <ctype.h>
-#include <kpathsea/simpletypes.h>
+#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
@@ -15,15 +15,15 @@
#ifndef HAVE_GETTEXT
#define HAVE_GETTEXT 0
#endif
-#line 69 "cwebdir/comm-w2c.h"
+#line 66 "cwebdir/comm-w2c.h"
#if HAVE_GETTEXT
#include <libintl.h>
#else
-#line 73 "cwebdir/comm-w2c.h"
+#line 70 "cwebdir/comm-w2c.h"
#define gettext(a) a
#endif
-#line 75 "cwebdir/comm-w2c.h"
+#line 72 "cwebdir/comm-w2c.h"
/*:4*//*91:*/
#line 739 "cwebdir/comm-w2c.ch"
@@ -41,6 +41,8 @@
/*:91*//*93:*/
#line 786 "cwebdir/comm-w2c.ch"
+typedef bool boolean;
+#define HAVE_BOOLEAN 1
#include <kpathsea/kpathsea.h>
#include <w2c/config.h>
@@ -47,7 +49,7 @@
#include <lib/lib.h>
/*:93*//*96:*/
-#line 823 "cwebdir/comm-w2c.ch"
+#line 825 "cwebdir/comm-w2c.ch"
#define CWEB
#include "help.h"
@@ -150,8 +152,9 @@
#line 64 "cwebdir/common.w"
/*2:*/
-#line 33 "cwebdir/comm-w2c.h"
+#line 32 "cwebdir/comm-w2c.h"
+typedef bool boolean;
typedef uint8_t eight_bits;
typedef uint16_t sixteen_bits;
typedef enum{
@@ -161,7 +164,7 @@
extern int phase;
/*:2*//*5:*/
-#line 97 "cwebdir/comm-w2c.h"
+#line 94 "cwebdir/comm-w2c.h"
extern char section_text[];
extern char*section_text_end;
@@ -169,7 +172,7 @@
extern char*id_loc;
/*:5*//*6:*/
-#line 115 "cwebdir/comm-w2c.h"
+#line 112 "cwebdir/comm-w2c.h"
extern char buffer[];
extern char*buffer_end;
@@ -177,7 +180,7 @@
extern char*limit;
/*:6*//*7:*/
-#line 132 "cwebdir/comm-w2c.h"
+#line 129 "cwebdir/comm-w2c.h"
extern int include_depth;
extern FILE*file[];
@@ -194,7 +197,7 @@
extern boolean web_file_open;
/*:7*//*9:*/
-#line 153 "cwebdir/comm-w2c.h"
+#line 150 "cwebdir/comm-w2c.h"
extern sixteen_bits section_count;
extern boolean changed_section[];
@@ -202,7 +205,7 @@
extern boolean print_where;
/*:9*//*10:*/
-#line 168 "cwebdir/comm-w2c.h"
+#line 165 "cwebdir/comm-w2c.h"
typedef struct name_info{
char*byte_start;
@@ -227,12 +230,12 @@
extern hash_pointer hash_ptr;
/*:10*//*12:*/
-#line 213 "cwebdir/comm-w2c.h"
+#line 210 "cwebdir/comm-w2c.h"
extern int history;
/*:12*//*14:*/
-#line 234 "cwebdir/comm-w2c.h"
+#line 231 "cwebdir/comm-w2c.h"
extern int argc;
extern char**argv;
@@ -245,7 +248,7 @@
extern const char*use_language;
/*:14*//*15:*/
-#line 250 "cwebdir/comm-w2c.h"
+#line 247 "cwebdir/comm-w2c.h"
extern FILE*C_file;
extern FILE*tex_file;
@@ -398,7 +401,7 @@
extern void common_init(void);
/*:3*//*8:*/
-#line 147 "cwebdir/comm-w2c.h"
+#line 144 "cwebdir/comm-w2c.h"
extern boolean get_line(void);
extern void check_complete(void);
@@ -405,7 +408,7 @@
extern void reset_input(void);
/*:8*//*11:*/
-#line 191 "cwebdir/comm-w2c.h"
+#line 188 "cwebdir/comm-w2c.h"
extern name_pointer id_lookup(const char*,const char*,eight_bits);
@@ -419,7 +422,7 @@
extern void init_node(name_pointer);
/*:11*//*13:*/
-#line 216 "cwebdir/comm-w2c.h"
+#line 213 "cwebdir/comm-w2c.h"
extern int wrap_up(void);
extern void err_print(const char*);
@@ -459,7 +462,7 @@
#line 514 "cwebdir/comm-w2c.ch"
/*:76*//*98:*/
-#line 836 "cwebdir/comm-w2c.ch"
+#line 838 "cwebdir/comm-w2c.ch"
static void cb_usage(const_string str);
static void cb_usagehelp(const_string*message);
@@ -487,7 +490,7 @@
#line 78 "cwebdir/comm-w2c.ch"
/*94:*/
-#line 798 "cwebdir/comm-w2c.ch"
+#line 800 "cwebdir/comm-w2c.ch"
kpse_set_program_name(argv[0],"cweb");
@@ -1413,7 +1416,7 @@
if(strcmp("-help",*argv)==0||strcmp("--help",*argv)==0)
/*97:*/
-#line 827 "cwebdir/comm-w2c.ch"
+#line 829 "cwebdir/comm-w2c.ch"
cb_usagehelp(program==ctangle?CTANGLEHELP:
program==cweave?CWEAVEHELP:CTWILLHELP);
@@ -1425,7 +1428,7 @@
if(strcmp("-version",*argv)==0||strcmp("--version",*argv)==0)
/*100:*/
-#line 873 "cwebdir/comm-w2c.ch"
+#line 875 "cwebdir/comm-w2c.ch"
printversionandexit(cb_banner,
program==ctwill?"Donald E. Knuth":"Silvio Levy and Donald E. Knuth",
@@ -1599,7 +1602,7 @@
}
/*:75*//*99:*/
-#line 840 "cwebdir/comm-w2c.ch"
+#line 842 "cwebdir/comm-w2c.ch"
static void cb_usage(const_string str)
{
@@ -1631,7 +1634,7 @@
}
/*:99*//*101:*/
-#line 881 "cwebdir/comm-w2c.ch"
+#line 883 "cwebdir/comm-w2c.ch"
void cb_show_banner(void)
{
Modified: trunk/Build/source/texk/web2c/cwebdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ChangeLog 2025-04-08 23:42:11 UTC (rev 74890)
+++ trunk/Build/source/texk/web2c/cwebdir/ChangeLog 2025-04-09 10:41:10 UTC (rev 74891)
@@ -1,3 +1,10 @@
+2025-04-09 Andreas Scherer <https://ascherer.github.io>
+
+ * comm-w2c.ch,
+ * comm-w2c.h,
+ * ctwill-mini.ch,
+ * ctwill-w2c.ch: Revert bool change for C23.
+
2025-03-31 Andreas Scherer <https://ascherer.github.io>
* common.c,
Modified: trunk/Build/source/texk/web2c/cwebdir/comm-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/comm-w2c.ch 2025-04-08 23:42:11 UTC (rev 74890)
+++ trunk/Build/source/texk/web2c/cwebdir/comm-w2c.ch 2025-04-09 10:41:10 UTC (rev 74891)
@@ -784,6 +784,8 @@
@d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true)
@<Include files@>=
+typedef bool boolean;
+#define HAVE_BOOLEAN 1
#include <kpathsea/kpathsea.h> /* include every \Kpathsea/ header;
|@!kpathsea_debug|, |@!const_string|, |@!string| */
#include <w2c/config.h> /* \&{integer} */
Modified: trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h 2025-04-08 23:42:11 UTC (rev 74890)
+++ trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h 2025-04-09 10:41:10 UTC (rev 74891)
@@ -29,8 +29,8 @@
@i iso_types.w
- at s boolean bool
@<Common code...@>=@^system dependencies@>
+typedef bool boolean;
typedef uint8_t eight_bits;
typedef uint16_t sixteen_bits;
typedef enum {
@@ -48,15 +48,12 @@
`|@!gettext|' function from the ``GNU~gettext utilities.'' For systems that do
not have this library installed, we wrap things for neutral behavior without
internationalization.
-For backward compatibility with pre-{\mc ANSI} compilers, we replace the
-``standard'' header file `\.{stdbool.h}' with the@^system dependencies@>
-{\mc KPATHSEA\spacefactor1000} interface `\.{simpletypes.h}'.
@d _(s) gettext(s)
@<Include files@>=
#include <ctype.h> /* definition of |@!isalpha|, |@!isdigit| and so on */
-#include <kpathsea/simpletypes.h> /* |@!boolean|, |@!true| and |@!false| */
+#include <stdbool.h> /* definition of |@!bool|, |@!true| and |@!false| */
#include <stddef.h> /* definition of |@!ptrdiff_t| */
#include <stdint.h> /* definition of |@!uint8_t| and |@!uint16_t| */
#include <stdio.h> /* definition of |@!printf| and friends */
Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch 2025-04-08 23:42:11 UTC (rev 74890)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch 2025-04-09 10:41:10 UTC (rev 74891)
@@ -88,12 +88,6 @@
Section 5.
@x
-For backward compatibility with pre-{\mc ANSI} compilers, we replace the
- at y
-And we replace the
- at z
-
- at x
@d _(s) gettext(s)
@y
@d _(s) gettext(s)
@@ -1657,9 +1651,12 @@
Section 215.
@x
-@<Append a \9{s}string or...@>={@+ int count=-1; /* characters remaining before string break */
+ if (count==0) { /* insert a discretionary break in a long string */
+ app_str(@q(@>@q{@>"}\\)\\.{"@q}@>); count=20;
@y
-@<Append a \9{s}string or...@>={@+ int count=-1; /* characters remaining before string break */
+ if (count==0) {
+ count=20; @/ /* insert a discretionary break in a long string */
+ app_str(@q(@>@q{@>"}\\)\\.{"@q}@>);
@z
Section 220.
@@ -1903,6 +1900,14 @@
@ @<Translate the \9{c}current section@>= @+ {
@z
+Section 249.
+
+ at x
+ case section_name: loc-=2; next_control=get_next(); /* reprocess */
+ at y
+ case section_name: @/ loc-=2; @/ next_control=get_next(); /* reprocess */
+ at z
+
Section 251.
@x
@@ -2327,6 +2332,7 @@
@y
@d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true)
@-name@>
+ at -HAVE_BOOLEAN@>
@z
Section 329.
Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch 2025-04-08 23:42:11 UTC (rev 74890)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch 2025-04-09 10:41:10 UTC (rev 74891)
@@ -2015,6 +2015,8 @@
@d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true)
@<Include files@>=
+typedef bool boolean;
+#define HAVE_BOOLEAN 1
#include <kpathsea/tex-file.h> /* |@!kpse_find_file| */
@ @<Set up |cur_file_name|...@>=
More information about the tex-live-commits
mailing list.