diff options
| author | manuel <manuel@mausz.at> | 2012-03-26 12:54:45 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2012-03-26 12:54:45 +0200 |
| commit | b5f0874cd96ee2a62aabc645b9626c2749cb6a01 (patch) | |
| tree | 1262e4bbe0634de6650be130c36e0538240f4cbf /pintos-progos/lib/string.h | |
| download | progos-b5f0874cd96ee2a62aabc645b9626c2749cb6a01.tar.gz progos-b5f0874cd96ee2a62aabc645b9626c2749cb6a01.tar.bz2 progos-b5f0874cd96ee2a62aabc645b9626c2749cb6a01.zip | |
initial pintos checkin
Diffstat (limited to 'pintos-progos/lib/string.h')
| -rw-r--r-- | pintos-progos/lib/string.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/pintos-progos/lib/string.h b/pintos-progos/lib/string.h new file mode 100644 index 0000000..1fff82a --- /dev/null +++ b/pintos-progos/lib/string.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | #ifndef __LIB_STRING_H | ||
| 2 | #define __LIB_STRING_H | ||
| 3 | |||
| 4 | #include <stddef.h> | ||
| 5 | |||
| 6 | /* Standard. */ | ||
| 7 | void *memcpy (void *, const void *, size_t); | ||
| 8 | void *memmove (void *, const void *, size_t); | ||
| 9 | char *strncat (char *, const char *, size_t); | ||
| 10 | int memcmp (const void *, const void *, size_t); | ||
| 11 | int strcmp (const char *, const char *); | ||
| 12 | void *memchr (const void *, int, size_t); | ||
| 13 | char *strchr (const char *, int); | ||
| 14 | size_t strcspn (const char *, const char *); | ||
| 15 | char *strpbrk (const char *, const char *); | ||
| 16 | char *strrchr (const char *, int); | ||
| 17 | size_t strspn (const char *, const char *); | ||
| 18 | char *strstr (const char *, const char *); | ||
| 19 | void *memset (void *, int, size_t); | ||
| 20 | size_t strlen (const char *); | ||
| 21 | |||
| 22 | /* Extensions. */ | ||
| 23 | size_t strlcpy (char *, const char *, size_t); | ||
| 24 | size_t strlcat (char *, const char *, size_t); | ||
| 25 | char *strtok_r (char *, const char *, char **); | ||
| 26 | size_t strnlen (const char *, size_t); | ||
| 27 | |||
| 28 | /* Try to be helpful. */ | ||
| 29 | #define strcpy dont_use_strcpy_use_strlcpy | ||
| 30 | #define strncpy dont_use_strncpy_use_strlcpy | ||
| 31 | #define strcat dont_use_strcat_use_strlcat | ||
| 32 | #define strncat dont_use_strncat_use_strlcat | ||
| 33 | #define strtok dont_use_strtok_use_strtok_r | ||
| 34 | |||
| 35 | #endif /* lib/string.h */ | ||
