avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] Fw: [patch] strpbrk


From: Alexander Stohr
Subject: [avr-libc-dev] Fw: [patch] strpbrk
Date: Sat, 14 Aug 2004 00:16:55 +0200

whereever that attachment went...
(seems to be a habit of nongnu.org
mailing lists for a few subscribers only)
i am now inlining the patch as text.
(if it still fails, i have to "try" the web interface)

BSD license is okay for me as well.
add the comments that do make this clear.
now its dual licensed giving two choices.

-Alex.

diff -Nur avr-libc-snapshot-2004-08-13.orig/include/string.h 
avr-libc-snapshot-2004-08-13/include/string.h
--- avr-libc-snapshot-2004-08-13.orig/include/string.h 2003-08-11 
23:42:13.000000000 +0200
+++ avr-libc-snapshot-2004-08-13/include/string.h 2004-08-13 09:08:40.000000000 
+0200
@@ -76,6 +76,7 @@
 extern char *strncpy(char *, const char *, size_t);
 extern int strncasecmp(const char *, const char *, size_t) __ATTR_PURE__;
 extern size_t strnlen(const char *, size_t) __ATTR_PURE__;
+extern char *strpbrk(const char *s, const char *accept);
 extern char *strrchr(const char *, int) __ATTR_PURE__;
 extern char *strrev(char *);
 extern char *strsep(char **, const char *) __ATTR_PURE__;
diff -Nur avr-libc-snapshot-2004-08-13.orig/libc/string/Makefile.am 
avr-libc-snapshot-2004-08-13/libc/string/Makefile.am
--- avr-libc-snapshot-2004-08-13.orig/libc/string/Makefile.am 2003-06-19 
22:11:29.000000000 +0200
+++ avr-libc-snapshot-2004-08-13/libc/string/Makefile.am 2004-08-13 
09:10:11.000000000 +0200
@@ -30,7 +30,8 @@

 noinst_LIBRARIES = lib.a

-lib_a_c_sources =
+lib_a_c_sources = \
+ strpbrk.c \

 lib_a_asm_sources = \
  memccpy.S     \
diff -Nur avr-libc-snapshot-2004-08-13.orig/libc/string/strpbrk.c 
avr-libc-snapshot-2004-08-13/libc/string/strpbrk.c
--- avr-libc-snapshot-2004-08-13.orig/libc/string/strpbrk.c 1970-01-01 
01:00:00.000000000 +0100
+++ avr-libc-snapshot-2004-08-13/libc/string/strpbrk.c 2004-08-13 
09:12:07.000000000 +0200
@@ -0,0 +1,13 @@
+/* (C) 2004 by Alexander Stohr (alexander dot stohr at gmx dot de) */
+/* License: GPL v2 or higher */
+
+#include <string.h>
+
+char *strpbrk(const char *s, const char *accept)
+{ char *p = (char *)s;
+  while (*p)
+  { if (strchr(accept, *p) != 0) return p;
+    p++;
+  }
+  return 0;
+}

----- Original Message ----- 
From: "Alexander Stohr" <address@hidden>
To: <address@hidden>
Sent: Friday, August 13, 2004 10:46 AM
Subject: [patch] strpbrk


> Hello,
>
> the attached patch adds the strpbrk function to avr-libc.
>
> i have tested it in a standalone program, but non-nicely failed
> on the CVS version of the sources where the patch was worked in
> due to a bunch of strange AMDEP problems (maybe its a problem
> with the version autoconf toolset on my local machine).
> thus perform one explicit compilation check when integrating.
>
> -Alex. (i am subscribed to some avr lists, but not sure right her
> if libc is amongst them - so please CC me on any talkbacks)
>
> PS: submitting this patch means i agree with publisihing under the
> same license that avr-libc is released, even if its not GPL v2 or higher.
>
> -- 
> NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler!
> GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl

reply via email to

[Prev in Thread] Current Thread [Next in Thread]