forked from enlightenment/efl
eolian: rmeove dependency on basename/libgen.h/evil
This commit is contained in:
parent
a0f8cb846c
commit
6e8b628864
|
@ -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])
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#include "main.h"
|
||||
#include "types.h"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <libgen.h>
|
||||
#include <Eina.h>
|
||||
#include "eo_parser.h"
|
||||
#include "eolian_database.h"
|
||||
|
|
Loading…
Reference in New Issue