--- /dev/null
+.indent.pro
+ABOUT-NLS
+ChangeLog
+INSTALL
+Makefile.am
+Makefile.in
+NEWS
+ONEWS
+README
+README-alpha
+README.cvs
+THANKS
+TODO
+aclocal.m4
+conf.in
+config.guess
+config.rpath
+config.sub
+configure
+configure.in
+doc/Makefile.am
+doc/Makefile.in
+doc/flex.info
+doc/flex.info-1
+doc/flex.info-2
+doc/flex.pdf
+doc/flex.texi
+doc/mdate-sh
+doc/stamp-vti
+doc/texinfo.tex
+doc/version.texi
+examples/
+install-sh
+lib/
+m4/
+mkinstalldirs
+po/
+tests/
+tools/
--- /dev/null
+FLEX 2.5.37
+===========
+
+Original source can be downloaded from:
+http://flex.sourceforge.net
+
+file = flex-2.5.37.tar.bz2
+date = 03 August 2012
+size = 1303313
+sha1 = db4b140f2aff34c6197cab919828cc4146aae218
+
+A list of files and directories removed is in README.DELETED
+
+Local modifications applied to following files:
+ doc/flex.1 (fix bad version number)
+ flexdef.h (add lerrs_fatal prototype)
+ scanflags.c (fix sf_init call to lerrs_fatal)
+ main.c (fix ambiguous if-else)
+ buf.c (fix discard const char qualifier)
+ filter.c (fix declaring unused variables)
\ No newline at end of file
struct Buf *buf_linedir (struct Buf *buf, const char* filename, int lineno)
{
char *dst, *src, *t;
+ char *dupe;
+ dupe = flex_alloc (strlen(filename) + 1);
+ strncpy(dupe, filename, strlen(filename));
t = flex_alloc (strlen ("#line \"\"\n") + /* constant parts */
2 * strlen (filename) + /* filename with possibly all backslashes escaped */
(int) (1 + log10 (abs (lineno))) + /* line number */
1); /* NUL */
if (!t)
flexfatal (_("Allocation of buffer for line directive failed"));
- for (dst = t + sprintf (t, "#line %d \"", lineno), src = filename; *src; *dst++ = *src++)
+ for (dst = t + sprintf (t, "#line %d \"", lineno), src = dupe; *src; *dst++ = *src++)
if (*src == '\\') /* escape backslashes */
*dst++ = '\\';
*dst++ = '"';
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
-.TH FLEX "1" "July 2012" "flex 2.5.36" "User Commands"
+.TH FLEX "1" "August 2012" "flex 2.5.37" "User Commands"
.SH NAME
flex \- the fast lexical analyser generator
.SH SYNOPSIS
bool filter_apply_chain (struct filter * chain)
{
int pid, pipes[2];
- int r;
- const int readsz = 512;
- char *buf;
/* Tricky recursion, since we want to begin the chain
/* Report an error message formatted with one string argument. */
extern void lerrsf PROTO ((const char *, const char *));
+/* Like lerrsf, but also exit after displaying message. */
+extern void lerrsf_fatal PROTO ((const char *, const char *));
+
/* Spit out a "#line" statement. */
extern void line_directive_out PROTO ((FILE *, int));
}
if (!do_yywrap) {
- if (!C_plus_plus)
+ if (!C_plus_plus) {
if (reentrant)
outn ("\n#define yywrap(yyscanner) 1");
else
outn ("\n#define yywrap() 1");
+ }
outn ("#define YY_SKIP_YYWRAP");
}
void
sf_init (void)
{
+ char membytes[21];
assert(_sf_stk == NULL);
_sf_stk = (scanflags_t*) flex_alloc ( sizeof(scanflags_t) * (_sf_max = 32));
- if (!_sf_stk)
- lerrsf_fatal(_("Unable to allocate %ld of stack"),
- (long)sizeof(scanflags_t));
+ if (!_sf_stk) {
+ snprintf(membytes, 20, "%ld", (long)sizeof(scanflags_t));
+ lerrsf_fatal(_("Unable to allocate %s of stack"), membytes);
+ }
_sf_stk[_sf_top_ix] = 0;
}