line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
/* |
2
|
|
|
|
|
|
|
* Copyright (C) the libgit2 contributors. All rights reserved. |
3
|
|
|
|
|
|
|
* |
4
|
|
|
|
|
|
|
* This file is part of libgit2, distributed under the GNU GPL v2 with |
5
|
|
|
|
|
|
|
* a Linking Exception. For full terms see the included COPYING file. |
6
|
|
|
|
|
|
|
*/ |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
/* |
9
|
|
|
|
|
|
|
* This file provides the necessary indirection between xdiff and |
10
|
|
|
|
|
|
|
* libgit2. libgit2-specific functionality should live here, so |
11
|
|
|
|
|
|
|
* that git and libgit2 can share a common xdiff implementation. |
12
|
|
|
|
|
|
|
*/ |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
#ifndef INCLUDE_git_xdiff_h__ |
15
|
|
|
|
|
|
|
#define INCLUDE_git_xdiff_h__ |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
#include "regexp.h" |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
/* Work around C90-conformance issues */ |
20
|
|
|
|
|
|
|
#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) |
21
|
|
|
|
|
|
|
# if defined(_MSC_VER) |
22
|
|
|
|
|
|
|
# define inline __inline |
23
|
|
|
|
|
|
|
# elif defined(__GNUC__) |
24
|
|
|
|
|
|
|
# define inline __inline__ |
25
|
|
|
|
|
|
|
# else |
26
|
|
|
|
|
|
|
# define inline |
27
|
|
|
|
|
|
|
# endif |
28
|
|
|
|
|
|
|
#endif |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
#define xdl_malloc(x) git__malloc(x) |
31
|
|
|
|
|
|
|
#define xdl_free(ptr) git__free(ptr) |
32
|
|
|
|
|
|
|
#define xdl_realloc(ptr, x) git__realloc(ptr, x) |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
#define XDL_BUG(msg) GIT_ASSERT(msg) |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
#define xdl_regex_t git_regexp |
37
|
|
|
|
|
|
|
#define xdl_regmatch_t git_regmatch |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
GIT_INLINE(int) xdl_regexec_buf( |
40
|
|
|
|
|
|
|
const xdl_regex_t *preg, const char *buf, size_t size, |
41
|
|
|
|
|
|
|
size_t nmatch, xdl_regmatch_t pmatch[], int eflags) |
42
|
|
|
|
|
|
|
{ |
43
|
0
|
|
|
|
|
|
GIT_UNUSED(preg); |
44
|
0
|
|
|
|
|
|
GIT_UNUSED(buf); |
45
|
0
|
|
|
|
|
|
GIT_UNUSED(size); |
46
|
0
|
|
|
|
|
|
GIT_UNUSED(nmatch); |
47
|
0
|
|
|
|
|
|
GIT_UNUSED(pmatch); |
48
|
0
|
|
|
|
|
|
GIT_UNUSED(eflags); |
49
|
|
|
|
|
|
|
GIT_ASSERT("not implemented"); |
50
|
0
|
|
|
|
|
|
return -1; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
#endif |