home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff254.lzh / Etale / writeline.c < prev   
C/C++ Source or Header  |  1989-10-19  |  1KB  |  49 lines

  1. /*  writeline.c  -- (part of efr)  Copyright © 1989 by William F. Hammond  */
  2. /*            c  --  write the line contained in the passed chain          */
  3. /*                   of LineParts                                          */
  4. #ifndef TDM_H
  5. #include "tdm.h"
  6. #endif
  7. /*********************************************************************/
  8. SHORT writeline(lp)
  9. struct LinePart *lp;
  10. {
  11. struct LinePart *lpn;
  12. ULONG addstyle;
  13. LONG  horpos;
  14. SHORT trowpix;
  15.    while (lp)   
  16.       {
  17.       if(lp->lp_DrawStyle)
  18.          {
  19.          lp->lp_DrawStyle --;
  20.          drawmode = (LONG)lp->lp_DrawStyle;
  21.          SetDrMd(rp, drawmode);
  22.          }
  23.       if(lp->lp_FontStyle)
  24.          {
  25.          lp->lp_FontStyle --;
  26.          addstyle = (ULONG)lp->lp_FontStyle;
  27.          if(addstyle) style = style | addstyle;
  28.          else style = (ULONG)FS_NORMAL;
  29.          savestyle = SetSoftStyle(rp, style, enable);
  30.          }
  31.       if(lp->lp_Move)
  32.          {
  33.          trowpix = rp->cp_y + ((SHORT)lp->lp_Move)*delta;
  34.          Move(rp, (LONG)rp->cp_x, (LONG)trowpix);
  35.          }
  36.       if(lp->lp_Trans)
  37.          {
  38.          horpos = (LONG)rp->cp_x;
  39.          horpos = horpos + ( lp->lp_Trans * (LONG)rp->TxWidth );
  40.          if(horpos >= 0L) Move(rp, horpos, (LONG)rp->cp_y);
  41.          }
  42.       if(lp->lp_Length) Text(rp, lp->lp_Address, (ULONG)lp->lp_Length);
  43.       lpn = lp->lp_Next;
  44.       FreeMem(lp, LPSZ);
  45.       lp = lpn;
  46.       }     /*  loop while(lp)  */
  47. return 0;
  48. }
  49.