// This function searches in the FTAB or in Scilab for corresponding function voidf SetFunction(char * name, int * rep, FTAB table[]) { voidf loc; char * s = NULL; char buf[csiz]; strncpy(buf,name,csiz); s = buf; while((*s!=' ')&&(*s != '\0')) {s++;}; *s = '\0'; if (SearchComp(table,buf,&loc)==OK) { *rep = 0; return(loc); } if (SearchInDynLinks(buf,&loc)>=0) { *rep = 0; return(loc); } loc = Emptyfunc; *rep = 1; return(loc); }
/*---------------------------------------------------------------------------*/ BOOL c_link(char *routinename, int *ilib) { void (*loc)(); if ( *ilib != -1 ) { *ilib = SearchFandS(routinename, *ilib); } else { *ilib = SearchInDynLinks(routinename, &loc); } if (*ilib == -1) { return FALSE; } return TRUE; }