118
125
extern struct he_message_s *he_messages;
122
129
he_message( int beep, char *fmt, ... );
128
he_refresh_part( /* struct he_s *hedit, long pos1, long pos2 */ );
131
he_refresh_lines( /* struct he_s *hedit, int first, int last */ );
134
he_refresh_check( /* struct he_s *hedit */ );
135
he_refresh_part(struct he_s *hedit, long pos1, long pos2);
138
he_refresh_lines(struct he_s *hedit, int first, int last);
141
he_refresh_check(struct he_s *hedit);
136
143
#define he_refresh_all(hedit) ((void)he_refresh_part((hedit), 0, -1))
139
he_refresh_screen( /* const struct he_s *hedit */ );
146
he_refresh_screen(const struct he_s *hedit);
142
he_update_screen( /* struct he_s *hedit */ );
149
he_update_screen(struct he_s *hedit);
145
152
struct he_command_s {
208
215
* - The inserted/deleted data.
212
he_free_command( /* struct he_command_s *command */ );
219
he_free_command(struct he_command_s *command);
213
220
/* Free the memory allocated by command and all the following commands
218
he_compound_comand( /* struct he_s *hedit, struct he_command_s *command */ );
225
he_compound_comand(struct he_s *hedit, struct he_command_s *command);
221
he_subcommand( /* struct he_s *hedit,
222
int type, long position, long count, char *data */ );
228
he_subcommand(struct he_s *hedit,
229
int type, long position, long count, char *data);
223
230
/* Update the undo-list of `hedit' by inserting the given subcommand.
224
231
* The command is *not* performed by calling `he_subcommand()'.
225
232
* A sequence of subcommands must be terminated by calling
250
extern const struct buffer_s NO_BUFFER;
251
extern struct buffer_s *current_buffer;
257
extern const struct buffer_s NO_BUFFER;
258
extern char *alternate_buffer;
259
extern struct buffer_s *current_buffer;
260
extern char *he_pagerprg;
257
typedef char *(*exh_fn)( /* struct he_s *, char *, long, long */ );
266
typedef char *(*exh_fn)(struct he_s *, char *, long, long);
259
268
struct exh_cmd_s {
275
284
#define HE_LINE(x) ((long)(x) >> 4)
278
he_open_buffer( /* char *name, char *path */ );
281
he_select_buffer( /* char *name */ );
284
he_alternate_buffer( /* void */ );
287
he_set_buffer_readonly( /* char *name */ );
287
he_open_buffer(char *name, char *path);
290
he_select_buffer(char *name);
293
he_alternate_buffer(void);
296
he_set_buffer_readonly(char *name);
288
297
/* Return values:
289
298
* -1: no buffer named `name'
294
he_buffer_readonly( /* char *name */ );
303
he_buffer_readonly(char *name);
295
304
/* Return values:
296
305
* -1: no buffer named `name'
297
306
* 0: buffer is readwrite
298
307
* 1: buffer is readonly
302
he_buffer_modified( /* char *name */ );
311
he_buffer_modified(char *name);
303
312
/* Return values:
304
313
* -1: no buffer named `name'
305
314
* 0: buffer saved
306
315
* 1: buffer modified
310
he_close_buffer( /* char *name */ );
319
he_close_buffer(char *name);
311
320
/* Close the buffer named `name'. If `name == 0', the current buffer
312
321
* is closed. The return value is 0 if all goes well, 1 if the named
313
322
* buffer doesn't exist and -1 if the `buffer_list' is empty.
317
he_status_message( /* int verbose */ );
326
he_status_message(int verbose);
318
327
/* display name and size of the current buffer. if `verbose' is set,
319
328
* the current position is also displayed.
323
he_select( /* struct he_s *hedit, long begin, long end */ );
326
he_cancel_selection( /* struct he_s *hedit */ );
329
he_search( /* struct he_s *, char *, char *, int, int, int, long,
330
char **, long *, long * */ );
332
he_select(struct he_s *hedit, long begin, long end);
335
he_select_buffer_(struct buffer_s *);
338
he_cancel_selection(struct he_s *hedit);
341
he_search(struct he_s *, char *, char *, int, int, int, long,
342
char **, long *, long *);
345
he_search_command(struct he_s *, char *, int);
348
he_query_command(char *, char *, int);
334
352
he_query_yn( int dfl, char *fmt, ... );
340
he_mainloop( /* struct he_s *hedit */ );
358
he_mainloop(struct he_s *hedit);
363
void hexer_init(void);
364
void hexer_version(void);