summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2024-01-07 04:37:44 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2024-01-07 04:37:44 +0000
commitf8849e85a086aeb5fd6c0d0f7ee33dc423c6e9fa (patch)
tree17a621f7f5dddbd03c7193d1b992056d55be86c1 /Build
parentf02568c72ef88e19da0dc7d830caf4b5f104ae74 (diff)
opendetex-2.8.11
git-svn-id: svn://tug.org/texlive/trunk@69326 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/README8
-rw-r--r--Build/source/texk/detex/ChangeLog5
-rw-r--r--Build/source/texk/detex/TLpatches/01-no-malloc-decl13
-rw-r--r--Build/source/texk/detex/TLpatches/04-verb-termination42
-rw-r--r--Build/source/texk/detex/TLpatches/07-help-summary12
-rw-r--r--Build/source/texk/detex/TLpatches/09-help-url-at-end33
-rw-r--r--Build/source/texk/detex/TLpatches/ChangeLog5
-rw-r--r--Build/source/texk/detex/TLpatches/TL-Changes2
-rwxr-xr-xBuild/source/texk/detex/configure22
-rw-r--r--Build/source/texk/detex/configure.ac2
-rw-r--r--Build/source/texk/detex/detex-src/ChangeLog8
-rw-r--r--Build/source/texk/detex/detex-src/Makefile20
-rw-r--r--Build/source/texk/detex/detex-src/README2
-rw-r--r--Build/source/texk/detex/detex-src/detex.c985
-rw-r--r--Build/source/texk/detex/detex-src/detex.h12
-rw-r--r--Build/source/texk/detex/detex-src/detex.l287
-rw-r--r--Build/source/texk/detex/detex-src/detex.man38
17 files changed, 686 insertions, 810 deletions
diff --git a/Build/source/texk/README b/Build/source/texk/README
index 56bd268a3c0..b135b734187 100644
--- a/Build/source/texk/README
+++ b/Build/source/texk/README
@@ -1,5 +1,5 @@
$Id$
-Copyright 2006-2023 TeX Users Group.
+Copyright 2006-2024 TeX Users Group.
You may freely use, modify and/or distribute this file.
This TeX Live directory contains the programs that use the kpathsea
@@ -33,10 +33,8 @@ cjkutils 4.8.5 - checked 22jan22
http://git.savannah.gnu.org/gitweb/?p=cjk.git;a=summary
http://www.nongnu.org/cjk/
-detex 2.8.9 - maintained here
- maintained for a time (untouched since 2020, checked 14sep22):
- https://github.com/pkubowicz/opendetex/releases
- (would be useful to look at open issues there for bugs)
+detex 2.8.11 - checked 07jan24
+ https://github.com/pkubowicz/opendetex/releases
original author: http://www.cs.purdue.edu/homes/trinkle/detex/
dtl - maintained here, by Takuji
diff --git a/Build/source/texk/detex/ChangeLog b/Build/source/texk/detex/ChangeLog
index aa78331d9ec..0b52c9f2415 100644
--- a/Build/source/texk/detex/ChangeLog
+++ b/Build/source/texk/detex/ChangeLog
@@ -1,3 +1,8 @@
+2024-01-07 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * Import opendetex-2.8.11.
+ * configure.ac (detex_version): upstream 2.8.11.
+
2023-08-13 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* detex.test: Make easier to test on Windows.
diff --git a/Build/source/texk/detex/TLpatches/01-no-malloc-decl b/Build/source/texk/detex/TLpatches/01-no-malloc-decl
deleted file mode 100644
index 5dea1d5e795..00000000000
--- a/Build/source/texk/detex/TLpatches/01-no-malloc-decl
+++ /dev/null
@@ -1,13 +0,0 @@
---- detex-src/detex.l (revision 64397)
-+++ detex-src/detex.l (working copy)
-@@ -110,7 +110,10 @@
- #define STRIPARGS(x) cArgs=x; LaBEGIN LaMacro2
- #define CITE(x) if (fLatex && !fCite) KILLARGS(x)
-
-+/* avoid gratuitous gcc warning from passing -D for this on command line */
-+#ifndef NO_MALLOC_DECL
- #define NO_MALLOC_DECL
-+#endif
-
- void LineBreak();
- void Ignore();
diff --git a/Build/source/texk/detex/TLpatches/04-verb-termination b/Build/source/texk/detex/TLpatches/04-verb-termination
deleted file mode 100644
index 35d3d9c451d..00000000000
--- a/Build/source/texk/detex/TLpatches/04-verb-termination
+++ /dev/null
@@ -1,42 +0,0 @@
---- detex-src/detex.l (revision 64397)
-+++ detex-src/detex.l (working copy)
-@@ -346,15 +349,30 @@ VERBSYMBOL =|\\leq|\\geq|\\in|>|<|\\subseteq|\subs
- footnoteLevel = currBracesLevel;
- ++currBracesLevel;
- }
--<Normal>"\\verb" /* ignore \verb<ch>...<ch> */ { if (fLatex) {
-- char verbchar, c;
-- verbchar = input();
-- while ((c = input()) != verbchar)
-- /*if (c == '\n')
-- NEWLINE;*/
-- putchar(c);
-- }
-- IGNORE;
-+<Normal>"\\verb" /* ignore \verb<ch>...<ch> */ {
-+ /* Sorry to use different formatting, but it seemed better not
-+ to cram all this code over in the rightmost 20 chars. */
-+ if (fLatex) {
-+ char verbchar, c;
-+ verbchar = input();
-+ if (verbchar != EOF) {
-+ while ((c = input()) != verbchar && c != '\n' && c != EOF) {
-+ putchar(c);
-+ }
-+ }
-+ /* would be nice to include input filenames and line numbers */
-+ if (verbchar == EOF || c == EOF) {
-+ /* do this test first in case verbchar is eof */
-+ ErrorExit("\\verb not complete before eof");
-+ }
-+ if (c == '\n') {
-+ char delim[2];
-+ delim[0] = verbchar;
-+ delim[1] = 0;
-+ Warning("\\verb not terminated before eol, delimiter", delim);
-+ }
-+ }
-+ IGNORE;
- }
-
- <Normal>"\\newcommand" { LATEX; KILLARGS(2); }
diff --git a/Build/source/texk/detex/TLpatches/07-help-summary b/Build/source/texk/detex/TLpatches/07-help-summary
deleted file mode 100644
index b0e9cd4e4e8..00000000000
--- a/Build/source/texk/detex/TLpatches/07-help-summary
+++ /dev/null
@@ -1,12 +0,0 @@
---- detex-src/detex.l (revision 64397)
-+++ detex-src/detex.l (working copy)
-@@ -1093,7 +1111,8 @@ UsageExit(void)
- {
- (void)printf("\n%s [ -clnrstw1 ] [ -e environment-list ] [ filename[.tex] ... ]\n",
- sbProgName);
-- puts(" -c echo LaTeX \\cite, \\ref, and \\pageref values\n \
-+ puts("Strip (La)TeX commands from the input.\n\n \
-+ -c echo LaTeX \\cite, \\ref, and \\pageref values\n \
- -e <env-list> list of LaTeX environments to ignore\n \
- -l force latex mode\n \
- -n do not follow \\input, \\include and \\subfile\n \
diff --git a/Build/source/texk/detex/TLpatches/09-help-url-at-end b/Build/source/texk/detex/TLpatches/09-help-url-at-end
deleted file mode 100644
index be746d9a0fa..00000000000
--- a/Build/source/texk/detex/TLpatches/09-help-url-at-end
+++ /dev/null
@@ -1,33 +0,0 @@
---- detex-src/detex.l (revision 64397)
-+++ detex-src/detex.l (working copy)
-@@ -1093,7 +1111,8 @@ UsageExit(void)
- {
- (void)printf("\n%s [ -clnrstw1 ] [ -e environment-list ] [ filename[.tex] ... ]\n",
- sbProgName);
-- puts(" -c echo LaTeX \\cite, \\ref, and \\pageref values\n \
-+ puts("Strip (La)TeX commands from the input.\n\n \
-+-c echo LaTeX \\cite, \\ref, and \\pageref values\n \
- -e <env-list> list of LaTeX environments to ignore\n \
- -l force latex mode\n \
- -n do not follow \\input, \\include and \\subfile\n \
-@@ -1102,7 +1121,10 @@ UsageExit(void)
- -t force tex mode\n \
- -w word only output\n \
- -1 outputs the original file name and line number in the beginning of each line\n \
---v show program version and exit");
-+-v show program version and exit\n\
-+\n\
-+opendetex home page: https://github.com/pkubowicz/opendetex");
-+ (void)printf("opendetex version %s\n", VERSION);
- exit(0);
- }
-
-@@ -1113,7 +1135,6 @@ UsageExit(void)
- void
- VersionExit(void)
- {
-- (void)printf("\nOpenDetex version %s\nhttps://github.com/pkubowicz/opendetex\n",
-- VERSION);
-+ (void)printf("\nopendetex version %s\n", VERSION);
- exit(0);
- }
diff --git a/Build/source/texk/detex/TLpatches/ChangeLog b/Build/source/texk/detex/TLpatches/ChangeLog
index 4c36050c33a..735001e22c5 100644
--- a/Build/source/texk/detex/TLpatches/ChangeLog
+++ b/Build/source/texk/detex/TLpatches/ChangeLog
@@ -1,3 +1,8 @@
+2024-01-07 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ Adapt to opendetex-2.8.11.
+ * Patches removed (handled upstream).
+
2020-12-03 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
Remove patch-01-support-old-compiler, which is applied in the upstream.
diff --git a/Build/source/texk/detex/TLpatches/TL-Changes b/Build/source/texk/detex/TLpatches/TL-Changes
index 494d1ff7570..7d83432dca4 100644
--- a/Build/source/texk/detex/TLpatches/TL-Changes
+++ b/Build/source/texk/detex/TLpatches/TL-Changes
@@ -1,4 +1,4 @@
-Changes applied to the opendetex-2.8.9 tree as obtained from:
+Changes applied to the opendetex-2.8.11 tree as obtained from:
https://github.com/pkubowicz/opendetex/releases
Renamed:
diff --git a/Build/source/texk/detex/configure b/Build/source/texk/detex/configure
index 547c24704f6..c4acb226d0b 100755
--- a/Build/source/texk/detex/configure
+++ b/Build/source/texk/detex/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72 for detex (TeX Live) 2.8.91.
+# Generated by GNU Autoconf 2.72 for detex (TeX Live) 2.8.11.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -614,8 +614,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='detex (TeX Live)'
PACKAGE_TARNAME='detex--tex-live-'
-PACKAGE_VERSION='2.8.91'
-PACKAGE_STRING='detex (TeX Live) 2.8.91'
+PACKAGE_VERSION='2.8.11'
+PACKAGE_STRING='detex (TeX Live) 2.8.11'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1364,7 +1364,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-'configure' configures detex (TeX Live) 2.8.91 to adapt to many kinds of systems.
+'configure' configures detex (TeX Live) 2.8.11 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1436,7 +1436,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of detex (TeX Live) 2.8.91:";;
+ short | recursive ) echo "Configuration of detex (TeX Live) 2.8.11:";;
esac
cat <<\_ACEOF
@@ -1556,7 +1556,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-detex (TeX Live) configure 2.8.91
+detex (TeX Live) configure 2.8.11
generated by GNU Autoconf 2.72
Copyright (C) 2023 Free Software Foundation, Inc.
@@ -2098,7 +2098,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by detex (TeX Live) $as_me 2.8.91, which was
+It was created by detex (TeX Live) $as_me 2.8.11, which was
generated by GNU Autoconf 2.72. Invocation command line was
$ $0$ac_configure_args_raw
@@ -8659,7 +8659,7 @@ fi
# Define the identity of the package.
PACKAGE='detex--tex-live-'
- VERSION='2.8.91'
+ VERSION='2.8.11'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -15297,7 +15297,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-detex (TeX Live) config.lt 2.8.91
+detex (TeX Live) config.lt 2.8.11
configured by $0, generated by GNU Autoconf 2.72.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -16916,7 +16916,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by detex (TeX Live) $as_me 2.8.91, which was
+This file was extended by detex (TeX Live) $as_me 2.8.11, which was
generated by GNU Autoconf 2.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16984,7 +16984,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-detex (TeX Live) config.status 2.8.91
+detex (TeX Live) config.status 2.8.11
configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/texk/detex/configure.ac b/Build/source/texk/detex/configure.ac
index 91f06222f0b..549d7b8a2b5 100644
--- a/Build/source/texk/detex/configure.ac
+++ b/Build/source/texk/detex/configure.ac
@@ -8,7 +8,7 @@ dnl This file is free software; the copyright holder
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
-m4_define([detex_version], [2.8.91])[]
+m4_define([detex_version], [2.8.11])[]
AC_INIT([detex (TeX Live)], detex_version, [tex-k@tug.org])
AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([detex-src/detex.l])
diff --git a/Build/source/texk/detex/detex-src/ChangeLog b/Build/source/texk/detex/detex-src/ChangeLog
index 04860cf53b3..024da284894 100644
--- a/Build/source/texk/detex/detex-src/ChangeLog
+++ b/Build/source/texk/detex/detex-src/ChangeLog
@@ -210,3 +210,11 @@ Fixed compilation on old compilers supported by TeX Live (#65). Thanks to Akira
(Version 2.8.9) -- December, 2020
Include escaped percent sign in output (#70). Thanks to Max Leonhardt.
+
+(Version 2.8.10) -- December, 2023
+
+Fixes to man page. Thanks to kberry and Hilmar Preusse.
+
+(Version 2.8.11) -- December, 2023
+
+Fixed segmentation fault on unterminated \verb.
diff --git a/Build/source/texk/detex/detex-src/Makefile b/Build/source/texk/detex/detex-src/Makefile
index 8d0ace1ff47..13443a0e873 100644
--- a/Build/source/texk/detex/detex-src/Makefile
+++ b/Build/source/texk/detex/detex-src/Makefile
@@ -1,10 +1,10 @@
# 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
@@ -12,19 +12,19 @@
# 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.
@@ -71,7 +71,7 @@ DEFS =
#
#DEFS += ${DEFS} -DNO_MALLOC_DECL
#
-CFLAGS = -O -DVERSION=\"${VERSION}\" ${DEFS} -Wall
+CFLAGS += -O -DVERSION=\"${VERSION}\" ${DEFS} -Wall
# Use your favorite lexical scanner
#
@@ -105,7 +105,7 @@ SRC = detex.l
#
D_OBJ = detex.o
-VERSION = 2.8.9
+VERSION = 2.8.11
all: ${PROGS}
@@ -158,3 +158,7 @@ package: clean detex.c
detex.c: detex.h
detex.c: detex.l
+inpdf:
+ cd test && xelatex -interaction=nonstopmode in.tex || echo there were errors
+ rm -f test/*.toc test/*.log test/*.aux
+ mv test/in.pdf .
diff --git a/Build/source/texk/detex/detex-src/README b/Build/source/texk/detex/detex-src/README
index 261a9e56e79..642e3e93936 100644
--- a/Build/source/texk/detex/detex-src/README
+++ b/Build/source/texk/detex/detex-src/README
@@ -1,4 +1,4 @@
-OpenDetex - Version 2.8.91 (TeX Live)
+OpenDetex - Version 2.8.11
OpenDetex is a program to remove TeX constructs from a text file. It recognizes
the \input command.
diff --git a/Build/source/texk/detex/detex-src/detex.c b/Build/source/texk/detex/detex-src/detex.c
index 830ea9b4bac..bd982e06363 100644
--- a/Build/source/texk/detex/detex-src/detex.c
+++ b/Build/source/texk/detex/detex-src/detex.c
@@ -1,12 +1,11 @@
-#line 5 "../../../texk/detex/detex-src/detex.l"
/*
* 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
@@ -14,19 +13,19 @@
* 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.
@@ -36,7 +35,6 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
*/
-
/*
* detex [-e environment-list] [-c] [-l] [-n] [-s] [-t] [-w] [-1] [file[.tex] ]
*
@@ -89,9 +87,7 @@
#endif /* KPATHSEA */
-
-
-#line 95 "../../../texk/detex/detex-src/detex.c"
+#line 91 "lex.yy.c"
#define YY_INT_ALIGNED short int
@@ -100,7 +96,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 0
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -175,60 +171,48 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
+/* begin standard C++ headers. */
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
*/
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN (yy_start) = 1 + 2 *
-
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
-
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart(yyin )
-
+#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
@@ -258,14 +242,14 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
typedef size_t yy_size_t;
#endif
-extern yy_size_t yyleng;
+extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
+
#define YY_LESS_LINENO(n)
#define YY_LINENO_REWIND_TO(ptr)
@@ -282,7 +266,6 @@ extern FILE *yyin, *yyout;
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -297,12 +280,12 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -325,7 +308,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -353,7 +336,7 @@ struct yy_buffer_state
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
@@ -364,7 +347,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
-
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
@@ -372,11 +354,11 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
-yy_size_t yyleng;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
+static char *yy_c_buf_p = NULL;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
@@ -385,62 +367,56 @@ static int yy_start = 0; /* start state number */
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart (FILE *input_file );
-void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
-void yy_delete_buffer (YY_BUFFER_STATE b );
-void yy_flush_buffer (YY_BUFFER_STATE b );
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
-void yypop_buffer_state (void );
-
-static void yyensure_buffer_stack (void );
-static void yy_load_buffer_state (void );
-static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
-#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
-YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
-void *yyalloc (yy_size_t );
-void *yyrealloc (void *,yy_size_t );
-void yyfree (void * );
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
#define yy_new_buffer yy_create_buffer
-
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
-
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */
+typedef flex_uint8_t YY_CHAR;
-typedef unsigned char YY_CHAR;
-
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+FILE *yyin = NULL, *yyout = NULL;
typedef int yy_state_type;
extern int yylineno;
-
int yylineno = 1;
extern char *yytext;
@@ -449,24 +425,20 @@ extern char *yytext;
#endif
#define yytext_ptr yytext
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-#if defined(__GNUC__) && __GNUC__ >= 3
-__attribute__((__noreturn__))
-#endif
-static void yy_fatal_error (yyconst char msg[] );
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
- yyleng = (size_t) (yy_cp - yy_bp); \
+ yyleng = (int) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-
#define YY_NUM_RULES 174
#define YY_END_OF_BUFFER 175
/* This struct is not used in this scanner,
@@ -476,7 +448,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[1362] =
+static const flex_int16_t yy_accept[1362] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 145, 145, 0, 0, 0, 0,
@@ -630,7 +602,7 @@ static yyconst flex_int16_t yy_accept[1362] =
0
} ;
-static yyconst YY_CHAR yy_ec[256] =
+static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -662,7 +634,7 @@ static yyconst YY_CHAR yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst YY_CHAR yy_meta[61] =
+static const YY_CHAR yy_meta[61] =
{ 0,
1, 2, 3, 2, 4, 1, 1, 5, 1, 1,
1, 1, 6, 7, 1, 7, 7, 1, 7, 1,
@@ -672,7 +644,7 @@ static yyconst YY_CHAR yy_meta[61] =
9, 9, 9, 9, 9, 9, 12, 1, 13, 1
} ;
-static yyconst flex_uint16_t yy_base[1416] =
+static const flex_int16_t yy_base[1416] =
{ 0,
0, 0, 0, 1, 2, 6, 14, 26, 11, 30,
43, 47, 96, 0, 156, 0, 216, 0, 274, 277,
@@ -832,7 +804,7 @@ static yyconst flex_uint16_t yy_base[1416] =
2288, 2290, 3173, 2291, 2293
} ;
-static yyconst flex_int16_t yy_def[1416] =
+static const flex_int16_t yy_def[1416] =
{ 0,
1362, 1362, 1363, 1363, 1364, 1364, 1365, 1365, 1366, 1366,
1367, 1367, 1361, 13, 1361, 15, 1361, 17, 1368, 1368,
@@ -992,7 +964,7 @@ static yyconst flex_int16_t yy_def[1416] =
1361, 1361, 1361, 1361, 1361
} ;
-static yyconst flex_uint16_t yy_nxt[3432] =
+static const flex_int16_t yy_nxt[3432] =
{ 0,
1361, 1361, 48, 48, 51, 1361, 1361, 52, 51, 108,
108, 52, 61, 62, 61, 57, 58, 57, 134, 53,
@@ -1374,7 +1346,7 @@ static yyconst flex_uint16_t yy_nxt[3432] =
1361
} ;
-static yyconst flex_int16_t yy_chk[3432] =
+static const flex_int16_t yy_chk[3432] =
{ 0,
0, 0, 3, 4, 5, 0, 0, 5, 6, 23,
24, 6, 9, 9, 9, 7, 7, 7, 39, 5,
@@ -1770,9 +1742,9 @@ int yy_flex_debug = 0;
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
-#line 1 "../../../texk/detex/detex-src/detex.l"
+#line 1 "detex.l"
-#line 97 "../../../texk/detex/detex-src/detex.l"
+#line 97 "detex.l"
#undef IGNORE
#undef ECHO
@@ -1866,11 +1838,9 @@ int fIsColumn0 = 1; /* Are we at the begining of a line? */
int csb = 0; /* depth of flex context stack */
#endif /* FLEX_SCANNER */
+#line 1842 "lex.yy.c"
-
-
-
-#line 1874 "../../../texk/detex/detex-src/detex.c"
+#line 1844 "lex.yy.c"
#define INITIAL 0
#define Define 1
@@ -1907,36 +1877,36 @@ int csb = 0; /* depth of flex context stack */
#define YY_EXTRA_TYPE void *
#endif
-static int yy_init_globals (void );
+static int yy_init_globals ( void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int yylex_destroy (void );
+int yylex_destroy ( void );
-int yyget_debug (void );
+int yyget_debug ( void );
-void yyset_debug (int debug_flag );
+void yyset_debug ( int debug_flag );
-YY_EXTRA_TYPE yyget_extra (void );
+YY_EXTRA_TYPE yyget_extra ( void );
-void yyset_extra (YY_EXTRA_TYPE user_defined );
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
-FILE *yyget_in (void );
+FILE *yyget_in ( void );
-void yyset_in (FILE * _in_str );
+void yyset_in ( FILE * _in_str );
-FILE *yyget_out (void );
+FILE *yyget_out ( void );
-void yyset_out (FILE * _out_str );
+void yyset_out ( FILE * _out_str );
-yy_size_t yyget_leng (void );
+ int yyget_leng ( void );
-char *yyget_text (void );
+char *yyget_text ( void );
-int yyget_lineno (void );
+int yyget_lineno ( void );
-void yyset_lineno (int _line_number );
+void yyset_lineno ( int _line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -1944,9 +1914,9 @@ void yyset_lineno (int _line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap (void );
+extern "C" int yywrap ( void );
#else
-extern int yywrap (void );
+extern int yywrap ( void );
#endif
#endif
@@ -1955,19 +1925,18 @@ extern int yywrap (void );
#endif
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
+static void yy_flex_strncpy ( char *, const char *, int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
+static int yy_flex_strlen ( const char * );
#endif
#ifndef YY_NO_INPUT
-
#ifdef __cplusplus
-static int yyinput (void );
+static int yyinput ( void );
#else
-static int input (void );
+static int input ( void );
#endif
#endif
@@ -1987,7 +1956,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1998,7 +1967,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -2011,7 +1980,7 @@ static int input (void );
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -2100,16 +2069,16 @@ YY_DECL
if ( ! YY_CURRENT_BUFFER ) {
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
}
{
-#line 211 "../../../texk/detex/detex-src/detex.l"
+#line 211 "detex.l"
-#line 2113 "../../../texk/detex/detex-src/detex.c"
+#line 2082 "lex.yy.c"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@@ -2137,9 +2106,9 @@ yy_match:
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 1362 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 1361 );
@@ -2164,474 +2133,474 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 212 "../../../texk/detex/detex-src/detex.l"
+#line 212 "detex.l"
/* ignore comments */ {INCRLINENO;}
YY_BREAK
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
-#line 214 "../../../texk/detex/detex-src/detex.l"
+#line 214 "detex.l"
{LATEX; IGNORE;}
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 216 "../../../texk/detex/detex-src/detex.l"
+#line 216 "detex.l"
/* environment start */ {LaBEGIN LaBegin; IGNORE;}
YY_BREAK
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
-#line 218 "../../../texk/detex/detex-src/detex.l"
+#line 218 "detex.l"
{ if (BeginEnv("verbatim"))
BEGIN LaEnv;
- else
+ else
BEGIN LaVerbatim;
- IGNORE;
+ IGNORE;
}
YY_BREAK
case 5:
/* rule 5 can match eol */
YY_RULE_SETUP
-#line 225 "../../../texk/detex/detex-src/detex.l"
+#line 225 "detex.l"
/* verbatim mode */ {BEGIN Normal; IGNORE;}
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 226 "../../../texk/detex/detex-src/detex.l"
+#line 226 "detex.l"
ECHO;
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 227 "../../../texk/detex/detex-src/detex.l"
+#line 227 "detex.l"
ECHO;
YY_BREAK
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
-#line 229 "../../../texk/detex/detex-src/detex.l"
+#line 229 "detex.l"
{ KILLARGS(1);
- if (BeginEnv("minipage"))
+ if (BeginEnv("minipage"))
BEGIN LaEnv;
- else
+ else
BEGIN LaMacro; /* Normal; */
- IGNORE;
+ IGNORE;
}
YY_BREAK
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
-#line 237 "../../../texk/detex/detex-src/detex.l"
+#line 237 "detex.l"
{
- if (BeginEnv("table"))
+ if (BeginEnv("table"))
BEGIN LaEnv;
- else
+ else
BEGIN Normal;
- IGNORE;
- }
+ IGNORE;
+ }
YY_BREAK
case 10:
/* rule 10 can match eol */
YY_RULE_SETUP
-#line 245 "../../../texk/detex/detex-src/detex.l"
+#line 245 "detex.l"
{
- if (BeginEnv("figure"))
+ if (BeginEnv("figure"))
BEGIN LaEnv;
- else
+ else
BEGIN Normal;
- IGNORE;
+ IGNORE;
}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 253 "../../../texk/detex/detex-src/detex.l"
+#line 253 "detex.l"
{ if (BeginEnv(yytext))
BEGIN LaEnv;
- else
+ else
BEGIN Normal;
- IGNORE;
+ IGNORE;
}
YY_BREAK
/*<LaBegin>"\n" NEWLINE;*/
case 12:
YY_RULE_SETUP
-#line 260 "../../../texk/detex/detex-src/detex.l"
+#line 260 "detex.l"
{INCRLINENO;}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 262 "../../../texk/detex/detex-src/detex.l"
+#line 262 "detex.l"
/* absorb some environments */ {LaBEGIN LaEnd; IGNORE;}
YY_BREAK
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
-#line 263 "../../../texk/detex/detex-src/detex.l"
+#line 263 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 264 "../../../texk/detex/detex-src/detex.l"
+#line 264 "detex.l"
{INCRLINENO;}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 266 "../../../texk/detex/detex-src/detex.l"
+#line 266 "detex.l"
/* end environment */ { if (EndEnv(yytext))
BEGIN Normal;
- IGNORE;
+ IGNORE;
}
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 270 "../../../texk/detex/detex-src/detex.l"
+#line 270 "detex.l"
{BEGIN LaEnv; IGNORE;}
YY_BREAK
/*<LaEnd>"\n" NEWLINE;*/
case 18:
YY_RULE_SETUP
-#line 272 "../../../texk/detex/detex-src/detex.l"
+#line 272 "detex.l"
{INCRLINENO;}
YY_BREAK
case 19:
/* rule 19 can match eol */
YY_RULE_SETUP
-#line 274 "../../../texk/detex/detex-src/detex.l"
+#line 274 "detex.l"
;
YY_BREAK
case 20:
/* rule 20 can match eol */
YY_RULE_SETUP
-#line 275 "../../../texk/detex/detex-src/detex.l"
+#line 275 "detex.l"
;
YY_BREAK
case 21:
/* rule 21 can match eol */
YY_RULE_SETUP
-#line 276 "../../../texk/detex/detex-src/detex.l"
+#line 276 "detex.l"
;
YY_BREAK
case 22:
/* rule 22 can match eol */
YY_RULE_SETUP
-#line 277 "../../../texk/detex/detex-src/detex.l"
+#line 277 "detex.l"
;
YY_BREAK
case 23:
/* rule 23 can match eol */
YY_RULE_SETUP
-#line 278 "../../../texk/detex/detex-src/detex.l"
+#line 278 "detex.l"
;
YY_BREAK
case 24:
/* rule 24 can match eol */
YY_RULE_SETUP
-#line 279 "../../../texk/detex/detex-src/detex.l"
+#line 279 "detex.l"
;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 280 "../../../texk/detex/detex-src/detex.l"
+#line 280 "detex.l"
; /* hack to fix \begin{minipage}{300pt} */
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 282 "../../../texk/detex/detex-src/detex.l"
+#line 282 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 283 "../../../texk/detex/detex-src/detex.l"
+#line 283 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 284 "../../../texk/detex/detex-src/detex.l"
+#line 284 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 285 "../../../texk/detex/detex-src/detex.l"
+#line 285 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 286 "../../../texk/detex/detex-src/detex.l"
+#line 286 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 287 "../../../texk/detex/detex-src/detex.l"
+#line 287 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 288 "../../../texk/detex/detex-src/detex.l"
+#line 288 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 289 "../../../texk/detex/detex-src/detex.l"
+#line 289 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 290 "../../../texk/detex/detex-src/detex.l"
+#line 290 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 291 "../../../texk/detex/detex-src/detex.l"
+#line 291 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 292 "../../../texk/detex/detex-src/detex.l"
+#line 292 "detex.l"
{ STRIPARGS(2); }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 293 "../../../texk/detex/detex-src/detex.l"
+#line 293 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 294 "../../../texk/detex/detex-src/detex.l"
+#line 294 "detex.l"
{ STRIPARGS(2); }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 295 "../../../texk/detex/detex-src/detex.l"
+#line 295 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 296 "../../../texk/detex/detex-src/detex.l"
+#line 296 "detex.l"
;
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 297 "../../../texk/detex/detex-src/detex.l"
+#line 297 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 42:
/* rule 42 can match eol */
YY_RULE_SETUP
-#line 298 "../../../texk/detex/detex-src/detex.l"
+#line 298 "detex.l"
{ LaBEGIN LaPicture; }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 300 "../../../texk/detex/detex-src/detex.l"
+#line 300 "detex.l"
;
YY_BREAK
case 44:
/* rule 44 can match eol */
YY_RULE_SETUP
-#line 301 "../../../texk/detex/detex-src/detex.l"
+#line 301 "detex.l"
{ if(fShowPictures) { printf("<Picture %s>", yytext); } }
YY_BREAK
case 45:
/* rule 45 can match eol */
YY_RULE_SETUP
-#line 302 "../../../texk/detex/detex-src/detex.l"
+#line 302 "detex.l"
{ BEGIN Normal; INCRLINENO; }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 303 "../../../texk/detex/detex-src/detex.l"
+#line 303 "detex.l"
BEGIN Normal;
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 305 "../../../texk/detex/detex-src/detex.l"
+#line 305 "detex.l"
{ KILLARGS(3); }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 306 "../../../texk/detex/detex-src/detex.l"
+#line 306 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 307 "../../../texk/detex/detex-src/detex.l"
+#line 307 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 308 "../../../texk/detex/detex-src/detex.l"
+#line 308 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 309 "../../../texk/detex/detex-src/detex.l"
+#line 309 "detex.l"
{ KILLARGS(3); }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 310 "../../../texk/detex/detex-src/detex.l"
+#line 310 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 311 "../../../texk/detex/detex-src/detex.l"
+#line 311 "detex.l"
{ STRIPARGS(1); }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 312 "../../../texk/detex/detex-src/detex.l"
+#line 312 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 313 "../../../texk/detex/detex-src/detex.l"
+#line 313 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 314 "../../../texk/detex/detex-src/detex.l"
+#line 314 "detex.l"
{ KILLARGS(3); }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 316 "../../../texk/detex/detex-src/detex.l"
+#line 316 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 317 "../../../texk/detex/detex-src/detex.l"
+#line 317 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 318 "../../../texk/detex/detex-src/detex.l"
+#line 318 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 319 "../../../texk/detex/detex-src/detex.l"
+#line 319 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 320 "../../../texk/detex/detex-src/detex.l"
+#line 320 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 321 "../../../texk/detex/detex-src/detex.l"
+#line 321 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 322 "../../../texk/detex/detex-src/detex.l"
+#line 322 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 324 "../../../texk/detex/detex-src/detex.l"
+#line 324 "detex.l"
/* ignore args */ {KILLARGS(1); IGNORE;}
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 325 "../../../texk/detex/detex-src/detex.l"
+#line 325 "detex.l"
/* of these \cs */ {KILLARGS(1); IGNORE;}
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 326 "../../../texk/detex/detex-src/detex.l"
+#line 326 "detex.l"
{KILLARGS(1); IGNORE;}
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 327 "../../../texk/detex/detex-src/detex.l"
+#line 327 "detex.l"
{KILLARGS(1);} /* kill space before */
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 328 "../../../texk/detex/detex-src/detex.l"
+#line 328 "detex.l"
{LATEX; KILLARGS(1); IGNORE;}
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 329 "../../../texk/detex/detex-src/detex.l"
+#line 329 "detex.l"
{LATEX; KILLARGS(1); IGNORE;}
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 330 "../../../texk/detex/detex-src/detex.l"
+#line 330 "detex.l"
{KILLARGS(1); IGNORE;}
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 331 "../../../texk/detex/detex-src/detex.l"
+#line 331 "detex.l"
{KILLARGS(1); IGNORE;}
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 332 "../../../texk/detex/detex-src/detex.l"
+#line 332 "detex.l"
{KILLARGS(1);}
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 333 "../../../texk/detex/detex-src/detex.l"
+#line 333 "detex.l"
{KILLARGS(1);}
YY_BREAK
/*<Normal>"\\footnote" {KILLARGS(1); SPACE;}*/
case 74:
YY_RULE_SETUP
-#line 335 "../../../texk/detex/detex-src/detex.l"
+#line 335 "detex.l"
{KILLARGS(1); IGNORE;}
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 336 "../../../texk/detex/detex-src/detex.l"
+#line 336 "detex.l"
{CITE(1); IGNORE;}
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 337 "../../../texk/detex/detex-src/detex.l"
+#line 337 "detex.l"
{CITE(1); IGNORE;}
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 338 "../../../texk/detex/detex-src/detex.l"
+#line 338 "detex.l"
{KILLARGS(1); IGNORE;}
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 339 "../../../texk/detex/detex-src/detex.l"
+#line 339 "detex.l"
{CITE(1); IGNORE;}
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 340 "../../../texk/detex/detex-src/detex.l"
+#line 340 "detex.l"
{KILLARGS(2); IGNORE;}
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 341 "../../../texk/detex/detex-src/detex.l"
+#line 341 "detex.l"
{KILLARGS(2); IGNORE;}
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 342 "../../../texk/detex/detex-src/detex.l"
+#line 342 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 343 "../../../texk/detex/detex-src/detex.l"
+#line 343 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 345 "../../../texk/detex/detex-src/detex.l"
+#line 345 "detex.l"
{KILLARGS(1);}
YY_BREAK
case 84:
/* rule 84 can match eol */
YY_RULE_SETUP
-#line 347 "../../../texk/detex/detex-src/detex.l"
+#line 347 "detex.l"
{
putchar('(');
footnoteLevel = currBracesLevel;
@@ -2640,328 +2609,319 @@ YY_RULE_SETUP
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 352 "../../../texk/detex/detex-src/detex.l"
-/* ignore \verb<ch>...<ch> */ {
- /* Sorry to use different formatting, but it seemed better not
- to cram all this code over in the rightmost 20 chars. */
- if (fLatex) {
- char verbchar, c;
- verbchar = input();
- if (verbchar != EOF) {
- while ((c = input()) != verbchar && c != '\n' && c != EOF) {
- putchar(c);
- }
- }
- /* would be nice to include input filenames and line numbers */
- if (verbchar == EOF || c == EOF) {
- /* do this test first in case verbchar is eof */
- ErrorExit("\\verb not complete before eof");
- }
- if (c == '\n') {
- char delim[2];
- delim[0] = verbchar;
- delim[1] = 0;
- Warning("\\verb not terminated before eol, delimiter", delim);
- }
- }
- IGNORE;
- }
+#line 352 "detex.l"
+/* ignore \verb<ch>...<ch> */ {
+ if (fLatex) {
+ char verbchar, c;
+ verbchar = input();
+ if (verbchar < ' ') {
+ /* would be nice to include input filenames and line numbers */
+ ErrorExit("\\verb not complete before eof");
+ }
+ while ((c = input()) != verbchar && c != '\n' && c != EOF && c != 0) {
+ putchar(c);
+ }
+ if (c != verbchar) {
+ ErrorExit("\\verb not complete before eof");
+ }
+ }
+}
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 378 "../../../texk/detex/detex-src/detex.l"
+#line 369 "detex.l"
{ LATEX; KILLARGS(2); }
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 379 "../../../texk/detex/detex-src/detex.l"
+#line 370 "detex.l"
{ LATEX; KILLARGS(2); }
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 380 "../../../texk/detex/detex-src/detex.l"
+#line 371 "detex.l"
{ LATEX; KILLARGS(3); }
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 382 "../../../texk/detex/detex-src/detex.l"
+#line 373 "detex.l"
/* ignore def begin */ {BEGIN Define; IGNORE;}
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 383 "../../../texk/detex/detex-src/detex.l"
+#line 374 "detex.l"
BEGIN Normal;
YY_BREAK
case 91:
/* rule 91 can match eol */
YY_RULE_SETUP
-#line 384 "../../../texk/detex/detex-src/detex.l"
+#line 375 "detex.l"
NEWLINE;
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 385 "../../../texk/detex/detex-src/detex.l"
+#line 376 "detex.l"
;
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 387 "../../../texk/detex/detex-src/detex.l"
+#line 378 "detex.l"
/* formula mode */ {LaBEGIN LaFormula; NOUN;}
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 388 "../../../texk/detex/detex-src/detex.l"
+#line 379 "detex.l"
BEGIN Normal;
YY_BREAK
case 95:
/* rule 95 can match eol */
YY_RULE_SETUP
-#line 389 "../../../texk/detex/detex-src/detex.l"
+#line 380 "detex.l"
NEWLINE;
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 390 "../../../texk/detex/detex-src/detex.l"
+#line 381 "detex.l"
VERBNOUN;
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 391 "../../../texk/detex/detex-src/detex.l"
+#line 382 "detex.l"
;
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 393 "../../../texk/detex/detex-src/detex.l"
+#line 384 "detex.l"
/* display mode */ {LaBEGIN LaDisplay; NOUN;}
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 394 "../../../texk/detex/detex-src/detex.l"
+#line 385 "detex.l"
BEGIN Normal;
YY_BREAK
case 100:
/* rule 100 can match eol */
YY_RULE_SETUP
-#line 395 "../../../texk/detex/detex-src/detex.l"
+#line 386 "detex.l"
NEWLINE;
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 396 "../../../texk/detex/detex-src/detex.l"
+#line 387 "detex.l"
VERBNOUN;
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 397 "../../../texk/detex/detex-src/detex.l"
+#line 388 "detex.l"
;
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 399 "../../../texk/detex/detex-src/detex.l"
+#line 390 "detex.l"
/* display mode */ {BEGIN Display; NOUN;}
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 400 "../../../texk/detex/detex-src/detex.l"
+#line 391 "detex.l"
BEGIN Normal;
YY_BREAK
case 105:
/* rule 105 can match eol */
YY_RULE_SETUP
-#line 401 "../../../texk/detex/detex-src/detex.l"
+#line 392 "detex.l"
NEWLINE;
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 402 "../../../texk/detex/detex-src/detex.l"
+#line 393 "detex.l"
VERBNOUN;
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 403 "../../../texk/detex/detex-src/detex.l"
+#line 394 "detex.l"
;
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 405 "../../../texk/detex/detex-src/detex.l"
+#line 396 "detex.l"
/* math mode */ {BEGIN Math; NOUN;}
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 406 "../../../texk/detex/detex-src/detex.l"
+#line 397 "detex.l"
BEGIN Normal;
YY_BREAK
case 110:
/* rule 110 can match eol */
YY_RULE_SETUP
-#line 407 "../../../texk/detex/detex-src/detex.l"
+#line 398 "detex.l"
;
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 408 "../../../texk/detex/detex-src/detex.l"
+#line 399 "detex.l"
;
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 409 "../../../texk/detex/detex-src/detex.l"
+#line 400 "detex.l"
VERBNOUN;
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 410 "../../../texk/detex/detex-src/detex.l"
+#line 401 "detex.l"
;
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 412 "../../../texk/detex/detex-src/detex.l"
+#line 403 "detex.l"
/* process files */ {LaBEGIN LaInclude; IGNORE;}
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 413 "../../../texk/detex/detex-src/detex.l"
+#line 404 "detex.l"
{ IncludeFile(yytext);
- BEGIN Normal;
+ BEGIN Normal;
}
YY_BREAK
case 116:
/* rule 116 can match eol */
YY_RULE_SETUP
-#line 416 "../../../texk/detex/detex-src/detex.l"
+#line 407 "detex.l"
NEWLINE;
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 417 "../../../texk/detex/detex-src/detex.l"
+#line 408 "detex.l"
;
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 419 "../../../texk/detex/detex-src/detex.l"
+#line 410 "detex.l"
{BEGIN IncludeOnly; IGNORE;}
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 420 "../../../texk/detex/detex-src/detex.l"
+#line 411 "detex.l"
AddInclude(yytext);
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 421 "../../../texk/detex/detex-src/detex.l"
+#line 412 "detex.l"
{ if (csbIncList == 0)
rgsbIncList[csbIncList++] = '\0';
- BEGIN Normal;
+ BEGIN Normal;
}
YY_BREAK
case 121:
/* rule 121 can match eol */
YY_RULE_SETUP
-#line 425 "../../../texk/detex/detex-src/detex.l"
+#line 416 "detex.l"
NEWLINE;
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 426 "../../../texk/detex/detex-src/detex.l"
+#line 417 "detex.l"
;
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 428 "../../../texk/detex/detex-src/detex.l"
+#line 419 "detex.l"
/* process files */ {LaBEGIN LaSubfile; IGNORE;}
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 429 "../../../texk/detex/detex-src/detex.l"
+#line 420 "detex.l"
{ IncludeFile(yytext);
- BEGIN Normal;
+ BEGIN Normal;
}
YY_BREAK
case 125:
/* rule 125 can match eol */
YY_RULE_SETUP
-#line 432 "../../../texk/detex/detex-src/detex.l"
+#line 423 "detex.l"
NEWLINE;
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 433 "../../../texk/detex/detex-src/detex.l"
+#line 424 "detex.l"
;
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 435 "../../../texk/detex/detex-src/detex.l"
+#line 426 "detex.l"
{BEGIN Input; IGNORE;}
YY_BREAK
case 128:
YY_RULE_SETUP
-#line 436 "../../../texk/detex/detex-src/detex.l"
+#line 427 "detex.l"
{ InputFile(yytext);
- BEGIN Normal;
+ BEGIN Normal;
}
YY_BREAK
case 129:
/* rule 129 can match eol */
YY_RULE_SETUP
-#line 439 "../../../texk/detex/detex-src/detex.l"
+#line 430 "detex.l"
NEWLINE;
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 440 "../../../texk/detex/detex-src/detex.l"
+#line 431 "detex.l"
;
YY_BREAK
/* escaping commands */
case 131:
YY_RULE_SETUP
-#line 443 "../../../texk/detex/detex-src/detex.l"
+#line 434 "detex.l"
putchar('/');
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 444 "../../../texk/detex/detex-src/detex.l"
+#line 435 "detex.l"
putchar('%');
YY_BREAK
case 133:
/* rule 133 can match eol */
YY_RULE_SETUP
-#line 446 "../../../texk/detex/detex-src/detex.l"
+#line 437 "detex.l"
/* handle ligatures */ {(void)printf("%.2s", yytext+1);}
YY_BREAK
case 134:
/* rule 134 can match eol */
YY_RULE_SETUP
-#line 447 "../../../texk/detex/detex-src/detex.l"
+#line 438 "detex.l"
{(void)printf("%.1s", yytext+1);}
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 448 "../../../texk/detex/detex-src/detex.l"
+#line 439 "detex.l"
{NEWLINE;} /*BEGIN LaBreak;*/
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 450 "../../../texk/detex/detex-src/detex.l"
+#line 441 "detex.l"
/* ignore other \cs */ {BEGIN Control; IGNORE;}
YY_BREAK
case 137:
YY_RULE_SETUP
-#line 451 "../../../texk/detex/detex-src/detex.l"
+#line 442 "detex.l"
SPACE;
YY_BREAK
case 138:
/* rule 138 can match eol */
YY_RULE_SETUP
-#line 452 "../../../texk/detex/detex-src/detex.l"
+#line 443 "detex.l"
NEWLINE;
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 453 "../../../texk/detex/detex-src/detex.l"
+#line 444 "detex.l"
IGNORE;
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 454 "../../../texk/detex/detex-src/detex.l"
+#line 445 "detex.l"
{ if (yytext==NULL || strlen(yytext)==0
|| atoi(yytext)>=0)
NEWLINE;
@@ -2970,85 +2930,85 @@ YY_RULE_SETUP
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 460 "../../../texk/detex/detex-src/detex.l"
+#line 451 "detex.l"
IGNORE;
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 461 "../../../texk/detex/detex-src/detex.l"
+#line 452 "detex.l"
IGNORE;
YY_BREAK
case 143:
/* rule 143 can match eol */
YY_RULE_SETUP
-#line 462 "../../../texk/detex/detex-src/detex.l"
+#line 453 "detex.l"
{BEGIN Normal; /*NEWLINE;*/}
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 463 "../../../texk/detex/detex-src/detex.l"
+#line 454 "detex.l"
{++currBracesLevel;BEGIN Normal; IGNORE;}
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 464 "../../../texk/detex/detex-src/detex.l"
+#line 455 "detex.l"
{BEGIN Normal; IGNORE;}
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 465 "../../../texk/detex/detex-src/detex.l"
+#line 456 "detex.l"
{yyless(0);BEGIN Normal;}
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 467 "../../../texk/detex/detex-src/detex.l"
+#line 458 "detex.l"
/* special characters */ IGNORE;
YY_BREAK
case 148:
YY_RULE_SETUP
-#line 468 "../../../texk/detex/detex-src/detex.l"
+#line 459 "detex.l"
IGNORE;
YY_BREAK
case 149:
YY_RULE_SETUP
-#line 469 "../../../texk/detex/detex-src/detex.l"
+#line 460 "detex.l"
SPACE;
YY_BREAK
case 150:
YY_RULE_SETUP
-#line 470 "../../../texk/detex/detex-src/detex.l"
+#line 461 "detex.l"
putchar('-');
YY_BREAK
case 151:
YY_RULE_SETUP
-#line 471 "../../../texk/detex/detex-src/detex.l"
+#line 462 "detex.l"
putchar('"');
YY_BREAK
case 152:
YY_RULE_SETUP
-#line 472 "../../../texk/detex/detex-src/detex.l"
+#line 463 "detex.l"
putchar('\'');
YY_BREAK
case 153:
YY_RULE_SETUP
-#line 473 "../../../texk/detex/detex-src/detex.l"
+#line 464 "detex.l"
putchar('"');
YY_BREAK
case 154:
YY_RULE_SETUP
-#line 474 "../../../texk/detex/detex-src/detex.l"
+#line 465 "detex.l"
putchar('"');
YY_BREAK
/* braces */
case 155:
YY_RULE_SETUP
-#line 477 "../../../texk/detex/detex-src/detex.l"
+#line 468 "detex.l"
{ ++currBracesLevel;
}
YY_BREAK
case 156:
YY_RULE_SETUP
-#line 479 "../../../texk/detex/detex-src/detex.l"
+#line 470 "detex.l"
{
--currBracesLevel;
if (currBracesLevel == footnoteLevel) {
@@ -3059,117 +3019,117 @@ YY_RULE_SETUP
YY_BREAK
case 157:
YY_RULE_SETUP
-#line 486 "../../../texk/detex/detex-src/detex.l"
+#line 477 "detex.l"
{ if (fWord)
(void)printf("%s\n", yytext);
- else
+ else
ECHO;
}
YY_BREAK
case 158:
YY_RULE_SETUP
-#line 491 "../../../texk/detex/detex-src/detex.l"
+#line 482 "detex.l"
if (!fWord) ECHO;
YY_BREAK
case 159:
YY_RULE_SETUP
-#line 492 "../../../texk/detex/detex-src/detex.l"
+#line 483 "detex.l"
{ INCRLINENO; if (!fWord) ECHO; }
YY_BREAK
case 160:
/* rule 160 can match eol */
YY_RULE_SETUP
-#line 493 "../../../texk/detex/detex-src/detex.l"
+#line 484 "detex.l"
{ if (!fWord) NEWLINE; }
YY_BREAK
case 161:
YY_RULE_SETUP
-#line 494 "../../../texk/detex/detex-src/detex.l"
+#line 485 "detex.l"
if (!fWord) putchar('\t');
YY_BREAK
case 162:
YY_RULE_SETUP
-#line 496 "../../../texk/detex/detex-src/detex.l"
+#line 487 "detex.l"
{ BEGIN LaOptArg; }
YY_BREAK
case 163:
YY_RULE_SETUP
-#line 497 "../../../texk/detex/detex-src/detex.l"
+#line 488 "detex.l"
{ cOpenBrace++; }
YY_BREAK
case 164:
/* rule 164 can match eol */
YY_RULE_SETUP
-#line 498 "../../../texk/detex/detex-src/detex.l"
+#line 489 "detex.l"
{ cOpenBrace--; INCRLINENO;
- if (cOpenBrace == 0)
- {
+ if (cOpenBrace == 0)
+ {
if (--cArgs==0)
BEGIN Normal;
- }
+ }
}
YY_BREAK
case 165:
YY_RULE_SETUP
-#line 505 "../../../texk/detex/detex-src/detex.l"
+#line 496 "detex.l"
;
YY_BREAK
case 166:
YY_RULE_SETUP
-#line 506 "../../../texk/detex/detex-src/detex.l"
-BEGIN LaMacro;
+#line 497 "detex.l"
+BEGIN LaMacro;
YY_BREAK
case 167:
/* rule 167 can match eol */
YY_RULE_SETUP
-#line 507 "../../../texk/detex/detex-src/detex.l"
+#line 498 "detex.l"
;
YY_BREAK
case 168:
YY_RULE_SETUP
-#line 509 "../../../texk/detex/detex-src/detex.l"
+#line 500 "detex.l"
{ BEGIN LaOptArg2; }
YY_BREAK
case 169:
YY_RULE_SETUP
-#line 510 "../../../texk/detex/detex-src/detex.l"
+#line 501 "detex.l"
{ if (cOpenBrace == 0)
- {
+ {
if (--cArgs==0)
{
- BEGIN Normal;
- cOpenBrace--;
+ BEGIN Normal;
+ cOpenBrace--;
+ }
}
- }
- cOpenBrace++;
+ cOpenBrace++;
}
YY_BREAK
case 170:
YY_RULE_SETUP
-#line 520 "../../../texk/detex/detex-src/detex.l"
+#line 511 "detex.l"
{ cOpenBrace--; }
YY_BREAK
case 171:
YY_RULE_SETUP
-#line 521 "../../../texk/detex/detex-src/detex.l"
+#line 512 "detex.l"
;
YY_BREAK
case 172:
YY_RULE_SETUP
-#line 522 "../../../texk/detex/detex-src/detex.l"
-BEGIN LaMacro2;
+#line 513 "detex.l"
+BEGIN LaMacro2;
YY_BREAK
case 173:
YY_RULE_SETUP
-#line 523 "../../../texk/detex/detex-src/detex.l"
+#line 514 "detex.l"
;
YY_BREAK
case 174:
YY_RULE_SETUP
-#line 524 "../../../texk/detex/detex-src/detex.l"
+#line 515 "detex.l"
ECHO;
YY_BREAK
-#line 3173 "../../../texk/detex/detex-src/detex.c"
+#line 3133 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(Define):
case YY_STATE_EOF(Display):
@@ -3269,7 +3229,7 @@ case YY_STATE_EOF(LaPicture):
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap( ) )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -3336,7 +3296,7 @@ static int yy_get_next_buffer (void)
{
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = (yytext_ptr);
- yy_size_t number_to_move, i;
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -3365,7 +3325,7 @@ static int yy_get_next_buffer (void)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -3378,7 +3338,7 @@ static int yy_get_next_buffer (void)
else
{
- yy_size_t num_to_read =
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -3392,7 +3352,7 @@ static int yy_get_next_buffer (void)
if ( b->yy_is_our_buffer )
{
- yy_size_t new_size = b->yy_buf_size * 2;
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -3401,11 +3361,12 @@ static int yy_get_next_buffer (void)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
+ b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
@@ -3433,7 +3394,7 @@ static int yy_get_next_buffer (void)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart(yyin );
+ yyrestart( yyin );
}
else
@@ -3447,12 +3408,15 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
(yy_n_chars) += number_to_move;
@@ -3485,9 +3449,9 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 1362 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
return yy_current_state;
@@ -3513,9 +3477,9 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 1362 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 1361);
return yy_is_jam ? 0 : yy_current_state;
@@ -3549,7 +3513,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
- yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -3566,14 +3530,14 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- yyrestart(yyin );
+ yyrestart( yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( ) )
- return EOF;
+ if ( yywrap( ) )
+ return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
@@ -3610,11 +3574,11 @@ static int yy_get_next_buffer (void)
if ( ! YY_CURRENT_BUFFER ){
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- yy_init_buffer(YY_CURRENT_BUFFER,input_file );
- yy_load_buffer_state( );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
}
/** Switch to a different input buffer.
@@ -3642,7 +3606,7 @@ static int yy_get_next_buffer (void)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
@@ -3670,22 +3634,22 @@ static void yy_load_buffer_state (void)
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
- b->yy_buf_size = (yy_size_t)size;
+ b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer(b,file );
+ yy_init_buffer( b, file );
return b;
}
@@ -3704,9 +3668,9 @@ static void yy_load_buffer_state (void)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yyfree((void *) b->yy_ch_buf );
+ yyfree( (void *) b->yy_ch_buf );
- yyfree((void *) b );
+ yyfree( (void *) b );
}
/* Initializes or reinitializes a buffer.
@@ -3718,7 +3682,7 @@ static void yy_load_buffer_state (void)
{
int oerrno = errno;
- yy_flush_buffer(b );
+ yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
@@ -3761,7 +3725,7 @@ static void yy_load_buffer_state (void)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -3792,7 +3756,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
YY_CURRENT_BUFFER_LVALUE = new_buffer;
/* copied from yy_switch_to_buffer. */
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
@@ -3811,7 +3775,7 @@ void yypop_buffer_state (void)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
@@ -3829,15 +3793,15 @@ static void yyensure_buffer_stack (void)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
- num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
@@ -3866,7 +3830,7 @@ static void yyensure_buffer_stack (void)
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
@@ -3876,23 +3840,23 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
- return 0;
+ return NULL;
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
+ b->yy_input_file = NULL;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- yy_switch_to_buffer(b );
+ yy_switch_to_buffer( b );
return b;
}
@@ -3905,10 +3869,10 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
* @note If you want to scan bytes that may contain NUL values, then use
* yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
+YY_BUFFER_STATE yy_scan_string (const char * yystr )
{
- return yy_scan_bytes(yystr,strlen(yystr) );
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
}
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
@@ -3918,16 +3882,16 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- yy_size_t i;
+ int i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
- buf = (char *) yyalloc(n );
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
@@ -3936,7 +3900,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = yy_scan_buffer(buf,n );
+ b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
@@ -3952,9 +3916,9 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len
#define YY_EXIT_FAILURE 2
#endif
-static void yy_fatal_error (yyconst char* msg )
+static void yynoreturn yy_fatal_error (const char* msg )
{
- (void) fprintf( stderr, "%s\n", msg );
+ fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -3982,7 +3946,7 @@ static void yy_fatal_error (yyconst char* msg )
*/
int yyget_lineno (void)
{
-
+
return yylineno;
}
@@ -4005,7 +3969,7 @@ FILE *yyget_out (void)
/** Get the length of the current token.
*
*/
-yy_size_t yyget_leng (void)
+int yyget_leng (void)
{
return yyleng;
}
@@ -4061,10 +4025,10 @@ static int yy_init_globals (void)
* This function is called from yylex_destroy(), so don't allocate here.
*/
- (yy_buffer_stack) = 0;
+ (yy_buffer_stack) = NULL;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = (char *) 0;
+ (yy_c_buf_p) = NULL;
(yy_init) = 0;
(yy_start) = 0;
@@ -4073,8 +4037,8 @@ static int yy_init_globals (void)
yyin = stdin;
yyout = stdout;
#else
- yyin = (FILE *) 0;
- yyout = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
@@ -4089,7 +4053,7 @@ int yylex_destroy (void)
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- yy_delete_buffer(YY_CURRENT_BUFFER );
+ yy_delete_buffer( YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
yypop_buffer_state();
}
@@ -4110,7 +4074,7 @@ int yylex_destroy (void)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
int i;
@@ -4120,7 +4084,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
+static int yy_flex_strlen (const char * s )
{
int n;
for ( n = 0; s[n]; ++n )
@@ -4132,7 +4096,7 @@ static int yy_flex_strlen (yyconst char * s )
void *yyalloc (yy_size_t size )
{
- return (void *) malloc( size );
+ return malloc(size);
}
void *yyrealloc (void * ptr, yy_size_t size )
@@ -4145,7 +4109,7 @@ void *yyrealloc (void * ptr, yy_size_t size )
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
void yyfree (void * ptr )
@@ -4155,8 +4119,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 524 "../../../texk/detex/detex-src/detex.l"
-
+#line 515 "detex.l"
/******
@@ -4183,7 +4146,7 @@ main(int cArgs, char *rgsbArgs[])
char *pch, sbBadOpt[2];
const char *sbEnvList = DEFAULTENV;
int fSawFile = 0, iArgs = 1;
-
+
/* get base name and decide what we are doing, detex or delatex */
#ifdef OS2
char drive[_MAX_DRIVE], dir[_MAX_DIR];
@@ -4199,12 +4162,12 @@ main(int cArgs, char *rgsbArgs[])
sbProgName = kpse_program_name;
#else
if ((sbProgName = strrchr(rgsbArgs[0], '/')) != NULL)
- sbProgName++;
+ sbProgName++;
else
- sbProgName = rgsbArgs[0];
+ sbProgName = rgsbArgs[0];
#endif
if (strcmp("delatex",sbProgName) == 0)
- fLatex = 1;
+ fLatex = 1;
#ifndef KPATHSEA
/* set rgsbInputPaths for use with TexOpen() */
@@ -4214,29 +4177,29 @@ main(int cArgs, char *rgsbArgs[])
/* process command line options */
while (iArgs < cArgs && *(pch = rgsbArgs[iArgs]) == CHOPT) {
while (*++pch)
- switch (*pch) {
- case CHCITEOPT:
+ switch (*pch) {
+ case CHCITEOPT:
fCite = 1;
break;
- case CHENVOPT:
+ case CHENVOPT:
if (++iArgs >= cArgs) {
ErrorExit("-e option requires an argument");
}
sbEnvList = rgsbArgs[iArgs];
break;
- case CHLATEXOPT:
+ case CHLATEXOPT:
fLatex = 1;
break;
- case CHNOFOLLOWOPT:
+ case CHNOFOLLOWOPT:
fFollow = 0;
break;
- case CHSPACEOPT:
+ case CHSPACEOPT:
fSpace = 1;
break;
- case CHTEXOPT:
+ case CHTEXOPT:
fForcetex = 1;
break;
- case CHWORDOPT:
+ case CHWORDOPT:
fWord = 1;
break;
case CHREPLACE:
@@ -4248,12 +4211,12 @@ main(int cArgs, char *rgsbArgs[])
case CHSRCLOC:
fSrcLoc = 1;
break;
- default:
+ default:
sbBadOpt[0] = *pch;
sbBadOpt[1] = '\0';
Warning("unknown option ignored -", sbBadOpt);
UsageExit();
- }
+ }
iArgs++;
}
SetEnvIgnore(sbEnvList);
@@ -4264,30 +4227,30 @@ main(int cArgs, char *rgsbArgs[])
/* process input files */
for (; iArgs < cArgs; iArgs++) {
- fSawFile++;
- if ((yyin = TexOpen(rgsbArgs[iArgs])) == NULL) {
+ fSawFile++;
+ if ((yyin = TexOpen(rgsbArgs[iArgs])) == NULL) {
Warning("can't open file", rgsbArgs[iArgs]);
continue;;
- }
+ }
fFileNames[csb] = rgsbArgs[iArgs];
fFileLines[csb] = 1;
- BEGIN Normal;
- (void)yylex();
+ BEGIN Normal;
+ (void)yylex();
}
/* if there were no input files, assume stdin */
if (!fSawFile) {
- yyin = stdin;
+ yyin = stdin;
#ifdef OS2
- if (isatty(fileno(stdin)))
+ if (isatty(fileno(stdin)))
OS2UsageExit();
#endif
- BEGIN Normal;
- (void)yylex();
+ BEGIN Normal;
+ (void)yylex();
}
#ifndef FLEX_SCANNER
if (YYSTATE != Normal)
- ErrorExit("input contains an unterminated mode or environment");
+ ErrorExit("input contains an unterminated mode or environment");
#endif
return(0);
}
@@ -4307,16 +4270,16 @@ yywrap(void)
{
(void)fclose(yyin);
#ifdef FLEX_SCANNER
- /* Pop context state */
+ /* Pop context state */
if (csb > 0) {
free(fFileNames[csb]);
- yy_delete_buffer(YY_CURRENT_BUFFER );
- yy_switch_to_buffer(rgsb[--csb] );
+ yy_delete_buffer( YY_CURRENT_BUFFER );
+ yy_switch_to_buffer( rgsb[--csb] );
}
#endif /* FLEX_SCANNER */
if (cfp > 0) {
- yyin = rgfp[--cfp];
- return(0);
+ yyin = rgfp[--cfp];
+ return(0);
}
return(1);
}
@@ -4368,7 +4331,7 @@ LineBreak()
}
/******
-** Echo -- If we are at column 0 and have specified '-1'; output
+** Echo -- If we are at column 0 and have specified '-1'; output
** the source location information.
******/
@@ -4400,7 +4363,7 @@ IncrLineNo()
** cannot just ignore text. We must at least increase the linenumber counter.
******/
-void
+void
Ignore()
{
IncrLineNo();
@@ -4419,10 +4382,10 @@ SetEnvIgnore(const char *sbEnvList)
sb = SafeMalloc(strlen(sbEnvList) + 1, "malloc for SetEnvIgnore failed");
(void) strcpy(sb, sbEnvList);
-
+
csbEnvIgnore = SeparateList(sb, rgsbEnvIgnore, CHENVSEP, MAXENVS);
if (csbEnvIgnore == my_ERROR)
- ErrorExit("The environment list contains too many environments");
+ ErrorExit("The environment list contains too many environments");
}
/******
@@ -4437,10 +4400,10 @@ BeginEnv(const char *sbEnv)
if (!fLatex) return(0);
for (i = 0; i < csbEnvIgnore; ++i)
- if (strcmp(sbEnv, rgsbEnvIgnore[i]) == 0) {
+ if (strcmp(sbEnv, rgsbEnvIgnore[i]) == 0) {
(void)strcpy(sbCurrentIgnoredEnv, sbEnv);
return(1);
- }
+ }
return(0);
}
@@ -4453,7 +4416,7 @@ EndEnv(const char *sbEnv)
{
if (!fLatex) return(0);
if (strcmp(sbEnv, sbCurrentIgnoredEnv) == 0)
- return(1);
+ return(1);
return(0);
}
@@ -4469,18 +4432,18 @@ InputFile(char *sbFile)
FILE *TexOpen();
if (!fFollow)
- return;
+ return;
rgfp[cfp++] = yyin;
if ((yyin = TexOpen(sbFile)) == NULL) {
- Warning("can't open \\input file", sbFile);
- yyin = rgfp[--cfp];
- return;
- }
+ Warning("can't open \\input file", sbFile);
+ yyin = rgfp[--cfp];
+ return;
+ }
#ifdef FLEX_SCANNER
rgsb[csb++] = YY_CURRENT_BUFFER;
fFileLines[csb] = 1;
fFileNames[csb] = strdup(sbFile);
- yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE ) );
+ yy_switch_to_buffer(yy_create_buffer( yyin, YY_BUF_SIZE ) );
#endif /* FLEX_SCANNER */
}
@@ -4495,20 +4458,20 @@ IncludeFile(char *sbFile)
FILE *TexOpen();
if (!fFollow)
- return;
+ return;
if (!InList(sbFile))
- return;
+ return;
rgfp[cfp++] = yyin;
if ((yyin = TexOpen(sbFile)) == NULL) {
- Warning("can't open \\include file", sbFile);
- yyin = rgfp[--cfp];
- return;
+ Warning("can't open \\include file", sbFile);
+ yyin = rgfp[--cfp];
+ return;
}
#ifdef FLEX_SCANNER
rgsb[csb++] = YY_CURRENT_BUFFER;
fFileLines[csb] = 1;
fFileNames[csb] = strdup(sbFile);
- yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE ) );
+ yy_switch_to_buffer(yy_create_buffer( yyin, YY_BUF_SIZE ) );
#endif /* FLEX_SCANNER */
}
@@ -4521,9 +4484,9 @@ void
AddInclude(char *sbFile)
{
if (!fFollow)
- return;
+ return;
if (csbIncList >= MAXINCLIST)
- Warning("\\includeonly list is too long, ignoring", sbFile);
+ Warning("\\includeonly list is too long, ignoring", sbFile);
rgsbIncList[csbIncList] = SafeMalloc(strlen(sbFile) + 1, "malloc for AddInclude failed");
(void)strcpy(rgsbIncList[csbIncList++], sbFile);
}
@@ -4540,14 +4503,14 @@ InList(char *sbFile)
int i;
if (csbIncList == 0) /* no list */
- return(1);
+ return(1);
(void)strcpy(sbBase, sbFile);
if ((pch = strrchr(sbBase, '.')) != NULL)
- *pch = '\0';
+ *pch = '\0';
i = 0;
while ((i < csbIncList) && rgsbIncList[i])
- if (strcmp(rgsbIncList[i++], sbBase) == 0)
- return(1);
+ if (strcmp(rgsbIncList[i++], sbBase) == 0)
+ return(1);
return(0);
}
@@ -4572,27 +4535,27 @@ SetInputPaths(void)
#ifdef OS2
if ((sb = getenv("TEXINPUT")) == NULL)
#endif
- if ((sb = getenv("TEXINPUTS")) == NULL)
+ if ((sb = getenv("TEXINPUTS")) == NULL)
sb = DEFAULTINPUTS;
cchPaths = strlen(sb);
if (sb[0] == CHPATHSEP)
- cchPaths += cchDefaults;
+ cchPaths += cchDefaults;
if (sb[strlen(sb) - 1] == CHPATHSEP)
- cchPaths += cchDefaults;
+ cchPaths += cchDefaults;
sbPaths = SafeMalloc(cchPaths + 1, "malloc for SetInputPaths failed");
sbPaths[0] = '\0';
if (sb[0] == CHPATHSEP)
- (void)strcat(sbPaths, DEFAULTINPUTS);
+ (void)strcat(sbPaths, DEFAULTINPUTS);
(void)strcat(sbPaths, sb);
if (sb[strlen(sb) - 1] == CHPATHSEP)
- (void)strcat(sbPaths, DEFAULTINPUTS);
+ (void)strcat(sbPaths, DEFAULTINPUTS);
csbInputPaths = SeparateList(sbPaths, rgsbInputPaths, CHPATHSEP, MAXINPUTPATHS);
if (csbInputPaths == my_ERROR)
#ifdef OS2
- ErrorExit("TEXINPUT(S) environment variable has too many paths");
+ ErrorExit("TEXINPUT(S) environment variable has too many paths");
#else
- ErrorExit("TEXINPUTS environment variable has too many paths");
+ ErrorExit("TEXINPUTS environment variable has too many paths");
#endif
}
#endif
@@ -4610,8 +4573,8 @@ SeparateList(char *sbList, char *rgsbList[], char chSep, int csbMax)
int csbList = 0;
while (sbList && *sbList && csbList < csbMax) {
- rgsbList[csbList++] = sbList;
- if ((sbList = strchr(sbList, chSep))) {
+ rgsbList[csbList++] = sbList;
+ if ((sbList = strchr(sbList, chSep))) {
*sbList++ = '\0';
}
}
@@ -4642,52 +4605,52 @@ TexOpen(char *sbFile)
for (iPath = 0; iPath < csbInputPaths; iPath++) {
#ifdef OS2
- if (*sbFile == '/' || *sbFile == '\\' || strchr(sbFile, ':')) { /* absolute path */
+ if (*sbFile == '/' || *sbFile == '\\' || strchr(sbFile, ':')) { /* absolute path */
#else
- if (*sbFile == '/') { /* absolute path */
+ if (*sbFile == '/') { /* absolute path */
#endif
(void)snprintf(sbFullPath, PATH_MAX-1, "%s", sbFile);
iPath = csbInputPaths; /* only check once */
- } else {
+ } else {
(void)snprintf(sbFullPath, PATH_MAX-1, "%s/%s", rgsbInputPaths[iPath], sbFile);
}
#ifdef OS2
- pch = sbFullPath;
- while (pch = strchr(pch, '\\')) {
+ pch = sbFullPath;
+ while (pch = strchr(pch, '\\')) {
*pch = '/';
}
#endif
- /* If sbFile ends in .tex then it must be there */
- if ((pch = strrchr(sbFullPath, '.')) != NULL
+ /* If sbFile ends in .tex then it must be there */
+ if ((pch = strrchr(sbFullPath, '.')) != NULL
&& (strcmp(pch, ".tex") == 0)) {
if ((fp = fopen(sbFullPath, "r")) != NULL)
return(fp);
else
continue;
- }
-
- /* if .<ext> then try to open it. the '.' represents */
- /* the beginning of an extension if it is not the first */
- /* character and it does not follow a '.' or a '/' */
- if (pch != NULL && pch > &(sbFullPath[0])
- && *(pch - 1) != '.' && *(pch - 1) != '/'
- && (fp = fopen(sbFullPath, "r")) != NULL) {
+ }
+
+ /* if .<ext> then try to open it. the '.' represents */
+ /* the beginning of an extension if it is not the first */
+ /* character and it does not follow a '.' or a '/' */
+ if (pch != NULL && pch > &(sbFullPath[0])
+ && *(pch - 1) != '.' && *(pch - 1) != '/'
+ && (fp = fopen(sbFullPath, "r")) != NULL) {
return(fp);
}
- /* just base name, add .tex to the name */
- sbNew = SafeMalloc(strlen(sbFullPath) + 5, "malloc for TexOpen failed");
- (void)strcpy(sbNew, sbFullPath);
- (void)strcat(sbNew, ".tex");
- if ((fp = fopen(sbNew, "r")) != NULL) {
+ /* just base name, add .tex to the name */
+ sbNew = SafeMalloc(strlen(sbFullPath) + 5, "malloc for TexOpen failed");
+ (void)strcpy(sbNew, sbFullPath);
+ (void)strcat(sbNew, ".tex");
+ if ((fp = fopen(sbNew, "r")) != NULL) {
free(sbNew);
return(fp);
}
free(sbNew);
- /* try sbFile regardless */
- if ((fp = fopen(sbFullPath, "r")) != NULL)
+ /* try sbFile regardless */
+ if ((fp = fopen(sbFullPath, "r")) != NULL)
return(fp);
}
return NULL;
@@ -4695,7 +4658,7 @@ TexOpen(char *sbFile)
sbNew = kpse_find_file (sbFile, kpse_tex_format, false);
if (sbNew == NULL)
- return NULL;
+ return NULL;
return fopen (sbNew, "r");
#endif
@@ -4711,7 +4674,7 @@ SafeMalloc(int cch, const char *sbMessage)
char *sb;
if ((sb = (char *)malloc((unsigned)cch)) == NULL)
- ErrorExit(sbMessage);
+ ErrorExit(sbMessage);
return(sb);
}
@@ -4760,7 +4723,6 @@ UsageExit(void)
-v show program version and exit\n\
\n\
opendetex home page: https://github.com/pkubowicz/opendetex");
- (void)printf("opendetex version %s\n", VERSION);
exit(0);
}
@@ -4771,7 +4733,8 @@ opendetex home page: https://github.com/pkubowicz/opendetex");
void
VersionExit(void)
{
- (void)printf("\nopendetex version %s\n", VERSION);
+ (void)printf("\nOpenDetex version %s\nhttps://github.com/pkubowicz/opendetex\n",
+ VERSION);
exit(0);
}
diff --git a/Build/source/texk/detex/detex-src/detex.h b/Build/source/texk/detex/detex-src/detex.h
index 2fca90b1f9d..335b8cc13d7 100644
--- a/Build/source/texk/detex/detex-src/detex.h
+++ b/Build/source/texk/detex/detex-src/detex.h
@@ -1,11 +1,11 @@
/*
* 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
@@ -13,19 +13,19 @@
* 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.
diff --git a/Build/source/texk/detex/detex-src/detex.l b/Build/source/texk/detex/detex-src/detex.l
index 2f55fdaeaba..591dc0a5917 100644
--- a/Build/source/texk/detex/detex-src/detex.l
+++ b/Build/source/texk/detex/detex-src/detex.l
@@ -5,11 +5,11 @@
/*
* 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
@@ -17,19 +17,19 @@
* 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.
@@ -205,7 +205,7 @@ VERBSYMBOL =|\\leq|\\geq|\\in|>|<|\\subseteq|\subseteq|\\subset|\\supset|\\sim|\
%Start Define Display IncludeOnly Input Math Normal Control
%Start LaBegin LaDisplay LaEnd LaEnv LaFormula LaInclude LaSubfile
-%Start LaMacro LaOptArg LaMacro2 LaOptArg2 LaVerbatim
+%Start LaMacro LaOptArg LaMacro2 LaOptArg2 LaVerbatim
%start LaBreak LaPicture
%%
@@ -217,9 +217,9 @@ VERBSYMBOL =|\\leq|\\geq|\\in|>|<|\\subseteq|\subseteq|\\subset|\\supset|\\sim|\
<LaBegin>{S}"{"{S}"verbatim"{S}"}" { if (BeginEnv("verbatim"))
BEGIN LaEnv;
- else
+ else
BEGIN LaVerbatim;
- IGNORE;
+ IGNORE;
}
<LaVerbatim>"\\end"{S}"{"{S}"verbatim"{S}"}" /* verbatim mode */ {BEGIN Normal; IGNORE;}
@@ -227,34 +227,34 @@ VERBSYMBOL =|\\leq|\\geq|\\in|>|<|\\subseteq|\subseteq|\\subset|\\supset|\\sim|\
<LaVerbatim>. ECHO;
<LaBegin>{S}"{"{S}"minipage"{S}"}" { KILLARGS(1);
- if (BeginEnv("minipage"))
+ if (BeginEnv("minipage"))
BEGIN LaEnv;
- else
+ else
BEGIN LaMacro; /* Normal; */
- IGNORE;
+ IGNORE;
}
<LaBegin>{S}"{"{S}"table"{S}"}"{S}"["{P}"]" {
- if (BeginEnv("table"))
+ if (BeginEnv("table"))
BEGIN LaEnv;
- else
+ else
BEGIN Normal;
- IGNORE;
- }
+ IGNORE;
+ }
<LaBegin>{S}"{"{S}"figure"{S}"}"{S}"["{P}"]" {
- if (BeginEnv("figure"))
+ if (BeginEnv("figure"))
BEGIN LaEnv;
- else
+ else
BEGIN Normal;
- IGNORE;
+ IGNORE;
}
-
+
<LaBegin>{W} { if (BeginEnv(yytext))
BEGIN LaEnv;
- else
+ else
BEGIN Normal;
- IGNORE;
+ IGNORE;
}
/*<LaBegin>"\n" NEWLINE;*/
<LaBegin>. {INCRLINENO;}
@@ -265,7 +265,7 @@ VERBSYMBOL =|\\leq|\\geq|\\in|>|<|\\subseteq|\subseteq|\\subset|\\supset|\\sim|\
<LaEnd>{W} /* end environment */ { if (EndEnv(yytext))
BEGIN Normal;
- IGNORE;
+ IGNORE;
}
<LaEnd>"}" {BEGIN LaEnv; IGNORE;}
/*<LaEnd>"\n" NEWLINE;*/
@@ -349,31 +349,22 @@ VERBSYMBOL =|\\leq|\\geq|\\in|>|<|\\subseteq|\subseteq|\\subset|\\supset|\\sim|\
footnoteLevel = currBracesLevel;
++currBracesLevel;
}
-<Normal>"\\verb" /* ignore \verb<ch>...<ch> */ {
- /* Sorry to use different formatting, but it seemed better not
- to cram all this code over in the rightmost 20 chars. */
- if (fLatex) {
- char verbchar, c;
- verbchar = input();
- if (verbchar != EOF) {
- while ((c = input()) != verbchar && c != '\n' && c != EOF) {
- putchar(c);
- }
- }
- /* would be nice to include input filenames and line numbers */
- if (verbchar == EOF || c == EOF) {
- /* do this test first in case verbchar is eof */
- ErrorExit("\\verb not complete before eof");
- }
- if (c == '\n') {
- char delim[2];
- delim[0] = verbchar;
- delim[1] = 0;
- Warning("\\verb not terminated before eol, delimiter", delim);
- }
- }
- IGNORE;
- }
+<Normal>"\\verb" /* ignore \verb<ch>...<ch> */ {
+ if (fLatex) {
+ char verbchar, c;
+ verbchar = input();
+ if (verbchar < ' ') {
+ /* would be nice to include input filenames and line numbers */
+ ErrorExit("\\verb not complete before eof");
+ }
+ while ((c = input()) != verbchar && c != '\n' && c != EOF && c != 0) {
+ putchar(c);
+ }
+ if (c != verbchar) {
+ ErrorExit("\\verb not complete before eof");
+ }
+ }
+}
<Normal>"\\newcommand" { LATEX; KILLARGS(2); }
<Normal>"\\renewcommand" { LATEX; KILLARGS(2); }
@@ -411,7 +402,7 @@ VERBSYMBOL =|\\leq|\\geq|\\in|>|<|\\subseteq|\subseteq|\\subset|\\supset|\\sim|\
<Normal>"\\include" /* process files */ {LaBEGIN LaInclude; IGNORE;}
<LaInclude>[^{ \t\n}]+ { IncludeFile(yytext);
- BEGIN Normal;
+ BEGIN Normal;
}
<LaInclude>"\n"+ NEWLINE;
<LaInclude>. ;
@@ -420,21 +411,21 @@ VERBSYMBOL =|\\leq|\\geq|\\in|>|<|\\subseteq|\subseteq|\\subset|\\supset|\\sim|\
<IncludeOnly>[^{ \t,\n}]+ AddInclude(yytext);
<IncludeOnly>"}" { if (csbIncList == 0)
rgsbIncList[csbIncList++] = '\0';
- BEGIN Normal;
+ BEGIN Normal;
}
<IncludeOnly>"\n"+ NEWLINE;
<IncludeOnly>. ;
<Normal>"\\subfile" /* process files */ {LaBEGIN LaSubfile; IGNORE;}
<LaSubfile>[^{ \t\n}]+ { IncludeFile(yytext);
- BEGIN Normal;
+ BEGIN Normal;
}
<LaSubfile>"\n"+ NEWLINE;
<LaSubfile>. ;
<Normal>"\\input" {BEGIN Input; IGNORE;}
<Input>[^{ \t\n}]+ { InputFile(yytext);
- BEGIN Normal;
+ BEGIN Normal;
}
<Input>"\n"+ NEWLINE;
<Input>. ;
@@ -485,7 +476,7 @@ VERBSYMBOL =|\\leq|\\geq|\\in|>|<|\\subseteq|\subseteq|\\subset|\\supset|\\sim|\
}
<Normal>{W}[']*{W} { if (fWord)
(void)printf("%s\n", yytext);
- else
+ else
ECHO;
}
<Normal>[0-9]+ if (!fWord) ECHO;
@@ -496,30 +487,30 @@ VERBSYMBOL =|\\leq|\\geq|\\in|>|<|\\subseteq|\subseteq|\\subset|\\supset|\\sim|\
<LaMacro>"\[" { BEGIN LaOptArg; }
<LaMacro>"{" { cOpenBrace++; }
<LaMacro>"}""\n"{0,1} { cOpenBrace--; INCRLINENO;
- if (cOpenBrace == 0)
- {
+ if (cOpenBrace == 0)
+ {
if (--cArgs==0)
BEGIN Normal;
- }
+ }
}
<LaMacro>. ;
-<LaOptArg>"\]" BEGIN LaMacro;
+<LaOptArg>"\]" BEGIN LaMacro;
<LaOptArg>[^\]]* ;
<LaMacro2>"\[" { BEGIN LaOptArg2; }
<LaMacro2>"{" { if (cOpenBrace == 0)
- {
+ {
if (--cArgs==0)
{
- BEGIN Normal;
- cOpenBrace--;
+ BEGIN Normal;
+ cOpenBrace--;
+ }
}
- }
- cOpenBrace++;
+ cOpenBrace++;
}
<LaMacro2>"}" { cOpenBrace--; }
<LaMacro2>. ;
-<LaOptArg2>"\]" BEGIN LaMacro2;
+<LaOptArg2>"\]" BEGIN LaMacro2;
<LaOptArg2>. ;
%%
@@ -547,7 +538,7 @@ main(int cArgs, char *rgsbArgs[])
char *pch, sbBadOpt[2];
const char *sbEnvList = DEFAULTENV;
int fSawFile = 0, iArgs = 1;
-
+
/* get base name and decide what we are doing, detex or delatex */
#ifdef OS2
char drive[_MAX_DRIVE], dir[_MAX_DIR];
@@ -563,12 +554,12 @@ main(int cArgs, char *rgsbArgs[])
sbProgName = kpse_program_name;
#else
if ((sbProgName = strrchr(rgsbArgs[0], '/')) != NULL)
- sbProgName++;
+ sbProgName++;
else
- sbProgName = rgsbArgs[0];
+ sbProgName = rgsbArgs[0];
#endif
if (strcmp("delatex",sbProgName) == 0)
- fLatex = 1;
+ fLatex = 1;
#ifndef KPATHSEA
/* set rgsbInputPaths for use with TexOpen() */
@@ -578,29 +569,29 @@ main(int cArgs, char *rgsbArgs[])
/* process command line options */
while (iArgs < cArgs && *(pch = rgsbArgs[iArgs]) == CHOPT) {
while (*++pch)
- switch (*pch) {
- case CHCITEOPT:
+ switch (*pch) {
+ case CHCITEOPT:
fCite = 1;
break;
- case CHENVOPT:
+ case CHENVOPT:
if (++iArgs >= cArgs) {
ErrorExit("-e option requires an argument");
}
sbEnvList = rgsbArgs[iArgs];
break;
- case CHLATEXOPT:
+ case CHLATEXOPT:
fLatex = 1;
break;
- case CHNOFOLLOWOPT:
+ case CHNOFOLLOWOPT:
fFollow = 0;
break;
- case CHSPACEOPT:
+ case CHSPACEOPT:
fSpace = 1;
break;
- case CHTEXOPT:
+ case CHTEXOPT:
fForcetex = 1;
break;
- case CHWORDOPT:
+ case CHWORDOPT:
fWord = 1;
break;
case CHREPLACE:
@@ -612,12 +603,12 @@ main(int cArgs, char *rgsbArgs[])
case CHSRCLOC:
fSrcLoc = 1;
break;
- default:
+ default:
sbBadOpt[0] = *pch;
sbBadOpt[1] = '\0';
Warning("unknown option ignored -", sbBadOpt);
UsageExit();
- }
+ }
iArgs++;
}
SetEnvIgnore(sbEnvList);
@@ -628,30 +619,30 @@ main(int cArgs, char *rgsbArgs[])
/* process input files */
for (; iArgs < cArgs; iArgs++) {
- fSawFile++;
- if ((yyin = TexOpen(rgsbArgs[iArgs])) == NULL) {
+ fSawFile++;
+ if ((yyin = TexOpen(rgsbArgs[iArgs])) == NULL) {
Warning("can't open file", rgsbArgs[iArgs]);
continue;;
- }
+ }
fFileNames[csb] = rgsbArgs[iArgs];
fFileLines[csb] = 1;
- BEGIN Normal;
- (void)yylex();
+ BEGIN Normal;
+ (void)yylex();
}
/* if there were no input files, assume stdin */
if (!fSawFile) {
- yyin = stdin;
+ yyin = stdin;
#ifdef OS2
- if (isatty(fileno(stdin)))
+ if (isatty(fileno(stdin)))
OS2UsageExit();
#endif
- BEGIN Normal;
- (void)yylex();
+ BEGIN Normal;
+ (void)yylex();
}
#ifndef FLEX_SCANNER
if (YYSTATE != Normal)
- ErrorExit("input contains an unterminated mode or environment");
+ ErrorExit("input contains an unterminated mode or environment");
#endif
return(0);
}
@@ -671,7 +662,7 @@ yywrap(void)
{
(void)fclose(yyin);
#ifdef FLEX_SCANNER
- /* Pop context state */
+ /* Pop context state */
if (csb > 0) {
free(fFileNames[csb]);
yy_delete_buffer( YY_CURRENT_BUFFER );
@@ -679,8 +670,8 @@ yywrap(void)
}
#endif /* FLEX_SCANNER */
if (cfp > 0) {
- yyin = rgfp[--cfp];
- return(0);
+ yyin = rgfp[--cfp];
+ return(0);
}
return(1);
}
@@ -732,7 +723,7 @@ LineBreak()
}
/******
-** Echo -- If we are at column 0 and have specified '-1'; output
+** Echo -- If we are at column 0 and have specified '-1'; output
** the source location information.
******/
@@ -764,7 +755,7 @@ IncrLineNo()
** cannot just ignore text. We must at least increase the linenumber counter.
******/
-void
+void
Ignore()
{
IncrLineNo();
@@ -783,10 +774,10 @@ SetEnvIgnore(const char *sbEnvList)
sb = SafeMalloc(strlen(sbEnvList) + 1, "malloc for SetEnvIgnore failed");
(void) strcpy(sb, sbEnvList);
-
+
csbEnvIgnore = SeparateList(sb, rgsbEnvIgnore, CHENVSEP, MAXENVS);
if (csbEnvIgnore == my_ERROR)
- ErrorExit("The environment list contains too many environments");
+ ErrorExit("The environment list contains too many environments");
}
/******
@@ -801,10 +792,10 @@ BeginEnv(const char *sbEnv)
if (!fLatex) return(0);
for (i = 0; i < csbEnvIgnore; ++i)
- if (strcmp(sbEnv, rgsbEnvIgnore[i]) == 0) {
+ if (strcmp(sbEnv, rgsbEnvIgnore[i]) == 0) {
(void)strcpy(sbCurrentIgnoredEnv, sbEnv);
return(1);
- }
+ }
return(0);
}
@@ -817,7 +808,7 @@ EndEnv(const char *sbEnv)
{
if (!fLatex) return(0);
if (strcmp(sbEnv, sbCurrentIgnoredEnv) == 0)
- return(1);
+ return(1);
return(0);
}
@@ -833,13 +824,13 @@ InputFile(char *sbFile)
FILE *TexOpen();
if (!fFollow)
- return;
+ return;
rgfp[cfp++] = yyin;
if ((yyin = TexOpen(sbFile)) == NULL) {
- Warning("can't open \\input file", sbFile);
- yyin = rgfp[--cfp];
- return;
- }
+ Warning("can't open \\input file", sbFile);
+ yyin = rgfp[--cfp];
+ return;
+ }
#ifdef FLEX_SCANNER
rgsb[csb++] = YY_CURRENT_BUFFER;
fFileLines[csb] = 1;
@@ -859,14 +850,14 @@ IncludeFile(char *sbFile)
FILE *TexOpen();
if (!fFollow)
- return;
+ return;
if (!InList(sbFile))
- return;
+ return;
rgfp[cfp++] = yyin;
if ((yyin = TexOpen(sbFile)) == NULL) {
- Warning("can't open \\include file", sbFile);
- yyin = rgfp[--cfp];
- return;
+ Warning("can't open \\include file", sbFile);
+ yyin = rgfp[--cfp];
+ return;
}
#ifdef FLEX_SCANNER
rgsb[csb++] = YY_CURRENT_BUFFER;
@@ -885,9 +876,9 @@ void
AddInclude(char *sbFile)
{
if (!fFollow)
- return;
+ return;
if (csbIncList >= MAXINCLIST)
- Warning("\\includeonly list is too long, ignoring", sbFile);
+ Warning("\\includeonly list is too long, ignoring", sbFile);
rgsbIncList[csbIncList] = SafeMalloc(strlen(sbFile) + 1, "malloc for AddInclude failed");
(void)strcpy(rgsbIncList[csbIncList++], sbFile);
}
@@ -904,14 +895,14 @@ InList(char *sbFile)
int i;
if (csbIncList == 0) /* no list */
- return(1);
+ return(1);
(void)strcpy(sbBase, sbFile);
if ((pch = strrchr(sbBase, '.')) != NULL)
- *pch = '\0';
+ *pch = '\0';
i = 0;
while ((i < csbIncList) && rgsbIncList[i])
- if (strcmp(rgsbIncList[i++], sbBase) == 0)
- return(1);
+ if (strcmp(rgsbIncList[i++], sbBase) == 0)
+ return(1);
return(0);
}
@@ -936,27 +927,27 @@ SetInputPaths(void)
#ifdef OS2
if ((sb = getenv("TEXINPUT")) == NULL)
#endif
- if ((sb = getenv("TEXINPUTS")) == NULL)
+ if ((sb = getenv("TEXINPUTS")) == NULL)
sb = DEFAULTINPUTS;
cchPaths = strlen(sb);
if (sb[0] == CHPATHSEP)
- cchPaths += cchDefaults;
+ cchPaths += cchDefaults;
if (sb[strlen(sb) - 1] == CHPATHSEP)
- cchPaths += cchDefaults;
+ cchPaths += cchDefaults;
sbPaths = SafeMalloc(cchPaths + 1, "malloc for SetInputPaths failed");
sbPaths[0] = '\0';
if (sb[0] == CHPATHSEP)
- (void)strcat(sbPaths, DEFAULTINPUTS);
+ (void)strcat(sbPaths, DEFAULTINPUTS);
(void)strcat(sbPaths, sb);
if (sb[strlen(sb) - 1] == CHPATHSEP)
- (void)strcat(sbPaths, DEFAULTINPUTS);
+ (void)strcat(sbPaths, DEFAULTINPUTS);
csbInputPaths = SeparateList(sbPaths, rgsbInputPaths, CHPATHSEP, MAXINPUTPATHS);
if (csbInputPaths == my_ERROR)
#ifdef OS2
- ErrorExit("TEXINPUT(S) environment variable has too many paths");
+ ErrorExit("TEXINPUT(S) environment variable has too many paths");
#else
- ErrorExit("TEXINPUTS environment variable has too many paths");
+ ErrorExit("TEXINPUTS environment variable has too many paths");
#endif
}
#endif
@@ -974,8 +965,8 @@ SeparateList(char *sbList, char *rgsbList[], char chSep, int csbMax)
int csbList = 0;
while (sbList && *sbList && csbList < csbMax) {
- rgsbList[csbList++] = sbList;
- if ((sbList = strchr(sbList, chSep))) {
+ rgsbList[csbList++] = sbList;
+ if ((sbList = strchr(sbList, chSep))) {
*sbList++ = '\0';
}
}
@@ -1006,52 +997,52 @@ TexOpen(char *sbFile)
for (iPath = 0; iPath < csbInputPaths; iPath++) {
#ifdef OS2
- if (*sbFile == '/' || *sbFile == '\\' || strchr(sbFile, ':')) { /* absolute path */
+ if (*sbFile == '/' || *sbFile == '\\' || strchr(sbFile, ':')) { /* absolute path */
#else
- if (*sbFile == '/') { /* absolute path */
+ if (*sbFile == '/') { /* absolute path */
#endif
(void)snprintf(sbFullPath, PATH_MAX-1, "%s", sbFile);
iPath = csbInputPaths; /* only check once */
- } else {
+ } else {
(void)snprintf(sbFullPath, PATH_MAX-1, "%s/%s", rgsbInputPaths[iPath], sbFile);
}
#ifdef OS2
- pch = sbFullPath;
- while (pch = strchr(pch, '\\')) {
+ pch = sbFullPath;
+ while (pch = strchr(pch, '\\')) {
*pch = '/';
}
#endif
- /* If sbFile ends in .tex then it must be there */
- if ((pch = strrchr(sbFullPath, '.')) != NULL
+ /* If sbFile ends in .tex then it must be there */
+ if ((pch = strrchr(sbFullPath, '.')) != NULL
&& (strcmp(pch, ".tex") == 0)) {
if ((fp = fopen(sbFullPath, "r")) != NULL)
return(fp);
else
continue;
- }
-
- /* if .<ext> then try to open it. the '.' represents */
- /* the beginning of an extension if it is not the first */
- /* character and it does not follow a '.' or a '/' */
- if (pch != NULL && pch > &(sbFullPath[0])
- && *(pch - 1) != '.' && *(pch - 1) != '/'
- && (fp = fopen(sbFullPath, "r")) != NULL) {
+ }
+
+ /* if .<ext> then try to open it. the '.' represents */
+ /* the beginning of an extension if it is not the first */
+ /* character and it does not follow a '.' or a '/' */
+ if (pch != NULL && pch > &(sbFullPath[0])
+ && *(pch - 1) != '.' && *(pch - 1) != '/'
+ && (fp = fopen(sbFullPath, "r")) != NULL) {
return(fp);
}
- /* just base name, add .tex to the name */
- sbNew = SafeMalloc(strlen(sbFullPath) + 5, "malloc for TexOpen failed");
- (void)strcpy(sbNew, sbFullPath);
- (void)strcat(sbNew, ".tex");
- if ((fp = fopen(sbNew, "r")) != NULL) {
+ /* just base name, add .tex to the name */
+ sbNew = SafeMalloc(strlen(sbFullPath) + 5, "malloc for TexOpen failed");
+ (void)strcpy(sbNew, sbFullPath);
+ (void)strcat(sbNew, ".tex");
+ if ((fp = fopen(sbNew, "r")) != NULL) {
free(sbNew);
return(fp);
}
free(sbNew);
- /* try sbFile regardless */
- if ((fp = fopen(sbFullPath, "r")) != NULL)
+ /* try sbFile regardless */
+ if ((fp = fopen(sbFullPath, "r")) != NULL)
return(fp);
}
return NULL;
@@ -1059,7 +1050,7 @@ TexOpen(char *sbFile)
sbNew = kpse_find_file (sbFile, kpse_tex_format, false);
if (sbNew == NULL)
- return NULL;
+ return NULL;
return fopen (sbNew, "r");
#endif
@@ -1075,7 +1066,7 @@ SafeMalloc(int cch, const char *sbMessage)
char *sb;
if ((sb = (char *)malloc((unsigned)cch)) == NULL)
- ErrorExit(sbMessage);
+ ErrorExit(sbMessage);
return(sb);
}
@@ -1124,7 +1115,6 @@ UsageExit(void)
-v show program version and exit\n\
\n\
opendetex home page: https://github.com/pkubowicz/opendetex");
- (void)printf("opendetex version %s\n", VERSION);
exit(0);
}
@@ -1135,6 +1125,7 @@ opendetex home page: https://github.com/pkubowicz/opendetex");
void
VersionExit(void)
{
- (void)printf("\nopendetex version %s\n", VERSION);
+ (void)printf("\nOpenDetex version %s\nhttps://github.com/pkubowicz/opendetex\n",
+ VERSION);
exit(0);
}
diff --git a/Build/source/texk/detex/detex-src/detex.man b/Build/source/texk/detex/detex-src/detex.man
index 9640906d878..3e08d8420c6 100644
--- a/Build/source/texk/detex/detex-src/detex.man
+++ b/Build/source/texk/detex/detex-src/detex.man
@@ -1,9 +1,10 @@
-.TH DETEX 1 "15 September 2022" "TeX Live"
+.TH DETEX 1 "August 12, 1993" "Purdue University"
.SH NAME
detex \- a filter to strip \fITeX\fP commands from a .tex file.
.SH SYNOPSIS
.B detex
-[ \fB\-clnstw\fR ] [ \fB\-e\fI environment-list\fR ] [ \fIfilename\fR[.tex] ... ]
+[ \fB\-clnstw\fR ] [ \fB\-e\fI environment-list\fR ]
+[ \fIfilename\fR[.tex] ... ]
.SH DESCRIPTION
.I Detex
reads each file in sequence, removes all comments and
@@ -13,18 +14,18 @@ and writes the remainder on the standard output.
All text in math mode and display mode is removed.
By default,
.I detex
-follows \\input commands.
+follows \einput commands.
If a file cannot be opened, a warning message is
printed and the command is ignored.
If the
.B \-n
-option is used, no \\input or \\include commands will be processed.
+option is used, no \einput or \einclude commands will be processed.
This allows single file processing.
If no input file is given on the command line,
.I detex
reads from standard input.
.PP
-If the magic sequence ``\\begin{document}'' appears in the text,
+If the magic sequence ``\ebegin{document}'' appears in the text,
.I detex
assumes it is dealing with
.I LaTeX
@@ -32,7 +33,7 @@ source and
.I detex
recognizes additional constructs used in
.IR LaTeX .
-These include the \\include and \\includeonly commands.
+These include the \einclude and \eincludeonly commands.
The
.B \-l
option can be used to force
@@ -57,8 +58,8 @@ The
.B \-c
option can be used in
.I LaTeX
-mode to have detex echo the arguments to \\cite,
-\\ref, and \\pageref macros. This can be useful when sending the output to
+mode to have detex echo the arguments to \ecite,
+\eref, and \epageref macros. This can be useful when sending the output to
a style checker.
.PP
.I Detex
@@ -72,7 +73,7 @@ environments.
.PP
The
.B \-r
-option tries to naively replace $..$, $$..$$, \\(..\\) and \\[..\\]
+option tries to naively replace $..$, $$..$$, \e(..\e) and \e[..\e]
with nouns and verbs (in particular, "noun" and "verbs")
in a way that keeps sentences readable.
.PP
@@ -86,20 +87,21 @@ with the deletions mentioned above. Newline characters are
preserved where possible
so that the lines of output match the input as closely as possible.
.PP
-The
+The
.B \-1
option will prefix each printed line with `filename:linenumber:` indicating
where that line is coming from in terms of the original (La)TeX document.
.PP
-The TEXINPUTS environment variable is used to find \\input and \\include
+The TEXINPUTS environment variable is used to find \einput and \einclude
files. Like \fITeX\fP, it interprets a leading or trailing `:' as the default
-TEXINPUTS. It does \fInot\fP support the `//' directory expansion magic sequence.
+TEXINPUTS.
+It does \fInot\fP support the `//' directory expansion magic sequence.
.PP
Detex now handles the basic \fITeX\fP ligatures as a special case, replacing the
-ligatures with acceptable character substitutes. This eliminates
+ligatures with acceptable character4 substitutes. This eliminates
spelling errors introduced by merely removing them. The ligatures are
-\\aa, \\ae, \\oe, \\ss, \\o, \\l (and their upper-case
-equivalents). The special "dotless" characters \\i and \\j are also
+\eaa, \eae, \eoe, \ess, \eo, \el (and their upper-case
+equivalents). The special "dotless" characters \ei and \ej are also
replaced with i and j respectively.
.PP
Note that previous versions of
@@ -113,9 +115,9 @@ The old functionality can be essentially duplicated by using the
.B \-s
option.
.SH SEE ALSO
-tex(1)
+.BR tex(1)
.SH DIAGNOSTICS
-Nesting of \\input is allowed but the number of opened files must not
+Nesting of \einput is allowed but the number of opened files must not
exceed the system's limit on the number of simultaneously opened files.
.I Detex
ignores unrecognized option characters after printing a warning message.
@@ -133,7 +135,7 @@ it is easily confused by some constructs. Most errors result in too much
rather than too little output.
.PP
Running \fILaTeX\fR
-source without a ``\\begin{document}''
+source without a ``\ebegin{document}''
through \fIdetex\fR may produce
errors.
.PP