~mdw
/
tig
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
autoconf: check for the AsciiDoc and XmlTo document tools
[tig]
/
tig.c
diff --git
a/tig.c
b/tig.c
index
49848d6
..
21dd6c2
100644
(file)
--- a/
tig.c
+++ b/
tig.c
@@
-11,8
+11,8
@@
* GNU General Public License for more details.
*/
* GNU General Public License for more details.
*/
-#ifndef VERSION
-#define VERSION "unknown-version"
+#ifndef
TIG_
VERSION
+#define
TIG_
VERSION "unknown-version"
#endif
#ifndef DEBUG
#endif
#ifndef DEBUG
@@
-40,6
+40,8
@@
#include <curses.h>
#include <curses.h>
+#include "config.h"
+
#if __GNUC__ >= 3
#define __NORETURN __attribute__((__noreturn__))
#else
#if __GNUC__ >= 3
#define __NORETURN __attribute__((__noreturn__))
#else
@@
-90,6
+92,10
@@
static size_t utf8_length(const char *string, size_t max_width, int *coloffset,
#define SCALE_SPLIT_VIEW(height) ((height) * 2 / 3)
#define SCALE_SPLIT_VIEW(height) ((height) * 2 / 3)
+#ifndef GIT_CONFIG
+#define "git config"
+#endif
+
#define TIG_LS_REMOTE \
"git ls-remote $(git rev-parse --git-dir) 2>/dev/null"
#define TIG_LS_REMOTE \
"git ls-remote $(git rev-parse --git-dir) 2>/dev/null"
@@
-390,7
+396,7
@@
get_request(const char *name)
*/
static const char usage[] =
*/
static const char usage[] =
-"tig " VERSION " (" __DATE__ ")\n"
+"tig "
TIG_
VERSION " (" __DATE__ ")\n"
"\n"
"Usage: tig [options]\n"
" or: tig [options] [--] [git log options]\n"
"\n"
"Usage: tig [options]\n"
" or: tig [options] [--] [git log options]\n"
@@
-516,7
+522,7
@@
parse_options(int argc, char *argv[])
}
if (check_option(opt, 'v', "version", OPT_NONE)) {
}
if (check_option(opt, 'v', "version", OPT_NONE)) {
- printf("tig version %s\n", VERSION);
+ printf("tig version %s\n",
TIG_
VERSION);
return FALSE;
}
return FALSE;
}
@@
-1926,7
+1932,7
@@
update_view(struct view *view)
line[linelen - 1] = 0;
if (opt_iconv != ICONV_NONE) {
line[linelen - 1] = 0;
if (opt_iconv != ICONV_NONE) {
-
char *
inbuf = line;
+
ICONV_INBUF_TYPE
inbuf = line;
size_t inlen = linelen;
char *outbuf = out_buffer;
size_t inlen = linelen;
char *outbuf = out_buffer;
@@
-2286,7
+2292,7
@@
view_driver(struct view *view, enum request request)
break;
case REQ_SHOW_VERSION:
break;
case REQ_SHOW_VERSION:
- report("tig-%s (built %s)", VERSION, __DATE__);
+ report("tig-%s (built %s)",
TIG_
VERSION, __DATE__);
return TRUE;
case REQ_SCREEN_RESIZE:
return TRUE;
case REQ_SCREEN_RESIZE:
@@
-4302,7
+4308,7
@@
read_repo_config_option(char *name, size_t namelen, char *value, size_t valuelen
static int
load_repo_config(void)
{
static int
load_repo_config(void)
{
- return read_properties(popen(
"git repo-config
--list", "r"),
+ return read_properties(popen(
GIT_CONFIG "
--list", "r"),
"=", read_repo_config_option);
}
"=", read_repo_config_option);
}