diff options
author | Andreas Scherer <andreas_tex@freenet.de> | 2022-02-19 14:47:45 +0000 |
---|---|---|
committer | Andreas Scherer <andreas_tex@freenet.de> | 2022-02-19 14:47:45 +0000 |
commit | 0b7885c804ec25f34fda3850dc3eb5c2ad4a77ef (patch) | |
tree | 7b742ca6a366b92e7b5a6bc52e0c8495d29bd729 /Build/source/texk/web2c/cwebdir/ctangle.w | |
parent | f24f04a22ae783e1c347ec69b2c1f23606c1dcf8 (diff) |
[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).
git-svn-id: svn://tug.org/texlive/trunk@62084 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/cwebdir/ctangle.w')
-rw-r--r-- | Build/source/texk/web2c/cwebdir/ctangle.w | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/cwebdir/ctangle.w b/Build/source/texk/web2c/cwebdir/ctangle.w index 62d12290ff8..c2fc88af747 100644 --- a/Build/source/texk/web2c/cwebdir/ctangle.w +++ b/Build/source/texk/web2c/cwebdir/ctangle.w @@ -1243,7 +1243,7 @@ file name. @ @<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 ) ) ) |