dis_sql/src/esql.cxx
/* The following function takes an inclusion specification in the form
 * of an Oracle option (either a single spec or a parenthesized,
 * comma-separated list of specs) and uses the preceding function to
 * add it/them to the list specified by the "head" and "tail"
 * parameters. 
 */
The following function takes an inclusion specification in the form
of an Oracle option (either a single spec or a parenthesized,
comma-separated list of specs) and uses the preceding function to
add it/them to the list specified by the "head" and "tail"
parameters.
The following function takes an inclusion specification in the form of an Oracle option ( either a single spec or a parenthesized comma - separated list of specs ) and uses the preceding function to add it / them to the list specified by the " head " and " tail " parameters .
static void add_paths(path** head, path** tail, const char* text) {
    if (*text == '(') { 
        text++;
        for (;;) {
            size_t segment_len;
            while (*text == ' ') {
                text++;
            }
            segment_len = strcspn(text, ",)");
            if (segment_len) {
#ifdef ISO_CPP_HEADERS
                char* segment = (char*) std::malloc(segment_len + 1);
#else
                char* segment = (char*) malloc(segment_len + 1);
#endif
                memcpy(segment, text, segment_len);
                segment[segment_len] = 0;
                add_path(head, tail, segment);
            }
            if (text[segment_len] == ',') {
                text += segment_len + 1;
            }
            else break;
        }
    }
    else add_path(head, tail, OSapi_strdup((char*) text));
}
static void add_paths ( path * * head , path * * tail , const char * text ) { if ( * text == ' ' ) { text ++ ; for ( ; ; ) { size_t segment_len ; while ( * text == ' ' ) { text ++ ; } segment_len = strcspn ( text , " " ) ; if ( segment_len ) { #ifdef ISO_CPP_HEADERS char * segment = ( char * ) std :: malloc ( segment_len + 1 ) ; #else char * segment = ( char * ) malloc ( segment_len + 1 ) ; #endif memcpy ( segment , text , segment_len ) ; segment [ segment_len ] = 0 ; add_path ( head , tail , segment ) ; } if ( text [ segment_len ] == ' ' ) { text += segment_len + 1 ; } else break ; } } else add_path ( head , tail , OSapi_strdup ( ( char * ) text ) ) ; }
The following function takes an inclusion specification in the form
 of an Oracle option (either a single spec or a parenthesized,
 comma-separated list of specs) and uses the preceding function to
 add it/them to the list specified by the "head" and "tail"
 parameters.
The following function takes an inclusion specification in the form of an Oracle option ( either a single spec or a parenthesized comma - separated list of specs ) and uses the preceding function to add it / them to the list specified by the " head " and " tail " parameters .
/* process list */