[Midnightbsd-cvs] src [7085] trunk/contrib/flex: restore from a previous botched commit

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Jul 9 17:38:49 EDT 2015


Revision: 7085
          http://svnweb.midnightbsd.org/src/?rev=7085
Author:   laffer1
Date:     2015-07-09 17:38:48 -0400 (Thu, 09 Jul 2015)
Log Message:
-----------
restore from a previous botched commit

Modified Paths:
--------------
    trunk/contrib/flex/ChangeLog
    trunk/contrib/flex/NEWS
    trunk/contrib/flex/ONEWS
    trunk/contrib/flex/README
    trunk/contrib/flex/ccl.c
    trunk/contrib/flex/dfa.c
    trunk/contrib/flex/ecs.c
    trunk/contrib/flex/filter.c
    trunk/contrib/flex/flex.skl
    trunk/contrib/flex/flexdef.h
    trunk/contrib/flex/gen.c
    trunk/contrib/flex/libyywrap.c
    trunk/contrib/flex/main.c
    trunk/contrib/flex/misc.c
    trunk/contrib/flex/nfa.c
    trunk/contrib/flex/parse.y
    trunk/contrib/flex/scan.l
    trunk/contrib/flex/sym.c
    trunk/contrib/flex/tblcmp.c

Modified: trunk/contrib/flex/ChangeLog
===================================================================
--- trunk/contrib/flex/ChangeLog	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/ChangeLog	2015-07-09 21:38:48 UTC (rev 7085)
@@ -1,3 +1,342 @@
+2014-02-16  Translation Project <coordinator at translationproject.org>
+
+	* po/ru.po: update ru translation from the translation project
+
+2014-02-14  Will Estes <westes575 at gmail.com>
+
+	* NEWS: mention updated da translation in release news
+
+2014-02-14  Translation Project <coordinator at translationproject.org>
+
+	* po/da.po: update da translation from the translation project
+
+2014-02-14  Will Estes <westes575 at gmail.com>
+
+	* NEWS: mention updated es translation in release news
+
+2014-02-14  Translation Project <coordinator at translationproject.org>
+
+	* po/es.po: update es translation from the translation project
+
+2014-02-14  Will Estes <westes575 at gmail.com>
+
+	* NEWS: mention updated ko translation in release news
+
+2014-02-14  Translation Project <coordinator at translationproject.org>
+
+	* po/ko.po: update ko translation from the translation project
+
+2014-02-14  Will Estes <westes575 at gmail.com>
+
+	* NEWS: mention updated ro translation in release news
+
+2014-02-14  Translation Project <coordinator at translationproject.org>
+
+	* po/ro.po: update ro translation from the translation project
+
+2014-02-14  Will Estes <westes575 at gmail.com>
+
+	* NEWS: mention updated ru translation in release news
+
+2014-02-14  Translation Project <coordinator at translationproject.org>
+
+	* po/ru.po: update ru translation from the translation project
+
+2014-02-14  Will Estes <westes575 at gmail.com>
+
+	* NEWS: mention updated sv translation in news
+
+2014-02-14  Translation Project <coordinator at translationproject.org>
+
+	* po/sv.po: update sv translation from the translation project
+
+2014-02-14  Will Estes <westes575 at gmail.com>
+
+	* NEWS: mention updated tr translation in news
+
+2014-02-14  Translation Project <coordinator at translationproject.org>
+
+	* po/tr.po: update tr translation from the translation project
+
+2014-02-14  Will Estes <westes575 at gmail.com>
+
+	* NEWS: mention updated zh_CN in release news
+
+2014-02-14  Translation Project <coordinator at translationproject.org>
+
+	* po/zh_CN.po: update zh_CN translation from the translation project
+
+2014-02-14  Will Estes <westes575 at gmail.com>
+
+	* NEWS, po/LINGUAS, po/zh_TW.po, po/zh_tw.po: rename zh_tw
+	translation to its proper zh_TW name
+
+2014-02-14  Will Estes <westes575 at gmail.com>
+
+	* NEWS: mention updated nl, vi translations in release news
+
+2014-02-14  Translation Project <coordinator at translationproject.org>
+
+	* po/vi.po: update vi translation from the translation project
+
+2014-02-14  Translation Project <coordinator at translationproject.org>
+
+	* po/nl.po: update nl translation from the translation project
+
+2014-02-14  Will Estes <westes575 at gmail.com>
+
+	* TODO: remove some unneeded entries from the todo list
+
+2014-02-13  Will Estes <westes575 at gmail.com>
+
+	* doc/Makefile.am: list more generated files in CLEANFILES
+
+2014-02-13  Will Estes <westes575 at gmail.com>
+
+	* doc/flex.xml: remove unmaintained xml documentation
+
+2014-02-13  Will Estes <westes575 at gmail.com>
+
+	* configure.ac: bump AM_GNU_GETTEXT_VERSION to 0.18.1
+
+2014-02-13  Will Estes <westes575 at gmail.com>
+
+	* README: list new location of flex git repo
+
+2014-02-13  Will Estes <westes575 at gmail.com>
+
+	* po/.gitignore: git ignore generated files from english quoting
+	variant translations
+
+2014-02-13  Will Estes <westes575 at gmail.com>
+
+	* po/LINGUAS: name english quoting variants correctly
+
+2014-02-13  Will Estes <westes575 at gmail.com>
+
+	* Makefile.am, configure.ac, tools/Makefile.am: removed tools/
+	subdirectory from distribution Since it is not possible to rebuild the ChangeLog file without being
+	in a git working directory of flex, distributing the tools directory
+	is misleading. In particular, git2cl will always fail.
+
+2014-02-13  Will Estes <westes575 at gmail.com>
+
+	* po/LINGUAS: removed unneeded blank line from translation list
+
+2014-02-13  Will Estes <westes575 at gmail.com>
+
+	* po/LINGUAS: added en quoting variants to translation list
+
+2014-02-11  Will Estes <westes575 at gmail.com>
+
+	* configure.ac: use gnu automake option instead of gnits option
+
+2014-02-11  Will Estes <westes575 at gmail.com>
+
+	* README-alpha: remove README_alpha file since it is no longer
+	needed
+
+2014-02-10  Will Estes <westes575 at gmail.com>
+
+	* configure.ac: increment version to 2.5.38
+
+2013-11-27  Will Estes <westes575 at gmail.com>
+
+	* NEWS: flesh out internationalization section of NEWS file; mention
+	pt_BR translation
+
+2013-11-27  Translation Project <coordinator at translationproject.org>
+
+	* po/pt_BR.po: update pt_BR translation from the translation project
+
+2013-10-31  Will Estes <westes575 at gmail.com>
+
+	* NEWS: begin listing 2.5.38 version in NEWS; list new sr
+	translation
+
+2013-10-31  Will Estes <westes575 at gmail.com>
+
+	* po/LINGUAS: list new sr translation in list of translations
+
+2013-10-31  Will Estes <westes575 at gmail.com>
+
+	* po/sr.po: add sr translation from the translation project
+
+2013-07-02  Till Varoquaux <till.varoquaux at gmail.com>
+
+	* configure.ac, flex.skl, nfa.c, tests/Makefile.am,
+	tests/test-lineno-trailing/.gitignore,
+	tests/test-lineno-trailing/Makefile.am,
+	tests/test-lineno-trailing/scanner.l,
+	tests/test-lineno-trailing/test.input: Adjust yylineno properly when
+	rewinding trailing contexts.
+
+2013-05-28  Will Estes <westes575 at gmail.com>
+
+	* Makefile.am: Remove incorrect / in install-exec-hook target
+
+2013-02-16  Translation Project <coordinators at translationproject.org>
+
+	* po/LINGUAS, po/zh_tw.po: add zh_tw translation from the
+	translation project
+
+2012-12-06  Christoph Junghans <ottxor at gentoo.org>
+
+	* Makefile.am, configure.ac: add version information to shared
+	library Signed-off-by: Will Estes <westes575 at gmail.com>
+
+2012-12-04  Christoph Junghans <ottxor at gentoo.org>
+
+	* .gitignore, Makefile.am, configure.ac, lib/Makefile.am: Build
+	libfl and libcompat using libtool; resolves #3586814 Signed-off-by: Will Estes <westes575 at gmail.com>
+
+2012-12-04  Translation Project <coordinator at translationproject.org>
+
+	* po/ca.po: update ca translation
+
+2012-10-31  Hugh Sasse <hgs at dmu.ac.uk>
+
+	* tests/test-extended/Makefile.am, tests/test-quotes/Makefile.am: 
+	use cmp instead of diff in some tests for portability reasons Signed-off-by: Will Estes <westes575 at gmail.com>
+
+2012-10-31  Dennis Clarke <dclarke at blastwave.org>
+
+	* tests/TEMPLATE/Makefile.am, tests/test-alloc-extra/Makefile.am,
+	tests/test-array-nr/Makefile.am, tests/test-array-r/Makefile.am,
+	tests/test-basic-nr/Makefile.am, tests/test-basic-r/Makefile.am,
+	tests/test-bison-nr/Makefile.am,
+	tests/test-bison-yylloc/Makefile.am,
+	tests/test-bison-yylval/Makefile.am,
+	tests/test-c++-basic/Makefile.am,
+	tests/test-c++-multiple-scanners/Makefile.am,
+	tests/test-c++-yywrap/Makefile.am, tests/test-c-cpp-nr/Makefile.am,
+	tests/test-c-cpp-r/Makefile.am, tests/test-ccl/Makefile.am,
+	tests/test-debug-nr/Makefile.am, tests/test-debug-r/Makefile.am,
+	tests/test-extended/Makefile.am, tests/test-header-nr/Makefile.am,
+	tests/test-header-r/Makefile.am,
+	tests/test-include-by-buffer/Makefile.am,
+	tests/test-include-by-push/Makefile.am,
+	tests/test-include-by-reentrant/Makefile.am,
+	tests/test-linedir-r/Makefile.am, tests/test-lineno-nr/Makefile.am,
+	tests/test-lineno-r/Makefile.am, tests/test-mem-nr/Makefile.am,
+	tests/test-mem-r/Makefile.am,
+	tests/test-multiple-scanners-nr/Makefile.am,
+	tests/test-multiple-scanners-r/Makefile.am,
+	tests/test-noansi-nr/Makefile.am, tests/test-noansi-r/Makefile.am,
+	tests/test-posix/Makefile.am,
+	tests/test-posixly-correct/Makefile.am,
+	tests/test-prefix-nr/Makefile.am, tests/test-prefix-r/Makefile.am,
+	tests/test-pthread/Makefile.am, tests/test-quotes/Makefile.am,
+	tests/test-reject/Makefile.am, tests/test-rescan-nr/Makefile.am,
+	tests/test-rescan-r/Makefile.am, tests/test-string-nr/Makefile.am,
+	tests/test-string-r/Makefile.am, tests/test-table-opts/Makefile.am,
+	tests/test-top/Makefile.am, tests/test-yyextra/Makefile.am: add
+	CFLAGS and CXXFLAGS options as appropriate to testsuite Makefile.am
+	files Signed-off-by: Will Estes <westes575 at gmail.com>
+
+2012-10-25  Will Estes <westes575 at gmail.com>
+
+	* po/LINGUAS: add hr to list of translations
+
+2012-10-25  Translation Project <coordinator at translationproject.org>
+
+	* po/hr.po: add hr translation from the translation project
+
+2012-10-25  Translation Project <coordinator at translationproject.org>
+
+	* po/fr.po: new fr translation project from the translation project
+
+2012-09-08  Will Estes <westes575 at gmail.com>
+
+	* po/LINGUAS: update languages list to include esperanto translation
+
+2012-09-08  Translation Project <coordinator at translationproject.org>
+
+	* po/eo.po: add eo translation from the translation project
+
+2012-08-26  Will Estes <westes575 at gmail.com>
+
+	* configure.ac: add dist-xz to automake options; resolves #3561837
+
+2012-08-26  Will Estes <westes575 at gmail.com>
+
+	* autogen.sh, configure.ac: require gettext 0.18; force autoreconf
+	in autogen.sh; resolves #3561759 Autoconf had trouble finding the shared libraries for gettext. Using
+	gettext 0.18 fixes that.  When updating the gettext version number, autoreconf could fail to
+	update files, since autopoint would assume the gettext-related files
+	had been locally modified. Passing --force prevents that from
+	happening.
+
+2012-08-15  Will Estes <westes575 at gmail.com>
+
+	* Makefile.am: remove README.cvs from dist_doc_DATA in Makefile.am
+
+2012-08-13  Will Estes <westes575 at gmail.com>
+
+	* : commit 9256a268e2a1000cb410766e95487912a7d66d61 Author: Will
+	Estes <westes575 at gmail.com> Date:   Mon Aug 13 16:23:35 2012 -0400
+
+2012-08-08  Will Estes <westes575 at gmail.com>
+
+	* README, README.cvs: append README.cvs contents to README
+
+2012-08-08  Will Estes <westes575 at gmail.com>
+
+	* gen.c: fix m4 error when useecs and nultrans are true; resolves
+	#1816878
+
+2012-08-08  Robert Minsk <rminsk at users.sourceforge.net>
+
+	* flex.skl: put user code after yyguts init; resolves #1744516 Signed-off-by: Will Estes <westes575 at gmail.com>
+
+2012-08-08  Robert Minsk <rminsk at users.sourceforge.net>
+
+	* flex.skl, main.c: do not output yy_nxt to header with %option
+	full; resolves #1739922 Signed-off-by: Will Estes <westes575 at gmail.com>
+
+2012-08-07  Will Estes <westes575 at gmail.com>
+
+	* main.c: let flex decide if yymore and  reject are needed in lex
+	compatible mode This resolves bug #3510440.
+
+2012-08-06  Translation Project <coordinator at translationproject.org>
+
+	* po/vi.po: new vi translation from the translation project
+
+2012-08-06  Will Estes <westes575 at gmail.com>
+
+	* .gitignore: add more patterns to .gitignore Undersome circumstances, the build process will generate conf.in~,
+	which we want to ignore. Also, some patch files will apply but not
+	cleanly and *.orig and *.rej files are generated. We want to ignore
+	them as well.
+
+2012-08-06  Will Estes <westes575 at gmail.com>
+
+	* configure.ac, configure.in: rename configure.in to configure.ac to
+	prep for upcoming automake changes
+
+2012-08-06  Elias Pipping <pipping at users.sourceforge.net>
+
+	* tests/test-bison-yylloc/main.c, tests/test-bison-yylloc/parser.y,
+	tests/test-bison-yylval/main.c, tests/test-bison-yylval/parser.y: 
+	Fix two tests to pass under bison 2.6 Given that bison is moving forward with the %parse-param instead of
+	YYPARSE_PARAM syntax, it makes sense to switch over to using the new
+	style declaration. In particular, this means that flex scanners that
+	use bison features will now require bison 2.6 or higher.  Signed-off-by: Will Estes <westes575 at gmail.com>
+
+2012-08-04  Will Estes <westes575 at gmail.com>
+
+	* po/nl.po: new nl translation from the translation project
+
+2012-08-04  Mike Frysinger <vapier at gentoo.org>
+
+	* flexdef.h: add prototype for lerrsf_fatal to flexdef.h Signed-off-by: Will Estes <westes575 at gmail.com>
+
+2012-08-04  nomis52 <nomis52 at users.sourceforge.net>
+
+	* flex.skl, gen.c: Change variable types to silence compiler
+	warnings; resolves #3552806 Signed-off-by: Will Estes <westes575 at gmail.com>
+
 2012-08-03  Will Estes <westes575 at gmail.com>
 
 	* NEWS: update NEWS to reflect changes in 2.5.37

Modified: trunk/contrib/flex/NEWS
===================================================================
--- trunk/contrib/flex/NEWS	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/NEWS	2015-07-09 21:38:48 UTC (rev 7085)
@@ -3,6 +3,20 @@
 
 See the file COPYING for copying conditions.
 
+* flex version  2.5.39
+
+** no user visible changes in this release
+
+* version 2.5.38 released 2014-02-14
+
+** internationalization
+
+*** add sr translation from the translation project
+
+*** update da, es, ko, nl, pt_BR, ro, ru, sv, tr, vi, zh_CN translations from the translation project
+
+*** rename zh_tw to its proper zh_TW name
+
 * version 2.5.37 released 2012-08-03
 
 ** Import flex into git. See

Modified: trunk/contrib/flex/ONEWS
===================================================================
--- trunk/contrib/flex/ONEWS	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/ONEWS	2015-07-09 21:38:48 UTC (rev 7085)
@@ -613,7 +613,7 @@
 	  sources.  One side-effect of this change is that -+ and -CF
 	  are now incompatible.
 
-	- libfl.a now supplies private versions of the <string.h>/
+	- libfl.a now supplies private versions of the the <string.h>/
 	  <strings.h> string routines needed by flex and the scanners
 	  it generates, to enhance portability to some BSD systems.
 
@@ -944,7 +944,7 @@
 	  given.  To specify an end-of-file action for just the initial
 	  state, use <INITIAL><<EOF>>.
 
-	- -d debug output is now contingent on the global yy_flex_debug
+	- -d debug output is now contigent on the global yy_flex_debug
 	  being set to a non-zero value, which it is by default.
 
 	- A new macro, YY_USER_INIT, is provided for the user to specify
@@ -987,7 +987,7 @@
 	- yy_switch_to_buffer() can be used in the yywrap() macro/routine.
 
 	- flex scanners do not use stdio for their input, and hence when
-	  writing an interactive scanner one must explicitly call fflush()
+	  writing an interactive scanner one must explictly call fflush()
 	  after writing out a prompt.
 
 	- flex scanner can be made reentrant (after a fashion) by using

Modified: trunk/contrib/flex/README
===================================================================
--- trunk/contrib/flex/README	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/README	2015-07-09 21:38:48 UTC (rev 7085)
@@ -8,11 +8,15 @@
 
 http://flex.sourceforge.net/
 
-Bug reports should be submitted using the SourceForge Bug Tracker
-facilities which can be found from flex's SourceForge project page at:
+Bug reports should be submitted using the SourceForge Bug Tracker for
+flex at:
 
-http://sourceforge.net/projects/flex
+http://sourceforge.net/tracker/?group_id=97492&atid=618177
 
+The flex codebase is kept in git at:
+
+https://github.com/westes/flex
+
 There are several mailing lists available as well:
 
 flex-announce at lists.sourceforge.net - where posts will be made
@@ -24,9 +28,60 @@
 flex-devel at lists.sourceforge.net - where you can discuss development of
 flex itself
 
-Note that flex is distributed under a copyright very similar to that of
-BSD Unix, and not under the GNU General Public License (GPL).
+Find information on subscribing to the mailing lists at:
 
+http://sourceforge.net/mail/?group_id=97492
+
+The flex distribution contains the following files which may be of interest:
+
+README - This file.
+
+NEWS - current version number and list of user-visible changes.
+
+INSTALL - basic installation information.
+
+ABOUT-NLS - description of internationalization support in flex.
+
+COPYING - flex's copyright and license.
+
+doc/ - user documentation.
+
+examples/ - containing examples of some possible flex scanners and a
+few other things. See the file examples/README for more details.
+
+TODO - outstanding bug reports, desired features, etc.
+
+tests/ - regression tests. See TESTS/README for details.
+
+po/ - internationalization support files.
+
+You need the following tools to build flex from the maintainer's
+repository:
+
+compiler suite - flex is built with gcc
+bash, or a good Bourne-style shell
+m4 - m4 -p needs to work; GNU m4 and a few others are suitable
+GNU bison;  to generate parse.c from parse.y
+autoconf 2.69; for handling the build system
+automake 1.12.2; for Makefile generation
+gettext 0.18; fori18n support
+help2man 1.36; to generate the flex man page
+tar, gzip, etc.; for packaging of the source distribution
+GNU texinfo 498;  to build and test the flex manual
+GNU indent 2.8; for indenting the flex source the way we want it done
+
+Once you have all the necessary tools installed, life becomes
+simple. To prepare the flex tree for building, run the script:
+
+$ ./autogen.sh
+
+in the top level of the flex source tree.
+This script calls the various tools needed to get flex ready for the
+GNU-style configure script to be able to work.
+
+From this point on, building flex follows the usual configure, make,
+make install routine.
+
 This file is part of flex.
 
 This code is derived from software contributed to Berkeley by
@@ -55,25 +110,4 @@
 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 PURPOSE.
 
-The flex distribution contains the following files which may be of interest:
 
-README - This file.
-
-NEWS - current version number and list of user-visible changes.
-
-INSTALL - basic installation information.
-
-ABOUT-NLS - description of internationalization support in flex.
-
-COPYING - flex's copyright and license.
-
-doc/ - user documentation.
-
-examples/ - containing examples of some possible flex scanners and a
-few other things. See the file examples/README for more details.
-
-TODO - outstanding bug reports, desired features, etc.
-
-tests/ - regression tests. See TESTS/README for details.
-
-po/ - internationalization support files.

Modified: trunk/contrib/flex/ccl.c
===================================================================
--- trunk/contrib/flex/ccl.c	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/ccl.c	2015-07-09 21:38:48 UTC (rev 7085)
@@ -92,13 +92,13 @@
 
 static void    dump_cclp (FILE* file, int cclp)
 {
-	int i;
+	register int i;
 
 	putc ('[', file);
 
 	for (i = 0; i < csize; ++i) {
 		if (ccl_contains(cclp, i)){
-			int start_char = i;
+			register int start_char = i;
 
 			putc (' ', file);
 
@@ -244,13 +244,13 @@
      FILE   *file;
      int     cset[];
 {
-	int i;
+	register int i;
 
 	putc ('[', file);
 
 	for (i = 0; i < csize; ++i) {
 		if (cset[i]) {
-			int start_char = i;
+			register int start_char = i;
 
 			putc (' ', file);
 

Modified: trunk/contrib/flex/dfa.c
===================================================================
--- trunk/contrib/flex/dfa.c	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/dfa.c	2015-07-09 21:38:48 UTC (rev 7085)
@@ -101,12 +101,12 @@
      int    *accset;
      int nacc;
 {
-	int i, j;
+	register int i, j;
 
 	for (i = 1; i <= num_states; ++i) {
 		int     ns = nfa_states[i];
-		int type = state_type[ns];
-		int ar = assoc_rule[ns];
+		register int type = state_type[ns];
+		register int ar = assoc_rule[ns];
 
 		if (type == STATE_NORMAL || rule_type[ar] != RULE_VARIABLE) {	/* do nothing */
 		}
@@ -141,14 +141,14 @@
      FILE   *file;
      int ds;
 {
-	int i, j;
-	int num_associated_rules = 0;
+	register int i, j;
+	register int num_associated_rules = 0;
 	int     rule_set[MAX_ASSOC_RULES + 1];
 	int    *dset = dss[ds];
 	int     size = dfasiz[ds];
 
 	for (i = 1; i <= size; ++i) {
-		int rule_num = rule_linenum[assoc_rule[dset[i]]];
+		register int rule_num = rule_linenum[assoc_rule[dset[i]]];
 
 		for (j = 1; j <= num_associated_rules; ++j)
 			if (rule_num == rule_set[j])
@@ -191,7 +191,7 @@
      FILE   *file;
      int state[];
 {
-	int i, ec;
+	register int i, ec;
 	int     out_char_set[CSIZE];
 
 	for (i = 0; i < csize; ++i) {
@@ -238,7 +238,7 @@
 int    *epsclosure (t, ns_addr, accset, nacc_addr, hv_addr)
      int    *t, *ns_addr, accset[], *nacc_addr, *hv_addr;
 {
-	int stkpos, ns, tsp;
+	register int stkpos, ns, tsp;
 	int     numstates = *ns_addr, nacc, hashval, transsym, nfaccnum;
 	int     stkend, nstate;
 	static int did_stk_init = false, *stk;
@@ -824,7 +824,7 @@
      int sns[], numstates, accset[], nacc, hashval, *newds_addr;
 {
 	int     didsort = 0;
-	int i, j;
+	register int i, j;
 	int     newds, *oldsns;
 
 	for (i = 1; i <= lastdfa; ++i)

Modified: trunk/contrib/flex/ecs.c
===================================================================
--- trunk/contrib/flex/ecs.c	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/ecs.c	2015-07-09 21:38:48 UTC (rev 7085)
@@ -139,7 +139,7 @@
 
 		for (i = fwd[cclm]; i != NIL && i <= llsiz; i = fwd[i]) {	/* look for the symbol in the character class */
 			for (; j < lenccl; ++j) {
-				int ccl_char;
+				register int ccl_char;
 
 				if (NUL_mapping && ccls[j] == 0)
 					ccl_char = NUL_mapping;

Modified: trunk/contrib/flex/filter.c
===================================================================
--- trunk/contrib/flex/filter.c	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/filter.c	2015-07-09 21:38:48 UTC (rev 7085)
@@ -135,6 +135,9 @@
 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

Modified: trunk/contrib/flex/flex.skl
===================================================================
--- trunk/contrib/flex/flex.skl	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/flex.skl	2015-07-09 21:38:48 UTC (rev 7085)
@@ -194,15 +194,14 @@
 ]])
 
 /* First, we deal with  platform-specific or compiler-specific issues. */
-
-#if defined(__FreeBSD__)
+#if defined(__MidnightBSD__)
 #ifndef __STDC_LIMIT_MACROS
-#define	__STDC_LIMIT_MACROS
+#define       __STDC_LIMIT_MACROS
 #endif
 #include <sys/cdefs.h>
 #include <stdint.h>
 #else
-#define	__dead2
+#define       __dead2
 #endif
 
 /* begin standard C headers. */
@@ -513,9 +512,17 @@
                     if ( yytext[yyl] == '\n' )\
                         --yylineno;\
             }while(0)
+    #define YY_LINENO_REWIND_TO(dst) \
+            do {\
+                const char *p;\
+                for ( p = yy_cp-1; p >= (dst); --p)\
+                    if ( *p == '\n' )\
+                        --yylineno;\
+            }while(0)
     ]],
     [[
     #define YY_LESS_LINENO(n)
+    #define YY_LINENO_REWIND_TO(ptr)
     ]])
 ]])
 
@@ -638,7 +645,6 @@
 #define YY_CURRENT_BUFFER ( YY_G(yy_buffer_stack) \
                           ? YY_G(yy_buffer_stack)[YY_G(yy_buffer_stack_top)] \
                           : NULL)
-#define yy_current_buffer YY_CURRENT_BUFFER
 ]])
 
 m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
@@ -750,7 +756,7 @@
 static yy_state_type yy_get_previous_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
 static yy_state_type yy_try_NUL_trans M4_YY_PARAMS( yy_state_type current_state  M4_YY_PROTO_LAST_ARG);
 static int yy_get_next_buffer M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
-static void yy_fatal_error M4_YY_PARAMS( yyconst char msg[] M4_YY_PROTO_LAST_ARG ) __dead2;
+static void yy_fatal_error M4_YY_PARAMS( yyconst char msg[] M4_YY_PROTO_LAST_ARG );
 ]])
 
 %endif
@@ -1032,9 +1038,7 @@
 %not-for-header
     m4_ifdef( [[M4_YY_NO_UNPUT]],,
     [[
-#ifndef YY_NO_UNPUT
     static void yyunput M4_YY_PARAMS( int c, char *buf_ptr  M4_YY_PROTO_LAST_ARG);
-#endif
     ]])
 %ok-for-header
 %endif
@@ -1273,9 +1277,9 @@
  */
 YY_DECL
 {
-	yy_state_type yy_current_state;
-	char *yy_cp, *yy_bp;
-	int yy_act;
+	register yy_state_type yy_current_state;
+	register char *yy_cp, *yy_bp;
+	register int yy_act;
     M4_YY_DECL_GUTS_VAR();
 
 m4_ifdef( [[M4_YY_NOT_REENTRANT]],
@@ -1290,8 +1294,6 @@
     ]])
 ]])
 
-%% [7.0] user's declarations go here
-
 m4_ifdef( [[M4_YY_BISON_LVAL]],
 [[
     yylval = yylval_param;
@@ -1347,6 +1349,9 @@
 		yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );
 		}
 
+	{
+%% [7.0] user's declarations go here
+
 	while ( 1 )		/* loops until end-of-file is reached */
 		{
 %% [8.0] yymore()-related code goes here
@@ -1504,6 +1509,7 @@
 			"fatal flex scanner internal error--no action found" );
 	} /* end of action switch */
 		} /* end of scanning one token */
+	} /* end of user's declarations */
 } /* end of yylex */
 %ok-for-header
 
@@ -1623,9 +1629,9 @@
 %endif
 {
     M4_YY_DECL_GUTS_VAR();
-	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-	char *source = YY_G(yytext_ptr);
-	int number_to_move, i;
+	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+	register char *source = YY_G(yytext_ptr);
+	register int number_to_move, i;
 	int ret_val;
 
 	if ( YY_G(yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] )
@@ -1771,8 +1777,8 @@
     yy_state_type yyFlexLexer::yy_get_previous_state()
 %endif
 {
-	yy_state_type yy_current_state;
-	char *yy_cp;
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
     M4_YY_DECL_GUTS_VAR();
 
 %% [15.0] code to get the start state into yy_current_state goes here
@@ -1798,7 +1804,7 @@
     yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
 %endif
 {
-	int yy_is_jam;
+	register int yy_is_jam;
     M4_YY_DECL_GUTS_VAR(); /* This var may be unused depending upon options. */
 %% [17.0] code to find the next state, and perhaps do backing up, goes here
 
@@ -1810,15 +1816,13 @@
 %if-c-only
 m4_ifdef( [[M4_YY_NO_UNPUT]],,
 [[
-#ifndef YY_NO_UNPUT
-    static void yyunput YYFARGS2( int,c, char *,yy_bp)
+    static void yyunput YYFARGS2( int,c, register char *,yy_bp)
 %endif
 %if-c++-only
-#ifndef YY_NO_UNPUT
-    void yyFlexLexer::yyunput( int c, char* yy_bp)
+    void yyFlexLexer::yyunput( int c, register char* yy_bp)
 %endif
 {
-	char *yy_cp;
+	register char *yy_cp;
     M4_YY_DECL_GUTS_VAR();
 
     yy_cp = YY_G(yy_c_buf_p);
@@ -1829,10 +1833,10 @@
 	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
 		{ /* need to shift things up to make room */
 		/* +2 for EOB chars. */
-		yy_size_t number_to_move = YY_G(yy_n_chars) + 2;
-		char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+		register yy_size_t number_to_move = YY_G(yy_n_chars) + 2;
+		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
 					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
-		char *source =
+		register char *source =
 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
 
 		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -1861,7 +1865,6 @@
 	YY_G(yy_hold_char) = *yy_cp;
 	YY_G(yy_c_buf_p) = yy_cp;
 }
-#endif	/* ifndef YY_NO_UNPUT */
 %if-c-only
 ]])
 %endif
@@ -2967,7 +2970,7 @@
 #ifndef yytext_ptr
 static void yy_flex_strncpy YYFARGS3( char*,s1, yyconst char *,s2, int,n)
 {
-	int i;
+	register int i;
 	for ( i = 0; i < n; ++i )
 		s1[i] = s2[i];
 }
@@ -2979,7 +2982,7 @@
 #ifdef YY_NEED_STRLEN
 static int yy_flex_strlen YYFARGS1( yyconst char *,s)
 {
-	int n;
+	register int n;
 	for ( n = 0; s[n]; ++n )
 		;
 

Modified: trunk/contrib/flex/flexdef.h
===================================================================
--- trunk/contrib/flex/flexdef.h	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/flexdef.h	2015-07-09 21:38:48 UTC (rev 7085)
@@ -61,6 +61,7 @@
 #include <setjmp.h>
 #include <ctype.h>
 #include <string.h>
+#include <math.h>
 #endif
 #ifdef HAVE_ASSERT_H
 #include <assert.h>
@@ -170,7 +171,6 @@
  */
 #define NUMDATALINES 10
 
-/* Number of characters to print a line number, i.e., 1 + log10(INT_MAX) */
 #define NUMCHARLINES 10
 
 /* transition_struct_out() definitions. */
@@ -382,7 +382,7 @@
  * use_read - if true (-f, -F, or -Cr) then use read() for scanner input;
  *   otherwise, use fread().
  * yytext_is_array - if true (i.e., %array directive), then declare
- *   yytext as an array instead of a character pointer.  Nice and inefficient.
+ *   yytext as a array instead of a character pointer.  Nice and inefficient.
  * do_yywrap - do yywrap() processing on EOF.  If false, EOF treated as
  *   "no more files".
  * csize - size of character set for the scanner we're generating;
@@ -845,10 +845,10 @@
 extern void add_action PROTO ((const char *new_text));
 
 /* True if a string is all lower case. */
-extern int all_lower PROTO ((char *));
+extern int all_lower PROTO ((register char *));
 
 /* True if a string is all upper case. */
-extern int all_upper PROTO ((char *));
+extern int all_upper PROTO ((register char *));
 
 /* Compare two integers for use by qsort. */
 extern int intcmp PROTO ((const void *, const void *));
@@ -860,10 +860,10 @@
 extern Char clower PROTO ((int));
 
 /* Returns a dynamically allocated copy of a string. */
-extern char *copy_string PROTO ((const char *));
+extern char *copy_string PROTO ((register const char *));
 
 /* Returns a dynamically allocated copy of a (potentially) unsigned string. */
-extern Char *copy_unsigned_string PROTO ((Char *));
+extern Char *copy_unsigned_string PROTO ((register Char *));
 
 /* Compare two characters for use by qsort with '\0' sorting last. */
 extern int cclcmp PROTO ((const void *, const void *));
@@ -924,7 +924,7 @@
 /* Mark the current position in the action array as the end of the prolog. */
 extern void mark_prolog PROTO ((void));
 
-/* Generate a data statement for a two-dimensional array. */
+/* Generate a data statment for a two-dimensional array. */
 extern void mk2data PROTO ((int));
 
 extern void mkdata PROTO ((int));	/* generate a data statement */
@@ -989,7 +989,7 @@
 /* Mark each "beginning" state in a machine as being a "normal" (i.e.,
  * not trailing context associated) state.
  */
-extern void mark_beginning_as_normal PROTO ((int));
+extern void mark_beginning_as_normal PROTO ((register int));
 
 /* Make a machine that branches to two machines. */
 extern int mkbranch PROTO ((int, int));

Modified: trunk/contrib/flex/gen.c
===================================================================
--- trunk/contrib/flex/gen.c	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/gen.c	2015-07-09 21:38:48 UTC (rev 7085)
@@ -81,7 +81,7 @@
 
 void do_indent ()
 {
-	int i = indent_level * 8;
+	register int i = indent_level * 8;
 
 	while (i >= 8) {
 		outc ('\t');
@@ -121,7 +121,7 @@
 }
 
 /* Generate the table for possible eol matches. */
-static void geneoltbl (void)
+static void geneoltbl ()
 {
 	int     i;
 
@@ -201,7 +201,7 @@
 
 static struct yytbl_data *mkctbl (void)
 {
-	int i;
+	register int i;
 	struct yytbl_data *tbl = 0;
 	flex_int32_t *tdata = 0, curr = 0;
 	int     end_of_buffer_action = num_rules + 1;
@@ -332,7 +332,7 @@
 
 void genctbl ()
 {
-	int i;
+	register int i;
 	int     end_of_buffer_action = num_rules + 1;
 
 	/* Table of verify for transition and offset to next state. */
@@ -431,9 +431,9 @@
 
 /* mkecstbl - Make equivalence-class tables.  */
 
-static struct yytbl_data *mkecstbl (void)
+struct yytbl_data *mkecstbl (void)
 {
-	int i;
+	register int i;
 	struct yytbl_data *tbl = 0;
 	flex_int32_t *tdata = 0;
 
@@ -462,7 +462,7 @@
 
 void genecs ()
 {
-	int i, j;
+	register int i, j;
 	int     numrows;
 
 	out_str_dec (get_int32_decl (), "yy_ec", csize);
@@ -507,7 +507,6 @@
 		indent_puts ("yy_current_state = *--YY_G(yy_state_ptr);");
 		indent_puts ("YY_G(yy_lp) = yy_accept[yy_current_state];");
 
-		outn ("goto find_rule; /* avoid `defined but not used' warning */");
 		outn ("find_rule: /* we branch to this label when backing up */");
 
 		indent_puts
@@ -638,7 +637,7 @@
 
 struct yytbl_data *mkftbl (void)
 {
-	int i;
+	register int i;
 	int     end_of_buffer_action = num_rules + 1;
 	struct yytbl_data *tbl;
 	flex_int32_t *tdata = 0;
@@ -655,7 +654,7 @@
 	dfaacc[end_of_buffer_state].dfaacc_state = end_of_buffer_action;
 
 	for (i = 1; i <= lastdfa; ++i) {
-		int anum = dfaacc[i].dfaacc_state;
+		register int anum = dfaacc[i].dfaacc_state;
 
 		tdata[i] = anum;
 
@@ -675,7 +674,7 @@
 
 void genftbl ()
 {
-	int i;
+	register int i;
 	int     end_of_buffer_action = num_rules + 1;
 
 	out_str_dec (long_align ? get_int32_decl () : get_int16_decl (),
@@ -684,7 +683,7 @@
 	dfaacc[end_of_buffer_state].dfaacc_state = end_of_buffer_action;
 
 	for (i = 1; i <= lastdfa; ++i) {
-		int anum = dfaacc[i].dfaacc_state;
+		register int anum = dfaacc[i].dfaacc_state;
 
 		mkdata (anum);
 
@@ -709,7 +708,7 @@
 void gen_next_compressed_state (char_map)
      char   *char_map;
 {
-	indent_put2s ("YY_CHAR yy_c = %s;", char_map);
+	indent_put2s ("register YY_CHAR yy_c = %s;", char_map);
 
 	/* Save the backing-up info \before/ computing the next state
 	 * because we always compute one more state than needed - we
@@ -795,8 +794,8 @@
 	else if (fullspd) {
 		indent_puts ("{");
 		indent_puts
-			("yyconst struct yy_trans_info *yy_trans_info;\n");
-		indent_puts ("YY_CHAR yy_c;\n");
+			("register yyconst struct yy_trans_info *yy_trans_info;\n");
+		indent_puts ("register YY_CHAR yy_c;\n");
 		indent_put2s ("for ( yy_c = %s;", char_map);
 		indent_puts
 			("      (yy_trans_info = &yy_current_state[(unsigned int) yy_c])->");
@@ -939,7 +938,7 @@
 		/* We're going to need yy_cp lying around for the call
 		 * below to gen_backing_up().
 		 */
-		indent_puts ("char *yy_cp = YY_G(yy_c_buf_p);");
+		indent_puts ("register char *yy_cp = YY_G(yy_c_buf_p);");
 
 	outc ('\n');
 
@@ -960,10 +959,10 @@
 
 	else if (fullspd) {
 		do_indent ();
-		out_dec ("int yy_c = %d;\n", NUL_ec);
+		out_dec ("register int yy_c = %d;\n", NUL_ec);
 
 		indent_puts
-			("yyconst struct yy_trans_info *yy_trans_info;\n");
+			("register yyconst struct yy_trans_info *yy_trans_info;\n");
 		indent_puts
 			("yy_trans_info = &yy_current_state[(unsigned int) yy_c];");
 		indent_puts ("yy_current_state += yy_trans_info->yy_nxt;");
@@ -1320,7 +1319,7 @@
 	yybase_curr = 1;
 
 	for (i = 1; i <= lastdfa; ++i) {
-		int d = def[i];
+		register int d = def[i];
 
 		if (base[i] == JAMSTATE)
 			base[i] = jambase;
@@ -1502,7 +1501,7 @@
 
 void make_tables ()
 {
-	int i;
+	register int i;
 	int     did_eof_rule = false;
 	struct yytbl_data *yynultrans_tbl;
 

Modified: trunk/contrib/flex/libyywrap.c
===================================================================
--- trunk/contrib/flex/libyywrap.c	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/libyywrap.c	2015-07-09 21:38:48 UTC (rev 7085)
@@ -22,6 +22,7 @@
 /*  PURPOSE. */
 
 int     yywrap (void);
+
 int     yywrap (void)
 {
 	return 1;

Modified: trunk/contrib/flex/main.c
===================================================================
--- trunk/contrib/flex/main.c	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/main.c	2015-07-09 21:38:48 UTC (rev 7085)
@@ -1575,12 +1575,11 @@
     }
 
 	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");
 	}
 

Modified: trunk/contrib/flex/misc.c
===================================================================
--- trunk/contrib/flex/misc.c	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/misc.c	2015-07-09 21:38:48 UTC (rev 7085)
@@ -113,7 +113,6 @@
 }
 
 
-#ifdef notdef
 /** Append "m4_define([[defname]],[[value]])m4_dnl\n" to the running buffer.
  *  @param defname The macro name.
  *  @param value The macro value, can be NULL, which is the same as the empty string.
@@ -134,7 +133,6 @@
 	snprintf (buf, sizeof(buf), "m4_define([[%s]],[[%s]])m4_dnl\n", defname, value?value:"");
 	add_action (buf);
 }
-#endif
 
 /* Append "new_text" to the running buffer. */
 void add_action (new_text)
@@ -170,7 +168,7 @@
      int size;
      size_t element_size;
 {
-	void *mem;
+	register void *mem;
 	size_t  num_bytes = element_size * size;
 
 	mem = flex_alloc (num_bytes);
@@ -185,7 +183,7 @@
 /* all_lower - true if a string is all lower-case */
 
 int all_lower (str)
-     char *str;
+     register char *str;
 {
 	while (*str) {
 		if (!isascii ((Char) * str) || !islower ((Char) * str))
@@ -200,7 +198,7 @@
 /* all_upper - true if a string is all upper-case */
 
 int all_upper (str)
-     char *str;
+     register char *str;
 {
 	while (*str) {
 		if (!isascii ((Char) * str) || !isupper ((Char) * str))
@@ -243,7 +241,7 @@
 /* clower - replace upper-case letter to lower-case */
 
 Char clower (c)
-     int c;
+     register int c;
 {
 	return (Char) ((isascii (c) && isupper (c)) ? tolower (c) : c);
 }
@@ -252,10 +250,10 @@
 /* copy_string - returns a dynamically allocated copy of a string */
 
 char   *copy_string (str)
-     const char *str;
+     register const char *str;
 {
-	const char *c1;
-	char *c2;
+	register const char *c1;
+	register char *c2;
 	char   *copy;
 	unsigned int size;
 
@@ -280,9 +278,9 @@
  */
 
 Char   *copy_unsigned_string (str)
-     Char *str;
+     register Char *str;
 {
-	Char *c;
+	register Char *c;
 	Char   *copy;
 
 	/* find length */
@@ -742,13 +740,13 @@
 }
 
 
-/* readable_form - return the human-readable form of a character
+/* readable_form - return the the human-readable form of a character
  *
  * The returned string is in static storage.
  */
 
 char   *readable_form (c)
-     int c;
+     register int c;
 {
 	static char rform[10];
 
@@ -797,7 +795,7 @@
      int size;
      size_t element_size;
 {
-	void *new_array;
+	register void *new_array;
 	size_t  num_bytes = element_size * size;
 
 	new_array = flex_realloc (array, num_bytes);
@@ -993,7 +991,7 @@
      char   *region_ptr;
      size_t size_in_bytes;
 {
-	char *rp, *rp_end;
+	register char *rp, *rp_end;
 
 	rp = region_ptr;
 	rp_end = region_ptr + size_in_bytes;

Modified: trunk/contrib/flex/nfa.c
===================================================================
--- trunk/contrib/flex/nfa.c	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/nfa.c	2015-07-09 21:38:48 UTC (rev 7085)
@@ -257,6 +257,11 @@
 				("*yy_cp = YY_G(yy_hold_char); /* undo effects of setting up yytext */\n");
 
 			if (headcnt > 0) {
+				if (rule_has_nl[num_rules]) {
+					snprintf (action_text, sizeof(action_text),
+						"YY_LINENO_REWIND_TO(%s + %d);\n", scanner_bp, headcnt);
+					add_action (action_text);
+				}
 				snprintf (action_text, sizeof(action_text), "%s = %s + %d;\n",
 					 scanner_cp, scanner_bp, headcnt);
 				add_action (action_text);
@@ -263,6 +268,12 @@
 			}
 
 			else {
+				if (rule_has_nl[num_rules]) {
+					snprintf (action_text, sizeof(action_text),
+						 "YY_LINENO_REWIND_TO(yy_cp - %d);\n", trailcnt);
+					add_action (action_text);
+				}
+
 				snprintf (action_text, sizeof(action_text), "%s -= %d;\n",
 					 scanner_cp, trailcnt);
 				add_action (action_text);
@@ -329,7 +340,7 @@
  */
 
 void    mark_beginning_as_normal (mach)
-     int mach;
+     register int mach;
 {
 	switch (state_type[mach]) {
 	case STATE_NORMAL:

Modified: trunk/contrib/flex/parse.y
===================================================================
--- trunk/contrib/flex/parse.y	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/parse.y	2015-07-09 21:38:48 UTC (rev 7085)
@@ -953,7 +953,7 @@
 
 void build_eof_action()
 	{
-	int i;
+	register int i;
 	char action_text[MAXLINE];
 
 	for ( i = 1; i <= scon_stk_ptr; ++i )

Modified: trunk/contrib/flex/scan.l
===================================================================
--- trunk/contrib/flex/scan.l	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/scan.l	2015-07-09 21:38:48 UTC (rev 7085)
@@ -661,7 +661,7 @@
      * context.
      */
 	"{"{NAME}"}"[[:space:]]?	 {
-			Char *nmdefptr;
+			register Char *nmdefptr;
             int end_is_ws, end_ch;
 
             end_ch = yytext[yyleng-1];

Modified: trunk/contrib/flex/sym.c
===================================================================
--- trunk/contrib/flex/sym.c	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/sym.c	2015-07-09 21:38:48 UTC (rev 7085)
@@ -59,12 +59,12 @@
 
 /* declare functions that have forward references */
 
-static int addsym PROTO ((char[], char *, int, hash_table, int));
-static struct hash_entry *findsym PROTO ((const char *sym,
+static int addsym PROTO ((register char[], char *, int, hash_table, int));
+static struct hash_entry *findsym PROTO ((register const char *sym,
 					  hash_table table,
 
 					  int table_size));
-static int hashfunct PROTO ((const char *, int));
+static int hashfunct PROTO ((register const char *, int));
 
 
 /* addsym - add symbol and definitions to symbol table
@@ -73,7 +73,7 @@
  */
 
 static int addsym (sym, str_def, int_def, table, table_size)
-     char sym[];
+     register char sym[];
      char   *str_def;
      int     int_def;
      hash_table table;
@@ -80,9 +80,9 @@
      int     table_size;
 {
 	int     hash_val = hashfunct (sym, table_size);
-	struct hash_entry *sym_entry = table[hash_val];
-	struct hash_entry *new_entry;
-	struct hash_entry *successor;
+	register struct hash_entry *sym_entry = table[hash_val];
+	register struct hash_entry *new_entry;
+	register struct hash_entry *successor;
 
 	while (sym_entry) {
 		if (!strcmp (sym, sym_entry->name)) {	/* entry already exists */
@@ -147,7 +147,7 @@
 /* findsym - find symbol in symbol table */
 
 static struct hash_entry *findsym (sym, table, table_size)
-     const char *sym;
+     register const char *sym;
      hash_table table;
      int     table_size;
 {
@@ -155,7 +155,7 @@
 		(struct hash_entry *) 0, (struct hash_entry *) 0,
 		(char *) 0, (char *) 0, 0,
 	};
-	struct hash_entry *sym_entry =
+	register struct hash_entry *sym_entry =
 
 		table[hashfunct (sym, table_size)];
 
@@ -171,11 +171,11 @@
 /* hashfunct - compute the hash value for "str" and hash size "hash_size" */
 
 static int hashfunct (str, hash_size)
-     const char *str;
+     register const char *str;
      int     hash_size;
 {
-	int hashval;
-	int locstr;
+	register int hashval;
+	register int locstr;
 
 	hashval = 0;
 	locstr = 0;

Modified: trunk/contrib/flex/tblcmp.c
===================================================================
--- trunk/contrib/flex/tblcmp.c	2015-07-09 21:38:17 UTC (rev 7084)
+++ trunk/contrib/flex/tblcmp.c	2015-07-09 21:38:48 UTC (rev 7085)
@@ -36,7 +36,7 @@
 
 /* declarations for functions that have forward references */
 
-void mkentry PROTO ((int *, int, int, int, int));
+void mkentry PROTO ((register int *, int, int, int, int));
 void mkprot PROTO ((int[], int, int));
 void mktemplate PROTO ((int[], int, int));
 void mv2front PROTO ((int));
@@ -224,7 +224,7 @@
 void    cmptmps ()
 {
 	int     tmpstorage[CSIZE + 1];
-	int *tmp = tmpstorage, i, j;
+	register int *tmp = tmpstorage, i, j;
 	int     totaltrans, trans;
 
 	peakpairs = numtemps * numecs + tblend;
@@ -291,7 +291,7 @@
 
 void    expand_nxt_chk ()
 {
-	int old_max = current_max_xpairs;
+	register int old_max = current_max_xpairs;
 
 	current_max_xpairs += MAX_XPAIRS_INCREMENT;
 
@@ -330,9 +330,9 @@
 	/* Firstfree is the position of the first possible occurrence of two
 	 * consecutive unused records in the chk and nxt arrays.
 	 */
-	int i;
-	int *state_ptr, *chk_ptr;
-	int *ptr_to_last_entry_in_state;
+	register int i;
+	register int *state_ptr, *chk_ptr;
+	register int *ptr_to_last_entry_in_state;
 
 	/* If there are too many out-transitions, put the state at the end of
 	 * nxt and chk.
@@ -421,7 +421,7 @@
  */
 void    inittbl ()
 {
-	int i;
+	register int i;
 
 	zero_out ((char *) chk,
 
@@ -494,7 +494,7 @@
  * (i.e., jam entries) into the table.  It is assumed that by linking to
  * "JAMSTATE" they will be taken care of.  In any case, entries in "state"
  * marking transitions to "SAME_TRANS" are treated as though they will be
- * taken care of by wherever "deflink" points.  "totaltrans" is the total
+ * taken care of by whereever "deflink" points.  "totaltrans" is the total
  * number of transitions out of the state.  If it is below a certain threshold,
  * the tables are searched for an interior spot that will accommodate the
  * state array.
@@ -501,10 +501,10 @@
  */
 
 void    mkentry (state, numchars, statenum, deflink, totaltrans)
-     int *state;
+     register int *state;
      int     numchars, statenum, deflink, totaltrans;
 {
-	int minec, maxec, i, baseaddr;
+	register int minec, maxec, i, baseaddr;
 	int     tblbase, tbllast;
 
 	if (totaltrans == 0) {	/* there are no out-transitions */
@@ -762,8 +762,8 @@
 void    place_state (state, statenum, transnum)
      int    *state, statenum, transnum;
 {
-	int i;
-	int *state_ptr;
+	register int i;
+	register int *state_ptr;
 	int     position = find_table_space (state, transnum);
 
 	/* "base" is the table of start positions. */
@@ -835,8 +835,8 @@
 int     tbldiff (state, pr, ext)
      int     state[], pr, ext[];
 {
-	int i, *sp = state, *ep = ext, *protp;
-	int numdiff = 0;
+	register int i, *sp = state, *ep = ext, *protp;
+	register int numdiff = 0;
 
 	protp = &protsave[numecs * (pr - 1)];
 



More information about the Midnightbsd-cvs mailing list