Blame


1 5e11c00c 2021-03-02 op /*
2 5e11c00c 2021-03-02 op * Copyright (c) 2021 Omar Polo <op@omarpolo.com>
3 5e11c00c 2021-03-02 op *
4 5e11c00c 2021-03-02 op * Permission to use, copy, modify, and distribute this software for any
5 5e11c00c 2021-03-02 op * purpose with or without fee is hereby granted, provided that the above
6 5e11c00c 2021-03-02 op * copyright notice and this permission notice appear in all copies.
7 5e11c00c 2021-03-02 op *
8 5e11c00c 2021-03-02 op * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 5e11c00c 2021-03-02 op * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 5e11c00c 2021-03-02 op * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 5e11c00c 2021-03-02 op * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 5e11c00c 2021-03-02 op * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 5e11c00c 2021-03-02 op * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 5e11c00c 2021-03-02 op * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 5e11c00c 2021-03-02 op */
16 5e11c00c 2021-03-02 op
17 5e11c00c 2021-03-02 op #ifndef TELESCOPE_H
18 5e11c00c 2021-03-02 op #define TELESCOPE_H
19 5e11c00c 2021-03-02 op
20 09312eb3 2021-05-14 op #include "cmd.h"
21 b0003f58 2021-03-08 op #include "compat.h"
22 e2226342 2021-05-12 op #include "phos/phos.h"
23 5e11c00c 2021-03-02 op
24 65d9b3ca 2021-03-14 op #include <event.h>
25 65d9b3ca 2021-03-14 op
26 dc5df781 2021-03-13 op #define MIN(a, b) ((a) < (b) ? (a) : (b))
27 dc5df781 2021-03-13 op #define MAX(a, b) ((a) > (b) ? (a) : (b))
28 dc5df781 2021-03-13 op
29 5e11c00c 2021-03-02 op #define GEMINI_URL_LEN 1024
30 5e11c00c 2021-03-02 op
31 5e11c00c 2021-03-02 op enum imsg_type {
32 740f578b 2021-03-15 op /* ui <-> client/fs */
33 5e11c00c 2021-03-02 op IMSG_GET, /* data is URL, peerid the tab id */
34 984245ce 2021-06-23 op IMSG_GET_RAW, /* get but with an explicit req str */
35 5e11c00c 2021-03-02 op IMSG_ERR,
36 5e11c00c 2021-03-02 op IMSG_CHECK_CERT,
37 5e11c00c 2021-03-02 op IMSG_CERT_STATUS,
38 5e11c00c 2021-03-02 op IMSG_GOT_CODE,
39 5e11c00c 2021-03-02 op IMSG_GOT_META,
40 0972d8b2 2021-03-02 op IMSG_PROCEED,
41 0972d8b2 2021-03-02 op IMSG_STOP,
42 5e11c00c 2021-03-02 op IMSG_BUF,
43 5e11c00c 2021-03-02 op IMSG_EOF,
44 5e11c00c 2021-03-02 op IMSG_QUIT,
45 740f578b 2021-03-15 op
46 740f578b 2021-03-15 op /* ui <-> fs */
47 740f578b 2021-03-15 op IMSG_BOOKMARK_PAGE,
48 740f578b 2021-03-15 op IMSG_BOOKMARK_OK,
49 3a227e9a 2021-03-18 op IMSG_SAVE_CERT,
50 3a227e9a 2021-03-18 op IMSG_SAVE_CERT_OK,
51 288fd238 2021-04-25 op IMSG_UPDATE_CERT,
52 288fd238 2021-04-25 op IMSG_UPDATE_CERT_OK,
53 c7107cec 2021-04-01 op
54 de2a69bb 2021-05-17 op IMSG_FILE_OPEN,
55 de2a69bb 2021-05-17 op IMSG_FILE_OPENED,
56 de2a69bb 2021-05-17 op
57 c7107cec 2021-04-01 op IMSG_SESSION_START,
58 c7107cec 2021-04-01 op IMSG_SESSION_TAB,
59 c7107cec 2021-04-01 op IMSG_SESSION_END,
60 c92e529c 2021-06-15 op };
61 1a99965e 2021-06-19 op
62 db7cc27a 2021-06-19 op extern char *new_tab_url;
63 db7cc27a 2021-06-19 op extern int fill_column;
64 72b18268 2021-06-19 op extern int olivetti_mode;
65 2c748a1f 2021-06-21 op extern int enable_colors;
66 b1379f34 2021-07-05 op extern int hide_pre_context;
67 b1379f34 2021-07-05 op extern int hide_pre_blocks;
68 c92e529c 2021-06-15 op
69 c92e529c 2021-06-15 op struct lineprefix {
70 c92e529c 2021-06-15 op const char *prfx1;
71 c92e529c 2021-06-15 op const char *prfx2;
72 c92e529c 2021-06-15 op };
73 c92e529c 2021-06-15 op extern struct lineprefix line_prefixes[];
74 c92e529c 2021-06-15 op
75 c92e529c 2021-06-15 op struct line_face {
76 2af29222 2021-06-24 op int prfx_pair, pair, trail_pair;
77 2af29222 2021-06-24 op int prfx_bg, bg, trail_bg;
78 2af29222 2021-06-24 op int prfx_fg, fg, trail_fg;
79 2af29222 2021-06-24 op int prfx_attr, attr, trail_attr;
80 2af29222 2021-06-24 op
81 2af29222 2021-06-24 op int prefix, text, trail;
82 5e11c00c 2021-03-02 op };
83 c92e529c 2021-06-15 op extern struct line_face line_faces[];
84 5e11c00c 2021-03-02 op
85 c92e529c 2021-06-15 op struct tab_face {
86 33d904b6 2021-06-22 op int bg_attr, bg_bg, bg_fg;
87 33d904b6 2021-06-22 op int t_attr, t_bg, t_fg;
88 33d904b6 2021-06-22 op int c_attr, c_bg, c_fg;
89 33d904b6 2021-06-22 op
90 33d904b6 2021-06-22 op int background, tab, current;
91 c92e529c 2021-06-15 op };
92 c92e529c 2021-06-15 op extern struct tab_face tab_face;
93 d5493194 2021-06-15 op
94 b598590d 2021-06-21 op struct body_face {
95 160abe04 2021-06-21 op int lbg, lfg;
96 b598590d 2021-06-21 op int bg, fg;
97 160abe04 2021-06-21 op int rbg, rfg;
98 160abe04 2021-06-21 op
99 160abe04 2021-06-21 op int left, body, right;
100 b598590d 2021-06-21 op };
101 b598590d 2021-06-21 op extern struct body_face body_face;
102 b598590d 2021-06-21 op
103 d5493194 2021-06-15 op struct modeline_face {
104 24221637 2021-06-25 op int bg, fg, attr;
105 d5493194 2021-06-15 op int background;
106 d5493194 2021-06-15 op };
107 d5493194 2021-06-15 op extern struct modeline_face modeline_face;
108 d5493194 2021-06-15 op
109 d5493194 2021-06-15 op struct minibuffer_face {
110 24221637 2021-06-25 op int bg, fg, attr;
111 d5493194 2021-06-15 op int background;
112 d5493194 2021-06-15 op };
113 d5493194 2021-06-15 op extern struct minibuffer_face minibuffer_face;
114 c92e529c 2021-06-15 op
115 5e11c00c 2021-03-02 op enum line_type {
116 5e11c00c 2021-03-02 op LINE_TEXT,
117 5e11c00c 2021-03-02 op LINE_LINK,
118 5e11c00c 2021-03-02 op LINE_TITLE_1,
119 5e11c00c 2021-03-02 op LINE_TITLE_2,
120 5e11c00c 2021-03-02 op LINE_TITLE_3,
121 5e11c00c 2021-03-02 op LINE_ITEM,
122 5e11c00c 2021-03-02 op LINE_QUOTE,
123 5e11c00c 2021-03-02 op LINE_PRE_START,
124 5e11c00c 2021-03-02 op LINE_PRE_CONTENT,
125 5e11c00c 2021-03-02 op LINE_PRE_END,
126 5e11c00c 2021-03-02 op };
127 963c680c 2021-07-05 op
128 963c680c 2021-07-05 op /* for lines: mark as hidden */
129 963c680c 2021-07-05 op #define L_HIDDEN 1
130 963c680c 2021-07-05 op
131 963c680c 2021-07-05 op /* for vlines: mark as continuation */
132 963c680c 2021-07-05 op #define L_CONTINUATION 2
133 5e11c00c 2021-03-02 op
134 5e11c00c 2021-03-02 op struct line {
135 5e11c00c 2021-03-02 op enum line_type type;
136 5e11c00c 2021-03-02 op char *line;
137 5e11c00c 2021-03-02 op char *alt;
138 ebdcadbf 2021-03-12 op int flags;
139 5e11c00c 2021-03-02 op TAILQ_ENTRY(line) lines;
140 5e11c00c 2021-03-02 op };
141 5e11c00c 2021-03-02 op
142 9a25f829 2021-03-14 op struct vline {
143 9a25f829 2021-03-14 op const struct line *parent;
144 9a25f829 2021-03-14 op char *line;
145 9a25f829 2021-03-14 op int flags;
146 9a25f829 2021-03-14 op TAILQ_ENTRY(vline) vlines;
147 9a25f829 2021-03-14 op };
148 9a25f829 2021-03-14 op
149 5e11c00c 2021-03-02 op struct parser;
150 5e11c00c 2021-03-02 op struct page;
151 5e11c00c 2021-03-02 op
152 5e11c00c 2021-03-02 op typedef int (*parsechunkfn)(struct parser*, const char*, size_t);
153 a5c3e03d 2021-03-02 op typedef int (*parserfreefn)(struct parser*);
154 5e11c00c 2021-03-02 op
155 5e11c00c 2021-03-02 op typedef void (imsg_handlerfn)(struct imsg*, size_t);
156 5e11c00c 2021-03-02 op
157 5e11c00c 2021-03-02 op struct parser {
158 fc43eadd 2021-03-12 op const char *name;
159 dc5df781 2021-03-13 op char title[32+1];
160 5e11c00c 2021-03-02 op char *buf;
161 5e11c00c 2021-03-02 op size_t len;
162 5e11c00c 2021-03-02 op size_t cap;
163 27dce34f 2021-07-06 op
164 27dce34f 2021-07-06 op #define PARSER_IN_BODY 1
165 27dce34f 2021-07-06 op #define PARSER_IN_PRE 2
166 5e11c00c 2021-03-02 op int flags;
167 5e11c00c 2021-03-02 op parsechunkfn parse;
168 5e11c00c 2021-03-02 op parserfreefn free;
169 5e11c00c 2021-03-02 op
170 5e11c00c 2021-03-02 op TAILQ_HEAD(, line) head;
171 5e11c00c 2021-03-02 op };
172 5e11c00c 2021-03-02 op
173 10346511 2021-03-17 op /*
174 10346511 2021-03-17 op * differnt types of trust for a certificate. Following
175 10346511 2021-03-17 op * gemini://thfr.info/gemini/modified-trust-verify.gmi
176 10346511 2021-03-17 op */
177 10346511 2021-03-17 op enum trust_state {
178 10346511 2021-03-17 op TS_UNKNOWN,
179 10346511 2021-03-17 op TS_UNTRUSTED,
180 a2fd3805 2021-07-06 op TS_TEMP_TRUSTED,
181 10346511 2021-03-17 op TS_TRUSTED,
182 10346511 2021-03-17 op TS_VERIFIED,
183 10346511 2021-03-17 op };
184 10346511 2021-03-17 op
185 cbcc75fb 2021-03-17 op struct tofu_entry {
186 cbcc75fb 2021-03-17 op char domain[GEMINI_URL_LEN];
187 f1c6e31e 2021-05-12 op
188 f1c6e31e 2021-05-12 op /*
189 f1c6e31e 2021-05-12 op * enough space for ``PROTO:HASH''. probably isn't a good
190 f1c6e31e 2021-05-12 op * idea tho.
191 f1c6e31e 2021-05-12 op */
192 cbcc75fb 2021-03-17 op char hash[128+1];
193 cbcc75fb 2021-03-17 op int verified;
194 cbcc75fb 2021-03-17 op };
195 cbcc75fb 2021-03-17 op
196 2ba66cea 2021-03-22 op struct histhead {
197 2ba66cea 2021-03-22 op TAILQ_HEAD(mhisthead, hist) head;
198 2ba66cea 2021-03-22 op size_t len;
199 2ba66cea 2021-03-22 op };
200 2ba66cea 2021-03-22 op struct hist {
201 2ba66cea 2021-03-22 op char h[1025];
202 2ba66cea 2021-03-22 op TAILQ_ENTRY(hist) entries;
203 2ba66cea 2021-03-22 op };
204 2ba66cea 2021-03-22 op
205 46f6e974 2021-05-17 op struct buffer {
206 2ba66cea 2021-03-22 op struct parser page;
207 a00b4c97 2021-06-20 op
208 a00b4c97 2021-06-20 op size_t last_line_off;
209 a00b4c97 2021-06-20 op int force_redraw;
210 a00b4c97 2021-06-20 op
211 2ba66cea 2021-03-22 op int curs_x;
212 2ba66cea 2021-03-22 op int curs_y;
213 2ba66cea 2021-03-22 op size_t line_off;
214 2ba66cea 2021-03-22 op size_t line_max;
215 94ec38e8 2021-06-29 op struct vline *top_line;
216 2ba66cea 2021-03-22 op struct vline *current_line;
217 2ba66cea 2021-03-22 op size_t cpoff;
218 2ba66cea 2021-03-22 op TAILQ_HEAD(vhead, vline) head;
219 2ba66cea 2021-03-22 op };
220 2ba66cea 2021-03-22 op
221 2b2d2872 2021-06-20 op #define TAB_CURRENT 0x1
222 2b2d2872 2021-06-20 op #define TAB_URGENT 0x2
223 2b2d2872 2021-06-20 op
224 2b2d2872 2021-06-20 op #define NEW_TAB_URL "about:new"
225 2b2d2872 2021-06-20 op
226 5e11c00c 2021-03-02 op extern TAILQ_HEAD(tabshead, tab) tabshead;
227 5e11c00c 2021-03-02 op struct tab {
228 5e11c00c 2021-03-02 op TAILQ_ENTRY(tab) tabs;
229 5e11c00c 2021-03-02 op uint32_t id;
230 5e11c00c 2021-03-02 op uint32_t flags;
231 0972d8b2 2021-03-02 op
232 288fd238 2021-04-25 op char *cert;
233 10346511 2021-03-17 op enum trust_state trust;
234 984245ce 2021-06-23 op struct proxy *proxy;
235 31f1a758 2021-04-22 op struct phos_uri uri;
236 2051e653 2021-03-13 op struct histhead hist;
237 2051e653 2021-03-13 op struct hist *hist_cur;
238 2051e653 2021-03-13 op size_t hist_off;
239 8af5e5ed 2021-03-08 op
240 0972d8b2 2021-03-02 op int code;
241 0972d8b2 2021-03-02 op char meta[GEMINI_URL_LEN];
242 0972d8b2 2021-03-02 op int redirect_count;
243 1d08c280 2021-03-06 op
244 46f6e974 2021-05-17 op struct buffer buffer;
245 2ba66cea 2021-03-22 op
246 2ba66cea 2021-03-22 op short loading_anim;
247 2ba66cea 2021-03-22 op short loading_anim_step;
248 2ba66cea 2021-03-22 op struct event loadingev;
249 de2a69bb 2021-05-17 op
250 de2a69bb 2021-05-17 op int fd;
251 de2a69bb 2021-05-17 op size_t bytes;
252 de2a69bb 2021-05-17 op char *path;
253 5e11c00c 2021-03-02 op };
254 5e11c00c 2021-03-02 op
255 4d3785b1 2021-03-09 op struct proto {
256 4d3785b1 2021-03-09 op const char *schema;
257 4d3785b1 2021-03-09 op
258 f1c6e31e 2021-05-12 op /*
259 f1c6e31e 2021-05-12 op * should load the given url in the tab. Optionally, it may
260 4d3785b1 2021-03-09 op * consider the given url as relative to the one already
261 4d3785b1 2021-03-09 op * present in tab. It must set tab->urlstr to a serialized
262 f1c6e31e 2021-05-12 op * human-friendly URL.
263 f1c6e31e 2021-05-12 op */
264 4d3785b1 2021-03-09 op void (*loadfn)(struct tab*, const char*);
265 984245ce 2021-06-23 op };
266 984245ce 2021-06-23 op
267 984245ce 2021-06-23 op extern TAILQ_HEAD(proxylist, proxy) proxies;
268 984245ce 2021-06-23 op struct proxy {
269 984245ce 2021-06-23 op char *match_proto;
270 984245ce 2021-06-23 op
271 984245ce 2021-06-23 op char *host;
272 984245ce 2021-06-23 op char *port;
273 984245ce 2021-06-23 op int proto;
274 984245ce 2021-06-23 op
275 984245ce 2021-06-23 op TAILQ_ENTRY(proxy) proxies;
276 984245ce 2021-06-23 op };
277 984245ce 2021-06-23 op
278 984245ce 2021-06-23 op enum {
279 984245ce 2021-06-23 op PROTO_GEMINI,
280 984245ce 2021-06-23 op /* ... */
281 4d3785b1 2021-03-09 op };
282 4d3785b1 2021-03-09 op
283 984245ce 2021-06-23 op struct get_req {
284 984245ce 2021-06-23 op int proto;
285 984245ce 2021-06-23 op char host[254];
286 984245ce 2021-06-23 op char port[16];
287 984245ce 2021-06-23 op char req[1027];
288 984245ce 2021-06-23 op };
289 984245ce 2021-06-23 op
290 67c8ed7f 2021-03-13 op struct kmap {
291 67c8ed7f 2021-03-13 op TAILQ_HEAD(map, keymap) m;
292 67c8ed7f 2021-03-13 op void (*unhandled_input)(void);
293 67c8ed7f 2021-03-13 op };
294 e3427d18 2021-06-25 op extern struct kmap global_map, minibuffer_map;
295 67c8ed7f 2021-03-13 op
296 e3427d18 2021-06-25 op typedef void(interactivefn)(struct buffer *);
297 e3427d18 2021-06-25 op
298 67c8ed7f 2021-03-13 op struct keymap {
299 67c8ed7f 2021-03-13 op int meta;
300 67c8ed7f 2021-03-13 op int key;
301 67c8ed7f 2021-03-13 op struct kmap map;
302 e3427d18 2021-06-25 op interactivefn *fn;
303 67c8ed7f 2021-03-13 op
304 67c8ed7f 2021-03-13 op TAILQ_ENTRY(keymap) keymaps;
305 a3666ed5 2021-06-25 op };
306 a3666ed5 2021-06-25 op
307 a3666ed5 2021-06-25 op struct cmd {
308 a3666ed5 2021-06-25 op const char *cmd;
309 a3666ed5 2021-06-25 op void (*fn)(struct buffer *);
310 67c8ed7f 2021-03-13 op };
311 a3666ed5 2021-06-25 op extern struct cmd cmds[];
312 67c8ed7f 2021-03-13 op
313 69e1d1b6 2021-06-15 op /* defaults.c */
314 33fc3a8f 2021-06-21 op void config_init(void);
315 d89b86d6 2021-06-21 op int config_setprfx(const char *, const char *, const char *);
316 86e7d7b4 2021-06-19 op int config_setvari(const char *, int);
317 86e7d7b4 2021-06-19 op int config_setvars(const char *, char *);
318 d89b86d6 2021-06-21 op int config_setcolor(int, const char *, int, int, int);
319 d0149485 2021-06-22 op int config_setattr(const char *, int, int, int);
320 42d61f50 2021-06-24 op void config_apply_style(void);
321 69e1d1b6 2021-06-15 op
322 35e1f40a 2021-03-14 op /* fs.c */
323 3a227e9a 2021-03-18 op int fs_init(void);
324 6cc5fcfe 2021-07-08 op int fs_main(void);
325 3a227e9a 2021-03-18 op int load_certs(struct ohash*);
326 c7107cec 2021-04-01 op int load_last_session(void(*)(const char*));
327 5e11c00c 2021-03-02 op
328 5e11c00c 2021-03-02 op /* gemini.c */
329 6cc5fcfe 2021-07-08 op int client_main(void);
330 5e11c00c 2021-03-02 op
331 2051e653 2021-03-13 op /* hist.c */
332 2051e653 2021-03-13 op void hist_clear_forward(struct histhead*, struct hist*);
333 2051e653 2021-03-13 op void hist_push(struct histhead*, struct hist*);
334 2051e653 2021-03-13 op
335 67c8ed7f 2021-03-13 op /* keymap.c */
336 67c8ed7f 2021-03-13 op int kbd(const char*);
337 67c8ed7f 2021-03-13 op const char *unkbd(int);
338 46f6e974 2021-05-17 op int kmap_define_key(struct kmap*, const char*, void(*)(struct buffer*));
339 67c8ed7f 2021-03-13 op
340 c07ac996 2021-03-12 op /* mime.c */
341 c07ac996 2021-03-12 op int setup_parser_for(struct tab*);
342 84b88039 2021-07-12 op
343 0972d8b2 2021-03-02 op /* pages.c */
344 1b412079 2021-06-19 op extern const char *about_about;
345 1b412079 2021-06-19 op extern const char *about_blank;
346 1b412079 2021-06-19 op extern const char *about_help;
347 0972d8b2 2021-03-02 op extern const char *about_new;
348 0972d8b2 2021-03-02 op
349 0972d8b2 2021-03-02 op #define CANNOT_FETCH 0
350 0972d8b2 2021-03-02 op #define TOO_MUCH_REDIRECTS 1
351 5cd2ebb1 2021-03-11 op #define MALFORMED_RESPONSE 2
352 c07ac996 2021-03-12 op #define UNKNOWN_TYPE_OR_CSET 3
353 0972d8b2 2021-03-02 op extern const char *err_pages[70];
354 0972d8b2 2021-03-02 op
355 c92e529c 2021-06-15 op /* parse.y */
356 c92e529c 2021-06-15 op void parseconfig(const char *, int);
357 c92e529c 2021-06-15 op
358 ebdcadbf 2021-03-12 op /* sandbox.c */
359 17c10c65 2021-07-12 op void sandbox_net_process(void);
360 b1d4d01b 2021-03-14 op void sandbox_ui_process(void);
361 35e1f40a 2021-03-14 op void sandbox_fs_process(void);
362 ebdcadbf 2021-03-12 op
363 bcb0b073 2021-03-07 op /* telescope.c */
364 4d3785b1 2021-03-09 op void load_about_url(struct tab*, const char*);
365 4d3785b1 2021-03-09 op void load_gemini_url(struct tab*, const char*);
366 984245ce 2021-06-23 op void load_via_proxy(struct tab *, const char *, struct proxy *);
367 bcb0b073 2021-03-07 op void load_url(struct tab*, const char*);
368 2051e653 2021-03-13 op int load_previous_page(struct tab*);
369 2051e653 2021-03-13 op int load_next_page(struct tab*);
370 9ad4627d 2021-03-10 op void stop_tab(struct tab*);
371 740f578b 2021-03-15 op void add_to_bookmarks(const char*);
372 c7107cec 2021-04-01 op void save_session(void);
373 bcb0b073 2021-03-07 op
374 c36d43ac 2021-04-25 op /* tofu.c */
375 c36d43ac 2021-04-25 op void tofu_init(struct ohash*, unsigned int, ptrdiff_t);
376 c36d43ac 2021-04-25 op struct tofu_entry *tofu_lookup(struct ohash*, const char*, const char*);
377 c36d43ac 2021-04-25 op void tofu_add(struct ohash*, struct tofu_entry*);
378 288fd238 2021-04-25 op void tofu_update(struct ohash*, struct tofu_entry*);
379 a2fd3805 2021-07-06 op void tofu_temp_trust(struct ohash *, const char *, const char *, const char *);
380 174b3cdf 2021-03-21 op
381 5e11c00c 2021-03-02 op /* util.c */
382 5e11c00c 2021-03-02 op int mark_nonblock(int);
383 5c88f028 2021-03-09 op int has_prefix(const char*, const char*);
384 17e5106b 2021-03-21 op int unicode_isspace(uint32_t);
385 17e5106b 2021-03-21 op int unicode_isgraph(uint32_t);
386 1304bbdd 2021-03-15 op void dispatch_imsg(struct imsgbuf*, imsg_handlerfn**, size_t);
387 5e11c00c 2021-03-02 op
388 65d9b3ca 2021-03-14 op /* wrap.c */
389 bca92a4c 2021-07-01 op void erase_buffer(struct buffer *);
390 46f6e974 2021-05-17 op void empty_linelist(struct buffer*);
391 46f6e974 2021-05-17 op void empty_vlist(struct buffer*);
392 46f6e974 2021-05-17 op int wrap_text(struct buffer*, const char*, struct line*, size_t);
393 46f6e974 2021-05-17 op int hardwrap_text(struct buffer*, struct line*, size_t);
394 65d9b3ca 2021-03-14 op
395 5e11c00c 2021-03-02 op #endif /* TELESCOPE_H */