home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
word2x0a.zip
/
source
/
tblock.h
< prev
next >
Wrap
C/C++ Source or Header
|
1997-03-21
|
780b
|
47 lines
/* $Id: tblock.h,v 1.2 1997/03/21 20:20:53 dps Exp $ */
/* Dynamically grown text block */
#ifndef __tblock_h__
#define __tblock_h__
class tblock
{
private:
struct block
{
int limit;
int pos;
char *text;
struct block *next;
};
struct block dummy_block;
struct block *head;
static const struct block dummy_init;
const block_size=1024;
const char *collect(void) const;
public:
inline tblock(void)
{
dummy_block=dummy_init;
head=&dummy_block;
}
tblock(const tblock &);
~tblock(void);
void zero(void);
int add(char);
int add(const char *, int);
inline int add(const char *s)
{
return this->add(s, strlen(s));
}
tblock &operator=(const tblock &);
operator const char *();
};
#endif