| iMatix home page | << | < | > | >> |
SFL Version 2.10 |
#include "sflsymb.h" DESCR * symb2descr_ ( const SYMTAB *symtab, /* Symbol table to export */ const char *filename, /* Name of source file making call */ size_t lineno) /* Line number in calling source */
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. Do not call this function directly: pass through the symb2descr macro.
{ char **strings; /* Formatted string array */ DESCR *descr; /* Formatted descriptor */ if (!symtab) return (NULL); /* Return NULL if argument is null */ /* Convert symbol table to strings */ strings = symb2strt (symtab, filename, lineno); descr = strt2descr (strings); /* And build into descriptor */ strtfree (strings); return (descr); }
| << | < | > | >> | Copyright © 1996-99 iMatix Corporation |