diff options
Diffstat (limited to 'Build/source')
50 files changed, 609 insertions, 438 deletions
diff --git a/Build/source/texk/detex/detex-2.8-PATCHES/ChangeLog b/Build/source/texk/detex/detex-2.8-PATCHES/ChangeLog index 8ec8c93eaef..3b7acb51cf3 100644 --- a/Build/source/texk/detex/detex-2.8-PATCHES/ChangeLog +++ b/Build/source/texk/detex/detex-2.8-PATCHES/ChangeLog @@ -2,6 +2,7 @@ patch-10-ANSI (new): Replace index() => strchr() and rindex() => strrchr(). + patch-11-c_auto_h (new): First #include <c-auto.h>. 2012-08-24 Peter Breitenlohner <peb@mppmu.mpg.de> diff --git a/Build/source/texk/detex/detex-2.8-PATCHES/patch-11-c_auto_h b/Build/source/texk/detex/detex-2.8-PATCHES/patch-11-c_auto_h new file mode 100644 index 00000000000..e88dad2ad37 --- /dev/null +++ b/Build/source/texk/detex/detex-2.8-PATCHES/patch-11-c_auto_h @@ -0,0 +1,21 @@ +diff -ur -x detex.c detex-2.8.orig/detex.l detex-2.8/detex.l +--- detex-2.8.orig/detex.l 2013-06-27 18:49:05.000000000 +0200 ++++ detex-2.8/detex.l 2013-06-28 14:46:12.000000000 +0200 +@@ -1,6 +1,6 @@ + %option never-interactive + +-%{ ++%top{ + #ifndef lint + static char rcsid[] = "$Header: /p/src/local/bin/detex/RCS/detex.l,v 2.22 2007/03/01 20:22:01 trinkle Exp trinkle $"; + #endif +@@ -89,7 +89,9 @@ + #endif + + #endif /* KPATHSEA */ ++} + ++%{ + #undef IGNORE + + #define LaBEGIN if (fLatex) BEGIN diff --git a/Build/source/texk/detex/detex-2.8/detex.c b/Build/source/texk/detex/detex-2.8/detex.c index 58188654f02..bc9a5b60a90 100644 --- a/Build/source/texk/detex/detex-2.8/detex.c +++ b/Build/source/texk/detex/detex-2.8/detex.c @@ -1,5 +1,96 @@ +#line 4 "detex.l" +#ifndef lint +static char rcsid[] = "$Header: /p/src/local/bin/detex/RCS/detex.l,v 2.22 2007/03/01 20:22:01 trinkle Exp trinkle $"; +#endif + +/* + * Copyright (c) 1986-2007 Purdue University + * All rights reserved. + * + * Developed by: Daniel Trinkle + * Department of Computer Science, Purdue University + * http://www.cs.purdue.edu/ + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal with the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimers. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the names of Daniel Trinkle, Purdue University, nor the + * names of its contributors may be used to endorse or promote products + * derived from this Software without specific prior written + * permission. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + */ + -#line 3 "detex.c" +/* + * detex [-e environment-list] [-c] [-l] [-n] [-s] [-t] [-w] [file[.tex] ] + * + * This program is used to remove TeX or LaTeX constructs from a text + * file. + */ + +#include "detex.h" + +#ifdef KPATHSEA + +#include <c-auto.h> +#include <kpathsea/c-auto.h> +#include <kpathsea/config.h> +#include <kpathsea/c-memstr.h> +#include <kpathsea/c-pathmx.h> +#include <kpathsea/c-std.h> +#include <kpathsea/tex-file.h> + +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif + +#else /* KPATHSEA */ + +#ifdef HAVE_STRING_H +#include <string.h> +#else +#include <strings.h> +#define strchr index +#define strrchr rindex +#endif +#ifndef MAXPATHLEN +#include <sys/param.h> +#endif +#define PATH_MAX MAXPATHLEN +#ifdef OS2 +#include <stdlib.h> +#endif + +#ifdef WIN32 +#include <fcntl.h> +#include <io.h> +#endif + +#endif /* KPATHSEA */ + + + +#line 94 "detex.c" #define YY_INT_ALIGNED short int @@ -1461,96 +1552,8 @@ int yy_flex_debug = 0; #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "detex.l" -#line 4 "detex.l" -#ifndef lint -static char rcsid[] = "$Header: /p/src/local/bin/detex/RCS/detex.l,v 2.22 2007/03/01 20:22:01 trinkle Exp trinkle $"; -#endif - -/* - * Copyright (c) 1986-2007 Purdue University - * All rights reserved. - * - * Developed by: Daniel Trinkle - * Department of Computer Science, Purdue University - * http://www.cs.purdue.edu/ - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal with the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * o Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimers. - * - * o Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimers in the - * documentation and/or other materials provided with the distribution. - * - * o Neither the names of Daniel Trinkle, Purdue University, nor the - * names of its contributors may be used to endorse or promote products - * derived from this Software without specific prior written - * permission. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. - */ - - -/* - * detex [-e environment-list] [-c] [-l] [-n] [-s] [-t] [-w] [file[.tex] ] - * - * This program is used to remove TeX or LaTeX constructs from a text - * file. - */ - -#include "detex.h" - -#ifdef KPATHSEA - -#include <c-auto.h> -#include <kpathsea/c-auto.h> -#include <kpathsea/config.h> -#include <kpathsea/c-memstr.h> -#include <kpathsea/c-pathmx.h> -#include <kpathsea/c-std.h> -#include <kpathsea/tex-file.h> - -#ifdef HAVE_SYS_PARAM_H -#include <sys/param.h> -#endif - -#else /* KPATHSEA */ - -#ifdef HAVE_STRING_H -#include <string.h> -#else -#include <strings.h> -#define strchr index -#define strrchr rindex -#endif -#ifndef MAXPATHLEN -#include <sys/param.h> -#endif -#define PATH_MAX MAXPATHLEN -#ifdef OS2 -#include <stdlib.h> -#endif - -#ifdef WIN32 -#include <fcntl.h> -#include <io.h> -#endif - -#endif /* KPATHSEA */ +#line 95 "detex.l" #undef IGNORE #define LaBEGIN if (fLatex) BEGIN @@ -1623,7 +1626,7 @@ int csb = 0; /* depth of flex context stack */ -#line 1627 "detex.c" +#line 1630 "detex.c" #define INITIAL 0 #define Define 1 @@ -1825,9 +1828,9 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 180 "detex.l" +#line 182 "detex.l" -#line 1831 "detex.c" +#line 1834 "detex.c" if ( !(yy_init) ) { @@ -1908,24 +1911,24 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 181 "detex.l" +#line 183 "detex.l" /* ignore comments */ ; YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 183 "detex.l" +#line 185 "detex.l" {LATEX; IGNORE;} YY_BREAK case 3: YY_RULE_SETUP -#line 185 "detex.l" +#line 187 "detex.l" /* environment start */ {LaBEGIN LaBegin; IGNORE;} YY_BREAK case 4: /* rule 4 can match eol */ YY_RULE_SETUP -#line 187 "detex.l" +#line 189 "detex.l" { if (BeginEnv("verbatim")) BEGIN LaEnv; else @@ -1936,24 +1939,24 @@ YY_RULE_SETUP case 5: /* rule 5 can match eol */ YY_RULE_SETUP -#line 194 "detex.l" +#line 196 "detex.l" /* verbatim mode */ {BEGIN Normal; IGNORE;} YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 195 "detex.l" +#line 197 "detex.l" ECHO; YY_BREAK case 7: YY_RULE_SETUP -#line 196 "detex.l" +#line 198 "detex.l" ECHO; YY_BREAK case 8: /* rule 8 can match eol */ YY_RULE_SETUP -#line 198 "detex.l" +#line 200 "detex.l" { KILLARGS(1); if (BeginEnv("minpage")) BEGIN LaEnv; @@ -1964,7 +1967,7 @@ YY_RULE_SETUP YY_BREAK case 9: YY_RULE_SETUP -#line 206 "detex.l" +#line 208 "detex.l" { if (BeginEnv(yytext)) BEGIN LaEnv; else @@ -1975,33 +1978,33 @@ YY_RULE_SETUP case 10: /* rule 10 can match eol */ YY_RULE_SETUP -#line 212 "detex.l" +#line 214 "detex.l" NEWLINE; YY_BREAK case 11: YY_RULE_SETUP -#line 213 "detex.l" +#line 215 "detex.l" ; YY_BREAK case 12: YY_RULE_SETUP -#line 215 "detex.l" +#line 217 "detex.l" /* absorb some environments */ {LaBEGIN LaEnd; IGNORE;} YY_BREAK case 13: /* rule 13 can match eol */ YY_RULE_SETUP -#line 216 "detex.l" +#line 218 "detex.l" NEWLINE; YY_BREAK case 14: YY_RULE_SETUP -#line 217 "detex.l" +#line 219 "detex.l" ; YY_BREAK case 15: YY_RULE_SETUP -#line 219 "detex.l" +#line 221 "detex.l" /* end environment */ { if (EndEnv(yytext)) BEGIN Normal; IGNORE; @@ -2009,301 +2012,301 @@ YY_RULE_SETUP YY_BREAK case 16: YY_RULE_SETUP -#line 223 "detex.l" +#line 225 "detex.l" {BEGIN LaEnv; IGNORE;} YY_BREAK case 17: /* rule 17 can match eol */ YY_RULE_SETUP -#line 224 "detex.l" +#line 226 "detex.l" NEWLINE; YY_BREAK case 18: YY_RULE_SETUP -#line 225 "detex.l" +#line 227 "detex.l" ; YY_BREAK case 19: /* rule 19 can match eol */ YY_RULE_SETUP -#line 227 "detex.l" +#line 229 "detex.l" ; YY_BREAK case 20: /* rule 20 can match eol */ YY_RULE_SETUP -#line 228 "detex.l" +#line 230 "detex.l" ; YY_BREAK case 21: /* rule 21 can match eol */ YY_RULE_SETUP -#line 229 "detex.l" +#line 231 "detex.l" ; YY_BREAK case 22: /* rule 22 can match eol */ YY_RULE_SETUP -#line 230 "detex.l" +#line 232 "detex.l" ; YY_BREAK case 23: /* rule 23 can match eol */ YY_RULE_SETUP -#line 231 "detex.l" +#line 233 "detex.l" ; YY_BREAK case 24: /* rule 24 can match eol */ YY_RULE_SETUP -#line 232 "detex.l" +#line 234 "detex.l" ; YY_BREAK case 25: YY_RULE_SETUP -#line 234 "detex.l" +#line 236 "detex.l" { KILLARGS(1); } YY_BREAK case 26: YY_RULE_SETUP -#line 235 "detex.l" +#line 237 "detex.l" { KILLARGS(2); } YY_BREAK case 27: YY_RULE_SETUP -#line 236 "detex.l" +#line 238 "detex.l" { KILLARGS(2); } YY_BREAK case 28: YY_RULE_SETUP -#line 237 "detex.l" +#line 239 "detex.l" { KILLARGS(2); } YY_BREAK case 29: YY_RULE_SETUP -#line 238 "detex.l" +#line 240 "detex.l" { KILLARGS(2); } YY_BREAK case 30: YY_RULE_SETUP -#line 239 "detex.l" +#line 241 "detex.l" { KILLARGS(2); } YY_BREAK case 31: YY_RULE_SETUP -#line 240 "detex.l" +#line 242 "detex.l" { KILLARGS(1); } YY_BREAK case 32: YY_RULE_SETUP -#line 241 "detex.l" +#line 243 "detex.l" { KILLARGS(1); } YY_BREAK case 33: YY_RULE_SETUP -#line 242 "detex.l" +#line 244 "detex.l" { KILLARGS(2); } YY_BREAK case 34: YY_RULE_SETUP -#line 243 "detex.l" +#line 245 "detex.l" { KILLARGS(1); } YY_BREAK case 35: YY_RULE_SETUP -#line 244 "detex.l" +#line 246 "detex.l" { STRIPARGS(2); } YY_BREAK case 36: YY_RULE_SETUP -#line 245 "detex.l" +#line 247 "detex.l" { KILLARGS(1); } YY_BREAK case 37: YY_RULE_SETUP -#line 246 "detex.l" +#line 248 "detex.l" { STRIPARGS(2); } YY_BREAK case 38: YY_RULE_SETUP -#line 247 "detex.l" +#line 249 "detex.l" { KILLARGS(2); } YY_BREAK case 39: YY_RULE_SETUP -#line 248 "detex.l" +#line 250 "detex.l" ; YY_BREAK case 40: YY_RULE_SETUP -#line 249 "detex.l" +#line 251 "detex.l" { KILLARGS(1); } YY_BREAK case 41: /* rule 41 can match eol */ YY_RULE_SETUP -#line 250 "detex.l" +#line 252 "detex.l" { LaBEGIN LaPicture; } YY_BREAK case 42: YY_RULE_SETUP -#line 252 "detex.l" +#line 254 "detex.l" ; YY_BREAK case 43: /* rule 43 can match eol */ YY_RULE_SETUP -#line 253 "detex.l" +#line 255 "detex.l" { printf("<Picture %s>", yytext); } YY_BREAK case 44: YY_RULE_SETUP -#line 254 "detex.l" +#line 256 "detex.l" BEGIN Normal; YY_BREAK case 45: YY_RULE_SETUP -#line 256 "detex.l" +#line 258 "detex.l" { KILLARGS(3); } YY_BREAK case 46: YY_RULE_SETUP -#line 257 "detex.l" +#line 259 "detex.l" { KILLARGS(1); } YY_BREAK case 47: YY_RULE_SETUP -#line 258 "detex.l" +#line 260 "detex.l" { KILLARGS(2); } YY_BREAK case 48: YY_RULE_SETUP -#line 259 "detex.l" +#line 261 "detex.l" { KILLARGS(2); } YY_BREAK case 49: YY_RULE_SETUP -#line 260 "detex.l" +#line 262 "detex.l" { KILLARGS(3); } YY_BREAK case 50: YY_RULE_SETUP -#line 261 "detex.l" +#line 263 "detex.l" { KILLARGS(1); } YY_BREAK case 51: YY_RULE_SETUP -#line 262 "detex.l" +#line 264 "detex.l" { STRIPARGS(1); } YY_BREAK case 52: YY_RULE_SETUP -#line 264 "detex.l" +#line 266 "detex.l" ; YY_BREAK case 53: YY_RULE_SETUP -#line 265 "detex.l" +#line 267 "detex.l" ; YY_BREAK case 54: YY_RULE_SETUP -#line 266 "detex.l" +#line 268 "detex.l" ; YY_BREAK case 55: YY_RULE_SETUP -#line 267 "detex.l" +#line 269 "detex.l" ; YY_BREAK case 56: YY_RULE_SETUP -#line 268 "detex.l" +#line 270 "detex.l" ; YY_BREAK case 57: YY_RULE_SETUP -#line 269 "detex.l" +#line 271 "detex.l" ; YY_BREAK case 58: YY_RULE_SETUP -#line 271 "detex.l" +#line 273 "detex.l" /* ignore args */ {KILLARGS(1); IGNORE;} YY_BREAK case 59: YY_RULE_SETUP -#line 272 "detex.l" +#line 274 "detex.l" /* of these \cs */ {KILLARGS(1); IGNORE;} YY_BREAK case 60: YY_RULE_SETUP -#line 273 "detex.l" +#line 275 "detex.l" {KILLARGS(1); IGNORE;} YY_BREAK case 61: YY_RULE_SETUP -#line 274 "detex.l" +#line 276 "detex.l" {CITE(1); IGNORE;} YY_BREAK case 62: YY_RULE_SETUP -#line 275 "detex.l" +#line 277 "detex.l" {LATEX; KILLARGS(1); IGNORE;} YY_BREAK case 63: YY_RULE_SETUP -#line 276 "detex.l" +#line 278 "detex.l" {LATEX; KILLARGS(1); IGNORE;} YY_BREAK case 64: YY_RULE_SETUP -#line 277 "detex.l" +#line 279 "detex.l" {KILLARGS(1); IGNORE;} YY_BREAK case 65: YY_RULE_SETUP -#line 278 "detex.l" +#line 280 "detex.l" {KILLARGS(1); IGNORE;} YY_BREAK case 66: YY_RULE_SETUP -#line 279 "detex.l" +#line 281 "detex.l" {KILLARGS(1); SPACE;} YY_BREAK case 67: YY_RULE_SETUP -#line 280 "detex.l" +#line 282 "detex.l" {KILLARGS(1); SPACE;} YY_BREAK case 68: YY_RULE_SETUP -#line 281 "detex.l" +#line 283 "detex.l" {KILLARGS(1); IGNORE;} YY_BREAK case 69: YY_RULE_SETUP -#line 282 "detex.l" +#line 284 "detex.l" {CITE(1); IGNORE;} YY_BREAK case 70: YY_RULE_SETUP -#line 283 "detex.l" +#line 285 "detex.l" {KILLARGS(1); IGNORE;} YY_BREAK case 71: YY_RULE_SETUP -#line 284 "detex.l" +#line 286 "detex.l" {CITE(1); IGNORE;} YY_BREAK case 72: YY_RULE_SETUP -#line 285 "detex.l" +#line 287 "detex.l" {KILLARGS(1); IGNORE;} YY_BREAK case 73: YY_RULE_SETUP -#line 286 "detex.l" +#line 288 "detex.l" /* ignore \verb<ch>...<ch> */ { if (fLatex) { char verbchar, c; verbchar = input(); @@ -2316,137 +2319,137 @@ YY_RULE_SETUP YY_BREAK case 74: YY_RULE_SETUP -#line 296 "detex.l" +#line 298 "detex.l" { LATEX; KILLARGS(2); } YY_BREAK case 75: YY_RULE_SETUP -#line 297 "detex.l" +#line 299 "detex.l" { LATEX; KILLARGS(2); } YY_BREAK case 76: YY_RULE_SETUP -#line 298 "detex.l" +#line 300 "detex.l" { LATEX; KILLARGS(3); } YY_BREAK case 77: YY_RULE_SETUP -#line 300 "detex.l" +#line 302 "detex.l" /* ignore def begin */ {BEGIN Define; IGNORE;} YY_BREAK case 78: YY_RULE_SETUP -#line 301 "detex.l" +#line 303 "detex.l" BEGIN Normal; YY_BREAK case 79: /* rule 79 can match eol */ YY_RULE_SETUP -#line 302 "detex.l" +#line 304 "detex.l" NEWLINE; YY_BREAK case 80: YY_RULE_SETUP -#line 303 "detex.l" +#line 305 "detex.l" ; YY_BREAK case 81: YY_RULE_SETUP -#line 305 "detex.l" +#line 307 "detex.l" /* formula mode */ {LaBEGIN LaFormula; IGNORE;} YY_BREAK case 82: YY_RULE_SETUP -#line 306 "detex.l" +#line 308 "detex.l" BEGIN Normal; YY_BREAK case 83: /* rule 83 can match eol */ YY_RULE_SETUP -#line 307 "detex.l" +#line 309 "detex.l" NEWLINE; YY_BREAK case 84: YY_RULE_SETUP -#line 308 "detex.l" +#line 310 "detex.l" ; YY_BREAK case 85: YY_RULE_SETUP -#line 310 "detex.l" +#line 312 "detex.l" /* display mode */ {LaBEGIN LaDisplay; IGNORE;} YY_BREAK case 86: YY_RULE_SETUP -#line 311 "detex.l" +#line 313 "detex.l" BEGIN Normal; YY_BREAK case 87: /* rule 87 can match eol */ YY_RULE_SETUP -#line 312 "detex.l" +#line 314 "detex.l" NEWLINE; YY_BREAK case 88: YY_RULE_SETUP -#line 313 "detex.l" +#line 315 "detex.l" ; YY_BREAK case 89: YY_RULE_SETUP -#line 315 "detex.l" +#line 317 "detex.l" /* display mode */ {BEGIN Display; IGNORE;} YY_BREAK case 90: YY_RULE_SETUP -#line 316 "detex.l" +#line 318 "detex.l" BEGIN Normal; YY_BREAK case 91: /* rule 91 can match eol */ YY_RULE_SETUP -#line 317 "detex.l" +#line 319 "detex.l" NEWLINE; YY_BREAK case 92: YY_RULE_SETUP -#line 318 "detex.l" +#line 320 "detex.l" ; YY_BREAK case 93: YY_RULE_SETUP -#line 320 "detex.l" +#line 322 "detex.l" /* math mode */ {BEGIN Math; IGNORE;} YY_BREAK case 94: YY_RULE_SETUP -#line 321 "detex.l" +#line 323 "detex.l" BEGIN Normal; YY_BREAK case 95: /* rule 95 can match eol */ YY_RULE_SETUP -#line 322 "detex.l" +#line 324 "detex.l" NEWLINE; YY_BREAK case 96: YY_RULE_SETUP -#line 323 "detex.l" +#line 325 "detex.l" ; YY_BREAK case 97: YY_RULE_SETUP -#line 324 "detex.l" +#line 326 "detex.l" ; YY_BREAK case 98: YY_RULE_SETUP -#line 326 "detex.l" +#line 328 "detex.l" /* process files */ {LaBEGIN LaInclude; IGNORE;} YY_BREAK case 99: YY_RULE_SETUP -#line 327 "detex.l" +#line 329 "detex.l" { IncludeFile(yytext); BEGIN Normal; } @@ -2454,27 +2457,27 @@ YY_RULE_SETUP case 100: /* rule 100 can match eol */ YY_RULE_SETUP -#line 330 "detex.l" +#line 332 "detex.l" NEWLINE; YY_BREAK case 101: YY_RULE_SETUP -#line 331 "detex.l" +#line 333 "detex.l" ; YY_BREAK case 102: YY_RULE_SETUP -#line 333 "detex.l" +#line 335 "detex.l" {BEGIN IncludeOnly; IGNORE;} YY_BREAK case 103: YY_RULE_SETUP -#line 334 "detex.l" +#line 336 "detex.l" AddInclude(yytext); YY_BREAK case 104: YY_RULE_SETUP -#line 335 "detex.l" +#line 337 "detex.l" { if (csbIncList == 0) rgsbIncList[csbIncList++] = '\0'; BEGIN Normal; @@ -2483,22 +2486,22 @@ YY_RULE_SETUP case 105: /* rule 105 can match eol */ YY_RULE_SETUP -#line 339 "detex.l" +#line 341 "detex.l" NEWLINE; YY_BREAK case 106: YY_RULE_SETUP -#line 340 "detex.l" +#line 342 "detex.l" ; YY_BREAK case 107: YY_RULE_SETUP -#line 342 "detex.l" +#line 344 "detex.l" {BEGIN Input; IGNORE;} YY_BREAK case 108: YY_RULE_SETUP -#line 343 "detex.l" +#line 345 "detex.l" { InputFile(yytext); BEGIN Normal; } @@ -2506,55 +2509,55 @@ YY_RULE_SETUP case 109: /* rule 109 can match eol */ YY_RULE_SETUP -#line 346 "detex.l" +#line 348 "detex.l" NEWLINE; YY_BREAK case 110: YY_RULE_SETUP -#line 347 "detex.l" +#line 349 "detex.l" ; YY_BREAK case 111: /* rule 111 can match eol */ YY_RULE_SETUP -#line 349 "detex.l" +#line 351 "detex.l" /* handle ligatures */ {(void)printf("%.2s", yytext+1);} YY_BREAK case 112: /* rule 112 can match eol */ YY_RULE_SETUP -#line 350 "detex.l" +#line 352 "detex.l" {(void)printf("%.1s", yytext+1);} YY_BREAK case 113: YY_RULE_SETUP -#line 351 "detex.l" +#line 353 "detex.l" BEGIN LaBreak; YY_BREAK case 114: YY_RULE_SETUP -#line 353 "detex.l" +#line 355 "detex.l" /* ignore other \cs */ {BEGIN Control; IGNORE;} YY_BREAK case 115: YY_RULE_SETUP -#line 354 "detex.l" +#line 356 "detex.l" SPACE; YY_BREAK case 116: /* rule 116 can match eol */ YY_RULE_SETUP -#line 355 "detex.l" +#line 357 "detex.l" NEWLINE; YY_BREAK case 117: YY_RULE_SETUP -#line 356 "detex.l" +#line 358 "detex.l" IGNORE; YY_BREAK case 118: YY_RULE_SETUP -#line 357 "detex.l" +#line 359 "detex.l" { if (yytext==NULL || strlen(yytext)==0 || atoi(yytext)==4) NEWLINE; @@ -2563,48 +2566,48 @@ YY_RULE_SETUP YY_BREAK case 119: YY_RULE_SETUP -#line 363 "detex.l" +#line 365 "detex.l" IGNORE; YY_BREAK case 120: YY_RULE_SETUP -#line 364 "detex.l" +#line 366 "detex.l" IGNORE; YY_BREAK case 121: /* rule 121 can match eol */ YY_RULE_SETUP -#line 365 "detex.l" +#line 367 "detex.l" {BEGIN Normal; NEWLINE;} YY_BREAK case 122: YY_RULE_SETUP -#line 366 "detex.l" +#line 368 "detex.l" {BEGIN Normal; IGNORE;} YY_BREAK case 123: YY_RULE_SETUP -#line 367 "detex.l" +#line 369 "detex.l" {yyless(0);BEGIN Normal;} YY_BREAK case 124: YY_RULE_SETUP -#line 369 "detex.l" +#line 371 "detex.l" /* special characters */ IGNORE; YY_BREAK case 125: YY_RULE_SETUP -#line 370 "detex.l" +#line 372 "detex.l" IGNORE; YY_BREAK case 126: YY_RULE_SETUP -#line 371 "detex.l" +#line 373 "detex.l" SPACE; YY_BREAK case 127: YY_RULE_SETUP -#line 373 "detex.l" +#line 375 "detex.l" { if (fWord) (void)printf("%s\n", yytext); else @@ -2613,28 +2616,28 @@ YY_RULE_SETUP YY_BREAK case 128: YY_RULE_SETUP -#line 378 "detex.l" +#line 380 "detex.l" if (!fWord) ECHO; YY_BREAK case 129: /* rule 129 can match eol */ YY_RULE_SETUP -#line 379 "detex.l" +#line 381 "detex.l" if (!fWord) ECHO; YY_BREAK case 130: YY_RULE_SETUP -#line 381 "detex.l" +#line 383 "detex.l" { BEGIN LaOptArg; } YY_BREAK case 131: YY_RULE_SETUP -#line 382 "detex.l" +#line 384 "detex.l" { cOpenBrace++; } YY_BREAK case 132: YY_RULE_SETUP -#line 383 "detex.l" +#line 385 "detex.l" { cOpenBrace--; if (cOpenBrace == 0) { @@ -2645,28 +2648,28 @@ YY_RULE_SETUP YY_BREAK case 133: YY_RULE_SETUP -#line 390 "detex.l" +#line 392 "detex.l" ; YY_BREAK case 134: YY_RULE_SETUP -#line 391 "detex.l" +#line 393 "detex.l" BEGIN LaMacro; YY_BREAK case 135: /* rule 135 can match eol */ YY_RULE_SETUP -#line 392 "detex.l" +#line 394 "detex.l" ; YY_BREAK case 136: YY_RULE_SETUP -#line 394 "detex.l" +#line 396 "detex.l" { BEGIN LaOptArg2; } YY_BREAK case 137: YY_RULE_SETUP -#line 395 "detex.l" +#line 397 "detex.l" { if (cOpenBrace == 0) { if (--cArgs==0) @@ -2680,30 +2683,30 @@ YY_RULE_SETUP YY_BREAK case 138: YY_RULE_SETUP -#line 405 "detex.l" +#line 407 "detex.l" { cOpenBrace--; } YY_BREAK case 139: YY_RULE_SETUP -#line 406 "detex.l" +#line 408 "detex.l" ; YY_BREAK case 140: YY_RULE_SETUP -#line 407 "detex.l" +#line 409 "detex.l" BEGIN LaMacro2; YY_BREAK case 141: YY_RULE_SETUP -#line 408 "detex.l" +#line 410 "detex.l" ; YY_BREAK case 142: YY_RULE_SETUP -#line 409 "detex.l" +#line 411 "detex.l" ECHO; YY_BREAK -#line 2707 "detex.c" +#line 2710 "detex.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(Define): case YY_STATE_EOF(Display): @@ -3718,7 +3721,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 409 "detex.l" +#line 411 "detex.l" /****** diff --git a/Build/source/texk/detex/detex-2.8/detex.l b/Build/source/texk/detex/detex-2.8/detex.l index 23c22e35f69..f1c126a941e 100644 --- a/Build/source/texk/detex/detex-2.8/detex.l +++ b/Build/source/texk/detex/detex-2.8/detex.l @@ -1,6 +1,6 @@ %option never-interactive -%{ +%top{ #ifndef lint static char rcsid[] = "$Header: /p/src/local/bin/detex/RCS/detex.l,v 2.22 2007/03/01 20:22:01 trinkle Exp trinkle $"; #endif @@ -89,7 +89,9 @@ static char rcsid[] = "$Header: /p/src/local/bin/detex/RCS/detex.l,v 2.22 2007/0 #endif #endif /* KPATHSEA */ +} +%{ #undef IGNORE #define LaBEGIN if (fLatex) BEGIN diff --git a/Build/source/texk/dtl/ChangeLog b/Build/source/texk/dtl/ChangeLog index 43ec15bd3f7..3809266be41 100644 --- a/Build/source/texk/dtl/ChangeLog +++ b/Build/source/texk/dtl/ChangeLog @@ -1,3 +1,7 @@ +2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * dt2dv.c, dv2dt.c: First include <config.h>. + 2013-06-27 Peter Breitenlohner <peb@mppmu.mpg.de> * dt2dv.c: Drop variable 'handler' (set but not used). diff --git a/Build/source/texk/dtl/dt2dv.c b/Build/source/texk/dtl/dt2dv.c index 49cba320a4e..a49effd56ed 100644 --- a/Build/source/texk/dtl/dt2dv.c +++ b/Build/source/texk/dtl/dt2dv.c @@ -20,6 +20,10 @@ /* unix version; read from stdin, write to stdout, by default. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <ctype.h> #include <errno.h> #include <signal.h> @@ -27,10 +31,6 @@ #include <stdlib.h> #include <string.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - #ifdef HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/Build/source/texk/dtl/dv2dt.c b/Build/source/texk/dtl/dv2dt.c index 6c86cdc2e1a..a89b432b6f1 100644 --- a/Build/source/texk/dtl/dv2dt.c +++ b/Build/source/texk/dtl/dv2dt.c @@ -15,15 +15,15 @@ /* unix version; read from stdin, write to stdout, by default. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - #ifdef HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/ChangeLog b/Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/ChangeLog index 579a8cf1487..00507bff7ec 100644 --- a/Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/ChangeLog +++ b/Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/ChangeLog @@ -1,3 +1,7 @@ +2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-08-config_h (new): First include <kpathsea/config.h>. + 2012-09-06 Peter Breitenlohner <peb@mppmu.mpg.de> * patch-07-win32 [WIN32]: Use "sjis" file encoding (from W32TeX). diff --git a/Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/patch-08-config_h b/Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/patch-08-config_h new file mode 100644 index 00000000000..06c4230df28 --- /dev/null +++ b/Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/patch-08-config_h @@ -0,0 +1,68 @@ +diff -ur dvi2tty-5.3.4.orig/disdvi.c dvi2tty-5.3.4/disdvi.c +--- dvi2tty-5.3.4.orig/disdvi.c 2012-06-22 09:12:43.000000000 +0200 ++++ dvi2tty-5.3.4/disdvi.c 2013-06-28 15:02:13.000000000 +0200 +@@ -45,6 +45,12 @@ + * Include files + */ + ++#if defined(KPATHSEA) ++# define NO_DEBUG 1 ++# include <kpathsea/config.h> ++# include <kpathsea/lib.h> ++#endif ++ + #include <stdio.h> + #include <stdlib.h> + #if defined(MSDOS) || defined(WIN32) +@@ -61,12 +67,6 @@ + # include "macintosh.h" + #endif + +-#if defined(KPATHSEA) +-# define NO_DEBUG 1 +-# include <kpathsea/config.h> +-# include <kpathsea/lib.h> +-#endif +- + + /* + * Constant definitions +diff -ur dvi2tty-5.3.4.orig/dvi2tty.h dvi2tty-5.3.4/dvi2tty.h +--- dvi2tty-5.3.4.orig/dvi2tty.h 2012-06-22 09:09:35.000000000 +0200 ++++ dvi2tty-5.3.4/dvi2tty.h 2013-06-28 15:02:13.000000000 +0200 +@@ -25,17 +25,6 @@ + Copyright (C) 1989-2010 M.J.E. Mol, MESA Consulting B.V." + + +-#include <stdio.h> +-#include <string.h> +-#include <stdlib.h> +-#if defined(MSDOS) || (defined(WIN32) && !defined(__MINGW32__)) +-# include <malloc.h> +-#else +-# if !defined(THINK_C) +-# include <unistd.h> +-# endif +-#endif +- + #if defined(KPATHSEA) + # define NO_DEBUG 1 + # include <kpathsea/config.h> +@@ -47,6 +36,17 @@ + # define FALSE 0 + #endif + ++#include <stdio.h> ++#include <string.h> ++#include <stdlib.h> ++#if defined(MSDOS) || (defined(WIN32) && !defined(__MINGW32__)) ++# include <malloc.h> ++#else ++# if !defined(THINK_C) ++# include <unistd.h> ++# endif ++#endif ++ + #define nil NULL + + /* diff --git a/Build/source/texk/dvi2tty/dvi2tty-5.3.4/disdvi.c b/Build/source/texk/dvi2tty/dvi2tty-5.3.4/disdvi.c index 43403e0f339..8e05ec42425 100644 --- a/Build/source/texk/dvi2tty/dvi2tty-5.3.4/disdvi.c +++ b/Build/source/texk/dvi2tty/dvi2tty-5.3.4/disdvi.c @@ -45,6 +45,12 @@ const char *disdvi = "@(#) disdvi.c 2.26 20101027 M.J.E. Mol (c) 1989-2010, mar * Include files */ +#if defined(KPATHSEA) +# define NO_DEBUG 1 +# include <kpathsea/config.h> +# include <kpathsea/lib.h> +#endif + #include <stdio.h> #include <stdlib.h> #if defined(MSDOS) || defined(WIN32) @@ -61,12 +67,6 @@ const char *disdvi = "@(#) disdvi.c 2.26 20101027 M.J.E. Mol (c) 1989-2010, mar # include "macintosh.h" #endif -#if defined(KPATHSEA) -# define NO_DEBUG 1 -# include <kpathsea/config.h> -# include <kpathsea/lib.h> -#endif - /* * Constant definitions diff --git a/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvi2tty.h b/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvi2tty.h index 21825f95db3..7677c09e3d7 100644 --- a/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvi2tty.h +++ b/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvi2tty.h @@ -25,17 +25,6 @@ Copyright (C) 1989-2010 M.J.E. Mol, MESA Consulting B.V." -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#if defined(MSDOS) || (defined(WIN32) && !defined(__MINGW32__)) -# include <malloc.h> -#else -# if !defined(THINK_C) -# include <unistd.h> -# endif -#endif - #if defined(KPATHSEA) # define NO_DEBUG 1 # include <kpathsea/config.h> @@ -47,6 +36,17 @@ Copyright (C) 1989-2010 M.J.E. Mol, MESA Consulting B.V." # define FALSE 0 #endif +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#if defined(MSDOS) || (defined(WIN32) && !defined(__MINGW32__)) +# include <malloc.h> +#else +# if !defined(THINK_C) +# include <unistd.h> +# endif +#endif + #define nil NULL /* diff --git a/Build/source/texk/dvidvi/ChangeLog b/Build/source/texk/dvidvi/ChangeLog index 6a0f52d4ae3..d8dccbbf9d4 100644 --- a/Build/source/texk/dvidvi/ChangeLog +++ b/Build/source/texk/dvidvi/ChangeLog @@ -1,3 +1,7 @@ +2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * dvidvi.c: First include <config.h>. + 2012-11-19 Peter Breitenlohner <peb@mppmu.mpg.de> * Makefile.am: Avoid use of deprecated INCLUDES. diff --git a/Build/source/texk/dvidvi/dvidvi.c b/Build/source/texk/dvidvi/dvidvi.c index 65d353bb00d..cc49995750a 100644 --- a/Build/source/texk/dvidvi/dvidvi.c +++ b/Build/source/texk/dvidvi/dvidvi.c @@ -38,6 +38,10 @@ "Improved from 1.0 to 1.1, 1994, Markus Kohm\n" #define STRINGSIZE (500L) /* maximum number of strings in program */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #ifndef VMS #include <stdlib.h> #ifdef WIN32 @@ -55,10 +59,6 @@ void error(const char *); /* defines READBIN, WRITEBIN, PATHSEP and IS_DIR_SEP*/ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - #ifdef HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/Build/source/texk/dvipos/ChangeLog b/Build/source/texk/dvipos/ChangeLog index 4f262e0877c..8572b33c26f 100644 --- a/Build/source/texk/dvipos/ChangeLog +++ b/Build/source/texk/dvipos/ChangeLog @@ -1,3 +1,7 @@ +2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * utils.h: First include <kpathsea/kpathsea.h>. + 2013-04-07 Peter Breitenlohner <peb@mppmu.mpg.de> * configure.ac: Fixed a typo. diff --git a/Build/source/texk/dvipos/utils.h b/Build/source/texk/dvipos/utils.h index 25c5e03938d..794dde530bd 100644 --- a/Build/source/texk/dvipos/utils.h +++ b/Build/source/texk/dvipos/utils.h @@ -20,8 +20,6 @@ #ifndef _UTILS_H_ #define _UTILS_H_ -#include <stdio.h> - #ifdef MIKTEX #include "miktex.h" #include "gnu-miktex.h" @@ -30,6 +28,8 @@ #include <kpathsea/kpathsea.h> #endif +#include <stdio.h> + typedef int UNSIGNED_BYTE, SIGNED_BYTE, SIGNED_PAIR; typedef unsigned UNSIGNED_PAIR; typedef long UNSIGNED_TRIPLE, SIGNED_TRIPLE, SIGNED_QUAD; diff --git a/Build/source/texk/makejvf/ChangeLog b/Build/source/texk/makejvf/ChangeLog index 69d6adcfd91..317007cbd6e 100644 --- a/Build/source/texk/makejvf/ChangeLog +++ b/Build/source/texk/makejvf/ChangeLog @@ -1,3 +1,8 @@ +2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * main.c, tfmread.c, tool.c, write.c: Always first include + <kpathsea/config.h>. + 2012-12-07 Peter Breitenlohner <peb@mppmu.mpg.de> * tfmread.c: Drop unused variable (gcc-4.6 warning). diff --git a/Build/source/texk/makejvf/main.c b/Build/source/texk/makejvf/main.c index 3b2f24bad94..6313726e97f 100644 --- a/Build/source/texk/makejvf/main.c +++ b/Build/source/texk/makejvf/main.c @@ -1,12 +1,12 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include <kpathsea/kpathsea.h> #include <ptexenc/ptexenc.h> #include "makejvf.h" #include "uniblock.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + FILE *vfp,*afp=NULL; char *atfmname,*vtfmname,*afmname,*vfname,*kanatfm,*jistfm,*ucsqtfm; int kanatume=-1,chotai=0,baseshift=0,minute=0,useset3=0,hankana=0,fidzero=0; diff --git a/Build/source/texk/makejvf/tfmread.c b/Build/source/texk/makejvf/tfmread.c index 0122e2d24c1..7af673d4304 100644 --- a/Build/source/texk/makejvf/tfmread.c +++ b/Build/source/texk/makejvf/tfmread.c @@ -1,10 +1,10 @@ +#include <kpathsea/kpathsea.h> +#include "makejvf.h" + #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <kpathsea/kpathsea.h> -#include "makejvf.h" - int nt,unit,zh,zw,jfm_id; int *width,*height,*depth,*italic,*glue_kern,*kern,*glue,*param; unsigned char *header,*char_type,*char_info; diff --git a/Build/source/texk/makejvf/tool.c b/Build/source/texk/makejvf/tool.c index c99e8b9a03f..7aeb6cace08 100644 --- a/Build/source/texk/makejvf/tool.c +++ b/Build/source/texk/makejvf/tool.c @@ -1,9 +1,9 @@ -#include <stdio.h> -#include <math.h> - #include <kpathsea/config.h> #include "makejvf.h" +#include <stdio.h> +#include <math.h> + int mquad(unsigned char *p) { unsigned int cc; diff --git a/Build/source/texk/makejvf/write.c b/Build/source/texk/makejvf/write.c index 581bf815545..a4417e9d5db 100644 --- a/Build/source/texk/makejvf/write.c +++ b/Build/source/texk/makejvf/write.c @@ -1,10 +1,10 @@ -#include <stdio.h> -#include <stdlib.h> - #include <kpathsea/config.h> #include "makejvf.h" #include "uniblock.h" +#include <stdio.h> +#include <stdlib.h> + FILE *vfopen(char *name) { FILE *fp; diff --git a/Build/source/texk/mendexk/ChangeLog b/Build/source/texk/mendexk/ChangeLog index fe871138320..d1cae5db330 100644 --- a/Build/source/texk/mendexk/ChangeLog +++ b/Build/source/texk/mendexk/ChangeLog @@ -1,3 +1,7 @@ +2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * mendex.h: First include <c-auto.h>. + 2012-11-19 Peter Breitenlohner <peb@mppmu.mpg.de> * Makefile.am: Avoid use of deprecated INCLUDES. diff --git a/Build/source/texk/mendexk/mendex.h b/Build/source/texk/mendexk/mendex.h index 2c5c2611b7f..c26472c4131 100644 --- a/Build/source/texk/mendexk/mendex.h +++ b/Build/source/texk/mendexk/mendex.h @@ -1,11 +1,11 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include <c-auto.h> #include <kpathsea/config.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #ifdef WIN32 #define nkf_open fopen #define nkf_close fclose diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in index a86d5bba4f5..60249593b82 100644 --- a/Build/source/texk/web2c/Makefile.in +++ b/Build/source/texk/web2c/Makefile.in @@ -10703,7 +10703,7 @@ uptex.ch: tie$(EXEEXT) uptex.web $(uptex_ch_srcs) $(tie) -c uptex.ch uptex.web $(uptex_ch_srcs) upbibtex.c upbibtex.h: upbibtex-web2c @$(web2c) upbibtex -upbibtex-web2c: upbibtex.p $(web2c_depend) uptexdir/uptex.defines +upbibtex-web2c: upbibtex.p $(web2c_depend) uptexdir/uptex.defines web2c/cvtbib.sed @$(web2c) upbibtex upbibtex.p: tangle$(EXEEXT) upbibtex.web uptexdir/upbibtex.ch $(up_tangle) upbibtex upbibtex diff --git a/Build/source/texk/web2c/alephdir/ChangeLog b/Build/source/texk/web2c/alephdir/ChangeLog index 5e028f44dad..902311fd377 100644 --- a/Build/source/texk/web2c/alephdir/ChangeLog +++ b/Build/source/texk/web2c/alephdir/ChangeLog @@ -1,3 +1,7 @@ +2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * alephbis.c: Include "alephd.h" before system headers. + 2013-04-09 Peter Breitenlohner <peb@mppmu.mpg.de> * alephextra.h, eover.ch: 0.0-rc4 ---> 0.1 for TL 2013. diff --git a/Build/source/texk/web2c/alephdir/alephbis.c b/Build/source/texk/web2c/alephdir/alephbis.c index d26f5d262e1..8366cf5c97b 100644 --- a/Build/source/texk/web2c/alephdir/alephbis.c +++ b/Build/source/texk/web2c/alephdir/alephbis.c @@ -23,11 +23,11 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define EXTERN extern +#include "alephd.h" #include <stdlib.h> #include <stdio.h> #include <errno.h> #include <string.h> -#include "alephd.h" #undef read #if 1 diff --git a/Build/source/texk/web2c/ctiedir/ChangeLog b/Build/source/texk/web2c/ctiedir/ChangeLog index ec8f665963c..4c5001aafe5 100644 --- a/Build/source/texk/web2c/ctiedir/ChangeLog +++ b/Build/source/texk/web2c/ctiedir/ChangeLog @@ -1,3 +1,8 @@ +2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * ctie-k.ch: Include <stdio.h> after <kpathsea/kpathsea.h>. + Drop unused string variable 'file_open_mode'. + 2012-05-18 Peter Breitenlohner <peb@mppmu.mpg.de> * ctie-k.ch: Use binary mode for output files. diff --git a/Build/source/texk/web2c/ctiedir/ctie-k.ch b/Build/source/texk/web2c/ctiedir/ctie-k.ch index eb4cb2de0ca..b527aa373ea 100644 --- a/Build/source/texk/web2c/ctiedir/ctie-k.ch +++ b/Build/source/texk/web2c/ctiedir/ctie-k.ch @@ -111,6 +111,13 @@ extern char *strerror(); the \.{kpathsea} headers do the right thing. @z +@x l.173 The kpathsea include files must be first. +#include <stdio.h> +@y +#include <kpathsea/kpathsea.h> +#include <stdio.h> +@z + @x l.176 And this. @ And we need dynamic memory allocation. This should cause no trouble in any \CEE/ program. @@ -479,14 +486,5 @@ module number. @^system dependencies@> @y @* System-dependent changes. -We modify the program to use the \.{kpathsea} library. -We need to include the headers first. - -@<Global \&{\#include}s@>= -#include <kpathsea/kpathsea.h> - -@ A global variable for the file read mode. - -@<Global variables@>= -string file_open_mode; +There are no additional changes. @z diff --git a/Build/source/texk/web2c/cwebboot.cin b/Build/source/texk/web2c/cwebboot.cin index 6330c2ab590..6381461e929 100644 --- a/Build/source/texk/web2c/cwebboot.cin +++ b/Build/source/texk/web2c/cwebboot.cin @@ -15,10 +15,10 @@ #line 471 "cwebdir/common.w" #line 175 "cwebdir/comm-w2c.ch" -#include <stdlib.h> #define CWEB #include "cpascal.h" #include <kpathsea/kpathsea.h> +#include <stdlib.h> #include "help.h" /*:22*/ diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog index 5ab5421e329..7c6055be850 100644 --- a/Build/source/texk/web2c/cwebdir/ChangeLog +++ b/Build/source/texk/web2c/cwebdir/ChangeLog @@ -1,3 +1,8 @@ +2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * comm-w2c.ch, ctang-w2c.ch, cweav-w2c.ch: Include system + headers after <kpathsea/kpathsea.h>. + 2012-09-05 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * common.w, ctangle.w, cweave.w: copy the original ones in diff --git a/Build/source/texk/web2c/cwebdir/comm-w2c.ch b/Build/source/texk/web2c/cwebdir/comm-w2c.ch index e068951b946..a6e80e3ae38 100644 --- a/Build/source/texk/web2c/cwebdir/comm-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/comm-w2c.ch @@ -172,10 +172,10 @@ Section 22. @x l.472 #include <stdlib.h> /* declaration of |getenv| and |exit| */ @y -#include <stdlib.h> /* declaration of |getenv| and |exit| */ #define CWEB #include "cpascal.h" #include <kpathsea/kpathsea.h> /* include every \Kpathsea/ header */ +#include <stdlib.h> /* declaration of |getenv| and |exit| */ #include "help.h" @ The \.{ctangle} and \.{cweave} programs from the original \.{CWEB} diff --git a/Build/source/texk/web2c/cwebdir/ctang-w2c.ch b/Build/source/texk/web2c/cwebdir/ctang-w2c.ch index c519ce2d676..e1f507a5206 100644 --- a/Build/source/texk/web2c/cwebdir/ctang-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/ctang-w2c.ch @@ -118,8 +118,8 @@ Section 6. @x common.h l.36 #include <stdio.h> @y -#include <stdio.h> #include <kpathsea/kpathsea.h> +#include <stdio.h> @z Section 9. diff --git a/Build/source/texk/web2c/cwebdir/cweav-w2c.ch b/Build/source/texk/web2c/cwebdir/cweav-w2c.ch index 462d15ee298..4c3249eea90 100644 --- a/Build/source/texk/web2c/cwebdir/cweav-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/cweav-w2c.ch @@ -144,8 +144,8 @@ Section 6. @x common.h l.36 #include <stdio.h> @y -#include <stdio.h> #include <kpathsea/kpathsea.h> +#include <stdio.h> @z Section 9. diff --git a/Build/source/texk/web2c/mplibdir/ChangeLog b/Build/source/texk/web2c/mplibdir/ChangeLog index 3e7d32dcf31..f701505055a 100644 --- a/Build/source/texk/web2c/mplibdir/ChangeLog +++ b/Build/source/texk/web2c/mplibdir/ChangeLog @@ -2,6 +2,8 @@ * pngout.w: Replace index() => strchr(). + * mp.w: Include <stdio.h> after <w2c/config.h>. + 2013-06-19 Peter Breitenlohner <peb@mppmu.mpg.de> * lmplib.c: Replace '<../lua52/lua.h>' => '<lua.h>'. diff --git a/Build/source/texk/web2c/mplibdir/mp.w b/Build/source/texk/web2c/mplibdir/mp.w index c35f547a1a2..11b607fc2bb 100644 --- a/Build/source/texk/web2c/mplibdir/mp.w +++ b/Build/source/texk/web2c/mplibdir/mp.w @@ -140,9 +140,9 @@ typedef struct MP_instance { #endif @ @c -#include <stdio.h> #define KPATHSEA_DEBUG_H 1 #include <w2c/config.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdarg.h> diff --git a/Build/source/texk/web2c/otps/ChangeLog b/Build/source/texk/web2c/otps/ChangeLog index eec93db3da8..a91a459943c 100644 --- a/Build/source/texk/web2c/otps/ChangeLog +++ b/Build/source/texk/web2c/otps/ChangeLog @@ -1,3 +1,7 @@ +2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * otp-lexer.l: First #include <w2c/config.h> via "routines.h". + 2012-11-20 Peter Breitenlohner <peb@mppmu.mpg.de> * Makefile.am: Avoid use of deprecated INCLUDES. diff --git a/Build/source/texk/web2c/otps/otp-lexer.c b/Build/source/texk/web2c/otps/otp-lexer.c index 89bbac4a440..2e2f916ca61 100644 --- a/Build/source/texk/web2c/otps/otp-lexer.c +++ b/Build/source/texk/web2c/otps/otp-lexer.c @@ -1,5 +1,11 @@ +#line 29 "otp-lexer.l" +#include "routines.h" +#include "yystype.h" +#include "otp-parser.h" + + -#line 3 "otp-lexer.c" +#line 9 "otp-lexer.c" #define YY_INT_ALIGNED short int @@ -599,15 +605,13 @@ along with Omega; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ -#line 29 "otp-lexer.l" -#include "routines.h" -#include "yystype.h" -#include "otp-parser.h" + +#line 35 "otp-lexer.l" #define YY_NO_UNPUT #define OTP_MAXCODE 0xFFFF int line_number = 1; extern YYSTYPE yylval; -#line 611 "otp-lexer.c" +#line 615 "otp-lexer.c" #define INITIAL 0 @@ -789,9 +793,9 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 45 "otp-lexer.l" +#line 48 "otp-lexer.l" -#line 795 "otp-lexer.c" +#line 799 "otp-lexer.c" if ( !(yy_init) ) { @@ -895,24 +899,24 @@ do_action: /* This label is used only to access EOF actions. */ { /* beginning of action switch */ case 1: YY_RULE_SETUP -#line 46 "otp-lexer.l" +#line 49 "otp-lexer.l" {} YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 47 "otp-lexer.l" +#line 50 "otp-lexer.l" { line_number++;} YY_BREAK case 3: /* rule 3 can match eol */ YY_RULE_SETUP -#line 48 "otp-lexer.l" +#line 51 "otp-lexer.l" { line_number++;} YY_BREAK case 4: YY_RULE_SETUP -#line 49 "otp-lexer.l" +#line 52 "otp-lexer.l" { int i, j; yylval.yint=0; @@ -936,7 +940,7 @@ YY_RULE_SETUP YY_BREAK case 5: YY_RULE_SETUP -#line 69 "otp-lexer.l" +#line 72 "otp-lexer.l" { int i, j; yylval.yint=0; @@ -954,7 +958,7 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -#line 83 "otp-lexer.l" +#line 86 "otp-lexer.l" { int i, j; yylval.yint=0; @@ -972,7 +976,7 @@ YY_RULE_SETUP YY_BREAK case 7: YY_RULE_SETUP -#line 97 "otp-lexer.l" +#line 100 "otp-lexer.l" { yylval.yint=yytext[1]; return(NUMBER); @@ -980,13 +984,13 @@ YY_RULE_SETUP YY_BREAK case 8: YY_RULE_SETUP -#line 101 "otp-lexer.l" +#line 104 "otp-lexer.l" { yylval.ystring=xstrdup(yytext); return(ID); } YY_BREAK case 9: /* rule 9 can match eol */ YY_RULE_SETUP -#line 102 "otp-lexer.l" +#line 105 "otp-lexer.l" { int i, j, last; char *newtext; @@ -1006,85 +1010,85 @@ YY_RULE_SETUP YY_BREAK case 10: YY_RULE_SETUP -#line 118 "otp-lexer.l" +#line 121 "otp-lexer.l" return(RIGHTARROW); YY_BREAK case 11: YY_RULE_SETUP -#line 119 "otp-lexer.l" +#line 122 "otp-lexer.l" return(LEFTARROW); YY_BREAK case 12: YY_RULE_SETUP -#line 120 "otp-lexer.l" +#line 123 "otp-lexer.l" return(INPUT); YY_BREAK case 13: YY_RULE_SETUP -#line 121 "otp-lexer.l" +#line 124 "otp-lexer.l" return(OUTPUT); YY_BREAK case 14: YY_RULE_SETUP -#line 122 "otp-lexer.l" +#line 125 "otp-lexer.l" return(ALIASES); YY_BREAK case 15: YY_RULE_SETUP -#line 123 "otp-lexer.l" +#line 126 "otp-lexer.l" return(STATES); YY_BREAK case 16: YY_RULE_SETUP -#line 124 "otp-lexer.l" +#line 127 "otp-lexer.l" return(TABLES); YY_BREAK case 17: YY_RULE_SETUP -#line 125 "otp-lexer.l" +#line 128 "otp-lexer.l" return(EXPRESSIONS); YY_BREAK case 18: YY_RULE_SETUP -#line 126 "otp-lexer.l" +#line 129 "otp-lexer.l" return(PUSH); YY_BREAK case 19: YY_RULE_SETUP -#line 127 "otp-lexer.l" +#line 130 "otp-lexer.l" return(POP); YY_BREAK case 20: YY_RULE_SETUP -#line 128 "otp-lexer.l" +#line 131 "otp-lexer.l" return(DIV); YY_BREAK case 21: YY_RULE_SETUP -#line 129 "otp-lexer.l" +#line 132 "otp-lexer.l" return(MOD); YY_BREAK case 22: YY_RULE_SETUP -#line 130 "otp-lexer.l" +#line 133 "otp-lexer.l" return(BEG); YY_BREAK case 23: YY_RULE_SETUP -#line 131 "otp-lexer.l" +#line 134 "otp-lexer.l" return(END); YY_BREAK case 24: YY_RULE_SETUP -#line 132 "otp-lexer.l" +#line 135 "otp-lexer.l" return(yytext[0]); YY_BREAK case 25: YY_RULE_SETUP -#line 134 "otp-lexer.l" +#line 137 "otp-lexer.l" ECHO; YY_BREAK -#line 1088 "otp-lexer.c" +#line 1092 "otp-lexer.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2064,7 +2068,8 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 134 "otp-lexer.l" +#line 137 "otp-lexer.l" + diff --git a/Build/source/texk/web2c/otps/otp-lexer.l b/Build/source/texk/web2c/otps/otp-lexer.l index 8f6048d321c..6f4905c5f95 100644 --- a/Build/source/texk/web2c/otps/otp-lexer.l +++ b/Build/source/texk/web2c/otps/otp-lexer.l @@ -25,10 +25,13 @@ along with Omega; if not, write to the Free Software Foundation, Inc., %option never-interactive -%{ +%top{ #include "routines.h" #include "yystype.h" #include "otp-parser.h" +} + +%{ #define YY_NO_UNPUT #define OTP_MAXCODE 0xFFFF int line_number = 1; diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index 833969d1d65..43f0722c75b 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,6 +1,7 @@ 2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> - * pdftosrc.cc: First #include <w2c/config.h> (for LFS). + * mapfile.c: First #include <w2c/config.h> via "ptexlib.h". + * pdftosrc.cc: First #include <w2c/config.h>. 2013-06-12 Peter Breitenlohner <peb@mppmu.mpg.de> diff --git a/Build/source/texk/web2c/pdftexdir/mapfile.c b/Build/source/texk/web2c/pdftexdir/mapfile.c index 1cc630ed695..d02c11cd753 100644 --- a/Build/source/texk/web2c/pdftexdir/mapfile.c +++ b/Build/source/texk/web2c/pdftexdir/mapfile.c @@ -1,5 +1,5 @@ /* mapfile.c: handling of map files/lines -Copyright 1996-2012 Han The Thanh, <thanh@pdftex.org> +Copyright 1996-2013 Han The Thanh, <thanh@pdftex.org> This file is part of pdfTeX. @@ -17,10 +17,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <math.h> #include "ptexlib.h" #include <kpathsea/c-auto.h> #include <kpathsea/c-memstr.h> +#include <math.h> #include <string.h> #define FM_BUF_SIZE 1024 diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog index b08858d3921..faeb71a0ad1 100644 --- a/Build/source/texk/web2c/uptexdir/ChangeLog +++ b/Build/source/texk/web2c/uptexdir/ChangeLog @@ -1,3 +1,7 @@ +2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * am/uptex.am: upbibtex-web2c also depends on web2c/cvtbib.sed. + 2013-06-05 Peter Breitenlohner <peb@mppmu.mpg.de> * kanji.h: Avoid redefinition of KANJI. diff --git a/Build/source/texk/web2c/uptexdir/am/uptex.am b/Build/source/texk/web2c/uptexdir/am/uptex.am index aca0991bbc8..4c99f54aa7d 100644 --- a/Build/source/texk/web2c/uptexdir/am/uptex.am +++ b/Build/source/texk/web2c/uptexdir/am/uptex.am @@ -102,7 +102,7 @@ upbibtex_LDADD = $(uptex_ldadd) upbibtex_DEPENDENCIES = $(uptex_dependencies) upbibtex.c upbibtex.h: upbibtex-web2c @$(web2c) upbibtex -upbibtex-web2c: upbibtex.p $(web2c_depend) uptexdir/uptex.defines +upbibtex-web2c: upbibtex.p $(web2c_depend) uptexdir/uptex.defines web2c/cvtbib.sed @$(web2c) upbibtex upbibtex.p: tangle$(EXEEXT) upbibtex.web uptexdir/upbibtex.ch $(up_tangle) upbibtex upbibtex diff --git a/Build/source/texk/web2c/web2c/ChangeLog b/Build/source/texk/web2c/web2c/ChangeLog index 1a656177e85..c57ccf7bab7 100644 --- a/Build/source/texk/web2c/web2c/ChangeLog +++ b/Build/source/texk/web2c/web2c/ChangeLog @@ -1,3 +1,9 @@ +2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * cvtbib.sed: Generate bibtex.c to first #include "cpascal.h". + * makecpool.c: Generate tex-pool.c to first #include "texd.h". + * web2c-lexer.l: First #include <w2c/config.h> via "web2c.h". + 2013-06-27 Peter Breitenlohner <peb@mppmu.mpg.de> * main.c: Drop variable 'error' (set but not used). diff --git a/Build/source/texk/web2c/web2c/cvtbib.sed b/Build/source/texk/web2c/web2c/cvtbib.sed index 037a158e835..0878ad8abc1 100644 --- a/Build/source/texk/web2c/web2c/cvtbib.sed +++ b/Build/source/texk/web2c/web2c/cvtbib.sed @@ -1,4 +1,7 @@ -1i\ +/#include "cpascal.h"/a\ +\#include \<setjmp.h\> \ +jmp_buf jmp9998, jmp32; int lab31=0; +/#include "u*ptexdir\/kanji.h"/a\ \#include \<setjmp.h\> \ jmp_buf jmp9998, jmp32; int lab31=0; s/goto lab31 ; */{lab31=1; return;}/ diff --git a/Build/source/texk/web2c/web2c/makecpool.c b/Build/source/texk/web2c/web2c/makecpool.c index 74d936c33f7..bf401c3ee72 100644 --- a/Build/source/texk/web2c/web2c/makecpool.c +++ b/Build/source/texk/web2c/web2c/makecpool.c @@ -46,10 +46,10 @@ int main(int argc, char *argv[]) " * %s %s\n" " */\n" "\n" - "#include <stdio.h>\n" - "#include <string.h>\n" "#define EXTERN extern\n" "#include \"%sd.h\"\n" + "#include <stdio.h>\n" + "#include <string.h>\n" "\n" "static const char *poolfilearr[] = {\n", argv[0], argv[1], argv[1]); while (fgets(data, 1024, fh)) { diff --git a/Build/source/texk/web2c/web2c/web2c-lexer.c b/Build/source/texk/web2c/web2c/web2c-lexer.c index 39ea325d90f..00d1dff0bc0 100644 --- a/Build/source/texk/web2c/web2c/web2c-lexer.c +++ b/Build/source/texk/web2c/web2c/web2c-lexer.c @@ -1,5 +1,12 @@ +#line 4 "web2c-lexer.l" +/* web2c-lexer.l -- lexical analysis for Tangle output. Public domain. */ + +#include "web2c.h" +#include "web2c-parser.h" -#line 3 "web2c-lexer.c" + + +#line 10 "web2c-lexer.c" #define YY_INT_ALIGNED short int @@ -720,12 +727,8 @@ static int yy_prev_more_offset = 0; char yytext[YYLMAX]; char *yytext_ptr; #line 1 "web2c-lexer.l" -#line 4 "web2c-lexer.l" -/* web2c-lexer.l -- lexical analysis for Tangle output. Public domain. */ - -#include "web2c.h" -#include "web2c-parser.h" +#line 11 "web2c-lexer.l" /* Hack to make it possible to compile the generated code with C++ Required if you use flex. */ #ifdef __cplusplus @@ -752,7 +755,7 @@ yywrap (void) return 1; } #define YY_SKIP_YYWRAP /* not that it matters */ -#line 756 "web2c-lexer.c" +#line 759 "web2c-lexer.c" #define INITIAL 0 @@ -934,9 +937,9 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 51 "web2c-lexer.l" +#line 53 "web2c-lexer.l" -#line 940 "web2c-lexer.c" +#line 943 "web2c-lexer.c" if ( !(yy_init) ) { @@ -1041,17 +1044,17 @@ do_action: /* This label is used only to access EOF actions. */ case 1: /* rule 1 can match eol */ YY_RULE_SETUP -#line 52 "web2c-lexer.l" +#line 54 "web2c-lexer.l" ; YY_BREAK case 2: YY_RULE_SETUP -#line 53 "web2c-lexer.l" +#line 55 "web2c-lexer.l" { while (webinput() != '}'); } YY_BREAK case 3: YY_RULE_SETUP -#line 55 "web2c-lexer.l" +#line 57 "web2c-lexer.l" { register int c; putc('#', out); @@ -1062,7 +1065,7 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 63 "web2c-lexer.l" +#line 65 "web2c-lexer.l" {register int c; register char *cp=conditional; new_line(); @@ -1078,7 +1081,7 @@ YY_RULE_SETUP YY_BREAK case 5: YY_RULE_SETUP -#line 76 "web2c-lexer.l" +#line 78 "web2c-lexer.l" {register int c; new_line(); fputs("#endif /* ", out); @@ -1093,7 +1096,7 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -#line 88 "web2c-lexer.l" +#line 90 "web2c-lexer.l" {register int c; register char *cp=conditional; new_line(); @@ -1109,7 +1112,7 @@ YY_RULE_SETUP YY_BREAK case 7: YY_RULE_SETUP -#line 101 "web2c-lexer.l" +#line 103 "web2c-lexer.l" {register int c; new_line(); fputs("#endif /* not ", out); @@ -1125,205 +1128,205 @@ YY_RULE_SETUP case 8: /* rule 8 can match eol */ YY_RULE_SETUP -#line 114 "web2c-lexer.l" +#line 116 "web2c-lexer.l" ; YY_BREAK case 9: /* rule 9 can match eol */ YY_RULE_SETUP -#line 116 "web2c-lexer.l" +#line 118 "web2c-lexer.l" ; YY_BREAK case 10: YY_RULE_SETUP -#line 118 "web2c-lexer.l" +#line 120 "web2c-lexer.l" return last_tok=define_tok; YY_BREAK case 11: YY_RULE_SETUP -#line 119 "web2c-lexer.l" +#line 121 "web2c-lexer.l" return last_tok=field_tok; YY_BREAK case 12: YY_RULE_SETUP -#line 120 "web2c-lexer.l" +#line 122 "web2c-lexer.l" return last_tok=and_tok; YY_BREAK case 13: YY_RULE_SETUP -#line 121 "web2c-lexer.l" +#line 123 "web2c-lexer.l" return last_tok=array_tok; YY_BREAK case 14: YY_RULE_SETUP -#line 122 "web2c-lexer.l" +#line 124 "web2c-lexer.l" return last_tok=begin_tok; YY_BREAK case 15: YY_RULE_SETUP -#line 123 "web2c-lexer.l" +#line 125 "web2c-lexer.l" return last_tok=case_tok; YY_BREAK case 16: YY_RULE_SETUP -#line 124 "web2c-lexer.l" +#line 126 "web2c-lexer.l" return last_tok=const_tok; YY_BREAK case 17: YY_RULE_SETUP -#line 125 "web2c-lexer.l" +#line 127 "web2c-lexer.l" return last_tok=div_tok; YY_BREAK case 18: YY_RULE_SETUP -#line 126 "web2c-lexer.l" +#line 128 "web2c-lexer.l" return last_tok=break_tok; YY_BREAK case 19: YY_RULE_SETUP -#line 127 "web2c-lexer.l" +#line 129 "web2c-lexer.l" return last_tok=do_tok; YY_BREAK case 20: YY_RULE_SETUP -#line 128 "web2c-lexer.l" +#line 130 "web2c-lexer.l" return last_tok=downto_tok; YY_BREAK case 21: YY_RULE_SETUP -#line 129 "web2c-lexer.l" +#line 131 "web2c-lexer.l" return last_tok=else_tok; YY_BREAK case 22: YY_RULE_SETUP -#line 130 "web2c-lexer.l" +#line 132 "web2c-lexer.l" return last_tok=end_tok; YY_BREAK case 23: YY_RULE_SETUP -#line 131 "web2c-lexer.l" +#line 133 "web2c-lexer.l" return last_tok=file_tok; YY_BREAK case 24: YY_RULE_SETUP -#line 132 "web2c-lexer.l" +#line 134 "web2c-lexer.l" return last_tok=for_tok; YY_BREAK case 25: YY_RULE_SETUP -#line 133 "web2c-lexer.l" +#line 135 "web2c-lexer.l" return last_tok=function_tok; YY_BREAK case 26: YY_RULE_SETUP -#line 134 "web2c-lexer.l" +#line 136 "web2c-lexer.l" return last_tok=goto_tok; YY_BREAK case 27: YY_RULE_SETUP -#line 135 "web2c-lexer.l" +#line 137 "web2c-lexer.l" return last_tok=if_tok; YY_BREAK case 28: YY_RULE_SETUP -#line 136 "web2c-lexer.l" +#line 138 "web2c-lexer.l" return last_tok=label_tok; YY_BREAK case 29: YY_RULE_SETUP -#line 137 "web2c-lexer.l" +#line 139 "web2c-lexer.l" return last_tok=mod_tok; YY_BREAK case 30: YY_RULE_SETUP -#line 138 "web2c-lexer.l" +#line 140 "web2c-lexer.l" return last_tok=noreturn_tok; YY_BREAK case 31: YY_RULE_SETUP -#line 139 "web2c-lexer.l" +#line 141 "web2c-lexer.l" return last_tok=not_tok; YY_BREAK case 32: YY_RULE_SETUP -#line 140 "web2c-lexer.l" +#line 142 "web2c-lexer.l" return last_tok=of_tok; YY_BREAK case 33: YY_RULE_SETUP -#line 141 "web2c-lexer.l" +#line 143 "web2c-lexer.l" return last_tok=or_tok; YY_BREAK case 34: YY_RULE_SETUP -#line 142 "web2c-lexer.l" +#line 144 "web2c-lexer.l" return last_tok=procedure_tok; YY_BREAK case 35: YY_RULE_SETUP -#line 143 "web2c-lexer.l" +#line 145 "web2c-lexer.l" return last_tok=program_tok; YY_BREAK case 36: YY_RULE_SETUP -#line 144 "web2c-lexer.l" +#line 146 "web2c-lexer.l" return last_tok=record_tok; YY_BREAK case 37: YY_RULE_SETUP -#line 145 "web2c-lexer.l" +#line 147 "web2c-lexer.l" return last_tok=repeat_tok; YY_BREAK case 38: /* rule 38 can match eol */ YY_RULE_SETUP -#line 146 "web2c-lexer.l" +#line 148 "web2c-lexer.l" return last_tok=hhb0_tok; YY_BREAK case 39: /* rule 39 can match eol */ YY_RULE_SETUP -#line 147 "web2c-lexer.l" +#line 149 "web2c-lexer.l" return last_tok=hhb1_tok; YY_BREAK case 40: YY_RULE_SETUP -#line 148 "web2c-lexer.l" +#line 150 "web2c-lexer.l" return last_tok=then_tok; YY_BREAK case 41: YY_RULE_SETUP -#line 149 "web2c-lexer.l" +#line 151 "web2c-lexer.l" return last_tok=to_tok; YY_BREAK case 42: YY_RULE_SETUP -#line 150 "web2c-lexer.l" +#line 152 "web2c-lexer.l" return last_tok=type_tok; YY_BREAK case 43: YY_RULE_SETUP -#line 151 "web2c-lexer.l" +#line 153 "web2c-lexer.l" return last_tok=until_tok; YY_BREAK case 44: YY_RULE_SETUP -#line 152 "web2c-lexer.l" +#line 154 "web2c-lexer.l" return last_tok=var_tok; YY_BREAK case 45: YY_RULE_SETUP -#line 153 "web2c-lexer.l" +#line 155 "web2c-lexer.l" return last_tok=while_tok; YY_BREAK case 46: YY_RULE_SETUP -#line 154 "web2c-lexer.l" +#line 156 "web2c-lexer.l" return last_tok=others_tok; YY_BREAK case 47: YY_RULE_SETUP -#line 156 "web2c-lexer.l" +#line 158 "web2c-lexer.l" { sprintf (temp, "%s%s", negbuf, yytext); negbuf[0] = '\0'; @@ -1332,7 +1335,7 @@ YY_RULE_SETUP YY_BREAK case 48: YY_RULE_SETUP -#line 162 "web2c-lexer.l" +#line 164 "web2c-lexer.l" { sprintf (temp, "%s%s", negbuf, yytext); negbuf[0] = '\0'; @@ -1342,18 +1345,18 @@ YY_RULE_SETUP case 49: /* rule 49 can match eol */ YY_RULE_SETUP -#line 168 "web2c-lexer.l" +#line 170 "web2c-lexer.l" return last_tok=single_char_tok; YY_BREAK case 50: /* rule 50 can match eol */ YY_RULE_SETUP -#line 170 "web2c-lexer.l" +#line 172 "web2c-lexer.l" return last_tok=string_literal_tok; YY_BREAK case 51: YY_RULE_SETUP -#line 172 "web2c-lexer.l" +#line 174 "web2c-lexer.l" { if ((last_tok>=undef_id_tok && last_tok<=field_id_tok) || last_tok==i_num_tok || @@ -1365,7 +1368,7 @@ YY_RULE_SETUP YY_BREAK case 52: YY_RULE_SETUP -#line 181 "web2c-lexer.l" +#line 183 "web2c-lexer.l" { if ((last_tok>=undef_id_tok && last_tok<=field_id_tok) || last_tok==i_num_tok || @@ -1386,102 +1389,102 @@ YY_RULE_SETUP YY_BREAK case 53: YY_RULE_SETUP -#line 199 "web2c-lexer.l" +#line 201 "web2c-lexer.l" return last_tok='*'; YY_BREAK case 54: YY_RULE_SETUP -#line 200 "web2c-lexer.l" +#line 202 "web2c-lexer.l" return last_tok='/'; YY_BREAK case 55: YY_RULE_SETUP -#line 201 "web2c-lexer.l" +#line 203 "web2c-lexer.l" return last_tok='='; YY_BREAK case 56: YY_RULE_SETUP -#line 202 "web2c-lexer.l" +#line 204 "web2c-lexer.l" return last_tok=not_eq_tok; YY_BREAK case 57: YY_RULE_SETUP -#line 203 "web2c-lexer.l" +#line 205 "web2c-lexer.l" return last_tok='<'; YY_BREAK case 58: YY_RULE_SETUP -#line 204 "web2c-lexer.l" +#line 206 "web2c-lexer.l" return last_tok='>'; YY_BREAK case 59: YY_RULE_SETUP -#line 205 "web2c-lexer.l" +#line 207 "web2c-lexer.l" return last_tok=less_eq_tok; YY_BREAK case 60: YY_RULE_SETUP -#line 206 "web2c-lexer.l" +#line 208 "web2c-lexer.l" return last_tok=great_eq_tok; YY_BREAK case 61: YY_RULE_SETUP -#line 207 "web2c-lexer.l" +#line 209 "web2c-lexer.l" return last_tok='('; YY_BREAK case 62: YY_RULE_SETUP -#line 208 "web2c-lexer.l" +#line 210 "web2c-lexer.l" return last_tok=')'; YY_BREAK case 63: YY_RULE_SETUP -#line 209 "web2c-lexer.l" +#line 211 "web2c-lexer.l" return last_tok='['; YY_BREAK case 64: YY_RULE_SETUP -#line 210 "web2c-lexer.l" +#line 212 "web2c-lexer.l" return last_tok=']'; YY_BREAK case 65: YY_RULE_SETUP -#line 211 "web2c-lexer.l" +#line 213 "web2c-lexer.l" return last_tok=assign_tok; YY_BREAK case 66: YY_RULE_SETUP -#line 212 "web2c-lexer.l" +#line 214 "web2c-lexer.l" return last_tok=two_dots_tok; YY_BREAK case 67: YY_RULE_SETUP -#line 213 "web2c-lexer.l" +#line 215 "web2c-lexer.l" return last_tok='.'; YY_BREAK case 68: YY_RULE_SETUP -#line 214 "web2c-lexer.l" +#line 216 "web2c-lexer.l" return last_tok=','; YY_BREAK case 69: YY_RULE_SETUP -#line 215 "web2c-lexer.l" +#line 217 "web2c-lexer.l" return last_tok=';'; YY_BREAK case 70: YY_RULE_SETUP -#line 216 "web2c-lexer.l" +#line 218 "web2c-lexer.l" return last_tok=':'; YY_BREAK case 71: YY_RULE_SETUP -#line 217 "web2c-lexer.l" +#line 219 "web2c-lexer.l" return last_tok='^'; YY_BREAK case 72: YY_RULE_SETUP -#line 219 "web2c-lexer.l" +#line 221 "web2c-lexer.l" { strcpy (last_id, yytext); l_s = search_table (last_id); return @@ -1490,16 +1493,16 @@ YY_RULE_SETUP YY_BREAK case 73: YY_RULE_SETUP -#line 226 "web2c-lexer.l" +#line 228 "web2c-lexer.l" { /* Any bizarre token will do. */ return last_tok = two_dots_tok; } YY_BREAK case 74: YY_RULE_SETUP -#line 228 "web2c-lexer.l" +#line 230 "web2c-lexer.l" ECHO; YY_BREAK -#line 1503 "web2c-lexer.c" +#line 1506 "web2c-lexer.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2479,7 +2482,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 228 "web2c-lexer.l" +#line 230 "web2c-lexer.l" /* Some helper routines. Defining these here means we don't have references @@ -2578,3 +2581,4 @@ yyerror (const_string s) /* Avoid silly warnings. */ return 0; } + diff --git a/Build/source/texk/web2c/web2c/web2c-lexer.l b/Build/source/texk/web2c/web2c/web2c-lexer.l index 585f31501c1..4568b6e41c2 100644 --- a/Build/source/texk/web2c/web2c/web2c-lexer.l +++ b/Build/source/texk/web2c/web2c/web2c-lexer.l @@ -1,11 +1,13 @@ %option never-interactive -%{ +%top{ /* web2c-lexer.l -- lexical analysis for Tangle output. Public domain. */ #include "web2c.h" #include "web2c-parser.h" +} +%{ /* Hack to make it possible to compile the generated code with C++ Required if you use flex. */ #ifdef __cplusplus diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog index 5ea1ca2046d..6214af6775e 100644 --- a/Build/source/texk/web2c/xetexdir/ChangeLog +++ b/Build/source/texk/web2c/xetexdir/ChangeLog @@ -1,3 +1,9 @@ +2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * XeTeXFontInst.h: Include "XeTeXFontMgr.h" before <stdio.h>. + * XeTeX_ext.h: Include <w2c/c-auto.h> before <unicode/utypes.h>. + * pdfimage.cpp: Include "XeTeX_ext.h" before "pdfimage.h". + 2013-05-30 Peter Breitenlohner <peb@mppmu.mpg.de> * pdfimage.cpp [MINGW]: Include kpathsea/mingw32.h (via diff --git a/Build/source/texk/web2c/xetexdir/XeTeXFontInst.h b/Build/source/texk/web2c/xetexdir/XeTeXFontInst.h index be2759ffd49..119f42808a9 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeXFontInst.h +++ b/Build/source/texk/web2c/xetexdir/XeTeXFontInst.h @@ -43,14 +43,13 @@ authorization from the copyright holders. #ifndef __XeTeXFontInst_H #define __XeTeXFontInst_H +#include "XeTeXFontMgr.h" + #include <stdio.h> #include <ft2build.h> #include FT_FREETYPE_H #include FT_TRUETYPE_TABLES_H -#include "XeTeXFontMgr.h" -#include "XeTeX_ext.h" - #define MATH_TAG HB_TAG('M','A','T','H') // create specific subclasses for each supported platform diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.h b/Build/source/texk/web2c/xetexdir/XeTeX_ext.h index d5cb931c692..c6e0b953d2d 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.h +++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.h @@ -35,8 +35,8 @@ authorization from the copyright holders. #ifndef __XETEXEXT_H #define __XETEXEXT_H -#include <unicode/utypes.h> #include <w2c/c-auto.h> /* needed for SIZEOF_LONG and NO_DUMP_SHARE */ +#include <unicode/utypes.h> #ifdef __cplusplus extern "C" { #endif diff --git a/Build/source/texk/web2c/xetexdir/pdfimage.cpp b/Build/source/texk/web2c/xetexdir/pdfimage.cpp index 8eb32a63a92..8b7bc40d167 100644 --- a/Build/source/texk/web2c/xetexdir/pdfimage.cpp +++ b/Build/source/texk/web2c/xetexdir/pdfimage.cpp @@ -30,10 +30,10 @@ use or other dealings in this Software without prior written authorization from the copyright holders. \****************************************************************************/ -#include "pdfimage.h" - #include "XeTeX_ext.h" +#include "pdfimage.h" + #include "PDFDoc.h" #include "Catalog.h" #include "Page.h" |