[GRASS-dev] A portible shell for GRASS 7+ ?

Glynn Clements glynn at gclements.plus.com
Fri Jun 9 21:50:11 EDT 2006


Michael Barton wrote:

> > I can get most of GRASS to compile on Windows without Cygwin (this
> > relies upon the not-yet-committed changes to libraster to allow
> > driver-less rendering).
> > 
> > However, there appear to be some fundamental problems with the MSVC
> > run-time, e.g. fseek() doesn't work on files opened for update
> > ("wb+"), so I wouldn't expect it to run.
> > 
> > FWIW, the portions which fail to compile are:
> > 
> > lib/fonts/for_grass
> > lib/vector/diglib
> > 
> > Both due to fseek() issues.
> 
> These may be the most problematic

Definitely.

The lib/fonts/for_grass issue is that splitfont() doesn't work. 
lib/vector/diglib fails because the portable I/O test fails. IOW,
these are both run-time failures. It's likely that everything which
uses fseek() on read-write files will fail similarly (I've written
test programs to verify the fseek() behaviour, and they fail in the
same way).

> > display/d.mon/pgms
> > 
> > Undefined reference to ttyname()
> 
> Don't know what this might do

If the fifth field in the monitorcap file is non-empty, you can only
start the monitor from the specified terminal (i.e. mon.start's stdin
must refer to the specified terminal).

This has a very specific purpose: if you are running GRASS on a pair
of actual hardware terminals (one text terminal and one graphics
terminal, e.g. a DEC vt220 and a Tektronix 4105) on a multi-user
system, it stops you from starting someone else's monitor by mistake.

Given that the Tektronix 4105 driver isn't supported in 5.x, let alone
6.x, I think it's safe to consider this feature "obsolete".

> > imagery/i.class
> > 
> > Undefined SIGTSTP
> 
> It would be nice if this worked.

It wouldn't be hard to just disable that code with
"#ifndef __MINGW32__". It's catching that signal because curses messes
with the terminal, so you need to either disable Ctrl-Z or catch it
and restore the terminal settings. That isn't applicable to Windows,
as you can't suspend console applications.

> > imagery/i.ortho.photo/photo.rectify
> > imagery/i.rectify
> 
> i.rectify needs to work for the georectifier, but doesn't need to run in x11
> interactive mode.

We just need to rename compress() to something which doesn't conflict
with zlib. Actually, compress() is just a stub, so we could probably
just remove it.

> > display/d.paint.labels
> > raster/r.support/modcats
> > raster/r.support/modcolr
> > raster/r.support/modhist
> > raster/r.support/modhead
> > 
> > Attempting to use ln/mv on files which don't exist (need to add the
> > .exe suffix).
> 
> d.paint.lables/d.labels replaced by TclTk equivalent in gis.m. Didn't work
> right in TclTk canvas anyway (at least on Mac)
> r.support would be nice but not critical

Platform.make.in actually has a variable EXE_SUFFIX, but nothing sets it.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list