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