2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
|
void load_classes(void) {
int i;
int gloptr=0;
Hash*glolocalhash;
char*nam=sqlite3_mprintf("%s.class",basefilename);
sqlite3_stmt*vst=0;
fprintf(stderr,"Loading class definitions...\n");
if(!nam) fatal("Allocation failed\n");
classfp=main_options['z']?composite_slice(".class",1):fopen(nam,"r");
sqlite3_free(nam);
if(!classfp) fatal("Cannot open class file '%s': %m\n",nam);
glohash=calloc(HASH_SIZE,sizeof(Hash));
if(!glohash) fatal("Allocation failed\n");
glolocalhash=calloc(LOCAL_HASH_SIZE,sizeof(Hash));
|
|
|
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
|
void load_classes(void) {
int i;
int gloptr=0;
Hash*glolocalhash;
char*nam=sqlite3_mprintf("%s.class",basefilename);
sqlite3_stmt*vst=0;
printStatus("Loading class definitions...\n");
if(!nam) fatal("Allocation failed\n");
classfp=main_options['z']?composite_slice(".class",1):fopen(nam,"r");
sqlite3_free(nam);
if(!classfp) fatal("Cannot open class file '%s': %m\n",nam);
glohash=calloc(HASH_SIZE,sizeof(Hash));
if(!glohash) fatal("Allocation failed\n");
glolocalhash=calloc(LOCAL_HASH_SIZE,sizeof(Hash));
|
2778
2779
2780
2781
2782
2783
2784
2785
2786
|
if(macros) for(i=0;i<MAX_MACRO;i++) if(macros[i]) free_macro(macros[i]);
free(macros);
if(array_size) {
array_data=malloc(array_size*sizeof(Value));
if(!array_data) fatal("Array allocation failed\n");
}
if(norders) set_class_orders();
fprintf(stderr,"Done\n");
}
|
|
|
2778
2779
2780
2781
2782
2783
2784
2785
2786
|
if(macros) for(i=0;i<MAX_MACRO;i++) if(macros[i]) free_macro(macros[i]);
free(macros);
if(array_size) {
array_data=malloc(array_size*sizeof(Value));
if(!array_data) fatal("Array allocation failed\n");
}
if(norders) set_class_orders();
printStatus("Done\n");
}
|