[GRASS5] PATCH: lib/imagery compiler compaint fixes

Here's a patch to fix a couple of compiler complaints and a cosmetic
change open.c:

Index: lib/imagery/ask.c

RCS file: /home/grass/grassrepository/grass6/lib/imagery/ask.c,v
retrieving revision 2.0
diff -u -u -r2.0 ask.c
--- lib/imagery/ask.c 9 Nov 2004 12:25:57 -0000 2.0
+++ lib/imagery/ask.c 28 Mar 2005 00:46:37 -0000
@@ -52,7 +52,7 @@
/* collapse white space to single blank */
/* remove non-printing chars */

- for (a = b = answer; *a = *b++; )
+ for (a = b = answer; (*a = *b++); )
   {
       if (*a == ' ' || *a == '\t')
       {
@@ -67,7 +67,7 @@

/* remove leading blank */
   if (*(a=answer) == ' ')
- for (b = a+1; *a++ = *b++; )
+ for (b = a+1; (*a++ = *b++); )
         ;

/* remove trailing blank */
Index: lib/imagery/colors.c

RCS file: /home/grass/grassrepository/grass6/lib/imagery/colors.c,v
retrieving revision 2.0
diff -u -u -r2.0 colors.c
--- lib/imagery/colors.c 9 Nov 2004 12:26:44 -0000 2.0
+++ lib/imagery/colors.c 28 Mar 2005 00:46:37 -0000
@@ -136,13 +136,12 @@
{
     unsigned char *table;
     struct Histogram histo;
- unsigned char *get_colors();

#ifdef DEBUG
fprintf (stdout,"read_color(%s: %s in %s)\n", file, name, mapset);
#endif

- if(table = get_colors (group, file, name, mapset, min, max))
+ if((table = get_colors (group, file, name, mapset, min, max)))
   return table;
     I_get_histogram (name, mapset, &histo);
     I_histo_eq (&histo, &table, min, max);
Index: lib/imagery/ls_groups.c

RCS file: /home/grass/grassrepository/grass6/lib/imagery/ls_groups.c,v
retrieving revision 2.0
diff -u -u -r2.0 ls_groups.c
--- lib/imagery/ls_groups.c 9 Nov 2004 12:27:48 -0000 2.0
+++ lib/imagery/ls_groups.c 28 Mar 2005 00:46:37 -0000
@@ -37,7 +37,7 @@
     G__file_name (buf+strlen(buf), element, "", G_mapset());
     strcat (buf, ";ls");
     if (!full) strcat (buf, " -C");
- if(ls = popen (buf, "r"))
+ if((ls = popen (buf, "r")))
     {
   while (G_getl(buf, sizeof buf, ls))
   {
@@ -102,7 +102,7 @@
     G__file_name (buf+strlen(buf), element, "", G_mapset());
     strcat (buf, ";ls");
     if (!full) strcat (buf, " -C");
- if(ls = popen (buf, "r"))
+ if((ls = popen (buf, "r")))
     {
   while (G_getl(buf, sizeof buf, ls))
   {
Index: lib/imagery/open.c

RCS file: /home/grass/grassrepository/grass6/lib/imagery/open.c,v
retrieving revision 2.0
diff -u -u -r2.0 open.c
--- lib/imagery/open.c 9 Nov 2004 12:27:54 -0000 2.0
+++ lib/imagery/open.c 28 Mar 2005 00:46:37 -0000
@@ -7,11 +7,7 @@
* open new and old imagery group files in the current mapset
*******************************************************/

-static error (group, file, msga, msgb)
- char *group;
- char *file;
- char *msga;
- char *msgb;
+static void error (char *group, char *file, char *msga, char *msgb)
{
     char buf[100];
     sprintf (buf, "%sfile [%s] of group [%s in %s]%s",

--
Brad Douglas <rez@touchofmadness.com>