[GRASS5] r.le problem with VASKLIB
William L. Baker
bakerwl at uwyo.edu
Tue Sep 11 00:17:50 EDT 2001
I have been promising for some time to finish the
r.le program revision. I am close. I still have
a bug in r.le.setup. Here is a message that I
sent back in February. Note that I had already changed
to using fprintf as Markus suggested. The problem remains.
Univ. of Wyoming
Still struggling with the VASKLIB problem. I have now
isolated the problem. It is in my code that uses the
VASKLIB. If I manually enter values into the array
that is filled by the VASKLIB code, instead of letting
the VASKLIB code do it, the program runs fine.
It appears that the VASKLIB code does not let go of
control of the screen once it is done, as subsequent
attempts by later code to write to the screen fail.
The cursor is hung in the upper left corner after this
VASKLIB code is done. If I hit Cnt-C, then the program
I wonder if there is someone familiar with the VASKLIB
who could look at my code (attached) to see if there
is anything obvious wrong? The code is pretty short.
I am not an expert programmer, so someone with more
experience might be able to see the problem easily!
Univ. of Wyoming
Markus Neteler wrote:
> Hi Bill,
> On Mon, Feb 12, 2001 at 03:53:13PM -0700, William L. Baker wrote:
> > Anyone had any problem with modules using VASKLIB?
> > My r.le.setup program worked fine under GRASS4.3.
> > Now after the V_ code, when the user has hit esc-return,
> > the screen freezes with the cursor in the upper-left corner.
> > The return values from the V_ code do get passed along
> > OK to subsequent code, but nothing happens because of
> > the screen freeze.
> this was a problem in grass5 in past. We fixed it by using
> fprintf(stderr, ""); or
> fprintf(stdout, "");
> instead of
> > Could be a problem in my own code after the V_ section,
> > but I can't isolate the problem there.
> > In the old 4.3 version, the Gmakefile used VASK, but I
> > have fixed that up to just use VASKLIB as in the updated
> > Gmakefiles in beta 11.
> As described in SUBMITTING, the printf() shouldn't be used. Probably
> this helps here if there are printf() in your code?
> Kind regards
> Markus Neteler
> If you want to unsubscribe from GRASS Development Team mailing list write
> minordomo at geog.uni-hannover.de with
> subject 'unsubscribe grass5'
Content-Type: text/plain; charset=us-ascii;
/* r.le.setup/ask_group.c */
/* 5.0beta */
/* 1/1/2001 version */
/* Programmer: Baker */
/* Univ. of Wyoming */
/* PROMPT THE USER TO SELECT THE GROUP/CLASS
/* show the option menu using GRASS VASK
V_line(2, "SELECT ATTRIBUTE GROUP OR INDEX CLASS TO SETUP:");
V_line(3, "Type 'x' to select; <CR> to go to the next; <space> over to
V_line(6, " Attribute Groups");
V_line(7, " Size Classes");
V_line(8, " Shape Classes");
V_line(9, " Perim./Area Index");
V_line(10, " Corr. Perim./Area Index");
V_line(11, " Rel. Circum. Circle Index");
V_line(14, " Distance Classes");
V_line(15, " Center to Center");
V_line(16, " Center to Edge");
V_line(17, " Edge to Edge");
V_line(18, " From & To Groups for di1=m7, m8, or m9");
V_ques(sel, 's', 6, 50, 1);
V_ques(sel, 's', 7, 50, 1);
V_ques(sel, 's', 9, 50, 1);
V_ques(sel, 's', 10, 50, 1);
V_ques(sel, 's', 11, 50, 1);
V_ques(sel, 's', 15, 50, 1);
V_ques(sel, 's', 16, 50, 1);
V_ques(sel, 's', 17, 50, 1);
V_ques(sel, 's', 18, 50, 1);
More information about the grass-dev