summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2019-02-03 10:49:09 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2019-02-03 10:49:09 +0000
commit9c1b590fa92293b7bc04195a05641af25185dc64 (patch)
treedf7fc01fd5b4d31c72312ba685bdfb701bf6af02
parent661da873d1aa4ced693640d5b32da77b489430e6 (diff)
opendetex-2.8.5
git-svn-id: svn://tug.org/texlive/trunk@49921 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/README2
-rw-r--r--Build/source/texk/detex/ChangeLog4
-rw-r--r--Build/source/texk/detex/TLpatches/ChangeLog6
-rw-r--r--Build/source/texk/detex/TLpatches/TL-Changes2
-rw-r--r--Build/source/texk/detex/TLpatches/patch-04-kpathsea11
-rw-r--r--Build/source/texk/detex/TLpatches/patch-13-typo-minipage12
-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/ChangeLog6
-rw-r--r--Build/source/texk/detex/detex-src/Makefile8
-rw-r--r--Build/source/texk/detex/detex-src/README2
-rw-r--r--Build/source/texk/detex/detex-src/detex.c673
-rw-r--r--Build/source/texk/detex/detex-src/detex.h1
-rw-r--r--Build/source/texk/detex/detex-src/detex.l32
-rw-r--r--Build/source/texk/detex/detex-src/detex.man4
15 files changed, 390 insertions, 397 deletions
diff --git a/Build/source/texk/README b/Build/source/texk/README
index 43d1aaf7262..ac0838b3399 100644
--- a/Build/source/texk/README
+++ b/Build/source/texk/README
@@ -34,7 +34,7 @@ chktex 1.7.6 - checked 15sep16
cjkutils 4.8.4 - checked 18apr15
http://cjk.ffii.org/cjk-4.8.4.tar.gz
-detex 2.8.4 - checked 16oct18
+detex 2.8.5 - checked 03feb19
https://github.com/pkubowicz/opendetex
old info: http://www.cs.purdue.edu/homes/trinkle/detex/
diff --git a/Build/source/texk/detex/ChangeLog b/Build/source/texk/detex/ChangeLog
index c8c4a9e985e..e4ee7c93749 100644
--- a/Build/source/texk/detex/ChangeLog
+++ b/Build/source/texk/detex/ChangeLog
@@ -1,3 +1,7 @@
+2019-02-03 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * Import opendetex-2.8.5, TLpatches adapted.
+
2018-08-16 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
* Import opendetex-2.8.4, TLpatches adapted.
diff --git a/Build/source/texk/detex/TLpatches/ChangeLog b/Build/source/texk/detex/TLpatches/ChangeLog
index e168101c0d9..33e4e868518 100644
--- a/Build/source/texk/detex/TLpatches/ChangeLog
+++ b/Build/source/texk/detex/TLpatches/ChangeLog
@@ -1,3 +1,9 @@
+2019-02-03 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ Adapt to opendetex-2.8.5.
+ * patch-04-kpathse, patch-13-typo-minipage: removed.
+ (applied upstream, yay!)
+
2018-08-16 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
Adapt to opendetex-2.8.4.
diff --git a/Build/source/texk/detex/TLpatches/TL-Changes b/Build/source/texk/detex/TLpatches/TL-Changes
index 783d09a6ead..d3d38224b27 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.4 tree as obtained from:
+Changes applied to the opendetex-2.8.5 tree as obtained from:
https://github.com/pkubowicz/opendetex/releases
Renamed:
diff --git a/Build/source/texk/detex/TLpatches/patch-04-kpathsea b/Build/source/texk/detex/TLpatches/patch-04-kpathsea
deleted file mode 100644
index e924b2ae234..00000000000
--- a/Build/source/texk/detex/TLpatches/patch-04-kpathsea
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -ur opendetex-2.8.4.orig/detex.l opendetex-2.8.4/detex.l
---- opendetex-2.8.4.orig/detex.l 2018-02-11 18:42:05.000000000 +0900
-+++ opendetex-2.8.4/detex.l 2018-06-20 23:12:37.000000000 +0900
-@@ -73,6 +73,7 @@
- #ifndef MAXPATHLEN
- #include <sys/param.h>
- #endif
-+#define PATH_MAX MAXPATHLEN
- #ifdef OS2
- #include <stdlib.h>
- #endif
diff --git a/Build/source/texk/detex/TLpatches/patch-13-typo-minipage b/Build/source/texk/detex/TLpatches/patch-13-typo-minipage
deleted file mode 100644
index 9b1c2596ca6..00000000000
--- a/Build/source/texk/detex/TLpatches/patch-13-typo-minipage
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur opendetex-2.8.4.orig/detex.l opendetex-2.8.4/detex.l
---- opendetex-2.8.4.orig/detex.l 2018-02-11 18:42:05.000000000 +0900
-+++ opendetex-2.8.4/detex.l 2018-06-20 23:12:37.000000000 +0900
-@@ -203,7 +204,7 @@
- <LaVerbatim>. ECHO;
-
- <LaBegin>{S}"{"{S}"minipage"{S}"}" { KILLARGS(1);
-- if (BeginEnv("minpage"))
-+ if (BeginEnv("minipage"))
- BEGIN LaEnv;
- else
- BEGIN LaMacro; /* Normal; */
diff --git a/Build/source/texk/detex/configure b/Build/source/texk/detex/configure
index 09686c9e347..98160739989 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.69 for detex (TeX Live) 2.8.
+# Generated by GNU Autoconf 2.69 for detex (TeX Live) 2.8.5.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='detex (TeX Live)'
PACKAGE_TARNAME='detex--tex-live-'
-PACKAGE_VERSION='2.8'
-PACKAGE_STRING='detex (TeX Live) 2.8'
+PACKAGE_VERSION='2.8.5'
+PACKAGE_STRING='detex (TeX Live) 2.8.5'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1331,7 +1331,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 to adapt to many kinds of systems.
+\`configure' configures detex (TeX Live) 2.8.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1402,7 +1402,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of detex (TeX Live) 2.8:";;
+ short | recursive ) echo "Configuration of detex (TeX Live) 2.8.5:";;
esac
cat <<\_ACEOF
@@ -1521,7 +1521,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-detex (TeX Live) configure 2.8
+detex (TeX Live) configure 2.8.5
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2177,7 +2177,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, which was
+It was created by detex (TeX Live) $as_me 2.8.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -7864,7 +7864,7 @@ fi
# Define the identity of the package.
PACKAGE='detex--tex-live-'
- VERSION='2.8'
+ VERSION='2.8.5'
cat >>confdefs.h <<_ACEOF
@@ -14080,7 +14080,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-detex (TeX Live) config.lt 2.8
+detex (TeX Live) config.lt 2.8.5
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -15668,7 +15668,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, which was
+This file was extended by detex (TeX Live) $as_me 2.8.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15734,7 +15734,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-detex (TeX Live) config.status 2.8
+detex (TeX Live) config.status 2.8.5
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/texk/detex/configure.ac b/Build/source/texk/detex/configure.ac
index 611aff9a409..d6c9bf8dd58 100644
--- a/Build/source/texk/detex/configure.ac
+++ b/Build/source/texk/detex/configure.ac
@@ -6,7 +6,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])[]dnl using unmodified detex source tree
+m4_define([detex_version], [2.8.5])[]dnl using unmodified detex source tree
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 cd3072f14da..043c59be7ca 100644
--- a/Build/source/texk/detex/detex-src/ChangeLog
+++ b/Build/source/texk/detex/detex-src/ChangeLog
@@ -184,3 +184,9 @@ Stoped generating additional spaces after commands (#41). Thanks to Martin Nowac
Fixed space missing in output when two newlines follow a macro (#42). Thanks to sgerwk.
Started treating newlines in inline math as spaces (#45). Thanks to sgerwk.
+
+(Version 2.8.5) -- January, 2019
+
+Fixed man page on macOS (#47). Thanks to FX Coudert.
+
+Added -v option for showing version.
diff --git a/Build/source/texk/detex/detex-src/Makefile b/Build/source/texk/detex/detex-src/Makefile
index e97c09ae751..7f618f821b5 100644
--- a/Build/source/texk/detex/detex-src/Makefile
+++ b/Build/source/texk/detex/detex-src/Makefile
@@ -71,7 +71,7 @@ DEFS =
#
#DEFS += ${DEFS} -DNO_MALLOC_DECL
#
-CFLAGS = -O ${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.4
+VERSION = 2.8.5
all: ${PROGS}
@@ -120,14 +120,14 @@ detex.c: detex.l
mv lex.yy.c detex.c
man-page:
- troff -man detex.1l
+ troff -man detex.1
# If you want detex available as delatex, uncomment the last two lines of
# this target
install: all
rm -f ${DESTDIR}/detex
install -c -m 775 -g staff -s detex ${DESTDIR}
- install detex.1l /usr/local/share/man/man1
+ install detex.1 /usr/local/share/man/man1
# rm -f ${DESTDIR}/delatex
# ln ${DESTDIR}/detex ${DESTDIR}/delatex
diff --git a/Build/source/texk/detex/detex-src/README b/Build/source/texk/detex/detex-src/README
index 49629727a05..f934d1f2cff 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.4
+OpenDetex - Version 2.8.5
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 9398cefac07..86ef44e6ffc 100644
--- a/Build/source/texk/detex/detex-src/detex.c
+++ b/Build/source/texk/detex/detex-src/detex.c
@@ -66,10 +66,16 @@
#include <strings.h>
#define strrchr rindex
#endif
-#ifndef MAXPATHLEN
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#else
#include <sys/param.h>
-#endif
+#ifndef PATH_MAX /* for old BSD */
#define PATH_MAX MAXPATHLEN
+#endif
+#endif /* HAVE_LIMITS_H */
+
#ifdef OS2
#include <stdlib.h>
#endif
@@ -81,7 +87,7 @@
#endif /* KPATHSEA */
-#line 84 "lex.yy.c"
+#line 91 "lex.yy.c"
#define YY_INT_ALIGNED short int
@@ -90,7 +96,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 1
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -165,10 +171,16 @@ 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 */
+/* begin standard C++ headers. */
+
/* TODO: this is always defined, so inline it */
#define yyconst const
@@ -181,32 +193,26 @@ typedef unsigned int flex_uint32_t;
/* 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. */
@@ -243,7 +249,7 @@ 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)
@@ -260,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
@@ -342,7 +347,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< 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.
*/
@@ -363,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 );
+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 );
+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 )
-#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 ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
-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,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 unsigned char YY_CHAR;
+typedef flex_uint8_t YY_CHAR;
FILE *yyin = NULL, *yyout = NULL;
typedef int yy_state_type;
extern int yylineno;
-
int yylineno = 1;
extern char *yytext;
@@ -427,10 +425,10 @@ 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 );
-static void yynoreturn 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.
@@ -441,7 +439,6 @@ static void yynoreturn yy_fatal_error (yyconst char* msg );
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-
#define YY_NUM_RULES 173
#define YY_END_OF_BUFFER 174
/* This struct is not used in this scanner,
@@ -451,7 +448,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[1361] =
+static const flex_int16_t yy_accept[1361] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 144, 144, 0, 0, 0, 0,
@@ -604,7 +601,7 @@ static yyconst flex_int16_t yy_accept[1361] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 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,
@@ -636,7 +633,7 @@ static yyconst YY_CHAR yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst YY_CHAR yy_meta[60] =
+static const YY_CHAR yy_meta[60] =
{ 0,
1, 2, 3, 2, 1, 1, 1, 4, 1, 1,
1, 1, 5, 6, 1, 6, 6, 1, 6, 1,
@@ -646,7 +643,7 @@ static yyconst YY_CHAR yy_meta[60] =
8, 8, 8, 8, 8, 11, 1, 12, 1
} ;
-static yyconst flex_uint16_t yy_base[1415] =
+static const flex_int16_t yy_base[1415] =
{ 0,
0, 0, 0, 1, 2, 6, 14, 29, 11, 33,
40, 45, 93, 0, 152, 0, 211, 0, 268, 271,
@@ -806,7 +803,7 @@ static yyconst flex_uint16_t yy_base[1415] =
2160, 3278, 2163, 2165
} ;
-static yyconst flex_int16_t yy_def[1415] =
+static const flex_int16_t yy_def[1415] =
{ 0,
1361, 1361, 1362, 1362, 1363, 1363, 1364, 1364, 1365, 1365,
1366, 1366, 1360, 13, 1360, 15, 1360, 17, 1367, 1367,
@@ -966,7 +963,7 @@ static yyconst flex_int16_t yy_def[1415] =
1360, 1360, 1360, 1360
} ;
-static yyconst flex_uint16_t yy_nxt[3395] =
+static const flex_int16_t yy_nxt[3395] =
{ 0,
1360, 1360, 48, 48, 51, 1360, 1360, 52, 51, 1360,
1360, 52, 61, 62, 61, 57, 58, 57, 108, 53,
@@ -1344,7 +1341,7 @@ static yyconst flex_uint16_t yy_nxt[3395] =
} ;
-static yyconst flex_int16_t yy_chk[3395] =
+static const flex_int16_t yy_chk[3395] =
{ 0,
0, 0, 3, 4, 5, 0, 0, 5, 6, 0,
0, 6, 9, 9, 9, 7, 7, 7, 23, 5,
@@ -1738,7 +1735,7 @@ int yy_flex_debug = 0;
char *yytext;
#line 1 "detex.l"
-#line 89 "detex.l"
+#line 97 "detex.l"
#undef IGNORE
#define LaBEGIN if (fLatex) BEGIN
@@ -1757,6 +1754,7 @@ char *yytext;
void AddInclude(char *sbFile);
void ErrorExit(const char *sb1);
void UsageExit(void);
+void VersionExit(void);
void IncludeFile(char *sbFile);
void InputFile(char *sbFile);
void SetEnvIgnore(const char *sbEnvList);
@@ -1817,11 +1815,9 @@ YY_BUFFER_STATE rgsb[NOFILE + 1]; /* flex context stack */
int csb = 0; /* depth of flex context stack */
#endif /* FLEX_SCANNER */
+#line 1819 "lex.yy.c"
-
-
-
-#line 1824 "lex.yy.c"
+#line 1821 "lex.yy.c"
#define INITIAL 0
#define Define 1
@@ -1858,36 +1854,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 );
- int 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.
@@ -1895,32 +1891,29 @@ 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
#ifndef YY_NO_UNPUT
- static void yyunput (int c,char *buf_ptr );
-
#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
@@ -1951,7 +1944,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; \
@@ -1964,7 +1957,7 @@ static int input (void );
else \
{ \
errno=0; \
- while ( (result = (int) 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) \
{ \
@@ -2053,16 +2046,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 187 "detex.l"
+#line 196 "detex.l"
-#line 2065 "lex.yy.c"
+#line 2059 "lex.yy.c"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@@ -2090,9 +2083,9 @@ yy_match:
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 1361 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 1360 );
@@ -2117,24 +2110,24 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 188 "detex.l"
+#line 197 "detex.l"
/* ignore comments */ ;
YY_BREAK
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
-#line 190 "detex.l"
+#line 199 "detex.l"
{LATEX; IGNORE;}
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 192 "detex.l"
+#line 201 "detex.l"
/* environment start */ {LaBEGIN LaBegin; IGNORE;}
YY_BREAK
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
-#line 194 "detex.l"
+#line 203 "detex.l"
{ if (BeginEnv("verbatim"))
BEGIN LaEnv;
else
@@ -2145,24 +2138,24 @@ YY_RULE_SETUP
case 5:
/* rule 5 can match eol */
YY_RULE_SETUP
-#line 201 "detex.l"
+#line 210 "detex.l"
/* verbatim mode */ {BEGIN Normal; IGNORE;}
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 202 "detex.l"
+#line 211 "detex.l"
ECHO;
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 203 "detex.l"
+#line 212 "detex.l"
ECHO;
YY_BREAK
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
-#line 205 "detex.l"
+#line 214 "detex.l"
{ KILLARGS(1);
if (BeginEnv("minipage"))
BEGIN LaEnv;
@@ -2174,7 +2167,7 @@ YY_RULE_SETUP
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
-#line 213 "detex.l"
+#line 222 "detex.l"
{
if (BeginEnv("table"))
BEGIN LaEnv;
@@ -2186,7 +2179,7 @@ YY_RULE_SETUP
case 10:
/* rule 10 can match eol */
YY_RULE_SETUP
-#line 221 "detex.l"
+#line 230 "detex.l"
{
if (BeginEnv("figure"))
BEGIN LaEnv;
@@ -2197,7 +2190,7 @@ YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 229 "detex.l"
+#line 238 "detex.l"
{ if (BeginEnv(yytext))
BEGIN LaEnv;
else
@@ -2208,28 +2201,28 @@ YY_RULE_SETUP
/*<LaBegin>"\n" NEWLINE;*/
case 12:
YY_RULE_SETUP
-#line 236 "detex.l"
+#line 245 "detex.l"
;
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 238 "detex.l"
+#line 247 "detex.l"
/* absorb some environments */ {LaBEGIN LaEnd; IGNORE;}
YY_BREAK
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
-#line 239 "detex.l"
+#line 248 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 240 "detex.l"
+#line 249 "detex.l"
;
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 242 "detex.l"
+#line 251 "detex.l"
/* end environment */ { if (EndEnv(yytext))
BEGIN Normal;
IGNORE;
@@ -2237,354 +2230,354 @@ YY_RULE_SETUP
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 246 "detex.l"
+#line 255 "detex.l"
{BEGIN LaEnv; IGNORE;}
YY_BREAK
/*<LaEnd>"\n" NEWLINE;*/
case 18:
YY_RULE_SETUP
-#line 248 "detex.l"
+#line 257 "detex.l"
;
YY_BREAK
case 19:
/* rule 19 can match eol */
YY_RULE_SETUP
-#line 250 "detex.l"
+#line 259 "detex.l"
;
YY_BREAK
case 20:
/* rule 20 can match eol */
YY_RULE_SETUP
-#line 251 "detex.l"
+#line 260 "detex.l"
;
YY_BREAK
case 21:
/* rule 21 can match eol */
YY_RULE_SETUP
-#line 252 "detex.l"
+#line 261 "detex.l"
;
YY_BREAK
case 22:
/* rule 22 can match eol */
YY_RULE_SETUP
-#line 253 "detex.l"
+#line 262 "detex.l"
;
YY_BREAK
case 23:
/* rule 23 can match eol */
YY_RULE_SETUP
-#line 254 "detex.l"
+#line 263 "detex.l"
;
YY_BREAK
case 24:
/* rule 24 can match eol */
YY_RULE_SETUP
-#line 255 "detex.l"
+#line 264 "detex.l"
;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 256 "detex.l"
+#line 265 "detex.l"
; /* hack to fix \begin{minipage}{300pt} */
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 258 "detex.l"
+#line 267 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 259 "detex.l"
+#line 268 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 260 "detex.l"
+#line 269 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 261 "detex.l"
+#line 270 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 262 "detex.l"
+#line 271 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 263 "detex.l"
+#line 272 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 264 "detex.l"
+#line 273 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 265 "detex.l"
+#line 274 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 266 "detex.l"
+#line 275 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 267 "detex.l"
+#line 276 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 268 "detex.l"
+#line 277 "detex.l"
{ STRIPARGS(2); }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 269 "detex.l"
+#line 278 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 270 "detex.l"
+#line 279 "detex.l"
{ STRIPARGS(2); }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 271 "detex.l"
+#line 280 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 272 "detex.l"
+#line 281 "detex.l"
;
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 273 "detex.l"
+#line 282 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 42:
/* rule 42 can match eol */
YY_RULE_SETUP
-#line 274 "detex.l"
+#line 283 "detex.l"
{ LaBEGIN LaPicture; }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 276 "detex.l"
+#line 285 "detex.l"
;
YY_BREAK
case 44:
/* rule 44 can match eol */
YY_RULE_SETUP
-#line 277 "detex.l"
+#line 286 "detex.l"
{ if(fShowPictures) { printf("<Picture %s>", yytext); } }
YY_BREAK
case 45:
/* rule 45 can match eol */
YY_RULE_SETUP
-#line 278 "detex.l"
+#line 287 "detex.l"
BEGIN Normal;
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 279 "detex.l"
+#line 288 "detex.l"
BEGIN Normal;
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 281 "detex.l"
+#line 290 "detex.l"
{ KILLARGS(3); }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 282 "detex.l"
+#line 291 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 283 "detex.l"
+#line 292 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 284 "detex.l"
+#line 293 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 285 "detex.l"
+#line 294 "detex.l"
{ KILLARGS(3); }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 286 "detex.l"
+#line 295 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 287 "detex.l"
+#line 296 "detex.l"
{ STRIPARGS(1); }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 288 "detex.l"
+#line 297 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 289 "detex.l"
+#line 298 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 290 "detex.l"
+#line 299 "detex.l"
{ KILLARGS(3); }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 292 "detex.l"
+#line 301 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 293 "detex.l"
+#line 302 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 294 "detex.l"
+#line 303 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 295 "detex.l"
+#line 304 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 296 "detex.l"
+#line 305 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 297 "detex.l"
+#line 306 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 298 "detex.l"
+#line 307 "detex.l"
;/*NEWLINE;*/
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 300 "detex.l"
+#line 309 "detex.l"
/* ignore args */ {KILLARGS(1); IGNORE;}
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 301 "detex.l"
+#line 310 "detex.l"
/* of these \cs */ {KILLARGS(1); IGNORE;}
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 302 "detex.l"
+#line 311 "detex.l"
{KILLARGS(1); IGNORE;}
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 303 "detex.l"
+#line 312 "detex.l"
{KILLARGS(1);} /* kill space before */
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 304 "detex.l"
+#line 313 "detex.l"
{LATEX; KILLARGS(1); IGNORE;}
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 305 "detex.l"
+#line 314 "detex.l"
{LATEX; KILLARGS(1); IGNORE;}
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 306 "detex.l"
+#line 315 "detex.l"
{KILLARGS(1); IGNORE;}
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 307 "detex.l"
+#line 316 "detex.l"
{KILLARGS(1); IGNORE;}
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 308 "detex.l"
+#line 317 "detex.l"
{KILLARGS(1);}
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 309 "detex.l"
+#line 318 "detex.l"
{KILLARGS(1);}
YY_BREAK
/*<Normal>"\\footnote" {KILLARGS(1); SPACE;}*/
case 74:
YY_RULE_SETUP
-#line 311 "detex.l"
+#line 320 "detex.l"
{KILLARGS(1); IGNORE;}
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 312 "detex.l"
+#line 321 "detex.l"
{CITE(1); IGNORE;}
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 313 "detex.l"
+#line 322 "detex.l"
{CITE(1); IGNORE;}
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 314 "detex.l"
+#line 323 "detex.l"
{KILLARGS(1); IGNORE;}
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 315 "detex.l"
+#line 324 "detex.l"
{CITE(1); IGNORE;}
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 316 "detex.l"
+#line 325 "detex.l"
{KILLARGS(2); IGNORE;}
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 317 "detex.l"
+#line 326 "detex.l"
{KILLARGS(2); IGNORE;}
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 318 "detex.l"
+#line 327 "detex.l"
{ KILLARGS(1); }
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 319 "detex.l"
+#line 328 "detex.l"
{ KILLARGS(2); }
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 321 "detex.l"
+#line 330 "detex.l"
{KILLARGS(1);}
YY_BREAK
case 84:
/* rule 84 can match eol */
YY_RULE_SETUP
-#line 323 "detex.l"
+#line 332 "detex.l"
{
putchar('(');
footnoteLevel = currBracesLevel;
@@ -2593,7 +2586,7 @@ YY_RULE_SETUP
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 328 "detex.l"
+#line 337 "detex.l"
/* ignore \verb<ch>...<ch> */ { if (fLatex) {
char verbchar, c;
verbchar = input();
@@ -2607,157 +2600,157 @@ YY_RULE_SETUP
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 339 "detex.l"
+#line 348 "detex.l"
{ LATEX; KILLARGS(2); }
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 340 "detex.l"
+#line 349 "detex.l"
{ LATEX; KILLARGS(2); }
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 341 "detex.l"
+#line 350 "detex.l"
{ LATEX; KILLARGS(3); }
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 343 "detex.l"
+#line 352 "detex.l"
/* ignore def begin */ {BEGIN Define; IGNORE;}
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 344 "detex.l"
+#line 353 "detex.l"
BEGIN Normal;
YY_BREAK
case 91:
/* rule 91 can match eol */
YY_RULE_SETUP
-#line 345 "detex.l"
+#line 354 "detex.l"
NEWLINE;
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 346 "detex.l"
+#line 355 "detex.l"
;
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 348 "detex.l"
+#line 357 "detex.l"
/* formula mode */ {LaBEGIN LaFormula; NOUN;}
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 349 "detex.l"
+#line 358 "detex.l"
BEGIN Normal;
YY_BREAK
case 95:
/* rule 95 can match eol */
YY_RULE_SETUP
-#line 350 "detex.l"
+#line 359 "detex.l"
NEWLINE;
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 351 "detex.l"
+#line 360 "detex.l"
VERBNOUN;
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 352 "detex.l"
+#line 361 "detex.l"
;
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 354 "detex.l"
+#line 363 "detex.l"
/* display mode */ {LaBEGIN LaDisplay; NOUN;}
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 355 "detex.l"
+#line 364 "detex.l"
BEGIN Normal;
YY_BREAK
case 100:
/* rule 100 can match eol */
YY_RULE_SETUP
-#line 356 "detex.l"
+#line 365 "detex.l"
NEWLINE;
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 357 "detex.l"
+#line 366 "detex.l"
VERBNOUN;
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 358 "detex.l"
+#line 367 "detex.l"
;
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 360 "detex.l"
+#line 369 "detex.l"
/* display mode */ {BEGIN Display; NOUN;}
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 361 "detex.l"
+#line 370 "detex.l"
BEGIN Normal;
YY_BREAK
case 105:
/* rule 105 can match eol */
YY_RULE_SETUP
-#line 362 "detex.l"
+#line 371 "detex.l"
NEWLINE;
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 363 "detex.l"
+#line 372 "detex.l"
VERBNOUN;
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 364 "detex.l"
+#line 373 "detex.l"
;
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 366 "detex.l"
+#line 375 "detex.l"
/* math mode */ {BEGIN Math; NOUN;}
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 367 "detex.l"
+#line 376 "detex.l"
BEGIN Normal;
YY_BREAK
case 110:
/* rule 110 can match eol */
YY_RULE_SETUP
-#line 368 "detex.l"
+#line 377 "detex.l"
;
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 369 "detex.l"
+#line 378 "detex.l"
;
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 370 "detex.l"
+#line 379 "detex.l"
VERBNOUN;
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 371 "detex.l"
+#line 380 "detex.l"
;
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 373 "detex.l"
+#line 382 "detex.l"
/* process files */ {LaBEGIN LaInclude; IGNORE;}
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 374 "detex.l"
+#line 383 "detex.l"
{ IncludeFile(yytext);
BEGIN Normal;
}
@@ -2765,27 +2758,27 @@ YY_RULE_SETUP
case 116:
/* rule 116 can match eol */
YY_RULE_SETUP
-#line 377 "detex.l"
+#line 386 "detex.l"
NEWLINE;
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 378 "detex.l"
+#line 387 "detex.l"
;
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 380 "detex.l"
+#line 389 "detex.l"
{BEGIN IncludeOnly; IGNORE;}
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 381 "detex.l"
+#line 390 "detex.l"
AddInclude(yytext);
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 382 "detex.l"
+#line 391 "detex.l"
{ if (csbIncList == 0)
rgsbIncList[csbIncList++] = '\0';
BEGIN Normal;
@@ -2794,22 +2787,22 @@ YY_RULE_SETUP
case 121:
/* rule 121 can match eol */
YY_RULE_SETUP
-#line 386 "detex.l"
+#line 395 "detex.l"
NEWLINE;
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 387 "detex.l"
+#line 396 "detex.l"
;
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 389 "detex.l"
+#line 398 "detex.l"
/* process files */ {LaBEGIN LaSubfile; IGNORE;}
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 390 "detex.l"
+#line 399 "detex.l"
{ IncludeFile(yytext);
BEGIN Normal;
}
@@ -2817,22 +2810,22 @@ YY_RULE_SETUP
case 125:
/* rule 125 can match eol */
YY_RULE_SETUP
-#line 393 "detex.l"
+#line 402 "detex.l"
NEWLINE;
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 394 "detex.l"
+#line 403 "detex.l"
;
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 396 "detex.l"
+#line 405 "detex.l"
{BEGIN Input; IGNORE;}
YY_BREAK
case 128:
YY_RULE_SETUP
-#line 397 "detex.l"
+#line 406 "detex.l"
{ InputFile(yytext);
BEGIN Normal;
}
@@ -2840,61 +2833,61 @@ YY_RULE_SETUP
case 129:
/* rule 129 can match eol */
YY_RULE_SETUP
-#line 400 "detex.l"
+#line 409 "detex.l"
NEWLINE;
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 401 "detex.l"
+#line 410 "detex.l"
;
YY_BREAK
/* escaping commands */
case 131:
YY_RULE_SETUP
-#line 404 "detex.l"
+#line 413 "detex.l"
putchar('/');
YY_BREAK
case 132:
/* rule 132 can match eol */
YY_RULE_SETUP
-#line 406 "detex.l"
+#line 415 "detex.l"
/* handle ligatures */ {(void)printf("%.2s", yytext+1);}
YY_BREAK
case 133:
/* rule 133 can match eol */
YY_RULE_SETUP
-#line 407 "detex.l"
+#line 416 "detex.l"
{(void)printf("%.1s", yytext+1);}
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 408 "detex.l"
+#line 417 "detex.l"
{NEWLINE;} /*BEGIN LaBreak;*/
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 410 "detex.l"
+#line 419 "detex.l"
/* ignore other \cs */ {BEGIN Control; IGNORE;}
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 411 "detex.l"
+#line 420 "detex.l"
SPACE;
YY_BREAK
case 137:
/* rule 137 can match eol */
YY_RULE_SETUP
-#line 412 "detex.l"
+#line 421 "detex.l"
NEWLINE;
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 413 "detex.l"
+#line 422 "detex.l"
IGNORE;
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 414 "detex.l"
+#line 423 "detex.l"
{ if (yytext==NULL || strlen(yytext)==0
|| atoi(yytext)>=0)
NEWLINE;
@@ -2903,85 +2896,85 @@ YY_RULE_SETUP
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 420 "detex.l"
+#line 429 "detex.l"
IGNORE;
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 421 "detex.l"
+#line 430 "detex.l"
IGNORE;
YY_BREAK
case 142:
/* rule 142 can match eol */
YY_RULE_SETUP
-#line 422 "detex.l"
+#line 431 "detex.l"
{BEGIN Normal; /*NEWLINE;*/}
YY_BREAK
case 143:
YY_RULE_SETUP
-#line 423 "detex.l"
+#line 432 "detex.l"
{++currBracesLevel;BEGIN Normal; IGNORE;}
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 424 "detex.l"
+#line 433 "detex.l"
{BEGIN Normal; IGNORE;}
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 425 "detex.l"
+#line 434 "detex.l"
{yyless(0);BEGIN Normal;}
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 427 "detex.l"
+#line 436 "detex.l"
/* special characters */ IGNORE;
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 428 "detex.l"
+#line 437 "detex.l"
IGNORE;
YY_BREAK
case 148:
YY_RULE_SETUP
-#line 429 "detex.l"
+#line 438 "detex.l"
SPACE;
YY_BREAK
case 149:
YY_RULE_SETUP
-#line 430 "detex.l"
+#line 439 "detex.l"
putchar('-');
YY_BREAK
case 150:
YY_RULE_SETUP
-#line 431 "detex.l"
+#line 440 "detex.l"
putchar('"');
YY_BREAK
case 151:
YY_RULE_SETUP
-#line 432 "detex.l"
+#line 441 "detex.l"
putchar('\'');
YY_BREAK
case 152:
YY_RULE_SETUP
-#line 433 "detex.l"
+#line 442 "detex.l"
putchar('"');
YY_BREAK
case 153:
YY_RULE_SETUP
-#line 434 "detex.l"
+#line 443 "detex.l"
putchar('"');
YY_BREAK
/* braces */
case 154:
YY_RULE_SETUP
-#line 437 "detex.l"
+#line 446 "detex.l"
{ ++currBracesLevel;
}
YY_BREAK
case 155:
YY_RULE_SETUP
-#line 439 "detex.l"
+#line 448 "detex.l"
{
--currBracesLevel;
if (currBracesLevel == footnoteLevel) {
@@ -2992,7 +2985,7 @@ YY_RULE_SETUP
YY_BREAK
case 156:
YY_RULE_SETUP
-#line 446 "detex.l"
+#line 455 "detex.l"
{ if (fWord)
(void)printf("%s\n", yytext);
else
@@ -3001,39 +2994,39 @@ YY_RULE_SETUP
YY_BREAK
case 157:
YY_RULE_SETUP
-#line 451 "detex.l"
+#line 460 "detex.l"
if (!fWord) ECHO;
YY_BREAK
case 158:
YY_RULE_SETUP
-#line 452 "detex.l"
+#line 461 "detex.l"
if (!fWord) ECHO;
YY_BREAK
case 159:
/* rule 159 can match eol */
YY_RULE_SETUP
-#line 453 "detex.l"
+#line 462 "detex.l"
if (!fWord) NEWLINE;
YY_BREAK
case 160:
YY_RULE_SETUP
-#line 454 "detex.l"
+#line 463 "detex.l"
if (!fWord) putchar('\t');
YY_BREAK
case 161:
YY_RULE_SETUP
-#line 456 "detex.l"
+#line 465 "detex.l"
{ BEGIN LaOptArg; }
YY_BREAK
case 162:
YY_RULE_SETUP
-#line 457 "detex.l"
+#line 466 "detex.l"
{ cOpenBrace++; }
YY_BREAK
case 163:
/* rule 163 can match eol */
YY_RULE_SETUP
-#line 458 "detex.l"
+#line 467 "detex.l"
{ cOpenBrace--;
if (cOpenBrace == 0)
{
@@ -3044,28 +3037,28 @@ YY_RULE_SETUP
YY_BREAK
case 164:
YY_RULE_SETUP
-#line 465 "detex.l"
+#line 474 "detex.l"
;
YY_BREAK
case 165:
YY_RULE_SETUP
-#line 466 "detex.l"
+#line 475 "detex.l"
BEGIN LaMacro;
YY_BREAK
case 166:
/* rule 166 can match eol */
YY_RULE_SETUP
-#line 467 "detex.l"
+#line 476 "detex.l"
;
YY_BREAK
case 167:
YY_RULE_SETUP
-#line 469 "detex.l"
+#line 478 "detex.l"
{ BEGIN LaOptArg2; }
YY_BREAK
case 168:
YY_RULE_SETUP
-#line 470 "detex.l"
+#line 479 "detex.l"
{ if (cOpenBrace == 0)
{
if (--cArgs==0)
@@ -3079,30 +3072,30 @@ YY_RULE_SETUP
YY_BREAK
case 169:
YY_RULE_SETUP
-#line 480 "detex.l"
+#line 489 "detex.l"
{ cOpenBrace--; }
YY_BREAK
case 170:
YY_RULE_SETUP
-#line 481 "detex.l"
+#line 490 "detex.l"
;
YY_BREAK
case 171:
YY_RULE_SETUP
-#line 482 "detex.l"
+#line 491 "detex.l"
BEGIN LaMacro2;
YY_BREAK
case 172:
YY_RULE_SETUP
-#line 483 "detex.l"
+#line 492 "detex.l"
;
YY_BREAK
case 173:
YY_RULE_SETUP
-#line 484 "detex.l"
+#line 493 "detex.l"
ECHO;
YY_BREAK
-#line 3105 "lex.yy.c"
+#line 3099 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(Define):
case YY_STATE_EOF(Display):
@@ -3202,7 +3195,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
@@ -3334,7 +3327,8 @@ 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. */
@@ -3366,7 +3360,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
@@ -3383,9 +3377,12 @@ static int yy_get_next_buffer (void)
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. */
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,new_size );
+ 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;
@@ -3418,9 +3415,9 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 1361 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
return yy_current_state;
@@ -3446,9 +3443,9 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 1361 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 1360);
return yy_is_jam ? 0 : yy_current_state;
@@ -3456,43 +3453,6 @@ static int yy_get_next_buffer (void)
#ifndef YY_NO_UNPUT
- static void yyunput (int c, char * yy_bp )
-{
- char *yy_cp;
-
- yy_cp = (yy_c_buf_p);
-
- /* undo effects of setting up yytext */
- *yy_cp = (yy_hold_char);
-
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- /* +2 for EOB chars. */
- int number_to_move = (yy_n_chars) + 2;
- char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- char *source =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
-
- while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
- *--dest = *--source;
-
- yy_cp += (int) (dest - source);
- yy_bp += (int) (dest - source);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
-
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
-
- *--yy_cp = (char) c;
-
- (yytext_ptr) = yy_bp;
- (yy_hold_char) = *yy_cp;
- (yy_c_buf_p) = yy_cp;
-}
-
#endif
#ifndef YY_NO_INPUT
@@ -3519,7 +3479,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
- int 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( ) )
@@ -3536,13 +3496,13 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- yyrestart(yyin );
+ yyrestart( yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( ) )
+ if ( yywrap( ) )
return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
@@ -3580,11 +3540,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.
@@ -3612,7 +3572,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
@@ -3640,22 +3600,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;
}
@@ -3674,9 +3634,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.
@@ -3688,7 +3648,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;
@@ -3731,7 +3691,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
@@ -3762,7 +3722,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;
}
@@ -3781,7 +3741,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;
}
}
@@ -3791,7 +3751,7 @@ void yypop_buffer_state (void)
*/
static void yyensure_buffer_stack (void)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
if (!(yy_buffer_stack)) {
@@ -3848,11 +3808,11 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
/* They forgot to leave room for the EOB's. */
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 = NULL;
@@ -3862,7 +3822,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- yy_switch_to_buffer(b );
+ yy_switch_to_buffer( b );
return b;
}
@@ -3875,10 +3835,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,(int) 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
@@ -3888,7 +3848,7 @@ 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, int _yybytes_len )
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
@@ -3897,7 +3857,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
/* Get memory for full buffer, including space for trailing EOB's. */
n = (yy_size_t) (_yybytes_len + 2);
- buf = (char *) yyalloc(n );
+ buf = (char *) yyalloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
@@ -3906,7 +3866,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _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()" );
@@ -3922,9 +3882,9 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
#define YY_EXIT_FAILURE 2
#endif
-static void yynoreturn 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 );
}
@@ -4059,7 +4019,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();
}
@@ -4080,7 +4040,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;
@@ -4090,7 +4050,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 )
@@ -4125,8 +4085,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 484 "detex.l"
-
+#line 493 "detex.l"
/******
@@ -4211,6 +4170,9 @@ main(int cArgs, char *rgsbArgs[])
case CHREPLACE:
fReplace = 1;
break;
+ case CHVERSIONOPT:
+ VersionExit();
+ break;
default:
sbBadOpt[0] = *pch;
sbBadOpt[1] = '\0';
@@ -4270,8 +4232,8 @@ yywrap(void)
#ifdef FLEX_SCANNER
/* Pop context state */
if (csb > 0) {
- 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) {
@@ -4368,7 +4330,7 @@ InputFile(char *sbFile)
}
#ifdef FLEX_SCANNER
rgsb[csb++] = YY_CURRENT_BUFFER;
- 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 */
}
@@ -4394,7 +4356,7 @@ IncludeFile(char *sbFile)
}
#ifdef FLEX_SCANNER
rgsb[csb++] = YY_CURRENT_BUFFER;
- 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 */
}
@@ -4624,7 +4586,7 @@ ErrorExit(const char *sb1)
}
/******
-** UsageExit -- print OS/2 usage message and exit.
+** UsageExit -- print usage message and exit.
******/
void
@@ -4639,7 +4601,20 @@ UsageExit(void)
-r replace math with \"noun\" and \"noun verbs noun\" to preserve grammar\n \
-s replace control sequences with space\n \
-t force tex mode\n \
--w word only output");
+-w word only output\n \
+-v show program version and exit");
+ exit(0);
+}
+
+/******
+** VersionExit -- print version and exit.
+******/
+
+void
+VersionExit(void)
+{
+ (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 1067f9520ce..7d206a372b0 100644
--- a/Build/source/texk/detex/detex-src/detex.h
+++ b/Build/source/texk/detex/detex-src/detex.h
@@ -81,5 +81,6 @@
#define CHTEXOPT 't'
#define CHWORDOPT 'w'
#define CHREPLACE 'r'
+#define CHVERSIONOPT 'v'
#define my_ERROR -1
diff --git a/Build/source/texk/detex/detex-src/detex.l b/Build/source/texk/detex/detex-src/detex.l
index 6213342a439..4b638f930cc 100644
--- a/Build/source/texk/detex/detex-src/detex.l
+++ b/Build/source/texk/detex/detex-src/detex.l
@@ -1,4 +1,5 @@
%option never-interactive
+%option nounput
%top{
/*
@@ -70,10 +71,16 @@
#include <strings.h>
#define strrchr rindex
#endif
-#ifndef MAXPATHLEN
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#else
#include <sys/param.h>
-#endif
+#ifndef PATH_MAX /* for old BSD */
#define PATH_MAX MAXPATHLEN
+#endif
+#endif /* HAVE_LIMITS_H */
+
#ifdef OS2
#include <stdlib.h>
#endif
@@ -105,6 +112,7 @@
void AddInclude(char *sbFile);
void ErrorExit(const char *sb1);
void UsageExit(void);
+void VersionExit(void);
void IncludeFile(char *sbFile);
void InputFile(char *sbFile);
void SetEnvIgnore(const char *sbEnvList);
@@ -566,6 +574,9 @@ main(int cArgs, char *rgsbArgs[])
case CHREPLACE:
fReplace = 1;
break;
+ case CHVERSIONOPT:
+ VersionExit();
+ break;
default:
sbBadOpt[0] = *pch;
sbBadOpt[1] = '\0';
@@ -979,7 +990,7 @@ ErrorExit(const char *sb1)
}
/******
-** UsageExit -- print OS/2 usage message and exit.
+** UsageExit -- print usage message and exit.
******/
void
@@ -994,6 +1005,19 @@ UsageExit(void)
-r replace math with \"noun\" and \"noun verbs noun\" to preserve grammar\n \
-s replace control sequences with space\n \
-t force tex mode\n \
--w word only output");
+-w word only output\n \
+-v show program version and exit");
+ exit(0);
+}
+
+/******
+** VersionExit -- print version and exit.
+******/
+
+void
+VersionExit(void)
+{
+ (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 2b79521a208..a6f63ff6347 100644
--- a/Build/source/texk/detex/detex-src/detex.man
+++ b/Build/source/texk/detex/detex-src/detex.man
@@ -1,4 +1,4 @@
-.TH DETEX 1L "12 August 1993" "Purdue University"
+.TH DETEX 1 "12 August 1993" "Purdue University"
.SH NAME
detex \- a filter to strip \fITeX\fP commands from a .tex file.
.SH SYNOPSIS
@@ -109,7 +109,7 @@ The old functionality can be essentially duplicated by using the
.B \-s
option.
.SH SEE ALSO
-tex(1L)
+tex(1)
.SH DIAGNOSTICS
Nesting of \\input is allowed but the number of opened files must not
exceed the system's limit on the number of simultaneously opened files.