treedraw: compilation error

Gerhard Reuteler gerhard.reuteler@aon.at
Mon May 20 11:14:00 GMT 2002


Hi,
trying to compile an old source "treedraw", perhaps written for windows in 
198?,  I get the error message
pismo:/usr/src/treedraw# make
.................................
.................................
gcc -g -w -c lex.yy.c
lex.yy.c:20: initializer element is not constant
lex.yy.c:20: initializer element is not constant
make: *** [lex.yy.o] Error 1

the file lex.yy.c looks like

# include "stdio.h"
# define U(x) ((x)&0377)
# define NLSTATE yyprevious=YYNEWLINE
# define BEGIN yybgin = yysvec + 1 +
# define INITIAL 0
# define YYLERR yysvec
# define YYSTATE (yyestate-yysvec-1)
# define YYOPTIM 1
# define YYLMAX 200
# define output(c) putc(c,yyout)
# define input() 
(((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
# define unput(c) {yytchar= 
(c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;}
# define yymore() (yymorfg=1)
# define ECHO fprintf(yyout, "%s",yytext)
# define REJECT { nstr = yyreject(); goto yyfussy;}
int yyleng; extern char yytext[];
int yymorfg;
extern char *yysptr, yysbuf[];
int yytchar;
FILE *yyin =stdin, *yyout =stdout;     <---- this is line 20

As I don't know anything about C, I don't understand the problem. Any help is 
appreciated.

so long
Gerhard
-- 
Gerhard Reuteler , Reitweg 26d , A-6830 Rankweil



More information about the Gcc-help mailing list