[GRASS5] Re: 5.0.3 release candidate 1

Markus Neteler neteler at itc.it
Mon Aug 25 03:55:01 EDT 2003


On Sat, Aug 23, 2003 at 10:20:50PM +1200, M. Hamish Bowman wrote:
> > Now testers are needed to try release candidate 1:
> 
> NVIZ with Tcl/Tk 8.4: (on debian/testing) [WISH=/usr/bin/wish8.4]
> 
> GRASS:~ > nviz rastermap
> [...]
> Loading Data
> Update elev null mask
> building color table
> child killed: segmentation violation

Remains to be an open problem (does the CVS HEAD work ?).

> html/html/d.barscale.html
>   - add missing options (fixed in CVS HEAD)

fixed.
 
> src/tcltkgrass/module/d.barscale
>   - add reference to bcolor=none (fixed in CVS HEAD)

fixed.
 
> src/display/d.barscale/cmd/main.c
>   * Compile error, sync changed code. (not fixed):

fixed yesterday.
> 
> html/html/d.rgb.html
>   - minor cosmetics (fixed in CVS HEAD)

fixed
 
> html/html/r.composite.html
>   - add missing option (fixed in CVS HEAD)

fixed
 
> html/html/d.where.html
>   - included unavailable 5.3.0 options (not fixed)

fixed
 
> NEWS.html
>   - r.sun: NULL data support, much faster  <--in HEAD only (proj)
>   - What's new in GRASS 5.0.2/CVS comparing to 5.0.1
>       --> 5.0.2 comparing to 5.0.1  (not fixed)

fixed
 
> html/html/shade.rel.sh.html
>   - html file looks ok, SYNOPSIS section of man page built wrong. (?)

not fixed. Also in CVS HEAD? 
 
> src.garden/grass.postgresql
>   * Compilation error (not fixed)
>      with Debian/Testing's gcc (GCC) 3.3.1 20030626 (Debian prerelease)
>      ok with Redhat 9's gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
> 
> 
> ../../bin.i686-pc-linux-gnu/gmake5 g.column.pg
>   SRC     = /usr/src/grass5source/grass-5.0.3rc1/src
>   CMD     = /usr/src/grass5source/grass-5.0.3rc1/src/CMD
>   UNUSED  = /usr/src/grass5source/grass-5.0.3rc1/unused
>   HEADER  = head.i686-pc-linux-gnu
>   ARCH    = i686-pc-linux-gnu
>   GISBASE = /usr/src/grass5source/grass-5.0.3rc1/dist.i686-pc-linux-gnu
>   VERSION = 5.0.3 August 2003 
> #################################################################
> /usr/src/grass5source/grass-5.0.3rc1/src.garden/grass.postgresql/g.column.pg
>   make -f OBJ.i686-pc-linux-gnu/make.rules 
> 
> make[1]: Entering directory `/usr/src/grass5source/grass-5.0.3rc1/src.garden/grass.postgresql/g.column.pg'
> gcc -I/usr/src/grass5source/grass-5.0.3rc1/src/include -O3 -march=i686 -Wall   -I/usr/include/postgresql -Wall -DPACKAGE=\""g.column.pg"\"  -c main.c -o OBJ.i686-pc-linux-gnu/main.o
> main.c:83:30: missing terminating " character
> main.c: In function `main':
> main.c:84: error: syntax error before "a"
> main.c:85: error: stray '\' in program

I have tried to fix that. Could you please test the attached main.c
of g.column.pg?


> 
> ps -- can anything be done to get rid of all the 
> src/include/gis.h:35: warning: `GRASS_copyright' defined but not used
> warnings?

It would just need the line 35 in src/include/gis.h commented. As far
as I remember this was left to get "GRASS_copyright" into the binaries.
Mhhh.

Markus
-------------- next part --------------
/*
 *   g.column.pg
 *
 *   A.Sh. -12.99
 *   Generate list of database columns for a specified table
 *   in the currently selected SQL database identified
 *   by the environment variable DATABASE.
 *
 *   jaf 12/26/91
 */

/*  modifcation 11/98
 *      to connect to Postgress v6.4
 *      to use libpq
 *  Carl Anderson 11/13/98
*/

#include "gis.h"
#include "infx.h"
#include <stdio.h>
#include <stdlib.h>
#include "glocale.h"

#define MAIN

int main(argc, argv)
int argc ;
char **argv ;
{ 
    char  *dbname ;
    struct Flag *flag ;
    struct Option  *tbl ;
    int   stat;   
    static char SQL[1024] ;
    

	/* Initialize the GIS calls */
	G_gisinit(argv[0]) ;
	   
	tbl = G_define_option() ;
	tbl->key        = "table" ;
	tbl->type       = TYPE_STRING ;
	tbl->required   = YES  ;
	tbl->multiple   = NO ;
	tbl->description= _("The table name in the selected database:") ;

	flag = G_define_flag();
	flag->key		= 'v';
	flag->description	= _("Use flag -v for full output.");

	/* Check DATABASE env variable */
        if ((dbname=G__getenv("PG_DBASE")) == NULL) {
            fprintf(stderr,
                   _("Please run g.select.pg to identify a current database.\n"));
	    exit(-1);
           }

	/* Invoke parser */
	if (G_parser(argc, argv))
          { exit(-1); }
          
/*      Old style lookup
 *	if (flag->answer) {
 *		sprintf(SQL,"SELECT (pg_attribute.attname,pg_type.typname)
 *		  where  pg_class.relname = \"%s\"
 *		  and    pg_attribute.atttypid = pg_type.oid 
 *		  and pg_attribute.attrelid=pg_class.oid 
 *		  and   pg_attribute.attnum   > 0 
 *		  sort   by attname", tbl->answer );
 *	}
 *	else {
 *		sprintf(SQL,"SELECT (pg_attribute.attname)
 *		  where  pg_class.relname = \"%s\"
 *		  and pg_attribute.attrelid=pg_class.oid 
 *		  and   pg_attribute.attnum   > 0 
 *		  sort   by attname",  tbl->answer );		
 *	}
*/

/* Postgres 6.x style */

	if (flag->answer) {
		sprintf(SQL, "SELECT a.attname as ColumnName, t.typname as Type,"
		 "  a.attlen as Length,"
		 "  a.atttypmod as \"Mod_Length\""
		 " FROM pg_class c, pg_attribute a, pg_type t"
		 " WHERE  c.relname = '%s'"
		 " and a.attnum > 0"
		 " and a.attrelid = c.oid"
		 " and a.atttypid = t.oid"
		 " order by attnum", tbl->answer );	

	}
	else {
	/* no column descriptions */
		sprintf(SQL, "SELECT a.attname as ColumnName"
		" FROM pg_class c, pg_attribute a"
		" WHERE  c.relname = '%s'"
		"  and a.attnum > 0"
		"  and a.attrelid = c.oid"
		"  order by attnum", tbl->answer );		
	}


        
	stat = infxColumn(SQL);

	return(stat);

}



More information about the grass-dev mailing list