From e8ba3dc8146622b7ed3c0bdc292df67c6b5cc3b0 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 4 Mar 1997 22:55:11 +0000 Subject: [PATCH] flower-1.1.5 --- flower/Makefile | 3 +++ flower/NEWS | 3 +++ flower/fproto.hh | 2 ++ flower/libc-extension.hh | 19 +++++++++++++------ flower/string.cc | 12 ++++++++---- 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/flower/Makefile b/flower/Makefile index 779f1e5b82..f4ab0e668f 100644 --- a/flower/Makefile +++ b/flower/Makefile @@ -5,6 +5,9 @@ $(staticlib): $(obs) fversion.hh include deps/*.dep +flower-config.hh: + touch flower-config.hh + deps/*.dep: touch deps/dummy.dep diff --git a/flower/NEWS b/flower/NEWS index 36c03ddcd4..faa08528d7 100644 --- a/flower/NEWS +++ b/flower/NEWS @@ -1,3 +1,6 @@ +pl 1.1.5 + - memmem interface, conditional compilation + - snprintf pl 1.1.4 - great file-renaming. diff --git a/flower/fproto.hh b/flower/fproto.hh index 57469fead5..8c6fda680e 100644 --- a/flower/fproto.hh +++ b/flower/fproto.hh @@ -7,6 +7,8 @@ #ifndef FPROTO_HH #define FPROTO_HH +#include "flower-config.hh" + template struct Array; template struct sstack; template struct Assoc; diff --git a/flower/libc-extension.hh b/flower/libc-extension.hh index e06feb5af4..e71037c41e 100644 --- a/flower/libc-extension.hh +++ b/flower/libc-extension.hh @@ -13,13 +13,20 @@ char* strnlwr( char* start_l ,int n); char* strnupr( char* start_l, int n); -/* - should use void* like in libc - */ -char *memmem(const Byte * haystack, const Byte *needle, - int haystack_len, int needle_len); + +#ifndef HAVE_MEMMEM // GNU extension. +char *memmem(const Byte * haystack, int haystack_len, + const Byte *needle, int needle_len); +#endif HAVE_MEMMEM + +#ifndef HAVE_SNPRINTF // GNU extension. +int snprintf (char *str, size_t n, + const char *format, ... ); +#endif + + Byte *memrchr(const Byte * p, int n, char c); -Byte*strrev( Byte* byte_l, int length_i ); +Byte *strrev( Byte* byte_l, int length_i ); #endif // LIBC_EXTENSION_HH diff --git a/flower/string.cc b/flower/string.cc index b4687c0b7f..60038f6a55 100644 --- a/flower/string.cc +++ b/flower/string.cc @@ -152,9 +152,8 @@ String::compare_i(String const& s1, String const& s2 ) int i1 = s1.length_i(); int i2 = s2.length_i(); - int i = i1 = length_i() ) || ( n < 1 ) ) return String(); -- 2.39.5