home *** CD-ROM | disk | FTP | other *** search
- /*
- * eeebel.c
- * contains: eeol(), ebol(), eeos(), ebos(), eline()
- *
- * Copyright (C)1987-1990 Greenleaf Software Inc. All Rights Reserved.
- */
-
- #include <stdio.h>
- #include "gfuncts.h"
-
- /*
- * void
- * eeol(void)
- *
- * DESCRIPTION
- * Erase to end of cursor line
- *
- * AUTHOR
- * "" 10-APR-1987 11:23:50.26
- */
- void GF_CONV eeol()
- {
- unsigned curpos;
- int toclear;
-
- if(!_gvmtrp)
- vmode(-1);
- curpos=_gcurvpc();
- toclear=gmaxcol-(int)(curpos&0x00ff);
- if(toclear)
- _wcvchr((char)' ',toclear);
- }
-
- /*
- * void
- * ebol(void)
- *
- * DESCRIPTION
- * Erase to beginning of cursor line.
- *
- * AUTHOR
- * David Nienhiser 10-APR-1987 11:25:49.12
- */
- void GF_CONV ebol()
- {
- unsigned curpos;
- int toclear;
-
- if(!_gvmtrp)
- vmode(-1);
- curpos=_gcurvpc();
- toclear=(int)(curpos&0x00ff)+1;
- _cursetc((int)(curpos>>8)&0x00ff,0);
- _wcvchr((char)' ',toclear);
- _cursetc((int)(curpos>>8)&0x00ff,curpos&0x00ff);
- }
-
- /*
- * void
- * eeos(void)
- *
- * DESCRIPTION
- * Erase to end of screen.
- *
- * AUTHOR
- * David Nienhiser 10-APR-1987 11:26:41.84
- */
- void GF_CONV eeos()
- {
- unsigned curpos;
- int toclear,currentrow;
-
- if(!_gvmtrp)
- vmode(-1);
- curpos=_gcurvpc();
- toclear=gmaxcol-(int)(curpos&0x00ff);
- currentrow=(int)(curpos>>8)&0x00ff;
- if(currentrow<gmaxrow-1)
- toclear+=((gmaxrow-1)-currentrow)*gmaxcol;
- if(toclear)
- _wcvchr((char)' ',toclear);
- }
-
- /*
- * void
- * ebos(void)
- *
- * DESCRIPTION
- * Erase to beginning of screen.
- *
- * AUTHOR
- * David Nienhiser 10-APR-1987 11:27:48.25
- */
- void GF_CONV ebos()
- {
- unsigned curpos;
- int toclear,currentrow;
-
- if(!_gvmtrp)
- vmode(-1);
- curpos=_gcurvpc();
- toclear=(int)(curpos&0x00ff)+1;
- currentrow=(int)(curpos>>8)&0x00ff;
- if(currentrow)
- toclear+=gmaxcol*currentrow;
- _cursetc(0,0);
- _wcvchr((char)' ',toclear);
- _cursetc((int)(curpos>>8)&0x00ff,curpos&0x00ff);
- }
-
- /*
- * void
- * eline(void)
- *
- * DESCRIPTION
- * Erase all of current line.
- *
- * AUTHOR
- * David Nienhiser 10-APR-1987 16:46:45.19
- */
- void GF_CONV eline()
- {
- unsigned curpos;
-
- if(!_gvmtrp)
- vmode(-1);
- curpos=_gcurvpc();
- _cursetc((int)(curpos>>8)&0x00ff,0);
- _wcvchr((char)' ',gmaxcol);
- _cursetc((int)(curpos>>8)&0x00ff,curpos&0x00ff);
- }
-