#include <phbase.h>
#include <locale.h>
#include "format_i.h"
Go to the source code of this file.
|
errno_t __cdecl | _cfltcvt_l (double *arg, char *buffer, size_t sizeInBytes, int format, int precision, int caps, _locale_t plocinfo) |
|
void __cdecl | _cropzeros_l (char *_Buf, _locale_t _Locale) |
|
void __cdecl | _forcdecpt_l (char *_Buf, _locale_t _Locale) |
|
PPH_STRING | PhpResizeFormatBuffer (_In_ PPH_STRING String, _Inout_ PSIZE_T AllocatedLength, _In_ SIZE_T UsedLength, _In_ SIZE_T NeededLength) |
|
PPH_STRING | PhFormat (_In_reads_(Count) PPH_FORMAT Format, _In_ ULONG Count, _In_opt_ SIZE_T InitialCapacity) |
| Creates a formatted string.
|
|
BOOLEAN | PhFormatToBuffer (_In_reads_(Count) PPH_FORMAT Format, _In_ ULONG Count, _Out_writes_bytes_opt_(BufferLength) PWSTR Buffer, _In_opt_ SIZE_T BufferLength, _Out_opt_ PSIZE_T ReturnLength) |
| Writes a formatted string to a buffer.
|
|
#define ADVANCE_BUFFER |
( |
|
Length | ) |
do { buffer += (Length) / sizeof(WCHAR); usedLength += (Length); } while (0) |
#define ADVANCE_BUFFER |
( |
|
Length | ) |
do { buffer += (Length) / sizeof(WCHAR); usedLength += (Length); } while (0) |
#define ENSURE_BUFFER |
( |
|
NeededLength | ) |
|
Value:do { \
if (allocatedLength < usedLength + (NeededLength)) \
{ \
buffer = string->Buffer + usedLength / sizeof(WCHAR); \
} \
} while (0)
#define ENSURE_BUFFER |
( |
|
NeededLength | ) |
|
Value:do { \
if (!overrun && (BufferLength < usedLength + (NeededLength))) \
} while (0)
#define OK_BUFFER (!overrun) |
#define PHP_FORMAT_NEGATIVE 0x1 |
#define PHP_FORMAT_PAD 0x4 |
#define PHP_FORMAT_POSITIVE 0x2 |
errno_t __cdecl _cfltcvt_l |
( |
double * |
arg, |
|
|
char * |
buffer, |
|
|
size_t |
sizeInBytes, |
|
|
int |
format, |
|
|
int |
precision, |
|
|
int |
caps, |
|
|
_locale_t |
plocinfo |
|
) |
| |
void __cdecl _cropzeros_l |
( |
char * |
_Buf, |
|
|
_locale_t |
_Locale |
|
) |
| |
void __cdecl _forcdecpt_l |
( |
char * |
_Buf, |
|
|
_locale_t |
_Locale |
|
) |
| |
PPH_STRING PhFormat |
( |
_In_reads_(Count) PPH_FORMAT |
Format, |
|
|
_In_ ULONG |
Count, |
|
|
_In_opt_ SIZE_T |
InitialCapacity |
|
) |
| |
Creates a formatted string.
- Parameters
-
Format | An array of format structures. |
Count | The number of structures supplied in Format. |
InitialCapacity | The number of bytes to reserve initially for the string. If 0 is specified, a default value is used. |
Definition at line 105 of file format.c.
BOOLEAN PhFormatToBuffer |
( |
_In_reads_(Count) PPH_FORMAT |
Format, |
|
|
_In_ ULONG |
Count, |
|
|
_Out_writes_bytes_opt_(BufferLength) PWSTR |
Buffer, |
|
|
_In_opt_ SIZE_T |
BufferLength, |
|
|
_Out_opt_ PSIZE_T |
ReturnLength |
|
) |
| |
Writes a formatted string to a buffer.
- Parameters
-
Format | An array of format structures. |
Count | The number of structures supplied in Format. |
Buffer | A buffer. If NULL, no data is written. |
BufferLength | The number of bytes available in Buffer, including space for the null terminator. |
ReturnLength | The number of bytes required to hold the string, including the null terminator. |
- Returns
- TRUE if the buffer was large enough and the string was written (i.e. BufferLength >= ReturnLength), otherwise FALSE. In either case, the required number of bytes is stored in ReturnLength.
Definition at line 175 of file format.c.
PPH_STRING PhpResizeFormatBuffer |
( |
_In_ PPH_STRING |
String, |
|
|
_Inout_ PSIZE_T |
AllocatedLength, |
|
|
_In_ SIZE_T |
UsedLength, |
|
|
_In_ SIZE_T |
NeededLength |
|
) |
| |