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 e4de8993b6be56d8de024b127630e91f973f2e62

Rename int/file_magic.c:get_{gtk=>glib}_mimetype()
No GTK here.
Author: xaizek
Author date (UTC): 2025-11-22 14:21
Committer name: xaizek
Committer date (UTC): 2025-11-22 14:21
Parent(s): 3cb28c55d1ca2372de02aea54ae8fc7e056f7bad
Signing key: 99DC5E4DB05F6BE2
Tree: 5e8c32d9d4c3ffd827dcb987e946cd08792604a7
File Lines added Lines deleted
src/int/file_magic.c 3 3
File src/int/file_magic.c changed (mode: 100644) (index 37e7b8738..14beba879)
... ... static int lookup_in_cache(fsddata_t *cache, const char path[],
57 57 filemon_t *filemon, cache_data_t **data); filemon_t *filemon, cache_data_t **data);
58 58 static void update_cache(fsddata_t *cache, const char path[], static void update_cache(fsddata_t *cache, const char path[],
59 59 const char mimetype[], filemon_t *filemon, cache_data_t *data); const char mimetype[], filemon_t *filemon, cache_data_t *data);
60 static int get_gtk_mimetype(const char filename[], char buf[], size_t buf_sz);
60 static int get_glib_mimetype(const char filename[], char buf[], size_t buf_sz);
61 61 static int get_magic_mimetype(const char filename[], char buf[], size_t buf_sz); static int get_magic_mimetype(const char filename[], char buf[], size_t buf_sz);
62 62 static int get_file_mimetype(const char filename[], char buf[], size_t buf_sz); static int get_file_mimetype(const char filename[], char buf[], size_t buf_sz);
63 63 static assoc_records_t get_handlers(const char mime_type[]); static assoc_records_t get_handlers(const char mime_type[]);
 
... ... get_mimetype(const char file[], int resolve_symlinks)
96 96 return mimetype; return mimetype;
97 97 } }
98 98
99 if(get_gtk_mimetype(file, mimetype, sizeof(mimetype)) == -1)
99 if(get_glib_mimetype(file, mimetype, sizeof(mimetype)) == -1)
100 100 { {
101 101 if(get_magic_mimetype(file, mimetype, sizeof(mimetype)) == -1) if(get_magic_mimetype(file, mimetype, sizeof(mimetype)) == -1)
102 102 { {
 
... ... update_cache(fsddata_t *cache, const char path[], const char mimetype[],
175 175 } }
176 176
177 177 static int static int
178 get_gtk_mimetype(const char filename[], char buf[], size_t buf_sz)
178 get_glib_mimetype(const char filename[], char buf[], size_t buf_sz)
179 179 { {
180 180 #ifdef HAVE_GLIB #ifdef HAVE_GLIB
181 181 GFile *file; GFile *file;
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