Category : Files from Magazines
Archive   : CUJ9208.ZIP
Filename : RYAN1.LIS

 
Output of file : RYAN1.LIS contained in archive : CUJ9208.ZIP

-----------------------------------------------------------------
LISTING I
INKEY FUNCTION FOR USE WITH VAX/VMS

#include descrip

#define DEV_NAM "MYTERM"
#define DEV_NAM_LEN 6

char inkey(short int chan)
{
char ch;
unsigned int stat;

stat = sys$qio(0,chan,113,0,0,0,&ch,1,0,0,0,0);
if ( stat != 1 ) return -1; return ch;
}



main()
{
struct dsc$descriptor symbol, result;
short int chan;
unsigned int stat;
unsigned short int reslen;
int table = 2;
char c, symname[32] = DEV_NAM, resname[128];

symbol.dsc$w_length = DEV_NAM_LEN;
symbol.dsc$b_dtype = DSC$K_DTYPE_T;
symbol.dsc$b_class = DSC$K_CLASS_S;
symbol.dsc$a_pointer = &symname;

result.dsc$w_length = 128;
result.dsc$b_dtype = DSC$K_DTYPE_T;
result.dsc$b_class = DSC$K_CLASS_S;
result.dsc$a_pointer = &resname;

stat = lib$get_symbol(&symbol,&result,&reslen,&table);
if ( stat != 1 ) exit( stat );
resname[reslen] = '\0';
printf("%s",resname);

result.dsc$w_length = reslen;

stat = sys$assign(&result,&chan,0,0);
if ( stat != 1 )
{
printf("error assigning channel\n");
exit(stat);
}

while ((c = inkey(chan)) != -1) printf("%c,%d\n",c,c);

}





  3 Responses to “Category : Files from Magazines
Archive   : CUJ9208.ZIP
Filename : RYAN1.LIS

  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/