PostGIS  2.5.0dev-r@@SVN_REVISION@@
SHPDUMPERSTATE* ShpDumperCreate ( SHPDUMPERCONFIG config)

Definition at line 1151 of file pgsql2shp-core.c.

References shp_dumper_state::big_endian, colmap_init(), shp_dumper_state::column_map, shp_dumper_state::config, shp_dumper_state::conn, shp_dumper_state::dbffieldnames, shp_dumper_state::dbffieldtypes, shp_dumper_state::fetch_query, shp_dumper_state::geo_col_name, shp_dumper_state::geog_oid, shp_dumper_state::geom_oid, is_bigendian(), shp_dumper_state::main_scan_query, malloc(), shp_dumper_state::message, shp_dumper_state::outshptype, shp_dumper_state::outtype, shp_dumper_state::pgfieldnames, shp_dumper_state::schema, and shp_dumper_state::table.

Referenced by main(), pgui_action_export(), and test_ShpDumperCreate().

1152 {
1153  SHPDUMPERSTATE *state;
1154 
1155  /* Create a new state object and assign the config to it */
1156  state = malloc(sizeof(SHPDUMPERSTATE));
1157  state->config = config;
1158 
1159  /* Set any state defaults */
1160  state->conn = NULL;
1161  state->outtype = 's';
1162  state->outshptype = 0;
1163  state->geom_oid = 0;
1164  state->geog_oid = 0;
1165  state->schema = NULL;
1166  state->table = NULL;
1167  state->geo_col_name = NULL;
1168  state->fetch_query = NULL;
1169  state->main_scan_query = NULL;
1170  state->dbffieldnames = NULL;
1171  state->dbffieldtypes = NULL;
1172  state->pgfieldnames = NULL;
1173  state->big_endian = is_bigendian();
1174  state->message[0] = '\0';
1175  colmap_init(&state->column_map);
1176 
1177  return state;
1178 }
static int is_bigendian(void)
SHPDUMPERCONFIG * config
void colmap_init(colmap *map)
Definition: shpcommon.c:159
void * malloc(YYSIZE_T)
char message[SHPDUMPERMSGLEN]

Here is the call graph for this function:

Here is the caller graph for this function: