home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Libraries / stdwin / Appls / dpv / dpvoutput.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-09-06  |  1.1 KB  |  31 lines  |  [TEXT/????]

  1. /* dpv -- ditroff previewer.  Definitions for output. */
  2.  
  3. extern char    *devname;    /* Device for which output is prepared */
  4.  
  5. extern WINDOW    *win;        /* output window */
  6.  
  7. extern int    showpage;    /* internal page to show in window */
  8.                 /* defined in dpvcontrol.c */
  9. extern int    prevpage;    /* previous page shown (for '-' command) */
  10.  
  11. extern long    hscale, hdiv;    /* Horizontal scaling factors */
  12. extern long    vscale, vdiv;    /* Vertical scaling factors */
  13.  
  14. /* Scaling method */
  15. #define HWIN(h) ((int)(((h)*hscale+hdiv/2)/hdiv))
  16. #define VWIN(v) ((int)(((v)*vscale+vdiv/2)/vdiv))
  17. #define HWINDOW HWIN(hpos)
  18. #define VWINDOW VWIN(vpos)
  19.  
  20. /* Variables used by put1 macro below, and by recheck function */
  21.  
  22. extern int    doit;        /* nonzero if output makes sense */
  23. extern int    vwindow;    /* precomputed vpos*vscale/vdiv - baseline */
  24. extern int    baseline;    /* wbaseline() of current font */
  25. extern int    lineheight;    /* wlineheight() of current font */
  26. extern int    topdraw, botdraw;    /* window area to draw */
  27.  
  28. /* Macro to output one character */
  29.  
  30. #define put1(c) if (!doit) ; else wdrawchar(HWINDOW, vwindow, c)
  31.