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

 

descr2symb

#include "sflsymb.h"
SYMTAB *
descr2symb (
    const DESCR *descr)

Synopsis

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.

Source Code - (sflsymb.c)

{
    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);
    strtfree (strings);
    return (symtab);
}

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