home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / c / pcw_c.zip / QHCHAR.C < prev    next >
Text File  |  1990-01-16  |  1KB  |  37 lines

  1. /***********************************************************/
  2. /* File Id.                  Qhchar.C                      */
  3. /* Author.                   Stan Milam.                   */
  4. /* Date Written.             11/09/88.                     */
  5. /* Date Last Modified.                                     */
  6. /*                                                         */
  7. /*           (c) Copyright 1989-90 by Stan Milam           */
  8. /*                                                         */
  9. /* Comments:  This function will repeatedly write a char-  */
  10. /* acter to the screen horizontally.                       */
  11. /***********************************************************/
  12.  
  13. #include <dos.h>
  14. #include "pcw.i"
  15. #include "pcwproto.h"
  16.  
  17. int qhchar(int row,int col,int fcolor,int bcolor, char ch, int count) {
  18.  
  19.    int page, pagesize;
  20.    int mx_rows, mx_cols;
  21.    int far *scrnptr;
  22.    unsigned charattr;
  23.    unsigned offset;
  24.    unsigned scrnseg;
  25.  
  26.    if (!chk_video_state(&mx_rows,&mx_cols)) return(0);
  27.    page     = getpage();
  28.    pagesize = getpagesize();
  29.    scrnseg  = getscrnseg();
  30.  
  31.    offset   = MK_SCRNOFF(row, col);
  32.    charattr = MK_ATTR(fcolor, bcolor) | ch;
  33.    scrnptr  = (int far *) MK_FP(scrnseg,offset);
  34.    Thorzchar(count, charattr, scrnptr);
  35.    return(1);
  36. }
  37.