Coverage Report

Created: 2025-06-20 06:37

/src/libgit2/deps/xdiff/git-xdiff.h
Line
Count
Source (jump to first uncovered line)
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_UNUSED GIT_UNUSED_ARG
31
32
0
#define xdl_malloc(x) git__malloc(x)
33
0
#define xdl_calloc(n, sz) git__calloc(n, sz)
34
0
#define xdl_free(ptr) git__free(ptr)
35
0
#define xdl_realloc(ptr, x) git__realloc(ptr, x)
36
37
0
#define XDL_BUG(msg) GIT_ASSERT(!msg)
38
39
#define xdl_regex_t git_regexp
40
0
#define xdl_regmatch_t git_regmatch
41
42
GIT_INLINE(int) xdl_regexec_buf(
43
  const xdl_regex_t *preg, const char *buf, size_t size,
44
  size_t nmatch, xdl_regmatch_t pmatch[], int eflags)
45
0
{
46
0
  GIT_UNUSED(preg);
47
0
  GIT_UNUSED(buf);
48
0
  GIT_UNUSED(size);
49
0
  GIT_UNUSED(nmatch);
50
0
  GIT_UNUSED(pmatch);
51
0
  GIT_UNUSED(eflags);
52
0
  GIT_ASSERT("not implemented");
53
0
  return -1;
54
0
}
Unexecuted instantiation: merge_file.c:xdl_regexec_buf
Unexecuted instantiation: xmerge.c:xdl_regexec_buf
Unexecuted instantiation: xprepare.c:xdl_regexec_buf
Unexecuted instantiation: xutils.c:xdl_regexec_buf
Unexecuted instantiation: checkout.c:xdl_regexec_buf
Unexecuted instantiation: patch_generate.c:xdl_regexec_buf
Unexecuted instantiation: xdiffi.c:xdl_regexec_buf
Unexecuted instantiation: xemit.c:xdl_regexec_buf
Unexecuted instantiation: xhistogram.c:xdl_regexec_buf
Unexecuted instantiation: xpatience.c:xdl_regexec_buf
Unexecuted instantiation: diff_xdiff.c:xdl_regexec_buf
55
56
#endif