浏览代码

fixed unlucky formatted messages (thanks to Glynn)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32590 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 16 年之前
父节点
当前提交
5e2bc274f1
共有 5 个文件被更改,包括 13 次插入26 次删除
  1. 2 4
      db/base/copy.c
  2. 2 4
      db/drivers/ogr/describe.c
  3. 5 10
      db/drivers/postgres/describe.c
  4. 3 6
      db/drivers/postgres/parse.c
  5. 1 2
      db/drivers/sqlite/describe.c

+ 2 - 4
db/base/copy.c

@@ -107,8 +107,7 @@ int main(int argc, char **argv)
     /* 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 @@ int main(int argc, char **argv)
     }
     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"));

+ 2 - 4
db/drivers/ogr/describe.c

@@ -90,8 +90,7 @@ int describe_table(OGRLayerH hLayer, dbTable ** table, cursor * c)
 
 	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 @@ int describe_table(OGRLayerH hLayer, dbTable ** table, cursor * c)
 	    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;
 	    }

+ 5 - 10
db/drivers/postgres/describe.c

@@ -100,35 +100,30 @@ int describe_table(PGresult * res, dbTable ** table, cursor * c)
 	/* 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);

+ 3 - 6
db/drivers/postgres/parse.c

@@ -52,18 +52,15 @@ int parse_conn(const char *str, PGCONN * pgconn)
 	    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;
 	    }

+ 1 - 2
db/drivers/sqlite/describe.c

@@ -156,8 +156,7 @@ int describe_table(sqlite3_stmt * statement, dbTable ** table, cursor * c)
 
 	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;
 	}