1 | /** @file
|
---|
2 | * IPRT / No-CRT - string.h.
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2006-2022 Oracle Corporation
|
---|
7 | *
|
---|
8 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | * available from http://www.virtualbox.org. This file is free software;
|
---|
10 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | * General Public License (GPL) as published by the Free Software
|
---|
12 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
13 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
14 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | *
|
---|
16 | * The contents of this file may alternatively be used under the terms
|
---|
17 | * of the Common Development and Distribution License Version 1.0
|
---|
18 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
19 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
20 | * CDDL are applicable instead of those of the GPL.
|
---|
21 | *
|
---|
22 | * You may elect to license modified versions of this file under the
|
---|
23 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
24 | */
|
---|
25 |
|
---|
26 | #ifndef IPRT_INCLUDED_nocrt_string_h
|
---|
27 | #define IPRT_INCLUDED_nocrt_string_h
|
---|
28 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
29 | # pragma once
|
---|
30 | #endif
|
---|
31 |
|
---|
32 | #include <iprt/types.h>
|
---|
33 |
|
---|
34 | RT_C_DECLS_BEGIN
|
---|
35 |
|
---|
36 | void * RT_NOCRT(memchr)(const void *pv, int ch, size_t cb);
|
---|
37 | int RT_NOCRT(memcmp)(const void *pv1, const void *pv2, size_t cb);
|
---|
38 | void * RT_NOCRT(memcpy)(void *pvDst, const void *pvSrc, size_t cb);
|
---|
39 | void * RT_NOCRT(mempcpy)(void *pvDst, const void *pvSrc, size_t cb);
|
---|
40 | void * RT_NOCRT(memrchr)(const void *pv, int ch, size_t cb);
|
---|
41 | void * RT_NOCRT(memmove)(void *pvDst, const void *pvSrc, size_t cb);
|
---|
42 | void * RT_NOCRT(memset)(void *pvDst, int ch, size_t cb);
|
---|
43 |
|
---|
44 | char * RT_NOCRT(strcat)(char *pszDst, const char *pszSrc);
|
---|
45 | char * RT_NOCRT(strncat)(char *pszDst, const char *pszSrc, size_t cch);
|
---|
46 | char * RT_NOCRT(strchr)(const char *psz, int ch);
|
---|
47 | char * RT_NOCRT(strrchr)(const char *psz, int ch);
|
---|
48 | int RT_NOCRT(strcmp)(const char *psz1, const char *psz2);
|
---|
49 | int RT_NOCRT(strncmp)(const char *psz1, const char *psz2, size_t cch);
|
---|
50 | int RT_NOCRT(stricmp)(const char *psz1, const char *psz2);
|
---|
51 | int RT_NOCRT(strnicmp)(const char *psz1, const char *psz2, size_t cch);
|
---|
52 | char * RT_NOCRT(strcpy)(char *pszDst, const char *pszSrc);
|
---|
53 | char * RT_NOCRT(strncpy)(char *pszDst, const char *pszSrc, size_t cch);
|
---|
54 | char * RT_NOCRT(strcat)(char *pszDst, const char *pszSrc);
|
---|
55 | char * RT_NOCRT(strncat)(char *pszDst, const char *pszSrc, size_t cch);
|
---|
56 | size_t RT_NOCRT(strlen)(const char *psz);
|
---|
57 | size_t RT_NOCRT(strnlen)(const char *psz, size_t cch);
|
---|
58 | size_t RT_NOCRT(strcspn)(const char *psz, const char *pszBreakChars);
|
---|
59 | char * RT_NOCRT(strpbrk)(const char *psz, const char *pszBreakChars);
|
---|
60 | char * RT_NOCRT(strstr)(const char *psz, const char *pszSub);
|
---|
61 |
|
---|
62 | size_t RT_NOCRT(wcslen)(const wchar_t *pwsz);
|
---|
63 | wchar_t *RT_NOCRT(wcscat)(wchar_t *pwszDst, const wchar_t *pwszSrc);
|
---|
64 | wchar_t *RT_NOCRT(wcschr)(const wchar_t *pwszDst, wchar_t wc);
|
---|
65 | wchar_t *RT_NOCRT(wcscpy)(wchar_t *pwszDst, const wchar_t *pwszSrc);
|
---|
66 | int RT_NOCRT(_wcsicmp)(const wchar_t *pwsz1, const wchar_t *pwsz2);
|
---|
67 | size_t RT_NOCRT(wcstombs)(char *pszDst, const wchar_t *pszSrc, size_t cbDst);
|
---|
68 |
|
---|
69 | #if !defined(RT_WITHOUT_NOCRT_WRAPPERS) && !defined(RT_WITHOUT_NOCRT_WRAPPER_ALIASES)
|
---|
70 | # define memchr RT_NOCRT(memchr)
|
---|
71 | # define memcmp RT_NOCRT(memcmp)
|
---|
72 | # define memcpy RT_NOCRT(memcpy)
|
---|
73 | # define mempcpy RT_NOCRT(mempcpy)
|
---|
74 | # define memrchr RT_NOCRT(memrchr)
|
---|
75 | # define memmove RT_NOCRT(memmove)
|
---|
76 | # define memset RT_NOCRT(memset)
|
---|
77 |
|
---|
78 | # define strcat RT_NOCRT(strcat)
|
---|
79 | # define strncat RT_NOCRT(strncat)
|
---|
80 | # define strchr RT_NOCRT(strchr)
|
---|
81 | # define strrchr RT_NOCRT(strrchr)
|
---|
82 | # define strcmp RT_NOCRT(strcmp)
|
---|
83 | # define strncmp RT_NOCRT(strncmp)
|
---|
84 | # define stricmp RT_NOCRT(stricmp)
|
---|
85 | # define strnicmp RT_NOCRT(strnicmp)
|
---|
86 | # define strcpy RT_NOCRT(strcpy)
|
---|
87 | # define strncpy RT_NOCRT(strncpy)
|
---|
88 | # define strcat RT_NOCRT(strcat)
|
---|
89 | # define strncat RT_NOCRT(strncat)
|
---|
90 | # define strlen RT_NOCRT(strlen)
|
---|
91 | # define strnlen RT_NOCRT(strnlen)
|
---|
92 | # define strcspn RT_NOCRT(strcspn)
|
---|
93 | # define strpbrk RT_NOCRT(strpbrk)
|
---|
94 | # define strstr RT_NOCRT(strstr)
|
---|
95 |
|
---|
96 | # define wcslen RT_NOCRT(wcslen)
|
---|
97 | # define wcscat RT_NOCRT(wcscat)
|
---|
98 | # define wcschr RT_NOCRT(wcschr)
|
---|
99 | # define wcscpy RT_NOCRT(wcscpy)
|
---|
100 | # define _wcsicmp RT_NOCRT(_wcsicmp)
|
---|
101 | # define wcstombs RT_NOCRT(wcstombs)
|
---|
102 | #endif
|
---|
103 |
|
---|
104 | RT_C_DECLS_END
|
---|
105 |
|
---|
106 | #endif /* !IPRT_INCLUDED_nocrt_string_h */
|
---|