Skip to content
4 changes: 2 additions & 2 deletions db/drivers/dbf/dbfexe.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ int execute(char *sql, cursor *c)

if (yyparse() != 0) {
G_free(tmpsql);
db_d_append_error("%s (%s) %s\n%s\n", _("SQL parser error"), st->errmsg,
_("in statement:"), sql);
db_d_append_error(_("SQL parser error: %s\n"), st->errmsg);
db_d_append_error(_("Statement: %s\n"), sql);
sqpFreeStmt(st);
return DB_FAILED;
}
Expand Down
6 changes: 3 additions & 3 deletions db/drivers/sqlite/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ int db__driver_open_database(dbHandle *handle)
if (access(path, 0) != 0) {
if (G_mkdir(path) != 0)
G_fatal_error(
_("Unable to create directory '%s' for sqlite database"),
_("Unable to create directory '%s' for SQLite database"),
Comment thread
echoix marked this conversation as resolved.
path);
}
}
Expand All @@ -116,7 +116,7 @@ int db__driver_open_database(dbHandle *handle)
G_important_message(_("Disabling SQLite locking"));
}
else {
G_warning(_("The sqlite config option '%s' is not supported"),
G_warning(_("The SQLite config option '%s' is not supported"),
"SQLITE_CONFIG_URI");
if (G_strlcpy(name3, name2, sizeof(name3)) >= sizeof(name3)) {
db_d_append_error(_("Database name <%s> is too long"), name2);
Expand Down Expand Up @@ -195,7 +195,7 @@ int db__driver_create_database(dbHandle *handle)
G_important_message(_("Disabling SQLite locking"));
}
else {
G_warning(_("The sqlite config option '%s' is not supported"),
G_warning(_("The SQLite config option '%s' is not supported"),
"SQLITE_CONFIG_URI");
if (G_strlcpy(name2, name, sizeof(name2)) >= sizeof(name2)) {
db_d_append_error(_("Database name <%s> is too long"), name);
Expand Down
4 changes: 2 additions & 2 deletions lib/gis/view.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,12 +526,12 @@ pr_winerr(int vis, /* % of saved window overlapping current window */
{
switch (vis) {
case 0:
G_warning(_(" Window saved in \"%s\" is completely outside of current "
G_warning(_("Window saved in \"%s\" is completely outside of current "
"GRASS window."),
viewname);
break;
default:
G_warning(_(" Only %d%% of window saved in \"%s\" overlaps with "
G_warning(_("Only %d%% of window saved in \"%s\" overlaps with "
"current GRASS window."),
vis, viewname);
break;
Expand Down
12 changes: 4 additions & 8 deletions raster/r.horizon/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,26 +493,22 @@ int main(int argc, char *argv[])

if (parm.e_buff->answer != NULL) {
if (sscanf(parm.e_buff->answer, "%lf", &ebufferZone) != 1)
G_fatal_error(_("Could not read %s bufferzone size. Aborting."),
_("east"));
G_fatal_error(_("Could not read east bufferzone size. Aborting."));
}

if (parm.w_buff->answer != NULL) {
if (sscanf(parm.w_buff->answer, "%lf", &wbufferZone) != 1)
G_fatal_error(_("Could not read %s bufferzone size. Aborting."),
_("west"));
G_fatal_error(_("Could not read west bufferzone size. Aborting."));
}

if (parm.s_buff->answer != NULL) {
if (sscanf(parm.s_buff->answer, "%lf", &sbufferZone) != 1)
G_fatal_error(_("Could not read %s bufferzone size. Aborting."),
_("south"));
G_fatal_error(_("Could not read south bufferzone size. Aborting."));
}

if (parm.n_buff->answer != NULL) {
if (sscanf(parm.n_buff->answer, "%lf", &nbufferZone) != 1)
G_fatal_error(_("Could not read %s bufferzone size. Aborting."),
_("north"));
G_fatal_error(_("Could not read north bufferzone size. Aborting."));
}

settings.fixedMaxLength = BIG;
Expand Down
30 changes: 9 additions & 21 deletions raster/r.in.pdal/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*
*****************************************************************************/

#include <cinttypes>
#include <cstdint>
#include <cstdio>
#include <iomanip>
#include <sstream>
Expand Down Expand Up @@ -56,8 +58,6 @@ extern "C" {
#include "string_list.h"
}

#define BUFFSIZE GPATH_MAX

int main(int argc, char *argv[])
{
int out_fd;
Expand All @@ -73,8 +73,6 @@ int main(int argc, char *argv[])
struct Cell_head input_region = {};
int rows, cols; /* scan box size */

char buff[BUFFSIZE];

struct BinIndex bin_index_nodes;

bin_index_nodes.num_nodes = 0;
Expand Down Expand Up @@ -947,8 +945,8 @@ int main(int argc, char *argv[])
G_percent(1, 1, 1); /* flush */
G_free(raster_row);

G_message(_(GPOINT_COUNT_FORMAT " points found in input file(s)"),
grass_filter.num_processed());
G_message(_("%" PRIu64 " points found in input file(s)"),
(uint64_t)grass_filter.num_processed());
Comment thread
echoix marked this conversation as resolved.

/* close raster file & write history */
Rast_close(out_fd);
Expand Down Expand Up @@ -979,21 +977,11 @@ int main(int argc, char *argv[])
if (set_region_flag->answer)
G_put_window(&region);

if (infiles.num_items > 1) {
snprintf(buff, BUFFSIZE,
_("Raster map <%s> created."
" " GPOINT_COUNT_FORMAT
" points from %d files found in region."),
outmap, grass_filter.num_passed(), infiles.num_items);
}
else {
snprintf(buff, BUFFSIZE,
_("Raster map <%s> created."
" " GPOINT_COUNT_FORMAT " points found in region."),
outmap, grass_filter.num_passed());
}

G_done_msg("%s", buff);
G_message(_("%" PRIu64 " points found in region."),
(uint64_t)grass_filter.num_passed());
if (infiles.num_items > 1)
G_message(_("Number of input files: %d"), infiles.num_items);
G_done_msg(_("Raster map <%s> created."), outmap);
// Points pruned by the reader's spatial index never reach the filter, so
// the count below is not comparable to a run without the index.
if (bounds_pushed_to_reader)
Expand Down
6 changes: 2 additions & 4 deletions raster/r.reclass/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,10 @@ int main(int argc, char *argv[])
switch (parse(buf, &rules, &tail, &cats)) {
case -1:
if (tty) {
fprintf(stderr, _("Illegal reclass rule -"));
fprintf(stderr, _(" ignored\n"));
fprintf(stderr, _("Illegal reclass rule - ignored\n"));
}
else {
strcat(buf, _(" - invalid reclass rule"));
G_fatal_error("%s", buf);
G_fatal_error(_("%s - invalid reclass rule"), buf);
Comment thread
echoix marked this conversation as resolved.
}
break;

Expand Down
9 changes: 7 additions & 2 deletions vector/v.class/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,13 @@ int main(int argc, char *argv[])
fprintf(stdout, _("Stdev multiplied by %.4f to define step\n"),
finfo);
fprintf(stdout, "\n");
fprintf(stdout, _("%15s%15s%15s\n\n"), "From (excl.)", "To (incl.)",
"Frequency");
fprintf(stdout, "%15s%15s%15s\n\n",
/* GTC Column header, lower class limit (exclusive) */
_("From (excl.)"),
/* GTC Column header, upper class limit (inclusive) */
_("To (incl.)"),
/* GTC Column header, number of values in the class */
_("Frequency"));
fprintf(stdout, "%15.5f%15.5f%15i\n", min, classbreaks[0],
frequencies[0]);

Expand Down
2 changes: 1 addition & 1 deletion vector/v.in.ogr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1924,7 +1924,7 @@ int main(int argc, char *argv[])
}
if (ncentr > n_polygons) {
G_important_message(
_("%d additional areas where created during import."),
_("%d additional areas were created during import."),
ncentr - n_polygons);
}
if (snap > 0) {
Expand Down
4 changes: 2 additions & 2 deletions vector/v.profile/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ int main(int argc, char *argv[])
if (ncats < 1) {
Vect_close(&In);
Vect_close(&Pro);
G_fatal_error(_("No features match Your query"));
G_fatal_error(_("No features match your query"));
}
if (ncats > 1) {
Vect_close(&In);
Expand Down Expand Up @@ -649,7 +649,7 @@ int main(int argc, char *argv[])
ncats = db_select_int(driver, Fi->table, Fi->key, where_opt->answer,
&cats);
if (ncats < 1)
G_fatal_error(_("No features match Your query"));
G_fatal_error(_("No features match your query"));
for (i = 0; i < ncats; i++) {
c = Vect_cidx_find_next(&In, field_index, cats[i], otype, 0,
&type, &id);
Expand Down
6 changes: 3 additions & 3 deletions vector/v.rectify/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ int main(int argc, char *argv[])
select_target_env();

if (G_find_vector2(out_opt->answer, G_mapset())) {
G_warning(_("The vector map <%s> already exists in"),
G_warning(_("The vector map <%s> already exists."),
out_opt->answer);
G_warning(_("target project %s, mapset %s:"), G_location(),
G_mapset());
G_warning(_("Target project: <%s>"), G_location());
G_warning(_("Target mapset: <%s>"), G_mapset());
G_fatal_error(_("Rectification cancelled."));
}
select_current_env();
Expand Down
Loading