904         char *table_start, *table_end;
 
  916         if ( loader_file_config->
encoding == NULL )
 
  918                 free(loader_file_config);
 
  919                 pgui_seterr(
"Unable to allocate memory for encoding");
 
  924         loader_file_config->
shp_file = strdup(filename);
 
  925         if ( loader_file_config->
shp_file == NULL )
 
  928                 free(loader_file_config);
 
  929                 pgui_seterr(
"Unable to allocate memory for filename");
 
  934         table_start = loader_file_config->
shp_file + strlen(loader_file_config->
shp_file);
 
  935         while (*table_start != 
'/' && *table_start != 
'\\' && table_start > loader_file_config->
shp_file)
 
  942         table_end = loader_file_config->
shp_file + strlen(loader_file_config->
shp_file);
 
  943         while (*table_end != 
'.' && table_end > loader_file_config->
shp_file && table_end > table_start )
 
  947         loader_file_config->
table = 
malloc(table_end - table_start + 1);
 
  948         memcpy(loader_file_config->
table, table_start, table_end - table_start);
 
  949         loader_file_config->
table[table_end - table_start] = 
'\0';
 
  952         for (i = 0; i < table_end - table_start; i++)
 
  954                 if (isupper(loader_file_config->
table[i]) != 0)
 
  955                         loader_file_config->
table[i] = tolower(loader_file_config->
table[i]);
 
  959         loader_file_config->
schema = strdup(
"public");
 
  967         return loader_file_config;
 
#define GEOGRAPHY_DEFAULT
static void static void static void static void pgui_seterr(const char *fmt,...) __attribute__((format(printf
static SHPLOADERCONFIG * global_loader_config