### Checks for programs
## Compatibility layers
-EFL_PLATFORM_DEPEND([EOLIAN], [evil])
### Checks for libraries
EFL_INTERNAL_DEPEND_PKG([EOLIAN], [eina])
#include <setjmp.h>
#include <assert.h>
-#include <libgen.h>
#include "eo_lexer.h"
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