home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_01_01 / 1n01050a < prev    next >
Text File  |  1990-05-17  |  804b  |  38 lines

  1. *****Listing 3*****
  2.  
  3. #include    <stdio.h>
  4.  
  5. extern    int    text_height;
  6.  
  7. /**************************************************
  8. *    lj_outtextxy() - output string to laser printer
  9. *
  10. *    Parameters:
  11. *        x (in) - x position in dots.
  12. *        y (in) - y position in dots.
  13. *        string (in) - string to output
  14. *
  15. *    Global:
  16. *        text_height - height of text characters.
  17. *
  18. *    Notes:
  19. *        1.    Compiled with Turbo C version 2.0
  20. *        2.    x,y = 0,0 is upper left corner of page
  21. *
  22. *    History:
  23. *        Original code by William H. Roetzheim, 1990
  24. ***************************************************/
  25.  
  26.  
  27. void    lj_outtextxy(int x, int y, char *string)
  28. {
  29.     /* adjust y position */
  30.     y += text_height;
  31.  
  32.     /* move cursor to new position */
  33.     fprintf(stdprn, "\033*p%dx%dY", x, y);
  34.  
  35.     /* output string */
  36.     fprintf(stdprn, string);
  37. }
  38.