| iMatix home page | << | < | > | >> |
SFL Version 2.10 |
#include "sflsymb.h" SYMTAB * descr2symb_ ( const DESCR *descr, /* Descriptor to convert */ const char *filename, /* Name of source file making call */ size_t lineno) /* Line number in calling source */
Converts a DESCR block into a symbol table. The descriptor consists of a block of null-terminated strings, terminated in a double null byte. Ignores any strings that don't look like: "name=value". If the block contains multiple strings with the same name, the last instance is stored in the symbol table. Returns NULL if there was not enough memory to allocate the symbol table, or if the input argument was null. Do not call this function directly: pass through the descr2symb macro.
{ SYMTAB *symtab; /* Allocated symbol table */ char **strings; /* Formatted string array */ if (!descr) return (NULL); /* Return NULL if argument is null */ strings = descr2strt (descr); /* Convert descriptor to strings */ symtab = strt2symb (strings, filename, lineno); strtfree (strings); return (symtab); }
| << | < | > | >> | Copyright © 1996-99 iMatix Corporation |