mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
committed the missing files
This commit is contained in:
parent
cebfe90f0b
commit
0a7a8256b8
@ -60,7 +60,7 @@ ECPGnumeric_lvalue(FILE *f, char *name)
|
|||||||
default:
|
default:
|
||||||
snprintf(errortext, sizeof errortext, "variable %s: numeric type needed"
|
snprintf(errortext, sizeof errortext, "variable %s: numeric type needed"
|
||||||
,name);
|
,name);
|
||||||
mmerror(ET_ERROR, errortext);
|
mmerror(PARSE_ERROR, ET_ERROR, errortext);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -121,7 +121,7 @@ drop_descriptor(char *name, char *connection)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
snprintf(errortext, sizeof errortext, "unknown descriptor %s", name);
|
snprintf(errortext, sizeof errortext, "unknown descriptor %s", name);
|
||||||
mmerror(ET_NOTICE, errortext);
|
mmerror(PARSE_ERROR, ET_NOTICE, errortext);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct descriptor
|
struct descriptor
|
||||||
@ -144,7 +144,7 @@ lookup_descriptor(char *name, char *connection)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
snprintf(errortext, sizeof errortext, "unknown descriptor %s", name);
|
snprintf(errortext, sizeof errortext, "unknown descriptor %s", name);
|
||||||
mmerror(ET_NOTICE, errortext);
|
mmerror(PARSE_ERROR, ET_NOTICE, errortext);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ output_get_descr_header(char *desc_name)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
snprintf(errortext, sizeof errortext, "unknown descriptor header item '%d'", results->value);
|
snprintf(errortext, sizeof errortext, "unknown descriptor header item '%d'", results->value);
|
||||||
mmerror(ET_NOTICE, errortext);
|
mmerror(PARSE_ERROR, ET_NOTICE, errortext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,10 +183,10 @@ output_get_descr(char *desc_name, char *index)
|
|||||||
switch (results->value)
|
switch (results->value)
|
||||||
{
|
{
|
||||||
case ECPGd_nullable:
|
case ECPGd_nullable:
|
||||||
mmerror(ET_NOTICE, "nullable is always 1");
|
mmerror(PARSE_ERROR, ET_NOTICE, "nullable is always 1");
|
||||||
break;
|
break;
|
||||||
case ECPGd_key_member:
|
case ECPGd_key_member:
|
||||||
mmerror(ET_NOTICE, "key_member is always 0");
|
mmerror(PARSE_ERROR, ET_NOTICE, "key_member is always 0");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -81,13 +81,13 @@ find_struct(char *name, char *next)
|
|||||||
if (p->type->typ != ECPGt_array)
|
if (p->type->typ != ECPGt_array)
|
||||||
{
|
{
|
||||||
sprintf(errortext, "variable %s is not a pointer", name);
|
sprintf(errortext, "variable %s is not a pointer", name);
|
||||||
mmerror(ET_FATAL, errortext);
|
mmerror(PARSE_ERROR, ET_FATAL, errortext);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->type->u.element->typ != ECPGt_struct && p->type->u.element->typ != ECPGt_union)
|
if (p->type->u.element->typ != ECPGt_struct && p->type->u.element->typ != ECPGt_union)
|
||||||
{
|
{
|
||||||
sprintf(errortext, "variable %s is not a pointer to a structure or a union", name);
|
sprintf(errortext, "variable %s is not a pointer to a structure or a union", name);
|
||||||
mmerror(ET_FATAL, errortext);
|
mmerror(PARSE_ERROR, ET_FATAL, errortext);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* restore the name, we will need it later on */
|
/* restore the name, we will need it later on */
|
||||||
@ -101,7 +101,7 @@ find_struct(char *name, char *next)
|
|||||||
if (p->type->typ != ECPGt_struct && p->type->typ != ECPGt_union)
|
if (p->type->typ != ECPGt_struct && p->type->typ != ECPGt_union)
|
||||||
{
|
{
|
||||||
sprintf(errortext, "variable %s is neither a structure nor a union", name);
|
sprintf(errortext, "variable %s is neither a structure nor a union", name);
|
||||||
mmerror(ET_FATAL, errortext);
|
mmerror(PARSE_ERROR, ET_FATAL, errortext);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* restore the name, we will need it later on */
|
/* restore the name, we will need it later on */
|
||||||
@ -143,7 +143,7 @@ find_variable(char *name)
|
|||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
{
|
{
|
||||||
sprintf(errortext, "The variable %s is not declared", name);
|
sprintf(errortext, "The variable %s is not declared", name);
|
||||||
mmerror(ET_FATAL, errortext);
|
mmerror(PARSE_ERROR, ET_FATAL, errortext);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (p);
|
return (p);
|
||||||
@ -277,7 +277,7 @@ check_indicator(struct ECPGtype * var)
|
|||||||
check_indicator(var->u.element);
|
check_indicator(var->u.element);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
mmerror(ET_ERROR, "indicator variable must be integer type");
|
mmerror(PARSE_ERROR, ET_ERROR, "indicator variable must be integer type");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -291,7 +291,7 @@ get_typedef(char *name)
|
|||||||
if (!this)
|
if (!this)
|
||||||
{
|
{
|
||||||
sprintf(errortext, "invalid datatype '%s'", name);
|
sprintf(errortext, "invalid datatype '%s'", name);
|
||||||
mmerror(ET_FATAL, errortext);
|
mmerror(PARSE_ERROR, ET_FATAL, errortext);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (this);
|
return (this);
|
||||||
@ -303,7 +303,7 @@ adjust_array(enum ECPGttype type_enum, int *dimension, int *length, int type_dim
|
|||||||
if (type_index >= 0)
|
if (type_index >= 0)
|
||||||
{
|
{
|
||||||
if (*length >= 0)
|
if (*length >= 0)
|
||||||
mmerror(ET_FATAL, "No multi-dimensional array support");
|
mmerror(PARSE_ERROR, ET_FATAL, "No multi-dimensional array support");
|
||||||
|
|
||||||
*length = type_index;
|
*length = type_index;
|
||||||
}
|
}
|
||||||
@ -311,7 +311,7 @@ adjust_array(enum ECPGttype type_enum, int *dimension, int *length, int type_dim
|
|||||||
if (type_dimension >= 0)
|
if (type_dimension >= 0)
|
||||||
{
|
{
|
||||||
if (*dimension >= 0 && *length >= 0)
|
if (*dimension >= 0 && *length >= 0)
|
||||||
mmerror(ET_FATAL, "No multi-dimensional array support");
|
mmerror(PARSE_ERROR, ET_FATAL, "No multi-dimensional array support");
|
||||||
|
|
||||||
if (*dimension >= 0)
|
if (*dimension >= 0)
|
||||||
*length = *dimension;
|
*length = *dimension;
|
||||||
@ -321,17 +321,17 @@ adjust_array(enum ECPGttype type_enum, int *dimension, int *length, int type_dim
|
|||||||
|
|
||||||
if (pointer_len>2)
|
if (pointer_len>2)
|
||||||
{ sprintf(errortext, "No multilevel (more than 2) pointer supported %d",pointer_len);
|
{ sprintf(errortext, "No multilevel (more than 2) pointer supported %d",pointer_len);
|
||||||
mmerror(ET_FATAL, errortext);
|
mmerror(PARSE_ERROR, ET_FATAL, errortext);
|
||||||
/* mmerror(ET_FATAL, "No multilevel (more than 2) pointer supported %d",pointer_len);*/
|
/* mmerror(PARSE_ERROR, ET_FATAL, "No multilevel (more than 2) pointer supported %d",pointer_len);*/
|
||||||
}
|
}
|
||||||
if (pointer_len>1 && type_enum!=ECPGt_char && type_enum!=ECPGt_unsigned_char)
|
if (pointer_len>1 && type_enum!=ECPGt_char && type_enum!=ECPGt_unsigned_char)
|
||||||
mmerror(ET_FATAL, "No pointer to pointer supported for this type");
|
mmerror(PARSE_ERROR, ET_FATAL, "No pointer to pointer supported for this type");
|
||||||
|
|
||||||
if (pointer_len>1 && (*length >= 0 || *dimension >= 0))
|
if (pointer_len>1 && (*length >= 0 || *dimension >= 0))
|
||||||
mmerror(ET_FATAL, "No multi-dimensional array support");
|
mmerror(PARSE_ERROR, ET_FATAL, "No multi-dimensional array support");
|
||||||
|
|
||||||
if (*length >= 0 && *dimension >= 0 && pointer_len)
|
if (*length >= 0 && *dimension >= 0 && pointer_len)
|
||||||
mmerror(ET_FATAL, "No multi-dimensional array support");
|
mmerror(PARSE_ERROR, ET_FATAL, "No multi-dimensional array support");
|
||||||
|
|
||||||
switch (type_enum)
|
switch (type_enum)
|
||||||
{
|
{
|
||||||
@ -345,7 +345,7 @@ adjust_array(enum ECPGttype type_enum, int *dimension, int *length, int type_dim
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (*length >= 0)
|
if (*length >= 0)
|
||||||
mmerror(ET_FATAL, "No multi-dimensional array support for structures");
|
mmerror(PARSE_ERROR, ET_FATAL, "No multi-dimensional array support for structures");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case ECPGt_varchar:
|
case ECPGt_varchar:
|
||||||
@ -390,7 +390,7 @@ adjust_array(enum ECPGttype type_enum, int *dimension, int *length, int type_dim
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (*length >= 0)
|
if (*length >= 0)
|
||||||
mmerror(ET_FATAL, "No multi-dimensional array support for simple data types");
|
mmerror(PARSE_ERROR, ET_FATAL, "No multi-dimensional array support for simple data types");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user