getentrieshashtable.h File Reference

#include "hashtable.h"

Include dependency graph for getentrieshashtable.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char ** getTAGSinhashtable (struct hashtable *tableIN, int *numbersEntries)
char ** getSTRINGSinhashtable (struct hashtable *tableIN, int *numbersEntries)


Function Documentation

char** getSTRINGSinhashtable ( struct hashtable tableIN,
int numbersEntries 
)

Definition at line 43 of file getentrieshashtable.c.

References hashtable::entrycount, i, j, MALLOC, entry::next, NULL, hashtable::table, table, hashtable::tablelength, and entry::v.

Referenced by OneRhs_gettext().

00044 {
00045         char **return_entries=NULL;
00046         unsigned int i=0;
00047         unsigned int j=0;
00048         struct entry *e=NULL;
00049         struct entry **table = tableIN->table;
00050 
00051         *numbersEntries=tableIN->entrycount;
00052         if (*numbersEntries>0)
00053         {
00054                 return_entries=(char **)MALLOC(sizeof(char *)*tableIN->entrycount);
00055                 if (return_entries)
00056                 {
00057                         j=0;
00058                         for (i = 0; i < tableIN->tablelength; i++)
00059                         {
00060                                 e = table[i];
00061                                 while (NULL != e)
00062                                 { 
00063                                         struct value_string *Key=NULL;
00064                                         Key=e->v;
00065                                         return_entries[j]=(char *)MALLOC(sizeof(char)*(strlen(Key->Value_String)+1));
00066                                         if (return_entries[j]) strcpy(return_entries[j],Key->Value_String);
00067                                         e = e->next;
00068                                         j++;
00069                                 }
00070                         }
00071                 }
00072         }
00073         return return_entries;
00074 }

Here is the caller graph for this function:

char** getTAGSinhashtable ( struct hashtable tableIN,
int numbersEntries 
)

Definition at line 10 of file getentrieshashtable.c.

References hashtable::entrycount, i, j, entry::k, MALLOC, entry::next, NULL, hashtable::table, table, and hashtable::tablelength.

Referenced by OneRhs_gettext().

00011 {
00012         char **return_entries=NULL;
00013         unsigned int i=0;
00014         unsigned int j=0;
00015         struct entry *e=NULL;
00016         struct entry **table = tableIN->table;
00017 
00018         *numbersEntries=tableIN->entrycount;
00019         if (*numbersEntries>0)
00020         {
00021                 return_entries=(char **)MALLOC(sizeof(char *)*tableIN->entrycount);
00022                 if (return_entries)
00023                 {
00024                         j=0;
00025                         for (i = 0; i < tableIN->tablelength; i++)
00026                         {
00027                                 e = table[i];
00028                                 while (NULL != e)
00029                                 { 
00030                                         struct key_string *Key=NULL;
00031                                         Key=e->k;
00032                                         return_entries[j]=(char *)MALLOC(sizeof(char)*(strlen(Key->Key_String)+1));
00033                                         if (return_entries[j]) strcpy(return_entries[j],Key->Key_String);
00034                                         e = e->next;
00035                                         j++;
00036                                 }
00037                         }
00038                 }
00039         }
00040         return return_entries;
00041 }

Here is the caller graph for this function:


Generated on Sun Mar 4 16:10:06 2007 for Scilab [trunk] by  doxygen 1.5.1