Category : Recently Uploaded Files
Archive   : MSQ320.ZIP
Filename : SCREEN.C

 
Output of file : SCREEN.C contained in archive : MSQ320.ZIP
/* screen.c

released into the PUBLIC DOMAIN 30 jul 1990 by jim nutt
Changes released into the PUBLIC DOMAIN 10 jul 1994 by John Dennis

if you need to port this... remember, msged uses a 1 based coordinate
system (i.e. top left is (1,1) NOT (0,0)).

*/

#include "msged.h"
#include "winsys.h"

static int autostart = 0;
static unsigned int *macro = NULL;

unsigned int KeyHit(void)
{
if (macro)
return 0;

if (TTPeekQue())
return 1;

return 0;
}

void cursor(char state)
{
TTCurSet(state);
}

unsigned int GetKey(void)
{
int ch;

if ((macros[0] != NULL) && !autostart)
{
autostart = 1;
macro = macros[0];
}

if (macro != NULL)
{
if (*(++macro))
return (*macro);

macro = NULL;
}

ch = TTGetChr();

if (ch >= 0x3b && ch <= 0x44)
macro = macros[ch - 0x3a];
else
{
if (ch >= 0x54 && ch <= 0x71)
macro = macros[ch - 0x49];
}

if (macro != NULL)
{
if (*macro)
return(*macro);

macro = NULL;
}

return ch;
}

unsigned int ConvertKey(int ch)
{
int idx = ch >> 8;

if (ch == 0)
{
if ((macros[0] != NULL) && !autostart)
{
autostart = 1;
macro = macros[0];
}

if (macro != NULL)
{
if (*(++macro))
return (*macro);

macro = NULL;
}
return 0;
}

if (idx >= 0x3b && idx <= 0x44)
macro = macros[idx - 0x3a];
else
{
if (idx >= 0x54 && idx <= 0x71)
macro = macros[idx - 0x49];
}

if (macro != NULL)
{
if (*macro)
return(*macro);

macro = NULL;
}

return ch;
}


/* end */


  3 Responses to “Category : Recently Uploaded Files
Archive   : MSQ320.ZIP
Filename : SCREEN.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/