texlive[62084] Build/source/texk/web2c: [CWEB] Permit indentation of
commits+ascherer at tug.org
commits+ascherer at tug.org
Sat Feb 19 15:47:45 CET 2022
Revision: 62084
http://tug.org/svn/texlive?view=revision&revision=62084
Author: ascherer
Date: 2022-02-19 15:47:45 +0100 (Sat, 19 Feb 2022)
Log Message:
-----------
[CWEB] Permit indentation of preprocessing directives.
The C processor allows whitespace before and after the '#' of
preprocessing directives, e.g., some MetaPost code uses this feature.
In order to permit more liberal code layout, we only expect the '#'
to be the first character in the buffer, followed by some optional
whitespace. CWEB takes care that 'id_first' is the first non-whitespace
character in the 'buffer' (and 'id_loc' is the first character _after_
the directive name).
Modified Paths:
--------------
trunk/Build/source/texk/web2c/ctangleboot.cin
trunk/Build/source/texk/web2c/cwebdir/ctangle.c
trunk/Build/source/texk/web2c/cwebdir/ctangle.w
Modified: trunk/Build/source/texk/web2c/ctangleboot.cin
===================================================================
--- trunk/Build/source/texk/web2c/ctangleboot.cin 2022-02-19 00:49:40 UTC (rev 62083)
+++ trunk/Build/source/texk/web2c/ctangleboot.cin 2022-02-19 14:47:45 UTC (rev 62084)
@@ -1599,7 +1599,7 @@
#line 1244 "cwebdir/ctangle.w"
case identifier:store_id(a);
-if(*buffer=='#'&&id_first==buffer+1&&(
+if(*buffer=='#'&&(
(id_loc-id_first==5&&strncmp("endif",id_first,5)==0)||
(id_loc-id_first==4&&strncmp("else",id_first,4)==0)||
(id_loc-id_first==4&&strncmp("elif",id_first,4)==0)))
Modified: trunk/Build/source/texk/web2c/cwebdir/ctangle.c
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctangle.c 2022-02-19 00:49:40 UTC (rev 62083)
+++ trunk/Build/source/texk/web2c/cwebdir/ctangle.c 2022-02-19 14:47:45 UTC (rev 62084)
@@ -1282,7 +1282,7 @@
#line 1244 "ctangle.w"
case identifier:store_id(a);
-if(*buffer=='#'&&id_first==buffer+1&&(
+if(*buffer=='#'&&(
(id_loc-id_first==5&&strncmp("endif",id_first,5)==0)||
(id_loc-id_first==4&&strncmp("else",id_first,4)==0)||
(id_loc-id_first==4&&strncmp("elif",id_first,4)==0)))
Modified: trunk/Build/source/texk/web2c/cwebdir/ctangle.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctangle.w 2022-02-19 00:49:40 UTC (rev 62083)
+++ trunk/Build/source/texk/web2c/cwebdir/ctangle.w 2022-02-19 14:47:45 UTC (rev 62084)
@@ -1243,7 +1243,7 @@
@ @<In cases that |a| is...@>=@t\1\quad@>
case identifier: store_id(a);
- if (*buffer=='#' && id_first==buffer+1 && @| (
+ if (*buffer=='#' && @| (
( id_loc-id_first==5 && strncmp("endif",id_first,5)==0 ) || @|
( id_loc-id_first==4 && strncmp("else",id_first,4)==0 ) || @|
( id_loc-id_first==4 && strncmp("elif",id_first,4)==0 ) ) )
More information about the tex-live-commits
mailing list.