commit 352e03557a652af07f7edb4348e6dc4a7fd2f3e4 from: Omar Polo date: Sun Jul 25 10:24:03 2021 UTC bundle the struct proto in telescope.c it's unused in other parts of the codebase commit - cf1195ce46eb4d534f737f60e91bfe591e82514c commit + 352e03557a652af07f7edb4348e6dc4a7fd2f3e4 blob - f1dd97eab93758c77c0b690753e3ddb2d60421c5 blob + bae723d80b6bffa81183ff521340759ceceb5c92 --- telescope.c +++ telescope.c @@ -116,7 +116,10 @@ static pid_t start_child(enum telescope_process, con static int ui_send_net(int, uint32_t, const void *, uint16_t); static int ui_send_fs(int, uint32_t, const void *, uint16_t); -static struct proto protos[] = { +static struct proto { + const char *schema; + void (*loadfn)(struct tab*, const char*); +} protos[] = { {"about", load_about_url}, {"finger", load_finger_url}, {"gemini", load_gemini_url}, blob - 93fa4d640917a31c152c38fa8357eafc58809df1 blob + a670d922cb51287fb06dcef5419d11b8c0613a0e --- telescope.h +++ telescope.h @@ -216,18 +216,6 @@ struct tab { int fd; size_t bytes; char *path; -}; - -struct proto { - const char *schema; - - /* - * should load the given url in the tab. Optionally, it may - * consider the given url as relative to the one already - * present in tab. It must set tab->urlstr to a serialized - * human-friendly URL. - */ - void (*loadfn)(struct tab*, const char*); }; extern TAILQ_HEAD(proxylist, proxy) proxies;