Textwindow under GEM
written by Heinz Rath 

I have originally written this functions under Borland C using the the
original Turbo C bindings from GEM PTK. I have added modifications so that
it should now work without problems under Turbo C,Borland C and Pacific C.
If the textline is larger than the number of columns of the textwindow the
line is wraped and continued in the next line.
A new line is only made if you add \n like when using printf.When the
textwindow is full written and you print a new line the window is automatic
cleared.(No scrolling at the moment).
If you write extensions to this functions or find a error or have suggestions
please write to me. If you compile the file TWDEMO.C and start it you will
see a demonstration of the new commands.You could also use TW.C to write
your own programms that should use Textwindows.TWDEMO needs to be linked
with TW.C. 

This are the new commands

  void init_textmode(int br,int lin,WORD x,WORD y)
      Initilaize the textwindow
      br  = number of columns of textwindow
      lin = number of lines of textwindow
      x   = X - Position of textwindow
      y   = Y - Position of textwindow

  void clrscr()
      Clears the textwindow

  void clreol()
      Clears from the cursorposition to the enf of line

  void textcolor(WORD co)
      Sets the textcolor (Std. is Black)

  void gotoxy(int xg,int yg)
      Sets the writeposition in textwindow

  void gemprintf(char *fmt,...)
      Like printf the following styles are implemented
      \n,\r,%c,%s,%d,%u for a new line you must \n like when using printf.
      %u ( is a bit buggy )

                                                               
I hope this usefull.

Heinz Rath
hans.rath@vpn.at

