]> granicus.if.org Git - flex/log
flex
7 years agobuild: fix Makefile parse.h dependency clauses.
Explorer09 [Sun, 1 Jan 2017 07:41:29 +0000 (15:41 +0800)]
build: fix Makefile parse.h dependency clauses.

The current clauses stating "main.c: parse.h" and "yylex.c: parse.h" do
not work as expected. Make did not try to build parse.h upon building
flex-main.o as it would think main.c exist already and ignore the
clause. Fix this by explicitly stating that the .o files depend on
parse.h instead.

This dependency bug only happens if user builds flex from a
checked-out repository.

7 years agotest: Remake *_scanner.c if *_scanner.h is missing.
Explorer09 [Tue, 3 Jan 2017 12:42:49 +0000 (20:42 +0800)]
test: Remake *_scanner.c if *_scanner.h is missing.

If a ${foo}_scanner.c exists but the respective ${foo}_scanner.h is
missing, then 'make' can halt. Fix this by deleting the
${foo}_scanner.c file and then remake it. This rule is the same as the
automake-generated rule for .c files that require LEX or YACC (except
automake will use ylwrap).

7 years agotest: remove BUILT_SOURCES; add missing dependencies.
Explorer09 [Sat, 31 Dec 2016 07:12:29 +0000 (15:12 +0800)]
test: remove BUILT_SOURCES; add missing dependencies.

Without BUILT_SOURCES in Makefile, no test sources in tests/ will be
built when using the default "make all" target. This is desireable for
people who are just building flex but who do not want to run, and
therefore, build any part of the test suite.

Also fix missing sources dependencies:

    bison_nr_scanner.$(OBJEXT): bison_nr_parser.h
    bison_yylloc_scanner.$(OBJEXT): bison_yylloc_parser.h
    bison_yylval_scanner.$(OBJEXT): bison_yylval_parser.h

7 years agobuild: detect overflow for [re]allocate_array.
Explorer09 [Thu, 19 Jan 2017 08:04:13 +0000 (16:04 +0800)]
build: detect overflow for [re]allocate_array.

Use reallocarray() when we have it (i.e. in OpenBSD system). When we
don't, use equivalent overflow detection for our allocate_array and
reallocate_array functions.

Remove lib/reallocarray.c from our LIBOBJS as we no longer need it.

Provide a fallback SIZE_MAX macro definition in flexint.h (not
preprocessor friendly, but enough for our reallocate_array use case).

7 years agodoc: v2.6.4
Will Estes [Mon, 23 Jan 2017 19:25:11 +0000 (14:25 -0500)]
doc: v2.6.4

7 years agobuild: more BSD make and vpath build fixes.
Thomas Klausner [Mon, 23 Jan 2017 07:46:48 +0000 (08:46 +0100)]
build: more BSD make and vpath build fixes.

BSD make doesn't like $< with more than one source
specified. Additionally, make sure to specify srcdir when referring to
source files since vpath builds depend on this.

7 years agobuild: Fix skel.c generation with BSD make
Thomas Klausner [Sun, 22 Jan 2017 17:41:52 +0000 (18:41 +0100)]
build: Fix skel.c generation with BSD make

7 years agoAdd more defines in the non-reentrant part.
Christos Zoulas [Sun, 22 Jan 2017 17:34:30 +0000 (18:34 +0100)]
Add more defines in the non-reentrant part.

Fix the reentrant part; don't "#define yyfoo yyfoo" because it breaks
code that does #ifndef yywrap ..

7 years agoscanner: Add yyparse prototype
Christos Zoulas [Sun, 22 Jan 2017 17:33:58 +0000 (18:33 +0100)]
scanner: Add yyparse prototype

7 years agoscanner: move comment for consistency
Thomas Klausner [Sun, 22 Jan 2017 17:32:46 +0000 (18:32 +0100)]
scanner: move comment for consistency

7 years agoscanner: Use array instead of pointer
Christos Zoulas [Sun, 22 Jan 2017 17:30:51 +0000 (18:30 +0100)]
scanner: Use array instead of pointer

7 years agoscanner: manage path to m4 better.
Christos Zoulas [Sun, 22 Jan 2017 17:28:46 +0000 (18:28 +0100)]
scanner: manage path to m4 better.

Avoid alloca() for SSP; it is better anyway; since we don't need to
strdup the path.

7 years agoscanner: Avoid creating unused label
Christos Zoulas [Sun, 22 Jan 2017 17:28:08 +0000 (18:28 +0100)]
scanner: Avoid creating unused label

7 years agoCast argument to avoid arithmetic on void *.
Christos Zoulas [Sun, 22 Jan 2017 17:25:07 +0000 (18:25 +0100)]
Cast argument to avoid arithmetic on void *.

7 years agoscanner: Use strncpy
Christos Zoulas [Sun, 22 Jan 2017 17:22:26 +0000 (18:22 +0100)]
scanner: Use strncpy

7 years agoscanner: Use prefix when defining yywrap to avoid redefinition.
Christos Zoulas [Sun, 22 Jan 2017 17:20:44 +0000 (18:20 +0100)]
scanner: Use prefix when defining yywrap to avoid redefinition.

Fixes regression introduced in v2.6.3.

7 years agoscanner: Include stdarg.h for va_list
Christos Zoulas [Sun, 22 Jan 2017 17:23:40 +0000 (18:23 +0100)]
scanner: Include stdarg.h for va_list

7 years agoscanner: Rename warn to lwarn.
Christos Zoulas [Sun, 22 Jan 2017 17:18:47 +0000 (18:18 +0100)]
scanner: Rename warn to lwarn.

This avoids a naming conflict in NetBSD's  libc.

7 years agotest: document automake convention for skipped exit status.
Explorer09 [Sun, 1 Jan 2017 13:49:07 +0000 (21:49 +0800)]
test: document automake convention for skipped exit status.

7 years agotest: let testwrapper scripts be run by ${SHELL}.
Explorer09 [Tue, 3 Jan 2017 13:00:15 +0000 (21:00 +0800)]
test: let testwrapper scripts be run by ${SHELL}.

This allows user to use a different shell if /bin/sh has problems.
The use of $SHELL (variable) to run scripts is already an Automake
convention. All shell scripts in build-aux are run by $SHELL.

7 years agotest: Remove test scripts bashisms.
Explorer09 [Mon, 2 Jan 2017 01:03:12 +0000 (09:03 +0800)]
test: Remove test scripts bashisms.

They now all work under a POSIX compliant sh. Specifically, 'dash' can
now be used for running "make check" tests.

Note that none of these scripts has ever been using a pipe, so
`set -o pipefail` is unnecessary and removed.

7 years agotest: exit on '-1' test non-zero status.
Explorer09 [Sun, 1 Jan 2017 16:43:50 +0000 (00:43 +0800)]
test: exit on '-1' test non-zero status.

If a '-1' test program returns a non-zero status, don't go further and
compare it's (numeric) output values. This allows a '-1' test to
indicate a "skip" status or an otherwise error. (Currently no such '-1'
test would skip like this, though.)

Shell syntax note: `set -e` will not exit with the syntax like this
`test $(false) = $(false);`. The exit statuses of `false` in the
example will be ignored instead. But putting the output in a variable,
such as `VAR=$(false)`, DOES exit.

7 years agobuild: Fix 'make indent' target
Explorer09 [Sun, 1 Jan 2017 16:38:37 +0000 (00:38 +0800)]
build: Fix 'make indent' target

This 'make indent' target has not been working since the directories
reorganization in flex 2.6.0. Now make it work again.

Note that the current indent profile breaks many styles of existing
code. The indent target should not be used until the .indent.pro
options are reviewed for desireability.

7 years agobuild: Simplify indent program detection
Explorer09 [Sun, 1 Jan 2017 04:37:37 +0000 (12:37 +0800)]
build: Simplify indent program detection

7 years agofilter: Don't emit #line if %option noline set
Tobias Klauser [Thu, 12 Jan 2017 09:49:32 +0000 (10:49 +0100)]
filter: Don't emit #line if %option noline set

One place emitting a #line directive to the generated header was
missed in commit 647a92b9f4 when resolving #55. Fix it to respect
gen_line_dirs as well.

7 years agotranslation: refresh po files from translation project
Will Estes [Thu, 12 Jan 2017 18:22:02 +0000 (13:22 -0500)]
translation: refresh po files from translation project

7 years agoc++: Fix yyrestart(NULL) SEGV.
Harald van Dijk [Tue, 10 Jan 2017 21:37:49 +0000 (22:37 +0100)]
c++: Fix yyrestart(NULL) SEGV.

Binding a reference to a dereferenced null pointer is invalid and
compilers optimise away the &file == 0 check. We need a real stream.

yyin is available already, and yyrestart(NULL) is only supported when
yyin will not be used, so there is no harm in just passing in that.
Since we now always have a valid stream, we can skip the null check
too.

Fixes #98.

7 years agoscanner: join symbol list.
luistung [Mon, 9 Jan 2017 12:18:41 +0000 (20:18 +0800)]
scanner: join symbol list.

Removed a newline that caused a problem building the scanner in some
circumstances. Specifically:

'bad character' error  when executing

/bin/sh ../build-aux/ylwrap scan.l lex.yy.c scan.c -- flex

7 years agoscanner: remove void cast before fprintf
Will Estes [Wed, 11 Jan 2017 14:05:18 +0000 (09:05 -0500)]
scanner: remove void cast before fprintf

7 years agodoc: update NEWS for 2.6.3 release v2.6.3
Will Estes [Fri, 30 Dec 2016 17:48:24 +0000 (12:48 -0500)]
doc: update NEWS for 2.6.3 release

7 years agobuild: New configure option '--disable-bootstrap'.
Explorer09 [Sat, 26 Nov 2016 15:47:12 +0000 (23:47 +0800)]
build: New configure option '--disable-bootstrap'.

If configure is run with '--disable-bootstrap', then stage1flex won't
be built and stage1scan.c will be generated by sed'ing scan.c.

This option is intended to workaround bootstrap bugs rather than to
fix the bootstrapping issues which are proving subtler and harder to
fix than anyone would like.

7 years agobuild: "make clean" deletes stage1scan.c, stage1flex
Explorer09 [Sat, 26 Nov 2016 15:03:24 +0000 (23:03 +0800)]
build: "make clean" deletes stage1scan.c, stage1flex

7 years agobuild: allow building libfl even with --disable-libfl.
Explorer09 [Sat, 26 Nov 2016 09:21:25 +0000 (17:21 +0800)]
build: allow building libfl even with --disable-libfl.

For various reasons, we may wish to build libfl explicitly even when
configure has been run with the --disable-libfl option. This is
possible, now, via 'make -C src libfl.la'.

7 years agoscanner: remove trailing whitespace in skeleton
Alexis La Goutte [Mon, 19 Dec 2016 08:31:18 +0000 (09:31 +0100)]
scanner: remove trailing whitespace in skeleton

7 years agoscanner: Disallow, overquote '[' and ']' in prefix
Demi Obenour [Thu, 1 Dec 2016 23:13:51 +0000 (18:13 -0500)]
scanner: Disallow, overquote '[' and ']' in prefix

7 years agoscanner: allocate correct buffer size for m4 path.
Samuel Thibault [Thu, 29 Dec 2016 13:44:22 +0000 (08:44 -0500)]
scanner: allocate correct buffer size for m4 path.

Flex did not check the length of the m4 path which could lead to a
buffer overflow in some cases. Additionally, not all platforms believe
in PATH_MAX, so stop relying on it.

Fixes #138

7 years agodoc: note no more libcompat in NEWS
Will Estes [Thu, 24 Nov 2016 23:43:24 +0000 (18:43 -0500)]
doc: note no more libcompat in NEWS

7 years agobuild: explain empty lib/Makefile.am
Will Estes [Thu, 24 Nov 2016 23:35:50 +0000 (18:35 -0500)]
build: explain empty lib/Makefile.am

7 years agobuild: warn about cross compiling with *alloc
Explorer09 [Sun, 20 Nov 2016 02:19:36 +0000 (10:19 +0800)]
build: warn about cross compiling with *alloc

7 years agobuild: Link $(LIBOBJS) from src/ dir, remove libcompat.la.
Explorer09 [Fri, 18 Nov 2016 18:37:04 +0000 (02:37 +0800)]
build: Link $(LIBOBJS) from src/ dir, remove libcompat.la.

The libcompat.la library was small and less friendly to bootstrapping
and cross compilation. Now, we will simply link individual object
files as needed, which is simpler.

7 years agobuild: Let stage1flex respect LFLAGS
Explorer09 [Wed, 16 Nov 2016 00:17:05 +0000 (08:17 +0800)]
build: Let stage1flex respect LFLAGS

7 years agodoc: describe --disable-libfl in NEWS
Will Estes [Mon, 14 Nov 2016 19:26:48 +0000 (14:26 -0500)]
doc: describe --disable-libfl in NEWS

7 years agobuild: Add --disable-libfl configure option.
Explorer09 [Mon, 31 Oct 2016 13:15:41 +0000 (21:15 +0800)]
build: Add --disable-libfl configure option.

Disabling libfl is useful when building flex for a cross-toolchain.

Fixes: GH-99
7 years agofix backwards incompatible changes in 2.6.2.
Demi Obenour [Wed, 9 Nov 2016 16:38:32 +0000 (11:38 -0500)]
fix backwards incompatible changes in 2.6.2.

This patch addscompatibility `#defines` for all macros affected by
`%prefix`.

Fixes #113.

7 years agogit: ignore quote_in_comment artifacts
Will Estes [Tue, 8 Nov 2016 17:53:21 +0000 (12:53 -0500)]
git: ignore quote_in_comment artifacts

7 years agoFixes a major bug in Flex's own lexing of literals.
Demi Obenour [Tue, 8 Nov 2016 15:05:49 +0000 (10:05 -0500)]
Fixes a major bug in Flex's own lexing of literals.

My changes caused Flex to mishandle string and character literals in
line comments.  This commit fixes them.

Fixes #113.

7 years agoFix unportable test(1) operator.
Thomas Klausner [Sun, 6 Nov 2016 21:32:43 +0000 (22:32 +0100)]
Fix unportable test(1) operator.

"==" is only supported by bash, "=" is the standard comparison
operator.

7 years agoAdd more escaping tests
Demi Obenour [Wed, 2 Nov 2016 17:22:02 +0000 (13:22 -0400)]
Add more escaping tests

7 years agoFix another escaping bug
Demi Obenour [Wed, 2 Nov 2016 00:20:46 +0000 (20:20 -0400)]
Fix another escaping bug

in non-indented verbatim section 2 code.

I also did some reformatting.

7 years agobuild: fix false negatives for help2man and texi2dvi
Alastair Hughes [Thu, 27 Oct 2016 22:19:31 +0000 (11:19 +1300)]
build: fix false negatives for help2man and texi2dvi

HELP2MAN and TEXI2DVI (or the corresponding ac_prog variables) will
never be zero length as they fall back to the missing script; check for
the fall back and warn on that instead of always warning.

7 years agodoc: Don't delete flex.1 during "make distclean".
Explorer09 [Fri, 28 Oct 2016 00:37:49 +0000 (08:37 +0800)]
doc: Don't delete flex.1 during "make distclean".

flex.1 is pre-generated in release tarball. If we delete it, the next
"configure and make" on the source directory will then require help2man
unnecessarily.

7 years agoOnly regenerate the man page when required.
Alastair Hughes [Thu, 27 Oct 2016 03:48:49 +0000 (16:48 +1300)]
Only regenerate the man page when required.

Make the flex binary an order-only prerequisite, and add back the
prerequisites from before 7cfb440. This prevents rebuilding the man page
whenever the flex binary is rebuilt, which causes problems if help2man
is not installed and will never work when cross compiling.

Fixes #108.

7 years agobuild: no longer build PIC version of libfl.
Will Estes [Wed, 26 Oct 2016 15:14:13 +0000 (11:14 -0400)]
build: no longer build PIC version of libfl.

The PIC version of libfl was not being built correctly. From the lack
of bug reports around this problem, we conclude that the PIC version
of libfl is not used and so we drop it from the build build targets
for flex.

7 years agodoc: README.md formatting fixes
Explorer09 [Tue, 25 Oct 2016 13:23:37 +0000 (21:23 +0800)]
doc: README.md formatting fixes

* Wrap everything in the raw document in 72 char per line limit.
* Proper casing for terms "Git" and "GitHub" (don't try to look lazy).
* Add unordered list marks when needed.
* Say `configure && make && make install` and quoted for fixed-width
  font.

Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
7 years agobuild: version 2.6.3 begins
Will Estes [Tue, 25 Oct 2016 13:53:50 +0000 (09:53 -0400)]
build: version 2.6.3 begins

7 years agodoc: mark 2.6.2 release date v2.6.2
Will Estes [Mon, 24 Oct 2016 22:29:36 +0000 (18:29 -0400)]
doc: mark 2.6.2 release date

7 years agobuild: switch xz to lzip
Will Estes [Mon, 24 Oct 2016 22:26:22 +0000 (18:26 -0400)]
build: switch xz to lzip

7 years agoFix M4 quotation in section 2 prologue and refactor duplicated code
Demi Obenour [Thu, 20 Oct 2016 19:55:47 +0000 (15:55 -0400)]
Fix M4 quotation in section 2 prologue and refactor duplicated code

7 years agoUpdate flex.texi: Removed repedative wording
Alex Kennedy [Sat, 22 Oct 2016 03:42:36 +0000 (20:42 -0700)]
Update flex.texi: Removed repedative wording

"Flex used to" was written twice at the beginning of Chapter 9, paragraph 2.

7 years agoImproved M4 quotation
Demi Obenour [Tue, 27 Sep 2016 14:54:16 +0000 (10:54 -0400)]
Improved M4 quotation

This fixes M4 quotation of certain strings beginning with `yy` (in
section 3 of the input file only) and character literals.  The new
quotation method is also less brittle and faster.

Tests that relied on the old behavior were fixed.

Also, `yyconst` is no longer defined; use `const` (which it
unconditionally was defined to) instead.

7 years agobuild: for automake, flex is foreign
Will Estes [Wed, 19 Oct 2016 21:00:50 +0000 (17:00 -0400)]
build: for automake, flex is foreign

7 years agodoc: mv README to README.md
Will Estes [Wed, 19 Oct 2016 14:27:23 +0000 (10:27 -0400)]
doc: mv README to README.md

7 years agodoc: touch up README
Will Estes [Wed, 19 Oct 2016 14:26:44 +0000 (10:26 -0400)]
doc: touch up README

7 years agodoc: README no longer mentions sourceforge
Will Estes [Wed, 19 Oct 2016 09:25:36 +0000 (05:25 -0400)]
doc: README no longer mentions sourceforge

7 years agodoc: update NEWS with more post-2.6.1 additions
Will Estes [Thu, 6 Oct 2016 20:39:04 +0000 (16:39 -0400)]
doc: update NEWS with more post-2.6.1 additions

7 years agoFix M4 quoting of section 3.
Demi Obenour [Tue, 27 Sep 2016 14:54:16 +0000 (10:54 -0400)]
Fix M4 quoting of section 3.

This fixes M4 quoting of section 3 of the input file, including escape
sequences and character constants.

Tests were added to verify the behavior in section 3 with respect to
quoting. Both escaping of quotes and quoting of potential macro-start
characters are tested. Existing tests were also fixed to account for the new -- and now correct -- behavior. Many tests relied on the old behavior of expanding M4 macros
in section 3.  They needed to be updated for the new behavior.

7 years agoFix yyrestart(NULL) SEGV.
Mightyjo [Tue, 4 Oct 2016 02:50:00 +0000 (22:50 -0400)]
Fix yyrestart(NULL) SEGV.

8 years agoscanner: M4 quoting fixes
Demi Obenour [Tue, 6 Sep 2016 00:43:32 +0000 (20:43 -0400)]
scanner: M4 quoting fixes

8 years agoSupport `make indent` for out of source builds
Demi Obenour [Tue, 6 Sep 2016 00:43:14 +0000 (20:43 -0400)]
Support `make indent` for out of source builds

8 years agoSimplify some shell code
Demi Obenour [Sun, 25 Sep 2016 03:35:07 +0000 (23:35 -0400)]
Simplify some shell code

8 years agono longer generate K&R C scanners
Demi Obenour [Fri, 23 Sep 2016 15:28:56 +0000 (11:28 -0400)]
no longer generate K&R C scanners

8 years agoFix escaping of `[[` and `]]` in strings
Demi Obenour [Sun, 4 Sep 2016 22:27:36 +0000 (18:27 -0400)]
Fix escaping of `[[` and `]]` in strings

Previously, `[[` and `]]` were not escaped in strings, which led
to bad interactions with m4.

Also, don't break strings on newline, as GCC et al support whitespace
between a backslash and the subsequent newline.

8 years agonew sv translation
Translation Project [Mon, 20 Jun 2016 13:17:57 +0000 (09:17 -0400)]
new sv translation

8 years agoDelete action_m4_define from misc.c
Demetri Obenour [Mon, 23 May 2016 21:36:33 +0000 (17:36 -0400)]
Delete action_m4_define from misc.c

This function was not used and always triggered a fatal error when run.

8 years agotest: run direct tests from srcdir
Will Estes [Fri, 20 May 2016 21:25:10 +0000 (17:25 -0400)]
test: run direct tests from srcdir

8 years agoExited with error code on some conditions in include tests
Egor Pugin [Mon, 11 Jan 2016 12:36:11 +0000 (07:36 -0500)]
Exited with error code on some conditions in include tests

8 years agotest: drop .exe when making input file names
Will Estes [Fri, 20 May 2016 18:16:14 +0000 (14:16 -0400)]
test: drop .exe when making input file names

8 years agotest: removed dependencies for include tests
Will Estes [Fri, 20 May 2016 16:53:53 +0000 (12:53 -0400)]
test: removed dependencies for include tests

8 years agoAvoid realloc on every call of sf_push()
Tobias Klauser [Thu, 28 Apr 2016 08:12:52 +0000 (10:12 +0200)]
Avoid realloc on every call of sf_push()

Currently, every call to sf_push() realloc()'s _sf_stack, even if the
maximum size _sf_max wasn't changed. As the indentation beneath the
"if" clause already indicates, the realloc() should only be executed
if _sf_max was increased.

Found by compiling flex with the -Wmisleading-indentation flags of gcc,
which leads to the following warning:

scanflags.c: In function ‘sf_push’:
scanflags.c:42:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
     if (_sf_top_ix + 1 >= _sf_max)
     ^~
scanflags.c:44:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
         _sf_stk = realloc(_sf_stk, sizeof(scanflags_t) * _sf_max);
         ^~~~~~~

8 years agobuild: prettified command to build man page
Will Estes [Thu, 31 Mar 2016 22:47:00 +0000 (18:47 -0400)]
build: prettified command to build man page

8 years agobuild: added man page to DISTCLEANFILES
Will Estes [Thu, 31 Mar 2016 22:46:23 +0000 (18:46 -0400)]
build: added man page to DISTCLEANFILES

8 years agoremove unused TODO, BUGS files
Will Estes [Thu, 31 Mar 2016 20:09:28 +0000 (16:09 -0400)]
remove unused TODO, BUGS files

8 years agoremoved to.do/ directory
Will Estes [Thu, 31 Mar 2016 19:58:16 +0000 (15:58 -0400)]
removed to.do/ directory

8 years agogettext: removed flex.skl from POTFILES.in file list
Will Estes [Thu, 31 Mar 2016 17:36:09 +0000 (13:36 -0400)]
gettext: removed flex.skl from POTFILES.in file list

8 years agofix skel.c dependency (missing tables_shared.c) and
rlar [Thu, 31 Mar 2016 15:19:20 +0000 (11:19 -0400)]
fix skel.c dependency (missing tables_shared.c) and
 polish build rule

Also remove references to srcdir since skel.c is no longer mentioned in po/POTFILES.in.

8 years agofix flex.1 dependency
rlar [Thu, 31 Mar 2016 13:35:55 +0000 (15:35 +0200)]
fix flex.1 dependency

git clean -fdx && ./autogen.sh && \
  mkdir -p ../build && cd ../build && ../flex/configure && make -j10 && \
  make dist

failed with:

>  help2man: can't get `--help' info from ../../flex/src/flex

Note:
  There is no dependency except for the flex binary.

8 years agofix stage1scan.c and stage1scan.l dependency
rlar [Thu, 31 Mar 2016 13:21:48 +0000 (15:21 +0200)]
fix stage1scan.c and stage1scan.l dependency

git clean -fdx && ./autogen.sh && \
  mkdir -p ../build && cd ../build && ../flex/configure && make -j10

failed with:

> ../src/stage1flex -o stage1scan.c stage1scan.l
> stage1flex: can't open stage1scan.l

Note:
  stage1scan.c is not necessairy in the "make dist" generated tar.gz file.
  stage1flex will be build from scan.c (which is distributed),
    and this will then generate stage1scan.c from scan.l

8 years agogettext: list src/flex.skl in po/POTFILES.in
Will Estes [Thu, 31 Mar 2016 14:21:56 +0000 (10:21 -0400)]
gettext: list src/flex.skl in po/POTFILES.in

8 years agowarning in generated code, with -Ca
rlar [Tue, 29 Mar 2016 17:27:54 +0000 (19:27 +0200)]
warning in generated code, with -Ca

warning: conversion to 'yy_state_type' from 'flex_uint32_t' may change the sign of the result [-Wsign-conversion]

8 years agosuppress `WARNINGFLAGS' for the almost obsolete `noansi' test cases
rlar [Tue, 29 Mar 2016 12:00:00 +0000 (14:00 +0200)]
suppress `WARNINGFLAGS' for the almost obsolete `noansi' test cases

8 years agoconfigure option `--enable-warnings' and `WARNINGFLAGS'
rlar [Tue, 29 Mar 2016 11:59:39 +0000 (13:59 +0200)]
configure option `--enable-warnings' and `WARNINGFLAGS'

`WARNINGFLAGS' can be passed when invoking `configure'
 and when invoking `make'

if configure switch `--enable-warnings' was given
  then default to something useful if we have `GCC'

`WARNINGFLAGS' is not used when compiling `stage1flex'
  to avoid unnecessary clutter

8 years agoFix potential buffer overflow in strncat()
Tobias Klauser [Thu, 31 Mar 2016 08:09:57 +0000 (10:09 +0200)]
Fix potential buffer overflow in strncat()

When using clang/llvm 3.8 to compile flex, the following warning is
emitted:

main.c:378:27: warning: the value of the size argument in 'strncat' is too large, might lead to a buffer overflow [-Wstrncat-size]
                                        strncat(m4_path, m4, sizeof(m4_path));
                                                             ^~~~~~~~~~~~~~~
main.c:378:27: note: change the argument to be the free space in the destination buffer minus the terminating null byte
                                        strncat(m4_path, m4, sizeof(m4_path));
                                                             ^~~~~~~~~~~~~~~
                                                             sizeof(m4_path) - strlen(m4_path) - 1

Fix it up by using the solution proposed by the warning message.

8 years agobuild: simplified dependency tracking so parallel make runs succeed
Robert.Larice Robert Larice [Tue, 29 Mar 2016 19:19:00 +0000 (15:19 -0400)]
build: simplified dependency tracking so parallel make runs succeed

8 years agoavoid warning in generated code, with -Cf
rlar [Sun, 20 Mar 2016 19:13:42 +0000 (20:13 +0100)]
avoid warning in generated code, with -Cf

warning: conversion to 'unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]

8 years agomention v2.6.2; summarize changes since 2.6.1
Will Estes [Fri, 18 Mar 2016 19:25:10 +0000 (15:25 -0400)]
mention v2.6.2; summarize changes since 2.6.1

8 years agodoc: corrected example in manual, gh#67
Will Estes [Fri, 18 Mar 2016 19:09:44 +0000 (15:09 -0400)]
doc: corrected example in manual, gh#67

8 years agowarning: conversion to 'size_t' from 'int' may change the sign of the result [-Wsign...
rlar [Wed, 16 Mar 2016 18:47:44 +0000 (19:47 +0100)]
warning: conversion to 'size_t' from 'int' may change the sign of the result [-Wsign-conversion]

8 years agowarning: conversion to 'long unsigned int' from 'int' may change the sign of the...
rlar [Wed, 16 Mar 2016 18:46:14 +0000 (19:46 +0100)]
warning: conversion to 'long unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]

8 years agowarning: conversion to 'flex_uint32_t' from 'long unsigned int' may alter its value...
rlar [Wed, 16 Mar 2016 18:45:56 +0000 (19:45 +0100)]
warning: conversion to 'flex_uint32_t' from 'long unsigned int' may alter its value [-Wconversion]

struct yytbl_reader, member bread is of type flex_uint32_t

8 years agowarning: redundant redeclaration of '...' [-Wredundant-decls]
rlar [Wed, 16 Mar 2016 18:45:41 +0000 (19:45 +0100)]
warning: redundant redeclaration of '...' [-Wredundant-decls]