commit e659558cf712d1885143ce235f96dbbab74fd1d8 from: Omar Polo date: Tue Jul 13 15:47:58 2021 UTC move defaults.c decls. to their own header commit - d1353324e53286535a700303d379af37f94e83df commit + e659558cf712d1885143ce235f96dbbab74fd1d8 blob - 692b06ce1d199c1aee43244bafbf4926f5011965 blob + b7f36fd2312f9fcc2535cd7cfc24023380fa91a9 --- Makefile.am +++ Makefile.am @@ -6,6 +6,7 @@ telescope_SOURCES = cmd.c \ compat.h \ compat/*.[ch] \ defaults.c \ + defaults.h \ fs.c \ gemini.c \ gemtext.c \ blob - 74757d2fbb470cdc8663067912cc7cd3da5a2400 blob + 0e2930df2dcc09b3a90e40d8b4abb8ebe09390eb --- defaults.c +++ defaults.c @@ -20,6 +20,7 @@ #include #include +#include "defaults.h" #include "telescope.h" #include "ui.h" blob - /dev/null blob + 749f3f0e0e814aa16012cf890c942b76188e0956 (mode 644) --- /dev/null +++ defaults.h @@ -0,0 +1,73 @@ +/* + * 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 DEFAULTS_H +#define DEFAULTS_H + +extern char *new_tab_url; +extern int fill_column; +extern int olivetti_mode; +extern int enable_colors; +extern int hide_pre_context; +extern int hide_pre_blocks; + +struct lineprefix { + const char *prfx1; + const char *prfx2; +}; +extern struct lineprefix line_prefixes[]; + +struct line_face { + int prfx_pair, pair, trail_pair; + int prfx_bg, bg, trail_bg; + int prfx_fg, fg, trail_fg; + int prfx_attr, attr, trail_attr; + + int prefix, text, trail; +}; +extern struct line_face line_faces[]; + +struct tab_face { + int bg_attr, bg_bg, bg_fg; + int t_attr, t_bg, t_fg; + int c_attr, c_bg, c_fg; + + int background, tab, current; +}; +extern struct tab_face tab_face; + +struct body_face { + int lbg, lfg; + int bg, fg; + int rbg, rfg; + + int left, body, right; +}; +extern struct body_face body_face; + +struct modeline_face { + int bg, fg, attr; + int background; +}; +extern struct modeline_face modeline_face; + +struct minibuffer_face { + int bg, fg, attr; + int background; +}; +extern struct minibuffer_face minibuffer_face; + +#endif blob - 9bb15ae7fdce26c345458a97f8b15706703da122 blob + 50d24ebd56016cacdc40a6bb41650a14c5640c8e --- telescope.c +++ telescope.c @@ -8,6 +8,7 @@ #include #include +#include "defaults.h" #include "pages.h" #include "parser.h" #include "telescope.h" blob - 78314a26e53421ab04c2b117f3c797f7615c859d blob + 567cad0aab1a5abd4a3fe1246211bc6238ee54b7 --- telescope.h +++ telescope.h @@ -66,59 +66,6 @@ enum imsg_type { IMSG_SESSION_END, }; -extern char *new_tab_url; -extern int fill_column; -extern int olivetti_mode; -extern int enable_colors; -extern int hide_pre_context; -extern int hide_pre_blocks; - -struct lineprefix { - const char *prfx1; - const char *prfx2; -}; -extern struct lineprefix line_prefixes[]; - -struct line_face { - int prfx_pair, pair, trail_pair; - int prfx_bg, bg, trail_bg; - int prfx_fg, fg, trail_fg; - int prfx_attr, attr, trail_attr; - - int prefix, text, trail; -}; -extern struct line_face line_faces[]; - -struct tab_face { - int bg_attr, bg_bg, bg_fg; - int t_attr, t_bg, t_fg; - int c_attr, c_bg, c_fg; - - int background, tab, current; -}; -extern struct tab_face tab_face; - -struct body_face { - int lbg, lfg; - int bg, fg; - int rbg, rfg; - - int left, body, right; -}; -extern struct body_face body_face; - -struct modeline_face { - int bg, fg, attr; - int background; -}; -extern struct modeline_face modeline_face; - -struct minibuffer_face { - int bg, fg, attr; - int background; -}; -extern struct minibuffer_face minibuffer_face; - enum line_type { LINE_TEXT, LINE_LINK, blob - abaa8f0ad8b9b15524ee52e1e77991bc7e6e4b0c blob + 17e36287d7b7a484f11064646e8f12aadc16c1c6 --- ui.c +++ ui.c @@ -40,6 +40,7 @@ #include #include +#include "defaults.h" #include "minibuffer.h" #include "telescope.h" #include "ui.h"