#include <windows.h>
#include <winioctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <assert.h>
|
void | pedro_dprintf (int amanda_level, char *format,...) |
|
wchar_t * | permissive_name_m_ (const wchar_t *wname, WCHAR *ar_temp) |
|
WCHAR * | amanda_asciitowide_1_ (char *pUTF8, WCHAR *ar_temp) |
|
int | size_of_WCHAR_mem_r (const char *in_string) |
|
void __cdecl | dprintf (char *format,...) |
|
HANDLE | lfopen (const char *szFileName, char *pMode) |
|
void | lfclose (HANDLE hFile) |
|
__int64 | lfseek (HANDLE hFile, __int64 iDistance, int iMode) |
|
__int64 | lftell (HANDLE hFile) |
|
__int64 | lffilesize (const char *szFileName) |
| simple function to get the size of a utf-8 encoded filename, no support to long filenames yet (above MAX_PATH)
|
|
unsigned long | lfread (void *pBuffer, unsigned long ulCount, HANDLE hFile) |
|
unsigned long | lfwrite (void *pBuffer, unsigned long ulCount, HANDLE hFile) |
|
int | asciitowide_cry (const char *pUTF8, WCHAR *pUSC2, int nUSC2) |
|
__int64 | lffilesizeW (const WCHAR *szFileName) |
|
◆ AMANDA__SIZE
#define AMANDA__SIZE ((32767 * 6) + 2) |
The maximum size of an utf-8 encoded filename with the max limit of a file in Windows
◆ AMANDA__SIZE_w
#define AMANDA__SIZE_w (32767) |
The maximum size of Unicode characters in a path in Windows, Linux is 1024 characters as far I know
◆ amanda_asciitowide_1_()
WCHAR * amanda_asciitowide_1_ |
( |
char * | pUTF8, |
|
|
WCHAR * | ar_temp ) |
To convert an utf-8 encoded filename to a wide string (WCHAR *), we . provide two functions that are exactly the same because someone may use it in multi-thread code
- Parameters
-
pUTF8 | the input utf-8 encoded filename |
- Returns
- the static allocated WCHAR array with the filename as wide string
◆ asciitowide_cry()
int asciitowide_cry |
( |
const char * | pUTF8, |
|
|
WCHAR * | pUSC2, |
|
|
int | nUSC2 ) |
◆ dprintf()
void __cdecl dprintf |
( |
char * | format, |
|
|
| ... ) |
|
extern |
◆ lfclose()
void lfclose |
( |
HANDLE | hFile | ) |
|
◆ lffilesize()
__int64 lffilesize |
( |
const char * | szFileName | ) |
|
simple function to get the size of a utf-8 encoded filename, no support to long filenames yet (above MAX_PATH)
to get the file input size, with support to files above 2gb, and unicode support
- Parameters
-
szFileName | utf-8 encoded filename |
- Returns
- __int64
- Parameters
-
szFileName | the utf-8 encoded input file |
- Returns
- __int64
◆ lffilesizeW()
__int64 lffilesizeW |
( |
const WCHAR * | szFileName | ) |
|
◆ lfopen()
HANDLE lfopen |
( |
const char * | szFileName, |
|
|
char * | pMode ) |
◆ lfread()
unsigned long lfread |
( |
void * | pBuffer, |
|
|
unsigned long | ulCount, |
|
|
HANDLE | hFile ) |
◆ lfseek()
__int64 lfseek |
( |
HANDLE | hFile, |
|
|
__int64 | iDistance, |
|
|
int | iMode ) |
◆ lftell()
__int64 lftell |
( |
HANDLE | hFile | ) |
|
◆ lfwrite()
unsigned long lfwrite |
( |
void * | pBuffer, |
|
|
unsigned long | ulCount, |
|
|
HANDLE | hFile ) |
◆ pedro_dprintf()
void pedro_dprintf |
( |
int | amanda_level, |
|
|
char * | format, |
|
|
| ... ) |
|
extern |
◆ permissive_name_m_()
wchar_t * permissive_name_m_ |
( |
const wchar_t * | wname, |
|
|
WCHAR * | ar_temp ) |
To make the path wide mode aware, stolen from libarchive
15/september/2021 10:14, last visit 16/09/2021 22:36 by bhond...
◆ size_of_WCHAR_mem_r()
int size_of_WCHAR_mem_r |
( |
const char * | in_string | ) |
|
|
extern |
To convert an utf-8 encoded filename to a wide string (WCHAR *), we . provide two functions that are exactly the same because someone may use it in multi-thread code
- Parameters
-
pUTF8 | the input utf-8 encoded filename |
- Returns
- the static allocated WCHAR array with the filename as wide string
◆ unicodemode