[GRASS-SVN] r32590 - in grass/trunk/db: base drivers/ogr drivers/postgres drivers/sqlite

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 6 18:08:20 EDT 2008


Author: neteler
Date: 2008-08-06 18:08:20 -0400 (Wed, 06 Aug 2008)
New Revision: 32590

Modified:
   grass/trunk/db/base/copy.c
   grass/trunk/db/drivers/ogr/describe.c
   grass/trunk/db/drivers/postgres/describe.c
   grass/trunk/db/drivers/postgres/parse.c
   grass/trunk/db/drivers/sqlite/describe.c
Log:
fixed unlucky formatted messages (thanks to Glynn)

Modified: grass/trunk/db/base/copy.c
===================================================================
--- grass/trunk/db/base/copy.c	2008-08-06 22:07:54 UTC (rev 32589)
+++ grass/trunk/db/base/copy.c	2008-08-06 22:08:20 UTC (rev 32590)
@@ -107,8 +107,7 @@
     /* Check options and copy tables */
     if (from_table->answer) {
 	if (select->answer)
-	    G_fatal_error(_
-			  ("Cannot combine 'from_table' and 'select' options"));
+	    G_fatal_error(_("Cannot combine 'from_table' and 'select' options"));
 
 	if (where->answer) {
 	    ret =
@@ -126,8 +125,7 @@
     }
     else {
 	if (!select->answer)
-	    G_fatal_error(_
-			  ("Either 'from_table' or 'select' option must be given."));
+	    G_fatal_error(_("Either 'from_table' or 'select' option must be given."));
 
 	if (where->answer)
 	    G_fatal_error(_("Cannot combine 'select' and 'where' options"));

Modified: grass/trunk/db/drivers/ogr/describe.c
===================================================================
--- grass/trunk/db/drivers/ogr/describe.c	2008-08-06 22:07:54 UTC (rev 32589)
+++ grass/trunk/db/drivers/ogr/describe.c	2008-08-06 22:08:20 UTC (rev 32590)
@@ -90,8 +90,7 @@
 
 	if (ogrType != OFTInteger && ogrType != OFTReal &&
 	    ogrType != OFTString) {
-	    G_warning(_
-		      ("OGR driver: column '%s', OGR type %d  is not supported"),
+	    G_warning(_("OGR driver: column '%s', OGR type %d  is not supported"),
 		      fieldName, ogrType);
 	    cols[i] = 0;
 	}
@@ -151,8 +150,7 @@
 	    sqlType = DB_SQL_TYPE_CHARACTER;
 	    size = OGR_Fld_GetWidth(hFieldDefn);
 	    if (size == 0) {
-		G_warning(_
-			  ("column '%s', type 'string': unknown width -> stored as varchar(250) "
+		G_warning(_("column '%s', type 'string': unknown width -> stored as varchar(250) "
 			   "some data may be lost"), fieldName);
 		size = 250;
 	    }

Modified: grass/trunk/db/drivers/postgres/describe.c
===================================================================
--- grass/trunk/db/drivers/postgres/describe.c	2008-08-06 22:07:54 UTC (rev 32589)
+++ grass/trunk/db/drivers/postgres/describe.c	2008-08-06 22:08:20 UTC (rev 32590)
@@ -100,35 +100,30 @@
 	/* PG types defined in globals.h (and pg_type.h) */
 	if (sqltype == DB_SQL_TYPE_UNKNOWN) {
 	    if (gpgtype == PG_TYPE_POSTGIS_GEOM) {
-		G_warning(_
-			  ("pg driver: PostGIS column '%s', type 'geometry'  will not be converted"),
+		G_warning(_("pg driver: PostGIS column '%s', type 'geometry'  will not be converted"),
 			  fname);
 		continue;
 	    }
 	    else {
 		/* Warn, ignore and continue */
-		G_warning(_
-			  ("pg driver: column '%s', type %d  is not supported"),
+		G_warning(_("pg driver: column '%s', type %d  is not supported"),
 			  fname, pgtype);
 		continue;
 	    }
 	}
 
 	if (gpgtype == PG_TYPE_INT8)
-	    G_warning(_
-		      ("column '%s' : type int8 (bigint) is stored as integer (4 bytes) "
+	    G_warning(_("column '%s' : type int8 (bigint) is stored as integer (4 bytes) "
 		       "some data may be damaged"), fname);
 
 	if (gpgtype == PG_TYPE_VARCHAR && fsize < 0) {
-	    G_warning(_
-		      ("column '%s' : type character varying is stored as varchar(250) "
+	    G_warning(_("column '%s' : type character varying is stored as varchar(250) "
 		       "some data may be lost"), fname);
 	    fsize = 250;
 	}
 
 	if (gpgtype == PG_TYPE_BOOL)
-	    G_warning(_
-		      ("column '%s' : type bool (boolean) is stored as char(1), values: 0 (false), "
+	    G_warning(_("column '%s' : type bool (boolean) is stored as char(1), values: 0 (false), "
 		       "1 (true)"), fname);
 
 	column = db_get_table_column(*table, kcols);

Modified: grass/trunk/db/drivers/postgres/parse.c
===================================================================
--- grass/trunk/db/drivers/postgres/parse.c	2008-08-06 22:07:54 UTC (rev 32589)
+++ grass/trunk/db/drivers/postgres/parse.c	2008-08-06 22:08:20 UTC (rev 32590)
@@ -52,18 +52,15 @@
 	    else if (strncmp(tokens[i], "dbname", 6) == 0)
 		pgconn->dbname = G_store(tokens[i] + 7);
 	    else if (strncmp(tokens[i], "user", 4) == 0)
-		G_warning(_
-			  ("'user' in database definition is not supported, use db.login"));
+		G_warning(_("'user' in database definition is not supported, use db.login"));
 	    /* pgconn->user = G_store ( tokens[i] + 5 ); */
 	    else if (strncmp(tokens[i], "password", 8) == 0)
 		/* pgconn->password = G_store ( tokens[i] + 9 ); */
-		G_warning(_
-			  ("'password' in database definition is not supported, use db.login"));
+		G_warning(_("'password' in database definition is not supported, use db.login"));
 	    else if (strncmp(tokens[i], "schema", 6) == 0)
 		pgconn->schema = G_store(tokens[i] + 7);
 	    else {
-		append_error(_
-			     ("Unknown option in database definition for PostgreSQL: "));
+		append_error(_("Unknown option in database definition for PostgreSQL: "));
 		append_error(tokens[i]);
 		return DB_FAILED;
 	    }

Modified: grass/trunk/db/drivers/sqlite/describe.c
===================================================================
--- grass/trunk/db/drivers/sqlite/describe.c	2008-08-06 22:07:54 UTC (rev 32589)
+++ grass/trunk/db/drivers/sqlite/describe.c	2008-08-06 22:08:20 UTC (rev 32590)
@@ -156,8 +156,7 @@
 
 	if (sqltype == DB_SQL_TYPE_UNKNOWN) {
 	    /* Warn, ignore and continue */
-	    G_warning(_
-		      ("SQLite driver: column '%s', SQLite type %d  is not supported"),
+	    G_warning(_("SQLite driver: column '%s', SQLite type %d  is not supported"),
 		      fname, litetype);
 	    continue;
 	}



More information about the grass-commit mailing list