version 1.18, 2006/06/21 09:46:06 |
version 1.21, 2015/08/08 14:19:42 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/parse/pvar.c,v 1.17 2006/03/11 23:14:53 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/parse/pvar.c,v 1.20 2015/08/06 10:01:53 fujimoto Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 68 void mkpvs(char *fname) |
|
Line 68 void mkpvs(char *fname) |
|
buf = ALLOCA(strlen("undeclared function "+strlen(fname)+10)); |
buf = ALLOCA(strlen("undeclared function "+strlen(fname)+10)); |
sprintf(buf,"undeclared function `%s'",fname); |
sprintf(buf,"undeclared function `%s'",fname); |
yyerror(buf); |
yyerror(buf); |
|
error("cannot continue to read inputs"); |
} |
} |
} |
} |
pvs = (VS)MALLOC(sizeof(struct oVS)); |
pvs = (VS)MALLOC(sizeof(struct oVS)); |
Line 176 unsigned int makepvar(char *str) |
|
Line 177 unsigned int makepvar(char *str) |
|
fprintf(stderr," `%s' is bound to the global variable\n",str); |
fprintf(stderr," `%s' is bound to the global variable\n",str); |
CPVS->va[c].attr = IS_GLOBAL; |
CPVS->va[c].attr = IS_GLOBAL; |
c1 = getpvar(GPVS,str,1); c = PVGLOBAL((unsigned int)c1); |
c1 = getpvar(GPVS,str,1); c = PVGLOBAL((unsigned int)c1); |
|
#if defined(__MINGW32__) || defined(__MINGW64__) |
|
fflush(stderr); |
|
#endif |
} |
} |
} else { |
} else { |
if ( CUR_MODULE ) { |
if ( CUR_MODULE ) { |
Line 221 unsigned int makepvar(char *str) |
|
Line 225 unsigned int makepvar(char *str) |
|
fprintf(stderr, |
fprintf(stderr, |
"Warning: \"%s\", near line %d: undeclared local variable `%s'\n", |
"Warning: \"%s\", near line %d: undeclared local variable `%s'\n", |
asir_infile->name,asir_infile->ln,str); |
asir_infile->name,asir_infile->ln,str); |
|
#if defined(__MINGW32__) || defined(__MINGW64__) |
|
fflush(stderr); |
|
#endif |
} |
} |
break; |
break; |
} |
} |
Line 305 int getpvar(VS pvs,char *str,int searchonly) |
|
Line 312 int getpvar(VS pvs,char *str,int searchonly) |
|
return i; |
return i; |
} |
} |
|
|
#if defined(VISUAL) |
#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) |
#define PCLOSE _pclose |
#define PCLOSE _pclose |
#else |
#else |
#define PCLOSE pclose |
#define PCLOSE pclose |
Line 316 void closecurrentinput() |
|
Line 323 void closecurrentinput() |
|
if ( asir_infile && !asir_infile->fp ) |
if ( asir_infile && !asir_infile->fp ) |
return; |
return; |
|
|
#if defined(VISUAL) |
#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) |
fclose(asir_infile->fp); |
fclose(asir_infile->fp); |
unlink(asir_infile->tname); |
unlink(asir_infile->tname); |
#else |
#else |