huver@amgraf.UUCP (Huver) (01/03/89)
There were some comments about how the Stevie editor doesn't start up
right when `run' command is used. In Stevie, the `amiga.c' utilizes
Input() and IsInteractive() functions as a guide to determine whether it
is running interactively, from the current window (the one CLI or AmigaShell
uses).
This is obviously not a good choice. If we use the example below:
/* test.c */
#include <exec/types.h>
#include <libraries/dosextens.h>
main()
{
struct FileHandle *mytty, *Input();
BOOL type, IsInteractive();
mytty = Input();
type = IsInteractive(mytty);
printf("type = %d\n", type);
}
One would get (with both CLI and AmigaShell):
1> test 1> run test 1> test <test.c
type = -1 [CLI 2] type = 0
type = 0
A wiser choice is definitely to have Stevie open its own WB window and
run from there.
-----
huver uunet!amgraf!huver
816-474.4797
grwalter@watcgl.waterloo.edu (Fred Walter) (01/06/89)
In article <214@amgraf.UUCP> huver@amgraf.UUCP (Huver) writes: > >There were some comments about how the Stevie editor doesn't start up >right when `run' command is used. In Stevie, the `amiga.c' utilizes >Input() and IsInteractive() functions as a guide to determine whether it >is running interactively, from the current window (the one CLI or AmigaShell >uses). The problem seems to be that some of the characters that the console sends to STEVIE to tell it what the screen size is at start up are sometimes lost. I had this happen occasionally to me when I used Lattice's getchar() routine for input. When I changed to the AmigaDOS Read() routine the problem went away for me and I assumed it had been fixed. Obviously not. Oh well. If anyone has any ideas why I would be losing characters from the console I'd appreciate hearing them. Or, even better, how to I find out where the window structure of the current task (eg. STEVIE) is, so that I can from it find out the window size. >This is obviously not a good choice. If we use the example below: > >1> test 1> run test 1> test <test.c >type = -1 [CLI 2] type = 0 > type = 0 Luckily not very many people will run STEVIE with input re-directed from a file. :-) :-) >A wiser choice is definitely to have Stevie open its own WB window and >run from there. But I prefer to have it startup in the current window if it is at all possible. fred