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 b9446433b24c79e4bbced71409a4326f06da3de5

Use format_str() function in version.c unit
Author: xaizek
Author date (UTC): 2013-04-21 13:06
Committer name: xaizek
Committer date (UTC): 2013-04-21 13:06
Parent(s): e62edd83d31e877df7ee95b8cc2a5cb98c949384
Signing key:
Tree: 941e595b02d1a8b68be70be49ab417676bbd0c0f
File Lines added Lines deleted
src/version.c 4 5
File src/version.c changed (mode: 100644) (index 2340f1165..bebcd3710)
18 18
19 19 #include <assert.h> /* assert() */ #include <assert.h> /* assert() */
20 20 #include <stddef.h> /* NULL */ #include <stddef.h> /* NULL */
21 #include <stdio.h> /* sprintf() */
22 #include <stdlib.h> /* malloc() */
23 #include <string.h> /* strlen() strdup() */
21 #include <string.h> /* strdup() */
22
23 #include "utils/str.h"
24 24
25 25 /* This variable is automatically updated on building. */ /* This variable is automatically updated on building. */
26 26 extern const char GIT_HASH[]; extern const char GIT_HASH[];
 
... ... fill_version_info(char **list)
35 35 return LEN; return LEN;
36 36
37 37 list[x++] = strdup("Version: " VERSION); list[x++] = strdup("Version: " VERSION);
38 list[x] = malloc(sizeof("Git commit hash: ") + strlen(GIT_HASH) + 1);
39 sprintf(list[x++], "Git commit hash: %s", GIT_HASH);
38 list[x++] = format_str("Git commit hash: %s", GIT_HASH);
40 39 list[x++] = strdup("Compiled at: " __DATE__ " " __TIME__); list[x++] = strdup("Compiled at: " __DATE__ " " __TIME__);
41 40 list[x++] = strdup(""); list[x++] = strdup("");
42 41
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