2 * Copyright (c) 2001,2004 David H. Hovemeyer <daveho@cs.umd.edu>
3 * Copyright (c) 2003, Jeffrey K. Hollingsworth <hollings@cs.umd.edu>
5 * Permission is hereby granted, free of charge, to any person
6 * obtaining a copy of this software and associated documentation
7 * files (the "Software"), to deal in the Software without restriction,
8 * including without limitation the rights to use, copy, modify, merge,
9 * publish, distribute, sublicense, and/or sell copies of the Software,
10 * and to permit persons to whom the Software is furnished to do so,
11 * subject to the following conditions:
13 * The above copyright notice and this permission notice shall be
14 * included in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
17 * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
19 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
20 * SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
21 * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
24 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 * 2008, Jack Lange <jarusl@cs.northwestern.edu>
29 * 2008, Lei Xia <xiaxlei@gmail.com>
32 #ifndef __VMM_STRING_H__
33 #define __VMM_STRING_H__
37 #include <palacios/vmm_stddef.h>
40 void* memset(void* s, int c, size_t n);
41 void* memcpy(void *dst, const void* src, size_t n);
42 //void *memmove(void *dst, const void *src, size_t n);
43 int memcmp(const void *s1, const void *s2, size_t n);
44 size_t strlen(const char* s);
45 size_t strnlen(const char *s, size_t maxlen);
46 int strcmp(const char* s1, const char* s2);
47 int strncmp(const char* s1, const char* s2, size_t limit);
48 char *strcat(char *s1, const char *s2);
49 char *strncat(char *s1, const char *s2, size_t limit);
50 char *strcpy(char *dest, const char *src);
51 char *strncpy(char *dest, const char *src, size_t limit);
52 char *strdup(const char *s1);
53 int atoi(const char *buf);
54 char *strchr(const char *s, int c);
55 char *strrchr(const char *s, int c);
56 char *strpbrk(const char *s, const char *accept);
59 double v3_ceil(double x);