xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit df8a9e342451fd7f753cc39e0d88fbb447316a61

Make ui/color_scheme:check_color_scheme() static
It's not used outside of the unit.
Author: xaizek
Author date (UTC): 2016-01-14 14:44
Committer name: xaizek
Committer date (UTC): 2016-01-14 14:44
Parent(s): 31d4b6acf1b2989d0001df7b8fcfa8561f4eb10f
Signing key:
Tree: e5b176aaec67ec95d59fb4ed0fff767f7d03ab7f
File Lines added Lines deleted
src/ui/color_scheme.c 14 11
src/ui/color_scheme.h 0 2
File src/ui/color_scheme.c changed (mode: 100644) (index 436bc51f4..f1eaa7d35)
... ... static file_hi_t * clone_color_scheme_highlights(const col_scheme_t *from);
372 372 static void reset_color_scheme_colors(col_scheme_t *cs); static void reset_color_scheme_colors(col_scheme_t *cs);
373 373 static int source_cs(const char name[]); static int source_cs(const char name[]);
374 374 static void get_cs_path(const char name[], char buf[], size_t buf_size); static void get_cs_path(const char name[], char buf[], size_t buf_size);
375 static void check_color_scheme(col_scheme_t *cs);
375 376 static void load_color_pairs(col_scheme_t *cs); static void load_color_pairs(col_scheme_t *cs);
376 377 static void ensure_dir_map_exists(void); static void ensure_dir_map_exists(void);
377 378
378 379 /* Mapping of color schemes associations onto file system tree. */ /* Mapping of color schemes associations onto file system tree. */
379 380 static fsddata_t *dir_map; static fsddata_t *dir_map;
380 381
381 void
382 check_color_scheme(col_scheme_t *cs)
383 {
384 if(cs->state == CSS_BROKEN)
385 {
386 reset_color_scheme_colors(cs);
387 cs->state = CSS_DEFAULTED;
388 }
389 }
390
391 382 int int
392 383 cs_have_no_extensions(void) cs_have_no_extensions(void)
393 384 { {
 
... ... get_cs_path(const char name[], char buf[], size_t buf_size)
848 839 (void)cut_suffix(buf, ".vifm"); (void)cut_suffix(buf, ".vifm");
849 840 } }
850 841
842 /* Checks whether colorscheme is in unusable state and resets it to normal
843 * state. */
844 static void
845 check_color_scheme(col_scheme_t *cs)
846 {
847 if(cs->state == CSS_BROKEN)
848 {
849 reset_color_scheme_colors(cs);
850 cs->state = CSS_DEFAULTED;
851 }
852 }
853
851 854 /* Loads color scheme settings into color pairs. */ /* Loads color scheme settings into color pairs. */
852 855 static void static void
853 856 load_color_pairs(col_scheme_t *cs) load_color_pairs(col_scheme_t *cs)
854 857 { {
855 858 int i; int i;
856 for(i = 0; i < MAXNUM_COLOR; i++)
859 for(i = 0; i < MAXNUM_COLOR; ++i)
857 860 { {
858 861 cs->pair[i] = colmgr_get_pair(cs->color[i].fg, cs->color[i].bg); cs->pair[i] = colmgr_get_pair(cs->color[i].fg, cs->color[i].bg);
859 862 } }
File src/ui/color_scheme.h changed (mode: 100644) (index 7c77d3454..eac113d38)
... ... void complete_colorschemes(const char name[]);
106 106
107 107 const char * attrs_to_str(int attrs); const char * attrs_to_str(int attrs);
108 108
109 void check_color_scheme(col_scheme_t *cs);
110
111 109 /* Associates colorscheme specified by its name with the given path. */ /* Associates colorscheme specified by its name with the given path. */
112 110 void assoc_dir(const char name[], const char dir[]); void assoc_dir(const char name[], const char dir[]);
113 111
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master