bool Load(const char *filename) { static char fileName[stringsize] = ""; if(filename) strncat(strcpy(fileName, ""), filename, stringsize-1); if(strlen(fileName) == 0) return False; else if(seterror()==0) { initstack(); unlockmem(); inithashtable(); lockmem(); initlex(); initlib(); initsyslib(); initmodify(); parsefile(inipath); parsefile(fileName); checkdefinitions(); modify_definitions(); lockmem(); if (gettemplate("main")->tag == FUNC) { Interpret("main"); } return True; } else { initstack(); unlockmem(); inithashtable(); lockmem(); initlex(); initlib(); initsyslib(); initmodify(); parsefile(inipath); checkdefinitions(); modify_definitions(); lockmem(); return False; } }
int main ( int argc, char *argv[] ) /******************************************************************************/ /* Purpose: MAIN is the main program for the star discrepancy bound computation. Modified: 30 September 2003 Reference: Eric Thiemard, An Algorithm to Compute Bounds for the Star Discrepancy, Journal of Complexity, Volume 17, pages 850-880, 2001. */ { int i; int j; double *oalpha; double *obeta; initparameters(argc,argv); readfile(argv[4]); printf("x={\n"); for (i=0;i<taille;i++) { printf(" ("); for (j=0;j<s;j++) printf(" %f",points[i][j]); printf(" )\n"); } printf("}\n\n"); supertree(); initlex(); oalpha = (double *) calloc((unsigned) s,sizeof(double)); obeta = (double *) calloc((unsigned) s,sizeof(double)); for (i=0;i<s;i++) obeta[i] = 1.0; decomposition(oalpha,obeta,0,1.0); printf("s=%d, epsilon=%f, n=%d\n",s,p,taille); printf("D_n^*(x) between %.10f and %.10f\n",borneinf,borne); return 0; }
void CreateInterpreter(void) { if(seterror() == 0) { Write(BANNER); createstack(); createhashtable(); createIO(); createmem(atol(GetOption("MemorySize"))); initstack(); inithashtable(); lockmem(); initlex(); initlib(); initsyslib(); initmodify(); parsefile(inipath); checkdefinitions(); modify_definitions(); lockmem(); } else exit(1); }