commit 9d65b1d9ae3209a8a2bc8e8c376dede4f71290ce from: Omar Polo date: Tue Jan 11 17:21:40 2022 UTC move util.c declarations in utils.h it's not spelled `util.h' because otherwise it'd get included instead of /usr/include/util.h commit - 036c104e0d5b8758a8cf72c9085af23956fdfa6f commit + 9d65b1d9ae3209a8a2bc8e8c376dede4f71290ce blob - 1edf955bc11cb222d2179c425492e2619815b1aa blob + 60f44eabb2ef406faef7d11a9fdabd181c7873a3 --- Makefile.am +++ Makefile.am @@ -46,6 +46,7 @@ telescope_SOURCES = cmd.c \ utf8.c \ utf8.h \ util.c \ + utils.h \ wrap.c # phos bundled files blob - 43b49d6abc32f6f883c98baca9737e22a2a9a4a2 blob + 047685c6e6d886f1213c4dae7d9a21764232ae15 --- defaults.c +++ defaults.c @@ -25,6 +25,7 @@ #include "defaults.h" #include "telescope.h" #include "ui.h" +#include "utils.h" char *download_path = NULL; char *new_tab_url = NULL; blob - 62b6b4f265d04a920df1f6b96c644d498c7b6ea5 blob + df1c1e857e577e31f408c7525237d2ba31e50e92 --- fs.c +++ fs.c @@ -37,6 +37,7 @@ #include "pages.h" #include "telescope.h" #include "session.h" +#include "utils.h" static void die(void) __attribute__((__noreturn__)); static void send_file(uint32_t, FILE *); blob - add39407a85216e99bb0169c122aceb4678155dd blob + c3beaf16b738c904b0872361f70b4140ab054495 --- keymap.c +++ keymap.c @@ -22,6 +22,7 @@ #include "keymap.h" #include "telescope.h" +#include "utils.h" #define CTRL(n) ((n)&0x1F) blob - 505eaf866ab0e7671de8887bb9403e7983c59eed blob + e3559a5205cde174b61019b747a48a20334f18f8 --- mcache.c +++ mcache.c @@ -23,6 +23,7 @@ #include "telescope.h" #include "mcache.h" #include "parser.h" +#include "utils.h" const char *gemtext_prefixes[] = { [LINE_TEXT] = "", blob - f806e9b6b96ff9722ad359b0799fbef47bf44ef8 blob + 64698309b123ee44365ec724e015ebbdb10a518b --- mime.c +++ mime.c @@ -22,6 +22,7 @@ #include "parser.h" #include "telescope.h" +#include "utils.h" static int check_for_utf8(char*); blob - be653281850cd821fbd43660366ff8e775f8745c blob + ce5a8b929512ff8d10fd521ba878f014fed97ef9 --- minibuffer.c +++ minibuffer.c @@ -24,6 +24,7 @@ #include "session.h" #include "ui.h" #include "utf8.h" +#include "utils.h" static void *minibuffer_metadata(void); static void minibuffer_hist_save_entry(void); blob - 2e3f5c4f8466c93549a5390961e470f4d0a36a81 blob + 5b23f6ca1608d2a2e677020f15d19e1c4da0f6d5 --- net.c +++ net.c @@ -37,6 +37,7 @@ #endif #include "telescope.h" +#include "utils.h" static struct imsgev *iev_ui; blob - e1f0b69dcb0b3345983d76a019acb7c99499cf60 blob + 36c4e323144febc002109a237a62b88779c57777 --- parse.y +++ parse.y @@ -22,6 +22,7 @@ #include "keymap.h" #include "telescope.h" +#include "utils.h" #include blob - 8c3836541d0711877d98ed828dbc511a38a8e323 blob + bc51dcb440974643ff5fa60e8629c61fef3cc857 --- parser_gophermap.c +++ parser_gophermap.c @@ -21,6 +21,7 @@ #include #include "parser.h" +#include "utils.h" struct gm_selector { char type; blob - 764be1131ded6ef14135e9759dcd48b120823aae blob + e94d85197fd198edd3e5749080f110f489b2931b --- parser_textpatch.c +++ parser_textpatch.c @@ -23,6 +23,7 @@ #include "telescope.h" #include "parser.h" +#include "utils.h" static int tpatch_parse(struct parser *, const char *, size_t); static int tpatch_emit_line(struct parser *, const char *, size_t); blob - 05f53eaf6ae6a4b4dbc962b829cee8f1bc721c67 blob + 9213b3e7746ac03b21200edbb72c24d1c4623474 --- telescope.c +++ telescope.c @@ -35,6 +35,7 @@ #include "session.h" #include "telescope.h" #include "ui.h" +#include "utils.h" static struct option longopts[] = { {"colors", no_argument, NULL, 'C'}, blob - 50efbbc118ebd670512e80037968e4ab5146ea79 blob + 305e1cb91f5d0ba833d9be079c9c955dde647564 --- telescope.h +++ telescope.h @@ -344,16 +344,6 @@ void tofu_update(struct ohash*, struct tofu_entry*) void tofu_temp_trust(struct ohash *, const char *, const char *, const char *); /* util.c */ -int mark_nonblock(int); -int has_prefix(const char*, const char*); -int has_suffix(const char *, const char *); -int unicode_isspace(uint32_t); -int unicode_isgraph(uint32_t); -int dispatch_imsg(struct imsgev *, short, imsg_handlerfn **, size_t); -int imsg_compose_event(struct imsgev *, uint16_t, uint32_t, pid_t, int, const void *, uint16_t); -void *hash_alloc(size_t, void *); -void *hash_calloc(size_t, size_t, void *); -void hash_free(void *, void *); /* wrap.c */ void erase_buffer(struct buffer *); blob - 44d124290db2b1e4e3e80987aed32e503a0ed8e4 blob + b0c0dde4690cef62bd798b450774dbc010f82a50 --- tofu.c +++ tofu.c @@ -20,6 +20,7 @@ #include #include "telescope.h" +#include "utils.h" void tofu_init(struct ohash *h, unsigned int sz, ptrdiff_t ko) blob - 41296df6a6181b9222ec5bcaf889f4a4dbac4563 blob + a5d1e24337dabd9284ea816ef502588921762707 --- util.c +++ util.c @@ -24,6 +24,7 @@ #include #include "telescope.h" +#include "utils.h" static void imsg_event_add(struct imsgev *);