[GRASS-SVN] r45308 - grass/trunk/ps/ps.map
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Feb 4 04:04:48 EST 2011
Author: hamish
Date: 2011-02-04 01:04:48 -0800 (Fri, 04 Feb 2011)
New Revision: 45308
Modified:
grass/trunk/ps/ps.map/main.c
Log:
don't start file if just printing bounds
Modified: grass/trunk/ps/ps.map/main.c
===================================================================
--- grass/trunk/ps/ps.map/main.c 2011-02-04 09:00:14 UTC (rev 45307)
+++ grass/trunk/ps/ps.map/main.c 2011-02-04 09:04:48 UTC (rev 45308)
@@ -257,17 +257,19 @@
copies_set = 1;
}
- if (output_file->answer) {
- if ((PS.fp = fopen(output_file->answer, "w")) == NULL)
- G_fatal_error("%s - %s: %s", G_program_name(),
- output_file->answer, strerror(errno));
+ if(!bflag->answer) {
+ if (output_file->answer) {
+ if ((PS.fp = fopen(output_file->answer, "w")) == NULL)
+ G_fatal_error("%s - %s: %s", G_program_name(),
+ output_file->answer, strerror(errno));
+ }
+ else {
+ G_message(_("\nERROR: Required parameter <%s> not set:\n (%s).\n"),
+ output_file->key, output_file->description);
+ G_usage();
+ exit(EXIT_FAILURE);
+ }
}
- else {
- G_message(_("\nERROR: Required parameter <%s> not set:\n (%s).\n"),
- output_file->key, output_file->description);
- G_usage();
- exit(EXIT_FAILURE);
- }
/* get current mapset */
PS.cell_mapset = G_mapset();
More information about the grass-commit
mailing list