include strings.h where appriopriate...
instead or additionally to string.h, in preparation for functions move. * moves str[n]casecmp() functions and others to strings.h. * strings.h doesn't include string.h anymore. * this solves #10949
This commit is contained in:
+29
-1
@@ -1,6 +1,34 @@
|
||||
/*
|
||||
* Copyright 2014 Haiku, Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _STRINGS_H_
|
||||
#define _STRINGS_H_
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int ffs(int i);
|
||||
|
||||
extern int strcasecmp(const char *string1, const char *string2);
|
||||
extern int strncasecmp(const char *string1, const char *string2,
|
||||
size_t length);
|
||||
|
||||
/* legacy compatibility -- might be removed one day */
|
||||
#define bcmp(a, b, length) memcmp((a), (b), (length))
|
||||
#define bcopy(source, dest, length) memmove((dest), (source), (length))
|
||||
#define bzero(buffer, length) memset((buffer), 0, (length))
|
||||
|
||||
extern char *index(const char *s, int c);
|
||||
extern char *rindex(char const *s, int c);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _STRINGS_H_ */
|
||||
|
||||
Reference in New Issue
Block a user