Funtab.c File Reference

#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "hashtable_core.h"
#include "stack-c.h"
#include "machine.h"
#include "Funtab.h"

Include dependency graph for Funtab.c:

Go to the source code of this file.

Functions

int C2F() funtab (int *id, int *fptr, int *job, char *namefunction, unsigned long namefunction_len)


Function Documentation

int C2F() funtab ( int id,
int fptr,
int job,
char *  namefunction,
unsigned long  namefunction_len 
)

Hash table for scilab functions job is used to specify a job

Parameters:
job : indicateur de l'operation a effectuer 0 impression de la table des primitives id et fptr ne sont pas references 1 recherche du pointeur fptr associe au nom id, le sous programme retourne la valeur du pointeur dans fptr. S'il n'y a pas de fonction correspondant a id funtab retourne fptr=0 si id est un nom incorrect funtab retourne fptr=-1 2 recherche du nom id associe au pointeur fptr s'il n'y a pas de fonction associee a ce pointeur funtab retourne id(1)=0 3 ajout du nom donne par id avec le pointeur donne par fptr en cas d'erreur (nom incorrecte ou capacite de la table depasse funtab appele error et retourne avec err>0 4 suppression du nom donne par id, le sous programme retourne la valeur du pointeur associe dans fptr. S'il n'y a pas de fonction correspondant a id funtab retourne fptr=0 si id est un nom incorrect funtab retourne fptr=-1
id :vecteur de taille nsiz contenant le code scilab du nom
fptr 

Definition at line 12 of file Funtab.c.

References action_hashtable_scilab_functions(), job, NULL, SCI_HFUNCTIONS_BACKSEARCH, SCI_HFUNCTIONS_DELETE, SCI_HFUNCTIONS_ENTER, and SCI_HFUNCTIONS_FIND.

Referenced by C2F(), CreateFuncallTList(), and DynFuntab().

00013 {
00014   switch ( *job) 
00015     {
00016     case 0 : /* before do a printf for What OBSOLETE */
00017     break;
00018     case 1 :
00019       *fptr=0;
00020       action_hashtable_scilab_functions(id,NULL,fptr,SCI_HFUNCTIONS_FIND);
00021       break;
00022     case 2 : 
00023       action_hashtable_scilab_functions(id,NULL,fptr,SCI_HFUNCTIONS_BACKSEARCH);
00024       break;
00025     case 3 : 
00026                 if ( (namefunction_len) && (strcmp(namefunction,"NULL_NAME")) )
00027                 {
00028                         action_hashtable_scilab_functions(id,namefunction,fptr,SCI_HFUNCTIONS_ENTER);
00029                 }
00030                 else
00031                 {
00032                         action_hashtable_scilab_functions(id,NULL,fptr,SCI_HFUNCTIONS_ENTER);
00033                 }
00034       break;
00035     case 4 : 
00036       action_hashtable_scilab_functions(id,NULL,fptr,SCI_HFUNCTIONS_DELETE);
00037       break;
00038     }
00039   return(0);
00040 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Sun Mar 4 15:14:53 2007 for Scilab [trunk] by  doxygen 1.5.1