home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
CSAPE32.ARJ
/
SOURCE
/
CSSRC
/
SDOVER.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-28
|
1KB
|
53 lines
/*
sdover.c
% sd_overwrite
C-scape 3.2
Copyright (c) 1986, 1987, by Oakland Group, Inc.
ALL RIGHTS RESERVED.
Revision History:
-----------------
11/18/87 jmd changed name of function
6/30/88 jmd added windows
9/11/88 jmd removed extra argument
12/02/88 jmd fixed "doesn't paint when scrolled" bug
12/14/88 jmd hand optimized
3/24/89 jmd added sed_ macros
4/11/89 jmd added single field paint optimization
4/13/89 jmd added sed_GetCurrField macro
5/24/89 jmd added clipping (via sd_paintbox)
8/23/89 jmd Added cache flag support
3/28/90 jmd ansi-fied
*/
#include "sed.h"
void sd_overwrite(sed_type sed)
/*
modifies: the screen.
effects: prints character c at the current position.
*/
{
int fp, col;
field_type field;
cs_Assert(sed_Ok(sed), CS_MD_OVR_SED, 0);
field = sed_GetCurrField(sed);
fp = (sed_GetRecordPos(sed) > 0) ? sed_GetRecordPos(sed) : 0;
col = field_GetCol(field) + field_GetR2M(field, fp) - field_GetXoffset(field);
/* do we need to cache? */
if (sed_IsActive(sed) && !sed_IsCache(sed)) {
disp_Cache();
sed_SetCache(sed, TRUE);
}
sd_paintbox(sed, field_GetRow(field), col, 1, 1, sed_GetFieldNo(sed));
}