| iMatix home page | << | < | > | >> |
![]() Version 1.91 |
#include "sflsymb.h" DESCR * symb2descr ( const SYMTAB *symtab) /* Symbol table to export */
Exports the symbol table as a table of strings in a DESCR block. Each string has the format "name=value". The block ends with a null string. Returns a pointer to the descriptor. The descriptor is allocated dynamically; to free it, use mem_free(). If there was not enough memory to allocate the descriptor, returns NULL.
{ char **strings; /* Formatted string array */ DESCR *descr; /* Formatted descriptor */ if (!symtab) return (NULL); /* Return NULL if argument is null */ strings = symb2strt (symtab); /* Convert symbol table to strings */ descr = strt2descr (strings); /* And build into descriptor */ strtfree (strings); return (descr); }
| << | < | > | >> |
![]() |