mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-18 12:16:13 +08:00
Update.
2000-08-20 Ulrich Drepper <drepper@redhat.com> * intl/loadmsgcat.c (_nl_unload_domain): Also free conv_tab element. Pretty printing. * intl/plural.y (new_exp): Take number of optional parameters in second parameter. Test for correct number of parameters and free correctly in case of failure. Adjust all callers. (yylex): Allow ';' as terminator character.
This commit is contained in:
parent
9b02e86850
commit
2f599545f5
@ -1,3 +1,12 @@
|
|||||||
|
2000-08-20 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* intl/loadmsgcat.c (_nl_unload_domain): Also free conv_tab element.
|
||||||
|
Pretty printing.
|
||||||
|
* intl/plural.y (new_exp): Take number of optional parameters in
|
||||||
|
second parameter. Test for correct number of parameters and free
|
||||||
|
correctly in case of failure. Adjust all callers.
|
||||||
|
(yylex): Allow ';' as terminator character.
|
||||||
|
|
||||||
2000-08-19 Ulrich Drepper <drepper@redhat.com>
|
2000-08-19 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* locale/lc-time.c (free_mem): New function. Free alt_digits and
|
* locale/lc-time.c (free_mem): New function. Free alt_digits and
|
||||||
|
@ -386,21 +386,17 @@ _nl_unload_domain (domain)
|
|||||||
if (domain->plural != &germanic_plural)
|
if (domain->plural != &germanic_plural)
|
||||||
__gettext_free_exp (domain->plural);
|
__gettext_free_exp (domain->plural);
|
||||||
|
|
||||||
#ifdef _LIBC
|
if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
|
||||||
|
free (domain->conv_tab);
|
||||||
|
|
||||||
if (domain->conv != (__gconv_t) -1)
|
if (domain->conv != (__gconv_t) -1)
|
||||||
__gconv_close (domain->conv);
|
__gconv_close (domain->conv);
|
||||||
#else
|
|
||||||
# if HAVE_ICONV
|
|
||||||
if (domain->conv != (iconv_t) -1)
|
|
||||||
iconv_close (domain->conv);
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _POSIX_MAPPED_FILES
|
# ifdef _POSIX_MAPPED_FILES
|
||||||
if (domain->use_mmap)
|
if (domain->use_mmap)
|
||||||
munmap ((caddr_t) domain->data, domain->mmap_size);
|
munmap ((caddr_t) domain->data, domain->mmap_size);
|
||||||
else
|
else
|
||||||
#endif /* _POSIX_MAPPED_FILES */
|
# endif /* _POSIX_MAPPED_FILES */
|
||||||
free ((void *) domain->data);
|
free ((void *) domain->data);
|
||||||
|
|
||||||
free (domain);
|
free (domain);
|
||||||
|
115
intl/plural.c
115
intl/plural.c
@ -39,18 +39,19 @@
|
|||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
#include "gettextP.h"
|
#include "gettextP.h"
|
||||||
|
|
||||||
|
#define YYDEBUG 1
|
||||||
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
|
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
|
||||||
#define YYPARSE_PARAM arg
|
#define YYPARSE_PARAM arg
|
||||||
|
|
||||||
#line 32 "plural.y"
|
#line 33 "plural.y"
|
||||||
typedef union {
|
typedef union {
|
||||||
unsigned long int num;
|
unsigned long int num;
|
||||||
struct expression *exp;
|
struct expression *exp;
|
||||||
} YYSTYPE;
|
} YYSTYPE;
|
||||||
#line 37 "plural.y"
|
#line 38 "plural.y"
|
||||||
|
|
||||||
/* Prototypes for local functions. */
|
/* Prototypes for local functions. */
|
||||||
static struct expression *new_exp (enum operator op, ...);
|
static struct expression *new_exp (enum operator op, int n, ...);
|
||||||
static int yylex (YYSTYPE *lval, const char **pexp);
|
static int yylex (YYSTYPE *lval, const char **pexp);
|
||||||
static void yyerror (const char *str);
|
static void yyerror (const char *str);
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -117,8 +118,8 @@ static const short yyrhs[] = { 19,
|
|||||||
|
|
||||||
#if YYDEBUG != 0
|
#if YYDEBUG != 0
|
||||||
static const short yyrline[] = { 0,
|
static const short yyrline[] = { 0,
|
||||||
55, 61, 66, 71, 76, 81, 86, 91, 96, 101,
|
56, 62, 67, 72, 77, 82, 87, 92, 97, 102,
|
||||||
106, 111, 116, 122
|
107, 112, 117, 123
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -191,7 +192,7 @@ static const short yycheck[] = { 3,
|
|||||||
#define YYPURE 1
|
#define YYPURE 1
|
||||||
|
|
||||||
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
|
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
|
||||||
#line 3 "/usr/share/bison.simple"
|
#line 3 "/usr/lib/bison.simple"
|
||||||
/* This file comes from bison-1.28. */
|
/* This file comes from bison-1.28. */
|
||||||
|
|
||||||
/* Skeleton output parser for bison,
|
/* Skeleton output parser for bison,
|
||||||
@ -405,7 +406,7 @@ __yy_memcpy (char *to, char *from, unsigned int count)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#line 217 "/usr/share/bison.simple"
|
#line 217 "/usr/lib/bison.simple"
|
||||||
|
|
||||||
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
|
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
|
||||||
into yyparse. The argument should have type void *.
|
into yyparse. The argument should have type void *.
|
||||||
@ -734,105 +735,105 @@ yyreduce:
|
|||||||
switch (yyn) {
|
switch (yyn) {
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
#line 56 "plural.y"
|
#line 57 "plural.y"
|
||||||
{
|
{
|
||||||
((struct parse_args *) arg)->res = yyvsp[0].exp;
|
((struct parse_args *) arg)->res = yyvsp[0].exp;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 2:
|
case 2:
|
||||||
#line 62 "plural.y"
|
#line 63 "plural.y"
|
||||||
{
|
{
|
||||||
if ((yyval.exp = new_exp (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
|
if ((yyval.exp = new_exp (qmop, 3, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 3:
|
case 3:
|
||||||
#line 67 "plural.y"
|
#line 68 "plural.y"
|
||||||
{
|
{
|
||||||
if ((yyval.exp = new_exp (lor, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
|
if ((yyval.exp = new_exp (lor, 2, yyvsp[-2].exp, yyvsp[0].exp)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 4:
|
case 4:
|
||||||
#line 72 "plural.y"
|
#line 73 "plural.y"
|
||||||
{
|
{
|
||||||
if ((yyval.exp = new_exp (land, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
|
if ((yyval.exp = new_exp (land, 2, yyvsp[-2].exp, yyvsp[0].exp)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 5:
|
case 5:
|
||||||
#line 77 "plural.y"
|
#line 78 "plural.y"
|
||||||
{
|
{
|
||||||
if ((yyval.exp = new_exp (equal, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
|
if ((yyval.exp = new_exp (equal, 2, yyvsp[-2].exp, yyvsp[0].exp)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 6:
|
case 6:
|
||||||
#line 82 "plural.y"
|
#line 83 "plural.y"
|
||||||
{
|
{
|
||||||
if ((yyval.exp = new_exp (not_equal, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
|
if ((yyval.exp = new_exp (not_equal, 2, yyvsp[-2].exp, yyvsp[0].exp)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 7:
|
case 7:
|
||||||
#line 87 "plural.y"
|
#line 88 "plural.y"
|
||||||
{
|
{
|
||||||
if ((yyval.exp = new_exp (plus, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
|
if ((yyval.exp = new_exp (plus, 2, yyvsp[-2].exp, yyvsp[0].exp)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 8:
|
case 8:
|
||||||
#line 92 "plural.y"
|
#line 93 "plural.y"
|
||||||
{
|
{
|
||||||
if ((yyval.exp = new_exp (minus, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
|
if ((yyval.exp = new_exp (minus, 2, yyvsp[-2].exp, yyvsp[0].exp)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 9:
|
case 9:
|
||||||
#line 97 "plural.y"
|
#line 98 "plural.y"
|
||||||
{
|
{
|
||||||
if ((yyval.exp = new_exp (mult, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
|
if ((yyval.exp = new_exp (mult, 2, yyvsp[-2].exp, yyvsp[0].exp)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 10:
|
case 10:
|
||||||
#line 102 "plural.y"
|
#line 103 "plural.y"
|
||||||
{
|
{
|
||||||
if ((yyval.exp = new_exp (divide, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
|
if ((yyval.exp = new_exp (divide, 2, yyvsp[-2].exp, yyvsp[0].exp)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 11:
|
case 11:
|
||||||
#line 107 "plural.y"
|
#line 108 "plural.y"
|
||||||
{
|
{
|
||||||
if ((yyval.exp = new_exp (module, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
|
if ((yyval.exp = new_exp (module, 2, yyvsp[-2].exp, yyvsp[0].exp)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 12:
|
case 12:
|
||||||
#line 112 "plural.y"
|
#line 113 "plural.y"
|
||||||
{
|
{
|
||||||
if ((yyval.exp = new_exp (var, NULL)) == NULL)
|
if ((yyval.exp = new_exp (var, 0)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 13:
|
case 13:
|
||||||
#line 117 "plural.y"
|
#line 118 "plural.y"
|
||||||
{
|
{
|
||||||
if ((yyval.exp = new_exp (num, NULL)) == NULL)
|
if ((yyval.exp = new_exp (num, 0)) == NULL)
|
||||||
YYABORT;
|
YYABORT;
|
||||||
yyval.exp->val.num = yyvsp[0].num
|
yyval.exp->val.num = yyvsp[0].num
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 14:
|
case 14:
|
||||||
#line 123 "plural.y"
|
#line 124 "plural.y"
|
||||||
{
|
{
|
||||||
yyval.exp = yyvsp[-1].exp
|
yyval.exp = yyvsp[-1].exp
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
}
|
}
|
||||||
/* the action file gets copied in in place of this dollarsign */
|
/* the action file gets copied in in place of this dollarsign */
|
||||||
#line 543 "/usr/share/bison.simple"
|
#line 543 "/usr/lib/bison.simple"
|
||||||
|
|
||||||
yyvsp -= yylen;
|
yyvsp -= yylen;
|
||||||
yyssp -= yylen;
|
yyssp -= yylen;
|
||||||
@ -1052,35 +1053,37 @@ yyerrhandle:
|
|||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#line 128 "plural.y"
|
#line 129 "plural.y"
|
||||||
|
|
||||||
|
|
||||||
static struct expression *
|
static struct expression *
|
||||||
new_exp (enum operator op, ...)
|
new_exp (enum operator op, int n, ...)
|
||||||
{
|
{
|
||||||
struct expression *newp = (struct expression *) malloc (sizeof (*newp));
|
struct expression *newp = (struct expression *) calloc (1, sizeof (*newp));
|
||||||
va_list va;
|
va_list va;
|
||||||
struct expression *next;
|
|
||||||
|
|
||||||
va_start (va, op);
|
va_start (va, n);
|
||||||
|
|
||||||
if (newp == NULL)
|
if (newp == NULL)
|
||||||
while ((next = va_arg (va, struct expression *)) != NULL)
|
while (n-- > 0)
|
||||||
__gettext_free_exp (next);
|
__gettext_free_exp (va_arg (va, struct expression *));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
newp->operation = op;
|
newp->operation = op;
|
||||||
next = va_arg (va, struct expression *);
|
if (n > 0)
|
||||||
if (next != NULL)
|
|
||||||
{
|
{
|
||||||
newp->val.args3.bexp = next;
|
newp->val.args3.bexp = va_arg (va, struct expression *);
|
||||||
next = va_arg (va, struct expression *);
|
newp->val.args3.tbranch = va_arg (va, struct expression *);
|
||||||
if (next != NULL)
|
|
||||||
|
if (n > 2)
|
||||||
|
newp->val.args3.fbranch = va_arg (va, struct expression *);
|
||||||
|
|
||||||
|
if (newp->val.args3.bexp == NULL
|
||||||
|
|| newp->val.args3.tbranch == NULL
|
||||||
|
|| (n > 2 && newp->val.args3.fbranch == NULL))
|
||||||
{
|
{
|
||||||
newp->val.args3.tbranch = next;
|
__gettext_free_exp (newp);
|
||||||
next = va_arg (va, struct expression *);
|
newp = NULL;
|
||||||
if (next != NULL)
|
|
||||||
newp->val.args3.fbranch = next;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1131,6 +1134,8 @@ yylex (YYSTYPE *lval, const char **pexp)
|
|||||||
const char *exp = *pexp;
|
const char *exp = *pexp;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
|
yydebug = 1;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
if (exp[0] == '\\' && exp[1] == '\n')
|
if (exp[0] == '\\' && exp[1] == '\n')
|
||||||
@ -1138,7 +1143,14 @@ yylex (YYSTYPE *lval, const char **pexp)
|
|||||||
exp += 2;
|
exp += 2;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (exp[0] != '\0' && exp[0] != ' ' && exp[0] != '\t')
|
|
||||||
|
if (exp[0] == '\0')
|
||||||
|
{
|
||||||
|
*pexp = exp;
|
||||||
|
return YYEOF;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (exp[0] != ' ' && exp[0] != '\t')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
++exp;
|
++exp;
|
||||||
@ -1190,6 +1202,7 @@ yylex (YYSTYPE *lval, const char **pexp)
|
|||||||
/* Nothing, just return the character. */
|
/* Nothing, just return the character. */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ';':
|
||||||
case '\n':
|
case '\n':
|
||||||
case '\0':
|
case '\0':
|
||||||
/* Be safe and let the user call this function again. */
|
/* Be safe and let the user call this function again. */
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
%{
|
%{
|
||||||
/* Prototypes for local functions. */
|
/* Prototypes for local functions. */
|
||||||
static struct expression *new_exp (enum operator op, ...);
|
static struct expression *new_exp (enum operator op, int n, ...);
|
||||||
static int yylex (YYSTYPE *lval, const char **pexp);
|
static int yylex (YYSTYPE *lval, const char **pexp);
|
||||||
static void yyerror (const char *str);
|
static void yyerror (const char *str);
|
||||||
%}
|
%}
|
||||||
@ -60,62 +60,62 @@ start: exp
|
|||||||
|
|
||||||
exp: exp '?' exp ':' exp
|
exp: exp '?' exp ':' exp
|
||||||
{
|
{
|
||||||
if (($$ = new_exp (qmop, $1, $3, $5, NULL)) == NULL)
|
if (($$ = new_exp (qmop, 3, $1, $3, $5)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
}
|
}
|
||||||
| exp '|' exp
|
| exp '|' exp
|
||||||
{
|
{
|
||||||
if (($$ = new_exp (lor, $1, $3, NULL)) == NULL)
|
if (($$ = new_exp (lor, 2, $1, $3)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
}
|
}
|
||||||
| exp '&' exp
|
| exp '&' exp
|
||||||
{
|
{
|
||||||
if (($$ = new_exp (land, $1, $3, NULL)) == NULL)
|
if (($$ = new_exp (land, 2, $1, $3)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
}
|
}
|
||||||
| exp '=' exp
|
| exp '=' exp
|
||||||
{
|
{
|
||||||
if (($$ = new_exp (equal, $1, $3, NULL)) == NULL)
|
if (($$ = new_exp (equal, 2, $1, $3)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
}
|
}
|
||||||
| exp '!' exp
|
| exp '!' exp
|
||||||
{
|
{
|
||||||
if (($$ = new_exp (not_equal, $1, $3, NULL)) == NULL)
|
if (($$ = new_exp (not_equal, 2, $1, $3)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
}
|
}
|
||||||
| exp '+' exp
|
| exp '+' exp
|
||||||
{
|
{
|
||||||
if (($$ = new_exp (plus, $1, $3, NULL)) == NULL)
|
if (($$ = new_exp (plus, 2, $1, $3)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
}
|
}
|
||||||
| exp '-' exp
|
| exp '-' exp
|
||||||
{
|
{
|
||||||
if (($$ = new_exp (minus, $1, $3, NULL)) == NULL)
|
if (($$ = new_exp (minus, 2, $1, $3)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
}
|
}
|
||||||
| exp '*' exp
|
| exp '*' exp
|
||||||
{
|
{
|
||||||
if (($$ = new_exp (mult, $1, $3, NULL)) == NULL)
|
if (($$ = new_exp (mult, 2, $1, $3)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
}
|
}
|
||||||
| exp '/' exp
|
| exp '/' exp
|
||||||
{
|
{
|
||||||
if (($$ = new_exp (divide, $1, $3, NULL)) == NULL)
|
if (($$ = new_exp (divide, 2, $1, $3)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
}
|
}
|
||||||
| exp '%' exp
|
| exp '%' exp
|
||||||
{
|
{
|
||||||
if (($$ = new_exp (module, $1, $3, NULL)) == NULL)
|
if (($$ = new_exp (module, 2, $1, $3)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
}
|
}
|
||||||
| 'n'
|
| 'n'
|
||||||
{
|
{
|
||||||
if (($$ = new_exp (var, NULL)) == NULL)
|
if (($$ = new_exp (var, 0)) == NULL)
|
||||||
YYABORT
|
YYABORT
|
||||||
}
|
}
|
||||||
| NUMBER
|
| NUMBER
|
||||||
{
|
{
|
||||||
if (($$ = new_exp (num, NULL)) == NULL)
|
if (($$ = new_exp (num, 0)) == NULL)
|
||||||
YYABORT;
|
YYABORT;
|
||||||
$$->val.num = $1
|
$$->val.num = $1
|
||||||
}
|
}
|
||||||
@ -128,31 +128,33 @@ exp: exp '?' exp ':' exp
|
|||||||
%%
|
%%
|
||||||
|
|
||||||
static struct expression *
|
static struct expression *
|
||||||
new_exp (enum operator op, ...)
|
new_exp (enum operator op, int n, ...)
|
||||||
{
|
{
|
||||||
struct expression *newp = (struct expression *) malloc (sizeof (*newp));
|
struct expression *newp = (struct expression *) calloc (1, sizeof (*newp));
|
||||||
va_list va;
|
va_list va;
|
||||||
struct expression *next;
|
|
||||||
|
|
||||||
va_start (va, op);
|
va_start (va, n);
|
||||||
|
|
||||||
if (newp == NULL)
|
if (newp == NULL)
|
||||||
while ((next = va_arg (va, struct expression *)) != NULL)
|
while (n-- > 0)
|
||||||
__gettext_free_exp (next);
|
__gettext_free_exp (va_arg (va, struct expression *));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
newp->operation = op;
|
newp->operation = op;
|
||||||
next = va_arg (va, struct expression *);
|
if (n > 0)
|
||||||
if (next != NULL)
|
|
||||||
{
|
{
|
||||||
newp->val.args3.bexp = next;
|
newp->val.args3.bexp = va_arg (va, struct expression *);
|
||||||
next = va_arg (va, struct expression *);
|
newp->val.args3.tbranch = va_arg (va, struct expression *);
|
||||||
if (next != NULL)
|
|
||||||
|
if (n > 2)
|
||||||
|
newp->val.args3.fbranch = va_arg (va, struct expression *);
|
||||||
|
|
||||||
|
if (newp->val.args3.bexp == NULL
|
||||||
|
|| newp->val.args3.tbranch == NULL
|
||||||
|
|| (n > 2 && newp->val.args3.fbranch == NULL))
|
||||||
{
|
{
|
||||||
newp->val.args3.tbranch = next;
|
__gettext_free_exp (newp);
|
||||||
next = va_arg (va, struct expression *);
|
newp = NULL;
|
||||||
if (next != NULL)
|
|
||||||
newp->val.args3.fbranch = next;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -210,7 +212,14 @@ yylex (YYSTYPE *lval, const char **pexp)
|
|||||||
exp += 2;
|
exp += 2;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (exp[0] != '\0' && exp[0] != ' ' && exp[0] != '\t')
|
|
||||||
|
if (exp[0] == '\0')
|
||||||
|
{
|
||||||
|
*pexp = exp;
|
||||||
|
return YYEOF;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (exp[0] != ' ' && exp[0] != '\t')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
++exp;
|
++exp;
|
||||||
@ -262,6 +271,7 @@ yylex (YYSTYPE *lval, const char **pexp)
|
|||||||
/* Nothing, just return the character. */
|
/* Nothing, just return the character. */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ';':
|
||||||
case '\n':
|
case '\n':
|
||||||
case '\0':
|
case '\0':
|
||||||
/* Be safe and let the user call this function again. */
|
/* Be safe and let the user call this function again. */
|
||||||
|
Loading…
Reference in New Issue
Block a user