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