27 char *
next = strpbrk(++
str,
".-["),
37 for (; members; members = members->
next)
39 if (strcmp(members->
name,
str) == 0)
66 for (count = 1, end =
next + 1; count; end++)
209 for (count = 1, end =
next + 1; count; end++)
239 switch (p->
type->u.element->type)
270 for (p =
types, prev = NULL; p; p =
next)
312 for (ptr =
cur; ptr != NULL; ptr = ptr->
next)
318 for (varptr = ptr->
argsinsert, prevvar = NULL;
319 varptr != NULL; varptr = nextvar)
321 nextvar = varptr->
next;
326 prevvar->
next = nextvar;
334 for (varptr = ptr->
argsresult, prevvar = NULL;
335 varptr != NULL; varptr = nextvar)
337 nextvar = varptr->
next;
342 prevvar->
next = nextvar;
421 new->indicator =
ind;
479 list->indicator->name,
list->indicator->type,
list->indicator->brace_level,
480 NULL, NULL, str_zero, NULL, NULL);
527 for (
this =
types;
this != NULL;
this = this->
next)
529 if (strcmp(this->name,
name) == 0)
541 const char **dimension,
const char **length,
542 const char *type_dimension,
const char *type_index,
543 int pointer_len,
bool type_definition)
545 if (atoi(type_index) >= 0)
547 if (atoi(*length) >= 0)
550 *length = type_index;
553 if (atoi(type_dimension) >= 0)
555 if (atoi(*dimension) >= 0 && atoi(*length) >= 0)
558 if (atoi(*dimension) >= 0)
559 *length = *dimension;
561 *dimension = type_dimension;
566 "multilevel pointers (more than 2 levels) are not supported; found %d levels", pointer_len),
572 if (pointer_len > 1 && (atoi(*length) >= 0 || atoi(*dimension) >= 0))
575 if (atoi(*length) >= 0 && atoi(*dimension) >= 0 && pointer_len)
585 *length = *dimension;
589 if (atoi(*length) >= 0)
600 if (atoi(*length) < 0)
602 *length = *dimension;
611 if (pointer_len == 2)
613 *length = *dimension =
"0";
618 if (pointer_len == 1)
622 if (atoi(*length) < 0)
628 if (atoi(*dimension) < 0 && !type_definition)
635 else if (strcmp(*dimension,
"0") == 0)
638 *length = *dimension;
647 *length = *dimension;
651 if (atoi(*length) >= 0)
652 mmfatal(
PARSE_ERROR,
"multidimensional arrays for simple data types are not supported");
#define ngettext(s, p, n)
@ ECPGt_unsigned_long_long
static struct variable * find_simple(const char *name)
static struct variable * allvariables
void add_variable_to_tail(struct arguments **list, struct variable *var, struct variable *ind)
void dump_variables(struct arguments *list, int mode)
void adjust_array(enum ECPGttype type_enum, const char **dimension, const char **length, const char *type_dimension, const char *type_index, int pointer_len, bool type_definition)
void reset_variables(void)
void remove_variables(int brace_level)
static struct variable * find_struct(const char *name, char *next, char *end)
struct arguments * argsresult
void remove_variable_from_list(struct arguments **list, struct variable *var)
struct variable * find_variable(const char *name)
void add_variable_to_head(struct arguments **list, struct variable *var, struct variable *ind)
struct arguments * argsinsert
struct typedefs * get_typedef(const char *name, bool noerror)
static struct variable * find_struct_member(const char *name, char *str, struct ECPGstruct_member *members, int brace_level)
void remove_typedefs(int brace_level)
void check_indicator(struct ECPGtype *var)
struct variable * new_variable(const char *name, struct ECPGtype *type, int brace_level)
static PgChecksumMode mode
void mmerror(int error_code, enum errortype type, const char *error,...) pg_attribute_printf(3
char * mm_strdup(const char *string)
void void mmfatal(int error_code, const char *error,...) pg_attribute_printf(2
void * mm_alloc(size_t size)
struct ECPGstruct_member * next
struct ECPGstruct_member * members
struct ECPGtype * element
struct variable * indicator
struct variable * variable
struct arguments * argsinsert
struct arguments * argsresult
struct ECPGstruct_member * struct_member_list
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)
struct ECPGtype * ECPGmake_array_type(struct ECPGtype *type, const char *size)
void ECPGfree_type(struct ECPGtype *type)
struct ECPGtype * ECPGmake_simple_type(enum ECPGttype type, const char *size, int counter)
struct ECPGtype * ECPGmake_struct_type(struct ECPGstruct_member *rm, enum ECPGttype type, const char *type_name, const char *struct_sizeof)