TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: LARRY OLSON 72227,3467 (X)
from: Mike Haaland 72300,1433
date: 1993-05-05 03:51:15
subject: #18011-makpal

#: 18031 S12/OS9/68000 (OSK)
    05-May-93  03:51:15
Sb: #18011-makpal
Fm: Mike Haaland 72300,1433
To: LARRY OLSON 72227,3467 (X)


Your modules are fine.  They are data modules that get data written to them,
when that happens the CRC is no longer valid.  It's just the way data modules
are. :)

** Here's a little sample of how to open a new window and
** read from it.  If you need an explination just yell.
*/

#include 
#include 

extern int errno;

#ifndef TRUE
#define TRUE  1
#define FALSE 0
#endif

main()
{
        int wpath;

    /* Open /w */
    if ((wpath = open("/w",3)) == -1)
        exit(_errmsg(errno,"Can't open /w\n"));
    /* Set up the window */
    if (DWSet(wpath,3,0,0,40,26,0xff,2,0) == -1)
        exit(_errmsg(errno,"Can't Setup /w\n"));
    /* Now display it */
    Select(wpath);

    /* Do stuff on wpath */
    do_stuff(wpath);
    /* Reselect the first screen */
    Select(0);
    /* Close the other window */
    close(wpath);
    exit(0);
}

do_stuff(path)
int path;
{
        unsigned char key;
        int xit = FALSE;

        _ss_wset(path,WT_FBOX,NULL);

    /* Now just sit and wait for a character */
        do {
                while (_gs_rdy(path) <= 0)   /* wait for a input */
                    tsleep(0x80000020);      /* go to sleep for 1/8 of a second */

            read(path,&key,1);           /* read the keypress */
                switch(key) {
            case 'q':
                xit = TRUE;
                break;
            default:
                Bell(path);
            }
        } while (! xit);
}

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.