PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#define | indicator_set ind_type != NULL && ind_type->type != ECPGt_NO_INDICATOR |
Functions | |
void * | mm_alloc (size_t size) |
char * | mm_strdup (const char *string) |
struct ECPGstruct_member * | ECPGstruct_member_dup (struct ECPGstruct_member *rm) |
void | ECPGmake_struct_member (const char *name, struct ECPGtype *type, struct ECPGstruct_member **start) |
struct ECPGtype * | ECPGmake_simple_type (enum ECPGttype type, char *size, int counter) |
struct ECPGtype * | ECPGmake_array_type (struct ECPGtype *type, char *size) |
struct ECPGtype * | ECPGmake_struct_type (struct ECPGstruct_member *rm, enum ECPGttype type, char *type_name, char *struct_sizeof) |
static const char * | get_type (enum ECPGttype type) |
static void | ECPGdump_a_simple (FILE *o, const char *name, enum ECPGttype type, char *varcharsize, char *arrsize, const char *size, const char *prefix, int counter) |
static void | ECPGdump_a_struct (FILE *o, const char *name, const char *ind_name, char *arrsize, struct ECPGtype *type, struct ECPGtype *ind_type, const char *prefix, const char *ind_prefix) |
void | ECPGdump_a_type (FILE *o, const char *name, struct ECPGtype *type, const int brace_level, const char *ind_name, struct ECPGtype *ind_type, const int ind_brace_level, const char *prefix, const char *ind_prefix, char *arr_str_size, const char *struct_sizeof, const char *ind_struct_sizeof) |
void | ECPGfree_struct_member (struct ECPGstruct_member *rm) |
void | ECPGfree_type (struct ECPGtype *type) |
const char * | get_dtype (enum ECPGdtype type) |
Variables | |
static struct ECPGstruct_member | struct_no_indicator = {"no_indicator", &ecpg_no_indicator, NULL} |
#define indicator_set ind_type != NULL && ind_type->type != ECPGt_NO_INDICATOR |
|
static |
Definition at line 411 of file type.c.
References variable::arrsize, ecpg_type_name(), ECPGt_bytea, ECPGt_char, ECPGt_char_variable, ECPGt_const, ECPGt_date, ECPGt_descriptor, ECPGt_interval, ECPGt_NO_INDICATOR, ECPGt_numeric, ECPGt_sqlda, ECPGt_string, ECPGt_timestamp, ECPGt_unsigned_char, ECPGt_varchar, fprintf, free, get_type(), mm_alloc(), name, variable::offset, size, sprintf, type, and variable::varcharsize.
Referenced by ECPGdump_a_type().
|
static |
Definition at line 581 of file type.c.
References ecpg_no_indicator, ECPGdump_a_type(), ET_WARNING, free, ECPGtype::members, mm_alloc(), mmerror(), name, ECPGstruct_member::name, ECPGstruct_member::next, PARSE_ERROR, sprintf, struct_no_indicator, ECPGtype::struct_sizeof, type, ECPGstruct_member::type, and ECPGtype::u.
Referenced by ECPGdump_a_type().
void ECPGdump_a_type | ( | FILE * | o, |
const char * | name, | ||
struct ECPGtype * | type, | ||
const int | brace_level, | ||
const char * | ind_name, | ||
struct ECPGtype * | ind_type, | ||
const int | ind_brace_level, | ||
const char * | prefix, | ||
const char * | ind_prefix, | ||
char * | arr_str_size, | ||
const char * | struct_sizeof, | ||
const char * | ind_struct_sizeof | ||
) |
Definition at line 241 of file type.c.
References base_yyerror(), variable::brace_level, ECPGdump_a_simple(), ECPGdump_a_struct(), ECPGt_array, ECPGt_char_variable, ECPGt_const, ECPGt_descriptor, ECPGt_NO_INDICATOR, ECPGt_sqlda, ECPGt_struct, ECPGt_union, ET_ERROR, ET_WARNING, find_variable(), free, variable::ind_type, INDICATOR_NOT_ARRAY, INDICATOR_NOT_SIMPLE, INDICATOR_NOT_STRUCT, indicator_set, IS_SIMPLE_TYPE, mm_strdup(), mmerror(), mmfatal(), name, PARSE_ERROR, str, type, and variable::type.
Referenced by dump_variables(), ECPGdump_a_struct(), output_get_descr(), and output_set_descr().
void ECPGfree_struct_member | ( | struct ECPGstruct_member * | rm | ) |
Definition at line 641 of file type.c.
References free, ECPGstruct_member::name, ECPGstruct_member::next, and ECPGstruct_member::type.
Referenced by ECPGfree_type(), and main().
void ECPGfree_type | ( | struct ECPGtype * | type | ) |
Definition at line 655 of file type.c.
References base_yyerror(), ECPGfree_struct_member(), ECPGt_array, ECPGt_struct, ECPGt_union, ET_ERROR, free, IS_SIMPLE_TYPE, mmerror(), PARSE_ERROR, and type.
Referenced by remove_variables().
Definition at line 111 of file type.c.
References ECPGmake_simple_type(), ECPGt_array, ECPGtype::element, size, type, and ECPGtype::u.
Referenced by ECPGstruct_member_dup(), find_struct_member(), and find_variable().
Definition at line 96 of file type.c.
References ECPGtype::counter, ECPGtype::element, mm_alloc(), size, ECPGtype::size, ECPGtype::struct_sizeof, type, ECPGtype::type, ECPGtype::type_name, and ECPGtype::u.
Referenced by ECPGmake_array_type(), ECPGmake_struct_type(), ECPGstruct_member_dup(), find_struct_member(), and find_variable().
void ECPGmake_struct_member | ( | const char * | name, |
struct ECPGtype * | type, | ||
struct ECPGstruct_member ** | start | ||
) |
Definition at line 77 of file type.c.
References mm_alloc(), mm_strdup(), name, ECPGstruct_member::name, ECPGstruct_member::next, start, type, and ECPGstruct_member::type.
Referenced by ECPGstruct_member_dup().
struct ECPGtype* ECPGmake_struct_type | ( | struct ECPGstruct_member * | rm, |
enum ECPGttype | type, | ||
char * | type_name, | ||
char * | struct_sizeof | ||
) |
Definition at line 121 of file type.c.
References ECPGmake_simple_type(), ECPGstruct_member_dup(), ECPGtype::members, mm_strdup(), ECPGtype::struct_sizeof, type, ECPGtype::type_name, and ECPGtype::u.
Referenced by ECPGstruct_member_dup(), find_struct_member(), and find_variable().
struct ECPGstruct_member* ECPGstruct_member_dup | ( | struct ECPGstruct_member * | rm | ) |
Definition at line 37 of file type.c.
References ECPGtype::counter, ECPGmake_array_type(), ECPGmake_simple_type(), ECPGmake_struct_member(), ECPGmake_struct_type(), ECPGt_array, ECPGt_struct, ECPGt_union, ECPGtype::element, ECPGtype::members, ECPGstruct_member::name, ECPGstruct_member::next, ECPGtype::size, ECPGtype::struct_sizeof, type, ECPGstruct_member::type, ECPGtype::type, ECPGtype::type_name, and ECPGtype::u.
Referenced by ECPGmake_struct_type().
const char* get_dtype | ( | enum ECPGdtype | type | ) |
Definition at line 693 of file type.c.
References ECPGd_cardinality, ECPGd_count, ECPGd_data, ECPGd_di_code, ECPGd_di_precision, ECPGd_indicator, ECPGd_key_member, ECPGd_length, ECPGd_name, ECPGd_nullable, ECPGd_octet, ECPGd_precision, ECPGd_ret_length, ECPGd_ret_octet, ECPGd_scale, ECPGd_type, ET_ERROR, mmerror(), PARSE_ERROR, and type.
Referenced by output_get_descr(), and output_set_descr().
|
static |
Definition at line 133 of file type.c.
References ECPGt_bool, ECPGt_bytea, ECPGt_char, ECPGt_char_variable, ECPGt_const, ECPGt_date, ECPGt_decimal, ECPGt_descriptor, ECPGt_double, ECPGt_float, ECPGt_int, ECPGt_interval, ECPGt_long, ECPGt_long_long, ECPGt_NO_INDICATOR, ECPGt_numeric, ECPGt_short, ECPGt_sqlda, ECPGt_string, ECPGt_timestamp, ECPGt_unsigned_char, ECPGt_unsigned_int, ECPGt_unsigned_long, ECPGt_unsigned_long_long, ECPGt_unsigned_short, ECPGt_varchar, ET_ERROR, mmerror(), PARSE_ERROR, and type.
Referenced by ECPGdump_a_simple().
void* mm_alloc | ( | size_t | size | ) |
Definition at line 13 of file type.c.
References malloc, mmfatal(), OUT_OF_MEMORY, and size.
Referenced by add_descriptor(), add_include_path(), add_preprocessor_define(), add_variable_to_head(), add_variable_to_tail(), ECPGdump_a_simple(), ECPGdump_a_struct(), ECPGmake_simple_type(), ECPGmake_struct_member(), hashline_number(), main(), new_variable(), push_assignment(), and sqlda_variable().
char* mm_strdup | ( | const char * | string | ) |
Definition at line 25 of file type.c.
References mmfatal(), and OUT_OF_MEMORY.
Referenced by add_preprocessor_define(), adjust_array(), dump_variables(), ECPGdump_a_type(), ECPGmake_struct_member(), ECPGmake_struct_type(), lookup_descriptor(), main(), new_variable(), output_get_descr(), output_set_descr(), and sqlda_variable().
|
static |
Definition at line 1 of file type.c.
Referenced by ECPGdump_a_struct().