home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
376_01
/
os2tool.000
/
BLANK.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-07-11
|
1KB
|
64 lines
/*
* BLANKER.C - Screen saver program.
*
*
* PROGRAMMER: Martti Ylikoski
* CREATED: 11.7.1991
*/
static char *VERSION = "Version 1.0" ;
/*
*/
static char *progname ;
#include <stdio.h>
#include <string.h>
#include <memory.h>
#define INCL_DOS
#define INCL_KBD
#define INCL_VIO
#define INCL_DOSPROCESS
#include <os2.h>
typedef struct kbdpacket
{
unsigned monflags ;
KBDKEYINFO kbdkeyinfo ;
unsigned ddflags ;
} KBDBUF ;
KBDBUF kbdbuf ;
int main(int argc, char *argv[])
{
USHORT ret ;
USHORT fWait ;
VIOMODEINFO viomodeinfo ;
KBDKEYINFO kbdkeyinfo ;
int col, row, outf ;
fWait = VP_WAIT | VP_OPAQUE ;
VioPopUp( &fWait, 0 ) ;
viomodeinfo.cb = sizeof(viomodeinfo) ;
VioGetMode(&viomodeinfo, 0) ;
outf = FALSE ;
while ( outf == FALSE)
for (row = 0; row < viomodeinfo.row && outf == FALSE ; row ++)
for (col = 0 ; col < viomodeinfo.col && outf == FALSE; col ++)
{
VioSetCurPos(row, col, 0) ;
ret = KbdCharIn(&kbdkeyinfo, IO_NOWAIT, 0) ;
if (kbdkeyinfo.fbStatus != 0)
{
outf = TRUE ;
break ;
}
DosSleep(1000L) ;
}
VioEndPopUp(0) ;
return( 0 ) ;
}