[GRASS-SVN] r74449 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu May 2 01:29:09 PDT 2019
Author: martinl
Date: 2019-05-02 01:29:09 -0700 (Thu, 02 May 2019)
New Revision: 74449
Modified:
grass/trunk/lib/gis/percent.c
Log:
G_progress() does not support GRASS_MESSAGE_FORMAT=gui, fixes #2751
Modified: grass/trunk/lib/gis/percent.c
===================================================================
--- grass/trunk/lib/gis/percent.c 2019-05-01 21:48:02 UTC (rev 74448)
+++ grass/trunk/lib/gis/percent.c 2019-05-02 08:29:09 UTC (rev 74449)
@@ -168,10 +168,10 @@
return;
if (n == s && n == 1) {
- if (format != G_INFO_FORMAT_PLAIN)
+ if (format == G_INFO_FORMAT_PLAIN)
+ fprintf(stderr, "\n");
+ else if (format != G_INFO_FORMAT_GUI)
fprintf(stderr, "\r");
- else
- fprintf(stderr, "\n");
return;
}
@@ -178,7 +178,9 @@
if (n % s == 0) {
if (format == G_INFO_FORMAT_PLAIN)
fprintf(stderr, "%ld..", n);
- else
+ else if (format == G_INFO_FORMAT_GUI)
+ fprintf(stderr, "GRASS_INFO_PROGRESS: %ld\n", n);
+ else
fprintf(stderr, "%10ld\b\b\b\b\b\b\b\b\b\b", n);
}
}
More information about the grass-commit
mailing list