1987-07-01 17:24:10 +00:00
|
|
|
/* Structures used for the C_insertpart, C_beginpart, and C_endpart
|
|
|
|
mechanism. Each part consists of a list of chunks. Each chunk is
|
|
|
|
either another part, or a piece of text limited by a begin- and an
|
|
|
|
end-pointer.
|
|
|
|
*/
|
|
|
|
|
1994-06-24 11:31:16 +00:00
|
|
|
/* $Id$ */
|
1989-10-13 14:03:25 +00:00
|
|
|
|
1987-08-06 10:48:14 +00:00
|
|
|
#include <system.h>
|
1988-01-14 13:34:42 +00:00
|
|
|
#include <local.h>
|
1987-08-06 10:48:14 +00:00
|
|
|
|
1988-01-14 13:34:42 +00:00
|
|
|
#if BIGMACHINE
|
1987-08-06 10:48:14 +00:00
|
|
|
#define INCORE /* mechanism implemented incore */
|
1988-01-14 13:34:42 +00:00
|
|
|
#endif
|
1987-08-06 10:48:14 +00:00
|
|
|
|
1987-07-01 17:24:10 +00:00
|
|
|
typedef struct partofpart {
|
|
|
|
struct partofpart *pp_next;
|
|
|
|
char pp_type;
|
|
|
|
#define TEXT 0
|
|
|
|
#define INSERT 1
|
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
long ppu_begin, ppu_end;
|
|
|
|
} ppu_s;
|
|
|
|
int ppu_id;
|
|
|
|
} pp_u;
|
|
|
|
#define pp_begin pp_u.ppu_s.ppu_begin
|
|
|
|
#define pp_end pp_u.ppu_s.ppu_end
|
|
|
|
#define pp_id pp_u.ppu_id
|
|
|
|
} PartOfPart;
|
|
|
|
|
|
|
|
typedef struct part {
|
|
|
|
struct part *p_next; /* next part in hash chain */
|
|
|
|
char p_flags;
|
|
|
|
#define BUSY 1
|
|
|
|
PartOfPart *p_parts; /* chunks of this part */
|
|
|
|
struct part *p_prevpart; /* implements stack of active parts */
|
|
|
|
int p_id; /* id of this part */
|
|
|
|
} Part;
|
|
|
|
|
|
|
|
#define TABSIZ 32
|
|
|
|
|
|
|
|
extern int
|
|
|
|
C_ontmpfile, C_sequential;
|
|
|
|
extern Part
|
1991-03-22 15:17:16 +00:00
|
|
|
*C_curr_part;
|
1987-08-06 10:48:14 +00:00
|
|
|
#ifdef INCORE
|
|
|
|
extern char
|
|
|
|
*C_current_out, *C_BASE;
|
|
|
|
#define C_opp C_current_out
|
|
|
|
#else
|
1987-07-01 17:24:10 +00:00
|
|
|
extern long
|
|
|
|
C_current_out;
|
1987-08-06 10:48:14 +00:00
|
|
|
extern char *C_opp;
|
|
|
|
#define C_BASE 0
|
|
|
|
#endif
|
1988-01-14 13:34:42 +00:00
|
|
|
extern int (*C_outpart)(), (*C_swtout)(), (*C_swttmp)();
|
1987-08-06 10:48:14 +00:00
|
|
|
|
|
|
|
extern File *C_ofp;
|
|
|
|
|
|
|
|
#ifndef INCORE
|
1991-03-22 15:17:16 +00:00
|
|
|
extern File *C_tfr;
|
1987-08-06 10:48:14 +00:00
|
|
|
extern char *C_tmpfile;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern char *C_top;
|
1988-01-14 13:34:42 +00:00
|
|
|
extern char *C_ibuf;
|
1987-08-06 10:48:14 +00:00
|
|
|
|
|
|
|
#define put(c) if (C_opp == C_top) C_flush(); *C_opp++ = (c)
|
|
|
|
|