headers.println("int numotd;");
headers.println("struct optionaltaskdescriptor ** otdarray;");
headers.println("int numfsanalysiswrappers;");
- headers.println("struct fsanalysiswrapper ** fsanalysiswrapperarray;\n};\n\n");
+ headers.println("struct fsanalysiswrapper ** fsanalysiswrapperarray;\n};");
- headers.println("struct classanalysiswrapper * classanalysiswrapperarray[];\n");
+ headers.println("extern struct classanalysiswrapper * classanalysiswrapperarray[];");
//build an array containing every classes for which code has been build
output.println("struct classanalysiswrapper * classanalysiswrapperarray[]={");
+ boolean needcomma=false;
for(Iterator classit = processedcd.iterator(); classit.hasNext();){
ClassDescriptor cdtemp=(ClassDescriptor)classit.next();
- if(!classit.hasNext()) output.println("&classanalysiswrapper_"+cdtemp.getSafeSymbol()+"};\n");
- else output.println("&classanalysiswrapper_"+cdtemp.getSafeSymbol()+",");
+ if (needcomma)
+ output.println(", ");
+ needcomma=true;
+ output.println("&classanalysiswrapper_"+cdtemp.getSafeSymbol());
}
+ output.println("};");
output.println("int numclasses="+processedcd.size()+";");
headers.println("extern numclasses;");
#endif
{
flag&=andmask;
- // Not sure why this was necessary
- // if (flag==oldflag) /* Don't do anything */
- // return;
- //else
flagbody(ptr, flag);
}
}
int flag=ormask|oldflag;
#ifdef OPTIONAL
struct ___Object___ * obj = (struct ___Object___ *)ptr;
- if(obj->failedstatus==1){/*store the information about exitfses*/
+ if(obj->failedstatus==1) {/*store the information about exitfses*/
int i,j,counter=0, offset=0;
- for(i=0; i<obj->numotds; i++){
+ for(i=0; i<obj->numotds; i++) {
counter+=obj->otds[i]->numenterflags;
}
obj->numexitfses=counter;
- if(obj->exitfses!=NULL) RUNFREE(obj->exitfses);
+ if(obj->exitfses!=NULL)
+ RUNFREE(obj->exitfses);
obj->exitfses= RUNMALLOC(sizeof(int) * counter);
- for(i=0; i<obj->numotds; i++){
+ for(i=0; i<obj->numotds; i++) {
for(j=0; j<obj->otds[i]->numenterflags; j++){
oldflag=obj->otds[i]->enterflags[j];
flag=ormask|oldflag;
while(flagptr!=NULL) {
struct ___Object___ *temp=NULL;
struct parameterwrapper *ptr;
- struct RuntimeNode * node = flagptr->objectset->listhead;
+ struct ObjectNode * node = flagptr->objectset->listhead;
while(node!=NULL){
temp=(struct ___Object___ *)node->key;
if(temp->failedstatus==1 && temp->hashcode==currobj->hashcode){