[GRASS-SVN] r33650 - in grass/trunk/display: d.erase d.graph
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Oct 2 00:20:48 EDT 2008
Author: glynn
Date: 2008-10-02 00:20:48 -0400 (Thu, 02 Oct 2008)
New Revision: 33650
Modified:
grass/trunk/display/d.erase/main.c
grass/trunk/display/d.graph/Makefile
grass/trunk/display/d.graph/do_graph.c
grass/trunk/display/d.graph/local_proto.h
Log:
Fix bugs in d.erase, d.graph
Modified: grass/trunk/display/d.erase/main.c
===================================================================
--- grass/trunk/display/d.erase/main.c 2008-10-02 00:32:10 UTC (rev 33649)
+++ grass/trunk/display/d.erase/main.c 2008-10-02 04:20:48 UTC (rev 33650)
@@ -50,6 +50,8 @@
if (R_open_driver() != 0)
G_fatal_error(_("No graphics device selected"));
+ D_setup_unity(0);
+
D_erase(color->answer);
if (eraseframe->answer)
Modified: grass/trunk/display/d.graph/Makefile
===================================================================
--- grass/trunk/display/d.graph/Makefile 2008-10-02 00:32:10 UTC (rev 33649)
+++ grass/trunk/display/d.graph/Makefile 2008-10-02 04:20:48 UTC (rev 33650)
@@ -8,3 +8,6 @@
include $(MODULE_TOPDIR)/include/Make/Module.make
default: cmd $(HTMLDIR)/grass_logo.txt
+
+$(HTMLDIR)/%.txt: %.txt
+ $(INSTALL_DATA) $< $@
Modified: grass/trunk/display/d.graph/do_graph.c
===================================================================
--- grass/trunk/display/d.graph/do_graph.c 2008-10-02 00:32:10 UTC (rev 33649)
+++ grass/trunk/display/d.graph/do_graph.c 2008-10-02 04:20:48 UTC (rev 33650)
@@ -136,32 +136,30 @@
}
-int do_poly(const char *str, FILE * infile)
+int do_poly(char *buff, FILE * infile)
{
int num;
char origcmd[64];
float xper, yper;
int to_return;
- sscanf(str, "%s", origcmd);
+ sscanf(buff, "%s", origcmd);
num = 0;
for (;;) {
- char buf[128];
-
- if ((to_return = G_getl2(buf, sizeof(buf), infile)) != 1)
+ if ((to_return = G_getl2(buff, 128, infile)) != 1)
break;
- if (2 != sscanf(buf, "%f %f", &xper, &yper)) {
+ if (2 != sscanf(buff, "%f %f", &xper, &yper)) {
- if ('#' == buf[0]) {
- G_debug(3, " skipping comment line [%s]", buf);
+ if ('#' == buff[0]) {
+ G_debug(3, " skipping comment line [%s]", buff);
continue;
}
G_debug(3, "coordinate pair not found. ending polygon. [%s]",
- buf);
+ buff);
break;
}
Modified: grass/trunk/display/d.graph/local_proto.h
===================================================================
--- grass/trunk/display/d.graph/local_proto.h 2008-10-02 00:32:10 UTC (rev 33649)
+++ grass/trunk/display/d.graph/local_proto.h 2008-10-02 04:20:48 UTC (rev 33650)
@@ -9,7 +9,7 @@
int do_move(const char *);
int do_linewidth(const char *);
int do_color(const char *);
-int do_poly(const char *, FILE *);
+int do_poly(char *, FILE *);
int do_size(const char *);
int do_rotate(const char *);
int do_text(const char *);
More information about the grass-commit
mailing list