Details Ticket 5218


Comment | Reply | Take | Resolve


Serial Number 5218
Subject wingrass: creating new location from startup screen with projection values fails
Area grass6
Queue grass
Requestors mlennert@club.worldonline.be
Owner none
Status open
Last User Contact Wed Oct 25 19:45:23 2006 (2 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Wed Oct 25 19:45:23 2006 (2 yr ago)
Created Wed Oct 18 11:13:18 2006 (2 yr ago)

Transaction History Ticket 5218


Wed, Oct 18 2006 11:13:18    Request created by guest  
Subject: wingrass: creating new location from startup screen with projection
values fails 

Platform: WindowsNT/2000/XP
grass obtained from: Other (CDROM etc)
grass binary for platform: Downloaded precompiled Binaries
GRASS Version: huidae's wingrass version sept. 17

Trying to create a new location from the startup screen in wingrass entering
projection values manually doesn't work. The procedure crashes after entering
the one-line description of the new location with an error message: "the syntax
of the command is not correct. LOCATION (test) NOT created" (translated from
French). 

Just before that, after the confirmation of the coordinate system choice there
is a message: "'clear' is not recognized as an internal command" (translated
from French).

Moritz
Wed, Oct 18 2006 18:42:12    Mail sent by michael.barton@asu.edu  
Return-Path <michael.barton@asu.edu>
Delivered-To grass-bugs@lists.intevation.de
User-Agent Microsoft-Entourage/11.2.5.060620
Date Wed, 18 Oct 2006 09:42:07 -0700
Subject Re: [GRASS-dev] [bug #5218] (grass) wingrass: creating new location from startup screen with projection values fails
From Michael Barton <michael.barton@asu.edu>
To Paolo Cavallini via RT <grass-bugs@intevation.de>, <grass-dev@grass.itc.it>
Message-ID <C15BA76F.25A08%michael.barton@asu.edu>
Thread-Topic [GRASS-dev] [bug #5218] (grass) wingrass: creating new location from startup screen with projection values fails
Thread-Index Acby1Fkwl/QKSF7HEduALQAUUSYxwg==
In-Reply-To <20061018091318.BBF09101F17@lists.intevation.de>
Mime-version 1.0
Content-type text/plain; charset="US-ASCII"
Content-transfer-encoding 7bit
X-Virus-Scanned by amavisd-new
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-3.752 tagged_above=-999 required=3 tests=[BAYES_00=-5, RCVD_NUMERIC_HELO=1.248]
X-Spam-Level
This won't work because it requires an interactive xterm. This is not
currently available in wingrass, though I think I remember some discussion
by Glynn suggesting that it might (or might not) be possible to compile
wingrass in such a way as to make this and similar functions work.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton


> From: Request Tracker <grass-bugs@intevation.de>
> Reply-To: Request Tracker <grass-bugs@intevation.de>
> Date: Wed, 18 Oct 2006 11:13:18 +0200 (CEST)
> To: <grass-dev@grass.itc.it>
> Subject: [GRASS-dev] [bug #5218] (grass) wingrass: creating new location from
> startup screen with projection values fails
> 
> this bug's URL: http://intevation.de/rt/webrt?serial_num=5218
> -------------------------------------------------------------------------
> 
> Subject: wingrass: creating new location from startup screen with projection
> values fails 
> 
> Platform: WindowsNT/2000/XP
> grass obtained from: Other (CDROM etc)
> grass binary for platform: Downloaded precompiled Binaries
> GRASS Version: huidae's wingrass version sept. 17
> 
> Trying to create a new location from the startup screen in wingrass entering
> projection values manually doesn't work. The procedure crashes after entering
> the one-line description of the new location with an error message: "the
> syntax of the command is not correct. LOCATION (test) NOT created" (translated
> from French). 
> 
> Just before that, after the confirmation of the coordinate system choice there
> is a message: "'clear' is not recognized as an internal command" (translated
> from French).
> 
> Moritz
> 
> -------------------------------------------- Managed by Request Tracker
> 
> 


Thu, Oct 19 2006 06:55:45    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Thu, 19 Oct 2006 17:55:38 +1300
From Hamish <hamish_nospam@yahoo.com>
To Request Tracker <grass-bugs@intevation.de>
Subject Re: [GRASS-dev] [bug #5218] (grass) wingrass: creating new location from startup screen with projection values fails
Message-Id <20061019175538.5df28d2d.hamish_nospam@yahoo.com>
In-Reply-To <20061018091318.BBF09101F17@lists.intevation.de>
References <20061018091318.BBF09101F17@lists.intevation.de>
X-Mailer Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-2.3 tagged_above=-999 required=3 tests=[BAYES_00=-5, FORGED_YAHOO_RCVD=2.7]
X-Spam-Level
> this bug's URL: http://intevation.de/rt/webrt?serial_num=5218
> ---------------------------------------------------------------------
> 
> Subject: wingrass: creating new location from startup screen with
> projection values fails 
> 
> Platform: WindowsNT/2000/XP
> grass obtained from: Other (CDROM etc)
> grass binary for platform: Downloaded precompiled Binaries
> GRASS Version: huidae's wingrass version sept. 17
> 
> Trying to create a new location from the startup screen in wingrass
> entering projection values manually doesn't work. The procedure
> crashes after entering the one-line description of the new location
> with an error message: "the syntax of the command is not correct.
> LOCATION (test) NOT created" (translated from French). 
> 
> Just before that, after the confirmation of the coordinate system
> choice there is a message: "'clear' is not recognized as an internal
> command" (translated from French).


probably it is doing system("clear") when in DOS it wants system("cls")


Hamish


Thu, Oct 19 2006 10:16:46    Mail sent by mlennert@club.worldonline.be  
Return-Path <mlennert@club.worldonline.be>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <45373489.7070406@club.worldonline.be>
Date Thu, 19 Oct 2006 10:17:13 +0200
From Moritz Lennert <mlennert@club.worldonline.be>
User-Agent Thunderbird 1.5.0.7 (X11/20060927)
MIME-Version 1.0
To Michael Barton via RT <grass-bugs@intevation.de>
Cc Grass Developers List <grass-dev@grass.itc.it>, Huidae Cho <grass4u@gmail.com>, Glynn Clements <glynn@gclements.plus.com>
Subject Re: [bug #5218] (grass) wingrass: creating new location from startup screen with projection values fails
References <20061018164212.EC4DB101FB5@lists.intevation.de>
In-Reply-To <20061018164212.EC4DB101FB5@lists.intevation.de>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-5 tagged_above=-999 required=3 tests=[BAYES_00=-5]
X-Spam-Level
Michael Barton via RT wrote:
> This won't work because it requires an interactive xterm. This is not
> currently available in wingrass, though I think I remember some discussion
> by Glynn suggesting that it might (or might not) be possible to compile
> wingrass in such a way as to make this and similar functions work.

But there is a terminal, but it fails before getting to the screen where 
you define the location extension. So must be something about how this 
screen is constructed.

If I do not use Huidae's grass.bat (which actually launches cmd.exe as 
terminal), but I launch grass from a Msys teminal (after setting path to 
include postgresql/bin and GRASS_WISH=wish84), and I then try to launch 
the location creation with projection values, it fails immediately, with 
the following error:

Cleaning up temporary files.....
Starting GRASS ...
'clear' n'est pas reconnu en tant que commande interne
ou externe, un programme ex‚cutable ou un fichier de commandes.
LINES value must be >= 2 and <= -9808: got 1
initscr(): LINES=1 COLS=1: too small.

Moritz


Thu, Oct 19 2006 10:31:24    Mail sent by mlennert@club.worldonline.be  
Return-Path <mlennert@club.worldonline.be>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <453737F9.4060906@club.worldonline.be>
Date Thu, 19 Oct 2006 10:31:53 +0200
From Moritz Lennert <mlennert@club.worldonline.be>
User-Agent Thunderbird 1.5.0.7 (X11/20060927)
MIME-Version 1.0
To Hamish via RT <grass-bugs@intevation.de>
Subject Re: [bug #5218] (grass) wingrass: creating new location
References <20061019045545.A41871005DC@lists.intevation.de>
In-Reply-To <20061019045545.A41871005DC@lists.intevation.de>
Content-Type text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding 7bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-5 tagged_above=-999 required=3 tests=[BAYES_00=-5]
X-Spam-Level
Hamish via RT wrote:
>> this bug's URL: http://intevation.de/rt/webrt?serial_num=5218
>> ---------------------------------------------------------------------
>>
>> Subject: wingrass: creating new location from startup screen with
>> projection values fails 
>>
>> Platform: WindowsNT/2000/XP
>> grass obtained from: Other (CDROM etc)
>> grass binary for platform: Downloaded precompiled Binaries
>> GRASS Version: huidae's wingrass version sept. 17
>>
>> Trying to create a new location from the startup screen in wingrass
>> entering projection values manually doesn't work. The procedure
>> crashes after entering the one-line description of the new location
>> with an error message: "the syntax of the command is not correct.
>> LOCATION (test) NOT created" (translated from French). 
>>
>> Just before that, after the confirmation of the coordinate system
>> choice there is a message: "'clear' is not recognized as an internal
>> command" (translated from French).
> 
> 
> probably it is doing system("clear") when in DOS it wants system("cls")
> 

Yes, this seems to be it.

However, what is weird is that I get the same error when I launch grass 
from within a msys shell, where clear exists as a command...

Moritz


Thu, Oct 19 2006 10:51:09    Mail sent by grass4u@gmail.com  
Return-Path <grass4u@gmail.com>
Delivered-To grass-bugs@lists.intevation.de
DomainKey-Signature a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:references:mime-version:content-type:content-disposition:content-transfer-encoding:in-reply-to:user-agent; b=dp1pC1VkGMoKx9hkf4bd7ksf3YIrh6E7r7j/UNxq752NVgOREIzxv7Ljq63gjK33AMk2udvrNQcUjgebH/INm4S7FWMY2+DgcgU07AlGuGxKZFPOgGAa/V0AbWaCm/GaiWx/uH5JKPrh6z7XO9FBkBXUtmmKcPvW7WWaAqDj0ag=
Date Thu, 19 Oct 2006 03:50:25 -0500
From Huidae Cho <grass4u@gmail.com>
To Moritz Lennert <mlennert@club.worldonline.be>
Cc Michael Barton via RT <grass-bugs@intevation.de>, Grass Developers List <grass-dev@grass.itc.it>, Glynn Clements <glynn@gclements.plus.com>
Subject Re: [bug #5218] (grass) wingrass: creating new location from startup screen with projection values fails
Message-ID <20061019085025.GA2208@localhost>
References <20061018164212.EC4DB101FB5@lists.intevation.de> <45373489.7070406@club.worldonline.be>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Disposition inline
Content-Transfer-Encoding 8bit
In-Reply-To <45373489.7070406@club.worldonline.be>
User-Agent mutt-ng/devel (FreeBSD)
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-4.933 tagged_above=-999 required=3 tests=[BAYES_00=-5, RCVD_BY_IP=0.067]
X-Spam-Level
On Thu, Oct 19, 2006 at 10:17:13AM +0200, Moritz Lennert wrote:
> Michael Barton via RT wrote:
> >This won't work because it requires an interactive xterm. This is not
> >currently available in wingrass, though I think I remember some discussion
> >by Glynn suggesting that it might (or might not) be possible to compile
> >wingrass in such a way as to make this and similar functions work.
> 
> But there is a terminal, but it fails before getting to the screen where you
> define the location extension. So must be something about how this screen is
> constructed.
> 
> If I do not use Huidae's grass.bat (which actually launches cmd.exe as 
> terminal), but I launch grass from a Msys teminal (after setting path to 
> include postgresql/bin and GRASS_WISH=wish84), and I then try to launch the
> location creation with projection values, it fails immediately, with the 
> following error:
> 
> Cleaning up temporary files.....
> Starting GRASS ...
> 'clear' n'est pas reconnu en tant que commande interne
> ou externe, un programme ex‚cutable ou un fichier de commandes.
> LINES value must be >= 2 and <= -9808: got 1
> initscr(): LINES=1 COLS=1: too small.
> 
> Moritz
> 

Programs compiled with the pdcurses library do not work with the MSys
terminal because of the above-mentioned problem.  That's why I used
cmd.exe for grass.bat.  If NO modules called from gis.m use the curses
library, rxvt.exe (MSys terminal) would be a better option because it
opens std* channels extensively used in TclTk codes.

I cannot decide which one is better between cmd.exe and rxvt.exe :-(.
Any idea?

Huidae


Thu, Oct 19 2006 10:55:23    Mail sent by mlennert@club.worldonline.be  
Return-Path <mlennert@club.worldonline.be>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <45373D98.8020703@club.worldonline.be>
Date Thu, 19 Oct 2006 10:55:52 +0200
From Moritz Lennert <mlennert@club.worldonline.be>
User-Agent Thunderbird 1.5.0.7 (X11/20060927)
MIME-Version 1.0
Cc Hamish via RT <grass-bugs@intevation.de>
Subject Re: [bug #5218] (grass) wingrass: creating new location
References <20061019045545.A41871005DC@lists.intevation.de> <453737F9.4060906@club.worldonline.be>
In-Reply-To <453737F9.4060906@club.worldonline.be>
Content-Type text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding 7bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-4.881 tagged_above=-999 required=3 tests=[BAYES_00=-5, MISSING_HEADERS=0.119]
X-Spam-Level
Moritz Lennert wrote:
> Hamish via RT wrote:
>>> this bug's URL: http://intevation.de/rt/webrt?serial_num=5218
>>> ---------------------------------------------------------------------
>>>
>>> Subject: wingrass: creating new location from startup screen with
>>> projection values fails
>>> Platform: WindowsNT/2000/XP
>>> grass obtained from: Other (CDROM etc)
>>> grass binary for platform: Downloaded precompiled Binaries
>>> GRASS Version: huidae's wingrass version sept. 17
>>>
>>> Trying to create a new location from the startup screen in wingrass
>>> entering projection values manually doesn't work. The procedure
>>> crashes after entering the one-line description of the new location
>>> with an error message: "the syntax of the command is not correct.
>>> LOCATION (test) NOT created" (translated from French).
>>> Just before that, after the confirmation of the coordinate system
>>> choice there is a message: "'clear' is not recognized as an internal
>>> command" (translated from French).
>>
>>
>> probably it is doing system("clear") when in DOS it wants system("cls")
>>
> 
> Yes, this seems to be it.
> 
> However, what is weird is that I get the same error when I launch grass 
> from within a msys shell, where clear exists as a command...

I think this is due to the fact that wingrass launches commands as 
"sh.exe -c command", and sh.exe does not know 'clear'.

Moritz


Thu, Oct 19 2006 11:45:40    Mail sent by mlennert@club.worldonline.be  
Return-Path <mlennert@club.worldonline.be>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <45374961.5010202@club.worldonline.be>
Date Thu, 19 Oct 2006 11:46:09 +0200
From Moritz Lennert <mlennert@club.worldonline.be>
User-Agent Thunderbird 1.5.0.7 (X11/20060927)
MIME-Version 1.0
To Huidae Cho via RT <grass-bugs@intevation.de>, Grass Developers List <grass-dev@grass.itc.it>
Subject Re: [bug #5218] (grass) wingrass: creating new location from startup screen with projection values fails
References <20061019085109.9F9A41006A8@lists.intevation.de>
In-Reply-To <20061019085109.9F9A41006A8@lists.intevation.de>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-5 tagged_above=-999 required=3 tests=[BAYES_00=-5]
X-Spam-Level
Huidae Cho via RT wrote:
> On Thu, Oct 19, 2006 at 10:17:13AM +0200, Moritz Lennert wrote:
>> Michael Barton via RT wrote:
>>> This won't work because it requires an interactive xterm. This is not
>>> currently available in wingrass, though I think I remember some discussion
>>> by Glynn suggesting that it might (or might not) be possible to compile
>>> wingrass in such a way as to make this and similar functions work.
>> But there is a terminal, but it fails before getting to the screen where you
>> define the location extension. So must be something about how this screen
is 
>> constructed.
>>
>> If I do not use Huidae's grass.bat (which actually launches cmd.exe as 
>> terminal), but I launch grass from a Msys teminal (after setting path to 
>> include postgresql/bin and GRASS_WISH=wish84), and I then try to launch the
>> location creation with projection values, it fails immediately, with the 
>> following error:
>>
>> Cleaning up temporary files.....
>> Starting GRASS ...
>> 'clear' n'est pas reconnu en tant que commande interne
>> ou externe, un programme ex�cutable ou un fichier de commandes.
>> LINES value must be >= 2 and <= -9808: got 1
>> initscr(): LINES=1 COLS=1: too small.
>>
>> Moritz
>>
> 
> Programs compiled with the pdcurses library do not work with the MSys
> terminal because of the above-mentioned problem.  That's why I used
> cmd.exe for grass.bat.  If NO modules called from gis.m use the curses
> library, rxvt.exe (MSys terminal) would be a better option because it
> opens std* channels extensively used in TclTk codes.

But cmd.exe also fails in the location creation through projection 
values. I don't know why (no error messages other than "the syntax of 
the command is not correct"), so no idea if this has anything to do with 
curses...

Which modules, other than the location definition from projection values 
in the startup screen (which actually isn't part of gis.m) call curses ?

lib/edit
imagery/i.ortho.photo
lib/imagery
lib/init
raster/r.le
raster/r.support
vector/v.transform

So, it seems rather limited, if I am not mistaken. It might be worth 
sacrificing curses in wingrass at the moment, with the only (in my eyes) 
serious problem this raises being the creation of a new location with 
projection values. But we could tell people to use g.proj -c for the 
time being (but this means that they need to have at least one location 
configured...).

I think r.support and v.transform can be used non-interactively, so we 
don't lose functionality. Don't know about r.le. i.ortho.photo won't 
work anyhow, IIRC.

> 
> I cannot decide which one is better between cmd.exe and rxvt.exe :-(.
 >
 > Any idea?
 >

At the moment, concerning startup location creation, the former fails on 
two (georef'd file and projection values), the latter only on one 
(projection values).

One big plus for rxvt.exe is that copying from the gui to the command 
line is really easy (right-click). I haven't found out how to do this in 
cmd.exe.

Very superficial testing (don't have time for more right now) doesn't 
show any other significant differences.

Mortiz


Thu, Oct 19 2006 14:46:58    Mail sent by glynn@gclements.plus.com  
Return-Path <glynn@gclements.plus.com>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn@gclements.plus.com>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <17719.29535.652498.673819@cerise.gclements.plus.com>
Date Thu, 19 Oct 2006 13:45:19 +0100
To Huidae Cho <grass4u@gmail.com>
Cc Moritz Lennert <mlennert@club.worldonline.be>, Michael Barton via RT <grass-bugs@intevation.de>, Grass Developers List <grass-dev@grass.itc.it>
Subject Re: [GRASS-dev] Re: [bug #5218] (grass) wingrass: creating new location from startup screen with projection values fails
In-Reply-To <20061019085025.GA2208@localhost>
References <20061018164212.EC4DB101FB5@lists.intevation.de> <45373489.7070406@club.worldonline.be> <20061019085025.GA2208@localhost>
X-Mailer VM 7.07 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-5 tagged_above=-999 required=3 tests=[BAYES_00=-5]
X-Spam-Level
Huidae Cho wrote:

> > >This won't work because it requires an interactive xterm. This is not
> > >currently available in wingrass, though I think I remember some discussion
> > >by Glynn suggesting that it might (or might not) be possible to compile
> > >wingrass in such a way as to make this and similar functions work.
> > 
> > But there is a terminal, but it fails before getting to the screen where
you 
> > define the location extension. So must be something about how this screen
is 
> > constructed.
> > 
> > If I do not use Huidae's grass.bat (which actually launches cmd.exe as 
> > terminal), but I launch grass from a Msys teminal (after setting path to
> > include postgresql/bin and GRASS_WISH=wish84), and I then try to launch the
> > location creation with projection values, it fails immediately, with the
> > following error:
> > 
> > Cleaning up temporary files.....
> > Starting GRASS ...
> > 'clear' n'est pas reconnu en tant que commande interne
> > ou externe, un programme ex?cutable ou un fichier de commandes.
> > LINES value must be >= 2 and <= -9808: got 1
> > initscr(): LINES=1 COLS=1: too small.
> 
> Programs compiled with the pdcurses library do not work with the MSys
> terminal because of the above-mentioned problem.  That's why I used
> cmd.exe for grass.bat.  If NO modules called from gis.m use the curses
> library, rxvt.exe (MSys terminal) would be a better option because it
> opens std* channels extensively used in TclTk codes.
> 
> I cannot decide which one is better between cmd.exe and rxvt.exe :-(.
> Any idea?

cmd.exe is a shell (aka command interpreter), akin to bash or csh. 
rxvt is a terminal emulator, akin to the Windows console. You can run
cmd.exe in rxvt, and you can run bash in the Windows console.

I don't see any real benefit to using rxvt on Windows NT/2K/XP. On
95/98/ME, the "DOS box" was somewhat limited (e.g. no scrollback,
restrictions on window size, 8086-compatibility environment, etc), so
there were some advantages to using rxvt there.

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


Mon, Oct 23 2006 11:31:37    Mail sent by moritz.lennert@ulb.ac.be  
Return-Path <moritz.lennert@ulb.ac.be>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <453C8773.1070605@ulb.ac.be>
Date Mon, 23 Oct 2006 11:12:19 +0200
From Moritz Lennert <moritz.lennert@ulb.ac.be>
User-Agent Icedove 1.5.0.7 (X11/20061013)
MIME-Version 1.0
To Glynn Clements <glynn@gclements.plus.com>
Cc Huidae Cho <grass4u@gmail.com>, Michael Barton via RT <grass-bugs@intevation.de>, Grass Developers List <grass-dev@grass.itc.it>
Subject Re: [GRASS-dev] Re: [bug #5218] (grass) wingrass: creating new location from startup screen with projection values fails
References <20061018164212.EC4DB101FB5@lists.intevation.de> <45373489.7070406@club.worldonline.be> <20061019085025.GA2208@localhost> <17719.29535.652498.673819@cerise.gclements.plus.com>
In-Reply-To <17719.29535.652498.673819@cerise.gclements.plus.com>
Content-Type text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-5 tagged_above=-999 required=3 tests=[BAYES_00=-5]
X-Spam-Level
On Thu, October 19, 2006 14:45, Glynn Clements wrote:
> Huidae Cho wrote:
>> > >This won't work because it requires an interactive xterm. This is
not
>> > >currently available in wingrass, though I think I remember some
>> discussion
>> > >by Glynn suggesting that it might (or might not) be possible to
>> compile
>> > >wingrass in such a way as to make this and similar functions work.
>> >
>> > But there is a terminal, but it fails before getting to the screen
>> where you
>> > define the location extension. So must be something about how this
>> screen is
>> > constructed.
>> >
>> > If I do not use Huidae's grass.bat (which actually launches cmd.exe
as
>> > terminal), but I launch grass from a Msys teminal (after setting path
>> to
>> > include postgresql/bin and GRASS_WISH=wish84), and I then try to
>> launch the
>> > location creation with projection values, it fails immediately, with
>> the
>> > following error:
>> >
>> > Cleaning up temporary files.....
>> > Starting GRASS ...
>> > 'clear' n'est pas reconnu en tant que commande interne
>> > ou externe, un programme ex?cutable ou un fichier de commandes. LINES value
must be >= 2 and <= -9808: got 1
>> > initscr(): LINES=1 COLS=1: too small.
>> Programs compiled with the pdcurses library do not work with the MSys terminal
because of the above-mentioned problem.  That's why I used cmd.exe for grass.bat.
If NO modules called from gis.m use the curses library, rxvt.exe (MSys terminal)
would be a better option because it opens std* channels extensively used in TclTk
codes.
>> I cannot decide which one is better between cmd.exe and rxvt.exe :-(. Any
idea?
> cmd.exe is a shell (aka command interpreter), akin to bash or csh. rxvt is
a terminal emulator, akin to the Windows console. You can run cmd.exe in rxvt,
and you can run bash in the Windows console.
> I don't see any real benefit to using rxvt on Windows NT/2K/XP. On 95/98/ME,
the "DOS box" was somewhat limited (e.g. no scrollback, restrictions on window
size, 8086-compatibility environment, etc), so there were some advantages to
using rxvt there.

So, IIUC, this should work with cmd.exe which allows pdcurses code, but 
it doesn't and fails with:

> The procedure crashes after entering
> the one-line description of the new location with an error message: "the syntax
of the command is not correct. LOCATION (test) NOT created"
(translated
> from French).

So, if this is not a pdcurses issue, what could be the problem ?


Also, if you look at bug 5216, you can see that if I use the msys 
terminal directly, I can create a new location based on a georeferenced 
file, but I cannot using cmd.exe via grass.bat. What would explain this ?

Moritz


Wed, Oct 25 2006 06:02:46    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Wed, 25 Oct 2006 17:02:29 +1300
From Hamish <hamish_nospam@yahoo.com>
To Glynn Clements <glynn@gclements.plus.com>
Cc grass-dev@grass.itc.it, grass-bugs@intevation.de
Subject Re: [GRASS-dev] Re: [bug #5218] (grass) wingrass: creating new location from startup screen with projection values fails
Message-Id <20061025170229.326fc70c.hamish_nospam@yahoo.com>
In-Reply-To <17726.33493.243013.509679@cerise.gclements.plus.com>
References <20061018164212.EC4DB101FB5@lists.intevation.de> <45373489.7070406@club.worldonline.be> <20061019085025.GA2208@localhost> <17719.29535.652498.673819@cerise.gclements.plus.com> <453DC578.20106@club.worldonline.be> <17726.33493.243013.509679@cerise.gclements.plus.com>
X-Mailer Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-2.3 tagged_above=-999 required=3 tests=[BAYES_00=-5, FORGED_YAHOO_RCVD=2.7]
X-Spam-Level
Glynn Clements wrote:
> 
> Windows has native versions of mkdir and echo. The native mkdir won't
> like being passed Unix filenames, as it treats / as indicating
> options:
> 
> 	C:\>mkdir /foo
> 	The syntax of the command is incorrect.
> 
> Fortunately, this bug shoud be quite simple to fix: use the mkdir()
> function rather than using system() to run the mkdir command. Could
> someone try the attached patch?
> 
> Unfortunately, GRASS has a lot of this sort of stuff - using system()
> to run commands rather than using functions; probably because the
> author knew about the command but didn't know about the function. I've
> even seen system("rm ...") used to delete files.
> 
> Finding (and fixing) all of the Unix-specific system() calls will be a
> large part of getting a native Windows version of GRASS to work.




here are some more:

lib/vask/V_init.c:    system("clear");  /* this is a kludge - xterm has problems
lib/fonts/for_grass/try.c:                      system ("cd fonts; ls *.hmp |
sed 's/.hmp//' | fmt");
lib/fonts/for_grass/fontmap.c:  system ("cd ../fonts; ls *.hmp | sed 's/.hmp//'
| fmt");
raster/r.out.mpeg/main.c:           sprintf(cmd, "cd %s; \\ls %s >> %s 2> /dev/null",
visualization/xganim/main.c:        sprintf(cmd, "cd %s; \\ls %s >> %s 2> /dev/null",
path, wildarg, tfile);
general/g.mapsets/main_cmd.c:           sprintf (command, "ls -C %s/%s 1>&2",
G_gisdbase(), G_location());
general/g.mapsets/main_cmd.c:           sprintf (command, "ls -C %s/%s 1>&2",
G_gisdbase(), G_location());
imagery/i.ortho.photo/photo.target/ask_target.c:    sprintf (buf, "ls -C %s\n",
G_gisdbase());
imagery/i.ortho.photo/photo.target/ask_target.c:    sprintf (buf, "ls %s/%s",
G_gisdbase(), G_location());
lib/init/set_data.c:    sprintf(buf, "ls -C '%s'", gisdbase) ;
lib/init/set_data.c:    sprintf (buf, "ls '%s'", location);


Hamish


------- from previous post ----------

grass63$ grep -rI mkdir * | grep sprintf

gem/reg_entries.c:              sprintf ( str, "mkdir --verbose %s/etc/dm/gem-entries
; cp -vf ../entries-gisman %s/etc/dm/gem-entries/%s ; \
gem/reg_entries.c:              sprintf ( str, "mkdir %s/etc/dm/gem-entries &>
%s ; cp -f ../entries-gisman %s/etc/dm/gem-entries/%s &> %s ; \
gem/reg_entries.c:              sprintf ( str, "mkdir --verbose -p %s/etc/gm/Xtns
; cp -fv ../entries-gisman2 %s/etc/gm/Xtns/%s.gem ; ", 
gem/reg_entries.c:              sprintf ( str, "mkdir -p %s/etc/gm/Xtns ; cp
-f ../entries-gisman2 %s/etc/gm/Xtns/%s.gem ; ", 
lib/init/mke_loc.c:    sprintf (buf, "mkdir '%s'/'%s'", gisdbase, location_name);
lib/init/mke_loc.c:    sprintf (buf, "mkdir '%s'/'%s'/'%s'", gisdbase, location_name,
mapset);
lib/init/mke_mapset.c:  sprintf(buffer,"mkdir '%s'/'%s'",location, mapset) ;
$ grep -rI mkdir * | grep system 

raster/r.le/r.le.setup/main.c:     G_system("mkdir r.le.para");
raster/r.le/r.le.patch/main.c:     G_system("mkdir r.le.out");
raster/r.le/r.le.pixel/main.c:     G_system("mkdir r.le.out");


Wed, Oct 25 2006 08:15:41    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Wed, 25 Oct 2006 19:15:20 +1300
From Hamish <hamish_nospam@yahoo.com>
To glynn@gclements.plus.com
Cc grass-dev@grass.itc.it, grass-bugs@intevation.de
Subject Re: [GRASS-dev] Re: [bug #5218] (grass) wingrass: creating new location from startup screen with projection values fails
Message-Id <20061025191520.701e80ef.hamish_nospam@yahoo.com>
In-Reply-To <20061025170229.326fc70c.hamish_nospam@yahoo.com>
References <20061018164212.EC4DB101FB5@lists.intevation.de> <45373489.7070406@club.worldonline.be> <20061019085025.GA2208@localhost> <17719.29535.652498.673819@cerise.gclements.plus.com> <453DC578.20106@club.worldonline.be> <17726.33493.243013.509679@cerise.gclements.plus.com> <20061025170229.326fc70c.hamish_nospam@yahoo.com>
X-Mailer Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-2.3 tagged_above=-999 required=3 tests=[BAYES_00=-5, FORGED_YAHOO_RCVD=2.7]
X-Spam-Level
Glynn Clements wrote:
> Unfortunately, GRASS has a lot of this sort of stuff - using system()
> to run commands rather than using functions; probably because the
> author knew about the command but didn't know about the function. I've
> even seen system("rm ...") used to delete files.
> 
> Finding (and fixing) all of the Unix-specific system() calls will be a
> large part of getting a native Windows version of GRASS to work.


Does MinGW provide "clear" for "cls"? I seem to remember someone
recently complaining about that,

grass63$ grep -rI clear * | grep system | cut -f1 -d: | uniq
lib/gis/clear_scrn.c
lib/vask/V_clear.c
lib/vask/V_init.c
raster/r.le/r.le.setup/mv_wind.c
raster/r.le/r.le.setup/ask_group.c
raster/r.le/r.le.setup/sample.c
raster/r.le/r.le.setup/setup.c
raster/r.le/r.le.trace/main.c
raster/r.coin/inter.c
vector/v.transform/creat_trans.c


Hamish


Wed, Oct 25 2006 19:45:23    Mail sent by glynn@gclements.plus.com  
Return-Path <glynn@gclements.plus.com>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn@gclements.plus.com>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <17727.41645.177218.362083@cerise.gclements.plus.com>
Date Wed, 25 Oct 2006 18:45:17 +0100
To Hamish <hamish_nospam@yahoo.com>
Cc grass-bugs@intevation.de, grass-dev@grass.itc.it
Subject Re: [GRASS-dev] Re: [bug #5218] (grass) wingrass: creating new location from startup screen with projection values fails
In-Reply-To <20061025191520.701e80ef.hamish_nospam@yahoo.com>
References <20061018164212.EC4DB101FB5@lists.intevation.de> <45373489.7070406@club.worldonline.be> <20061019085025.GA2208@localhost> <17719.29535.652498.673819@cerise.gclements.plus.com> <453DC578.20106@club.worldonline.be> <17726.33493.243013.509679@cerise.gclements.plus.com> <20061025170229.326fc70c.hamish_nospam@yahoo.com> <20061025191520.701e80ef.hamish_nospam@yahoo.com>
X-Mailer VM 7.07 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-5 tagged_above=-999 required=3 tests=[BAYES_00=-5]
X-Spam-Level
Hamish wrote:

> > Unfortunately, GRASS has a lot of this sort of stuff - using system()
> > to run commands rather than using functions; probably because the
> > author knew about the command but didn't know about the function. I've
> > even seen system("rm ...") used to delete files.
> > 
> > Finding (and fixing) all of the Unix-specific system() calls will be a
> > large part of getting a native Windows version of GRASS to work.
> 
> 
> Does MinGW provide "clear" for "cls"? I seem to remember someone
> recently complaining about that,
> 
> grass63$ grep -rI clear * | grep system | cut -f1 -d: | uniq
> lib/gis/clear_scrn.c

> lib/vask/V_clear.c
> lib/vask/V_init.c

V_init() uses the curses clear() function, although it also uses
system("clear"):

    system("clear");	/* this is a kludge - xterm has problems
			 * it shows what was on the screen after
			 * endwin is called in V_exit()
			 */

Personally, I don't consider xterm's behaviour to be a problem.

V_clear() has the call commented out:

/* please leave this code commented out 
	fflush(stdout);
	system("clear");
*/

Anything which uses curses should use the clear() function. Anything
which doesn't use curses probably shouldn't be trying to clear the
screen.

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


Comment | Reply | Take | Resolve

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request