|
ReactOS 0.4.16-dev-1946-g52006dd
|
#include "config.h"#include "intsym.h"#include <errno.h>#include <stdlib.h>#include <stdio.h>#include <math.h>#include <signal.h>#include <unistd.h>#include <sys/types.h>#include <inttypes.h>#include <stdint.h>#include <limits.h>#include <string.h>#include <strings.h>#include <sys/time.h>#include <fcntl.h>#include "true.h"

Go to the source code of this file.
Macros | |
| #define | inline |
| #define | SIZE_MAX ((size_t)-1) |
| #define | SSIZE_MAX ((size_t)-1/2) |
| #define | ULONG_MAX ((unsigned long)-1) |
| #define | atobigint atoll |
| #define | OFF_P "li" |
| #define | SIZE_P "lu" |
| #define | SSIZE_P "li" |
Typedefs | |
| typedef unsigned char | byte |
| typedef long | off_p |
| typedef unsigned long | size_p |
| typedef long | ssize_p |
Functions | |
| void * | safe_realloc (void *ptr, size_t size) |
| char * | compat_strdup (const char *s) |
| char * | compat_getenv (const char *name) |
| int | compat_open (const char *filename, int flags) |
| FILE * | compat_fopen (const char *filename, const char *mode) |
| FILE * | compat_fdopen (int fd, const char *mode) |
| int | compat_close (int infd) |
| int | compat_fclose (FILE *stream) |
| int | win32_wide_utf8 (const wchar_t *const wptr, char **mbptr, size_t *buflen) |
| int | win32_utf8_wide (const char *const mbptr, wchar_t **wptr, size_t *buflen) |
| char * | compat_catpath (const char *prefix, const char *path) |
| int | compat_isdir (const char *path) |
| struct compat_dir * | compat_diropen (char *path) |
| void | compat_dirclose (struct compat_dir *) |
| char * | compat_nextfile (struct compat_dir *) |
| char * | compat_nextdir (struct compat_dir *) |
| size_t | unintr_write (int fd, void const *buffer, size_t bytes) |
| size_t | unintr_read (int fd, void *buffer, size_t bytes) |
| size_t | unintr_fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream) |
Variables | |
| void(*)() | catchsignal (int signum, void(*handler)()) |
Definition at line 324 of file compat.c.
Closing a file handle can be platform specific. This function takes a file descriptor that is to be closed.
| [in] | infd | File descriptor to be closed. |
Definition at line 253 of file compat.c.
| void compat_dirclose | ( | struct compat_dir * | cd | ) |
| struct compat_dir * compat_diropen | ( | char * | path | ) |
Definition at line 431 of file compat.c.
Also fdopen to avoid having to define POSIX macros in various source files.
Definition at line 218 of file compat.c.
| char * compat_nextdir | ( | struct compat_dir * | cd | ) |
Definition at line 529 of file compat.c.
| char * compat_nextfile | ( | struct compat_dir * | cd | ) |
Opening a file handle can be different. This function here is defined to take a path in native encoding (ISO8859 / UTF-8 / ...), or, when MS Windows Unicode support is enabled, an UTF-8 string that will be converted back to native UCS-2 (wide character) before calling the system's open function.
| [in] | wptr | Pointer to wide string. |
| [in] | mbptr | Pointer to multibyte string. |
Definition at line 181 of file compat.c.
Definition at line 16 of file compat_str.c.
win32_mbc2uni Converts a null terminated UTF-8 string to a UCS-2 equivalent. Caller is supposed to free allocated buffer.
| [out] | mbptr | Pointer to multibyte string. |
| [in] | wptr | Pointer to wide string. |
| [out] | buflen | Optional parameter for length of allocated buffer. |
MultiByteToWideChar - https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar
win32_uni2mbc Converts a null terminated UCS-2 string to a multibyte (UTF-8) equivalent. Caller is supposed to free allocated buffer.
| [in] | wptr | Pointer to wide string. |
| [out] | mbptr | Pointer to multibyte string. |
| [out] | buflen | Optional parameter for length of allocated buffer. |
WideCharToMultiByte - https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte