home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / examples / c / ex1 < prev    next >
Encoding:
Text File  |  1993-11-01  |  734 b   |  36 lines

  1. /*52 instructions*/
  2.  
  3. #include "colourtrans.h"
  4. #include "font.h"
  5. #include "os.h"
  6. #include "pdriver.h"
  7.  
  8. os_error *x (int page, char *t)
  9.  
  10. {  bool more;
  11.    os_box req;
  12.    os_error *error = NULL;
  13.  
  14.    if ((error = xpdriver_draw_page (1, &req, page, NULL, &more,
  15.          NULL)) != NULL)
  16.       goto finish;
  17.  
  18.    while (more)
  19.    {  if ((error = xcolourtrans_set_gcol (os_COLOUR_BLACK,
  20.             colourtrans_SET_FG, os_ACTION_OVERWRITE, NULL, NULL))
  21.             != NULL)
  22.          goto finish;
  23.  
  24.       if ((error = xfont_paint (0, t, NONE, 0, 0, NULL, NULL, 0))
  25.             != NULL)
  26.          goto finish;
  27.  
  28.       if ((error = xpdriver_get_rectangle (&req, &more, NULL)) !=
  29.             NULL)
  30.          goto finish;
  31.    }
  32.  
  33. finish:
  34.   return error;
  35. }
  36.