21 |
|
|
22 |
void end_diversions(); |
void end_diversions(); |
23 |
|
|
24 |
|
#include "mtsm.h" |
25 |
|
|
26 |
class diversion { |
class diversion { |
27 |
friend void do_divert(int append, int boxing); |
friend void do_divert(int append, int boxing); |
28 |
friend void end_diversions(); |
friend void end_diversions(); |
38 |
vunits vertical_position; |
vunits vertical_position; |
39 |
vunits high_water_mark; |
vunits high_water_mark; |
40 |
public: |
public: |
41 |
|
int any_chars_added; |
42 |
int no_space_mode; |
int no_space_mode; |
43 |
|
int needs_push; |
44 |
|
int saved_seen_break; |
45 |
|
int saved_seen_space; |
46 |
|
int saved_seen_eol; |
47 |
|
int saved_suppress_next_eol; |
48 |
|
state_set modified_tag; |
49 |
vunits marked_place; |
vunits marked_place; |
50 |
diversion(symbol s = NULL_SYMBOL); |
diversion(symbol s = NULL_SYMBOL); |
51 |
|
|
52 |
virtual ~diversion(); |
virtual ~diversion(); |
53 |
virtual void output(node *nd, int retain_size, vunits vs, vunits post_vs, |
virtual void output(node *nd, int retain_size, vunits vs, vunits post_vs, |
54 |
hunits width) = 0; |
hunits width) = 0; |
66 |
virtual void set_diversion_trap(symbol, vunits) = 0; |
virtual void set_diversion_trap(symbol, vunits) = 0; |
67 |
virtual void clear_diversion_trap() = 0; |
virtual void clear_diversion_trap() = 0; |
68 |
virtual void copy_file(const char *filename) = 0; |
virtual void copy_file(const char *filename) = 0; |
69 |
|
virtual int is_diversion() = 0; |
70 |
}; |
}; |
71 |
|
|
72 |
class macro; |
class macro; |
91 |
void set_diversion_trap(symbol, vunits); |
void set_diversion_trap(symbol, vunits); |
92 |
void clear_diversion_trap(); |
void clear_diversion_trap(); |
93 |
void copy_file(const char *filename); |
void copy_file(const char *filename); |
94 |
|
int is_diversion() { return 1; } |
95 |
}; |
}; |
96 |
|
|
97 |
struct trap { |
struct trap { |
148 |
void set_diversion_trap(symbol, vunits); |
void set_diversion_trap(symbol, vunits); |
149 |
void clear_diversion_trap(); |
void clear_diversion_trap(); |
150 |
void set_last_page() { last_page_count = page_count; } |
void set_last_page() { last_page_count = page_count; } |
151 |
|
int is_diversion() { return 0; } |
152 |
}; |
}; |
153 |
|
|
154 |
extern top_level_diversion *topdiv; |
extern top_level_diversion *topdiv; |