dis_sql/src/esql.cxx
/* The following function is called when an include directive is
 * encountered.  It looks in all the places and in the order specified
 * by the Oracle preprocessor and, if the file is found, opens it for
 * input.
 */
The following function is called when an include directive is
encountered.  It looks in all the places and in the order specified
by the Oracle preprocessor and, if the file is found, opens it for
input.
The following function is called when an include directive is encountered . It looks in all the places and in the order specified by the Oracle preprocessor and if the file is found opens it for input .
static void include_file_str(const char* filename) {
    char* path_name = 0;
    char* lowercase_name = 0;
    if (!selected()) {
        return;
    }
    char* file_to_include = add_dot_h(filename);
    path_name = include_file_find (file_to_include);
    if (!path_name) {
       lowercase_name = lowercase_string (file_to_include);
       if (lowercase_name) {
	  path_name = include_file_find (lowercase_name);
       }
    }
    if (!path_name) {
	char buff[MAXPATHLEN];
	sprintf(buff, "Cannot open include file %s\n",
		file_to_include);
	iff_error(buff);
    } else {
#if 1
       esql_push_include (path_name);
#else
       do_output ("#include \"");
       do_output (path_name);
       do_output ("\"");
#endif
    }
#ifdef ISO_CPP_HEADERS
    std::free (path_name);
#else
    free (path_name);
#endif
    if (file_to_include != filename) {
#ifdef ISO_CPP_HEADERS
	std::free(file_to_include);
#else
	free(file_to_include);
#endif
    }
    if (lowercase_name) {
#ifdef ISO_CPP_HEADERS
	std::free(lowercase_name);
#else
	free(lowercase_name);
#endif
    }
}
static void include_file_str ( const char * filename ) { char * path_name = 0 ; char * lowercase_name = 0 ; if ( ! selected ( ) ) { return ; } char * file_to_include = add_dot_h ( filename ) ; path_name = include_file_find ( file_to_include ) ; if ( ! path_name ) { lowercase_name = lowercase_string ( file_to_include ) ; if ( lowercase_name ) { path_name = include_file_find ( lowercase_name ) ; } } if ( ! path_name ) { char buff [ MAXPATHLEN ] ; sprintf ( buff , " \n " , file_to_include ) ; iff_error ( buff ) ; } else { #if 1 esql_push_include ( path_name ) ; #else do_output ( " \" " ) ; do_output ( path_name ) ; do_output ( " \" " ) ; #endif } #ifdef ISO_CPP_HEADERS std :: free ( path_name ) ; #else free ( path_name ) ; #endif if ( file_to_include != filename ) { #ifdef ISO_CPP_HEADERS std :: free ( file_to_include ) ; #else free ( file_to_include ) ; #endif } if ( lowercase_name ) { #ifdef ISO_CPP_HEADERS std :: free ( lowercase_name ) ; #else free ( lowercase_name ) ; #endif } }
The following function is called when an include directive is
 encountered.
The following function is called when an include directive is encountered .
/* Ignore include in unselected branch of conditional compilation */ /* add ".h" to filename if needed */ /* In Oracle the filename is sometimes listed in uppercase.
     * If not found and filename is uppercase check lowercase too.
     */ /* Free result of "add_dot_h" if needed */ /* Free result of "lowercase_string" if needed */