Category : OS/2 Files
Archive   : EMXTST8F.ZIP
Filename : VIDEO.C

 
Output of file : VIDEO.C contained in archive : EMXTST8F.ZIP
/* video.c (emx+gcc) */

#include
#include
#include
#include

extern char *_v_mem; /* Used for testing */

static void prt (const char *s)
{
while (*s != 0)
{
v_putc (*s);
++s;
}
}


int main (int argc, char *argv[])
{
int width, height;
int x, y;
int start, end;
int no_mem_flag;

no_mem_flag = 0;
if (argc == 2 && strcmp (argv[1], "-n") == 0)
no_mem_flag = 1;

if (!v_init ())
{
fprintf (stderr, "v_init() failed.\n");
return (1);
}

if (no_mem_flag)
_v_mem = NULL;

v_dimen (&width, &height);
v_getxy (&x, &y);
v_getctype (&start, &end);
printf ("<- (%d,%d)\n", x, y);
printf ("Width=%d, height=%d\n", width, height);
printf ("Cursor: start=%d, end=%d\n", start, end);
v_gotoxy (10, 5);
printf ("<- (10,5)\n");
v_ctype (0, end);
v_gotoxy (0, height-2);
prt ("Hello 1\nHello 2\nHello 3");
v_printf (" -- hello, this is printf");
return (0);
}


  3 Responses to “Category : OS/2 Files
Archive   : EMXTST8F.ZIP
Filename : VIDEO.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/