home *** CD-ROM | disk | FTP | other *** search
- /* writeline.c -- (part of efr) Copyright © 1989 by William F. Hammond */
- /* c -- write the line contained in the passed chain */
- /* of LineParts */
- #ifndef TDM_H
- #include "tdm.h"
- #endif
- /*********************************************************************/
- SHORT writeline(lp)
- struct LinePart *lp;
- {
- struct LinePart *lpn;
- ULONG addstyle;
- LONG horpos;
- SHORT trowpix;
- while (lp)
- {
- if(lp->lp_DrawStyle)
- {
- lp->lp_DrawStyle --;
- drawmode = (LONG)lp->lp_DrawStyle;
- SetDrMd(rp, drawmode);
- }
- if(lp->lp_FontStyle)
- {
- lp->lp_FontStyle --;
- addstyle = (ULONG)lp->lp_FontStyle;
- if(addstyle) style = style | addstyle;
- else style = (ULONG)FS_NORMAL;
- savestyle = SetSoftStyle(rp, style, enable);
- }
- if(lp->lp_Move)
- {
- trowpix = rp->cp_y + ((SHORT)lp->lp_Move)*delta;
- Move(rp, (LONG)rp->cp_x, (LONG)trowpix);
- }
- if(lp->lp_Trans)
- {
- horpos = (LONG)rp->cp_x;
- horpos = horpos + ( lp->lp_Trans * (LONG)rp->TxWidth );
- if(horpos >= 0L) Move(rp, horpos, (LONG)rp->cp_y);
- }
- if(lp->lp_Length) Text(rp, lp->lp_Address, (ULONG)lp->lp_Length);
- lpn = lp->lp_Next;
- FreeMem(lp, LPSZ);
- lp = lpn;
- } /* loop while(lp) */
- return 0;
- }
-