home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
CSAPE32.ARJ
/
INCLUDE
/
TBPRIV.H
< prev
next >
Wrap
C/C++ Source or Header
|
1990-12-15
|
2KB
|
61 lines
/*
tbpriv.h
% private header for text buffer object
C-scape 3.2
Copyright (c) 1986-1988 by Oakland Group, Inc.
ALL RIGHTS RESERVED.
Revision History:
-----------------
11/28/88 jmd removed startsize form tb_Open, reorganized
5/23/89 jdc made tb_setcursor menu_setcursor
11/08/89 jdc changed TB_ASIZE from 200 to 22
3/28/90 jmd ansi-fied
5/04/90 jmd changed TB_BSIZE to ASIZE * 22
12/15/90 jdc added TB_COLORNNL
*/
/*** Functions ***/
/* TEXTBUF.C */
extern tb_type tb_Open(void);
extern tb_type tb_setup(tb_type tb);
extern boolean tb_Ok(tb_type textbuf);
extern int tb_FindLine(tb_type tb, int line);
extern int tb_GetRow(tb_type tb);
extern unsigned tb_GetCursor(tb_type tb);
extern void tb_Close(tb_type tb);
/* TBSTR.C */
extern int tb_strlen(tb_type tb, unsigned row, unsigned col, unsigned width, int *newline);
extern int tb_strattr(tb_type tb, unsigned row, unsigned col, long len, byte attr);
/* SDPLOAT.C */
extern void box_sort(ocbox *dbox, mcbox *sbox, int mode);
/*** Macros ***/
#define tb_SetLineLen(tb) tb_FindLine((tb), (int)tb_GetRow(tb))
#define tb_translate(tb, pos, char_p) \
( (*(char_p) == '\t') ? tb->tab_size - (pos % tb->tab_size) : 1 )
#define tb_GetCol(tb) ( (tb)->col )
#define WRAP_CUTOFF 3
#define DEF_COLOR 0x00
#define TB_COLOR 0
#define TB_SAMECOLOR 1
#define TB_COLORNNL 3 /* don't color newlines */
#define TB_ASIZE 22
#define TB_BSIZE (TB_ASIZE * 22)
#define BOXSORT_ROW 0
#define BOXSORT_COL 1
#define TB_ALL 0
#define TB_LEN 1