+2009-12-06 Vincent Torri <doursse at users dot sf dot net>
+
+ * src/lib/evil_string.c:
+ add strrstr() function.
+
+ * src/bin/evil_suite.c:
+ * src/lib/evil_fnmatch.c:
+ * src/lib/evil_fnmatch_list_of_states.c:
+ include config.h
+
2009-10-08 Vincent Torri <doursse at users dot sf dot net>
* src/lib/evil_main.c:
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+
#include <stdlib.h>
#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif /* HAVE_CONFIG_H */
-
#include "evil_suite.h"
#include "evil_test_memcpy.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+
#if defined (_MSC_VER) || defined (__MINGW32__) || defined (__MINGW32CE__)
#include <assert.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+
#if defined (_MSC_VER) || defined (__MINGW32__) || defined (__MINGW32CE__)
#include <assert.h>
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif /* HAVE_CONFIG_H */
# include <config.h>
#endif
-
# define WIN32_LEAN_AND_MEAN
# include <winsock2.h>
# undef WIN32_LEAN_AND_MEAN
-
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif /* HAVE_CONFIG_H */
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif /* HAVE_CONFIG_H */
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif /* HAVE_CONFIG_H */
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif /* HAVE_CONFIG_H */
#endif /* ! UNICODE */
}
+
#endif /* _WIN32_WCE */
+
+char *
+strrstr (const char *str, const char *substr)
+{
+ char *it;
+ char *ret = NULL;
+
+ while ((it = strstr(str, substr)))
+ ret = it;
+
+ return ret;
+}
#endif /* _WIN32_WCE */
+/**
+ * @brief get the last substring occurence.
+ *
+ * @param str The string to search from.
+ * @param substr The substring to search.
+ * @return The last occurrence of the substring if found, @c NULL otherwise.
+ *
+ * This function retrieves the last occurrence of @p substring in the
+ * string @p str. If @p str or @p substr are @c NULL, of if @p substr
+ * is not found in @p str, @c NULL is returned.
+ *
+ * Conformity: Non applicable.
+ *
+ * Supported OS: Windows XP, Windows CE.
+ */
+EAPI char *strrstr (const char *str, const char *substr);
+
/**
* @}
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif /* HAVE_CONFIG_H */