summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-01-21 18:05:26 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-01-21 18:06:00 +0100
commit6e8b62886447d23dcbbd271f4842b8bb153d3db0 (patch)
tree1f2fd5af1e1b7c0a91a13e6ed64ce374b88c0659
parenta0f8cb846ce5f9a62a6581d0fc64a1a48def7817 (diff)
eolian: rmeove dependency on basename/libgen.h/evil
-rw-r--r--configure.ac1
-rw-r--r--src/bin/eolian/main.c1
-rw-r--r--src/lib/eolian/eo_lexer.c11
-rw-r--r--src/lib/eolian/eolian_database.c1
4 files changed, 5 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 07d0767499..61bbb62ad7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1463,7 +1463,6 @@ EFL_ADD_FEATURE([EOLIAN], [cxx], [${have_cxx11}])
1463### Checks for programs 1463### Checks for programs
1464 1464
1465## Compatibility layers 1465## Compatibility layers
1466EFL_PLATFORM_DEPEND([EOLIAN], [evil])
1467 1466
1468### Checks for libraries 1467### Checks for libraries
1469EFL_INTERNAL_DEPEND_PKG([EOLIAN], [eina]) 1468EFL_INTERNAL_DEPEND_PKG([EOLIAN], [eina])
diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index d87408411a..2e19d745f2 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -1,6 +1,5 @@
1#include <stdlib.h> 1#include <stdlib.h>
2#include <unistd.h> 2#include <unistd.h>
3#include <libgen.h>
4 3
5#include "main.h" 4#include "main.h"
6#include "types.h" 5#include "types.h"
diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index 2bb72d2d58..f806c414c8 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -8,7 +8,6 @@
8 8
9#include <setjmp.h> 9#include <setjmp.h>
10#include <assert.h> 10#include <assert.h>
11#include <libgen.h>
12 11
13#include "eo_lexer.h" 12#include "eo_lexer.h"
14 13
@@ -1005,11 +1004,11 @@ lex(Eo_Lexer *ls, Eo_Token *tok)
1005static const char * 1004static const char *
1006get_filename(Eo_Lexer *ls) 1005get_filename(Eo_Lexer *ls)
1007{ 1006{
1008 char *dup = strdup(ls->source); 1007 const char *fslash = strrchr(ls->source, '/');
1009 char *s = basename(dup); 1008 const char *bslash = strrchr(ls->source, '\\');
1010 const char *file = eina_stringshare_add(s); 1009 if (fslash || bslash)
1011 free(dup); 1010 return eina_stringshare_add((fslash > bslash) ? (fslash + 1) : (bslash + 1));
1012 return file; 1011 return eina_stringshare_ref(ls->source);
1013} 1012}
1014 1013
1015static void 1014static void
diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index 6cf71c50be..2e33da7fa9 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -3,7 +3,6 @@
3#endif 3#endif
4 4
5#include <ctype.h> 5#include <ctype.h>
6#include <libgen.h>
7#include <Eina.h> 6#include <Eina.h>
8#include "eo_parser.h" 7#include "eo_parser.h"
9#include "eolian_database.h" 8#include "eolian_database.h"