#include <dos/dosextens.h>
#include <dos/dos.h>
#include <proto/dos.h>
#include <stdlib.h>
#include <stdio.h>

void ttext(char *);

void main(int argc, char *argv[])
{

 /*  Kills all mouse fields */
 printf("!|1K\n");

 /*  Reset Screen  */
 printf("!|*\n");

 /*  Define text window  */
 printf("!|w050A2D0Z11\n");

 /*  Make a box */
 printf("!|R0S24GT8011\n");

 /* Das Okay button--Returns ^m (CR) */

 /* Set font to default, horiz, size 1, resolution 0 (?) */
 printf("!|Y00000200\n");

 printf("!|1B0000020QO0040E000F080700000F07000000\n");
 printf("!|1U6Z8OAF987400<>Okay<>^M\n");

 /*  Setting color to light green */
 printf("!|c0A\n");

 /* Set font to Sans Serif, horiz, size 4, resolution 0 (?) */
 printf("!|Y03000400\n");

 /*  Display text at */
 printf("!|@4G0DRIPType by Guy Smith\n");

 /*  RIP done */
 printf("!|#|#|#\n");

 /* Now, lets display some text */

 ttext(argv[1]);

 /*  Reset to text window */

 printf("!|*\n");

}

void ttext(fname)
char *fname;
{
 struct FileHandle *f1;
 int t=0;
 char buf[100];
 char s[10];

 if((f1=Open(fname, MODE_OLDFILE))==0)
  return;

 while (FGets(f1, buf, 79)!=NULL) {
  t++;
  printf("%s", buf);
  if (t==25) {
   printf("[PAUSE]");
   gets(s);
   t=0;
  }
 }
 Close(f1);
 printf("EOF");
 gets(s);
 return;
}
