aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc/variable.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2009-01-23 12:43:32 +0000
committerPeter Eisentraut <peter_e@gmx.net>2009-01-23 12:43:32 +0000
commit3b35a904aab85b3e837dfb5f5a64375d2ab11da9 (patch)
treeb158ebdd5b719956acefb27221c57ce01869c32f /src/interfaces/ecpg/preproc/variable.c
parent9187cedd7c9b8c3e9e62a1686ecdbd9ede87f052 (diff)
downloadpostgresql-3b35a904aab85b3e837dfb5f5a64375d2ab11da9.tar.gz
postgresql-3b35a904aab85b3e837dfb5f5a64375d2ab11da9.zip
Message style review
Diffstat (limited to 'src/interfaces/ecpg/preproc/variable.c')
-rw-r--r--src/interfaces/ecpg/preproc/variable.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/interfaces/ecpg/preproc/variable.c b/src/interfaces/ecpg/preproc/variable.c
index e16e82112d3..02e9afed81d 100644
--- a/src/interfaces/ecpg/preproc/variable.c
+++ b/src/interfaces/ecpg/preproc/variable.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/variable.c,v 1.45 2008/05/16 15:20:04 petere Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/variable.c,v 1.46 2009/01/23 12:43:32 petere Exp $ */
#include "postgres_fe.h"
@@ -86,7 +86,7 @@ find_struct_member(char *name, char *str, struct ECPGstruct_member * members, in
case '\0': /* found the end, but this time it has to be
* an array element */
if (members->type->type != ECPGt_array)
- mmerror(PARSE_ERROR, ET_FATAL, "incorrectly formed variable %s", name);
+ mmerror(PARSE_ERROR, ET_FATAL, "incorrectly formed variable \"%s\"", name);
switch (members->type->u.element->type)
{
@@ -109,7 +109,7 @@ find_struct_member(char *name, char *str, struct ECPGstruct_member * members, in
return (find_struct_member(name, end, members->type->u.members, brace_level));
break;
default:
- mmerror(PARSE_ERROR, ET_FATAL, "incorrectly formed variable %s", name);
+ mmerror(PARSE_ERROR, ET_FATAL, "incorrectly formed variable \"%s\"", name);
break;
}
}
@@ -132,10 +132,10 @@ find_struct(char *name, char *next, char *end)
if (c == '-')
{
if (p->type->type != ECPGt_array)
- mmerror(PARSE_ERROR, ET_FATAL, "variable %s is not a pointer", name);
+ mmerror(PARSE_ERROR, ET_FATAL, "variable \"%s\" is not a pointer", name);
if (p->type->u.element->type != ECPGt_struct && p->type->u.element->type != ECPGt_union)
- mmerror(PARSE_ERROR, ET_FATAL, "variable %s is not a pointer to a structure or a union", name);
+ mmerror(PARSE_ERROR, ET_FATAL, "variable \"%s\" is not a pointer to a structure or a union", name);
/* restore the name, we will need it later */
*next = c;
@@ -147,7 +147,7 @@ find_struct(char *name, char *next, char *end)
if (next == end)
{
if (p->type->type != ECPGt_struct && p->type->type != ECPGt_union)
- mmerror(PARSE_ERROR, ET_FATAL, "variable %s is neither a structure nor a union", name);
+ mmerror(PARSE_ERROR, ET_FATAL, "variable \"%s\" is neither a structure nor a union", name);
/* restore the name, we will need it later */
*next = c;
@@ -157,10 +157,10 @@ find_struct(char *name, char *next, char *end)
else
{
if (p->type->type != ECPGt_array)
- mmerror(PARSE_ERROR, ET_FATAL, "variable %s is not an array", name);
+ mmerror(PARSE_ERROR, ET_FATAL, "variable \"%s\" is not an array", name);
if (p->type->u.element->type != ECPGt_struct && p->type->u.element->type != ECPGt_union)
- mmerror(PARSE_ERROR, ET_FATAL, "variable %s is not a pointer to a structure or a union", name);
+ mmerror(PARSE_ERROR, ET_FATAL, "variable \"%s\" is not a pointer to a structure or a union", name);
/* restore the name, we will need it later */
*next = c;
@@ -456,7 +456,7 @@ check_indicator(struct ECPGtype * var)
check_indicator(var->u.element);
break;
default:
- mmerror(PARSE_ERROR, ET_ERROR, "indicator variable must be integer type");
+ mmerror(PARSE_ERROR, ET_ERROR, "indicator variable must have an integer type");
break;
}
}
@@ -468,7 +468,7 @@ get_typedef(char *name)
for (this = types; this && strcmp(this->name, name); this = this->next);
if (!this)
- mmerror(PARSE_ERROR, ET_FATAL, "invalid datatype \"%s\"", name);
+ mmerror(PARSE_ERROR, ET_FATAL, "unrecognized data type name \"%s\"", name);
return (this);
}
@@ -479,7 +479,7 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty
if (atoi(type_index) >= 0)
{
if (atoi(*length) >= 0)
- mmerror(PARSE_ERROR, ET_FATAL, "no multidimensional array support");
+ mmerror(PARSE_ERROR, ET_FATAL, "multidimensional arrays are not supported");
*length = type_index;
}
@@ -487,7 +487,7 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty
if (atoi(type_dimension) >= 0)
{
if (atoi(*dimension) >= 0 && atoi(*length) >= 0)
- mmerror(PARSE_ERROR, ET_FATAL, "no multidimensional array support");
+ mmerror(PARSE_ERROR, ET_FATAL, "multidimensional arrays are not supported");
if (atoi(*dimension) >= 0)
*length = *dimension;
@@ -496,16 +496,16 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty
}
if (pointer_len > 2)
- mmerror(PARSE_ERROR, ET_FATAL, "no multilevel (more than 2) pointer supported %d", pointer_len);
+ mmerror(PARSE_ERROR, ET_FATAL, "multilevel pointers (more than 2 levels) are not supported; found %d levels", pointer_len);
if (pointer_len > 1 && type_enum != ECPGt_char && type_enum != ECPGt_unsigned_char)
- mmerror(PARSE_ERROR, ET_FATAL, "no pointer to pointer supported for this type");
+ mmerror(PARSE_ERROR, ET_FATAL, "pointer to pointer is not supported for this data type");
if (pointer_len > 1 && (atoi(*length) >= 0 || atoi(*dimension) >= 0))
- mmerror(PARSE_ERROR, ET_FATAL, "no multidimensional array support");
+ mmerror(PARSE_ERROR, ET_FATAL, "multidimensional arrays are not supported");
if (atoi(*length) >= 0 && atoi(*dimension) >= 0 && pointer_len)
- mmerror(PARSE_ERROR, ET_FATAL, "no multidimensional array support");
+ mmerror(PARSE_ERROR, ET_FATAL, "multidimensional arrays are not supported");
switch (type_enum)
{
@@ -519,7 +519,7 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty
}
if (atoi(*length) >= 0)
- mmerror(PARSE_ERROR, ET_FATAL, "no multidimensional array support for structures");
+ mmerror(PARSE_ERROR, ET_FATAL, "multidimensional arrays for structures are not supported");
break;
case ECPGt_varchar:
@@ -579,7 +579,7 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty
}
if (atoi(*length) >= 0)
- mmerror(PARSE_ERROR, ET_FATAL, "no multidimensional array support for simple data types");
+ mmerror(PARSE_ERROR, ET_FATAL, "multidimensional arrays for simple data types are not supported");
break;
}