printf("\t<Filename> Installs the font <Filename>\n");
printf("\t-f Force yes on all questions\n");
printf("\t-d Display status only\n");
printf("\t-? This help\n");
printf("\t-h This help\n");
printf("\nThis program changes the current font in a fullscreen OS/2 VIO\n");
printf("See docs for more information.\n");
printf("%s\n",COPYRIGHT);
exit(1);
}
void PrintError(APIRET err) /* Prints errors */
{
switch (err) {
case 494:
printf("You can't run this program in an Windowed session.\n");
break;
case 355:
printf("Sorry, your drivers does not support this call.\nGet newer drivers and try again or give up.. :(.\nYou must exit this session, since it's \"broken\" now.\n");
break;
default:
printf("An error has occurred, errorcode: %ld\n",err);
break;
}
}
int main(int argc,char*argv[]) /* Main .. */
{
VIOFONTINFO font;
UCHAR buf[65535];
UCHAR *fname;
FILE*file;
APIRET rc;
int c;
printf("tFont v1.0 by Tomas Ögren <stric@freenet.hut.fi>\n\n");
fflush(stdout);
opterr = 0;
while ((c = getopt (argc, argv, "df")) != EOF)
switch (c)
{
case 'd':
opt_displayonly = 1;
break;
case 'f':
opt_force = 1;
break;
default:
usage ();
}
if (!opt_displayonly)
if (argc - optind != 1)
usage ();
fname=argv[optind];
font.cb=sizeof(font); /* How large is this structure */
font.type=0; /* Dunno, If you know what it is, mail me! */
font.cbData=65535; /* How large is my buffer? */
font.pbData=_emx_32to16(buf); /* Wants an 16:16 pointer, converting */
rc=VioGetFont (&font,0); /* Retrieve data for current font */