5 /* Maximum number of lines in buffer */
6 #define HED_BUFFER_LINES 16
8 #define HELPMOD_TEXT_DIR "./helpmod2/text"
9 #define HED_FILENAME_LENGTH 64
11 /* Forward declarations */
12 struct hchannel_struct
;
27 HED_ERR_UNKNOWN_COMMAND
,
28 HED_ERR_COMMAND_NOT_SUPPORTED
,
29 HED_ERR_INVALID_ARGUMENT
,
30 HED_ERR_LINE_TOO_LONG
,
32 HED_ERR_CLIPBOARD_EMPTY
,
38 HED_FLAG_VERBOSE_ERRORS
= 1 << 0,
39 HED_FLAG_UNSAVED
= 1 << 1
42 #define HED_FLAGS_DEFAULT (0)
44 typedef struct helpmod_editor_line_struct
47 struct helpmod_editor_line_struct
*next
;
50 typedef struct helpmod_editor_struct
52 char filename
[HED_FILENAME_LENGTH
];
53 hed_line buffers
[HED_BUFFER_LINES
];
62 struct huser_struct
*user
;
67 struct helpmod_editor_struct
*next
;
70 extern helpmod_editor
*helpmod_editors
;
72 helpmod_editor
*hed_open(struct huser_struct
*, const char *);
73 helpmod_editor
*hed_close(helpmod_editor
*);
74 helpmod_editor
*hed_write(helpmod_editor
*);
76 int hed_byte_count(helpmod_editor
*);
77 int hed_line_count(helpmod_editor
*);
78 int hed_is_valid_filename(const char *);
81 helpmod_editor
*hed_get(const char *);
83 void hed_command (struct huser_struct
*sender
, channel
* returntype
, char* ostr
, int argc
, char *argv
[]);
85 const char *hed_error_text(hed_error
);
87 char *hed_add_line(helpmod_editor
*, int);
88 void hed_del_line(helpmod_editor
*, int);
89 char *hed_get_line(helpmod_editor
*, int);
91 void hed_clear_clipboard(helpmod_editor
*);
92 void hed_paste(helpmod_editor
*, int);