Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/flex/dist/src another int -> size_t



details:   https://anonhg.NetBSD.org/src/rev/168f8277d7ac
branches:  trunk
changeset: 350050:168f8277d7ac
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jan 02 21:20:00 2017 +0000

description:
another int -> size_t

diffstat:

 external/bsd/flex/dist/src/gen.c      |    6 +-
 external/bsd/flex/dist/src/initscan.c |  588 +++++++++++++++++----------------
 2 files changed, 299 insertions(+), 295 deletions(-)

diffs (truncated from 2056 to 300 lines):

diff -r e9f41736f603 -r 168f8277d7ac external/bsd/flex/dist/src/gen.c
--- a/external/bsd/flex/dist/src/gen.c  Mon Jan 02 21:06:10 2017 +0000
+++ b/external/bsd/flex/dist/src/gen.c  Mon Jan 02 21:20:00 2017 +0000
@@ -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 @@
                ("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)" :
diff -r e9f41736f603 -r 168f8277d7ac external/bsd/flex/dist/src/initscan.c
--- a/external/bsd/flex/dist/src/initscan.c     Mon Jan 02 21:06:10 2017 +0000
+++ b/external/bsd/flex/dist/src/initscan.c     Mon Jan 02 21:20:00 2017 +0000
@@ -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 @@
 #define YY_TYPEDEF_YY_SIZE_T
 typedef size_t yy_size_t;
 #endif
-
-extern int yyleng;
+#ifndef YY_TYPEDEF_YY_SSIZE_T
+#define YY_TYPEDEF_YY_SSIZE_T
+typedef ssize_t yy_ssize_t;
+#endif
+
+extern yy_size_t yyleng;
 
 extern FILE *yyin, *yyout;
 
@@ -271,12 +275,12 @@
        /* 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 @@
 
 /* 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 @@
 
 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 @@
 #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 @@
 /*  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 @@
     if (!indented_code) line_directive_out(NULL, 0);\
 } while (0)
 
-#line 2047 "<stdout>"
-
-#line 2049 "<stdout>"
+#line 2051 "<stdout>"
+
+#line 2053 "<stdout>"
 
 #define INITIAL 0
 #define SECT2 1
@@ -2111,7 +2115,7 @@
 
 void yyset_out  ( FILE * _out_str  );
 
-                       int yyget_leng ( void );
+                       yy_size_t yyget_leng ( void );
 
 char *yyget_text ( void );
 
@@ -2300,9 +2304,9 @@
                }
 
        {
-#line 162 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
-
-#line 164 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 162 "/usr/src/external/bsd/flex/dist/src/scan.l"
+
+#line 164 "/usr/src/external/bsd/flex/dist/src/scan.l"
        static int bracelevel, didadef, indented_code;
        static int doing_rule_action = false;
        static int option_sense;
@@ -2312,7 +2316,7 @@
        char nmdef[MAXLINE];
 
 
-#line 2315 "<stdout>"
+#line 2319 "<stdout>"
 
        while ( /*CONSTCOND*/1 )                /* loops until end-of-file is reached */
                {
@@ -2372,39 +2376,39 @@
 
 case 1:
 YY_RULE_SETUP
-#line 174 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 174 "/usr/src/external/bsd/flex/dist/src/scan.l"
 START_CODEBLOCK(true);
        YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 175 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 175 "/usr/src/external/bsd/flex/dist/src/scan.l"
 add_action("/*[""["); yy_push_state( COMMENT );
        YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 176 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 176 "/usr/src/external/bsd/flex/dist/src/scan.l"
 yy_push_state( LINEDIR );
        YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 177 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 177 "/usr/src/external/bsd/flex/dist/src/scan.l"
 return SCDECL;
        YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 178 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 178 "/usr/src/external/bsd/flex/dist/src/scan.l"
 return XSCDECL;
        YY_BREAK
 case 6:
 /* rule 6 can match eol */
 YY_RULE_SETUP
-#line 179 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 179 "/usr/src/external/bsd/flex/dist/src/scan.l"
 START_CODEBLOCK(false);
        YY_BREAK
 case 7:
 /* rule 7 can match eol */
 YY_RULE_SETUP
-#line 180 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 180 "/usr/src/external/bsd/flex/dist/src/scan.l"
 {
                 brace_start_line = linenum;
                 ++linenum;
@@ -2415,17 +2419,17 @@
        YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 188 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 188 "/usr/src/external/bsd/flex/dist/src/scan.l"
 synerr( _("malformed '%top' directive") );
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 190 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 190 "/usr/src/external/bsd/flex/dist/src/scan.l"
 /* discard */
        YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 192 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 192 "/usr/src/external/bsd/flex/dist/src/scan.l"
 {
                        sectnum = 2;
                        bracelevel = 0;
@@ -2438,42 +2442,42 @@
 case 11:
 /* rule 11 can match eol */
 YY_RULE_SETUP
-#line 201 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 201 "/usr/src/external/bsd/flex/dist/src/scan.l"
 yytext_is_array = false; ++linenum;
        YY_BREAK
 case 12:
 /* rule 12 can match eol */
 YY_RULE_SETUP
-#line 202 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 202 "/usr/src/external/bsd/flex/dist/src/scan.l"
 yytext_is_array = true; ++linenum;
        YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 204 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 204 "/usr/src/external/bsd/flex/dist/src/scan.l"
 BEGIN(OPTION); return TOK_OPTION;
        YY_BREAK
 case 14:
 /* rule 14 can match eol */
 YY_RULE_SETUP
-#line 206 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 206 "/usr/src/external/bsd/flex/dist/src/scan.l"
 ++linenum; /* ignore */
        YY_BREAK
 case 15:
 /* rule 15 can match eol */
 YY_RULE_SETUP
-#line 207 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 207 "/usr/src/external/bsd/flex/dist/src/scan.l"
 ++linenum;     /* ignore */
        YY_BREAK
 /* xgettext: no-c-format */
 case 16:
 /* rule 16 can match eol */
 YY_RULE_SETUP
-#line 210 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 210 "/usr/src/external/bsd/flex/dist/src/scan.l"
 synerr( _( "unrecognized '%' directive" ) );
        YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 212 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 212 "/usr/src/external/bsd/flex/dist/src/scan.l"
 {
                        if(yyleng < MAXLINE)
                         {
@@ -2491,51 +2495,51 @@
        YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 227 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 227 "/usr/src/external/bsd/flex/dist/src/scan.l"
 RETURNNAME;
        YY_BREAK
 case 19:
 /* rule 19 can match eol */
 YY_RULE_SETUP
-#line 228 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 228 "/usr/src/external/bsd/flex/dist/src/scan.l"
 ++linenum; /* allows blank lines in section 1 */
        YY_BREAK
 case 20:
 /* rule 20 can match eol */
 YY_RULE_SETUP
-#line 229 "/p/netbsd/cvsroot/src/external/bsd/flex/dist/src/scan.l"
+#line 229 "/usr/src/external/bsd/flex/dist/src/scan.l"
 ACTION_ECHO; ++linenum; /* maybe end of comment line */
        YY_BREAK
 
 /* */
 case 21:
 YY_RULE_SETUP



Home | Main Index | Thread Index | Old Index