home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / textutil / tex / p_drivers / !TeX / TeXSource / beebe / h / outrow < prev    next >
Encoding:
Text File  |  1992-01-13  |  1.1 KB  |  33 lines

  1. /* -*-C-*- outrow.h */
  2. /*-->outrow*/
  3. /**********************************************************************/
  4. /******************************* outrow *******************************/
  5. /**********************************************************************/
  6.  
  7. #ifdef __STDC__
  8. void
  9. outrow(BYTE c, UNSIGN16 yoff)
  10. #else
  11. void
  12. outrow(c,yoff)    /* copy img_row[] into rasters[] if allocated, else no-op */
  13. BYTE c;        /* current character value */
  14. UNSIGN16 yoff;    /* offset from top row (0,1,...,hp-1) */
  15. #endif
  16. {
  17.     register UNSIGN16 k;    /* loop index */
  18.     register UNSIGN32 *p;    /* pointer into img_row[] */
  19.     register UNSIGN32 *q;    /* pointer into rasters[] */
  20.     register struct char_entry *tcharptr; /* temporary char_entry pointer */
  21.     UNSIGN16 words_per_row;    /* number of raster words to copy */
  22.  
  23.     tcharptr = &(fontptr->ch[c]);
  24.     if (tcharptr->rasters != (UNSIGN32*)NULL)
  25.     {
  26.     words_per_row = (UNSIGN16)(tcharptr->wp + 31) >> 5;
  27.     p = tcharptr->rasters + yoff*words_per_row;
  28.     q = img_row;
  29.     for (k = words_per_row; k; --k)    /* copy img_row[] into rasters[] */
  30.         *p++ = *q++;
  31.     }
  32. }
  33.