summaryrefslogtreecommitdiff
path: root/src/lib/evil
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2017-10-09 05:04:26 +0200
committerCedric Bail <cedric@osg.samsung.com>2017-10-13 11:40:10 -0700
commitc47fdb8c80bc02d54bb45d0980538e8f9f868dd6 (patch)
tree60d637bc7b8382e22c9e1b267a957c338f0aa13d /src/lib/evil
parent4dae43e4d13ca43b9fef41f180ee7315b49dd3be (diff)
evil: remove strrstr and ffs - not used in the EFL on Windows
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/evil')
-rw-r--r--src/lib/evil/evil_string.c28
-rw-r--r--src/lib/evil/evil_string.h36
2 files changed, 0 insertions, 64 deletions
diff --git a/src/lib/evil/evil_string.c b/src/lib/evil/evil_string.c
index 4534b72..08ab2d7 100644
--- a/src/lib/evil/evil_string.c
+++ b/src/lib/evil/evil_string.c
@@ -29,34 +29,6 @@ strndup(const char *str, size_t n)
29 return ret; 29 return ret;
30} 30}
31 31
32int ffs(int i)
33{
34 int size;
35 int x;
36
37 if (!i) return 1;
38
39 /* remove the sign bit */
40 x = i & -i;
41 size = sizeof(int) << 3;
42 for (i = size; i > 0; --i, x <<= 1)
43 if (x & (1 << (size - 1))) return i;
44
45 return x;
46}
47
48char *
49strrstr (const char *str, const char *substr)
50{
51 char *it;
52 char *ret = NULL;
53
54 while ((it = strstr(str, substr)))
55 ret = it;
56
57 return ret;
58}
59
60char *strcasestr(const char *haystack, const char *needle) 32char *strcasestr(const char *haystack, const char *needle)
61{ 33{
62 size_t length_needle; 34 size_t length_needle;
diff --git a/src/lib/evil/evil_string.h b/src/lib/evil/evil_string.h
index e1bf65b..6dbdb34 100644
--- a/src/lib/evil/evil_string.h
+++ b/src/lib/evil/evil_string.h
@@ -38,42 +38,6 @@
38EAPI char *strndup(const char *str, size_t n); 38EAPI char *strndup(const char *str, size_t n);
39 39
40/** 40/**
41 * @brief Return the position of the first (least significant) bit set in a word
42 *
43 * @param i Word to take the first bit.
44 * @return The position of the first bit set, or 0 if no bits are set.
45 *
46 * This function returns the position of the first (least significant)
47 * bit set in @p i. The least significant bit is position 1 and the
48 * most significant position e.g. 32 or 64. The function returns 0 if
49 * no bits are set in @p i, or the position of the first bit set
50 * otherwise.
51 *
52 * Conformity: BSD
53 *
54 * Supported OS: Windows XP.
55 */
56EAPI int ffs(int i);
57
58
59/**
60 * @brief Get the last substring occurence.
61 *
62 * @param str The string to search from.
63 * @param substr The substring to search.
64 * @return The last occurrence of the substring if found, @c NULL otherwise.
65 *
66 * This function retrieves the last occurrence of @p substring in the
67 * string @p str. If @p str or @p substr are @c NULL, of if @p substr
68 * is not found in @p str, @c NULL is returned.
69 *
70 * Conformity: Non applicable.
71 *
72 * Supported OS: Windows XP.
73 */
74EAPI char *strrstr (const char *str, const char *substr);
75
76/**
77 * @brief Locate a substring into a string, ignoring case. 41 * @brief Locate a substring into a string, ignoring case.
78 * 42 *
79 * @param haystack The string to search in. 43 * @param haystack The string to search in.