aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/execute.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2009-01-15 11:52:55 +0000
committerPeter Eisentraut <peter_e@gmx.net>2009-01-15 11:52:55 +0000
commitcb05ab81a857582161dd74cbfa91d4468e496cd1 (patch)
treed9808e4df13a70e2cb6f68fd09a059fa54170a7d /src/interfaces/ecpg/ecpglib/execute.c
parentcbb1358b18c88216a56de8847428d1bbcc51f280 (diff)
downloadpostgresql-cb05ab81a857582161dd74cbfa91d4468e496cd1.tar.gz
postgresql-cb05ab81a857582161dd74cbfa91d4468e496cd1.zip
NLS cleanup in ecpglib
Replace leftover instances of _() by ecpg_gettext(), the latter being the correct way to refer to the library's message catalog, instead of the one of the program using the library. Drop NLS support for ecpg_log(), which is a debugging instrument similar to elog() in the backend. We cannot support NLS in the ecpg compatlib, because that requires ecpg_gettext, which is in ecpglib, which is not a dependency of compatlib. It doesn't seem worthwhile to worry about this, since the only translatable string is "out of memory", and gettext probably won't be able to do much without memory either. Adjust messages to project style.
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/execute.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/execute.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index a6e58f0eaea..1605ec0dc8a 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.78 2008/05/16 15:20:03 petere Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.79 2009/01/15 11:52:55 petere Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
@@ -301,7 +301,7 @@ ecpg_is_type_an_array(int type, const struct statement * stmt, const struct vari
return (ECPG_ARRAY_ERROR);
ecpg_type_infocache_push(&(stmt->connection->cache_head), type, isarray, stmt->lineno);
- ecpg_log("ecpg_is_type_an_array on line %d: type (%d); C (%d); array (%s)\n", stmt->lineno, type, var->type, isarray ? _("yes") : _("no"));
+ ecpg_log("ecpg_is_type_an_array on line %d: type (%d); C (%d); array (%s)\n", stmt->lineno, type, var->type, isarray ? "yes" : "no");
return isarray;
}
@@ -729,7 +729,7 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari
for (element = 0; element < var->arrsize; element++)
sprintf(mallocedval + strlen(mallocedval), "%c,", (((int *) var->value)[element]) ? 't' : 'f');
else
- ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, _("different size"));
+ ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL);
strcpy(mallocedval + strlen(mallocedval) - 1, "]");
}
@@ -740,7 +740,7 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari
else if (var->offset == sizeof(int))
sprintf(mallocedval, "%c", (*((int *) var->value)) ? 't' : 'f');
else
- ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, _("different size"));
+ ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL);
}
*tobeinserted_p = mallocedval;
@@ -1042,7 +1042,7 @@ free_params(const char **paramValues, int nParams, bool print, int lineno)
for (n = 0; n < nParams; n++)
{
if (print)
- ecpg_log("free_params on line %d: parameter %d = %s\n", lineno, n + 1, paramValues[n] ? paramValues[n] : _("null"));
+ ecpg_log("free_params on line %d: parameter %d = %s\n", lineno, n + 1, paramValues[n] ? paramValues[n] : "null");
ecpg_free((void *) (paramValues[n]));
}
ecpg_free(paramValues);
@@ -1625,7 +1625,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char
if (con == NULL || con->connection == NULL)
{
free_statement(stmt);
- ecpg_raise(lineno, ECPG_NOT_CONN, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, (con) ? con->name : _("<empty>"));
+ ecpg_raise(lineno, ECPG_NOT_CONN, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, (con) ? con->name : ecpg_gettext("<empty>"));
setlocale(LC_NUMERIC, oldlocale);
ecpg_free(oldlocale);
return false;