[Coco] OS9 Save and Restore Window
Robert Gault
robert.gault at worldnet.att.net
Wed Jan 4 10:06:55 EST 2006
Tim, I have been trying to compile the program to see what it actually
does. However, I'm not making much progress as there are differences in
our DEF and LIB directories. I did generate the getwind.r and setwind.r
modules and merged them with a pre-existing gfx.r and cgfx.l but get
Window and _gs unresolved references.
Any suggestions?
tim lindner wrote:
> On RTSI there is a library call Window_SaveRestore_fncs.lzh. It allows
> recording all of the characteristics of a Windint window. This is nice
> to be able to save a window, change it and then change it back. But I
> found a problem that I don't fully understand.
>
> Here is the program:
>
> /* status.c - testing cgfx status functions */
>
> #include <stdio.h>
> #include <sgstat.h>
> #include <window.h>
> #include <buffs.h>
> #define STDIN 0
> #define STDOUT 1
> #define BLACK 2
>
> main()
> {
> WINDOW *w;
> w = getwind(STDOUT);
> DWEnd(STDOUT);
> DWSet(STDOUT,8,0,0,40,24,0,1,2);
> system( "merge /dd/sys/stdfonts" );
> Font(STDOUT,GRP_FONT,FNT_S8X8);
> Select(STDOUT);
> CurOff(STDOUT);
> BColor(STDOUT,0);
> FColor(STDOUT,1);
> Clear(STDOUT);
> CurXY(STDOUT,6,10);
> write(STDOUT,"This is now a Type 8 window!",28);
> tsleep(300);
> Clear(STDOUT);
> CurXY(STDOUT,8,9);
> write(STDOUT,"I will now reset back to",24);
> CurXY(STDOUT,8,11);
> write(STDOUT,"original characteristics",24);
> tsleep(180);
> if(w != NULL)
> setwind(STDOUT,w);
> Select(STDOUT);
> }
>
> The library and the above program work well when run from the command
> line. But when you run the program with the standard input redirected
> from a file, it doesn't. The screen goes blank, and the returns to
> normal after the program finishes.
>
> This means I can't run the program from a shell script. I've tried the
> program with the newest NitrOS-9 and also stock OS-9. Both exhibit the
> same behaivor.
>
> I would like to find the root cause of what I am seeing. But I need to
> ask, Is there something in OS-9 that would keep this from working? Or
> have I found a bug?
>
More information about the Coco
mailing list