X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_string.h;fp=palacios%2Finclude%2Fpalacios%2Fvmm_string.h;h=975a3d1acf16ff8b400627c0ebadeaae5825a908;hp=0000000000000000000000000000000000000000;hb=ddc16b0737cf58f7aa90a69c6652cdf4090aec51;hpb=626595465a2c6987606a6bc697df65130ad8c2d3 diff --git a/palacios/include/palacios/vmm_string.h b/palacios/include/palacios/vmm_string.h new file mode 100644 index 0000000..975a3d1 --- /dev/null +++ b/palacios/include/palacios/vmm_string.h @@ -0,0 +1,65 @@ +/* * String library + * Copyright (c) 2001,2004 David H. Hovemeyer + * Copyright (c) 2003, Jeffrey K. Hollingsworth + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF + * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED + * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT + * SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE + * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* Modifications: + * 2008, Jack Lange + * 2008, Lei Xia + */ + +#ifndef __VMM_STRING_H__ +#define __VMM_STRING_H__ + +#ifdef __V3VEE__ + +#include + + +void* memset(void* s, int c, size_t n); +void* memcpy(void *dst, const void* src, size_t n); +//void *memmove(void *dst, const void *src, size_t n); +int memcmp(const void *s1, const void *s2, size_t n); +size_t strlen(const char* s); +size_t strnlen(const char *s, size_t maxlen); +int strcmp(const char* s1, const char* s2); +int strncmp(const char* s1, const char* s2, size_t limit); +char *strcat(char *s1, const char *s2); +char *strncat(char *s1, const char *s2, size_t limit); +char *strcpy(char *dest, const char *src); +char *strncpy(char *dest, const char *src, size_t limit); +char *strdup(const char *s1); +int atoi(const char *buf); +char *strchr(const char *s, int c); +char *strrchr(const char *s, int c); +char *strpbrk(const char *s, const char *accept); + + +double v3_ceil(double x); + + + +#endif // !__V3VEE__ + +#endif /* STRING_H */