commit 5a824be4d587c867d1cd4bc0796bcbf6856dac1c from: Omar Polo date: Tue Jul 13 13:28:06 2021 UTC move pages decl. to their own header commit - 3e5fd7bed5900b883c8719deba3090580934d271 commit + 5a824be4d587c867d1cd4bc0796bcbf6856dac1c blob - 2b7ca226fffbc98db64514d8c3864b9b0bcf4b02 blob + 692b06ce1d199c1aee43244bafbf4926f5011965 --- Makefile.am +++ Makefile.am @@ -16,6 +16,7 @@ telescope_SOURCES = cmd.c \ minibuffer.c \ minibuffer.h \ pages.c \ + pages.h \ parse.y \ parser.c \ parser.h \ blob - 881651984cd91e5d9f826a8a9a68219e43f3a436 blob + f8fdf48a0b98a0dbde929173089ccc0f2d238099 --- fs.c +++ fs.c @@ -31,6 +31,7 @@ #include #include "telescope.h" +#include "pages.h" static void die(void) __attribute__((__noreturn__)); static void serve_bookmarks(uint32_t); blob - 1b06a7989ebbebbbe12b3a83508927b0419e603a blob + f013fc790c8322d767bad01985bbbc5bf6406796 --- pages.c +++ pages.c @@ -14,7 +14,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "telescope.h" +#include "config.h" +#include "pages.h" #define ASCII_ART \ "```An Ascii art of the word \"Telescope\"\n" \ blob - /dev/null blob + d4cf3bdd308e7d2ca99b125c7100d4d982f74c00 (mode 644) --- /dev/null +++ pages.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021 Omar Polo + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef PAGES_H +#define PAGES_H + +extern const char *about_about; +extern const char *about_blank; +extern const char *about_help; +extern const char *about_new; + +#define CANNOT_FETCH 0 +#define TOO_MUCH_REDIRECTS 1 +#define MALFORMED_RESPONSE 2 +#define UNKNOWN_TYPE_OR_CSET 3 +extern const char *err_pages[70]; + +#endif blob - 26e8f0006e3337029f45348f54e34454140d3357 blob + 0505b038e45cb48b6dbafced3caefa77878699ab --- telescope.c +++ telescope.c @@ -8,6 +8,7 @@ #include #include +#include "pages.h" #include "parser.h" #include "telescope.h" #include "ui.h" blob - 18b35c9587fc01b7b09a7b890ca79d2554a20783 blob + 78314a26e53421ab04c2b117f3c797f7615c859d --- telescope.h +++ telescope.h @@ -346,18 +346,6 @@ int kmap_define_key(struct kmap*, const char*, void( /* mime.c */ int setup_parser_for(struct tab*); - -/* pages.c */ -extern const char *about_about; -extern const char *about_blank; -extern const char *about_help; -extern const char *about_new; - -#define CANNOT_FETCH 0 -#define TOO_MUCH_REDIRECTS 1 -#define MALFORMED_RESPONSE 2 -#define UNKNOWN_TYPE_OR_CSET 3 -extern const char *err_pages[70]; /* parse.y */ void parseconfig(const char *, int);