1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
|
/*
* $Id: efunc.h 807 2007-11-09 01:21:33Z hubert@u.washington.edu $
*
* ========================================================================
* Copyright 2013 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* ========================================================================
*
* Program: Pine's composer and pico's function declarations
*/
/* EFUNC.H: MicroEMACS function declarations and names
This file list all the C code functions used by MicroEMACS
and the names to use to bind keys to them. To add functions,
declare it here in both the extern function list and the name
binding table.
Update History:
Daniel Lawrence
*/
#ifndef EFUNC_H
#define EFUNC_H
/* External function declarations */
/* attach.c */
extern int AskAttach(char *, size_t, LMLIST **);
extern int SyncAttach(void);
extern int intag(UCS *, int);
extern char *prettysz(off_t);
extern int AttachError(void);
extern char *QuoteAttach(char *, size_t);
extern int getccol(int);
/* basic.c */
extern int gotobol(int, int);
extern int backchar(int, int);
extern int gotoeol(int, int);
extern int forwchar(int, int);
extern int gotoline(int, int);
extern int gotobob(int, int);
extern int gotoeob(int, int);
extern int forwline(int, int);
extern int backline(int, int);
extern int gotobop(int, int);
extern int gotoeop(int, int);
extern int forwpage(int, int);
extern int backpage(int, int);
extern int scrollupline(int, int);
extern int scrolldownline(int, int);
extern int scrollto(int, int);
extern int setmark(int, int);
extern int swapmark(int, int);
extern int setimark(int, int);
extern int swapimark(int, int);
extern int mousepress(int, int);
extern int toggle_xterm_mouse(int, int);
extern void swap_mark_and_dot_if_mark_comes_first(void);
extern int backchar_no_header_editor(int, int);
extern int getgoal(struct LINE *);
/* bind.c */
extern UCS normalize_cmd(UCS c, UCS list[][2], int sc);
extern int whelp(int, int);
extern int wscrollw(int, int, char **, int);
extern int normal(int, int (*)[2], int);
extern void rebindfunc(int (*)(int, int),int (*)(int, int));
extern int bindtokey(UCS c, int (*f)(int, int));
/* browse.c */
extern int FileBrowse(char *, size_t, char *, size_t, char *, size_t, int, LMLIST **);
extern int ResizeBrowser(void);
extern void set_browser_title(char *);
extern void zotlmlist(LMLIST *);
extern int time_to_check(void);
extern int LikelyASCII(char *);
/* buffer.c */
extern int anycb(void);
extern struct BUFFER *bfind(char *, int, int);
extern int bclear(struct BUFFER *);
extern int packbuf(char **, int *, int);
extern void readbuf(char **);
/* composer.c */
extern int InitMailHeader(struct pico_struct *);
extern int ResizeHeader(void);
extern int HeaderEditor(int, int);
extern void PaintHeader(int, int);
extern void ArrangeHeader(void);
extern int ToggleHeader(int);
extern int HeaderLen(void);
extern int UpdateHeader(int);
extern int entry_line(int, int);
extern int call_builder(struct headerentry *, int *, char **);
extern void call_expander(void);
extern void ShowPrompt(void);
extern int packheader(void);
extern void zotheader(void);
extern void display_for_send(void);
extern VARS_TO_SAVE *save_pico_state(void);
extern void restore_pico_state(VARS_TO_SAVE *);
extern void free_pico_state(VARS_TO_SAVE *);
extern void HeaderPaintCursor(void);
extern void PaintBody(int);
extern int AppendAttachment(char *, char *, char *);
/* display.c */
extern int vtinit(void);
extern int vtterminalinfo(int);
extern void vttidy(void);
extern void update(void);
extern void modeline(struct WINDOW *);
extern void movecursor(int, int);
extern void clearcursor(void);
extern void mlerase(void);
extern int mlyesno_utf8(char *, int);
extern int mlyesno(UCS *, int);
extern int mlreply_utf8(char *, char *, int, int, EXTRAKEYS *);
extern int mlreply(UCS *, UCS *, int, int, EXTRAKEYS *);
extern int mlreplyd_utf8(char *, char *, int, int, EXTRAKEYS *);
extern int mlreplyd(UCS *, UCS *, int, int, EXTRAKEYS *);
extern int mlwrite_utf8(char *, void *);
extern int mlwrite(UCS *, void *);
extern void emlwrite(char *, EML *);
extern void emlwrite_ucs4(UCS *, EML *);
extern void unknown_command(UCS);
extern void scrolldown(struct WINDOW *, int, int);
extern void scrollup(struct WINDOW *, int, int);
extern int doton(int *, unsigned int *);
extern int resize_pico(int, int);
extern void zotdisplay(void);
extern void pputc(UCS c, int a);
extern void pputs(UCS *s, int a);
extern void pputs_utf8(char *s, int a);
extern void peeol(void);
extern CELL *pscr(int, int);
extern void pclear(int, int);
extern int pinsert(CELL);
extern int pdel(void);
extern void wstripe(int, int, char *, int);
extern void wkeyhelp(KEYMENU *);
extern void get_cursor(int *, int *);
extern unsigned vcellwidth_a_to_b(int row, int a, int b);
extern int index_from_col(int row, int col);
/* file.c */
extern int fileread(int, int);
extern int insfile(int, int);
extern int readin(char *, int, int);
extern int filewrite(int, int);
extern int filesave(int, int);
extern int writeout(char *, int);
extern char *writetmp(int, char *);
extern int filename(int, int);
extern int in_oper_tree(char *);
extern int ifile(char *);
/* fileio.c */
extern int ffropen(char *);
extern int ffputline(CELL *, int);
extern int ffgetline(UCS *, size_t, size_t *, int);
/* line.c */
extern struct LINE *lalloc(int used);
extern void lfree(struct LINE *);
extern void lchange(int);
extern int linsert(int n, UCS c);
extern int geninsert(LINE **dotp, int *doto, LINE *linep, UCS c, int attb, int n, long *lines);
extern int lnewline(void);
extern int ldelete(long, int (*)(UCS));
extern int lisblank(struct LINE *);
extern void kdelete(void);
extern int kinsert(UCS);
extern long kremove(int);
extern int ksize(void);
extern void fdelete(void);
extern int finsert(UCS);
extern long fremove(int);
extern void set_last_region_added(REGION *);
extern REGION *get_last_region_added(void);
/* os.c */
extern int o_insert(UCS);
extern int o_delete(void);
/* pico.c */
extern int pico(struct pico_struct *pm);
extern void edinit(char *);
extern int execute(UCS c, int f, int n);
extern int quickexit(int, int);
extern int abort_composer(int, int);
extern int suspend_composer(int, int);
extern int wquit(int, int);
extern int ctrlg(int, int);
extern int rdonly(void);
extern int pico_help(char **, char *, int);
extern void zotedit(void);
#ifdef _WINDOWS
int composer_file_drop(int, int, char *);
int pico_cursor(int, long);
#endif
/* random.c */
extern int showcpos(int, int);
extern int tab(int, int);
extern int newline(int, int);
extern int forwdel(int, int);
extern int backdel(int, int);
extern int killtext(int, int);
extern int yank(int, int);
/* region.c */
extern int killregion(int, int);
extern int deleteregion(int, int);
extern int markregion(int);
extern int getregion(REGION *, LINE *, int);
extern void unmarkbuffer(void);
/* search.c */
extern int forwsearch(int, int);
extern int readpattern(char *, int, int);
extern int forscan(int *, UCS *, int, LINE *, int, int);
extern void chword(UCS *, UCS *, int);
/* spell.c */
#ifdef SPELLER
extern int spell(int, int);
#endif
/* window.c */
extern int pico_refresh(int, int);
extern void redraw_pico_for_callback(void);
/* word.c */
extern int wrapword(void);
extern int backword(int, int);
extern int forwword(int, int);
extern int fillpara(int, int);
extern int fillbuf(int, int);
extern int inword(void);
extern int quote_match(UCS *, LINE *, UCS *, size_t);
extern int ucs4_isalnum(UCS);
extern int ucs4_isalpha(UCS);
extern int ucs4_isspace(UCS);
extern int ucs4_ispunct(UCS);
#endif /* EFUNC_H */
|