parse.c
static String *AddString(ParseContext *c, const char *value)
{
    String *str;
    
    /* check to see if the string is already in the table */
    for (str = c->strings; str != NULL; str = str->next)
        if (strcmp(value, str->data) == 0)
            return str;

    /* allocate the string structure */
    str = (String *)AllocateLowMemory(c->sys, sizeof(String) + strlen(value));
    memset(str, 0, sizeof(String));
    strcpy(str->data, value);
    str->next = c->strings;
    c->strings = str;

    /* return the string table entry */
    return str;
}
/* AddString - add a string to the string table */
add a string to the string table
add a string to the string table
static String *AddString(ParseContext *c, const char *value)
{
    String *str;
    for (str = c->strings; str != NULL; str = str->next)
        if (strcmp(value, str->data) == 0)
            return str;
    str = (String *)AllocateLowMemory(c->sys, sizeof(String) + strlen(value));
    memset(str, 0, sizeof(String));
    strcpy(str->data, value);
    str->next = c->strings;
    c->strings = str;
    return str;
}
static String * AddString ( ParseContext * c , const char * value ) { String * str ; for ( str = c -> strings ; str != NULL ; str = str -> next ) if ( strcmp ( value , str -> data ) == 0 ) return str ; str = ( String * ) AllocateLowMemory ( c -> sys , sizeof ( String ) + strlen ( value ) ) ; memset ( str , 0 , sizeof ( String ) ) ; strcpy ( str -> data , value ) ; str -> next = c -> strings ; c -> strings = str ; return str ; }
AddString - add a string to the string table
AddString - add a string to the string table
/* check to see if the string is already in the table */ /* allocate the string structure */ /* return the string table entry */