home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
CSAPE32.ARJ
/
SOURCE
/
CSSRC
/
SLEDPROT.C
< prev
next >
Wrap
Text File
|
1990-11-01
|
1KB
|
72 lines
/*
sledprot.c
% sled protection, marking, and support routines
C-scape 3.2
Copyright (c) 1989, by Oakland Group, Inc.
ALL RIGHTS RESERVED.
Revision History:
-----------------
8/04/89 gam Created
3/28/90 jmd ansi-fied
6/12/90 jdc fixed protection stuff
*/
#include "sed.h"
#include "sadecl.h"
#include "sldwinod.h"
#include "sled.h"
#include "sledprot.h"
void sled_GetMarkAttr(sed_type sed, byte *regular, byte *selected)
{
*regular = sled_GetRegAttr(sed);
*selected = sled_GetSelAttr(sed);
}
void sled_SetMarkAttr(sed_type sed, byte regular, byte selected)
{
sled_SetRegAttr(sed, regular);
sled_SetSelAttr(sed, selected);
}
void sled_setrowflags(sed_type sed, int row, boolean torf, int mask)
{
int value;
if (torf) {
value = sled_getrowspecial(sed, row) | mask;
}
else {
value = sled_getrowspecial(sed, row) & (mask^0xFFFF);
}
if (row >= sled_flagsize(sed)) {
sled_flagsize(sed) = row + 1;
}
sa_Put((sarray_type) xa_Get(sled_GetXa(sed), sled_GetWidth(sed)),
(long) row, &value);
sled_remapper(sed, 0);
}
void sled_setcolflags(sed_type sed, int col, boolean torf, int mask)
{
int value;
if (torf) {
value = ia_Get(sled_getcflags(sed), col) | mask;
}
else {
value = ia_Get(sled_getcflags(sed), col) & (mask^0xFFFF);
}
ia_Put(sled_getcflags(sed), col, value);
sled_remapper(sed, 0);
}