]>
git.proxmox.com Git - libgit2.git/blob - src/xdiff/git-xdiff.h
2 * Copyright (C) the libgit2 contributors. All rights reserved.
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.
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.
14 #ifndef INCLUDE_git_xdiff_h__
15 #define INCLUDE_git_xdiff_h__
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__
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)
34 #define XDL_BUG(msg) GIT_ASSERT(msg)
36 #define xdl_regex_t git_regexp
37 #define xdl_regmatch_t git_regmatch
39 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
)
49 GIT_ASSERT("not implemented");