From 0b7885c804ec25f34fda3850dc3eb5c2ad4a77ef Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Sat, 19 Feb 2022 14:47:45 +0000 Subject: [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 --- Build/source/texk/web2c/cwebdir/ctangle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Build/source/texk/web2c/cwebdir/ctangle.c') diff --git a/Build/source/texk/web2c/cwebdir/ctangle.c b/Build/source/texk/web2c/cwebdir/ctangle.c index 7677ce1f323..b6037a87dd9 100644 --- a/Build/source/texk/web2c/cwebdir/ctangle.c +++ b/Build/source/texk/web2c/cwebdir/ctangle.c @@ -1282,7 +1282,7 @@ while(true)switch(a= get_next()){ #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))) -- cgit v1.2.3