summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-07 22:34:13 -0800
committerJunio C Hamano <gitster@pobox.com>2009-03-07 22:34:13 -0800
commit934f788981de941814e821217f32451a5c715d5d (patch)
treeb98d42ef8c9606b34f9b9389d2d65190db1ecc37 /git-compat-util.h
parent113106e06c48cc80432fd1be8af912898e8f240e (diff)
parent9a6682bab5e800465f0a4e44cdf18fe396ff4f6d (diff)
downloadgit-934f788981de941814e821217f32451a5c715d5d.tar.gz
Merge branch 'maint'
* maint: builtin-revert.c: release index lock when cherry-picking an empty commit document config --bool-or-int t1300: use test_must_fail as appropriate cleanup: add isascii() Documentation: fix badly indented paragraphs in "--bisect-all" description
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index dcf4127750..878d83dd08 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -319,6 +319,7 @@ static inline int has_extension(const char *filename, const char *ext)
}
/* Sane ctype - no locale, and works with signed chars */
+#undef isascii
#undef isspace
#undef isdigit
#undef isalpha
@@ -332,6 +333,7 @@ extern unsigned char sane_ctype[256];
#define GIT_GLOB_SPECIAL 0x08
#define GIT_REGEX_SPECIAL 0x10
#define sane_istest(x,mask) ((sane_ctype[(unsigned char)(x)] & (mask)) != 0)
+#define isascii(x) (((x) & ~0x7f) == 0)
#define isspace(x) sane_istest(x,GIT_SPACE)
#define isdigit(x) sane_istest(x,GIT_DIGIT)
#define isalpha(x) sane_istest(x,GIT_ALPHA)