mirror of
https://github.com/tnodir/fort
synced 2024-11-15 05:25:56 +00:00
Driver: Move "wildmatch.*" files to "3rdparty/wildmatch/"
This commit is contained in:
parent
71efd8db04
commit
b9067be4ba
@ -63,7 +63,7 @@ const uchar sane_ctype[256] = {
|
|||||||
#define is_glob_special(x) (ISASCII(x) && sane_istest(x, GIT_GLOB_SPECIAL))
|
#define is_glob_special(x) (ISASCII(x) && sane_istest(x, GIT_GLOB_SPECIAL))
|
||||||
|
|
||||||
/* Match the "pattern" against the "text" string. */
|
/* Match the "pattern" against the "text" string. */
|
||||||
FORT_API int wildmatch(const wm_char *pattern, const wm_char *text)
|
WILDMATCH_API int wildmatch(const wm_char *pattern, const wm_char *text)
|
||||||
{
|
{
|
||||||
const wm_char *p = pattern;
|
const wm_char *p = pattern;
|
||||||
wm_char p_ch;
|
wm_char p_ch;
|
@ -1,20 +1,16 @@
|
|||||||
#ifndef WILDMATCH_H
|
#ifndef WILDMATCH_H
|
||||||
#define WILDMATCH_H
|
#define WILDMATCH_H
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
#define WM_NOMATCH 1
|
#define WM_NOMATCH 1
|
||||||
#define WM_MATCH 0
|
#define WM_MATCH 0
|
||||||
#define WM_ABORT_ALL -1
|
#define WM_ABORT_ALL -1
|
||||||
#define WM_ABORT_TO_STARSTAR -2
|
#define WM_ABORT_TO_STARSTAR -2
|
||||||
|
|
||||||
typedef WCHAR wm_char;
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FORT_API int wildmatch(const wm_char *pattern, const wm_char *text);
|
WILDMATCH_API int wildmatch(const wm_char *pattern, const wm_char *text);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
@ -4,7 +4,7 @@ SOURCES += \
|
|||||||
$$PWD/common/fortconf.c \
|
$$PWD/common/fortconf.c \
|
||||||
$$PWD/common/fortlog.c \
|
$$PWD/common/fortlog.c \
|
||||||
$$PWD/common/fortprov.c \
|
$$PWD/common/fortprov.c \
|
||||||
$$PWD/common/wildmatch.c
|
$$PWD/common/fort_wildmatch.c
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
$$PWD/common/common.h \
|
$$PWD/common/common.h \
|
||||||
@ -14,4 +14,4 @@ HEADERS += \
|
|||||||
$$PWD/common/fortioctl.h \
|
$$PWD/common/fortioctl.h \
|
||||||
$$PWD/common/fortlog.h \
|
$$PWD/common/fortlog.h \
|
||||||
$$PWD/common/fortprov.h \
|
$$PWD/common/fortprov.h \
|
||||||
$$PWD/common/wildmatch.h
|
$$PWD/common/fort_wildmatch.h
|
||||||
|
5
src/driver/common/fort_wildmatch.c
Normal file
5
src/driver/common/fort_wildmatch.c
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
/* Fort Firewall WildMatch */
|
||||||
|
|
||||||
|
#include "fort_wildmatch.h"
|
||||||
|
|
||||||
|
#include "../../3rdparty/wildmatch/wildmatch.c"
|
12
src/driver/common/fort_wildmatch.h
Normal file
12
src/driver/common/fort_wildmatch.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#ifndef FORT_WILDMATCH_H
|
||||||
|
#define FORT_WILDMATCH_H
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#define WILDMATCH_API FORT_API
|
||||||
|
|
||||||
|
typedef WCHAR wm_char;
|
||||||
|
|
||||||
|
#include "../../3rdparty/wildmatch/wildmatch.h"
|
||||||
|
|
||||||
|
#endif // FORT_WILDMATCH_H
|
@ -5,7 +5,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "fortdef.h"
|
#include "fortdef.h"
|
||||||
#include "wildmatch.h"
|
#include "fort_wildmatch.h"
|
||||||
|
|
||||||
static_assert(sizeof(FORT_CONF_FLAGS) == sizeof(UINT32), "FORT_CONF_FLAGS size mismatch");
|
static_assert(sizeof(FORT_CONF_FLAGS) == sizeof(UINT32), "FORT_CONF_FLAGS size mismatch");
|
||||||
static_assert(sizeof(FORT_TRAF) == sizeof(UINT64), "FORT_TRAF size mismatch");
|
static_assert(sizeof(FORT_TRAF) == sizeof(UINT64), "FORT_TRAF size mismatch");
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include "common/fortconf.c"
|
#include "common/fortconf.c"
|
||||||
#include "common/fortlog.c"
|
#include "common/fortlog.c"
|
||||||
#include "common/fortprov.c"
|
#include "common/fortprov.c"
|
||||||
#include "common/wildmatch.c"
|
#include "common/fort_wildmatch.c"
|
||||||
|
|
||||||
#include "loader/fortmm_imp.c"
|
#include "loader/fortmm_imp.c"
|
||||||
#include "proxycb/fortpcb_dst.c"
|
#include "proxycb/fortpcb_dst.c"
|
||||||
|
Loading…
Reference in New Issue
Block a user