--- lemon.c.orig 2006-07-20 01:09:51.000000000 -0500 +++ lemon.c 2020-11-13 15:11:19.000000000 -0600 @@ -11,6 +11,7 @@ #include #include #include +#include #ifndef __WIN32__ # if defined(_WIN32) || defined(WIN32) @@ -2994,7 +2995,7 @@ PRIVATE FILE *tplt_open(lemp) struct lemon *lemp; { - static char templatename[] = "lempar.c"; + static char templatename[] = LEMPAR; char buf[1000]; FILE *in; char *tpltname; @@ -3466,7 +3467,7 @@ in = tplt_open(lemp); if( in==0 ) return; - out = file_open(lemp,".c","wb"); + out = file_open(lemp,CSUFFIX,"wb"); if( out==0 ){ fclose(in); return; @@ -3877,7 +3878,7 @@ if( lemp->tokenprefix ) prefix = lemp->tokenprefix; else prefix = ""; - in = file_open(lemp,".h","rb"); + in = file_open(lemp,HSUFFIX,"rb"); if( in ){ for(i=1; interminal && fgets(line,LINESIZE,in); i++){ sprintf(pattern,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i); @@ -3889,7 +3890,7 @@ return; } } - out = file_open(lemp,".h","wb"); + out = file_open(lemp,HSUFFIX,"wb"); if( out ){ for(i=1; interminal; i++){ fprintf(out,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i);