[GRASS-SVN] r44573 - grass-addons/postscript/ps.output
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Dec 9 07:58:24 EST 2010
Author: hamish
Date: 2010-12-09 04:58:24 -0800 (Thu, 09 Dec 2010)
New Revision: 44573
Modified:
grass-addons/postscript/ps.output/cat_val.c
grass-addons/postscript/ps.output/eps.c
grass-addons/postscript/ps.output/format.c
grass-addons/postscript/ps.output/input.c
grass-addons/postscript/ps.output/load_raster.c
grass-addons/postscript/ps.output/local_proto.h
grass-addons/postscript/ps.output/main.c
grass-addons/postscript/ps.output/palettes.c
grass-addons/postscript/ps.output/palettes.h
grass-addons/postscript/ps.output/proj_geo.c
grass-addons/postscript/ps.output/ps3_map.c
grass-addons/postscript/ps.output/ps_info.h
grass-addons/postscript/ps.output/r_block.c
grass-addons/postscript/ps.output/r_draw.c
grass-addons/postscript/ps.output/r_font.c
grass-addons/postscript/ps.output/r_frame.c
grass-addons/postscript/ps.output/r_grid.c
grass-addons/postscript/ps.output/r_line.c
grass-addons/postscript/ps.output/r_maparea.c
grass-addons/postscript/ps.output/r_note.c
grass-addons/postscript/ps.output/r_palette.c
grass-addons/postscript/ps.output/r_paper.c
grass-addons/postscript/ps.output/r_raster.c
grass-addons/postscript/ps.output/r_rlegend.c
grass-addons/postscript/ps.output/r_scalebar.c
grass-addons/postscript/ps.output/r_vareas.c
grass-addons/postscript/ps.output/r_vlabels.c
grass-addons/postscript/ps.output/r_vlegend.c
grass-addons/postscript/ps.output/r_vlines.c
grass-addons/postscript/ps.output/r_vpoints.c
grass-addons/postscript/ps.output/scanners.c
grass-addons/postscript/ps.output/set_draw.c
grass-addons/postscript/ps.output/set_geogrid.c
grass-addons/postscript/ps.output/set_grid.c
grass-addons/postscript/ps.output/set_mask.c
grass-addons/postscript/ps.output/set_note.c
grass-addons/postscript/ps.output/set_outline.c
grass-addons/postscript/ps.output/set_ps.c
grass-addons/postscript/ps.output/set_raster.c
grass-addons/postscript/ps.output/set_rlegend.c
grass-addons/postscript/ps.output/set_scalebar.c
grass-addons/postscript/ps.output/set_vareas.c
grass-addons/postscript/ps.output/set_vector.c
grass-addons/postscript/ps.output/set_vlabels.c
grass-addons/postscript/ps.output/set_vlegend.c
grass-addons/postscript/ps.output/set_vlines.c
grass-addons/postscript/ps.output/set_vpoints.c
grass-addons/postscript/ps.output/start_map.c
grass-addons/postscript/ps.output/symbol.c
grass-addons/postscript/ps.output/val_list.c
Log:
fix bad indents from v2.2.10
Modified: grass-addons/postscript/ps.output/cat_val.c
===================================================================
--- grass-addons/postscript/ps.output/cat_val.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/cat_val.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -20,9 +20,7 @@
dbCatValArray * cvarr)
{
int n_records;
-
struct field_info *Fi;
-
dbDriver *driver;
db_CatValArray_init(cvarr);
@@ -56,7 +54,6 @@
void get_number(dbCatValArray * cvarr, int cat, double *d)
{
int ret, int_val;
-
dbCatVal *cv = NULL;
*d = -1.;
@@ -89,11 +86,8 @@
char *get_string(dbCatValArray * cvarr, int cat, int dec)
{
int ret, int_val;
-
double double_val;
-
dbCatVal *cv = NULL;
-
char buf[10], *str = NULL;
if (cvarr->ctype == DB_C_TYPE_STRING) {
Modified: grass-addons/postscript/ps.output/eps.c
===================================================================
--- grass-addons/postscript/ps.output/eps.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/eps.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -18,9 +18,7 @@
int eps_bbox(char *eps, double *llx, double *lly, double *urx, double *ury)
{
char buf[201];
-
FILE *fp;
-
int v1, v2, v3, v4;
/* test if file is realy eps and find bbox */
@@ -72,7 +70,6 @@
int eps_save(FILE * fp, char *epsf, char *name)
{
char buf[1024];
-
FILE *epsfp;
if ((epsfp = fopen(epsf, "r")) == NULL)
@@ -111,7 +108,6 @@
double rotate)
{
char buf[1024];
-
FILE *epsfp;
if ((epsfp = fopen(eps, "r")) == NULL)
@@ -138,7 +134,6 @@
int pat_save(FILE * fp, char *epsf, char *name)
{
char buf[1024];
-
FILE *epsfp;
if ((epsfp = fopen(epsf, "r")) == NULL)
Modified: grass-addons/postscript/ps.output/format.c
===================================================================
--- grass-addons/postscript/ps.output/format.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/format.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -17,9 +17,7 @@
void format_northing(double north, char *buf, int map_proj)
{
char h;
-
int d, m;
-
double s;
if (map_proj == PROJECTION_LL) {
@@ -49,9 +47,7 @@
void format_easting(double east, char *buf, int map_proj)
{
char h;
-
int d, m;
-
double s;
if (map_proj == PROJECTION_LL) {
@@ -82,9 +78,7 @@
void format_iho(double value, char *buf)
{
char h;
-
int d, m;
-
double s;
if (PS.map.proj == PROJECTION_LL) {
Modified: grass-addons/postscript/ps.output/input.c
===================================================================
--- grass-addons/postscript/ps.output/input.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/input.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -19,7 +19,6 @@
int input(int level, char *buf)
{
int i;
-
char command[20], empty[3];
if (level && isatty(fileno(inputfd)))
Modified: grass-addons/postscript/ps.output/load_raster.c
===================================================================
--- grass-addons/postscript/ps.output/load_raster.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/load_raster.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -37,9 +37,7 @@
int load_group(char *name)
{
int i;
-
struct Ref ref;
-
char fullname[100];
/* close open rasters */
@@ -92,7 +90,6 @@
int load_cell(int slot, char *name)
{
char *mapset, *ptr;
-
char fullname[100];
/* close raster cell, if any */
Modified: grass-addons/postscript/ps.output/local_proto.h
===================================================================
--- grass-addons/postscript/ps.output/local_proto.h 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/local_proto.h 2010-12-09 12:58:24 UTC (rev 44573)
@@ -16,80 +16,58 @@
/* cat_val.c */
#ifdef GRASS_DBMI_H
int load_catval_array(VECTOR *, const char *, dbCatValArray *);
-
void get_number(dbCatValArray *, int, double *);
-
char *get_string(dbCatValArray *, int, int);
#endif
/* colors.c */
#ifdef _PSCOLOR_H_
int set_color_name(PSCOLOR *, char *);
-
void set_color_rgb(PSCOLOR *, int, int, int);
-
void set_color_pscolor(PSCOLOR *, PSCOLOR *);
-
void unset_color(PSCOLOR *);
-
int set_ps_color(PSCOLOR *);
-
int set_ps_grey(PSCOLOR *);
-
long color_to_long(PSCOLOR *);
-
int long_to_color(long, PSCOLOR *);
#endif
/* eps.c */
int eps_bbox(char *, double *, double *, double *, double *);
-
int eps_trans(double, double, double, double, double, double, double, double,
double *, double *);
#ifdef _STDIO_H
int eps_save(FILE *, char *, char *);
-
int eps_draw_saved(FILE *, char *, double, double, double, double);
-
int eps_draw(FILE *, char *, double, double, double, double);
-
int pat_save(FILE *, char *, char *);
#endif
/* fonts.c */
#ifdef _PSFONT_H_
double set_ps_font(PSFONT *);
-
double set_ps_font_nocolor(PSFONT *);
#endif
/* format.c */
void format_northing(double, char *, int);
-
void format_easting(double, char *, int);
-
void format_iho(double, char *);
/* frames.c */
#ifdef _PSFRAME_H_
void set_box_orig(PSFRAME *);
-
void set_box_size(PSFRAME *, double, double);
-
void set_box_draw(PSFRAME *);
-
void set_box_auto(PSFRAME *, PSFONT *, double);
#endif
void set_inner_readjust_title(const char *);
-
void set_inner_readjust(double, double, double, double);
/* input.c */
int input(int, char *);
-
int key_data(char *, char **, char **);
-
int error(char *, char *, char *);
/* legends.c */
@@ -100,29 +78,21 @@
/* lines.c */
#ifdef _PSLINE_H_
int set_ps_linewidth(double);
-
int set_ps_line(PSLINE *);
-
int set_ps_line_no_color(PSLINE *);
#endif
/* load_raster.c */
int load_group(char *);
-
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);
@@ -136,7 +106,6 @@
/* proj_geo.c */
#ifdef _GPROJECTS_H
void init_proj(struct pj_info *, struct pj_info *);
-
int find_limits(double *, double *, double *, double *, struct pj_info *,
struct pj_info *);
#endif
@@ -152,14 +121,12 @@
#ifdef _PSFONT_H_
int default_font(PSFONT *);
-
int read_font(char *, PSFONT *);
#endif
/* r_frame.c */
#ifdef _PSFRAME_H_
int default_frame(PSFRAME *, int, int);
-
int read_frame(PSFRAME *);
#endif
@@ -171,7 +138,6 @@
/* r_line.c */
#ifdef _PSLINE_H_
int default_psline(PSLINE *);
-
int read_psline(char *, PSLINE *);
#endif
@@ -228,19 +194,12 @@
/* scanners.c */
int scan_easting(char *, double *);
-
int scan_northing(char *, double *);
-
int scan_resolution(char *, double *);
-
int scan_percent(char *, double *, double, double);
-
int scan_ref(char *, int *, int *);
-
int scan_yesno(char *, char *);
-
int scan_dimen(char *, double *);
-
int scan_second(char *, double *);
#ifdef _PSCOLOR_H_
@@ -249,43 +208,33 @@
/* set_draw.c */
int set_draw(char *, char *);
-
int set_on_paper(char *, char *, char *, char *);
/* set_geogrid.c */
int set_lines_geogrid(void);
-
int set_numbers_geogrid(void);
#ifdef _PSLINE_H_
int set_geogrid_lines(PSLINE *, int);
#endif
int set_geogrid_inner_numbers(void);
-
int set_geogrid_outer_numbers(void);
/* set_grid.c */
int set_lines_grid(void);
-
int set_numbers_grid(void);
#ifdef _PSLINE_H_
int set_grid_lines(char, PSLINE *, int);
#endif
int set_grid_inner_numbers(void);
-
int set_grid_outer_numbers(int);
-
int set_grid_iho_numbers(double, double);
-
int set_grid_can_numbers(double, double);
void set_grid_minordiv_border(int, double, double);
-
void set_grid_minor_border(double, double, double);
-
void set_grid_major_border(double, double);
-
void set_grid_corners(double, double);
/* set_mask.c */
@@ -293,7 +242,6 @@
/* set_note.c */
int note_int_file(char *);
-
int set_note(int);
/* set_outline.c */
@@ -301,15 +249,10 @@
/* set_ps.c */
void set_ps_rect(double, double, double, double);
-
void set_ps_brd(double);
-
void set_ps_brd2(double, double);
-
int set_ps_where(char, double, double);
-
int set_xy_where(char *, double, double, char *);
-
int set_ps_symbol_eps(int, char *);
#ifdef _VECTOR_H_
@@ -318,25 +261,18 @@
/* set_raster.c */
int set_raster(void);
-
int set_raster_cell(void);
-
int set_raster_rgb(void);
-
int set_raster_maskcell(void);
-
int set_raster_maskcolor(void);
/* set_rlegend.c */
int set_rlegend_cats(void);
-
int set_rlegend_gradient(void);
-
static double nice_step(double, int, int *);
/* set_scalebar.c */
char *strnumber(double);
-
int set_scalebar(void);
/* set_vector.c */
@@ -345,7 +281,6 @@
#ifdef GRASS_VECT_H
/* set_vareas.c */
int set_vareas(VECTOR *, VAREAS *);
-
int set_vareas_line(VECTOR *, VAREAS *);
/* set_vlabels.c */
@@ -353,27 +288,19 @@
/* set_vlegend.c */
int set_vlegend(void);
-
int set_vlegend_simple(int, const int *, int);
-
int set_vlegend_multi(int, VECTOR *);
-
void make_vareas(VECTOR *, int);
-
void make_vlines(VECTOR *, int);
-
void make_vpoints(VECTOR *, int);
-
void set_vlegend_ps(int, int, int);
/* set_vlines.c */
int set_vlines(VECTOR *, VLINES *, int);
-
int vector_line(struct line_pnts *);
/* set_vpoints.c */
int set_vpoints(VECTOR *, VPOINTS *);
-
int set_vpoints_line(VECTOR *, VPOINTS *);
#endif
@@ -392,26 +319,20 @@
/* val_list.c */
#ifdef GRASS_GIS_H
int parse_val_list(char *, DCELL **);
-
int sort_list(char *, int, CELL **);
#endif
/* vector.c */
int vector_new(void);
-
int default_vector(int);
#ifdef _VECTOR_H_
int vector_item_new(VECTOR *, double, long);
-
int vector_rule_find(VECTOR *, double);
-
int vector_rule_new(VECTOR *, char *, char *, double);
#endif
/* vlegend.c */
int vlegend_block_new(void);
-
void vlegend_block_adjust(int, const char *);
-
void vlegend_block_reload(int);
Modified: grass-addons/postscript/ps.output/main.c
===================================================================
--- grass-addons/postscript/ps.output/main.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/main.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -31,11 +31,8 @@
int main(int argc, char *argv[])
{
struct Option *input_file;
-
struct Option *output_file;
-
struct GModule *module;
-
struct Flag *draft, *eps, *ghost, *style;
G_gisinit(argv[0]);
@@ -143,12 +140,10 @@
/* process options */
char buf[1024];
-
double number;
while (input(1, buf)) {
char *key;
-
char *data;
if (!key_data(buf, &key, &data)) {
Modified: grass-addons/postscript/ps.output/palettes.c
===================================================================
--- grass-addons/postscript/ps.output/palettes.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/palettes.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -17,7 +17,6 @@
#include "palettes.h"
void RGB_HSV(PSCOLOR *, PALETTE *);
-
void HSV_RGB(PALETTE *, PSCOLOR *);
@@ -60,7 +59,6 @@
int pure_color(char *name, int div)
{
int i, k;
-
double step;
/* alloc memory */
@@ -83,7 +81,6 @@
int gray(char *name, int div)
{
int i, k;
-
double step;
/* alloc memory */
@@ -105,9 +102,7 @@
int monochrome(char *name, PSCOLOR * rgb, int div)
{
int i, k;
-
double step;
-
PALETTE hsv;
if (rgb->r == rgb->g && rgb->g == rgb->b) {
@@ -124,7 +119,6 @@
for (i = 0; i < div; i++, k++) {
Palette[k].h = hsv.h;
Palette[k].s = (double)i *step;
-
Palette[k].v = 1. + (double)i *step * (hsv.v - 1.); /* if pure v = 1. */
sprintf(Palette[k].name, "%s%d", name, i + 1);
@@ -137,9 +131,7 @@
int complementary(char *name, PSCOLOR * rgb, int div, double sector)
{
int i, k;
-
double step;
-
PALETTE hsv;
RGB_HSV(rgb, &hsv);
@@ -172,9 +164,7 @@
int analogous(char *name, PSCOLOR * rgb, int div, double sector)
{
int i, k;
-
double step;
-
PALETTE hsv;
RGB_HSV(rgb, &hsv);
@@ -206,9 +196,7 @@
int gradient(char *name, PSCOLOR * A, PSCOLOR * B, int div, int pure)
{
int i, k;
-
double h_step, s_step, v_step;
-
PALETTE pal_A, pal_B;
RGB_HSV(A, &pal_A);
@@ -229,9 +217,7 @@
for (i = 0; i < div; i++, k++) {
Palette[k].h = pal_A.h + (double)i *h_step;
-
Palette[k].s = pure ? 1. : pal_A.s + (double)i *s_step;
-
Palette[k].v = pure ? 1. : pal_A.v + (double)i *v_step;
if (Palette[k].h < 0.)
@@ -248,9 +234,7 @@
int diverging(char *name, PSCOLOR * A, PSCOLOR * B, int div)
{
int i, k;
-
double h_step, v_step, tmp;
-
PALETTE pal_A, pal_B;
RGB_HSV(A, &pal_A);
@@ -297,7 +281,6 @@
void RGB_HSV(PSCOLOR * col, PALETTE * pal)
{
double min, max, delta;
-
int r_max = 1, b_max = 0;
min = max = col->r;
@@ -363,7 +346,6 @@
}
double f, p, q, t;
-
int i;
// f = modf(pal->h * 60, &t);
Modified: grass-addons/postscript/ps.output/palettes.h
===================================================================
--- grass-addons/postscript/ps.output/palettes.h 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/palettes.h 2010-12-09 12:58:24 UTC (rev 44573)
@@ -20,11 +20,9 @@
#ifdef MAIN
PALETTE *Palette;
-
int ncolors;
#else
extern PALETTE *Palette;
-
extern int ncolors;
#endif
Modified: grass-addons/postscript/ps.output/proj_geo.c
===================================================================
--- grass-addons/postscript/ps.output/proj_geo.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/proj_geo.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -50,7 +50,6 @@
struct pj_info *xy_proj)
{
int x, y;
-
double d, z;
/* West */
Modified: grass-addons/postscript/ps.output/ps3_map.c
===================================================================
--- grass-addons/postscript/ps.output/ps3_map.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/ps3_map.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -23,7 +23,6 @@
int PS3_map(void)
{
int i, j;
-
double d;
/* PostScript header */
Modified: grass-addons/postscript/ps.output/ps_info.h
===================================================================
--- grass-addons/postscript/ps.output/ps_info.h 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/ps_info.h 2010-12-09 12:58:24 UTC (rev 44573)
@@ -82,10 +82,8 @@
#ifdef MAIN
struct PS3_info PS;
-
int sec_draw; /* used in PS_plot */
#else
extern struct PS3_info PS;
-
extern int sec_draw;
#endif
Modified: grass-addons/postscript/ps.output/r_block.c
===================================================================
--- grass-addons/postscript/ps.output/r_block.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_block.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -20,7 +20,6 @@
int read_block(int i)
{
char buf[1024];
-
char *key, *data;
G_debug(1, "Reading legend settings ..");
Modified: grass-addons/postscript/ps.output/r_draw.c
===================================================================
--- grass-addons/postscript/ps.output/r_draw.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_draw.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -22,9 +22,7 @@
int read_draw(char *name)
{
char buf[1024];
-
char *key, *data;
-
int type = 0;
G_debug(1, "Reading draw settings ..");
Modified: grass-addons/postscript/ps.output/r_font.c
===================================================================
--- grass-addons/postscript/ps.output/r_font.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_font.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -55,7 +55,6 @@
int read_font(char *arg, PSFONT * font)
{
char buf[1024];
-
char *key, *data;
G_debug(1, "Reading font settings ..");
Modified: grass-addons/postscript/ps.output/r_frame.c
===================================================================
--- grass-addons/postscript/ps.output/r_frame.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_frame.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -36,7 +36,6 @@
int read_frame(PSFRAME * box)
{
char buf[1024];
-
char *key, *data;
G_debug(1, "Reading frame settings ..");
Modified: grass-addons/postscript/ps.output/r_grid.c
===================================================================
--- grass-addons/postscript/ps.output/r_grid.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_grid.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -21,7 +21,6 @@
int read_grid(GRID * grid, int type)
{
char buf[1024];
-
char *key, *data;
G_debug(1, "Reading grid settings ..");
Modified: grass-addons/postscript/ps.output/r_line.c
===================================================================
--- grass-addons/postscript/ps.output/r_line.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_line.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -31,9 +31,7 @@
int read_psline(char *arg, PSLINE * line)
{
char buf[1024];
-
char *key, *data;
-
char i, dash[31];
G_debug(1, "Reading line settings ..");
@@ -70,7 +68,6 @@
}
if (KEY("style")) {
char str[50];
-
int x, o;
x = sscanf(data, "%s %s", str, &o);
Modified: grass-addons/postscript/ps.output/r_maparea.c
===================================================================
--- grass-addons/postscript/ps.output/r_maparea.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_maparea.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -21,9 +21,7 @@
int read_maparea(void)
{
char buf[1024];
-
char *key, *data;
-
double point;
G_debug(1, "Reading maparea settings ..");
Modified: grass-addons/postscript/ps.output/r_note.c
===================================================================
--- grass-addons/postscript/ps.output/r_note.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_note.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -22,7 +22,6 @@
int read_note(char *name)
{
char buf[1024];
-
char *key, *data;
G_debug(1, "Reading note settings ..");
Modified: grass-addons/postscript/ps.output/r_palette.c
===================================================================
--- grass-addons/postscript/ps.output/r_palette.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_palette.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -26,13 +26,9 @@
int read_palette(void)
{
char buf[1024];
-
char *key, *data;
-
int i;
-
char name[50];
-
PSCOLOR color, colorb;
G_debug(1, "Reading palette settings ..");
Modified: grass-addons/postscript/ps.output/r_paper.c
===================================================================
--- grass-addons/postscript/ps.output/r_paper.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_paper.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -18,11 +18,8 @@
int read_paper(char *arg)
{
char buf[1024];
-
char *key, *data;
-
int do_landscape;
-
double point;
G_debug(1, "Reading paper settings ..");
Modified: grass-addons/postscript/ps.output/r_raster.c
===================================================================
--- grass-addons/postscript/ps.output/r_raster.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_raster.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -20,11 +20,8 @@
int read_raster(char *arg)
{
char buf[1024];
-
char *key, *data;
-
char name[3][100];
-
int ret;
G_debug(1, "Reading raster settings ..");
@@ -96,11 +93,8 @@
}
if (KEY("setcolor")) {
int i, count, R, G, B;
-
PSCOLOR color;
-
DCELL *val_list, dmin, dmax;
-
char colorbuf[100], catsbuf[100];
/* set color inline */
Modified: grass-addons/postscript/ps.output/r_rlegend.c
===================================================================
--- grass-addons/postscript/ps.output/r_rlegend.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_rlegend.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -20,9 +20,7 @@
int read_rlegend(char *arg)
{
char buf[1024];
-
char *key, *data, *mapset;
-
double dimen;
G_debug(1, "Reading rlegend settings ..");
Modified: grass-addons/postscript/ps.output/r_scalebar.c
===================================================================
--- grass-addons/postscript/ps.output/r_scalebar.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_scalebar.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -23,7 +23,6 @@
int read_scalebar(void)
{
char buf[1024];
-
char *key, *data;
G_debug(1, "Reading scalebar settings ..");
@@ -110,7 +109,6 @@
}
if (KEY("units")) {
int ret;
-
char stra[50], strb[50];
G_strip(data);
Modified: grass-addons/postscript/ps.output/r_vareas.c
===================================================================
--- grass-addons/postscript/ps.output/r_vareas.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_vareas.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -21,11 +21,8 @@
int read_vareas(char *name)
{
int i;
-
char buf[1024];
-
char *key, *data, *mapset;
-
VAREAS *vector = NULL;
G_debug(1, "Reading vareas settings ..");
@@ -83,7 +80,6 @@
}
if (KEY("fcolor")) {
char stra[50], strb[50];
-
int ret = sscanf(data, "%s %[^\n]", stra, strb);
if (ret == 1 || ret == 2) {
@@ -165,7 +161,6 @@
}
if (KEY("setrule")) {
double val;
-
char str[128], catsbuf[128], labelbuf[128];
if (sscanf(data, "%s %[^\n]", str, labelbuf) > 0) {
Modified: grass-addons/postscript/ps.output/r_vlabels.c
===================================================================
--- grass-addons/postscript/ps.output/r_vlabels.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_vlabels.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -21,11 +21,8 @@
int read_vlabels(char *name)
{
int i;
-
char buf[1024];
-
char *key, *data, *mapset;
-
VLABELS *vector;
Modified: grass-addons/postscript/ps.output/r_vlegend.c
===================================================================
--- grass-addons/postscript/ps.output/r_vlegend.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_vlegend.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -19,7 +19,6 @@
int read_vlegend(char *arg)
{
char buf[1024];
-
char *key, *data;
Modified: grass-addons/postscript/ps.output/r_vlines.c
===================================================================
--- grass-addons/postscript/ps.output/r_vlines.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_vlines.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -21,11 +21,8 @@
int read_vlines(char *name)
{
int i;
-
char buf[1024];
-
char *key, *data, *mapset;
-
VLINES *vector;
@@ -86,9 +83,7 @@
}
if (KEY("rgbcol")) {
double alpha;
-
char stra[50], strb[50];
-
int ret = sscanf(data, "%s %[^\n]", stra, strb);
if (ret != 1 && ret != 2) {
Modified: grass-addons/postscript/ps.output/r_vpoints.c
===================================================================
--- grass-addons/postscript/ps.output/r_vpoints.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/r_vpoints.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -21,11 +21,8 @@
int read_vpoints(char *name)
{
int i;
-
char buf[1024];
-
char *key, *data, *mapset;
-
VPOINTS *vector;
@@ -220,7 +217,6 @@
}
if (KEY("setrule")) {
double val;
-
char str[128], catsbuf[128], labelbuf[128];
if (sscanf(data, "%s %[^\n]", str, labelbuf) > 0) {
Modified: grass-addons/postscript/ps.output/scanners.c
===================================================================
--- grass-addons/postscript/ps.output/scanners.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/scanners.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -79,9 +79,7 @@
int scan_color(char *data, PSCOLOR * color)
{
int ret;
-
char name[20];
-
double alpha;
ret = sscanf(data, "%[^$]$%lf", name, &alpha);
@@ -98,7 +96,6 @@
int scan_dimen(char *data, double *d)
{
int ret;
-
char unit = ' ';
ret = sscanf(data, "%lf%c", d, &unit);
@@ -133,7 +130,6 @@
int scan_second(char *data, double *d)
{
int ret;
-
char unit = ' ';
ret = sscanf(data, "%lf%c", d, &unit);
Modified: grass-addons/postscript/ps.output/set_draw.c
===================================================================
--- grass-addons/postscript/ps.output/set_draw.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_draw.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -27,13 +27,9 @@
int set_draw(char *key, char *data)
{
char h, label[100], buf[256];
-
char e1[20], n1[20], e2[20], n2[20];
-
int i, x, y, dg, mg;
-
double east, north, lw, d, sg;
-
PSCOLOR color;
if (KEY("direct")) {
@@ -265,9 +261,7 @@
}
else if (KEY("compass") || KEY("rose")) {
char h;
-
int dg, mn;
-
double conv, sec;
if (sscanf(data, "%lf %lf %lf %lf", &east, &north, &d, &conv) != 4) {
@@ -306,15 +300,10 @@
void label_in_file(char *name)
{
FILE *in = NULL;
-
char buf[1024], code[1024], data[1024];
-
int x, y;
-
double n;
-
PSFRAME frame;
-
PSFONT font;
frame.xref = CENTER;
@@ -422,9 +411,7 @@
int set_on_paper(char *pre, char *c_x, char *c_y, char *post)
{
char xunit, yunit;
-
int xret, yret, x, y;
-
double dx, dy;
xret = sscanf(c_x, "%lf%c", &dx, &xunit);
Modified: grass-addons/postscript/ps.output/set_geogrid.c
===================================================================
--- grass-addons/postscript/ps.output/set_geogrid.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_geogrid.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -34,9 +34,7 @@
int set_geogrid_lines(PSLINE * line, int grid_sep)
{
double sep, n_min, nmin, e_min, emin;
-
double e, n, east, west, north, south;
-
struct pj_info ll_proj, proj;
if (PS.geogrid.sep <= 0 || PS.geogrid.line.color.none)
@@ -92,15 +90,10 @@
int set_numbers_geogrid(void)
{
char label[50];
-
int i, x, y;
-
double dx, dy;
-
double grid_sep, nmin, emin, dif;
-
double e, n, east, west, north, south;
-
struct pj_info ll_proj, proj;
if (PS.geogrid.sep <= 0)
Modified: grass-addons/postscript/ps.output/set_grid.c
===================================================================
--- grass-addons/postscript/ps.output/set_grid.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_grid.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -33,9 +33,7 @@
int set_grid_lines(char code, PSLINE * line, int grid_sep)
{
char label[50], h;
-
int i, x, y, zero, d, m;
-
double sep, north, west, dx, dy, s;
if (grid_sep <= 0)
@@ -145,7 +143,6 @@
if (PS.grid.msep > 0) {
if (PS.grid.msubdiv >= 0) {
double mrga = 0.4 * PS.brd.width - .2 * MM_TO_POINT;
-
double mrgb = 0.6 * PS.brd.width - .2 * MM_TO_POINT;
set_grid_minordiv_border(PS.grid.msubdiv, .2 * MM_TO_POINT,
Modified: grass-addons/postscript/ps.output/set_mask.c
===================================================================
--- grass-addons/postscript/ps.output/set_mask.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_mask.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -19,9 +19,7 @@
int set_mask(void)
{
int i, byte, row, col, br;
-
void *cbuf, *cptr;
-
RASTER_MAP_TYPE map_type;
static int bit[] = { 128, 64, 32, 16, 8, 4, 2, 1 };
Modified: grass-addons/postscript/ps.output/set_note.c
===================================================================
--- grass-addons/postscript/ps.output/set_note.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_note.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -21,9 +21,7 @@
int set_note(int i)
{
int rows, type;
-
double x, y, dy, fontsize;
-
char *chr, *str, txt[1024];
rows = 0; /* useful to decide if write it */
@@ -138,9 +136,7 @@
int note_in_file(char *name)
{
FILE *in = NULL;
-
char buf[1024];
-
int r = 0;
if (*name) {
Modified: grass-addons/postscript/ps.output/set_outline.c
===================================================================
--- grass-addons/postscript/ps.output/set_outline.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_outline.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -18,11 +18,8 @@
int set_outline(void)
{
int row, col;
-
double nrow, n_rw, erow, e_rw;
-
void *rbuf, *nbuf, *rptr, *nptr, *next;
-
RASTER_MAP_TYPE map_type;
/* let user know what's happenning */
Modified: grass-addons/postscript/ps.output/set_ps.c
===================================================================
--- grass-addons/postscript/ps.output/set_ps.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_ps.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -42,7 +42,6 @@
int set_ps_where(char action, double east, double north)
{
int x, y;
-
double dx, dy;
G_plot_where_xy(east, north, &x, &y);
@@ -60,7 +59,6 @@
int set_xy_where(char *pre, double east, double north, char *post)
{
int x, y;
-
double dx, dy;
G_plot_where_xy(east, north, &x, &y);
@@ -75,7 +73,6 @@
int is_xy_outside(double east, double north)
{
int x, y;
-
double dx, dy;
G_plot_where_xy(east, north, &x, &y);
@@ -96,11 +93,8 @@
int set_ps_pattern(int code, char *eps, VAREAS * va)
{
FILE *fp;
-
char buf[1024];
-
int ret = 0;
-
double llx, lly, urx, ury;
if ((fp = fopen(eps, "r")) == NULL) {
@@ -155,7 +149,6 @@
int set_ps_symbol_eps(int code, char *eps)
{
FILE *fp;
-
char buf[1024];
if ((fp = fopen(eps, "r")) == NULL) {
Modified: grass-addons/postscript/ps.output/set_raster.c
===================================================================
--- grass-addons/postscript/ps.output/set_raster.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_raster.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -102,9 +102,7 @@
int set_raster_cell(void)
{
int row, col, br, R, G, B;
-
void *cbuf, *cptr;
-
RASTER_MAP_TYPE map_type;
@@ -145,11 +143,8 @@
int set_raster_rgb(void)
{
int i, row, col, br;
-
int R[3], G[3], B[3];
-
void *cbuf[3], *cptr[3];
-
RASTER_MAP_TYPE map_type[3];
@@ -206,13 +201,9 @@
int set_raster_maskcell(void)
{
int i, row, col, br;
-
int r, g, b, R[3], G[3], B[3];
-
double f, red, green, blue;
-
void *cbuf[3], *cptr[3];
-
RASTER_MAP_TYPE map_type[3];
red = (1. - PS.rst.mask_color.r);
@@ -295,11 +286,8 @@
int set_raster_maskcolor(void)
{
int i, row, col, br;
-
int color, r, g, b, R, G, B;
-
void *cbuf[2], *cptr[2];
-
RASTER_MAP_TYPE map_type[2];
if (PS.rst.mask_color.none) {
Modified: grass-addons/postscript/ps.output/set_rlegend.c
===================================================================
--- grass-addons/postscript/ps.output/set_rlegend.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_rlegend.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -20,13 +20,9 @@
int set_rlegend_cats(void)
{
int i, j, k, n, R, G, B;
-
char *label;
-
int num_cats, rows, cols;
-
double fontsize, fwidth;
-
DCELL dmin, dmax, val;
/* Let user know what's happenning */
@@ -186,19 +182,12 @@
int set_rlegend_gradient(void)
{
int i, k, rows, nlines, dec;
-
int R, G, B;
-
DCELL dmin, dmax, val;
-
double fontsize, step, fwidth;
-
struct Colors colors;
-
struct FPRange range;
-
char *units[GNAME_MAX];
-
char format[50];
/* let user know what's happenning */
Modified: grass-addons/postscript/ps.output/set_scalebar.c
===================================================================
--- grass-addons/postscript/ps.output/set_scalebar.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_scalebar.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -12,7 +12,6 @@
int set_scalebar(void)
{
int i, j;
-
double width, segment;
if (PS.sbar.length <= 0 || PS.sbar.segments <= 0)
Modified: grass-addons/postscript/ps.output/set_vareas.c
===================================================================
--- grass-addons/postscript/ps.output/set_vareas.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_vareas.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -46,13 +46,9 @@
int set_vareas(VECTOR * vec, VAREAS * va)
{
int k, ret, cat;
-
int area, nareas, island, nislands, centroid;
-
struct line_cats *lcats;
-
struct line_pnts *lpoints;
-
BOUND_BOX box;
nareas = Vect_get_num_areas(&(vec->Map));
@@ -172,13 +168,9 @@
int set_vareas_line(VECTOR * vec, VAREAS * va)
{
int ret, cat;
-
int ln, nlines, pt, npoints;
-
double width;
-
struct line_cats *lcats;
-
struct line_pnts *lpoints;
Modified: grass-addons/postscript/ps.output/set_vector.c
===================================================================
--- grass-addons/postscript/ps.output/set_vector.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_vector.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -23,7 +23,6 @@
int set_vector(int masked, int type)
{
int i;
-
char buf[1024];
for (i = PS.vct_files - 1; i >= 0; i--) {
@@ -66,7 +65,6 @@
}
else if (PS.vct[i].type == POINTS) {
SYMBOL *symb;
-
VPOINTS *vp = (VPOINTS *) PS.vct[i].data;
symb = S_read(vp->symbol);
Modified: grass-addons/postscript/ps.output/set_vlabels.c
===================================================================
--- grass-addons/postscript/ps.output/set_vlabels.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_vlabels.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -22,11 +22,8 @@
int set_vlabels(VECTOR * vec, VLABELS * vx)
{
int ret, cat;
-
int x, y, pt, npoints;
-
struct line_cats *lcats;
-
struct line_pnts *lpoints;
npoints = Vect_get_num_lines(&(vec->Map));
Modified: grass-addons/postscript/ps.output/set_vlegend.c
===================================================================
--- grass-addons/postscript/ps.output/set_vlegend.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_vlegend.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -195,7 +195,6 @@
void make_vareas(VECTOR * vec, int rows)
{
int i, item;
-
VAREAS *va = (VAREAS *) vec->data;
/* Set the title of the vector */
@@ -259,7 +258,6 @@
void make_vlines(VECTOR * vec, int rows)
{
int i, item;
-
VLINES *vl = (VLINES *) vec->data;
/* Set the title of the vector */
@@ -312,7 +310,6 @@
void make_vpoints(VECTOR * vec, int rows)
{
int i, item;
-
VPOINTS *vp = (VPOINTS *) vec->data;
/* Set the title of the vector */
Modified: grass-addons/postscript/ps.output/set_vlines.c
===================================================================
--- grass-addons/postscript/ps.output/set_vlines.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_vlines.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -39,11 +39,8 @@
int set_vlines(VECTOR * vec, VLINES * vl, int flag)
{
int ret, cat;
-
int ln, nlines, pt, npoints;
-
struct line_cats *lcats;
-
struct line_pnts *lpoints;
@@ -104,7 +101,6 @@
if (flag == DRAW_HLINE) {
if (vl->offset != 0.) {
double dis;
-
struct line_pnts *opoints = Vect_new_line_struct();
/* perhaps dont run in Lat/Lon */
Modified: grass-addons/postscript/ps.output/set_vpoints.c
===================================================================
--- grass-addons/postscript/ps.output/set_vpoints.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/set_vpoints.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -22,13 +22,9 @@
int set_vpoints(VECTOR * vec, VPOINTS * vp)
{
int ret, cat;
-
int pt, npoints;
-
double tmp, size, rotate;
-
struct line_cats *lcats;
-
struct line_pnts *lpoints;
npoints = Vect_get_num_lines(&(vec->Map));
@@ -127,13 +123,9 @@
int set_vpoints_line(VECTOR * vec, VPOINTS * vp)
{
int ret, cat;
-
double size, rotate;
-
int ln, nlines, pt, npoints;
-
struct line_cats *lcats;
-
struct line_pnts *lpoints;
Modified: grass-addons/postscript/ps.output/start_map.c
===================================================================
--- grass-addons/postscript/ps.output/start_map.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/start_map.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -16,13 +16,11 @@
#include "conversion.h"
int move_local(int x, int y);
-
int cont_local(int x, int y);
int start_map(void)
{
double width, height;
-
double fact, d_ns, ns, d_ew, ew;
/* default position */
Modified: grass-addons/postscript/ps.output/symbol.c
===================================================================
--- grass-addons/postscript/ps.output/symbol.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/symbol.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -14,9 +14,7 @@
int draw_chain(SYMBCHAIN * chain, double s)
{
int k, l;
-
char *mvcmd;
-
SYMBEL *elem;
for (k = 0; k < chain->count; k++) {
@@ -52,11 +50,8 @@
int symbol_save(int code, VPOINTS * vp, SYMBOL * Symb)
{
SYMBPART *part;
-
SYMBCHAIN *chain;
-
int i, j, points;
-
double s, xo[4], yo[4];
points = 4;
Modified: grass-addons/postscript/ps.output/val_list.c
===================================================================
--- grass-addons/postscript/ps.output/val_list.c 2010-12-09 10:39:12 UTC (rev 44572)
+++ grass-addons/postscript/ps.output/val_list.c 2010-12-09 12:58:24 UTC (rev 44573)
@@ -14,9 +14,7 @@
int sort_list(char *order, int items, CELL ** item)
{
int i, j, k, count, tmp;
-
CELL *ip, val;
-
DCELL *vlist;
/* initial order */
@@ -73,9 +71,7 @@
int parse_val_list(char *buf, DCELL ** list)
{
int count;
-
DCELL a, b;
-
DCELL *lp;
count = 0;
More information about the grass-commit
mailing list