FreeRDP
|
#include <winpr/config.h>
#include <winpr/assert.h>
#include <errno.h>
#include <stdio.h>
#include <ctype.h>
#include <wctype.h>
#include <wchar.h>
#include <winpr/crt.h>
#include <winpr/endian.h>
#include "../log.h"
#include "casing.h"
Macros | |
#define | TAG WINPR_TAG("crt") |
#define | MIN(x, y) (((x) < (y)) ? (x) : (y)) |
Functions | |
static char | hex2bin (char what) |
static char | unescape (const char *what, size_t *px) |
char * | winpr_str_url_decode (const char *str, size_t len) |
static char * | escape (char *dst, char what) |
char * | winpr_str_url_encode (const char *str, size_t len) |
BOOL | winpr_str_append (const char *what, char *buffer, size_t size, const char *separator) |
int | winpr_asprintf (char **s, size_t *slen, WINPR_FORMAT_ARG const char *templ,...) |
int | winpr_vasprintf (char **s, size_t *slen, WINPR_FORMAT_ARG const char *templ, va_list oap) |
char * | _strdup (const char *strSource) |
WCHAR * | _wcsdup (const WCHAR *strSource) |
WCHAR * | _wcsncat (WCHAR *dst, const WCHAR *src, size_t sz) |
int | _stricmp (const char *string1, const char *string2) |
int | _strnicmp (const char *string1, const char *string2, size_t count) |
int | _wcscmp (const WCHAR *string1, const WCHAR *string2) |
int | _wcsncmp (const WCHAR *string1, const WCHAR *string2, size_t count) |
size_t | _wcslen (const WCHAR *str) |
size_t | _wcsnlen (const WCHAR *str, size_t max) |
WCHAR * | _wcsstr (const WCHAR *str, const WCHAR *strSearch) |
WCHAR * | _wcschr (const WCHAR *str, WCHAR value) |
WCHAR * | _wcsrchr (const WCHAR *str, WCHAR c) |
char * | strtok_s (char *strToken, const char *strDelimit, char **context) |
WCHAR * | wcstok_s (WCHAR *strToken, const WCHAR *strDelimit, WCHAR **context) |
LPSTR | CharUpperA (LPSTR lpsz) |
LPWSTR | CharUpperW (LPWSTR lpsz) |
DWORD | CharUpperBuffA (LPSTR lpsz, DWORD cchLength) |
DWORD | CharUpperBuffW (LPWSTR lpsz, DWORD cchLength) |
LPSTR | CharLowerA (LPSTR lpsz) |
LPWSTR | CharLowerW (LPWSTR lpsz) |
DWORD | CharLowerBuffA (LPSTR lpsz, DWORD cchLength) |
DWORD | CharLowerBuffW (LPWSTR lpsz, DWORD cchLength) |
BOOL | IsCharAlphaA (CHAR ch) |
BOOL | IsCharAlphaW (WCHAR ch) |
BOOL | IsCharAlphaNumericA (CHAR ch) |
BOOL | IsCharAlphaNumericW (WCHAR ch) |
BOOL | IsCharUpperA (CHAR ch) |
BOOL | IsCharUpperW (WCHAR ch) |
BOOL | IsCharLowerA (CHAR ch) |
BOOL | IsCharLowerW (WCHAR ch) |
size_t | ConvertLineEndingToLF (char *str, size_t size) |
char * | ConvertLineEndingToCRLF (const char *str, size_t *size) |
char * | StrSep (char **stringp, const char *delim) |
INT64 | GetLine (char **lineptr, size_t *size, FILE *stream) |
char * | strndup (const char *src, size_t n) |
const WCHAR * | InitializeConstWCharFromUtf8 (const char *str, WCHAR *buffer, size_t len) |
Helper function to initialize const WCHAR pointer from a Utf8 string. More... | |
Variables | |
static const char | rfc3986 [] |
#define TAG WINPR_TAG("crt") |
WinPR: Windows Portable Runtime String Manipulation (CRT)
Copyright 2012 Marc-Andre Moreau marca ndre .more au@g mail. com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
char* _strdup | ( | const char * | strSource | ) |
int _stricmp | ( | const char * | string1, |
const char * | string2 | ||
) |
int _strnicmp | ( | const char * | string1, |
const char * | string2, | ||
size_t | count | ||
) |
WCHAR* _wcschr | ( | const WCHAR * | str, |
WCHAR | value | ||
) |
int _wcscmp | ( | const WCHAR * | string1, |
const WCHAR * | string2 | ||
) |
WCHAR* _wcsdup | ( | const WCHAR * | strSource | ) |
size_t _wcslen | ( | const WCHAR * | str | ) |
WCHAR* _wcsncat | ( | WCHAR * | dst, |
const WCHAR * | src, | ||
size_t | sz | ||
) |
int _wcsncmp | ( | const WCHAR * | string1, |
const WCHAR * | string2, | ||
size_t | count | ||
) |
size_t _wcsnlen | ( | const WCHAR * | str, |
size_t | max | ||
) |
WCHAR* _wcsrchr | ( | const WCHAR * | str, |
WCHAR | c | ||
) |
WCHAR* _wcsstr | ( | const WCHAR * | str, |
const WCHAR * | strSearch | ||
) |
LPSTR CharLowerA | ( | LPSTR | lpsz | ) |
DWORD CharLowerBuffA | ( | LPSTR | lpsz, |
DWORD | cchLength | ||
) |
DWORD CharLowerBuffW | ( | LPWSTR | lpsz, |
DWORD | cchLength | ||
) |
LPWSTR CharLowerW | ( | LPWSTR | lpsz | ) |
LPSTR CharUpperA | ( | LPSTR | lpsz | ) |
DWORD CharUpperBuffA | ( | LPSTR | lpsz, |
DWORD | cchLength | ||
) |
DWORD CharUpperBuffW | ( | LPWSTR | lpsz, |
DWORD | cchLength | ||
) |
LPWSTR CharUpperW | ( | LPWSTR | lpsz | ) |
char* ConvertLineEndingToCRLF | ( | const char * | str, |
size_t * | size | ||
) |
size_t ConvertLineEndingToLF | ( | char * | str, |
size_t | size | ||
) |
|
static |
INT64 GetLine | ( | char ** | lineptr, |
size_t * | size, | ||
FILE * | stream | ||
) |
|
static |
const WCHAR* InitializeConstWCharFromUtf8 | ( | const char * | str, |
WCHAR * | buffer, | ||
size_t | len | ||
) |
Helper function to initialize const WCHAR pointer from a Utf8 string.
str | The Utf8 string to use for initialization |
buffer | The WCHAR buffer used to store the converted data |
len | The size of the buffer in number of WCHAR |
BOOL IsCharAlphaA | ( | CHAR | ch | ) |
BOOL IsCharAlphaNumericA | ( | CHAR | ch | ) |
BOOL IsCharAlphaNumericW | ( | WCHAR | ch | ) |
BOOL IsCharAlphaW | ( | WCHAR | ch | ) |
BOOL IsCharLowerA | ( | CHAR | ch | ) |
BOOL IsCharLowerW | ( | WCHAR | ch | ) |
BOOL IsCharUpperA | ( | CHAR | ch | ) |
BOOL IsCharUpperW | ( | WCHAR | ch | ) |
char* strndup | ( | const char * | src, |
size_t | n | ||
) |
char* StrSep | ( | char ** | stringp, |
const char * | delim | ||
) |
char* strtok_s | ( | char * | strToken, |
const char * | strDelimit, | ||
char ** | context | ||
) |
|
static |
WCHAR* wcstok_s | ( | WCHAR * | strToken, |
const WCHAR * | strDelimit, | ||
WCHAR ** | context | ||
) |
int winpr_asprintf | ( | char ** | s, |
size_t * | slen, | ||
WINPR_FORMAT_ARG const char * | templ, | ||
... | |||
) |
BOOL winpr_str_append | ( | const char * | what, |
char * | buffer, | ||
size_t | size, | ||
const char * | separator | ||
) |
char* winpr_str_url_decode | ( | const char * | str, |
size_t | len | ||
) |
char* winpr_str_url_encode | ( | const char * | str, |
size_t | len | ||
) |
WinPR: Windows Portable Runtime String Manipulation (CRT)
Copyright 2012 Marc-Andre Moreau marca Copyright 2016 David PHAM-VAN ndre .more au@g mail. comd.pha mvan @inuv ika. com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
int winpr_vasprintf | ( | char ** | s, |
size_t * | slen, | ||
WINPR_FORMAT_ARG const char * | templ, | ||
va_list | oap | ||
) |
|
static |