900 char *table_start, *table_end;
914 loader_file_config->
shp_file = strdup(filename);
917 table_start = loader_file_config->
shp_file + strlen(loader_file_config->
shp_file);
918 while (*table_start !=
'/' && *table_start !=
'\\' && table_start > loader_file_config->
shp_file)
925 table_end = loader_file_config->
shp_file + strlen(loader_file_config->
shp_file);
926 while (*table_end !=
'.' && table_end > loader_file_config->
shp_file && table_end > table_start )
930 loader_file_config->
table =
malloc(table_end - table_start + 1);
931 memcpy(loader_file_config->
table, table_start, table_end - table_start);
932 loader_file_config->
table[table_end - table_start] =
'\0';
935 for (i = 0; i < table_end - table_start; i++)
937 if (isupper(loader_file_config->
table[i]) != 0)
938 loader_file_config->
table[i] = tolower(loader_file_config->
table[i]);
942 loader_file_config->
schema = strdup(
"public");
950 return loader_file_config;
#define GEOGRAPHY_DEFAULT
static SHPLOADERCONFIG * global_loader_config