Changeset 2498b95 in mainline for uspace/lib/posix/include/posix/string.h
- Timestamp:
- 2018-06-25T15:49:26Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fbfe59d
- Parents:
- bfe90b6
- git-author:
- Jiri Svoboda <jiri@…> (2018-06-24 19:48:37)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-06-25 15:49:26)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/include/posix/string.h
rbfe90b6 r2498b95 36 36 #ifndef POSIX_STRING_H_ 37 37 #define POSIX_STRING_H_ 38 39 #include "sys/types.h"40 41 38 /* 42 39 * TODO: not implemented due to missing locale support … … 48 45 49 46 #include <_bits/NULL.h> 47 #include <_bits/size_t.h> 50 48 51 /* 52 * These are the same as in HelenOS libc. 53 * It would be possible to directly include <str.h> and <mem.h> but 54 * it is better not to pollute POSIX namespace with other functions 55 * defined in that header. 56 * 57 * Because libposix is always linked with libc, providing only these 58 * forward declarations ought to be enough. 59 */ 60 61 /* From mem.h */ 62 // #define bzero(ptr, len) memset((ptr), 0, (len)) 63 extern void *memset(void *, int, size_t) 64 __attribute__((nonnull(1))); 65 extern void *memcpy(void *, const void *, size_t) 66 __attribute__((nonnull(1, 2))); 67 extern void *memmove(void *, const void *, size_t) 68 __attribute__((nonnull(1, 2))); 69 49 #include "libc/mem.h" 70 50 71 51 /* Copying and Concatenation */ … … 80 60 extern char *strndup(const char *s, size_t n); 81 61 82 /* String/Array Comparison */ 83 extern int memcmp(const void *mem1, const void *mem2, size_t n); 62 /* String Comparison */ 84 63 extern int strcmp(const char *s1, const char *s2); 85 64 extern int strncmp(const char *s1, const char *s2, size_t n); 86 65 87 66 /* Search Functions */ 88 extern void *memchr(const void *mem, int c, size_t n);89 67 extern char *strchr(const char *s, int c); 90 68 extern char *strrchr(const char *s, int c); … … 122 100 #endif 123 101 124 125 102 #endif // POSIX_STRING_H_ 126 103
Note:
See TracChangeset
for help on using the changeset viewer.