static void traiteErr(int n, char * L) { int v; ERROR=n; if (D_Cod==0) { if (ECHOOFF) printf("\n"); /* if (InDebugFct==0) fprintf(stderr,"\n"); A VOIR ! */ printf("%s : %s !!\a\n",L,TabErr[n]); if (InDebugFct==0) fprintf(stderr,"%s : %s !!\a\n",L,TabErr[n]); } if (inSonProc) exit(1); if (fctEnCours) { if (D_Cod==0) ErrPrintf("Compilation aborted !\n"); else if (ADDRONE == VIDE) ErrPrintf("Inside compilation aborted !\n"); _MODIF_fctEnCours_(0); rmLastFct(); } if (ADDRONE != VIDE) return; if (FD_IN) { printf("In loading file %s : line %d !\n", getFDname(),getFDlig()); if (InDebugFct==0) fprintf(stderr, "In loading file %s : line %d !\n", getFDname(),getFDlig()); closeFD(); } if (iTERM) { printf("In loading stdin : line %d !\n", getFDlig()); if (InDebugFct==0) fprintf(stderr,"In loading stdin : line %d !\n", getFDlig()); close(FD_IN); /* pipe ou autre */ v = dup(iTERM); /* stdin on term */ iTERM = 0; } }
static void newFct2(char * S, int U) { char Lib[LDFLT+1]; strncpy(Lib,S,LDFLT); Lib[LDFLT]='\0'; initFct(Lib, U); _MODIF_fctEnCours_(1); dropTrSuite(); i_cod = 0; i_adr = 0; i_adB = 0; i_adD = 0; }
void IF_finFct(void) { void * M; struct Fct * F; int i,l, *ea, *Ea; if ((M = malloc((3*sizeof(int))+i_cod)) == NULL) stopErr("IF_finFct","malloc"); ea = (int*)M; *ea++ = i_cod; *ea=0; Ea=ea+1; *Ea=0; /* on remplace tous les MYSELF */ l = sizeof(M); for (i=0; i<i_cod; i+=(l+1)) { if (cod[i]==T_MYSF) { cod[i] = T_FCT; bcopy((void*)&M,(void*)&cod[i+1],l); } else { if (cod[i]==T_ONER) { if (*ea==0) *ea = i; else { messErr(46); return; } } else { if (cod[i]==T_END) { if (*Ea==0) *Ea = i; else { messErr(47); return; } } } } } bcopy((void*)cod,(void*)((char*)M+(3*sizeof(int))),i_cod); F=putCodeFct(M); if (F->typ) { F->typ=2; addFonU(F->l,M); } /* printf("Total Fct : %d + %d !\n",i_cod,(3*sizeof(int))); */ _MODIF_fctEnCours_(0); }