1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: nlib_horizon.h 4 Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. 5 These coded instructions, statements, and computer programs contain 6 proprietary information of Nintendo of America Inc. and/or Nintendo 7 Company Ltd., and are protected by Federal copyright law. They may 8 not be disclosed to third parties or copied or duplicated in any form, 9 in whole or in part, without the prior written consent of Nintendo. 10 $Rev: 21978 $ 11 *--------------------------------------------------------------------------- 12 13 14 */ 15 16 /* Please see man pages for details 17 18 */ 19 20 21 #include <string.h> 22 #include <stdio.h> 23 #include <nn/nstd.h> 24 #include <nn/nstd/nstd_String.h> 25 26 #ifdef __cplusplus 27 extern "C" { 28 #endif 29 30 /* 31 Prepare the following functions. 32 ・NLIB_memcpy 33 ・NLIB_memcmp 34 ・NLIB_memmove 35 ・NLIB_memset 36 ・NLIB_strcmp 37 ・NLIB_strncmp 38 ・NLIB_strlcmp 39 ・NLIB_strlen 40 ・NLIB_strcat 41 ・NLIB_strlcat 42 ・NLIB_strcpy 43 ・NLIB_strlcpy 44 ・NLIB_strchr 45 ・NLIB_strrchr 46 ・NLIB_strstr 47 ・NLIB_strnlen 48 ・NLIB_snprintf 49 ・NLIB_strtok_r 50 */ 51 52 #define NLIB_memcpy nnnstdMemCpy 53 #define NLIB_memcmp memcmp 54 #define NLIB_memmove nnnstdMemMove 55 #define NLIB_memset memset 56 #define NLIB_strcmp strcmp 57 #define NLIB_strncmp strncmp 58 #define NLIB_strlcmp strlcmp 59 #define NLIB_strlen strlen 60 #define NLIB_strcat strcat 61 #define NLIB_strlcat strlca 62 #define NLIB_strcpy strcpy 63 #define NLIB_strlcpy strlcpy 64 #define NLIB_strchr strchr 65 #define NLIB_strrchr strrchr 66 #define NLIB_strstr strstr 67 68 int NLIB_strnlen(const char *str, int len); 69 70 #define NLIB_sprintf nnnstdTSPrintf 71 #define NLIB_snprintf nnnstdTSNPrintf 72 char *NLIB_strtok_r(char *str, const char *delim, char **last); /* strtok_r function is not in TWL. Accordingly, it has been implemented separately. */ 73 74 75 #ifdef __cplusplus 76 } 77 #endif 78