| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 1.91

 

symb2descr

#include "sflsymb.h"
DESCR *
symb2descr (
    const SYMTAB *symtab)               /*  Symbol table to export           */

Synopsis

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.

Source Code - (sflsymb.c)

{
    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);
}

| << | < | > | >> iMatix Copyright © 1996-98 iMatix