projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
exit: Obsolete module, use stdlib instead.
[gnulib.git]
/
lib
/
strstr.c
diff --git
a/lib/strstr.c
b/lib/strstr.c
index
338be82
..
265fc85
100644
(file)
--- a/
lib/strstr.c
+++ b/
lib/strstr.c
@@
-1,5
+1,5
@@
-/* Copyright (C) 1991,
92,93,94,96,97,98,2000,2004,2007,2008 Free Software
- Foundation, Inc.
+/* Copyright (C) 1991,
1992, 1993, 1994, 1996, 1997, 1998, 2000, 2004, 2007,
+
2008, 2009, 2010 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
@@
-32,8
+32,8
@@
#endif
#define RETURN_TYPE char *
#endif
#define RETURN_TYPE char *
-#define AVAILABLE(h, h_l, j, n_l) \
- (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \
+#define AVAILABLE(h, h_l, j, n_l)
\
+ (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l))
\
&& ((h_l) = (j) + (n_l)))
#include "str-two-way.h"
&& ((h_l) = (j) + (n_l)))
#include "str-two-way.h"
@@
-67,17
+67,17
@@
strstr (const char *haystack_start, const char *needle_start)
return (char *) haystack;
needle -= needle_len;
haystack_len = (haystack > haystack_start + needle_len ? 1
return (char *) haystack;
needle -= needle_len;
haystack_len = (haystack > haystack_start + needle_len ? 1
- : needle_len + haystack_start - haystack);
+
: needle_len + haystack_start - haystack);
/* Perform the search. Abstract memory is considered to be an array
of 'unsigned char' values, not an array of 'char' values. See
ISO C 99 section 6.2.6.1. */
if (needle_len < LONG_NEEDLE_THRESHOLD)
return two_way_short_needle ((const unsigned char *) haystack,
/* Perform the search. Abstract memory is considered to be an array
of 'unsigned char' values, not an array of 'char' values. See
ISO C 99 section 6.2.6.1. */
if (needle_len < LONG_NEEDLE_THRESHOLD)
return two_way_short_needle ((const unsigned char *) haystack,
- haystack_len,
- (const unsigned char *) needle, needle_len);
+
haystack_len,
+
(const unsigned char *) needle, needle_len);
return two_way_long_needle ((const unsigned char *) haystack, haystack_len,
return two_way_long_needle ((const unsigned char *) haystack, haystack_len,
- (const unsigned char *) needle, needle_len);
+
(const unsigned char *) needle, needle_len);
}
#undef LONG_NEEDLE_THRESHOLD
}
#undef LONG_NEEDLE_THRESHOLD