Beispiel #1
0
int  c_prog(void)
{  
 int result;
    
 catalog=fopen(CATALOG_NAME "2","rb");
 if(catalog)
 { 
   int nin_=nin,nout_=nout, subproc_sq_=subproc_sq;
/*   archiv=fopen(ARCHIV_NAME "2","rb"); */
   diagrq=fopen(DIAGRQ_NAME "2","rb");
   menuq=fopen(MENUQ_NAME "2","rb");
   nin=1; nout=2;
   { char txt[100]; int ndel, ncalc, nrest;
     long recpos;
     for(subproc_sq=0;rd_menu(2,subproc_sq+1,txt,&ndel,&ncalc,&nrest,&recpos); subproc_sq++);
   }   
   outFileOpen("%sresults%cwidth_2.c",pathtouser,f_slash);
   labl();
   writeF("#include<math.h>\n");
   writeF("#include<stdio.h>\n");
   writeF("#include\"extern_2.h\"\n");                  
   writeF("#include\"num_out.h\"\n");
   writeF("#include\"num_in.h\"\n");

   result=c_prog_int(1);
   outFileClose();
   system("cd results; sed  s/_ext/_2/g width_2.c > width2.c; "
          "cat width2.c $CALCHEP/include/width_2+ > width_2.c; rm width2.c; "
          "mv extern.h extern_2.h");
            
   fclose(catalog);
   whichArchive(0,0,0);
   fclose(diagrq);
   fclose(menuq);
   nin=nin_; nout=nout_;
   subproc_sq=subproc_sq_;
 } else if(nin+nout>3) 
 { outFileOpen("%sresults%cwidth_2.c",pathtouser,f_slash);
   writeF("extern double width2_ext(char * pname);\n");
   writeF("double width2_ext(char * pname){return 0.;}\n");
   outFileClose();
 }
 catalog=fopen(CATALOG_NAME,"rb"); 
 diagrq=fopen(DIAGRQ_NAME,"rb");
 menuq=fopen(MENUQ_NAME,"rb");

 result=c_prog_int(0);
 fclose(catalog);
 whichArchive(0,0,0);
 
 fclose(diagrq);
 fclose(menuq);

 return result; 
}
Beispiel #2
0
int  c_prog(void)
{  
 int result;

 catalog=fopen(CATALOG_NAME,"rb"); 
 diagrq=fopen(DIAGRQ_NAME,"rb");
 menuq=fopen(MENUQ_NAME,"rb");

 result=c_prog_int();
 fclose(catalog);
 whichArchive(0,0);
 
 fclose(diagrq);
 fclose(menuq);

 return result; 
}