Currently, mklocale only ignores the first blank after the VARIABLE
definition.  This means that we store the variable definition along
with the leading blanks.

The lexer should eat the blanks after VARIABLE before storing the
variable definition.

 - todd

Index: usr.bin/mklocale/lex.l
===================================================================
RCS file: /cvs/src/usr.bin/mklocale/lex.l,v
retrieving revision 1.3
diff -u -p -u -r1.3 lex.l
--- usr.bin/mklocale/lex.l      5 Dec 2012 23:20:25 -0000       1.3
+++ usr.bin/mklocale/lex.l      27 May 2016 12:20:01 -0000
@@ -114,7 +114,7 @@ SWIDTH1                             { yylval.i = 
_RUNETYPE_SW1; r
 SWIDTH2                                { yylval.i = _RUNETYPE_SW2; 
return(LIST); }
 SWIDTH3                                { yylval.i = _RUNETYPE_SW3; 
return(LIST); }
 
-VARIABLE[\t ]                  { static char vbuf[1024];
+VARIABLE[\t ]+                 { static char vbuf[1024];
                                  char *v = vbuf;
                                  while ((*v = input()) && *v != '\n')
                                        ++v;

Reply via email to