eolian: rmeove dependency on basename/libgen.h/evil

This commit is contained in:
Daniel Kolesa 2017-01-21 18:05:26 +01:00
parent a0f8cb846c
commit 6e8b628864
4 changed files with 5 additions and 9 deletions

View File

@ -1463,7 +1463,6 @@ EFL_ADD_FEATURE([EOLIAN], [cxx], [${have_cxx11}])
### Checks for programs
## Compatibility layers
EFL_PLATFORM_DEPEND([EOLIAN], [evil])
### Checks for libraries
EFL_INTERNAL_DEPEND_PKG([EOLIAN], [eina])

View File

@ -1,6 +1,5 @@
#include <stdlib.h>
#include <unistd.h>
#include <libgen.h>
#include "main.h"
#include "types.h"

View File

@ -8,7 +8,6 @@
#include <setjmp.h>
#include <assert.h>
#include <libgen.h>
#include "eo_lexer.h"
@ -1005,11 +1004,11 @@ lex(Eo_Lexer *ls, Eo_Token *tok)
static const char *
get_filename(Eo_Lexer *ls)
{
char *dup = strdup(ls->source);
char *s = basename(dup);
const char *file = eina_stringshare_add(s);
free(dup);
return file;
const char *fslash = strrchr(ls->source, '/');
const char *bslash = strrchr(ls->source, '\\');
if (fslash || bslash)
return eina_stringshare_add((fslash > bslash) ? (fslash + 1) : (bslash + 1));
return eina_stringshare_ref(ls->source);
}
static void

View File

@ -3,7 +3,6 @@
#endif
#include <ctype.h>
#include <libgen.h>
#include <Eina.h>
#include "eo_parser.h"
#include "eolian_database.h"