the lex code in heimdal had a function error_message() which conflicts
with a function from the com_err library. This replaces it with
lex_err_message()
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
12 files changed:
/* Line 1455 of yacc.c */
#line 244 "heimdal/lib/asn1/asn1parse.y"
/* Line 1455 of yacc.c */
#line 244 "heimdal/lib/asn1/asn1parse.y"
- { error_message("implicit tagging is not supported"); }
+ { lex_err_message("implicit tagging is not supported"); }
break;
case 5:
/* Line 1455 of yacc.c */
#line 246 "heimdal/lib/asn1/asn1parse.y"
break;
case 5:
/* Line 1455 of yacc.c */
#line 246 "heimdal/lib/asn1/asn1parse.y"
- { error_message("automatic tagging is not supported"); }
+ { lex_err_message("automatic tagging is not supported"); }
break;
case 7:
/* Line 1455 of yacc.c */
#line 251 "heimdal/lib/asn1/asn1parse.y"
break;
case 7:
/* Line 1455 of yacc.c */
#line 251 "heimdal/lib/asn1/asn1parse.y"
- { error_message("no extensibility options supported"); }
+ { lex_err_message("no extensibility options supported"); }
#line 354 "heimdal/lib/asn1/asn1parse.y"
{
if((yyvsp[(2) - (5)].value)->type != integervalue)
#line 354 "heimdal/lib/asn1/asn1parse.y"
{
if((yyvsp[(2) - (5)].value)->type != integervalue)
- error_message("Non-integer used in first part of range");
+ lex_err_message("Non-integer used in first part of range");
if((yyvsp[(2) - (5)].value)->type != integervalue)
if((yyvsp[(2) - (5)].value)->type != integervalue)
- error_message("Non-integer in second part of range");
+ lex_err_message("Non-integer in second part of range");
(yyval.range) = ecalloc(1, sizeof(*(yyval.range)));
(yyval.range)->min = (yyvsp[(2) - (5)].value)->u.integervalue;
(yyval.range)->max = (yyvsp[(4) - (5)].value)->u.integervalue;
(yyval.range) = ecalloc(1, sizeof(*(yyval.range)));
(yyval.range)->min = (yyvsp[(2) - (5)].value)->u.integervalue;
(yyval.range)->max = (yyvsp[(4) - (5)].value)->u.integervalue;
#line 364 "heimdal/lib/asn1/asn1parse.y"
{
if((yyvsp[(2) - (5)].value)->type != integervalue)
#line 364 "heimdal/lib/asn1/asn1parse.y"
{
if((yyvsp[(2) - (5)].value)->type != integervalue)
- error_message("Non-integer in first part of range");
+ lex_err_message("Non-integer in first part of range");
(yyval.range) = ecalloc(1, sizeof(*(yyval.range)));
(yyval.range)->min = (yyvsp[(2) - (5)].value)->u.integervalue;
(yyval.range)->max = (yyvsp[(2) - (5)].value)->u.integervalue - 1;
(yyval.range) = ecalloc(1, sizeof(*(yyval.range)));
(yyval.range)->min = (yyvsp[(2) - (5)].value)->u.integervalue;
(yyval.range)->max = (yyvsp[(2) - (5)].value)->u.integervalue - 1;
#line 372 "heimdal/lib/asn1/asn1parse.y"
{
if((yyvsp[(4) - (5)].value)->type != integervalue)
#line 372 "heimdal/lib/asn1/asn1parse.y"
{
if((yyvsp[(4) - (5)].value)->type != integervalue)
- error_message("Non-integer in second part of range");
+ lex_err_message("Non-integer in second part of range");
(yyval.range) = ecalloc(1, sizeof(*(yyval.range)));
(yyval.range)->min = (yyvsp[(4) - (5)].value)->u.integervalue + 2;
(yyval.range)->max = (yyvsp[(4) - (5)].value)->u.integervalue;
(yyval.range) = ecalloc(1, sizeof(*(yyval.range)));
(yyval.range)->min = (yyvsp[(4) - (5)].value)->u.integervalue + 2;
(yyval.range)->max = (yyvsp[(4) - (5)].value)->u.integervalue;
#line 380 "heimdal/lib/asn1/asn1parse.y"
{
if((yyvsp[(2) - (3)].value)->type != integervalue)
#line 380 "heimdal/lib/asn1/asn1parse.y"
{
if((yyvsp[(2) - (3)].value)->type != integervalue)
- error_message("Non-integer used in limit");
+ lex_err_message("Non-integer used in limit");
(yyval.range) = ecalloc(1, sizeof(*(yyval.range)));
(yyval.range)->min = (yyvsp[(2) - (3)].value)->u.integervalue;
(yyval.range)->max = (yyvsp[(2) - (3)].value)->u.integervalue;
(yyval.range) = ecalloc(1, sizeof(*(yyval.range)));
(yyval.range)->min = (yyvsp[(2) - (3)].value)->u.integervalue;
(yyval.range)->max = (yyvsp[(2) - (3)].value)->u.integervalue;
Symbol *s = addsym((yyvsp[(1) - (1)].name));
(yyval.type) = new_type(TType);
if(s->stype != Stype && s->stype != SUndefined)
Symbol *s = addsym((yyvsp[(1) - (1)].name));
(yyval.type) = new_type(TType);
if(s->stype != Stype && s->stype != SUndefined)
- error_message ("%s is not a type\n", (yyvsp[(1) - (1)].name));
+ lex_err_message ("%s is not a type\n", (yyvsp[(1) - (1)].name));
else
(yyval.type)->symbol = s;
}
else
(yyval.type)->symbol = s;
}
#line 607 "heimdal/lib/asn1/asn1parse.y"
{
if ((yyvsp[(3) - (3)].value)->type != objectidentifiervalue)
#line 607 "heimdal/lib/asn1/asn1parse.y"
{
if ((yyvsp[(3) - (3)].value)->type != objectidentifiervalue)
- error_message("Non-OID used in ENCODED BY constraint");
+ lex_err_message("Non-OID used in ENCODED BY constraint");
(yyval.constraint_spec) = new_constraint_spec(CT_CONTENTS);
(yyval.constraint_spec)->u.content.type = NULL;
(yyval.constraint_spec)->u.content.encoding = (yyvsp[(3) - (3)].value);
(yyval.constraint_spec) = new_constraint_spec(CT_CONTENTS);
(yyval.constraint_spec)->u.content.type = NULL;
(yyval.constraint_spec)->u.content.encoding = (yyvsp[(3) - (3)].value);
#line 615 "heimdal/lib/asn1/asn1parse.y"
{
if ((yyvsp[(5) - (5)].value)->type != objectidentifiervalue)
#line 615 "heimdal/lib/asn1/asn1parse.y"
{
if ((yyvsp[(5) - (5)].value)->type != objectidentifiervalue)
- error_message("Non-OID used in ENCODED BY constraint");
+ lex_err_message("Non-OID used in ENCODED BY constraint");
(yyval.constraint_spec) = new_constraint_spec(CT_CONTENTS);
(yyval.constraint_spec)->u.content.type = (yyvsp[(2) - (5)].type);
(yyval.constraint_spec)->u.content.encoding = (yyvsp[(5) - (5)].value);
(yyval.constraint_spec) = new_constraint_spec(CT_CONTENTS);
(yyval.constraint_spec)->u.content.type = (yyvsp[(2) - (5)].type);
(yyval.constraint_spec)->u.content.encoding = (yyvsp[(5) - (5)].value);
Symbol *s = addsym((yyvsp[(1) - (1)].name));
if(s->stype != SValue ||
s->value->type != objectidentifiervalue) {
Symbol *s = addsym((yyvsp[(1) - (1)].name));
if(s->stype != SValue ||
s->value->type != objectidentifiervalue) {
- error_message("%s is not an object identifier\n",
+ lex_err_message("%s is not an object identifier\n",
{
Symbol *s = addsym((yyvsp[(1) - (1)].name));
if(s->stype != SValue)
{
Symbol *s = addsym((yyvsp[(1) - (1)].name));
if(s->stype != SValue)
- error_message ("%s is not a value\n",
+ lex_err_message ("%s is not a value\n",
s->name);
else
(yyval.value) = s->value;
s->name);
else
(yyval.value) = s->value;
void
yyerror (const char *s)
{
void
yyerror (const char *s)
{
- error_message ("%s\n", s);
+ lex_err_message ("%s\n", s);
TagDefault : kw_EXPLICIT kw_TAGS
| kw_IMPLICIT kw_TAGS
TagDefault : kw_EXPLICIT kw_TAGS
| kw_IMPLICIT kw_TAGS
- { error_message("implicit tagging is not supported"); }
+ { lex_err_message("implicit tagging is not supported"); }
- { error_message("automatic tagging is not supported"); }
+ { lex_err_message("automatic tagging is not supported"); }
| /* empty */
;
ExtensionDefault: kw_EXTENSIBILITY kw_IMPLIED
| /* empty */
;
ExtensionDefault: kw_EXTENSIBILITY kw_IMPLIED
- { error_message("no extensibility options supported"); }
+ { lex_err_message("no extensibility options supported"); }
range : '(' Value RANGE Value ')'
{
if($2->type != integervalue)
range : '(' Value RANGE Value ')'
{
if($2->type != integervalue)
- error_message("Non-integer used in first part of range");
+ lex_err_message("Non-integer used in first part of range");
if($2->type != integervalue)
if($2->type != integervalue)
- error_message("Non-integer in second part of range");
+ lex_err_message("Non-integer in second part of range");
$$ = ecalloc(1, sizeof(*$$));
$$->min = $2->u.integervalue;
$$->max = $4->u.integervalue;
$$ = ecalloc(1, sizeof(*$$));
$$->min = $2->u.integervalue;
$$->max = $4->u.integervalue;
| '(' Value RANGE kw_MAX ')'
{
if($2->type != integervalue)
| '(' Value RANGE kw_MAX ')'
{
if($2->type != integervalue)
- error_message("Non-integer in first part of range");
+ lex_err_message("Non-integer in first part of range");
$$ = ecalloc(1, sizeof(*$$));
$$->min = $2->u.integervalue;
$$->max = $2->u.integervalue - 1;
$$ = ecalloc(1, sizeof(*$$));
$$->min = $2->u.integervalue;
$$->max = $2->u.integervalue - 1;
| '(' kw_MIN RANGE Value ')'
{
if($4->type != integervalue)
| '(' kw_MIN RANGE Value ')'
{
if($4->type != integervalue)
- error_message("Non-integer in second part of range");
+ lex_err_message("Non-integer in second part of range");
$$ = ecalloc(1, sizeof(*$$));
$$->min = $4->u.integervalue + 2;
$$->max = $4->u.integervalue;
$$ = ecalloc(1, sizeof(*$$));
$$->min = $4->u.integervalue + 2;
$$->max = $4->u.integervalue;
| '(' Value ')'
{
if($2->type != integervalue)
| '(' Value ')'
{
if($2->type != integervalue)
- error_message("Non-integer used in limit");
+ lex_err_message("Non-integer used in limit");
$$ = ecalloc(1, sizeof(*$$));
$$->min = $2->u.integervalue;
$$->max = $2->u.integervalue;
$$ = ecalloc(1, sizeof(*$$));
$$->min = $2->u.integervalue;
$$->max = $2->u.integervalue;
Symbol *s = addsym($1);
$$ = new_type(TType);
if(s->stype != Stype && s->stype != SUndefined)
Symbol *s = addsym($1);
$$ = new_type(TType);
if(s->stype != Stype && s->stype != SUndefined)
- error_message ("%s is not a type\n", $1);
+ lex_err_message ("%s is not a type\n", $1);
| kw_ENCODED kw_BY Value
{
if ($3->type != objectidentifiervalue)
| kw_ENCODED kw_BY Value
{
if ($3->type != objectidentifiervalue)
- error_message("Non-OID used in ENCODED BY constraint");
+ lex_err_message("Non-OID used in ENCODED BY constraint");
$$ = new_constraint_spec(CT_CONTENTS);
$$->u.content.type = NULL;
$$->u.content.encoding = $3;
$$ = new_constraint_spec(CT_CONTENTS);
$$->u.content.type = NULL;
$$->u.content.encoding = $3;
| kw_CONTAINING Type kw_ENCODED kw_BY Value
{
if ($5->type != objectidentifiervalue)
| kw_CONTAINING Type kw_ENCODED kw_BY Value
{
if ($5->type != objectidentifiervalue)
- error_message("Non-OID used in ENCODED BY constraint");
+ lex_err_message("Non-OID used in ENCODED BY constraint");
$$ = new_constraint_spec(CT_CONTENTS);
$$->u.content.type = $2;
$$->u.content.encoding = $5;
$$ = new_constraint_spec(CT_CONTENTS);
$$->u.content.type = $2;
$$->u.content.encoding = $5;
Symbol *s = addsym($1);
if(s->stype != SValue ||
s->value->type != objectidentifiervalue) {
Symbol *s = addsym($1);
if(s->stype != SValue ||
s->value->type != objectidentifiervalue) {
- error_message("%s is not an object identifier\n",
+ lex_err_message("%s is not an object identifier\n",
{
Symbol *s = addsym($1);
if(s->stype != SValue)
{
Symbol *s = addsym($1);
if(s->stype != SValue)
- error_message ("%s is not a value\n",
+ lex_err_message ("%s is not a value\n",
s->name);
else
$$ = s->value;
s->name);
else
$$ = s->value;
void
yyerror (const char *s)
{
void
yyerror (const char *s)
{
- error_message ("%s\n", s);
+ lex_err_message ("%s\n", s);
case TType:
if ((t->symbol->stype == Stype && t->symbol->type == NULL)
|| t->symbol->stype == SUndefined) {
case TType:
if ((t->symbol->stype == Stype && t->symbol->type == NULL)
|| t->symbol->stype == SUndefined) {
- error_message("%s is imported or still undefined, "
+ lex_err_message("%s is imported or still undefined, "
" can't generate tag checking data in CHOICE "
"without this information",
t->symbol->name);
" can't generate tag checking data in CHOICE "
"without this information",
t->symbol->name);
yylval.constant = strtol((const char *)yytext,
&e, 0);
if(e == y)
yylval.constant = strtol((const char *)yytext,
&e, 0);
if(e == y)
- error_message("malformed constant (%s)", yytext);
+ lex_err_message("malformed constant (%s)", yytext);
case 94:
YY_RULE_SETUP
#line 273 "lex.l"
case 94:
YY_RULE_SETUP
#line 273 "lex.l"
-{ error_message("Ignoring char(%c)\n", *yytext); }
+{ lex_err_message("Ignoring char(%c)\n", *yytext); }
YY_BREAK
case 95:
YY_RULE_SETUP
YY_BREAK
case 95:
YY_RULE_SETUP
-error_message (const char *format, ...)
+lex_err_message (const char *format, ...)
static void
unterminated(const char *type, unsigned start_lineno)
{
static void
unterminated(const char *type, unsigned start_lineno)
{
- error_message("unterminated %s, possibly started on line %d\n", type, start_lineno);
+ lex_err_message("unterminated %s, possibly started on line %d\n", type, start_lineno);
-void error_message (const char *, ...)
+void lex_err_message (const char *, ...)
__attribute__ ((format (printf, 1, 2)));
extern int error_flag;
__attribute__ ((format (printf, 1, 2)));
extern int error_flag;
#include "lex.h"
#include "gen_locl.h"
#include "lex.h"
#include "gen_locl.h"
+static void lex_err_message (const char *format, ...);
+
static unsigned lineno = 1;
#undef ECHO
static unsigned lineno = 1;
#undef ECHO
yylval.constant = strtol((const char *)yytext,
&e, 0);
if(e == y)
yylval.constant = strtol((const char *)yytext,
&e, 0);
if(e == y)
- error_message("malformed constant (%s)", yytext);
+ lex_err_message("malformed constant (%s)", yytext);
\n { ++lineno; }
\.\.\. { return ELLIPSIS; }
\.\. { return RANGE; }
\n { ++lineno; }
\.\.\. { return ELLIPSIS; }
\.\. { return RANGE; }
-. { error_message("Ignoring char(%c)\n", *yytext); }
+. { lex_err_message("Ignoring char(%c)\n", *yytext); }
%%
#ifndef yywrap /* XXX */
%%
#ifndef yywrap /* XXX */
-void
-error_message (const char *format, ...)
+static void
+lex_err_message (const char *format, ...)
static void
unterminated(const char *type, unsigned start_lineno)
{
static void
unterminated(const char *type, unsigned start_lineno)
{
- error_message("unterminated %s, possibly started on line %d\n", type, start_lineno);
+ lex_err_message("unterminated %s, possibly started on line %d\n", type, start_lineno);
{
Symbol *s = ptr;
if (s->stype == SUndefined) {
{
Symbol *s = ptr;
if (s->stype == SUndefined) {
- error_message("%s is still undefined\n", s->name);
+ lex_err_message("%s is still undefined\n", s->name);
*(int *) arg = 1;
}
return 0;
*(int *) arg = 1;
}
return 0;
continue;
}
if(c == '\n'){
continue;
}
if(c == '\n'){
- error_message("unterminated string");
+ lex_err_message("unterminated string");
-error_message (const char *format, ...)
+lex_err_message (const char *format, ...)
-void error_message (const char *, ...)
+void lex_err_message (const char *, ...)
__attribute__ ((format (printf, 1, 2)));
int yylex(void);
__attribute__ ((format (printf, 1, 2)));
int yylex(void);
continue;
}
if(c == '\n'){
continue;
}
if(c == '\n'){
- error_message("unterminated string");
+ lex_err_message("unterminated string");
-error_message (const char *format, ...)
+lex_err_message (const char *format, ...)
- error_message ("%s\n", s);
+ lex_err_message ("%s\n", s);
- error_message ("%s\n", s);
+ lex_err_message ("%s\n", s);