=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/pvar.c,v retrieving revision 1.21 retrieving revision 1.23 diff -u -p -r1.21 -r1.23 --- OpenXM_contrib2/asir2000/parse/pvar.c 2015/08/08 14:19:42 1.21 +++ OpenXM_contrib2/asir2000/parse/pvar.c 2017/02/07 08:30:31 1.23 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/parse/pvar.c,v 1.20 2015/08/06 10:01:53 fujimoto Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/parse/pvar.c,v 1.22 2015/08/14 13:51:56 fujimoto Exp $ */ #include "ca.h" #include "parse.h" @@ -177,9 +177,6 @@ unsigned int makepvar(char *str) fprintf(stderr," `%s' is bound to the global variable\n",str); CPVS->va[c].attr = IS_GLOBAL; c1 = getpvar(GPVS,str,1); c = PVGLOBAL((unsigned int)c1); -#if defined(__MINGW32__) || defined(__MINGW64__) - fflush(stderr); -#endif } } else { if ( CUR_MODULE ) { @@ -225,9 +222,6 @@ unsigned int makepvar(char *str) fprintf(stderr, "Warning: \"%s\", near line %d: undeclared local variable `%s'\n", asir_infile->name,asir_infile->ln,str); -#if defined(__MINGW32__) || defined(__MINGW64__) - fflush(stderr); -#endif } break; } @@ -304,7 +298,7 @@ int getpvar(VS pvs,char *str,int searchonly) if ( searchonly ) return -1; if ( pvs->asize == pvs->n ) - reallocarray((char **)&pvs->va,(int *)&pvs->asize,(int *)&pvs->n,(int)sizeof(struct oPV)); + asir_reallocarray((char **)&pvs->va,(int *)&pvs->asize,(int *)&pvs->n,(int)sizeof(struct oPV)); v = &pvs->va[pvs->n]; NAME(v) = (char *)CALLOC(strlen(str)+1,sizeof(char)); strcpy(NAME(v),str); v->priv = 0; @@ -312,7 +306,7 @@ int getpvar(VS pvs,char *str,int searchonly) return i; } -#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) +#if defined(VISUAL) || defined(__MINGW32__) #define PCLOSE _pclose #else #define PCLOSE pclose @@ -323,7 +317,7 @@ void closecurrentinput() if ( asir_infile && !asir_infile->fp ) return; -#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) +#if defined(VISUAL) || defined(__MINGW32__) fclose(asir_infile->fp); unlink(asir_infile->tname); #else @@ -367,6 +361,6 @@ void restorepvs() void storeans(pointer p) { if ( APVS->asize == APVS->n ) - reallocarray((char **)&APVS->va,(int *)&APVS->asize,(int *)&APVS->n,(int)sizeof(struct oPV)); + asir_reallocarray((char **)&APVS->va,(int *)&APVS->asize,(int *)&APVS->n,(int)sizeof(struct oPV)); APVS->va[APVS->n++].priv = p; }