CVS commit: src/external/bsd/flex/dist/src

2020-04-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Apr 25 18:56:26 UTC 2020

Modified Files:
src/external/bsd/flex/dist/src: flex.skl

Log Message:
Fix misindentations in the flex skeleton triggered by dtrace's dt_lex.l.
Upstream committed as a631f5da8d4fd60fbde7b06bcf43bc9a155c27d5


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/flex/dist/src/flex.skl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/flex.skl
diff -u src/external/bsd/flex/dist/src/flex.skl:1.13 src/external/bsd/flex/dist/src/flex.skl:1.14
--- src/external/bsd/flex/dist/src/flex.skl:1.13	Sun Dec 23 22:14:29 2018
+++ src/external/bsd/flex/dist/src/flex.skl	Sat Apr 25 18:56:26 2020
@@ -1216,11 +1216,11 @@ m4_ifdef( [[]],
 
 m4_ifdef( [[M4_YY_USES_REJECT]],
 [[
-/* Create the reject buffer large enough to save one state per allowed character. */
-if ( ! YY_G(yy_state_buf) )
-YY_G(yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE  M4_YY_CALL_LAST_ARG);
-if ( ! YY_G(yy_state_buf) )
-YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
+		/* Create the reject buffer large enough to save one state per allowed character. */
+		if ( ! YY_G(yy_state_buf) )
+			YY_G(yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE  M4_YY_CALL_LAST_ARG);
+		if ( ! YY_G(yy_state_buf) )
+			YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
 ]])
 
 		if ( ! YY_G(yy_start) )
@@ -1749,7 +1749,7 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
 %% [17.0] code to find the next state, and perhaps do backing up, goes here
 
 	M4_YY_NOOP_GUTS_VAR();
-	return yy_is_jam ? 0 : yy_current_state;
+return yy_is_jam ? 0 : yy_current_state;
 }
 
 



CVS commit: src/external/bsd/flex/bin

2019-02-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  5 07:47:15 UTC 2019

Modified Files:
src/external/bsd/flex/bin: Makefile

Log Message:
force -O1 (unless -O0 already present) on m68k with GCC 7.  avoids a
"too-far" reference in scan.c.  was already close with GCC 6.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/flex/bin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/bin/Makefile
diff -u src/external/bsd/flex/bin/Makefile:1.12 src/external/bsd/flex/bin/Makefile:1.13
--- src/external/bsd/flex/bin/Makefile:1.12	Sun Dec 23 16:27:17 2018
+++ src/external/bsd/flex/bin/Makefile	Tue Feb  5 07:47:15 2019
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	5.4 (Berkeley) 6/24/90
-#	$NetBSD: Makefile,v 1.12 2018/12/23 16:27:17 christos Exp $
+#	$NetBSD: Makefile,v 1.13 2019/02/05 07:47:15 mrg Exp $
 #
 # By default, flex will be configured to generate 8-bit scanners only if the
 # -8 flag is given.  If you want it to always generate 8-bit scanners, add
@@ -71,4 +71,11 @@ scan.c: scan.l
 
 scan.o yylex.o: parse.h
 
+# Ugh. Generates too large offsets with -O2.
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+. if ${MACHINE_CPU} == "m68k" && empty(CFLAGS:M-O0)
+COPTS.scan.c+=-O1
+. endif
+.endif
+
 .include 



CVS commit: src/external/bsd/flex/dist/src

2019-01-26 Thread Greg Oster
Module Name:src
Committed By:   oster
Date:   Sun Jan 27 03:19:42 UTC 2019

Modified Files:
src/external/bsd/flex/dist/src: libmain.c

Log Message:
Remove extra #endif.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/flex/dist/src/libmain.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/libmain.c
diff -u src/external/bsd/flex/dist/src/libmain.c:1.5 src/external/bsd/flex/dist/src/libmain.c:1.6
--- src/external/bsd/flex/dist/src/libmain.c:1.5	Sun Jan 27 02:08:34 2019
+++ src/external/bsd/flex/dist/src/libmain.c	Sun Jan 27 03:19:42 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: libmain.c,v 1.5 2019/01/27 02:08:34 pgoyette Exp $	*/
+/*	$NetBSD: libmain.c,v 1.6 2019/01/27 03:19:42 oster Exp $	*/
 
 /* libmain - flex run-time support library "main" function */
 
@@ -25,8 +25,7 @@
 #ifndef HAVE_NBTOOL_CONFIG_H
 #include 
 #ifdef __RCSID
-__RCSID("$NetBSD: libmain.c,v 1.5 2019/01/27 02:08:34 pgoyette Exp $");
-#endif
+__RCSID("$NetBSD: libmain.c,v 1.6 2019/01/27 03:19:42 oster Exp $");
 #endif
 #endif
 



CVS commit: src/external/bsd/flex/dist/src

2019-01-26 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Sun Jan 27 03:01:48 UTC 2019

Modified Files:
src/external/bsd/flex/dist/src: libyywrap.c

Log Message:
Remove extra #endif.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/src/libyywrap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/libyywrap.c
diff -u src/external/bsd/flex/dist/src/libyywrap.c:1.4 src/external/bsd/flex/dist/src/libyywrap.c:1.5
--- src/external/bsd/flex/dist/src/libyywrap.c:1.4	Sun Jan 27 02:08:34 2019
+++ src/external/bsd/flex/dist/src/libyywrap.c	Sun Jan 27 03:01:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: libyywrap.c,v 1.4 2019/01/27 02:08:34 pgoyette Exp $	*/
+/*	$NetBSD: libyywrap.c,v 1.5 2019/01/27 03:01:48 alnsn Exp $	*/
 
 /* libyywrap - flex run-time support library "yywrap" function */
 
@@ -25,8 +25,7 @@
 #ifndef HAVE_NBTOOL_CONFIG_H
 #include 
 #ifdef __RCSID
-__RCSID("$NetBSD: libyywrap.c,v 1.4 2019/01/27 02:08:34 pgoyette Exp $");
-#endif
+__RCSID("$NetBSD: libyywrap.c,v 1.5 2019/01/27 03:01:48 alnsn Exp $");
 #endif
 #endif
 



CVS commit: src/external/bsd/flex/dist/src

2018-12-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 23 22:14:29 UTC 2018

Modified Files:
src/external/bsd/flex/dist/src: flex.skl

Log Message:
fix incorrect cast.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/flex/dist/src/flex.skl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/flex.skl
diff -u src/external/bsd/flex/dist/src/flex.skl:1.12 src/external/bsd/flex/dist/src/flex.skl:1.13
--- src/external/bsd/flex/dist/src/flex.skl:1.12	Sun Dec 23 11:27:17 2018
+++ src/external/bsd/flex/dist/src/flex.skl	Sun Dec 23 17:14:29 2018
@@ -1694,7 +1694,7 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
 		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_CURRENT_BUFFER_LVALUE->yy_buf_size = (yy_size_t) (new_size - 2);
 	}
 
 	YY_G(yy_n_chars) += number_to_move;



CVS commit: src/external/bsd/flex

2018-12-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 23 16:27:17 UTC 2018

Modified Files:
src/external/bsd/flex/bin: Makefile
src/external/bsd/flex/dist/src: dfa.c filter.c flex.skl flexdef.h
flexint.h misc.c regex.c scan.l
src/external/bsd/flex/include: config.h
Removed Files:
src/external/bsd/flex/dist/lib: Makefile.am Makefile.in reallocarray.c

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/flex/bin/Makefile
cvs rdiff -u -r1.1.1.4 -r0 src/external/bsd/flex/dist/lib/Makefile.am \
src/external/bsd/flex/dist/lib/Makefile.in
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/flex/dist/lib/reallocarray.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/src/dfa.c \
src/external/bsd/flex/dist/src/filter.c \
src/external/bsd/flex/dist/src/misc.c \
src/external/bsd/flex/dist/src/regex.c
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/flex/dist/src/flex.skl
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/flex/dist/src/flexdef.h
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/flex/dist/src/flexint.h
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/flex/dist/src/scan.l
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/flex/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/bin/Makefile
diff -u src/external/bsd/flex/bin/Makefile:1.11 src/external/bsd/flex/bin/Makefile:1.12
--- src/external/bsd/flex/bin/Makefile:1.11	Mon Jan  2 13:33:22 2017
+++ src/external/bsd/flex/bin/Makefile	Sun Dec 23 11:27:17 2018
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	5.4 (Berkeley) 6/24/90
-#	$NetBSD: Makefile,v 1.11 2017/01/02 18:33:22 christos Exp $
+#	$NetBSD: Makefile,v 1.12 2018/12/23 16:27:17 christos Exp $
 #
 # By default, flex will be configured to generate 8-bit scanners only if the
 # -8 flag is given.  If you want it to always generate 8-bit scanners, add
@@ -61,7 +61,7 @@ skel.c: flex.skl mkskel.sh flexint.h tab
 	-DFLEX_MINOR_VERSION=`echo ${VERSION} | cut -f 2 -d .` \
 	-DFLEX_SUBMINOR_VERSION=`echo ${VERSION} | cut -f 3 -d .` | \
 	${TOOL_SED} -e 's/m4postproc_/m4_/g' | \
-	${HOST_SH} ${IDIST}/mkskel.sh  > ${.TARGET}
+	${HOST_SH} ${IDIST}/mkskel.sh ${IDIST} ${TOOL_M4} ${VERSION} > ${.TARGET}
 
 .ifndef HOSTPROG
 scan.c: scan.l

Index: src/external/bsd/flex/dist/src/dfa.c
diff -u src/external/bsd/flex/dist/src/dfa.c:1.3 src/external/bsd/flex/dist/src/dfa.c:1.4
--- src/external/bsd/flex/dist/src/dfa.c:1.3	Mon Jan  2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/dfa.c	Sun Dec 23 11:27:17 2018
@@ -29,7 +29,7 @@
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
 #include "flexdef.h"
-__RCSID("$NetBSD: dfa.c,v 1.3 2017/01/02 17:45:27 christos Exp $");
+__RCSID("$NetBSD: dfa.c,v 1.4 2018/12/23 16:27:17 christos Exp $");
 
 #include "tables.h"
 
@@ -464,14 +464,9 @@ void ntod (void)
 			/* We still may want to use the table if numecs
 			 * is a power of 2.
 			 */
-			int power_of_two;
-
-			for (power_of_two = 1; power_of_two <= csize;
-			 power_of_two *= 2)
-if (numecs == power_of_two) {
-	use_NUL_table = true;
-	break;
-}
+			if (numecs <= csize && is_power_of_2(numecs)) {
+use_NUL_table = true;
+			}
 		}
 
 		if (use_NUL_table)
Index: src/external/bsd/flex/dist/src/filter.c
diff -u src/external/bsd/flex/dist/src/filter.c:1.3 src/external/bsd/flex/dist/src/filter.c:1.4
--- src/external/bsd/flex/dist/src/filter.c:1.3	Mon Jan  2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/filter.c	Sun Dec 23 11:27:17 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: filter.c,v 1.3 2017/01/02 17:45:27 christos Exp $	*/
+/*	$NetBSD: filter.c,v 1.4 2018/12/23 16:27:17 christos Exp $	*/
 
 /* filter - postprocessing of flex output through filters */
 
@@ -23,7 +23,7 @@
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
 #include "flexdef.h"
-__RCSID("$NetBSD: filter.c,v 1.3 2017/01/02 17:45:27 christos Exp $");
+__RCSID("$NetBSD: filter.c,v 1.4 2018/12/23 16:27:17 christos Exp $");
 
 static const char * check_4_gnu_m4 =
 "m4_dnl ifdef(`__gnu__', ,"
@@ -179,7 +179,7 @@ clearerr(stdin);
 
 			if ((r = chain->filter_func (chain)) == -1)
 flexfatal (_("filter_func failed"));
-			exit (0);
+			FLEX_EXIT (0);
 		}
 		else {
 			execvp (chain->argv[0],
@@ -188,7 +188,7 @@ clearerr(stdin);
 chain->argv[0]);
 		}
 
-		exit (1);
+		FLEX_EXIT (1);
 	}
 
 	/* Parent */
@@ -299,7 +299,8 @@ int filter_tee_header (struct filter *ch
 		fprintf (to_h, "\n");
 
 		/* write a fake line number. It will get fixed by the linedir filter. */
-		fprintf (to_h, "#line 4000 \"M4_YY_OUTFILE_NAME\"\n");
+		if (gen_line_dirs)
+			fprintf (to_h, "#line 4000 \"M4_YY_OUTFILE_NAME\"\n");
 
 		fprintf (to_h, "#undef %sIN_HEADER\n", prefix);
 		fprintf (to_h, "#endif /* %sHEADER_H */\n", prefix);
@@ -326,7 +327,7 @@ int 

CVS commit: src/external/bsd/flex/dist/src

2018-08-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Aug 20 10:26:59 UTC 2018

Modified Files:
src/external/bsd/flex/dist/src: flexdef.h

Log Message:
avoid redefinition of the package macros.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/flex/dist/src/flexdef.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/flexdef.h
diff -u src/external/bsd/flex/dist/src/flexdef.h:1.5 src/external/bsd/flex/dist/src/flexdef.h:1.6
--- src/external/bsd/flex/dist/src/flexdef.h:1.5	Mon Aug 20 06:24:17 2018
+++ src/external/bsd/flex/dist/src/flexdef.h	Mon Aug 20 06:26:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: flexdef.h,v 1.5 2018/08/20 10:24:17 kre Exp $	*/
+/*	$NetBSD: flexdef.h,v 1.6 2018/08/20 10:26:58 christos Exp $	*/
 
 /* flexdef - definitions file for flex */
 
@@ -36,8 +36,14 @@
 #ifndef FLEXDEF_H
 #define FLEXDEF_H 1
 
-#if !defined(_NETBSD_SOURCE) && HAVE_NBTOOL_CONFIG_H
+#if HAVE_NBTOOL_CONFIG_H
 #include "nbtool_config.h"
+#undef PACKAGE_BUGREPORT
+#undef PACKAGE_NAME
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME 
+#undef PACKAGE_URL
+#undef PACKAGE_VERSION
 #endif
 
 #ifdef HAVE_CONFIG_H



CVS commit: src/external/bsd/flex/dist/src

2018-08-20 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Aug 20 10:24:17 UTC 2018

Modified Files:
src/external/bsd/flex/dist/src: flexdef.h

Log Message:
PR toolchain/53511

_NETBSD_SOURCE and nbtool_config.h don't play well together...
(unbreak tools build on netbsd host)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/src/flexdef.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/flexdef.h
diff -u src/external/bsd/flex/dist/src/flexdef.h:1.4 src/external/bsd/flex/dist/src/flexdef.h:1.5
--- src/external/bsd/flex/dist/src/flexdef.h:1.4	Mon Aug 20 08:51:56 2018
+++ src/external/bsd/flex/dist/src/flexdef.h	Mon Aug 20 10:24:17 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: flexdef.h,v 1.4 2018/08/20 08:51:56 christos Exp $	*/
+/*	$NetBSD: flexdef.h,v 1.5 2018/08/20 10:24:17 kre Exp $	*/
 
 /* flexdef - definitions file for flex */
 
@@ -36,7 +36,7 @@
 #ifndef FLEXDEF_H
 #define FLEXDEF_H 1
 
-#if HAVE_NBTOOL_CONFIG_H
+#if !defined(_NETBSD_SOURCE) && HAVE_NBTOOL_CONFIG_H
 #include "nbtool_config.h"
 #endif
 



CVS commit: src/external/bsd/flex/dist/src

2018-08-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Aug 20 08:51:57 UTC 2018

Modified Files:
src/external/bsd/flex/dist/src: flexdef.h

Log Message:
PR/53511: Palle Lyckegaard: Fix compiling flex on a Solaris 11 host system


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/src/flexdef.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/flexdef.h
diff -u src/external/bsd/flex/dist/src/flexdef.h:1.3 src/external/bsd/flex/dist/src/flexdef.h:1.4
--- src/external/bsd/flex/dist/src/flexdef.h:1.3	Mon Jan  2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/flexdef.h	Mon Aug 20 04:51:56 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: flexdef.h,v 1.3 2017/01/02 17:45:27 christos Exp $	*/
+/*	$NetBSD: flexdef.h,v 1.4 2018/08/20 08:51:56 christos Exp $	*/
 
 /* flexdef - definitions file for flex */
 
@@ -36,6 +36,10 @@
 #ifndef FLEXDEF_H
 #define FLEXDEF_H 1
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #ifdef HAVE_CONFIG_H
 #include 
 #endif



CVS commit: src/external/bsd/flex/dist/src

2018-03-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 11 18:32:10 UTC 2018

Modified Files:
src/external/bsd/flex/dist/src: libmain.c libyywrap.c

Log Message:
don't need sys/cdefs.h if tool.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/src/libmain.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/flex/dist/src/libyywrap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/libmain.c
diff -u src/external/bsd/flex/dist/src/libmain.c:1.3 src/external/bsd/flex/dist/src/libmain.c:1.4
--- src/external/bsd/flex/dist/src/libmain.c:1.3	Mon Jan  2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/libmain.c	Sun Mar 11 14:32:10 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: libmain.c,v 1.3 2017/01/02 17:45:27 christos Exp $	*/
+/*	$NetBSD: libmain.c,v 1.4 2018/03/11 18:32:10 christos Exp $	*/
 
 /* libmain - flex run-time support library "main" function */
 
@@ -22,9 +22,11 @@
 /*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
+#ifndef HAVE_NBTOOL_CONFIG_H
 #include 
 #ifdef __RCSID
-__RCSID("$NetBSD: libmain.c,v 1.3 2017/01/02 17:45:27 christos Exp $");
+__RCSID("$NetBSD: libmain.c,v 1.4 2018/03/11 18:32:10 christos Exp $");
+#endif
 #endif
 
 #include 

Index: src/external/bsd/flex/dist/src/libyywrap.c
diff -u src/external/bsd/flex/dist/src/libyywrap.c:1.2 src/external/bsd/flex/dist/src/libyywrap.c:1.3
--- src/external/bsd/flex/dist/src/libyywrap.c:1.2	Sat Jan  9 12:38:57 2016
+++ src/external/bsd/flex/dist/src/libyywrap.c	Sun Mar 11 14:32:10 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: libyywrap.c,v 1.2 2016/01/09 17:38:57 christos Exp $	*/
+/*	$NetBSD: libyywrap.c,v 1.3 2018/03/11 18:32:10 christos Exp $	*/
 
 /* libyywrap - flex run-time support library "yywrap" function */
 
@@ -22,9 +22,11 @@
 /*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
+#ifndef HAVE_NBTOOL_CONFIG_H
 #include 
 #ifdef __RCSID
-__RCSID("$NetBSD: libyywrap.c,v 1.2 2016/01/09 17:38:57 christos Exp $");
+__RCSID("$NetBSD: libyywrap.c,v 1.3 2018/03/11 18:32:10 christos Exp $");
+#endif
 #endif
 
 int yywrap (void);



CVS commit: src/external/bsd/flex/dist/src

2017-01-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan  9 15:14:41 UTC 2017

Modified Files:
src/external/bsd/flex/dist/src: flex.skl

Log Message:
revert the c++ yy_size_t changes to maintain existing ABI.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/flex/dist/src/flex.skl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/flex.skl
diff -u src/external/bsd/flex/dist/src/flex.skl:1.10 src/external/bsd/flex/dist/src/flex.skl:1.11
--- src/external/bsd/flex/dist/src/flex.skl:1.10	Mon Jan  2 21:51:56 2017
+++ src/external/bsd/flex/dist/src/flex.skl	Mon Jan  9 10:14:41 2017
@@ -1503,9 +1503,9 @@ void yyFlexLexer::switch_streams( std::i
 }
 
 #ifdef YY_INTERACTIVE
-int yyFlexLexer::LexerInput( char* buf, yy_size_t /* max_size */ )
+int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
 #else
-int yyFlexLexer::LexerInput( char* buf, yy_size_t max_size )
+int yyFlexLexer::LexerInput( char* buf, int max_size )
 #endif
 {
 	if ( yyin.eof() || yyin.fail() )
@@ -1989,7 +1989,7 @@ static void yy_load_buffer_state  (M4_YY
 YY_BUFFER_STATE yy_create_buffer  YYFARGS2( FILE *,file, yy_size_t ,size)
 %endif
 %if-c++-only
-YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, yy_size_t size )
+YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size )
 %endif
 {
 	YY_BUFFER_STATE b;
@@ -2022,7 +2022,7 @@ static void yy_load_buffer_state  (M4_YY
  * M4_YY_DOC_PARAM
  * @return the allocated buffer state.
  */
-	YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, yy_size_t size )
+	YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
 {
 	return yy_create_buffer( *file, size );
 }



CVS commit: src/external/bsd/flex

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 15:45:14 UTC 2017

Modified Files:
src/external/bsd/flex: flex2netbsd

Log Message:
Add instruction how to generate the init files so that we don't forget.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/flex2netbsd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/flex2netbsd
diff -u src/external/bsd/flex/flex2netbsd:1.4 src/external/bsd/flex/flex2netbsd:1.5
--- src/external/bsd/flex/flex2netbsd:1.4	Sat Jan  9 12:38:56 2016
+++ src/external/bsd/flex/flex2netbsd	Sat Jan  7 10:45:14 2017
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#	$NetBSD: flex2netbsd,v 1.4 2016/01/09 17:38:56 christos Exp $
+#	$NetBSD: flex2netbsd,v 1.5 2017/01/07 15:45:14 christos Exp $
 #
 # Copyright (c) 2000 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -42,6 +42,11 @@
 #	check the config file and copy it to /usr/src/external/bsd/flex/include
 #	check the manual page against our copy if there are new options and
 #	update
+#	build the initparse.c and initscan.c without line numbers in src/dist
+#	and commit them:
+#   - nbyacc -l -d -o initparse.c parse.y
+#	- nblex -L -t -p scan.l > initscan.c
+
 
 if [ $# -ne 1 ]; then echo "flex2netbsd src"; exit 1; fi
 



CVS commit: src/external/bsd/flex/dist/src

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 15:43:27 UTC 2017

Modified Files:
src/external/bsd/flex/dist/src: initparse.c initscan.c

Log Message:
Regen without #line directives
- nbyacc -l -d -o initparse.c parse.y
- nblex -L -t -p scan.l > initscan.c


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/src/initparse.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/flex/dist/src/initscan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/initparse.c
diff -u src/external/bsd/flex/dist/src/initparse.c:1.3 src/external/bsd/flex/dist/src/initparse.c:1.4
--- src/external/bsd/flex/dist/src/initparse.c:1.3	Mon Jan  2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/initparse.c	Sat Jan  7 10:43:27 2017
@@ -19,7 +19,6 @@
 
 #define YYPURE 0
 
-#line 37 "/usr/src/external/bsd/flex/dist/src/parse.y"
 /*  Copyright (c) 1990 The Regents of the University of California. */
 /*  All rights reserved. */
 
@@ -51,7 +50,7 @@
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
 #include "flexdef.h"
-__RCSID("$NetBSD: initparse.c,v 1.3 2017/01/02 17:45:27 christos Exp $");
+__RCSID("$NetBSD: initparse.c,v 1.4 2017/01/07 15:43:27 christos Exp $");
 
 #include "tables.h"
 
@@ -101,7 +100,6 @@ int previous_continued_action;	/* whethe
  */
 #define YYSTYPE int
 
-#line 105 "parse.c"
 
 #if ! defined(YYSTYPE) && ! defined(YYSTYPE_IS_DECLARED)
 /* Default: YYSTYPE is the semantic value type. */
@@ -606,7 +604,6 @@ typedef struct {
 } YYSTACKDATA;
 /* variables for the parser stack */
 static YYSTACKDATA yystack;
-#line 953 "/usr/src/external/bsd/flex/dist/src/parse.y"
 
 
 /* build_eof_action - build the "<>" action for the active start
@@ -740,7 +737,6 @@ void yyerror( const char *msg )
 	{
 		(void)msg;
 	}
-#line 744 "parse.c"
 
 #if YYDEBUG
 #include 		/* needed for printf */
@@ -943,7 +939,6 @@ yyreduce:
 switch (yyn)
 {
 case 1:
-#line 122 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ /* add default rule */
 			int def_rule;
 
@@ -972,7 +967,6 @@ case 1:
 			}
 break;
 case 2:
-#line 151 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ /* initialize for processing rules */
 
 			/* Create default DFA start condition. */
@@ -980,11 +974,9 @@ case 2:
 			}
 break;
 case 6:
-#line 162 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ synerr( _("unknown error processing section 1") ); }
 break;
 case 7:
-#line 166 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{
 			check_options();
 			scon_stk = allocate_integer_array( lastsc + 1 );
@@ -992,64 +984,50 @@ case 7:
 			}
 break;
 case 8:
-#line 174 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ xcluflg = false; }
 break;
 case 9:
-#line 177 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ xcluflg = true; }
 break;
 case 10:
-#line 181 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ scinstal( nmstr, xcluflg ); }
 break;
 case 11:
-#line 184 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ scinstal( nmstr, xcluflg ); }
 break;
 case 12:
-#line 187 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ synerr( _("bad start condition list") ); }
 break;
 case 16:
-#line 198 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{
 			outfilename = xstrdup(nmstr);
 			did_outfilename = 1;
 			}
 break;
 case 17:
-#line 203 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ extra_type = xstrdup(nmstr); }
 break;
 case 18:
-#line 205 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ prefix = xstrdup(nmstr);
   if (strchr(prefix, '[') || strchr(prefix, ']'))
   flexerror(_("Prefix must not contain [ or ]")); }
 break;
 case 19:
-#line 209 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ yyclass = xstrdup(nmstr); }
 break;
 case 20:
-#line 211 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ headerfilename = xstrdup(nmstr); }
 break;
 case 21:
-#line 213 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ tablesext = true; tablesfilename = xstrdup(nmstr); }
 break;
 case 22:
-#line 217 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ scon_stk_ptr = yystack.l_mark[-3]; }
 break;
 case 23:
-#line 219 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ scon_stk_ptr = yystack.l_mark[-3]; }
 break;
 case 25:
-#line 224 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{
 			/* Initialize for a parse of one rule. */
 			trlcontxt = variable_trail_rule = varlength = false;
@@ -1062,7 +1040,6 @@ case 25:
 			}
 break;
 case 26:
-#line 237 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{
 			pat = yystack.l_mark[0];
 			finish_rule( pat, variable_trail_rule,
@@ -1099,7 +1076,6 @@ case 26:
 			}
 break;
 case 27:
-#line 273 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{
 			pat = yystack.l_mark[0];
 			finish_rule( pat, variable_trail_rule,
@@ -1124,7 +1100,6 @@ case 27:
 			}
 break;
 case 28:
-#line 297 

CVS commit: src/external/bsd/flex

2017-01-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  6 17:26:41 UTC 2017

Modified Files:
src/external/bsd/flex: Makefile.inc

Log Message:
get the right version even for the tools build.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/flex/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/Makefile.inc
diff -u src/external/bsd/flex/Makefile.inc:1.5 src/external/bsd/flex/Makefile.inc:1.6
--- src/external/bsd/flex/Makefile.inc:1.5	Fri Jan  6 12:13:22 2017
+++ src/external/bsd/flex/Makefile.inc	Fri Jan  6 12:26:41 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.5 2017/01/06 17:13:22 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.6 2017/01/06 17:26:41 christos Exp $
 
 WARNS?=	1
 
@@ -7,7 +7,7 @@ WARNS?=	1
 BINDIR?= /usr/bin
 
 IDIST=	${NETBSDSRCDIR}/external/bsd/flex/dist/src
-.if defined(HOSTPROGNAME)
+.if !empty(TOOL_SED:M*/*) && !exists(${TOOL_SED})
 VERSION = 3.x
 .else
 VERSION != ${TOOL_SED} -ne "s/PACKAGE_VERSION='\(.*\)'/\1/p" \



CVS commit: src/external/bsd/flex

2017-01-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  6 17:13:22 UTC 2017

Modified Files:
src/external/bsd/flex: Makefile.inc

Log Message:
don't use sed for the tools version because during objdir etc runs we don't
have ${TOOL_SED} yet available.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/Makefile.inc
diff -u src/external/bsd/flex/Makefile.inc:1.4 src/external/bsd/flex/Makefile.inc:1.5
--- src/external/bsd/flex/Makefile.inc:1.4	Mon Jan  2 12:45:26 2017
+++ src/external/bsd/flex/Makefile.inc	Fri Jan  6 12:13:22 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.4 2017/01/02 17:45:26 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.5 2017/01/06 17:13:22 christos Exp $
 
 WARNS?=	1
 
@@ -7,8 +7,12 @@ WARNS?=	1
 BINDIR?= /usr/bin
 
 IDIST=	${NETBSDSRCDIR}/external/bsd/flex/dist/src
+.if defined(HOSTPROGNAME)
+VERSION = 3.x
+.else
 VERSION != ${TOOL_SED} -ne "s/PACKAGE_VERSION='\(.*\)'/\1/p" \
 	${IDIST}/../configure
+.endif
 
 CPPFLAGS+= -DHAVE_CONFIG_H -I${.CURDIR}/../include -I${IDIST} \
 	-DLOCALEDIR=\"/usr/share/locale\"



CVS commit: src/external/bsd/flex/dist/src

2017-01-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  3 01:56:04 UTC 2017

Modified Files:
src/external/bsd/flex/dist/src: flex.skl main.c

Log Message:
fix the re-entrant prefixed case.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/flex/dist/src/flex.skl
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/flex/dist/src/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/flex.skl
diff -u src/external/bsd/flex/dist/src/flex.skl:1.8 src/external/bsd/flex/dist/src/flex.skl:1.9
--- src/external/bsd/flex/dist/src/flex.skl:1.8	Mon Jan  2 19:50:11 2017
+++ src/external/bsd/flex/dist/src/flex.skl	Mon Jan  2 20:56:03 2017
@@ -113,7 +113,7 @@ m4_ifdef( [[M4_YY_PREFIX]],, [[m4_define
 
 m4preproc_define(`M4_GEN_PREFIX',
 ``[[#define yy$1 ]]M4_YY_PREFIX[[$1]]
-m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
+%# m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
 
 %if-c++-only
 /* The c++ scanner is a mess. The FlexLexer.h header file relies on the
@@ -126,7 +126,8 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]
 %endif
 
 %if-c-only
-m4_ifelse(M4_YY_PREFIX,M4_YY_PREFIX,,
+%if-reentrant
+m4_ifelse(M4_YY_PREFIX,yy,,
 M4_GEN_PREFIX(`_create_buffer')
 M4_GEN_PREFIX(`_delete_buffer')
 M4_GEN_PREFIX(`_scan_buffer')
@@ -164,6 +165,7 @@ m4_ifelse(M4_YY_PREFIX,M4_YY_PREFIX,,
 M4_GEN_PREFIX(`wrap')
 )
 %endif
+%endif
 
 m4_ifdef( [[M4_YY_BISON_LVAL]],
 [[

Index: src/external/bsd/flex/dist/src/main.c
diff -u src/external/bsd/flex/dist/src/main.c:1.5 src/external/bsd/flex/dist/src/main.c:1.6
--- src/external/bsd/flex/dist/src/main.c:1.5	Mon Jan  2 19:22:56 2017
+++ src/external/bsd/flex/dist/src/main.c	Mon Jan  2 20:56:03 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.5 2017/01/03 00:22:56 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.6 2017/01/03 01:56:03 christos Exp $	*/
 
 /* flex - tool to generate fast lexical analyzers */
 
@@ -33,7 +33,7 @@
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
 #include "flexdef.h"
-__RCSID("$NetBSD: main.c,v 1.5 2017/01/03 00:22:56 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.6 2017/01/03 01:56:03 christos Exp $");
 
 
 #include "version.h"
@@ -1590,9 +1590,9 @@ void readin (void)
 	if (!do_yywrap) {
 		if (!C_plus_plus) {
 			 if (reentrant)
-outn ("\n#define yywrap(yyscanner) (/*CONSTCOND*/1)");
+out_str ("\n#define %swrap(yyscanner) (/*CONSTCOND*/1)\n", prefix);
 			 else
-outn ("\n#define yywrap() (/*CONSTCOND*/1)");
+out_str ("\n#define %swrap() (/*CONSTCOND*/1)\n", prefix);
 		}
 		outn ("#define YY_SKIP_YYWRAP");
 	}



CVS commit: src/external/bsd/flex/dist/src

2017-01-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  3 00:50:11 UTC 2017

Modified Files:
src/external/bsd/flex/dist/src: flex.skl

Log Message:
Add missing macros to the non-recursive prefixed-parser. Disable macros
for the recursive parser.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/flex/dist/src/flex.skl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/flex.skl
diff -u src/external/bsd/flex/dist/src/flex.skl:1.7 src/external/bsd/flex/dist/src/flex.skl:1.8
--- src/external/bsd/flex/dist/src/flex.skl:1.7	Mon Jan  2 19:22:56 2017
+++ src/external/bsd/flex/dist/src/flex.skl	Mon Jan  2 19:50:11 2017
@@ -61,11 +61,17 @@ m4_changequote([[, ]])
 m4_ifelse(M4_YY_PREFIX,yy,,
 #define yy_create_buffer M4_YY_PREFIX[[_create_buffer]]
 #define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]]
-#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]]
+#define yy_scan_buffer M4_YY_PREFIX[[_scan_buffer]]
+#define yy_scan_string M4_YY_PREFIX[[_scan_string]]
+#define yy_scan_bytes M4_YY_PREFIX[[_scan_bytes]]
 #define yy_init_buffer M4_YY_PREFIX[[_init_buffer]]
 #define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]]
 #define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]]
 #define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]]
+#define yypush_buffer_state M4_YY_PREFIX[[push_buffer_state]]
+#define yypop_buffer_state M4_YY_PREFIX[[pop_buffer_state]]
+#define yyensure_buffer_stack M4_YY_PREFIX[[ensure_buffer_stack]]
+#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]]
 #define yyin M4_YY_PREFIX[[in]]
 #define yyleng M4_YY_PREFIX[[leng]]
 #define yylex M4_YY_PREFIX[[lex]]
@@ -120,7 +126,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]
 %endif
 
 %if-c-only
-m4_ifelse(M4_YY_PREFIX,yy,,
+m4_ifelse(M4_YY_PREFIX,M4_YY_PREFIX,,
 M4_GEN_PREFIX(`_create_buffer')
 M4_GEN_PREFIX(`_delete_buffer')
 M4_GEN_PREFIX(`_scan_buffer')



CVS commit: src/external/bsd/flex/dist/src

2017-01-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  3 00:22:56 UTC 2017

Modified Files:
src/external/bsd/flex/dist/src: flex.skl main.c

Log Message:
don't #define yywrap yywrap (that is if the prefix is yy, don't #define macros
for the same name). Breaks compatibility for things like:
#ifndef yywrap
int
yywrap(void)
{
return 1;
}
#endif


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/flex/dist/src/flex.skl
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/src/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/flex.skl
diff -u src/external/bsd/flex/dist/src/flex.skl:1.6 src/external/bsd/flex/dist/src/flex.skl:1.7
--- src/external/bsd/flex/dist/src/flex.skl:1.6	Mon Jan  2 18:21:14 2017
+++ src/external/bsd/flex/dist/src/flex.skl	Mon Jan  2 19:22:56 2017
@@ -120,6 +120,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]
 %endif
 
 %if-c-only
+m4_ifelse(M4_YY_PREFIX,yy,,
 M4_GEN_PREFIX(`_create_buffer')
 M4_GEN_PREFIX(`_delete_buffer')
 M4_GEN_PREFIX(`_scan_buffer')
@@ -155,6 +156,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]
 M4_GEN_PREFIX(`set_column')
 ]])
 M4_GEN_PREFIX(`wrap')
+)
 %endif
 
 m4_ifdef( [[M4_YY_BISON_LVAL]],
@@ -170,11 +172,14 @@ m4_ifdef( [[]],
 ]])
 
 
+m4_ifelse(M4_YY_PREFIX,yy,,
 M4_GEN_PREFIX(`alloc')
 M4_GEN_PREFIX(`realloc')
 M4_GEN_PREFIX(`free')
+)
 
 %if-c-only
+m4_ifelse(M4_YY_PREFIX,yy,,
 m4_ifdef( [[M4_YY_NOT_REENTRANT]],
 [[
 M4_GEN_PREFIX(`text')
@@ -184,6 +189,7 @@ m4_ifdef( [[M4_YY_NOT_REENTRANT]],
 M4_GEN_PREFIX(`_flex_debug')
 M4_GEN_PREFIX(`lineno')
 ]])
+)
 %endif
 
 

Index: src/external/bsd/flex/dist/src/main.c
diff -u src/external/bsd/flex/dist/src/main.c:1.4 src/external/bsd/flex/dist/src/main.c:1.5
--- src/external/bsd/flex/dist/src/main.c:1.4	Mon Jan  2 14:24:39 2017
+++ src/external/bsd/flex/dist/src/main.c	Mon Jan  2 19:22:56 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.4 2017/01/02 19:24:39 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.5 2017/01/03 00:22:56 christos Exp $	*/
 
 /* flex - tool to generate fast lexical analyzers */
 
@@ -33,7 +33,7 @@
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
 #include "flexdef.h"
-__RCSID("$NetBSD: main.c,v 1.4 2017/01/02 19:24:39 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.5 2017/01/03 00:22:56 christos Exp $");
 
 
 #include "version.h"
@@ -1589,7 +1589,6 @@ void readin (void)
 
 	if (!do_yywrap) {
 		if (!C_plus_plus) {
-			 outn ("\n#undef yywrap");
 			 if (reentrant)
 outn ("\n#define yywrap(yyscanner) (/*CONSTCOND*/1)");
 			 else



CVS commit: src/external/bsd/flex/dist/src

2017-01-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan  2 23:21:14 UTC 2017

Modified Files:
src/external/bsd/flex/dist/src: flex.skl gen.c initscan.c

Log Message:
more yy_size_t <-> int fixes


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/flex/dist/src/flex.skl
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/src/gen.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/flex/dist/src/initscan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/flex.skl
diff -u src/external/bsd/flex/dist/src/flex.skl:1.5 src/external/bsd/flex/dist/src/flex.skl:1.6
--- src/external/bsd/flex/dist/src/flex.skl:1.5	Mon Jan  2 16:06:10 2017
+++ src/external/bsd/flex/dist/src/flex.skl	Mon Jan  2 18:21:14 2017
@@ -384,10 +384,6 @@ typedef struct yy_buffer_state *YY_BUFFE
 #define YY_TYPEDEF_YY_SIZE_T
 typedef size_t yy_size_t;
 #endif
-#ifndef YY_TYPEDEF_YY_SSIZE_T
-#define YY_TYPEDEF_YY_SSIZE_T
-typedef ssize_t yy_ssize_t;
-#endif
 
 %if-not-reentrant
 extern yy_size_t yyleng;
@@ -574,7 +570,7 @@ static int yy_did_buffer_switch_on_eof;
 
 void yyrestart ( FILE *input_file M4_YY_PROTO_LAST_ARG );
 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG );
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size M4_YY_PROTO_LAST_ARG );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, yy_size_t size M4_YY_PROTO_LAST_ARG );
 void yy_delete_buffer ( YY_BUFFER_STATE b M4_YY_PROTO_LAST_ARG );
 void yy_flush_buffer ( YY_BUFFER_STATE b M4_YY_PROTO_LAST_ARG );
 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG );
@@ -1495,9 +1491,9 @@ void yyFlexLexer::switch_streams( std::i
 }
 
 #ifdef YY_INTERACTIVE
-int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
+int yyFlexLexer::LexerInput( char* buf, yy_size_t /* max_size */ )
 #else
-int yyFlexLexer::LexerInput( char* buf, int max_size )
+int yyFlexLexer::LexerInput( char* buf, yy_size_t max_size )
 #endif
 {
 	if ( yyin.eof() || yyin.fail() )
@@ -1592,7 +1588,7 @@ int yyFlexLexer::yy_get_next_buffer()
 
 	else
 		{
-			yy_ssize_t num_to_read =
+			yy_size_t num_to_read =
 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
 
 		while ( num_to_read <= 0 )
@@ -1669,7 +1665,7 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
 
 	if ((YY_G(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_G(yy_n_chars) + number_to_move + (YY_G(yy_n_chars) >> 1);
+		yy_size_t new_size = YY_G(yy_n_chars) + number_to_move + (YY_G(yy_n_chars) >> 1);
 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
 			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size M4_YY_CALL_LAST_ARG );
 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -1978,10 +1974,10 @@ static void yy_load_buffer_state  (M4_YY
  * @return the allocated buffer state.
  */
 %if-c-only
-YY_BUFFER_STATE yy_create_buffer  YYFARGS2( FILE *,file, int ,size)
+YY_BUFFER_STATE yy_create_buffer  YYFARGS2( FILE *,file, yy_size_t ,size)
 %endif
 %if-c++-only
-YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size )
+YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, yy_size_t size )
 %endif
 {
 	YY_BUFFER_STATE b;
@@ -2014,7 +2010,7 @@ static void yy_load_buffer_state  (M4_YY
  * M4_YY_DOC_PARAM
  * @return the allocated buffer state.
  */
-	YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
+	YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, yy_size_t size )
 {
 	return yy_create_buffer( *file, size );
 }
@@ -2286,7 +2282,7 @@ YY_BUFFER_STATE yy_scan_buffer  YYFARGS2
 	if ( ! b )
 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
 
-	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
+	b->yy_buf_size = (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;

Index: src/external/bsd/flex/dist/src/gen.c
diff -u src/external/bsd/flex/dist/src/gen.c:1.4 src/external/bsd/flex/dist/src/gen.c:1.5
--- src/external/bsd/flex/dist/src/gen.c:1.4	Mon Jan  2 16:20:00 2017
+++ src/external/bsd/flex/dist/src/gen.c	Mon Jan  2 18:21:14 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: gen.c,v 1.4 2017/01/02 21:20:00 christos Exp $	*/
+/*	$NetBSD: gen.c,v 1.5 2017/01/02 23:21:14 christos Exp $	*/
 
 /* gen - actual generation (writing) of flex scanners */
 
@@ -33,7 +33,7 @@
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
 #include "flexdef.h"
-__RCSID("$NetBSD: gen.c,v 1.4 2017/01/02 21:20:00 christos Exp $");
+__RCSID("$NetBSD: gen.c,v 1.5 2017/01/02 23:21:14 christos Exp $");
 
 #include "tables.h"
 
@@ -1509,11 +1509,11 @@ void make_tables (void)
 	if (yymore_used && !yytext_is_array) {
 		indent_puts 

CVS commit: src/external/bsd/flex/dist/src

2017-01-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan  2 21:20:00 UTC 2017

Modified Files:
src/external/bsd/flex/dist/src: gen.c initscan.c

Log Message:
another int -> size_t


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/src/gen.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/flex/dist/src/initscan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/gen.c
diff -u src/external/bsd/flex/dist/src/gen.c:1.3 src/external/bsd/flex/dist/src/gen.c:1.4
--- src/external/bsd/flex/dist/src/gen.c:1.3	Mon Jan  2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/gen.c	Mon Jan  2 16:20:00 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: gen.c,v 1.3 2017/01/02 17:45:27 christos Exp $	*/
+/*	$NetBSD: gen.c,v 1.4 2017/01/02 21:20:00 christos Exp $	*/
 
 /* gen - actual generation (writing) of flex scanners */
 
@@ -33,7 +33,7 @@
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
 #include "flexdef.h"
-__RCSID("$NetBSD: gen.c,v 1.3 2017/01/02 17:45:27 christos Exp $");
+__RCSID("$NetBSD: gen.c,v 1.4 2017/01/02 21:20:00 christos Exp $");
 
 #include "tables.h"
 
@@ -1966,7 +1966,7 @@ void make_tables (void)
 		("if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )");
 	++indent_level;
 	indent_puts ("{");
-	indent_puts ("int yyl;");
+	indent_puts ("yy_size_t yyl;");
 	do_indent ();
 	out_str ("for ( yyl = %s; yyl < yyleng; ++yyl )\n",
 		 yymore_used ? (yytext_is_array ? "YY_G(yy_prev_more_offset)" :

Index: src/external/bsd/flex/dist/src/initscan.c
diff -u src/external/bsd/flex/dist/src/initscan.c:1.5 src/external/bsd/flex/dist/src/initscan.c:1.6
--- src/external/bsd/flex/dist/src/initscan.c:1.5	Mon Jan  2 15:53:11 2017
+++ src/external/bsd/flex/dist/src/initscan.c	Mon Jan  2 16:20:00 2017
@@ -104,7 +104,7 @@
 
 /* end standard C headers. */
 
-/*	$NetBSD: initscan.c,v 1.5 2017/01/02 20:53:11 christos Exp $	*/
+/*	$NetBSD: initscan.c,v 1.6 2017/01/02 21:20:00 christos Exp $	*/
 
 /* flex integer type definitions */
 
@@ -232,8 +232,12 @@ typedef struct yy_buffer_state *YY_BUFFE
 #define YY_TYPEDEF_YY_SIZE_T
 typedef size_t yy_size_t;
 #endif
+#ifndef YY_TYPEDEF_YY_SSIZE_T
+#define YY_TYPEDEF_YY_SSIZE_T
+typedef ssize_t yy_ssize_t;
+#endif
 
-extern int yyleng;
+extern yy_size_t yyleng;
 
 extern FILE *yyin, *yyout;
 
@@ -271,12 +275,12 @@ struct yy_buffer_state
 	/* Size of input buffer in bytes, not including room for EOB
 	 * characters.
 	 */
-	int yy_buf_size;
+	size_t yy_buf_size;
 
 	/* Number of characters read into yy_ch_buf, not including EOB
 	 * characters.
 	 */
-	int yy_n_chars;
+	size_t yy_n_chars;
 
 	/* Whether we "own" the buffer - i.e., we know we created it,
 	 * and can realloc() it to grow it, and should free() it to
@@ -345,8 +349,8 @@ static YY_BUFFER_STATE * yy_buffer_stack
 
 /* yy_hold_char holds the character lost when yytext is formed. */
 static char yy_hold_char;
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-int yyleng;
+static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
+yy_size_t yyleng;
 
 /* Points to current character in buffer. */
 static char *yy_c_buf_p = NULL;
@@ -373,7 +377,7 @@ static void yy_init_buffer ( YY_BUFFER_S
 
 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_bytes ( const char *bytes, yy_size_t len  );
 
 void *yyalloc ( yy_size_t  );
 void *yyrealloc ( void *, yy_size_t  );
@@ -1921,10 +1925,10 @@ int yy_flex_debug = 0;
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET
 char *yytext;
-#line 1 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
-/*	$NetBSD: initscan.c,v 1.5 2017/01/02 20:53:11 christos Exp $	*/
+#line 1 "/usr/src/external/bsd/flex/dist/src/scan.l"
+/*	$NetBSD: initscan.c,v 1.6 2017/01/02 21:20:00 christos Exp $	*/
 /* scan.l - scanner for flex input -*-C-*- */
-#line 6 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 6 "/usr/src/external/bsd/flex/dist/src/scan.l"
 /*  Copyright (c) 1990 The Regents of the University of California. */
 /*  All rights reserved. */
 
@@ -1956,7 +1960,7 @@ char *yytext;
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
 #include "flexdef.h"
-__RCSID("$NetBSD: initscan.c,v 1.5 2017/01/02 20:53:11 christos Exp $");
+__RCSID("$NetBSD: initscan.c,v 1.6 2017/01/02 21:20:00 christos Exp $");
 
 #include "parse.h"
 extern bool tablesverify, tablesext;
@@ -2044,9 +2048,9 @@ extern int yylval;	/* XXX: for bootstrap
 if (!indented_code) line_directive_out(NULL, 0);\
 } while (0)
 
-#line 2047 ""
+#line 2051 ""
 
-#line 2049 ""
+#line 2053 ""
 
 #define INITIAL 0
 #define SECT2 1
@@ -2111,7 +2115,7 @@ FILE *yyget_out ( void );
 
 void yyset_out  ( FILE 

CVS commit: src/external/bsd/flex/dist/src

2017-01-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan  2 21:06:10 UTC 2017

Modified Files:
src/external/bsd/flex/dist/src: flex.skl

Log Message:
another int to yy_size_t


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/src/flex.skl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/flex.skl
diff -u src/external/bsd/flex/dist/src/flex.skl:1.4 src/external/bsd/flex/dist/src/flex.skl:1.5
--- src/external/bsd/flex/dist/src/flex.skl:1.4	Mon Jan  2 15:53:11 2017
+++ src/external/bsd/flex/dist/src/flex.skl	Mon Jan  2 16:06:10 2017
@@ -415,7 +415,7 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
  */
 #define  YY_LESS_LINENO(n) \
 do { \
-int yyl;\
+yy_size_t yyl;\
 for ( yyl = n; yyl < yyleng; ++yyl )\
 if ( yytext[yyl] == '\n' )\
 --yylineno;\



CVS commit: src/external/bsd/flex/dist/src

2017-01-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan  2 20:53:11 UTC 2017

Modified Files:
src/external/bsd/flex/dist/src: flex.skl initscan.c

Log Message:
deal with our int -> size_t changes.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/src/flex.skl
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/src/initscan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/flex.skl
diff -u src/external/bsd/flex/dist/src/flex.skl:1.3 src/external/bsd/flex/dist/src/flex.skl:1.4
--- src/external/bsd/flex/dist/src/flex.skl:1.3	Mon Jan  2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/flex.skl	Mon Jan  2 15:53:11 2017
@@ -384,9 +384,13 @@ typedef struct yy_buffer_state *YY_BUFFE
 #define YY_TYPEDEF_YY_SIZE_T
 typedef size_t yy_size_t;
 #endif
+#ifndef YY_TYPEDEF_YY_SSIZE_T
+#define YY_TYPEDEF_YY_SSIZE_T
+typedef ssize_t yy_ssize_t;
+#endif
 
 %if-not-reentrant
-extern int yyleng;
+extern yy_size_t yyleng;
 %endif
 
 %if-c-only
@@ -463,12 +467,12 @@ struct yy_buffer_state
 	/* Size of input buffer in bytes, not including room for EOB
 	 * characters.
 	 */
-	int yy_buf_size;
+	size_t yy_buf_size;
 
 	/* Number of characters read into yy_ch_buf, not including EOB
 	 * characters.
 	 */
-	int yy_n_chars;
+	size_t yy_n_chars;
 
 	/* Whether we "own" the buffer - i.e., we know we created it,
 	 * and can realloc() it to grow it, and should free() it to
@@ -553,8 +557,8 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
 %not-for-header
 /* yy_hold_char holds the character lost when yytext is formed. */
 static char yy_hold_char;
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-int yyleng;
+static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
+yy_size_t yyleng;
 
 /* Points to current character in buffer. */
 static char *yy_c_buf_p = NULL;
@@ -586,7 +590,7 @@ static void yy_init_buffer ( YY_BUFFER_S
 
 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size M4_YY_PROTO_LAST_ARG );
 YY_BUFFER_STATE yy_scan_string ( const char *yy_str M4_YY_PROTO_LAST_ARG );
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len M4_YY_PROTO_LAST_ARG );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len M4_YY_PROTO_LAST_ARG );
 
 %endif
 
@@ -701,8 +705,8 @@ struct yyguts_t
 size_t yy_buffer_stack_max; /**< capacity of stack. */
 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
 char yy_hold_char;
-int yy_n_chars;
-int yyleng_r;
+yy_size_t yy_n_chars;
+yy_size_t yyleng_r;
 char *yy_c_buf_p;
 int yy_init;
 int yy_start;
@@ -839,7 +843,7 @@ void yyset_out  ( FILE * _out_str M4_YY_
 
 m4_ifdef( [[M4_YY_NO_GET_LENG]],,
 [[
-			int yyget_leng ( M4_YY_PROTO_ONLY_ARG );
+			yy_size_t yyget_leng ( M4_YY_PROTO_ONLY_ARG );
 ]])
 
 m4_ifdef( [[M4_YY_NO_GET_TEXT]],,
@@ -1546,7 +1550,7 @@ int yyFlexLexer::yy_get_next_buffer()
 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;
+	yy_size_t number_to_move, i;
 	int ret_val;
 
 	if ( YY_G(yy_c_buf_p) > _CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] )
@@ -1575,7 +1579,7 @@ int yyFlexLexer::yy_get_next_buffer()
 	/* Try to read more data. */
 
 	/* First move last chars to start of buffer. */
-	number_to_move = (int) (YY_G(yy_c_buf_p) - YY_G(yytext_ptr) - 1);
+	number_to_move = (yy_size_t) (YY_G(yy_c_buf_p) - YY_G(yytext_ptr) - 1);
 
 	for ( i = 0; i < number_to_move; ++i )
 		*(dest++) = *(source++);
@@ -1588,7 +1592,7 @@ int yyFlexLexer::yy_get_next_buffer()
 
 	else
 		{
-			int num_to_read =
+			yy_ssize_t num_to_read =
 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
 
 		while ( num_to_read <= 0 )
@@ -1607,7 +1611,7 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
 
 			if ( b->yy_is_our_buffer )
 {
-int new_size = b->yy_buf_size * 2;
+yy_size_t new_size = b->yy_buf_size * 2;
 
 if ( new_size <= 0 )
 	b->yy_buf_size += b->yy_buf_size / 8;
@@ -1749,7 +1753,7 @@ m4_ifdef( [[M4_YY_NO_UNPUT]],,
 	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_G(yy_n_chars) + 2;
+		yy_size_t number_to_move = YY_G(yy_n_chars) + 2;
 		char *dest = _CURRENT_BUFFER_LVALUE->yy_ch_buf[
 	YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
 		char *source =
@@ -1761,7 +1765,7 @@ m4_ifdef( [[M4_YY_NO_UNPUT]],,
 		yy_cp += (int) (dest - source);
 		yy_bp += (int) (dest - source);
 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
-			YY_G(yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+			YY_G(yy_n_chars) = 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" );
@@ -1816,7 +1820,7 @@ m4_ifdef( [[M4_YY_USE_LINENO]],
 
 

CVS commit: src/external/bsd/flex/dist/src

2017-01-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan  2 19:24:40 UTC 2017

Modified Files:
src/external/bsd/flex/dist/src: main.c

Log Message:
avoid yywrap redefinition


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/src/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/main.c
diff -u src/external/bsd/flex/dist/src/main.c:1.3 src/external/bsd/flex/dist/src/main.c:1.4
--- src/external/bsd/flex/dist/src/main.c:1.3	Mon Jan  2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/main.c	Mon Jan  2 14:24:39 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.3 2017/01/02 17:45:27 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.4 2017/01/02 19:24:39 christos Exp $	*/
 
 /* flex - tool to generate fast lexical analyzers */
 
@@ -33,7 +33,7 @@
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
 #include "flexdef.h"
-__RCSID("$NetBSD: main.c,v 1.3 2017/01/02 17:45:27 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.4 2017/01/02 19:24:39 christos Exp $");
 
 
 #include "version.h"
@@ -1589,6 +1589,7 @@ void readin (void)
 
 	if (!do_yywrap) {
 		if (!C_plus_plus) {
+			 outn ("\n#undef yywrap");
 			 if (reentrant)
 outn ("\n#define yywrap(yyscanner) (/*CONSTCOND*/1)");
 			 else



CVS commit: src/external/bsd/flex/dist/src

2017-01-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan  2 18:41:18 UTC 2017

Removed Files:
src/external/bsd/flex/dist/src: skel.c

Log Message:
delete the generated skeleton, we generate it all the time.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/external/bsd/flex/dist/src/skel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/flex

2017-01-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan  2 18:33:22 UTC 2017

Modified Files:
src/external/bsd/flex/bin: Makefile
src/external/bsd/flex/dist/src: initscan.c

Log Message:
fix the scanner build and regen


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/flex/bin/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/src/initscan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/bin/Makefile
diff -u src/external/bsd/flex/bin/Makefile:1.10 src/external/bsd/flex/bin/Makefile:1.11
--- src/external/bsd/flex/bin/Makefile:1.10	Mon Jan  2 12:45:26 2017
+++ src/external/bsd/flex/bin/Makefile	Mon Jan  2 13:33:22 2017
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	5.4 (Berkeley) 6/24/90
-#	$NetBSD: Makefile,v 1.10 2017/01/02 17:45:26 christos Exp $
+#	$NetBSD: Makefile,v 1.11 2017/01/02 18:33:22 christos Exp $
 #
 # By default, flex will be configured to generate 8-bit scanners only if the
 # -8 flag is given.  If you want it to always generate 8-bit scanners, add
@@ -55,7 +55,7 @@ LINKS=	${BINDIR}/lex ${BINDIR}/flex \
 MLINKS=	flex.1 lex.1 
 
 skel.c: flex.skl mkskel.sh flexint.h tables_shared.h
-	${TOOL_SED} -e 's/m4_/m4postproc_/g' -e 's/m4preproc_/m4_/g' \
+	${TOOL_SED} -e 's/4_/a4_/g; s/m4preproc_/m4_/g' \
 	${IDIST}/flex.skl | ${TOOL_M4} -I${IDIST} -P \
 	-DFLEX_MAJOR_VERSION=`echo ${VERSION} | cut -f 1 -d .` \
 	-DFLEX_MINOR_VERSION=`echo ${VERSION} | cut -f 2 -d .` \

Index: src/external/bsd/flex/dist/src/initscan.c
diff -u src/external/bsd/flex/dist/src/initscan.c:1.3 src/external/bsd/flex/dist/src/initscan.c:1.4
--- src/external/bsd/flex/dist/src/initscan.c:1.3	Mon Jan  2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/initscan.c	Mon Jan  2 13:33:22 2017
@@ -1,5 +1,5 @@
 
-#line 3 ""
+#line 2 ""
 
 #define  YY_INT_ALIGNED short int
 
@@ -8,11 +8,89 @@
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
 #define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 0
+#define YY_FLEX_SUBMINOR_VERSION 3
 #if YY_FLEX_SUBMINOR_VERSION > 0
 #define FLEX_BETA
 #endif
 
+#define yy_create_buffer yy_create_buffer
+
+#define yy_delete_buffer yy_delete_buffer
+
+#define yy_scan_buffer yy_scan_buffer
+
+#define yy_scan_string yy_scan_string
+
+#define yy_scan_bytes yy_scan_bytes
+
+#define yy_init_buffer yy_init_buffer
+
+#define yy_flush_buffer yy_flush_buffer
+
+#define yy_load_buffer_state yy_load_buffer_state
+
+#define yy_switch_to_buffer yy_switch_to_buffer
+
+#define yypush_buffer_state yypush_buffer_state
+
+#define yypop_buffer_state yypop_buffer_state
+
+#define yyensure_buffer_stack yyensure_buffer_stack
+
+#define yylex yylex
+
+#define yyrestart yyrestart
+
+#define yylex_init yylex_init
+
+#define yylex_init_extra yylex_init_extra
+
+#define yylex_destroy yylex_destroy
+
+#define yyget_debug yyget_debug
+
+#define yyset_debug yyset_debug
+
+#define yyget_extra yyget_extra
+
+#define yyset_extra yyset_extra
+
+#define yyget_in yyget_in
+
+#define yyset_in yyset_in
+
+#define yyget_out yyget_out
+
+#define yyset_out yyset_out
+
+#define yyget_leng yyget_leng
+
+#define yyget_text yyget_text
+
+#define yyget_lineno yyget_lineno
+
+#define yyset_lineno yyset_lineno
+
+#define yywrap yywrap
+
+#define yyalloc yyalloc
+
+#define yyrealloc yyrealloc
+
+#define yyfree yyfree
+
+#define yytext yytext
+
+#define yyleng yyleng
+
+#define yyin yyin
+
+#define yyout yyout
+
+#define yy_flex_debug yy_flex_debug
+
+#define yylineno yylineno
+
 /* First, we deal with  platform-specific or compiler-specific issues. */
 
 /* begin standard C headers. */
@@ -26,7 +104,7 @@
 
 /* end standard C headers. */
 
-/*	$NetBSD: initscan.c,v 1.3 2017/01/02 17:45:27 christos Exp $	*/
+/*	$NetBSD: initscan.c,v 1.4 2017/01/02 18:33:22 christos Exp $	*/
 
 /* flex integer type definitions */
 
@@ -92,56 +170,38 @@ typedef unsigned int flex_uint32_t;
 
 #endif /* ! FLEXINT_H */
 
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else	/* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif	/* defined (__STDC__) */
-#endif	/* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
 #define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
 #else
-#define yyconst
+#define yynoreturn
 #endif
 
 /* Returned upon end-of-file. */
 #define YY_NULL 0
 
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
+/* 

CVS commit: src/external/bsd/flex/include

2017-01-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan  2 18:15:55 UTC 2017

Modified Files:
src/external/bsd/flex/include: config.h

Log Message:
avoid m4 redefinition


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/flex/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/include/config.h
diff -u src/external/bsd/flex/include/config.h:1.7 src/external/bsd/flex/include/config.h:1.8
--- src/external/bsd/flex/include/config.h:1.7	Mon Jan  2 12:45:32 2017
+++ src/external/bsd/flex/include/config.h	Mon Jan  2 13:15:55 2017
@@ -155,7 +155,9 @@
 #undef LT_OBJDIR
 
 /* Define to the m4 executable name. */
-#define M4 "/usr/bin/gm4"
+#ifndef M4
+#define M4 "/usr/bin/m4"
+#endif
 
 /* Name of package */
 #define PACKAGE "flex"



CVS commit: src/external/bsd/flex/dist/src

2016-03-19 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Thu Mar 17 15:28:00 UTC 2016

Modified Files:
src/external/bsd/flex/dist/src: initparse.c initscan.c

Log Message:
Regen without #line directives.
- nbyacc -l -d -o initparse.c parse.y
- nblex -L -t -p scan.l > initscan.c


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/flex/dist/src/initparse.c \
src/external/bsd/flex/dist/src/initscan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/initparse.c
diff -u src/external/bsd/flex/dist/src/initparse.c:1.1 src/external/bsd/flex/dist/src/initparse.c:1.2
--- src/external/bsd/flex/dist/src/initparse.c:1.1	Sat Jan  9 17:39:52 2016
+++ src/external/bsd/flex/dist/src/initparse.c	Thu Mar 17 15:28:00 2016
@@ -19,7 +19,6 @@
 
 #define YYPURE 0
 
-#line 37 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 /*  Copyright (c) 1990 The Regents of the University of California. */
 /*  All rights reserved. */
 
@@ -51,7 +50,7 @@
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
 #include "flexdef.h"
-__RCSID("$NetBSD: initparse.c,v 1.1 2016/01/09 17:39:52 christos Exp $");
+__RCSID("$NetBSD: initparse.c,v 1.2 2016/03/17 15:28:00 nakayama Exp $");
 
 #include "tables.h"
 
@@ -101,7 +100,6 @@ int previous_continued_action;	/* whethe
  */
 #define YYSTYPE int
 
-#line 105 "parse.c"
 
 #if ! defined(YYSTYPE) && ! defined(YYSTYPE_IS_DECLARED)
 /* Default: YYSTYPE is the semantic value type. */
@@ -606,7 +604,6 @@ typedef struct {
 } YYSTACKDATA;
 /* variables for the parser stack */
 static YYSTACKDATA yystack;
-#line 951 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 
 
 /* build_eof_action - build the "<>" action for the active start
@@ -750,7 +747,6 @@ const char *msg;
 	{
 		(void)msg;
 	}
-#line 754 "parse.c"
 
 #if YYDEBUG
 #include 		/* needed for printf */
@@ -953,7 +949,6 @@ yyreduce:
 switch (yyn)
 {
 case 1:
-#line 122 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ /* add default rule */
 			int def_rule;
 
@@ -982,7 +977,6 @@ case 1:
 			}
 break;
 case 2:
-#line 151 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ /* initialize for processing rules */
 
 			/* Create default DFA start condition. */
@@ -990,11 +984,9 @@ case 2:
 			}
 break;
 case 6:
-#line 162 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ synerr( _("unknown error processing section 1") ); }
 break;
 case 7:
-#line 166 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{
 			check_options();
 			scon_stk = allocate_integer_array( lastsc + 1 );
@@ -1002,62 +994,48 @@ case 7:
 			}
 break;
 case 8:
-#line 174 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ xcluflg = false; }
 break;
 case 9:
-#line 177 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ xcluflg = true; }
 break;
 case 10:
-#line 181 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ scinstal( nmstr, xcluflg ); }
 break;
 case 11:
-#line 184 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ scinstal( nmstr, xcluflg ); }
 break;
 case 12:
-#line 187 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ synerr( _("bad start condition list") ); }
 break;
 case 16:
-#line 198 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{
 			outfilename = copy_string( nmstr );
 			did_outfilename = 1;
 			}
 break;
 case 17:
-#line 203 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ extra_type = copy_string( nmstr ); }
 break;
 case 18:
-#line 205 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ prefix = copy_string( nmstr ); }
 break;
 case 19:
-#line 207 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ yyclass = copy_string( nmstr ); }
 break;
 case 20:
-#line 209 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ headerfilename = copy_string( nmstr ); }
 break;
 case 21:
-#line 211 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ tablesext = true; tablesfilename = copy_string( nmstr ); }
 break;
 case 22:
-#line 215 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ scon_stk_ptr = yystack.l_mark[-3]; }
 break;
 case 23:
-#line 217 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{ scon_stk_ptr = yystack.l_mark[-3]; }
 break;
 case 25:
-#line 222 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{
 			/* Initialize for a parse of one rule. */
 			trlcontxt = variable_trail_rule = varlength = false;
@@ -1070,7 +1048,6 @@ case 25:
 			}
 break;
 case 26:
-#line 235 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{
 			pat = yystack.l_mark[0];
 			finish_rule( pat, variable_trail_rule,
@@ -1107,7 +1084,6 @@ case 26:
 			}
 break;
 case 27:
-#line 271 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/parse.y"
 	{
 			pat = 

CVS commit: src/external/bsd/flex/dist/src

2016-03-18 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Thu Mar 17 15:23:21 UTC 2016

Modified Files:
src/external/bsd/flex/dist/src: scan.l

Log Message:
Apply our changes dropped in previous merge.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/src/scan.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/src/scan.l
diff -u src/external/bsd/flex/dist/src/scan.l:1.3 src/external/bsd/flex/dist/src/scan.l:1.4
--- src/external/bsd/flex/dist/src/scan.l:1.3	Sat Jan  9 18:28:41 2016
+++ src/external/bsd/flex/dist/src/scan.l	Thu Mar 17 15:23:21 2016
@@ -1,3 +1,5 @@
+/*	$NetBSD: scan.l,v 1.4 2016/03/17 15:23:21 nakayama Exp $	*/
+
 /* scan.l - scanner for flex input -*-C-*- */
 
 %{
@@ -31,8 +33,9 @@
 /*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
-
 #include "flexdef.h"
+__RCSID("$NetBSD: scan.l,v 1.4 2016/03/17 15:23:21 nakayama Exp $");
+
 #include "parse.h"
 extern bool tablesverify, tablesext;
 extern int trlcontxt; /* Set in  parse.y for each rule. */
@@ -68,7 +71,7 @@ extern const char *escaped_qstart, *esca
 #define RETURNNAME \
 	if(yyleng < MAXLINE) \
  { \
-	strcpy( nmstr, yytext ); \
+	strlcpy( nmstr, yytext, sizeof(nmstr) ); \
 	 } \
 	else \
 	 { \
@@ -81,9 +84,9 @@ extern const char *escaped_qstart, *esca
 	for ( i = strlen( str ) - 1; i >= start; --i ) \
 		unput((str)[i])
 
-#define CHECK_REJECT(str) \
+#define CHECK_RE_JECT(str) \
 	if ( all_upper( str ) ) \
-		reject = true;
+		reject = true
 
 #define CHECK_YYMORE(str) \
 	if ( all_lower( str ) ) \
@@ -185,7 +188,7 @@ M4QEND  "]]"
 	^{NAME}		{
 			if(yyleng < MAXLINE)
 		 {
-			strcpy( nmstr, yytext );
+			strlcpy( nmstr, yytext, sizeof(nmstr) );
 			 }
 			else
 			 {
@@ -293,7 +296,7 @@ M4QEND  "]]"
 	{NOT_WS}[^\r\n]*	{
  		if(yyleng < MAXLINE)
  		 {
-			strcpy( (char *) nmdef, yytext );
+			strlcpy( (char *) nmdef, yytext, sizeof(nmdef) );
  		 }
  		else
  		 {
@@ -436,7 +439,7 @@ M4QEND  "]]"
 	\"[^"\n]*\"	{
 			if(yyleng-1 < MAXLINE)
 		 {
-			strcpy( nmstr, yytext + 1 );
+			strlcpy( nmstr, yytext + 1, sizeof(nmstr) );
 			 }
 			else
 			 {
@@ -611,7 +614,7 @@ M4QEND  "]]"
 
 			if(yyleng < MAXLINE)
 		 {
-			strcpy( nmstr, yytext );
+			strlcpy( nmstr, yytext, sizeof(nmstr) );
 			 }
 			else
 			 {
@@ -669,7 +672,7 @@ M4QEND  "]]"
 
  			if(yyleng-1 < MAXLINE)
  		 {
-			strcpy( nmstr, yytext + 1 );
+			strlcpy( nmstr, yytext + 1, sizeof(nmstr) );
  			 }
  			else
  			 {
@@ -875,7 +878,7 @@ nmstr[yyleng - 2 - end_is_ws] = '\0';  /
 	{
 		"reject"	{
 			ACTION_ECHO;
-			CHECK_REJECT(yytext);
+			CHECK_RE_JECT(yytext);
 			}
 		"yymore"	{
 			ACTION_ECHO;



CVS commit: src/external/bsd/flex/dist/src

2016-01-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  9 18:28:41 UTC 2016

Added Files:
src/external/bsd/flex/dist/src: scan.l

Log Message:
Re-add.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.3 src/external/bsd/flex/dist/src/scan.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/flex/dist/src/scan.l
diff -u /dev/null src/external/bsd/flex/dist/src/scan.l:1.3
--- /dev/null	Sat Jan  9 13:28:41 2016
+++ src/external/bsd/flex/dist/src/scan.l	Sat Jan  9 13:28:41 2016
@@ -0,0 +1,1029 @@
+/* scan.l - scanner for flex input -*-C-*- */
+
+%{
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/* notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+#include "parse.h"
+extern bool tablesverify, tablesext;
+extern int trlcontxt; /* Set in  parse.y for each rule. */
+extern const char *escaped_qstart, *escaped_qend;
+
+#define ACTION_ECHO add_action( yytext )
+#define ACTION_IFDEF(def, should_define) \
+	{ \
+	if ( should_define ) \
+		action_define( def, 1 ); \
+	}
+
+#define ACTION_ECHO_QSTART add_action (escaped_qstart)
+#define ACTION_ECHO_QEND   add_action (escaped_qend)
+
+#define ACTION_M4_IFDEF(def, should_define) \
+do{ \
+if ( should_define ) \
+buf_m4_define( _buf, def, NULL);\
+else \
+buf_m4_undefine( _buf, def);\
+} while(0)
+
+#define MARK_END_OF_PROLOG mark_prolog();
+
+#define YY_DECL \
+	int flexscan()
+
+#define RETURNCHAR \
+	yylval = (unsigned char) yytext[0]; \
+	return CHAR;
+
+#define RETURNNAME \
+	if(yyleng < MAXLINE) \
+ { \
+	strcpy( nmstr, yytext ); \
+	 } \
+	else \
+	 { \
+	   synerr(_("Input line too long\n")); \
+	   FLEX_EXIT(EXIT_FAILURE);  \
+	 }  \
+	return NAME;
+
+#define PUT_BACK_STRING(str, start) \
+	for ( i = strlen( str ) - 1; i >= start; --i ) \
+		unput((str)[i])
+
+#define CHECK_REJECT(str) \
+	if ( all_upper( str ) ) \
+		reject = true;
+
+#define CHECK_YYMORE(str) \
+	if ( all_lower( str ) ) \
+		yymore_used = true;
+
+#define YY_USER_INIT \
+	if ( getenv("POSIXLY_CORRECT") ) \
+		posix_compat = true;
+
+%}
+
+%option caseless nodefault noreject stack noyy_top_state
+%option nostdinit
+
+%x SECT2 SECT2PROLOG SECT3 CODEBLOCK PICKUPDEF SC CARETISBOL NUM QUOTE
+%x FIRSTCCL CCL ACTION RECOVER COMMENT ACTION_STRING PERCENT_BRACE_ACTION
+%x OPTION LINEDIR CODEBLOCK_MATCH_BRACE
+%x GROUP_WITH_PARAMS
+%x GROUP_MINUS_PARAMS
+%x EXTENDED_COMMENT
+%x COMMENT_DISCARD
+
+WS		[[:blank:]]+
+OPTWS		[[:blank:]]*
+NOT_WS		[^[:blank:]\r\n]
+
+NL		\r?\n
+
+NAME		([[:alpha:]_][[:alnum:]_-]*)
+NOT_NAME	[^[:alpha:]_*\n]+
+
+SCNAME		{NAME}
+
+ESCSEQ		(\\([^\n]|[0-7]{1,3}|x[[:xdigit:]]{1,2}))
+
+FIRST_CCL_CHAR	([^\\\n]|{ESCSEQ})
+CCL_CHAR	([^\\\n\]]|{ESCSEQ})
+CCL_EXPR	("[:"^?[[:alpha:]]+":]")
+
+LEXOPT		[aceknopr]
+
+M4QSTART"[["
+M4QEND  "]]"
+
+%%
+	static int bracelevel, didadef, indented_code;
+	static int doing_rule_action = false;
+	static int option_sense;
+
+	int doing_codeblock = false;
+	int i, brace_depth=0, brace_start_line=0;
+	Char nmdef[MAXLINE];
+
+
+{
+	^{WS}		indented_code = true; BEGIN(CODEBLOCK);
+	^"/*"		ACTION_ECHO; yy_push_state( COMMENT );
+	^#{OPTWS}line{WS}	yy_push_state( LINEDIR );
+	^"%s"{NAME}?	return SCDECL;
+	^"%x"{NAME}?	return XSCDECL;
+	^"%{".*{NL}	{
+			++linenum;
+			line_directive_out( (FILE *) 0, 1 );
+			indented_code = false;
+			BEGIN(CODEBLOCK);
+			}
+^"%top"[[:blank:]]*"{"[[:blank:]]*{NL}{
+brace_start_line = linenum;
+++linenum;
+buf_linedir( _buf, infilename?infilename:"", 

CVS commit: src/external/bsd/flex/dist/src

2016-01-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  9 18:29:13 UTC 2016

Removed Files:
src/external/bsd/flex/dist/src: scan.c

Log Message:
delete the generated file.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/flex/dist/src/scan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/flex

2016-01-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  9 17:38:57 UTC 2016

Modified Files:
src/external/bsd/flex: Makefile.inc flex2netbsd
src/external/bsd/flex/dist/src: FlexLexer.h buf.c ccl.c dfa.c ecs.c
filter.c flex.skl flexdef.h flexint.h gen.c gettext.h libmain.c
libyywrap.c main.c misc.c nfa.c options.c options.h parse.y regex.c
scanflags.c scanopt.c scanopt.h skel.c sym.c tables.c tables.h
tblcmp.c yylex.c
src/external/bsd/flex/include: config.h
src/external/bsd/flex/man: Makefile
Removed Files:
src/external/bsd/flex/dist: FlexLexer.h Makefile buf.c ccl.c compile
conf.in config.guess config.rpath config.sub depcomp dfa.c ecs.c
filter.c flex.skl flexdef.h flexint.h gen.c gettext.h initparse.c
initparse.h initscan.c install-sh libmain.c libtool libyywrap.c
ltmain.sh main.c misc.c missing mkskel.sh nfa.c options.c options.h
parse.y regex.c scan.l scanflags.c scanopt.c scanopt.h stamp-h1
sym.c tables.c tables.h tables_shared.c tables_shared.h tblcmp.c
version.h ylwrap yylex.c
src/external/bsd/flex/dist/src: parse.c parse.h scan.l

Log Message:
Merge our changes; the directory structure got changed.
Changes are too large for here, see changelog.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/flex/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/flex2netbsd
cvs rdiff -u -r1.2 -r0 src/external/bsd/flex/dist/FlexLexer.h \
src/external/bsd/flex/dist/flexint.h src/external/bsd/flex/dist/gettext.h \
src/external/bsd/flex/dist/options.h src/external/bsd/flex/dist/scanopt.h \
src/external/bsd/flex/dist/tables.h
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/flex/dist/Makefile \
src/external/bsd/flex/dist/libtool src/external/bsd/flex/dist/ltmain.sh \
src/external/bsd/flex/dist/mkskel.sh src/external/bsd/flex/dist/stamp-h1
cvs rdiff -u -r1.4 -r0 src/external/bsd/flex/dist/buf.c \
src/external/bsd/flex/dist/yylex.c
cvs rdiff -u -r1.3 -r0 src/external/bsd/flex/dist/ccl.c \
src/external/bsd/flex/dist/dfa.c src/external/bsd/flex/dist/ecs.c \
src/external/bsd/flex/dist/nfa.c src/external/bsd/flex/dist/options.c \
src/external/bsd/flex/dist/regex.c src/external/bsd/flex/dist/scanflags.c \
src/external/bsd/flex/dist/sym.c src/external/bsd/flex/dist/tblcmp.c
cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/flex/dist/compile \
src/external/bsd/flex/dist/conf.in \
src/external/bsd/flex/dist/config.guess \
src/external/bsd/flex/dist/config.sub src/external/bsd/flex/dist/depcomp \
src/external/bsd/flex/dist/install-sh src/external/bsd/flex/dist/missing
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/flex/dist/config.rpath \
src/external/bsd/flex/dist/tables_shared.c \
src/external/bsd/flex/dist/tables_shared.h \
src/external/bsd/flex/dist/version.h src/external/bsd/flex/dist/ylwrap
cvs rdiff -u -r1.5 -r0 src/external/bsd/flex/dist/filter.c \
src/external/bsd/flex/dist/initparse.c \
src/external/bsd/flex/dist/initscan.c \
src/external/bsd/flex/dist/libmain.c \
src/external/bsd/flex/dist/libyywrap.c src/external/bsd/flex/dist/misc.c \
src/external/bsd/flex/dist/parse.y src/external/bsd/flex/dist/tables.c
cvs rdiff -u -r1.11 -r0 src/external/bsd/flex/dist/flex.skl \
src/external/bsd/flex/dist/gen.c
cvs rdiff -u -r1.7 -r0 src/external/bsd/flex/dist/flexdef.h
cvs rdiff -u -r1.1 -r0 src/external/bsd/flex/dist/initparse.h
cvs rdiff -u -r1.6 -r0 src/external/bsd/flex/dist/main.c \
src/external/bsd/flex/dist/scan.l src/external/bsd/flex/dist/scanopt.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/flex/dist/src/FlexLexer.h \
src/external/bsd/flex/dist/src/buf.c src/external/bsd/flex/dist/src/ccl.c \
src/external/bsd/flex/dist/src/dfa.c src/external/bsd/flex/dist/src/ecs.c \
src/external/bsd/flex/dist/src/filter.c \
src/external/bsd/flex/dist/src/flex.skl \
src/external/bsd/flex/dist/src/flexdef.h \
src/external/bsd/flex/dist/src/flexint.h \
src/external/bsd/flex/dist/src/gen.c \
src/external/bsd/flex/dist/src/gettext.h \
src/external/bsd/flex/dist/src/libmain.c \
src/external/bsd/flex/dist/src/libyywrap.c \
src/external/bsd/flex/dist/src/main.c \
src/external/bsd/flex/dist/src/misc.c \
src/external/bsd/flex/dist/src/nfa.c \
src/external/bsd/flex/dist/src/options.c \
src/external/bsd/flex/dist/src/options.h \
src/external/bsd/flex/dist/src/parse.y \
src/external/bsd/flex/dist/src/regex.c \
src/external/bsd/flex/dist/src/scanflags.c \
src/external/bsd/flex/dist/src/scanopt.c \
src/external/bsd/flex/dist/src/scanopt.h \
src/external/bsd/flex/dist/src/skel.c \
src/external/bsd/flex/dist/src/sym.c \
src/external/bsd/flex/dist/src/tables.c \
src/external/bsd/flex/dist/src/tables.h \
src/external/bsd/flex/dist/src/tblcmp.c 

CVS commit: src/external/bsd/flex/dist

2014-10-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 30 18:44:05 UTC 2014

Modified Files:
src/external/bsd/flex/dist: buf.c ccl.c dfa.c ecs.c filter.c flexdef.h
gen.c initparse.c libmain.c libyywrap.c main.c misc.c nfa.c
options.c parse.y regex.c scan.l scanflags.c scanopt.c sym.c
tables.c tblcmp.c yylex.c

Log Message:
handle RCSID not being defined


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/buf.c \
src/external/bsd/flex/dist/libmain.c \
src/external/bsd/flex/dist/libyywrap.c src/external/bsd/flex/dist/yylex.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/flex/dist/ccl.c \
src/external/bsd/flex/dist/dfa.c src/external/bsd/flex/dist/ecs.c \
src/external/bsd/flex/dist/nfa.c src/external/bsd/flex/dist/options.c \
src/external/bsd/flex/dist/regex.c src/external/bsd/flex/dist/scanflags.c \
src/external/bsd/flex/dist/sym.c src/external/bsd/flex/dist/tblcmp.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/filter.c \
src/external/bsd/flex/dist/initparse.c src/external/bsd/flex/dist/misc.c \
src/external/bsd/flex/dist/parse.y src/external/bsd/flex/dist/tables.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/flex/dist/flexdef.h
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/flex/dist/gen.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/flex/dist/main.c \
src/external/bsd/flex/dist/scan.l src/external/bsd/flex/dist/scanopt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/buf.c
diff -u src/external/bsd/flex/dist/buf.c:1.3 src/external/bsd/flex/dist/buf.c:1.4
--- src/external/bsd/flex/dist/buf.c:1.3	Wed Oct 29 14:28:36 2014
+++ src/external/bsd/flex/dist/buf.c	Thu Oct 30 14:44:05 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: buf.c,v 1.3 2014/10/29 18:28:36 christos Exp $	*/
+/*	$NetBSD: buf.c,v 1.4 2014/10/30 18:44:05 christos Exp $	*/
 
 /* flex - tool to generate fast lexical analyzers */
 
@@ -32,10 +32,9 @@
 /*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
-#include sys/cdefs.h
-__RCSID($NetBSD: buf.c,v 1.3 2014/10/29 18:28:36 christos Exp $);
-
 #include flexdef.h
+__RCSID($NetBSD: buf.c,v 1.4 2014/10/30 18:44:05 christos Exp $);
+
 
 /* Take note: The buffer object is sometimes used as a String buffer (one
  * continuous string), and sometimes used as a list of strings, usually line by
Index: src/external/bsd/flex/dist/libmain.c
diff -u src/external/bsd/flex/dist/libmain.c:1.3 src/external/bsd/flex/dist/libmain.c:1.4
--- src/external/bsd/flex/dist/libmain.c:1.3	Wed Oct 29 14:28:36 2014
+++ src/external/bsd/flex/dist/libmain.c	Thu Oct 30 14:44:05 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: libmain.c,v 1.3 2014/10/29 18:28:36 christos Exp $	*/
+/*	$NetBSD: libmain.c,v 1.4 2014/10/30 18:44:05 christos Exp $	*/
 
 /* libmain - flex run-time support library main function */
 
@@ -22,8 +22,8 @@
 /*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
-#include sys/cdefs.h
-__RCSID($NetBSD: libmain.c,v 1.3 2014/10/29 18:28:36 christos Exp $);
+#include flexdef.h
+__RCSID($NetBSD: libmain.c,v 1.4 2014/10/30 18:44:05 christos Exp $);
 
 extern int yylex(void);
 
Index: src/external/bsd/flex/dist/libyywrap.c
diff -u src/external/bsd/flex/dist/libyywrap.c:1.3 src/external/bsd/flex/dist/libyywrap.c:1.4
--- src/external/bsd/flex/dist/libyywrap.c:1.3	Wed Oct 29 14:28:36 2014
+++ src/external/bsd/flex/dist/libyywrap.c	Thu Oct 30 14:44:05 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: libyywrap.c,v 1.3 2014/10/29 18:28:36 christos Exp $	*/
+/*	$NetBSD: libyywrap.c,v 1.4 2014/10/30 18:44:05 christos Exp $	*/
 
 /* libyywrap - flex run-time support library yywrap function */
 
@@ -22,8 +22,8 @@
 /*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
-#include sys/cdefs.h
-__RCSID($NetBSD: libyywrap.c,v 1.3 2014/10/29 18:28:36 christos Exp $);
+#include flexdef.h
+__RCSID($NetBSD: libyywrap.c,v 1.4 2014/10/30 18:44:05 christos Exp $);
 
 int yywrap(void);
 int
Index: src/external/bsd/flex/dist/yylex.c
diff -u src/external/bsd/flex/dist/yylex.c:1.3 src/external/bsd/flex/dist/yylex.c:1.4
--- src/external/bsd/flex/dist/yylex.c:1.3	Wed Oct 29 14:28:36 2014
+++ src/external/bsd/flex/dist/yylex.c	Thu Oct 30 14:44:05 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: yylex.c,v 1.3 2014/10/29 18:28:36 christos Exp $	*/
+/*	$NetBSD: yylex.c,v 1.4 2014/10/30 18:44:05 christos Exp $	*/
 
 /* yylex - scanner front-end for flex */
 
@@ -32,11 +32,10 @@
 /*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
-#include sys/cdefs.h
-__RCSID($NetBSD: 

CVS commit: src/external/bsd/flex/dist

2014-10-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 30 20:21:39 UTC 2014

Modified Files:
src/external/bsd/flex/dist: libmain.c libyywrap.c

Log Message:
do the library stubs differently


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/libmain.c \
src/external/bsd/flex/dist/libyywrap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/libmain.c
diff -u src/external/bsd/flex/dist/libmain.c:1.4 src/external/bsd/flex/dist/libmain.c:1.5
--- src/external/bsd/flex/dist/libmain.c:1.4	Thu Oct 30 14:44:05 2014
+++ src/external/bsd/flex/dist/libmain.c	Thu Oct 30 16:21:39 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: libmain.c,v 1.4 2014/10/30 18:44:05 christos Exp $	*/
+/*	$NetBSD: libmain.c,v 1.5 2014/10/30 20:21:39 christos Exp $	*/
 
 /* libmain - flex run-time support library main function */
 
@@ -22,8 +22,10 @@
 /*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
-#include flexdef.h
-__RCSID($NetBSD: libmain.c,v 1.4 2014/10/30 18:44:05 christos Exp $);
+#include sys/cdefs.h
+#ifdef __RCSID
+__RCSID($NetBSD: libmain.c,v 1.5 2014/10/30 20:21:39 christos Exp $);
+#endif
 
 extern int yylex(void);
 
Index: src/external/bsd/flex/dist/libyywrap.c
diff -u src/external/bsd/flex/dist/libyywrap.c:1.4 src/external/bsd/flex/dist/libyywrap.c:1.5
--- src/external/bsd/flex/dist/libyywrap.c:1.4	Thu Oct 30 14:44:05 2014
+++ src/external/bsd/flex/dist/libyywrap.c	Thu Oct 30 16:21:39 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: libyywrap.c,v 1.4 2014/10/30 18:44:05 christos Exp $	*/
+/*	$NetBSD: libyywrap.c,v 1.5 2014/10/30 20:21:39 christos Exp $	*/
 
 /* libyywrap - flex run-time support library yywrap function */
 
@@ -22,8 +22,10 @@
 /*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
-#include flexdef.h
-__RCSID($NetBSD: libyywrap.c,v 1.4 2014/10/30 18:44:05 christos Exp $);
+#include sys/cdefs.h
+#ifdef __RCSID
+__RCSID($NetBSD: libyywrap.c,v 1.5 2014/10/30 20:21:39 christos Exp $);
+#endif
 
 int yywrap(void);
 int



CVS commit: src/external/bsd/flex

2014-10-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 29 18:28:36 UTC 2014

Modified Files:
src/external/bsd/flex: flex2netbsd
src/external/bsd/flex/dist: FlexLexer.h buf.c ccl.c dfa.c ecs.c
filter.c flex.skl flexdef.h flexint.h gen.c gettext.h initparse.c
libmain.c libyywrap.c main.c misc.c nfa.c options.c options.h
parse.y regex.c scan.l scanflags.c scanopt.c scanopt.h sym.c
tables.c tables.h tblcmp.c yylex.c
src/external/bsd/flex/include: config.h
Removed Files:
src/external/bsd/flex/dist: README-alpha README.cvs configure.in
mkinstalldirs
src/external/bsd/flex/dist/tools: Makefile.am Makefile.in git2cl

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/flex/flex2netbsd
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/flex/dist/FlexLexer.h \
src/external/bsd/flex/dist/ccl.c src/external/bsd/flex/dist/ecs.c \
src/external/bsd/flex/dist/gettext.h src/external/bsd/flex/dist/nfa.c \
src/external/bsd/flex/dist/options.c src/external/bsd/flex/dist/options.h \
src/external/bsd/flex/dist/scanopt.h src/external/bsd/flex/dist/sym.c \
src/external/bsd/flex/dist/tables.h src/external/bsd/flex/dist/tblcmp.c
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/flex/dist/README-alpha \
src/external/bsd/flex/dist/mkinstalldirs
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/flex/dist/README.cvs \
src/external/bsd/flex/dist/configure.in
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/flex/dist/buf.c \
src/external/bsd/flex/dist/libmain.c \
src/external/bsd/flex/dist/libyywrap.c src/external/bsd/flex/dist/yylex.c
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/bsd/flex/dist/dfa.c \
src/external/bsd/flex/dist/flexint.h src/external/bsd/flex/dist/regex.c \
src/external/bsd/flex/dist/scanflags.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/filter.c \
src/external/bsd/flex/dist/initparse.c src/external/bsd/flex/dist/misc.c \
src/external/bsd/flex/dist/parse.y src/external/bsd/flex/dist/tables.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/flex/dist/flex.skl
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/flex/dist/flexdef.h
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/flex/dist/gen.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/main.c \
src/external/bsd/flex/dist/scan.l src/external/bsd/flex/dist/scanopt.c
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/flex/dist/tools/Makefile.am \
src/external/bsd/flex/dist/tools/Makefile.in
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/flex/dist/tools/git2cl
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/flex2netbsd
diff -u src/external/bsd/flex/flex2netbsd:1.2 src/external/bsd/flex/flex2netbsd:1.3
--- src/external/bsd/flex/flex2netbsd:1.2	Sat Oct  8 15:28:39 2011
+++ src/external/bsd/flex/flex2netbsd	Wed Oct 29 14:28:36 2014
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#	$NetBSD: flex2netbsd,v 1.2 2011/10/08 19:28:39 christos Exp $
+#	$NetBSD: flex2netbsd,v 1.3 2014/10/29 18:28:36 christos Exp $
 #
 # Copyright (c) 2000 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -34,28 +34,18 @@
 #
 #	$ cd /some/where/temporary
 #	$ tar xpfz /new/flex/release/tar/file
-#	$ sh /usr/src/external/bsd/flex/dist/flex2netbsd flex-2.5.x `pwd`
-#	$ cd src/external/bsd/flex/dist
+#	$ sh /usr/src/external/bsd/flex/dist/flex2netbsd flex-2.5.x
+#	$ cd flex-2.5.x
 #	$ cvs import -m Import flex 2.5.x src/external/bsd/flex/dist FLEX flex-2-5-x
-#	$ cd ../../../../../flex-9.x.y
 #	$ run ./configure
 #	$ run make
 #	check the config file and copy it to /usr/src/external/bsd/flex/include
 #	check the manual page against our copy if there are new options and
 #	update
 
-if [ $# -ne 2 ]; then echo flex2netbsd src dest; exit 1; fi
+if [ $# -ne 1 ]; then echo flex2netbsd src; exit 1; fi
 
 r=$1
-d=$2/src/external/bsd/flex/dist
-
-case $d in
-	/*)
-		;;
-	*)
-		d=`/bin/pwd`/$d
-		;;
-esac
 
 case $r in
 	/*)
@@ -65,60 +55,9 @@ case $r in
 		;;
 esac
 
-echo preparing directory $d
-rm -rf $d
-mkdir -p $d
-
-### Copy the files and directories
-echo copying $r to $d
-cd $r
-pax -rw * $d
+cd $r
 
 ### Remove the $'s around RCS tags
-cleantags $d
-
-### Add our NetBSD RCS Id
-find $d -type f -name '*.[chly]' -print | while read c; do
-	sed 1q  $c | grep -q '\$NetBSD' || (
-echo /*	\$NetBSD\$	*/ /tmp/flex3n$$
-echo  /tmp/flex3n$$
-cat $c   /tmp/flex3n$$
-mv /tmp/flex3n$$ $c  echo added NetBSD RCS tag to $c
-	)
-done
-
-find $d -type f -name '*.[0-9]' -print | while read m; do
-	sed 1q  $m | grep -q '\$NetBSD' || (
-echo .\\\	\$NetBSD\$ /tmp/flex2m$$
-echo .\\\ /tmp/flex2m$$
-cat $m  /tmp/flex2m$$
-mv /tmp/flex2m$$ $m  echo added NetBSD RCS tag to $m
-	)
-done
-
-find $d -type f -name '*.texi' -print | while read t; do
-sed 2 s/^/@c \$NetBSD\$\\
-/  $t  

CVS commit: src/external/bsd/flex/dist

2014-10-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 29 19:08:51 UTC 2014

Modified Files:
src/external/bsd/flex/dist: flex.skl gen.c

Log Message:
generate -Wconversion clean code.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/flex/dist/flex.skl
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/flex/dist/gen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/flex.skl
diff -u src/external/bsd/flex/dist/flex.skl:1.10 src/external/bsd/flex/dist/flex.skl:1.11
--- src/external/bsd/flex/dist/flex.skl:1.10	Wed Oct 29 14:28:36 2014
+++ src/external/bsd/flex/dist/flex.skl	Wed Oct 29 15:08:51 2014
@@ -1633,7 +1633,7 @@ int yyFlexLexer::yy_get_next_buffer()
 M4_YY_DECL_GUTS_VAR();
 	register char *dest = YY_CURRENT_BUFFER_LVALUE-yy_ch_buf;
 	register char *source = YY_G(yytext_ptr);
-	register int number_to_move, i;
+	register yy_size_t 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] )
@@ -1662,7 +1662,7 @@ int yyFlexLexer::yy_get_next_buffer()
 	/* Try to read more data. */
 
 	/* First move last chars to start of buffer. */
-	number_to_move = (int) (YY_G(yy_c_buf_p) - YY_G(yytext_ptr)) - 1;
+	number_to_move = (yy_size_t)((YY_G(yy_c_buf_p) - YY_G(yytext_ptr)) - 1);
 
 	for ( i = 0; i  number_to_move; ++i )
 		*(dest++) = *(source++);
@@ -1903,7 +1903,8 @@ m4_ifdef( [[M4_YY_USE_LINENO]],
 
 		else
 			{ /* need more input */
-			yy_size_t offset = YY_G(yy_c_buf_p) - YY_G(yytext_ptr);
+			yy_size_t offset = (yy_size_t)
+			(YY_G(yy_c_buf_p) - YY_G(yytext_ptr));
 			++YY_G(yy_c_buf_p);
 
 			switch ( yy_get_next_buffer( M4_YY_CALL_ONLY_ARG ) )
@@ -2057,7 +2058,7 @@ static void yy_load_buffer_state  YYFARG
 	if ( ! b )
 		YY_FATAL_ERROR( out of dynamic memory in yy_create_buffer() );
 
-	b-yy_buf_size = size;
+	b-yy_buf_size = (yy_size_t)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.
@@ -2290,7 +2291,7 @@ void yyFlexLexer::yyensure_buffer_stack(
 	if (YY_G(yy_buffer_stack_top) = (YY_G(yy_buffer_stack_max)) - 1){
 
 		/* Increase the buffer to prepare for a possible push. */
-		int grow_size = 8 /* arbitrary grow size */;
+		yy_size_t grow_size = 8 /* arbitrary grow size */;
 
 		num_to_alloc = YY_G(yy_buffer_stack_max) + grow_size;
 		YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc

Index: src/external/bsd/flex/dist/gen.c
diff -u src/external/bsd/flex/dist/gen.c:1.9 src/external/bsd/flex/dist/gen.c:1.10
--- src/external/bsd/flex/dist/gen.c:1.9	Wed Oct 29 14:28:36 2014
+++ src/external/bsd/flex/dist/gen.c	Wed Oct 29 15:08:51 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: gen.c,v 1.9 2014/10/29 18:28:36 christos Exp $	*/
+/*	$NetBSD: gen.c,v 1.10 2014/10/29 19:08:51 christos Exp $	*/
 
 /* gen - actual generation (writing) of flex scanners */
 
@@ -33,7 +33,7 @@
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
 #include sys/cdefs.h
-__RCSID($NetBSD: gen.c,v 1.9 2014/10/29 18:28:36 christos Exp $);
+__RCSID($NetBSD: gen.c,v 1.10 2014/10/29 19:08:51 christos Exp $);
 
 #include flexdef.h
 #include tables.h
@@ -74,6 +74,26 @@ static const char *get_int32_decl (void)
 		: static yyconst flex_int32_t * %s = 0;\n;
 }
 
+static const char *get_uint16_decl (void)
+{
+	return (gentables)
+		? static yyconst flex_uint16_t %s[%d] =\n{   0,\n
+		: static yyconst flex_uint16_t * %s = 0;\n;
+}
+
+static const char *get_uint32_decl (void)
+{
+	return (gentables)
+		? static yyconst flex_uint32_t %s[%d] =\n{   0,\n
+		: static yyconst flex_uint32_t * %s = 0;\n;
+}
+
+static const char *get_yy_char_decl (void)
+{
+	return (gentables)
+		? static yyconst YY_CHAR %s[%d] =\n{   0,\n
+		: static yyconst YY_CHAR * %s = 0;\n;
+}
 static const char *get_state_decl (void)
 {
 	return (gentables)
@@ -456,7 +476,7 @@ static struct yytbl_data *mkecstbl (void
 
 	buf_prints (yydmap_buf,
 		\t{YYTD_ID_EC, (void**)yy_ec, sizeof(%s)},\n,
-		flex_int32_t);
+		YY_CHAR);
 
 	return tbl;
 }
@@ -468,7 +488,7 @@ void genecs ()
 	register int i, j;
 	int numrows;
 
-	out_str_dec (get_int32_decl (), yy_ec, csize);
+	out_str_dec (get_yy_char_decl (), yy_ec, csize);
 
 	for (i = 1; i  csize; ++i) {
 		ecgroup[i] = ABS (ecgroup[i]);
@@ -1278,10 +1298,10 @@ void gentabs ()
 			fputs (_(\n\nMeta-Equivalence Classes:\n),
 			   stderr);
 
-		out_str_dec (get_int32_decl (), yy_meta, numecs + 1);
+		out_str_dec (get_yy_char_decl (), yy_meta, numecs + 1);
 		buf_prints (yydmap_buf,
 			\t{YYTD_ID_META, (void**)yy_meta, sizeof(%s)},\n,
-			flex_int32_t);
+			YY_CHAR);
 
 		for (i = 1; i = numecs; ++i) {
 			if (trace)
@@ -1308,13 +1328,13 @@ void gentabs ()
 
 	/* Begin generating yy_base */
 	out_str_dec ((tblend = INT16_MAX || long_align) ?
-		 get_int32_decl () 

CVS commit: src/external/bsd/flex/dist

2013-04-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr  9 15:19:45 UTC 2013

Modified Files:
src/external/bsd/flex/dist: flexdef.h

Log Message:
use a more direct approach.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/flexdef.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/flexdef.h
diff -u src/external/bsd/flex/dist/flexdef.h:1.4 src/external/bsd/flex/dist/flexdef.h:1.5
--- src/external/bsd/flex/dist/flexdef.h:1.4	Sat Apr  6 11:27:05 2013
+++ src/external/bsd/flex/dist/flexdef.h	Tue Apr  9 11:19:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: flexdef.h,v 1.4 2013/04/06 15:27:05 joerg Exp $	*/
+/*	$NetBSD: flexdef.h,v 1.5 2013/04/09 15:19:45 christos Exp $	*/
 
 
 /* flexdef - definitions file for flex */
@@ -1224,7 +1224,7 @@ extern void sf_pop(void);
 /*
  * From misc.c
  */
-#ifdef __NetBSD__
+#ifdef __printflike
 __printflike(1, 2)
 #endif
 void lerrsf_fatal (const char *msg, ...);



CVS commit: src/external/bsd/flex/dist

2013-04-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  6 14:06:16 UTC 2013

Update of /cvsroot/src/external/bsd/flex/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv16763

Log Message:
Import flex 2.5.7

Status:

Vendor Tag: FLEX
Release Tags:   flex-2-5-7

U src/external/bsd/flex/dist/ecs.c
U src/external/bsd/flex/dist/ABOUT-NLS
U src/external/bsd/flex/dist/AUTHORS
U src/external/bsd/flex/dist/COPYING
U src/external/bsd/flex/dist/ChangeLog
U src/external/bsd/flex/dist/FlexLexer.h
U src/external/bsd/flex/dist/INSTALL
U src/external/bsd/flex/dist/Makefile.am
U src/external/bsd/flex/dist/Makefile.in
U src/external/bsd/flex/dist/NEWS
U src/external/bsd/flex/dist/ONEWS
U src/external/bsd/flex/dist/README
U src/external/bsd/flex/dist/README-alpha
U src/external/bsd/flex/dist/README.cvs
U src/external/bsd/flex/dist/THANKS
U src/external/bsd/flex/dist/TODO
U src/external/bsd/flex/dist/aclocal.m4
U src/external/bsd/flex/dist/autogen.sh
U src/external/bsd/flex/dist/buf.c
U src/external/bsd/flex/dist/ccl.c
U src/external/bsd/flex/dist/compile
U src/external/bsd/flex/dist/conf.in
U src/external/bsd/flex/dist/config.guess
U src/external/bsd/flex/dist/config.rpath
U src/external/bsd/flex/dist/config.sub
U src/external/bsd/flex/dist/depcomp
U src/external/bsd/flex/dist/configure
U src/external/bsd/flex/dist/configure.in
U src/external/bsd/flex/dist/dfa.c
C src/external/bsd/flex/dist/flexdef.h
U src/external/bsd/flex/dist/filter.c
C src/external/bsd/flex/dist/flex.skl
U src/external/bsd/flex/dist/flexint.h
C src/external/bsd/flex/dist/gen.c
U src/external/bsd/flex/dist/gettext.h
U src/external/bsd/flex/dist/install-sh
U src/external/bsd/flex/dist/mkinstalldirs
U src/external/bsd/flex/dist/libmain.c
U src/external/bsd/flex/dist/libyywrap.c
C src/external/bsd/flex/dist/main.c
C src/external/bsd/flex/dist/misc.c
U src/external/bsd/flex/dist/missing
C src/external/bsd/flex/dist/parse.y
U src/external/bsd/flex/dist/mkskel.sh
U src/external/bsd/flex/dist/nfa.c
U src/external/bsd/flex/dist/options.c
U src/external/bsd/flex/dist/options.h
C src/external/bsd/flex/dist/parse.c
C src/external/bsd/flex/dist/parse.h
U src/external/bsd/flex/dist/scanflags.c
U src/external/bsd/flex/dist/regex.c
C src/external/bsd/flex/dist/scan.c
C src/external/bsd/flex/dist/scan.l
U src/external/bsd/flex/dist/tables_shared.c
C src/external/bsd/flex/dist/scanopt.c
U src/external/bsd/flex/dist/scanopt.h
C src/external/bsd/flex/dist/skel.c
U src/external/bsd/flex/dist/sym.c
C src/external/bsd/flex/dist/tables.c
U src/external/bsd/flex/dist/tables.h
U src/external/bsd/flex/dist/tables_shared.h
U src/external/bsd/flex/dist/tblcmp.c
U src/external/bsd/flex/dist/version.h
U src/external/bsd/flex/dist/yylex.c
N src/external/bsd/flex/dist/ylwrap
U src/external/bsd/flex/dist/doc/flex.pdf
U src/external/bsd/flex/dist/doc/Makefile.am
U src/external/bsd/flex/dist/doc/flex.1
U src/external/bsd/flex/dist/doc/flex.texi
U src/external/bsd/flex/dist/doc/Makefile.in
U src/external/bsd/flex/dist/doc/stamp-vti
U src/external/bsd/flex/dist/doc/version.texi
U src/external/bsd/flex/dist/doc/mdate-sh
U src/external/bsd/flex/dist/doc/texinfo.tex
U src/external/bsd/flex/dist/doc/flex.info
U src/external/bsd/flex/dist/doc/flex.info-1
U src/external/bsd/flex/dist/doc/flex.info-2
U src/external/bsd/flex/dist/examples/testxxLexer.l
U src/external/bsd/flex/dist/examples/Makefile.am
U src/external/bsd/flex/dist/examples/README
U src/external/bsd/flex/dist/examples/Makefile.in
U src/external/bsd/flex/dist/examples/debflex.awk
U src/external/bsd/flex/dist/examples/manual/Makefile.examples
U src/external/bsd/flex/dist/examples/manual/Makefile.am
U src/external/bsd/flex/dist/examples/manual/README
U src/external/bsd/flex/dist/examples/manual/eof_rules.lex
U src/external/bsd/flex/dist/examples/manual/Makefile.in
U src/external/bsd/flex/dist/examples/manual/ChangeLog
U src/external/bsd/flex/dist/examples/manual/dates.lex
U src/external/bsd/flex/dist/examples/manual/cat.lex
U src/external/bsd/flex/dist/examples/manual/eof_test01.txt
U src/external/bsd/flex/dist/examples/manual/datetest.dat
U src/external/bsd/flex/dist/examples/manual/expr.y
U src/external/bsd/flex/dist/examples/manual/front.y
U src/external/bsd/flex/dist/examples/manual/eof_test02.txt
U src/external/bsd/flex/dist/examples/manual/eof_test03.txt
U src/external/bsd/flex/dist/examples/manual/expr.lex
U src/external/bsd/flex/dist/examples/manual/front.lex
U src/external/bsd/flex/dist/examples/manual/j2t.lex
U src/external/bsd/flex/dist/examples/manual/myname.lex
U src/external/bsd/flex/dist/examples/manual/myname.txt
U src/external/bsd/flex/dist/examples/manual/myname2.lex
U src/external/bsd/flex/dist/examples/manual/numbers.lex
U src/external/bsd/flex/dist/examples/manual/pas_include.lex
U src/external/bsd/flex/dist/examples/manual/pascal.lex
U src/external/bsd/flex/dist/examples/manual/reject.lex
U src/external/bsd/flex/dist/examples/manual/replace.lex
U 

CVS commit: src/external/bsd/flex

2013-04-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  6 14:27:53 UTC 2013

Modified Files:
src/external/bsd/flex/dist: buf.c filter.c flex.skl flexdef.h gen.c
main.c misc.c parse.y scan.l scanopt.c tables.c
src/external/bsd/flex/include: config.h
Removed Files:
src/external/bsd/flex/dist/m4: Makefile.am Makefile.in codeset.m4
glibc21.m4 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4
isc-posix.m4 lcmessage.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4
src/external/bsd/flex/dist/tools: cvs2cl.pl cvsauthors

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/flex/dist/buf.c \
src/external/bsd/flex/dist/filter.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/flex/dist/flex.skl
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/flex/dist/flexdef.h \
src/external/bsd/flex/dist/misc.c src/external/bsd/flex/dist/parse.y \
src/external/bsd/flex/dist/scanopt.c src/external/bsd/flex/dist/tables.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/flex/dist/gen.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/main.c \
src/external/bsd/flex/dist/scan.l
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/flex/dist/m4/Makefile.am \
src/external/bsd/flex/dist/m4/Makefile.in \
src/external/bsd/flex/dist/m4/codeset.m4 \
src/external/bsd/flex/dist/m4/glibc21.m4 \
src/external/bsd/flex/dist/m4/intdiv0.m4 \
src/external/bsd/flex/dist/m4/inttypes-pri.m4 \
src/external/bsd/flex/dist/m4/inttypes.m4 \
src/external/bsd/flex/dist/m4/inttypes_h.m4 \
src/external/bsd/flex/dist/m4/isc-posix.m4 \
src/external/bsd/flex/dist/m4/lcmessage.m4 \
src/external/bsd/flex/dist/m4/stdint_h.m4 \
src/external/bsd/flex/dist/m4/uintmax_t.m4 \
src/external/bsd/flex/dist/m4/ulonglong.m4
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/flex/dist/tools/cvs2cl.pl \
src/external/bsd/flex/dist/tools/cvsauthors
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/flex/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/buf.c
diff -u src/external/bsd/flex/dist/buf.c:1.1.1.2 src/external/bsd/flex/dist/buf.c:1.2
--- src/external/bsd/flex/dist/buf.c:1.1.1.2	Sat Apr  6 10:05:39 2013
+++ src/external/bsd/flex/dist/buf.c	Sat Apr  6 10:27:52 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: buf.c,v 1.1.1.2 2013/04/06 14:05:39 christos Exp $	*/
+/*	$NetBSD: buf.c,v 1.2 2013/04/06 14:27:52 christos Exp $	*/
 
 /* flex - tool to generate fast lexical analyzers */
 
@@ -92,7 +92,8 @@ struct Buf *buf_prints (struct Buf *buf,
  */
 struct Buf *buf_linedir (struct Buf *buf, const char* filename, int lineno)
 {
-char *dst, *src, *t;
+char *dst, *t;
+const char *src;
 
 t = flex_alloc (strlen (#line \\\n)  +   /* constant parts */
 2 * strlen (filename)+   /* filename with possibly all backslashes escaped */
Index: src/external/bsd/flex/dist/filter.c
diff -u src/external/bsd/flex/dist/filter.c:1.1.1.2 src/external/bsd/flex/dist/filter.c:1.2
--- src/external/bsd/flex/dist/filter.c:1.1.1.2	Sat Apr  6 10:05:42 2013
+++ src/external/bsd/flex/dist/filter.c	Sat Apr  6 10:27:52 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: filter.c,v 1.1.1.2 2013/04/06 14:05:42 christos Exp $	*/
+/*	$NetBSD: filter.c,v 1.2 2013/04/06 14:27:52 christos Exp $	*/
 
 /* filter - postprocessing of flex output through filters */
 
@@ -137,9 +137,6 @@ struct filter *filter_create_int (struct
 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

Index: src/external/bsd/flex/dist/flex.skl
diff -u src/external/bsd/flex/dist/flex.skl:1.7 src/external/bsd/flex/dist/flex.skl:1.8
--- src/external/bsd/flex/dist/flex.skl:1.7	Mon Dec 26 12:32:28 2011
+++ src/external/bsd/flex/dist/flex.skl	Sat Apr  6 10:27:52 2013
@@ -224,6 +224,7 @@ m4preproc_include(`flexint.h')
 #include iostream 
 #include errno.h
 #include cstdlib
+#include cstdio
 #include cstring
 /* end standard C++ headers. */
 %endif
@@ -294,6 +295,8 @@ typedef void* yyscan_t;
 
 %# Declare yyguts variable
 m4_define( [[M4_YY_DECL_GUTS_VAR]], [[struct yyguts_t * yyg = (struct yyguts_t*)yyscanner]])
+%# Perform a noop access on yyguts to prevent unused variable complains
+m4_define( [[M4_YY_NOOP_GUTS_VAR]], [[(void)yyg]])
 %# For use wherever a Global is accessed or assigned.
 m4_define( [[YY_G]], [[yyg-$1]])
 
@@ -351,6 +354,7 @@ m4_define( [[M4_YY_INCR_LINENO]],
 
 %# Define these macros to be no-ops.
 m4_define( [[M4_YY_DECL_GUTS_VAR]], [[m4_dnl]])
+m4_define( [[M4_YY_NOOP_GUTS_VAR]], [[m4_dnl]])
 m4_define( [[YY_G]], [[($1)]])
 m4_define( [[M4_YY_PROTO_LAST_ARG]])
 m4_define( [[M4_YY_PROTO_ONLY_ARG]],  [[void]])
@@ -465,8 +469,13 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
 typedef struct 

CVS commit: src/external/bsd/flex/include

2013-04-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Apr  6 15:25:52 UTC 2013

Modified Files:
src/external/bsd/flex/include: config.h

Log Message:
Only define M4 if it wasn't set on the command line.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/include/config.h
diff -u src/external/bsd/flex/include/config.h:1.3 src/external/bsd/flex/include/config.h:1.4
--- src/external/bsd/flex/include/config.h:1.3	Sat Apr  6 14:27:53 2013
+++ src/external/bsd/flex/include/config.h	Sat Apr  6 15:25:51 2013
@@ -144,7 +144,9 @@
 #define HAVE__BOOL 1
 
 /* Define to the m4 executable name. */
+#ifndef M4
 #define M4 /usr/bin/m4
+#endif
 
 /* Define to 1 if your C compiler doesn't accept -c and -o together. */
 /* #undef NO_MINUS_C_MINUS_O */



CVS commit: src/external/bsd/flex/dist

2013-04-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Apr  6 15:27:05 UTC 2013

Modified Files:
src/external/bsd/flex/dist: flexdef.h

Log Message:
Don't use __printflike during tool build.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/flexdef.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/flexdef.h
diff -u src/external/bsd/flex/dist/flexdef.h:1.3 src/external/bsd/flex/dist/flexdef.h:1.4
--- src/external/bsd/flex/dist/flexdef.h:1.3	Sat Apr  6 14:27:52 2013
+++ src/external/bsd/flex/dist/flexdef.h	Sat Apr  6 15:27:05 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: flexdef.h,v 1.3 2013/04/06 14:27:52 christos Exp $	*/
+/*	$NetBSD: flexdef.h,v 1.4 2013/04/06 15:27:05 joerg Exp $	*/
 
 
 /* flexdef - definitions file for flex */
@@ -1224,8 +1224,9 @@ extern void sf_pop(void);
 /*
  * From misc.c
  */
-void lerrsf_fatal (const char *msg, ...) __printflike(1, 2);
-
-
+#ifdef __NetBSD__
+__printflike(1, 2)
+#endif
+void lerrsf_fatal (const char *msg, ...);
 
 #endif /* not defined FLEXDEF_H */



CVS commit: src/external/bsd/flex/dist

2013-04-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Apr  6 15:27:26 UTC 2013

Modified Files:
src/external/bsd/flex/dist: initparse.c

Log Message:
Regen initparse.c with the current byacc with -l.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/flex/dist/initparse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/initparse.c
diff -u src/external/bsd/flex/dist/initparse.c:1.2 src/external/bsd/flex/dist/initparse.c:1.3
--- src/external/bsd/flex/dist/initparse.c:1.2	Fri Feb 19 14:22:43 2010
+++ src/external/bsd/flex/dist/initparse.c	Sat Apr  6 15:27:26 2013
@@ -17,27 +17,10 @@ static const char yysccsid[] = @(#)yacc
 #define yyerrok(yyerrflag = 0)
 #define YYRECOVERING() (yyerrflag != 0)
 
-/* compatibility with bison */
-#ifdef YYPARSE_PARAM
-/* compatibility with FreeBSD */
-# ifdef YYPARSE_PARAM_TYPE
-#  define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
-# else
-#  define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
-# endif
-#else
-# define YYPARSE_DECL() yyparse(void)
-#endif
+#define YYPREFIX yy
 
-/* Pure parsers. */
 #define YYPURE 0
-#ifdef YYLEX_PARAM
-# define YYLEX yylex(YYLEX_PARAM)
-#else
-# define YYLEX yylex()
-#endif
 
-#define YYPREFIX yy
 /*  Copyright (c) 1990 The Regents of the University of California. */
 /*  All rights reserved. */
 
@@ -118,6 +101,43 @@ int previous_continued_action;	/* whethe
  */
 #define YYSTYPE int
 
+
+#ifndef YYSTYPE
+typedef int YYSTYPE;
+#endif
+
+/* compatibility with bison */
+#ifdef YYPARSE_PARAM
+/* compatibility with FreeBSD */
+# ifdef YYPARSE_PARAM_TYPE
+#  define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
+# else
+#  define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
+# endif
+#else
+# define YYPARSE_DECL() yyparse(void)
+#endif
+
+/* Parameters sent to lex. */
+#ifdef YYLEX_PARAM
+# define YYLEX_DECL() yylex(void *YYLEX_PARAM)
+# define YYLEX yylex(YYLEX_PARAM)
+#else
+# define YYLEX_DECL() yylex(void)
+# define YYLEX yylex()
+#endif
+
+/* Parameters sent to yyerror. */
+#ifndef YYERROR_DECL
+#define YYERROR_DECL() yyerror(const char *s)
+#endif
+#ifndef YYERROR_CALL
+#define YYERROR_CALL(msg) yyerror(msg)
+#endif
+
+extern int YYPARSE_DECL();
+
+
 #define CHAR 257
 #define NUMBER 258
 #define SECTEND 259
@@ -461,16 +481,14 @@ static const char *yyrule[] = {
 
 };
 #endif
-#ifndef YYSTYPE
-typedef int YYSTYPE;
-#endif
-#if YYDEBUG
-#include stdio.h
-#endif
 
-extern int YYPARSE_DECL();
-static int yygrowstack(short **, short **, short **,
-YYSTYPE **, YYSTYPE **, unsigned *);
+int  yydebug;
+int  yynerrs;
+
+int  yyerrflag;
+int  yychar;
+YYSTYPE  yyval;
+YYSTYPE  yylval;
 
 /* define the initial stack-sizes */
 #ifdef YYSTACKSIZE
@@ -487,12 +505,16 @@ static int yygrowstack(short **, short *
 
 #define YYINITSTACKSIZE 500
 
-int  yydebug;
-int  yyerrflag;
-int  yynerrs;
-int  yychar;
-YYSTYPE  yylval;
-
+typedef struct {
+unsigned stacksize;
+short*s_base;
+short*s_mark;
+short*s_last;
+YYSTYPE  *l_base;
+YYSTYPE  *l_mark;
+} YYSTACKDATA;
+/* variables for the parser stack */
+static YYSTACKDATA yystack;
 
 
 /* build_eof_action - build the EOF action for the active start
@@ -514,6 +536,10 @@ void build_eof_action()
 		else
 			{
 			sceof[scon_stk[i]] = true;
+
+			if (previous_continued_action /*  previous action was regular */)
+add_action(YY_RULE_SETUP\n);
+
 			snprintf( action_text, sizeof(action_text), case YY_STATE_EOF(%s):\n,
 scname[scon_stk[i]] );
 			add_action( action_text );
@@ -631,40 +657,60 @@ void yyerror( msg )
 const char *msg;
 	{
 	}
+
+#if YYDEBUG
+#include stdio.h		/* needed for printf */
+#endif
+
+#include stdlib.h	/* needed for malloc, etc */
+#include string.h	/* needed for memset */
+
 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
-static int yygrowstack(short **yyss, short **yyssp, short **yysslim,
-YYSTYPE **yyvs, YYSTYPE **yyvsp, unsigned *yystacksize)
+static int yygrowstack(YYSTACKDATA *data)
 {
 int i;
 unsigned newsize;
 short *newss;
 YYSTYPE *newvs;
 
-if ((newsize = *yystacksize) == 0)
+if ((newsize = data-stacksize) == 0)
 newsize = YYINITSTACKSIZE;
 else if (newsize = YYMAXDEPTH)
 return -1;
 else if ((newsize *= 2)  YYMAXDEPTH)
 newsize = YYMAXDEPTH;
 
-i = *yyssp - *yyss;
-newss = (short *)realloc(*yyss, newsize * sizeof(*newss));
+i = (int) (data-s_mark - data-s_base);
+newss = (short *)realloc(data-s_base, newsize * sizeof(*newss));
 if (newss == 0)
 return -1;
 
-*yyss  = newss;
-*yyssp = newss + i;
-newvs = (YYSTYPE *)realloc(*yyvs, newsize * sizeof(*newvs));
+data-s_base = newss;
+data-s_mark = newss + i;
+
+newvs = (YYSTYPE *)realloc(data-l_base, newsize * sizeof(*newvs));
 if 

CVS commit: src/external/bsd/flex/dist

2013-04-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  6 20:05:40 UTC 2013

Modified Files:
src/external/bsd/flex/dist: flex.skl gen.c

Log Message:
don't produce code that has warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/flex/dist/flex.skl
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/flex/dist/gen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/flex.skl
diff -u src/external/bsd/flex/dist/flex.skl:1.8 src/external/bsd/flex/dist/flex.skl:1.9
--- src/external/bsd/flex/dist/flex.skl:1.8	Sat Apr  6 10:27:52 2013
+++ src/external/bsd/flex/dist/flex.skl	Sat Apr  6 16:05:40 2013
@@ -2372,8 +2372,7 @@ YY_BUFFER_STATE yy_scan_bytes  YYFARGS2(
 {
 	YY_BUFFER_STATE b;
 	char *buf;
-	yy_size_t n;
-	int i;
+	yy_size_t i, n;
 m4_dnl M4_YY_DECL_GUTS_VAR();
 
 	/* Get memory for full buffer, including space for trailing EOB's. */

Index: src/external/bsd/flex/dist/gen.c
diff -u src/external/bsd/flex/dist/gen.c:1.7 src/external/bsd/flex/dist/gen.c:1.8
--- src/external/bsd/flex/dist/gen.c:1.7	Sat Apr  6 10:27:52 2013
+++ src/external/bsd/flex/dist/gen.c	Sat Apr  6 16:05:40 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: gen.c,v 1.7 2013/04/06 14:27:52 christos Exp $	*/
+/*	$NetBSD: gen.c,v 1.8 2013/04/06 20:05:40 christos Exp $	*/
 
 /* gen - actual generation (writing) of flex scanners */
 
@@ -1977,7 +1977,7 @@ void make_tables ()
 		(if ( yy_act != YY_END_OF_BUFFER  yy_rule_can_match_eol[yy_act] ));
 	indent_up ();
 	indent_puts ({);
-	indent_puts (int yyl;);
+	indent_puts (yy_size_t yyl;);
 	do_indent ();
 	out_str (for ( yyl = %s; yyl  yyleng; ++yyl )\n,
 		 yymore_used ? (yytext_is_array ? YY_G(yy_prev_more_offset) :



CVS commit: src/external/bsd/flex/dist

2012-02-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb 18 19:17:54 UTC 2012

Modified Files:
src/external/bsd/flex/dist: libmain.c libyywrap.c

Log Message:
fix prototypes


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/flex/dist/libmain.c \
src/external/bsd/flex/dist/libyywrap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/libmain.c
diff -u src/external/bsd/flex/dist/libmain.c:1.1.1.1 src/external/bsd/flex/dist/libmain.c:1.2
--- src/external/bsd/flex/dist/libmain.c:1.1.1.1	Sun Oct 25 20:26:24 2009
+++ src/external/bsd/flex/dist/libmain.c	Sat Feb 18 14:17:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: libmain.c,v 1.1.1.1 2009/10/26 00:26:24 christos Exp $	*/
+/*	$NetBSD: libmain.c,v 1.2 2012/02/18 19:17:54 christos Exp $	*/
 
 /* libmain - flex run-time support library main function */
 
@@ -23,13 +23,13 @@
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
 
-extern int yylex ();
+extern int yylex(void);
 
-int main (argc, argv)
- int argc;
- char   *argv[];
+int
+/*ARGSUSED*/
+main(int argc, char *argv[])
 {
-	while (yylex () != 0) ;
-
+	while (yylex() != 0)
+		continue;
 	return 0;
 }
Index: src/external/bsd/flex/dist/libyywrap.c
diff -u src/external/bsd/flex/dist/libyywrap.c:1.1.1.1 src/external/bsd/flex/dist/libyywrap.c:1.2
--- src/external/bsd/flex/dist/libyywrap.c:1.1.1.1	Sun Oct 25 20:26:24 2009
+++ src/external/bsd/flex/dist/libyywrap.c	Sat Feb 18 14:17:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: libyywrap.c,v 1.1.1.1 2009/10/26 00:26:24 christos Exp $	*/
+/*	$NetBSD: libyywrap.c,v 1.2 2012/02/18 19:17:54 christos Exp $	*/
 
 /* libyywrap - flex run-time support library yywrap function */
 
@@ -23,7 +23,9 @@
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
 
-int yywrap (void)
+int yywrap(void);
+int
+yywrap(void)
 {
 	return 1;
 }



CVS commit: src/external/bsd/flex/dist

2011-12-26 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Dec 26 17:32:28 UTC 2011

Modified Files:
src/external/bsd/flex/dist: flex.skl main.c

Log Message:
Re-apply some lint comments that have been lost during move to
external tree.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/flex/dist/flex.skl
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/flex/dist/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/flex.skl
diff -u src/external/bsd/flex/dist/flex.skl:1.6 src/external/bsd/flex/dist/flex.skl:1.7
--- src/external/bsd/flex/dist/flex.skl:1.6	Sat Aug 27 18:36:03 2011
+++ src/external/bsd/flex/dist/flex.skl	Mon Dec 26 17:32:28 2011
@@ -1232,7 +1232,7 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
 [[
 /* Code executed at the end of each rule. */
 #ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
 #endif
 ]])
 
@@ -1320,7 +1320,7 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
 		yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );
 		}
 
-	while ( 1 )		/* loops until end-of-file is reached */
+	while (/*CONSTCOND*/ 1 )		/* loops until end-of-file is reached */
 		{
 %% [8.0] yymore()-related code goes here
 		yy_cp = YY_G(yy_c_buf_p);

Index: src/external/bsd/flex/dist/main.c
diff -u src/external/bsd/flex/dist/main.c:1.2 src/external/bsd/flex/dist/main.c:1.3
--- src/external/bsd/flex/dist/main.c:1.2	Mon Oct 26 04:27:15 2009
+++ src/external/bsd/flex/dist/main.c	Mon Dec 26 17:32:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.2 2009/10/26 04:27:15 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.3 2011/12/26 17:32:28 njoly Exp $	*/
 
 /* flex - tool to generate fast lexical analyzers */
 
@@ -1579,7 +1579,7 @@ void readin ()
 
 	if (!do_yywrap) {
 		if (!C_plus_plus) {
-			outn (\n#define yywrap(n) 1);
+			outn (\n#define yywrap(n) (/*CONSTCOND*/1));
 		}
 		outn (#define YY_SKIP_YYWRAP);
 	}



CVS commit: src/external/bsd/flex/dist

2011-08-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Aug 27 18:36:03 UTC 2011

Modified Files:
src/external/bsd/flex/dist: flex.skl

Log Message:
Mark yy_fatal_error as noreturn if supported by the compiler.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/flex/dist/flex.skl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/flex.skl
diff -u src/external/bsd/flex/dist/flex.skl:1.5 src/external/bsd/flex/dist/flex.skl:1.6
--- src/external/bsd/flex/dist/flex.skl:1.5	Sun Dec  6 09:16:16 2009
+++ src/external/bsd/flex/dist/flex.skl	Sat Aug 27 18:36:03 2011
@@ -736,6 +736,9 @@
 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 );
+#if defined(__GNUC__)  __GNUC__ = 3
+__attribute__((__noreturn__))
+#endif
 static void yy_fatal_error M4_YY_PARAMS( yyconst char msg[] M4_YY_PROTO_LAST_ARG );
 ]])
 



CVS commit: src/external/bsd/flex/bin

2011-03-08 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Tue Mar  8 19:25:32 UTC 2011

Modified Files:
src/external/bsd/flex/bin: Makefile

Log Message:
source files are scan.l and parse.y

in particular, parse.y was being processed twice.. with one
process leaving a y.tab.h file behind

no need to explicitly add scan.c, parse.c and parse.h to CLEANFILES,
the framework knows they are generated and will remove them


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/flex/bin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/bin/Makefile
diff -u src/external/bsd/flex/bin/Makefile:1.8 src/external/bsd/flex/bin/Makefile:1.9
--- src/external/bsd/flex/bin/Makefile:1.8	Wed Apr  7 16:14:35 2010
+++ src/external/bsd/flex/bin/Makefile	Tue Mar  8 19:25:32 2011
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	5.4 (Berkeley) 6/24/90
-#	$NetBSD: Makefile,v 1.8 2010/04/07 16:14:35 christos Exp $
+#	$NetBSD: Makefile,v 1.9 2011/03/08 19:25:32 plunky Exp $
 #
 # By default, flex will be configured to generate 8-bit scanners only if the
 # -8 flag is given.  If you want it to always generate 8-bit scanners, add
@@ -25,9 +25,9 @@
 misc.c \
 nfa.c \
 options.c \
-parse.c \
+parse.y \
 regex.c \
-scan.c \
+scan.l \
 scanflags.c \
 scanopt.c \
 skel.c \
@@ -38,7 +38,7 @@
 yylex.c
 
 YHEADER=1
-CLEANFILES+=scan.c skel.c parse.c parse.h
+CLEANFILES+=skel.c
 INCS	=FlexLexer.h
 INCSDIR=/usr/include/g++
 LDADD+=-lm



CVS commit: src/external/bsd/flex/bin

2010-09-15 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Sep 15 06:52:33 UTC 2010

Modified Files:
src/external/bsd/flex/bin: flex.1

Log Message:
Add missing letter, from Ryo HAYASAKA in PR 43880.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/flex/bin/flex.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/bin/flex.1
diff -u src/external/bsd/flex/bin/flex.1:1.2 src/external/bsd/flex/bin/flex.1:1.3
--- src/external/bsd/flex/bin/flex.1:1.2	Mon Oct 26 01:37:21 2009
+++ src/external/bsd/flex/bin/flex.1	Wed Sep 15 06:52:33 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: flex.1,v 1.2 2009/10/26 01:37:21 christos Exp $
+.\ $NetBSD: flex.1,v 1.3 2010/09/15 06:52:33 wiz Exp $
 .\
 .TH FLEX 1 February 2008 Version 2.5
 .SH NAME
@@ -2776,7 +2776,7 @@
 name of C++ class.
 .TP
 .B \-\-header\-file=FILE
-reate a C header file in addition to the scanner.
+create a C header file in addition to the scanner.
 .TP
 .B \-\-tables\-file[=FILE]
 write tables to FILE.



CVS commit: src/external/bsd/flex/bin

2010-04-07 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Wed Apr  7 08:56:50 UTC 2010

Modified Files:
src/external/bsd/flex/bin: Makefile

Log Message:
Ignore the unused label find_rule in the generated file scan.c
to fix the build.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/flex/bin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/bin/Makefile
diff -u src/external/bsd/flex/bin/Makefile:1.6 src/external/bsd/flex/bin/Makefile:1.7
--- src/external/bsd/flex/bin/Makefile:1.6	Sat Oct 31 23:36:29 2009
+++ src/external/bsd/flex/bin/Makefile	Wed Apr  7 08:56:49 2010
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	5.4 (Berkeley) 6/24/90
-#	$NetBSD: Makefile,v 1.6 2009/10/31 23:36:29 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2010/04/07 08:56:49 tron Exp $
 #
 # By default, flex will be configured to generate 8-bit scanners only if the
 # -8 flag is given.  If you want it to always generate 8-bit scanners, add
@@ -46,6 +46,8 @@
 DPADD+=${LIBM}
 .endif
 
+COPTS.scan.c+=	-Wno-unused-label
+
 MAN = flex.1
 
 LINKS=	${BINDIR}/lex ${BINDIR}/flex \



CVS commit: src/external/bsd/flex/dist

2010-04-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr  7 16:14:07 UTC 2010

Modified Files:
src/external/bsd/flex/dist: scan.l

Log Message:
Rename the macro name so that the scanner does not get confused and thinks
it is using REJECT.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/flex/dist/scan.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/scan.l
diff -u src/external/bsd/flex/dist/scan.l:1.2 src/external/bsd/flex/dist/scan.l:1.3
--- src/external/bsd/flex/dist/scan.l:1.2	Mon Oct 26 00:27:15 2009
+++ src/external/bsd/flex/dist/scan.l	Wed Apr  7 12:14:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: scan.l,v 1.2 2009/10/26 04:27:15 christos Exp $	*/
+/*	$NetBSD: scan.l,v 1.3 2010/04/07 16:14:07 christos Exp $	*/
 
 /* scan.l - scanner for flex input -*-C-*- */
 
@@ -83,9 +83,9 @@
 	for ( i = strlen( str ) - 1; i = start; --i ) \
 		unput((str)[i])
 
-#define CHECK_REJECT(str) \
+#define CHECK_RE_JECT(str) \
 	if ( all_upper( str ) ) \
-		reject = true;
+		reject = true
 
 #define CHECK_YYMORE(str) \
 	if ( all_lower( str ) ) \
@@ -877,7 +877,7 @@
 	CODEBLOCK,ACTION{
 		reject	{
 			ACTION_ECHO;
-			CHECK_REJECT(yytext);
+			CHECK_RE_JECT(yytext);
 			}
 		yymore	{
 			ACTION_ECHO;



CVS commit: src/external/bsd/flex/bin

2010-04-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr  7 16:14:35 UTC 2010

Modified Files:
src/external/bsd/flex/bin: Makefile

Log Message:
previous workaround not needed.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/flex/bin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/bin/Makefile
diff -u src/external/bsd/flex/bin/Makefile:1.7 src/external/bsd/flex/bin/Makefile:1.8
--- src/external/bsd/flex/bin/Makefile:1.7	Wed Apr  7 04:56:49 2010
+++ src/external/bsd/flex/bin/Makefile	Wed Apr  7 12:14:35 2010
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	5.4 (Berkeley) 6/24/90
-#	$NetBSD: Makefile,v 1.7 2010/04/07 08:56:49 tron Exp $
+#	$NetBSD: Makefile,v 1.8 2010/04/07 16:14:35 christos Exp $
 #
 # By default, flex will be configured to generate 8-bit scanners only if the
 # -8 flag is given.  If you want it to always generate 8-bit scanners, add
@@ -46,8 +46,6 @@
 DPADD+=${LIBM}
 .endif
 
-COPTS.scan.c+=	-Wno-unused-label
-
 MAN = flex.1
 
 LINKS=	${BINDIR}/lex ${BINDIR}/flex \



CVS commit: src/external/bsd/flex/dist

2010-04-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr  6 17:39:47 UTC 2010

Modified Files:
src/external/bsd/flex/dist: gen.c

Log Message:
use the m4 define not the cpp one for reject.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/flex/dist/gen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/gen.c
diff -u src/external/bsd/flex/dist/gen.c:1.5 src/external/bsd/flex/dist/gen.c:1.6
--- src/external/bsd/flex/dist/gen.c:1.5	Mon Nov  2 15:52:39 2009
+++ src/external/bsd/flex/dist/gen.c	Tue Apr  6 13:39:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gen.c,v 1.5 2009/11/02 20:52:39 christos Exp $	*/
+/*	$NetBSD: gen.c,v 1.6 2010/04/06 17:39:47 christos Exp $	*/
 
 /* gen - actual generation (writing) of flex scanners */
 
@@ -509,10 +509,10 @@
 		indent_puts (YY_G(yy_lp) = yy_accept[yy_current_state];);
 
 		if (!variable_trailing_context_rules)
-			outn (#ifdef YY_USES_REJECT);
+			outn (m4_ifdef( [[M4_YY_USES_REJECT]],\n[[);
 		outn (find_rule: /* we branch to this label when backing up */);
 		if (!variable_trailing_context_rules)
-			outn (#endif);
+			outn (]])\n);
 
 		indent_puts
 			(for ( ; ; ) /* until we find what rule we matched */);



CVS commit: src/external/bsd/flex/dist

2010-02-19 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Feb 19 14:22:43 UTC 2010

Modified Files:
src/external/bsd/flex/dist: initparse.c initscan.c

Log Message:
Regen initparse.c/initscan.c without #line directives, to avoid host
tool depency problems when NETBSDSRCDIR != /usr/src.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/flex/dist/initparse.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/initscan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/initparse.c
diff -u src/external/bsd/flex/dist/initparse.c:1.1 src/external/bsd/flex/dist/initparse.c:1.2
--- src/external/bsd/flex/dist/initparse.c:1.1	Thu Oct 29 17:17:12 2009
+++ src/external/bsd/flex/dist/initparse.c	Fri Feb 19 14:22:43 2010
@@ -12,7 +12,6 @@
 #define YYMAJOR 1
 #define YYMINOR 9
 
-#define YYLEX yylex()
 #define YYEMPTY(-1)
 #define yyclearin  (yychar = YYEMPTY)
 #define yyerrok(yyerrflag = 0)
@@ -21,18 +20,24 @@
 /* compatibility with bison */
 #ifdef YYPARSE_PARAM
 /* compatibility with FreeBSD */
-#ifdef YYPARSE_PARAM_TYPE
-#define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
+# ifdef YYPARSE_PARAM_TYPE
+#  define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
+# else
+#  define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
+# endif
 #else
-#define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
+# define YYPARSE_DECL() yyparse(void)
 #endif
+
+/* Pure parsers. */
+#define YYPURE 0
+#ifdef YYLEX_PARAM
+# define YYLEX yylex(YYLEX_PARAM)
 #else
-#define YYPARSE_DECL() yyparse(void)
-#endif /* YYPARSE_PARAM */
+# define YYLEX yylex()
+#endif
 
-static int yygrowstack(void);
 #define YYPREFIX yy
-#line 37 /usr/src/external/bsd/flex/dist/parse.y
 /*  Copyright (c) 1990 The Regents of the University of California. */
 /*  All rights reserved. */
 
@@ -113,7 +118,6 @@
  */
 #define YYSTYPE int
 
-#line 116 /usr/src/external/bsd/flex/dist/parse.c
 #define CHAR 257
 #define NUMBER 258
 #define SECTEND 259
@@ -465,6 +469,8 @@
 #endif
 
 extern int YYPARSE_DECL();
+static int yygrowstack(short **, short **, short **,
+YYSTYPE **, YYSTYPE **, unsigned *);
 
 /* define the initial stack-sizes */
 #ifdef YYSTACKSIZE
@@ -482,20 +488,11 @@
 #define YYINITSTACKSIZE 500
 
 int  yydebug;
-int  yynerrs;
 int  yyerrflag;
-int  yychar;
-short   *yyssp;
-YYSTYPE *yyvsp;
-YYSTYPE  yyval;
-YYSTYPE  yylval;
-
-/* variables for the parser stack */
-static short   *yyss;
-static short   *yysslim;
-static YYSTYPE *yyvs;
-static unsigned yystacksize;
-#line 952 /usr/src/external/bsd/flex/dist/parse.y
+int  yynerrs;
+int  yychar;
+YYSTYPE  yylval;
+
 
 
 /* build_eof_action - build the EOF action for the active start
@@ -634,41 +631,37 @@
 const char *msg;
 	{
 	}
-#line 637 /usr/src/external/bsd/flex/dist/parse.c
 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
-static int yygrowstack(void)
+static int yygrowstack(short **yyss, short **yyssp, short **yysslim,
+YYSTYPE **yyvs, YYSTYPE **yyvsp, unsigned *yystacksize)
 {
 int i;
 unsigned newsize;
 short *newss;
 YYSTYPE *newvs;
 
-if ((newsize = yystacksize) == 0)
+if ((newsize = *yystacksize) == 0)
 newsize = YYINITSTACKSIZE;
 else if (newsize = YYMAXDEPTH)
 return -1;
 else if ((newsize *= 2)  YYMAXDEPTH)
 newsize = YYMAXDEPTH;
 
-i = yyssp - yyss;
-newss = (yyss != 0)
-  ? (short *)realloc(yyss, newsize * sizeof(*newss))
-  : (short *)malloc(newsize * sizeof(*newss));
+i = *yyssp - *yyss;
+newss = (short *)realloc(*yyss, newsize * sizeof(*newss));
 if (newss == 0)
 return -1;
 
-yyss  = newss;
-yyssp = newss + i;
-newvs = (yyvs != 0)
-  ? (YYSTYPE *)realloc(yyvs, newsize * sizeof(*newvs))
-  : (YYSTYPE *)malloc(newsize * sizeof(*newvs));
+*yyss  = newss;
+*yyssp = newss + i;
+newvs = (YYSTYPE *)realloc(*yyvs, newsize * sizeof(*newvs));
 if (newvs == 0)
 return -1;
 
-yyvs = newvs;
-yyvsp = newvs + i;
-yystacksize = newsize;
-yysslim = yyss + newsize - 1;
+*yyvs = newvs;
+*yyvsp = newvs + i;
+*yystacksize = newsize;
+*yysslim = *yyss + newsize - 1;
 return 0;
 }
 
@@ -681,6 +674,15 @@
 YYPARSE_DECL()
 {
 int yym, yyn, yystate;
+
+YYSTYPE  yyval;
+/* variables for the parser stack */
+short   *yyssp;
+short   *yyss;
+short   *yysslim;
+YYSTYPE *yyvs;
+YYSTYPE *yyvsp;
+unsigned yystacksize;
 #if YYDEBUG
 const char *yys;
 
@@ -697,9 +699,11 @@
 yychar = YYEMPTY;
 yystate = 0;
 
-if (yyss == NULL  yygrowstack()) goto yyoverflow;
-yyssp = yyss;
-yyvsp = yyvs;
+yystacksize = 0;
+yyvs = yyvsp = NULL;
+yyss = yyssp = NULL;
+if (yygrowstack(yyss, yyssp, yysslim, yyvs, yyvsp, yystacksize))
+   

CVS commit: src/external/bsd/flex/dist

2009-12-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Dec  6 09:16:16 UTC 2009

Modified Files:
src/external/bsd/flex/dist: flex.skl

Log Message:
Fix a typo (#endiif - #endif).
Problem found while building kdesdk3.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/flex.skl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/flex.skl
diff -u src/external/bsd/flex/dist/flex.skl:1.4 src/external/bsd/flex/dist/flex.skl:1.5
--- src/external/bsd/flex/dist/flex.skl:1.4	Wed Oct 28 22:00:56 2009
+++ src/external/bsd/flex/dist/flex.skl	Sun Dec  6 09:16:16 2009
@@ -220,7 +220,7 @@
 /* begin standard C++ headers. */
 #ifdef _LIBC
 #include namespace.h
-#endiif
+#endif
 #include iostream 
 #include errno.h
 #include cstdlib



CVS commit: src/external/bsd/flex/dist

2009-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  2 20:52:39 UTC 2009

Modified Files:
src/external/bsd/flex/dist: gen.c

Log Message:
if we have variable trailing context rules, enable the find_rule label.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/gen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/gen.c
diff -u src/external/bsd/flex/dist/gen.c:1.4 src/external/bsd/flex/dist/gen.c:1.5
--- src/external/bsd/flex/dist/gen.c:1.4	Mon Oct 26 21:44:01 2009
+++ src/external/bsd/flex/dist/gen.c	Mon Nov  2 15:52:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: gen.c,v 1.4 2009/10/27 01:44:01 christos Exp $	*/
+/*	$NetBSD: gen.c,v 1.5 2009/11/02 20:52:39 christos Exp $	*/
 
 /* gen - actual generation (writing) of flex scanners */
 
@@ -508,9 +508,11 @@
 		indent_puts (yy_current_state = *--YY_G(yy_state_ptr););
 		indent_puts (YY_G(yy_lp) = yy_accept[yy_current_state];);
 
-		outn (#ifdef YY_USES_REJECT);
+		if (!variable_trailing_context_rules)
+			outn (#ifdef YY_USES_REJECT);
 		outn (find_rule: /* we branch to this label when backing up */);
-		outn (#endif);
+		if (!variable_trailing_context_rules)
+			outn (#endif);
 
 		indent_puts
 			(for ( ; ; ) /* until we find what rule we matched */);



CVS commit: src/external/bsd/flex/bin

2009-10-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 29 13:03:09 UTC 2009

Modified Files:
src/external/bsd/flex/bin: Makefile

Log Message:
oops forgot to remove the PKG m4.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/bin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/bin/Makefile
diff -u src/external/bsd/flex/bin/Makefile:1.3 src/external/bsd/flex/bin/Makefile:1.4
--- src/external/bsd/flex/bin/Makefile:1.3	Mon Oct 26 14:32:39 2009
+++ src/external/bsd/flex/bin/Makefile	Thu Oct 29 09:03:09 2009
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	5.4 (Berkeley) 6/24/90
-#	$NetBSD: Makefile,v 1.3 2009/10/26 18:32:39 christos Exp $
+#	$NetBSD: Makefile,v 1.4 2009/10/29 13:03:09 christos Exp $
 #
 # By default, flex will be configured to generate 8-bit scanners only if the
 # -8 flag is given.  If you want it to always generate 8-bit scanners, add
@@ -47,8 +47,6 @@
 INCSDIR=/usr/include/g++
 LDADD+=-lm
 DPADD+=${LIBM}
-# XXX: Fix m4.
-TOOL_M4=/usr/pkg/bin/gm4
 
 MAN = flex.1
 



CVS commit: src/external/bsd/flex/dist

2009-10-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 29 17:17:12 UTC 2009

Added Files:
src/external/bsd/flex/dist: initparse.c initparse.h
Removed Files:
src/external/bsd/flex/dist: parse.c parse.h

Log Message:
we can regenerate yacc files now


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/flex/dist/initparse.c \
src/external/bsd/flex/dist/initparse.h
cvs rdiff -u -r1.2 -r0 src/external/bsd/flex/dist/parse.c
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/flex/dist/parse.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/flex/dist/initparse.c
diff -u /dev/null src/external/bsd/flex/dist/initparse.c:1.1
--- /dev/null	Thu Oct 29 13:17:12 2009
+++ src/external/bsd/flex/dist/initparse.c	Thu Oct 29 13:17:12 2009
@@ -0,0 +1,1808 @@
+#ifndef lint
+static const char yysccsid[] = @(#)yaccpar	1.9 (Berkeley) 02/21/93;
+#endif
+
+#ifdef _LIBC
+#include namespace.h
+#endif
+#include stdlib.h
+#include string.h
+
+#define YYBYACC 1
+#define YYMAJOR 1
+#define YYMINOR 9
+
+#define YYLEX yylex()
+#define YYEMPTY(-1)
+#define yyclearin  (yychar = YYEMPTY)
+#define yyerrok(yyerrflag = 0)
+#define YYRECOVERING() (yyerrflag != 0)
+
+/* compatibility with bison */
+#ifdef YYPARSE_PARAM
+/* compatibility with FreeBSD */
+#ifdef YYPARSE_PARAM_TYPE
+#define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
+#else
+#define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
+#endif
+#else
+#define YYPARSE_DECL() yyparse(void)
+#endif /* YYPARSE_PARAM */
+
+static int yygrowstack(void);
+#define YYPREFIX yy
+#line 37 /usr/src/external/bsd/flex/dist/parse.y
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/* notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include flexdef.h
+#include tables.h
+
+int pat, scnum, eps, headcnt, trailcnt, lastchar, i, rulelen;
+int trlcontxt, xcluflg, currccl, cclsorted, varlength, variable_trail_rule;
+
+int *scon_stk;
+int scon_stk_ptr;
+
+static int madeany = false;  /* whether we've made the '.' character class */
+static int ccldot, cclany;
+int previous_continued_action;	/* whether the previous rule's action was '|' */
+
+#define format_warn3(fmt, a1, a2) \
+	do{ \
+char fw3_msg[MAXLINE];\
+snprintf( fw3_msg, MAXLINE,(fmt), (a1), (a2) );\
+lwarn( fw3_msg );\
+	}while(0)
+
+/* Expand a POSIX character class expression. */
+#define CCL_EXPR(func) \
+	do{ \
+	int c; \
+	for ( c = 0; c  csize; ++c ) \
+		if ( isascii(c)  func(c) ) \
+			ccladd( currccl, c ); \
+	}while(0)
+
+/* negated class */
+#define CCL_NEG_EXPR(func) \
+	do{ \
+	int c; \
+	for ( c = 0; c  csize; ++c ) \
+		if ( !func(c) ) \
+			ccladd( currccl, c ); \
+	}while(0)
+
+/* While POSIX defines isblank(), it's not ANSI C. */
+#define IS_BLANK(c) ((c) == ' ' || (c) == '\t')
+
+/* On some over-ambitious machines, such as DEC Alpha's, the default
+ * token type is long instead of int; this leads to problems with
+ * declaring yylval in flexdef.h.  But so far, all the yacc's I've seen
+ * wrap their definitions of YYSTYPE with #ifndef YYSTYPE's, so the
+ * following should ensure that the default token type is int.
+ */
+#define YYSTYPE int
+
+#line 116 /usr/src/external/bsd/flex/dist/parse.c
+#define CHAR 257
+#define NUMBER 258
+#define SECTEND 259
+#define SCDECL 260
+#define XSCDECL 261
+#define NAME 262
+#define PREVCCL 263
+#define EOF_OP 264
+#define OPTION_OP 265
+#define OPT_OUTFILE 266
+#define OPT_PREFIX 267
+#define OPT_YYCLASS 268
+#define OPT_HEADER 269
+#define OPT_EXTRA_TYPE 270
+#define OPT_TABLES 271
+#define 

CVS commit: src/external/bsd/flex/bin

2009-10-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 29 17:17:33 UTC 2009

Modified Files:
src/external/bsd/flex/bin: Makefile

Log Message:
We can rebuild our yacc generated files now


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/bin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/bin/Makefile
diff -u src/external/bsd/flex/bin/Makefile:1.4 src/external/bsd/flex/bin/Makefile:1.5
--- src/external/bsd/flex/bin/Makefile:1.4	Thu Oct 29 09:03:09 2009
+++ src/external/bsd/flex/bin/Makefile	Thu Oct 29 13:17:33 2009
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	5.4 (Berkeley) 6/24/90
-#	$NetBSD: Makefile,v 1.4 2009/10/29 13:03:09 christos Exp $
+#	$NetBSD: Makefile,v 1.5 2009/10/29 17:17:33 christos Exp $
 #
 # By default, flex will be configured to generate 8-bit scanners only if the
 # -8 flag is given.  If you want it to always generate 8-bit scanners, add
@@ -37,10 +37,6 @@
 tblcmp.c \
 yylex.c
 
-# Don't frob yacc files until we have a good bison
-.y.c .y.h:
-	@true
-
 YHEADER=1
 CLEANFILES+=scan.c skel.c parse.c parse.h
 INCS	=FlexLexer.h



CVS commit: src/external/bsd/flex/lib

2009-10-28 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Oct 28 11:20:08 UTC 2009

Modified Files:
src/external/bsd/flex/lib: Makefile

Log Message:
Debugging libraries require MKDEBUGLIB not MKDEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/flex/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/lib/Makefile
diff -u src/external/bsd/flex/lib/Makefile:1.1 src/external/bsd/flex/lib/Makefile:1.2
--- src/external/bsd/flex/lib/Makefile:1.1	Mon Oct 26 00:49:04 2009
+++ src/external/bsd/flex/lib/Makefile	Wed Oct 28 11:20:07 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2009/10/26 00:49:04 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2009/10/28 11:20:07 njoly Exp $
 
 NOPIC=		# defined
 
@@ -17,7 +17,7 @@
 LINKS+=		${LIBDIR}/libl_p.a ${LIBDIR}/libfl_p.a
 .endif
 
-.if ${MKDEBUG} != no
+.if ${MKDEBUGLIB} != no
 LINKS+=		${LIBDIR}/libl_g.a ${LIBDIR}/libfl_g.a
 .endif
 



CVS commit: src/external/bsd/flex

2009-10-27 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Tue Oct 27 17:51:19 UTC 2009

Modified Files:
src/external/bsd/flex: Makefile

Log Message:
Descend into the man/ subdirectory, so that flex.info gets installed,
and what gets installed matches up with the set lists.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/flex/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/Makefile
diff -u src/external/bsd/flex/Makefile:1.1 src/external/bsd/flex/Makefile:1.2
--- src/external/bsd/flex/Makefile:1.1	Mon Oct 26 00:49:03 2009
+++ src/external/bsd/flex/Makefile	Tue Oct 27 17:51:19 2009
@@ -1,5 +1,5 @@
-#	$NetBSD: Makefile,v 1.1 2009/10/26 00:49:03 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2009/10/27 17:51:19 he Exp $
 
-SUBDIR=	lib bin
+SUBDIR=	lib bin man
 
 .include bsd.subdir.mk



CVS commit: src/external/bsd/flex/dist

2009-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 28 05:04:02 UTC 2009

Modified Files:
src/external/bsd/flex/dist: flex.skl initscan.c

Log Message:
deal with libc's namespace protection


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/flex/dist/flex.skl
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/flex/dist/initscan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/flex.skl
diff -u src/external/bsd/flex/dist/flex.skl:1.2 src/external/bsd/flex/dist/flex.skl:1.3
--- src/external/bsd/flex/dist/flex.skl:1.2	Mon Oct 26 21:44:01 2009
+++ src/external/bsd/flex/dist/flex.skl	Wed Oct 28 01:04:02 2009
@@ -197,6 +197,9 @@
 
 /* begin standard C headers. */
 %if-c-only
+#ifdef _LIBC
+#include namespace.h
+#endif
 #include stdio.h
 #include string.h
 #include errno.h
@@ -215,6 +218,9 @@
 
 %if-c++-only
 /* begin standard C++ headers. */
+#ifdef _LIBC
+#include namespace.h
+#endiif
 #include iostream 
 #include errno.h
 #include cstdlib

Index: src/external/bsd/flex/dist/initscan.c
diff -u src/external/bsd/flex/dist/initscan.c:1.1 src/external/bsd/flex/dist/initscan.c:1.2
--- src/external/bsd/flex/dist/initscan.c:1.1	Mon Oct 26 00:27:15 2009
+++ src/external/bsd/flex/dist/initscan.c	Wed Oct 28 01:04:02 2009
@@ -16,6 +16,9 @@
 /* First, we deal with  platform-specific or compiler-specific issues. */
 
 /* begin standard C headers. */
+#ifdef _LIBC
+#include namespace.h
+#endif
 #include stdio.h
 #include string.h
 #include errno.h



CVS commit: src/external/bsd/flex

2009-10-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Oct 26 11:17:16 UTC 2009

Modified Files:
src/external/bsd/flex: Makefile.inc

Log Message:
add version


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/flex/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/Makefile.inc
diff -u src/external/bsd/flex/Makefile.inc:1.1 src/external/bsd/flex/Makefile.inc:1.2
--- src/external/bsd/flex/Makefile.inc:1.1	Sun Oct 25 20:49:04 2009
+++ src/external/bsd/flex/Makefile.inc	Mon Oct 26 07:17:16 2009
@@ -1,13 +1,15 @@
-#	$NetBSD: Makefile.inc,v 1.1 2009/10/26 00:49:04 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2009/10/26 11:17:16 christos Exp $
 
 WARNS?=	1
 
 .include bsd.own.mk
 
+VERSION=2.5.35
 BINDIR?= /usr/bin
 
 IDIST=	${NETBSDSRCDIR}/external/bsd/flex/dist
 
-CPPFLAGS+= -DHAVE_CONFIG_H -I${.CURDIR}/../include -I${IDIST}
+CPPFLAGS+= -DHAVE_CONFIG_H -I${.CURDIR}/../include -I${IDIST} \
+	-DLOCALEDIR=\/usr/share/locale\
 
 .PATH: ${IDIST}



CVS commit: src/external/bsd/flex/dist

2009-10-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Oct 26 21:29:46 UTC 2009

Removed Files:
src/external/bsd/flex/dist: skel.c

Log Message:
We don't need the pre-built skel.c


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/flex/dist/skel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/flex/include

2009-10-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Oct 26 21:30:02 UTC 2009

Modified Files:
src/external/bsd/flex/include: config.h

Log Message:
Allow tools to override m4


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/flex/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/include/config.h
diff -u src/external/bsd/flex/include/config.h:1.1 src/external/bsd/flex/include/config.h:1.2
--- src/external/bsd/flex/include/config.h:1.1	Sun Oct 25 20:49:04 2009
+++ src/external/bsd/flex/include/config.h	Mon Oct 26 17:30:02 2009
@@ -145,7 +145,9 @@
 #define HAVE__BOOL 1
 
 /* Define to the GNU M4 executable name. */
+#ifndef M4
 #define M4 /usr/bin/m4
+#endif
 
 /* Name of package */
 #define PACKAGE flex



CVS commit: src/external/bsd/flex/dist

2009-10-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct 27 01:44:01 UTC 2009

Modified Files:
src/external/bsd/flex/dist: flex.skl gen.c

Log Message:
Fixes to pass -Wall


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/flex/dist/flex.skl
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/gen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/flex/dist/flex.skl
diff -u src/external/bsd/flex/dist/flex.skl:1.1.1.1 src/external/bsd/flex/dist/flex.skl:1.2
--- src/external/bsd/flex/dist/flex.skl:1.1.1.1	Sun Oct 25 20:26:13 2009
+++ src/external/bsd/flex/dist/flex.skl	Mon Oct 26 21:44:01 2009
@@ -994,10 +994,12 @@
 #endif
 
 %not-for-header
+#ifndef YY_NO_UNPUT
 m4_ifdef( [[M4_YY_NO_UNPUT]],,
 [[
 static void yyunput M4_YY_PARAMS( int c, char *buf_ptr  M4_YY_PROTO_LAST_ARG);
 ]])
+#endif
 %ok-for-header
 %endif
 
@@ -1092,7 +1094,7 @@
 %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \
 \
 %if-c++-only C++ definition \
-	if ( (result = LexerInput( (char *) buf, max_size ))  0 ) \
+	if ( (int)(result = LexerInput( (char *) buf, max_size ))  0 ) \
 		YY_FATAL_ERROR( input in flex scanner failed );
 %endif
 
@@ -1768,6 +1770,7 @@
 }
 
 
+#ifndef YY_NO_UNPUT
 %if-c-only
 m4_ifdef( [[M4_YY_NO_UNPUT]],,
 [[
@@ -1823,6 +1826,7 @@
 %if-c-only
 ]])
 %endif
+#endif
 
 %if-c-only
 #ifndef YY_NO_INPUT

Index: src/external/bsd/flex/dist/gen.c
diff -u src/external/bsd/flex/dist/gen.c:1.3 src/external/bsd/flex/dist/gen.c:1.4
--- src/external/bsd/flex/dist/gen.c:1.3	Mon Oct 26 15:23:33 2009
+++ src/external/bsd/flex/dist/gen.c	Mon Oct 26 21:44:01 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: gen.c,v 1.3 2009/10/26 19:23:33 christos Exp $	*/
+/*	$NetBSD: gen.c,v 1.4 2009/10/27 01:44:01 christos Exp $	*/
 
 /* gen - actual generation (writing) of flex scanners */
 
@@ -1893,7 +1893,7 @@
 			outn (\tif ( YY_CURRENT_BUFFER_LVALUE-yy_is_interactive ) \\);
 			outn (\t\t{ \\);
 			outn (\t\tint c = '*'; \\);
-			outn (\t\tint n; \\);
+			outn (\t\tsize_t n; \\);
 			outn (\t\tfor ( n = 0; n  max_size  \\);
 			outn (\t\t\t (c = getc( yyin )) != EOF  c != '\\n'; ++n ) \\);
 			outn (\t\t\tbuf[n] = (char) c; \\);