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 |
|
|