]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/libc-extension.cc
patch::: 1.3.38.jcn1
[lilypond.git] / flower / libc-extension.cc
index 9752c046942257efd560d9a7e114815091afbf84..a06704b1823d9c7f5dfb3dfc523f747e93b20955 100644 (file)
@@ -4,7 +4,7 @@
 
   source file of the flowerlib
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
          Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
@@ -48,7 +48,7 @@ strnupr (char* start_l, int n)
   Manual v1.15, but it is with /usr/include/string.h   */
 
 Byte *
-memmem (Byte const *haystack, int haystack_len,
+_memmem (Byte const *haystack, int haystack_len,
        Byte const *needle,int needle_len)
 {
   Byte const * end_haystack = haystack + haystack_len - needle_len + 1;
@@ -72,6 +72,15 @@ memmem (Byte const *haystack, int haystack_len,
   return 0;
 }
 
+void *
+memmem (void const *haystack, int haystack_len,
+       void const *needle,int needle_len)
+{
+  Byte const* haystack_byte_c_l = (Byte const*)haystack;
+  Byte const* needle_byte_c_l = (Byte const*)needle;
+  return _memmem (haystack_byte_c_l, haystack_len, needle_byte_c_l, needle_len);
+}
+
 #endif
 
 Byte *