[GRASS-SVN] r44564 - grass-addons/postscript/ps.output

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 8 17:53:50 EST 2010


Author: hamish
Date: 2010-12-08 14:53:50 -0800 (Wed, 08 Dec 2010)
New Revision: 44564

Modified:
   grass-addons/postscript/ps.output/local_proto.h
   grass-addons/postscript/ps.output/ps3_map.c
   grass-addons/postscript/ps.output/set_draw.c
   grass-addons/postscript/ps.output/set_ps.c
   grass-addons/postscript/ps.output/set_vpoints.c
Log:
fix a number of function prototype and usage errors so it compliles with gcc -Werror-implicit-function-declaration

Modified: grass-addons/postscript/ps.output/local_proto.h
===================================================================
--- grass-addons/postscript/ps.output/local_proto.h	2010-12-08 09:04:52 UTC (rev 44563)
+++ grass-addons/postscript/ps.output/local_proto.h	2010-12-08 22:53:50 UTC (rev 44564)
@@ -14,7 +14,7 @@
 #define DEF_FONT "Helvetica"
 
 /* cat_val.c */
-#ifdef DBMIN_H
+#ifdef GRASS_DBMI_H
 int load_catval_array(VECTOR *, const char *, dbCatValArray *);
 void get_number(dbCatValArray *, int, double *);
 char *get_string(dbCatValArray *, int, int);
@@ -70,7 +70,7 @@
 int error(char *, char *, char *);
 
 /* legends.c */
-#ifdef _LEGENG_H_
+#ifdef _LEGEND_H_
 void set_legend_adjust(LEGEND *, double);
 #endif
 
@@ -86,6 +86,16 @@
 int load_cell(int, char *);
 int load_rgb(char *, char *, char *);
 
+/* palettes.c */
+#ifdef _PSCOLOR_H_
+int analogous(char *, PSCOLOR *, int, double);
+int complementary(char *, PSCOLOR *, int, double);
+int diverging(char *, PSCOLOR *, PSCOLOR *, int);
+int gradient(char *, PSCOLOR *, PSCOLOR *, int, int);
+int PS_str_to_color(char *, PSCOLOR *);
+#endif
+int pure_color(char *, int);
+
 /* paper.c */
 int set_paper(char *);
 
@@ -119,7 +129,7 @@
 #endif
 
 /* r_grid.c */
-#ifdef _GRID_H_
+#ifdef _PSGRID_H_
 int read_grid(GRID *, int);
 #endif
 
@@ -135,6 +145,12 @@
 /* r_note.c */
 int read_note(char *);
 
+/* r_palette.c */
+#ifdef _PSCOLOR_H_
+int monochrome(char *, PSCOLOR *, int);
+#endif
+int read_palette(void);
+
 /* r_paper.c */
 int read_paper(char *);
 
@@ -144,9 +160,15 @@
 /* r_rlegend.c */
 int read_rlegend(char *);
 
+/* r_scalebar.c */
+int read_scalebar(void);
+
 /* r_vareas.c */
 int r_vareas(char *);
 
+/* read_vareas.c */
+int read_vareas(char *);
+
 /* r_vlabels.c */
 int read_vlabels(char *);
 
@@ -156,9 +178,15 @@
 /* r_vlines.c */
 int r_vlines(char *);
 
+/* reqad_vlines.c */
+int read_vlines(char *);
+
 /* r_vpoints.c */
 int r_vpoints(char *);
 
+/* read_vpoints.c */
+int read_vpoints(char *);
+
 /* raster.c */
 int raster_close(void);
 
@@ -178,6 +206,7 @@
 
 /* set_draw.c */
 int set_draw(char *, char *);
+int set_on_paper(char *, char *, char *, char *);
 
 /* set_geogrid.c */
 int set_lines_geogrid(void);
@@ -213,6 +242,9 @@
 int note_int_file(char *);
 int set_note(int);
 
+/* set_outline.c */
+int set_outline(void);
+
 /* set_ps.c */
 void set_ps_rect(double, double, double, double);
 void set_ps_brd(double);
@@ -276,8 +308,10 @@
 /* symbol.c */
 #if defined GRASS_SYMB_H
 int draw_chain(SYMBCHAIN *, double);
+#ifdef _VPOINTS_H_
 int symbol_save(int, VPOINTS *, SYMBOL *);
 #endif
+#endif
 
 /* val_list.c */
 #ifdef GRASS_GIS_H

Modified: grass-addons/postscript/ps.output/ps3_map.c
===================================================================
--- grass-addons/postscript/ps.output/ps3_map.c	2010-12-08 09:04:52 UTC (rev 44563)
+++ grass-addons/postscript/ps.output/ps3_map.c	2010-12-08 22:53:50 UTC (rev 44564)
@@ -50,7 +50,8 @@
 		"    currentdict F0 known {pop pop}\n"
 		"    {findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse } forall\n"
 		"        /Encoding ISOLatin1Encoding def\n"
-		"        /FontName 0 index def\n" "        currentdict end definefont pop} ifelse} D\n");
+		"        /FontName 0 index def\n"
+		"        currentdict end definefont pop} ifelse} D\n");
 	fprintf(PS.fp, "/FS {/FS0 exch def F0 findfont FS0 scalefont setfont} D\n");
     fprintf(PS.fp, "/FE {F0 findfont 3 1 roll 1 index dup /FS0 exch def mul 0 0 4 -1 roll 0 0 6 packedarray makefont setfont} D\n");
 	fprintf(PS.fp, "/FA {currentfont [1 0 0 1.25 0 0] makefont setfont} D\n");
@@ -197,7 +198,7 @@
     /* CLIPED CUSTOM DRAWS */
     if (PS.n_draws > 0)
     {
-	/* fprintf(PS.fp, "0 0 0 C "); /* default color */
+	/* fprintf(PS.fp, "0 0 0 C "); // default color */
 	for (i = 0; i < PS.n_draws; i++)
 	{
 	    if (PS.draw.flag[i] == 0)
@@ -222,7 +223,7 @@
     /* CLIPED CUSTOM DRAWS ONTO ALL MAP ITEMS */
     if (PS.n_draws > 0)
     {
-        /* fprintf(PS.fp, "0 0 0 C "); /* default color */
+        /* fprintf(PS.fp, "0 0 0 C "); // default color */
         for (i = 0; i < PS.n_draws; i++)
         {
             if (PS.draw.flag[i] == 3)

Modified: grass-addons/postscript/ps.output/set_draw.c
===================================================================
--- grass-addons/postscript/ps.output/set_draw.c	2010-12-08 09:04:52 UTC (rev 44563)
+++ grass-addons/postscript/ps.output/set_draw.c	2010-12-08 22:53:50 UTC (rev 44564)
@@ -301,7 +301,7 @@
 	int dg, mn;
 	double conv, sec;
 
-	if (sscanf(data, "%lf %lf %lf %lf", east, north, &d, &conv) != 4)
+	if (sscanf(data, "%lf %lf %lf %lf", &east, &north, &d, &conv) != 4)
 	{
 	    error(key, data, "compass: x, y, radius and magnetic declination");
 	}

Modified: grass-addons/postscript/ps.output/set_ps.c
===================================================================
--- grass-addons/postscript/ps.output/set_ps.c	2010-12-08 09:04:52 UTC (rev 44563)
+++ grass-addons/postscript/ps.output/set_ps.c	2010-12-08 22:53:50 UTC (rev 44564)
@@ -12,9 +12,9 @@
 #include "vareas.h"
 #include "vpoints.h"
 #include "ps_info.h"
+#include "local_proto.h"
 
 
-
 void set_ps_rect(double x, double y, double w, double h)
 {
     fprintf(PS.fp, "%.3f %.3f %.3f %.3f RO\n", x, y, w, h);
@@ -109,7 +109,7 @@
     if (llx == 0. && lly == 0. && urx == 0. && ury == 0.)
     {
 	fclose(fp);
-	error("ERROR:", "", "Bounding box in <%s> was not found\n", eps);
+	error(eps, "", "ERROR: Bounding box in <%s> was not found");
     }
 
     llx *= va->sc_pat;

Modified: grass-addons/postscript/ps.output/set_vpoints.c
===================================================================
--- grass-addons/postscript/ps.output/set_vpoints.c	2010-12-08 09:04:52 UTC (rev 44563)
+++ grass-addons/postscript/ps.output/set_vpoints.c	2010-12-08 22:53:50 UTC (rev 44564)
@@ -114,7 +114,7 @@
 	}
 	else
 	{
-	    rotate = get_number(&rotcv, cat);
+	    get_number(&rotcv, cat, &rotate);
 	}
 	if (rotate > 0.)
 	    fprintf(PS.fp, "%.3f ROT ", rotate);
@@ -183,7 +183,7 @@
     }
     else
     {
-	size = get_number(&cv_size, cat);
+	get_number(&cv_size, cat, &size);
 	size *= vp->scale;
     }
     if (size > 0.)
@@ -195,7 +195,7 @@
     }
     else
     {
-	rotate = get_number(&cv_rot, cat);
+	get_number(&cv_rot, cat, &rotate);
     }
     if (rotate > 0.)
 	fprintf(PS.fp, "%.3f ROT ", rotate);



More information about the grass-commit mailing list