summaryrefslogtreecommitdiff
path: root/src/lib/evil
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evil')
-rw-r--r--src/lib/evil/evil_basename.c16
-rw-r--r--src/lib/evil/evil_basename.h9
-rw-r--r--src/lib/evil/meson.build1
-rw-r--r--src/lib/evil/unposix/libgen.h7
4 files changed, 26 insertions, 7 deletions
diff --git a/src/lib/evil/evil_basename.c b/src/lib/evil/evil_basename.c
new file mode 100644
index 0000000000..8e51910749
--- /dev/null
+++ b/src/lib/evil/evil_basename.c
@@ -0,0 +1,16 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif /* HAVE_CONFIG_H */
4
5#include <evil_api.h>
6
7#include <stdlib.h>
8
9#include <evil_windows.h>
10
11EVIL_API char* basename (char* path)
12{
13 static char base[MAX_PATH];
14 _splitpath_s (path, NULL, 0, NULL, 0, base, MAX_PATH, NULL, 0);
15 return base;
16}
diff --git a/src/lib/evil/evil_basename.h b/src/lib/evil/evil_basename.h
new file mode 100644
index 0000000000..a92c5d35dd
--- /dev/null
+++ b/src/lib/evil/evil_basename.h
@@ -0,0 +1,9 @@
1#ifndef __EVIL_BASENAME_H__
2#define __EVIL_BASENAME_H__
3
4#include <evil_api.h>
5
6EVIL_API char* basename (char* path);
7
8#endif
9
diff --git a/src/lib/evil/meson.build b/src/lib/evil/meson.build
index 52e37971cd..d9bef68e64 100644
--- a/src/lib/evil/meson.build
+++ b/src/lib/evil/meson.build
@@ -15,6 +15,7 @@ if target_machine.system() == 'windows'
15 'evil_unistd.c', 15 'evil_unistd.c',
16 'evil_util.c', 16 'evil_util.c',
17 'evil_private.h', 17 'evil_private.h',
18 'evil_basename.c',
18 'pcre/regex.h', 19 'pcre/regex.h',
19 ] 20 ]
20 21
diff --git a/src/lib/evil/unposix/libgen.h b/src/lib/evil/unposix/libgen.h
deleted file mode 100644
index 819bb33d39..0000000000
--- a/src/lib/evil/unposix/libgen.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef UNPOSIX_LIBGEN_H
2#define UNPOSIX_LIBGEN_H
3
4char *basename(char *);
5char *dirname(char *);
6
7#endif