Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
dll.c File Reference
#include <windows.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <fcntl.h>
#include <ctype.h>
#include <math.h>
#include <wctype.h>
#include <wchar.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <locale.h>
#include <signal.h>
#include <limits.h>
#include <float.h>
#include <iso646.h>
#include <assert.h>
#include "aline_definitive_header_2_.h"

Go to the source code of this file.

Macros

#define uchar   unsigned char
 
#define uint   unsigned int
 
#define ushort   unsigned short
 
#define MYCAST   int
 
#define __attribute__(unused)
 
#define AMANDA__SIZE   ((32767 * 6) + 2)
 
#define AMANDA__SIZE_w   (32767)
 

Typedefs

typedef void * myfile
 

Functions

void pedro_dprintf2 (int amanda_level, char *format,...)
 pedro_dprintf2 is my variant of my debug function because too much calls to pedro_dprintf these days, I am lazy, sorry....
 
WCHAR * amanda_asciitowide_1_v27 (char *pUTF8)
 
void pedro_dprintf (int amanda_level, char *format,...)
 
__int64 lffilesize_dl (const char *szFileName)
 default function to get the size of files with Unicode support
 
uint __stdcall rspcompress (char *inputfile, char *outfile)
 
int zcompress_sha512_k (char *input, char *output, int levelin)
 
uint __stdcall rspuncompress (uchar *outfile, uchar *outfile2)
 
int zuncompress (char *input, char *output)
 
int zcompress (char *input, char *output, int level)
 
int utf8towide (const char *pUTF8, WCHAR *pUSC2, int nUSC2)
 
int gzclose (myfile file)
 
myfile gzopen (char *path_now_as_utf8, char *mode)
 
myfile gzopen_w (WCHAR *path_now_as_utf8, char *mode)
 
int gzread (myfile file, char *buf, uint len)
 
char * gzerror (myfile file, int *errnum)
 
int gzwrite (myfile file, const char *buf, uint len)
 
float inittimer (uint comando)
 
void dprintf (char *format,...)
 
uint __stdcall rspvalidatefile (uchar *outfile2)
 
int __stdcall startapi_xcx_gz (int parameter)
 
uint getval (int max, uint por)
 
uint getmax (int por, uint fatia)
 
uint __stdcall getporcentagem ()
 
uint __stdcall tcompress (char *inputfile, char *outfile)
 
uint __stdcall tuncompress (uchar *outfile, uchar *outfile2)
 
uint __stdcall tcompressgzip2 (char *inputfile, char *outfile)
 
uint __stdcall tcompressgzip2_sha512_k (char *inputfile, char *outfile)
 
uint __stdcall tuncompressgzip2 (uchar *outfile, uchar *outfile2)
 
uint __stdcall tcompressgzip2_utf8_k (char *inputfile, char *outfile)
 
uint __stdcall tuncompressgzip2_utf8_k (uchar *outfile, uchar *outfile2)
 
int __stdcall startapi_xcx_gz (__attribute__((unused)) int parameter)
 
int __stdcall getintret ()
 
int __stdcall getfinished ()
 
int __stdcall setfinished (uint newvalue)
 
int __stdcall interface1_xcx_gz (int argumento1, int argumento2, int argumento3, __attribute__((unused)) int argumento4)
 
void mprintf2 (char *format,...)
 
int __stdcall About ()
 
int __stdcall WaitExecution (int val)
 
void __stdcall PauseExecution ()
 
void __stdcall ResumeExecution ()
 
void __stdcall CancelExecution ()
 
int __stdcall Compress (char *Inputfile, char *OutPutFile, int CompressionLevel)
 
int __stdcall CompressGzip2 (char *Inputfile, char *OutPutFile, int CompressionLevel)
 
int __stdcall CompressGzip2_SHA512_k (char *Inputfile, char *OutPutFile, int CompressionLevel)
 
int __stdcall CompressGzip_utf8_k (char *Inputfile, char *OutPutFile, int CompressionLevel)
 
int __stdcall GetFinished ()
 
int __stdcall GetReturnValue ()
 
int __stdcall GetProgress ()
 
int __stdcall Uncompress (char *Inputfile, char *OutPutFile)
 
int __stdcall UncompressGzip2 (char *Inputfile, char *OutPutFile)
 
int __stdcall UncompressGzip_utf8_k (char *Inputfile, char *OutPutFile)
 Funtion to uncompress a standard gzip file.
 

Variables

int unicodemode = 0
 
uint compressionlevel = 6
 
uint intstatus = 0
 
int erroglobal = 0
 
int isgzip2 = 0
 
int zlibpercent
 
uchar intoutfile [AMANDA__SIZE]
 
uchar intinputfile [AMANDA__SIZE]
 
uint comando
 
uint pauseflag
 
uint cancelflag
 
uint filesize
 
uint fileread
 
uint intret
 
uint finished
 
int wait = 0
 

Macro Definition Documentation

◆ __attribute__

#define __attribute__ ( unused)
Value:
/* Chloe */

◆ 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

◆ MYCAST

#define MYCAST   int

◆ uchar

#define uchar   unsigned char

◆ uint

#define uint   unsigned int

◆ ushort

#define ushort   unsigned short

Typedef Documentation

◆ myfile

typedef void* myfile

Function Documentation

◆ About()

int __stdcall About ( )

◆ amanda_asciitowide_1_v27()

WCHAR * amanda_asciitowide_1_v27 ( char * pUTF8)

◆ CancelExecution()

void __stdcall CancelExecution ( )

◆ Compress()

int __stdcall Compress ( char * Inputfile,
char * OutPutFile,
int CompressionLevel )

◆ CompressGzip2()

int __stdcall CompressGzip2 ( char * Inputfile,
char * OutPutFile,
int CompressionLevel )

◆ CompressGzip2_SHA512_k()

int __stdcall CompressGzip2_SHA512_k ( char * Inputfile,
char * OutPutFile,
int CompressionLevel )

◆ CompressGzip_utf8_k()

int __stdcall CompressGzip_utf8_k ( char * Inputfile,
char * OutPutFile,
int CompressionLevel )
Parameters
Inputfile
OutPutFile
CompressionLevel
Returns
int

0 - No error
7 - Cannot open input file
8 - Cannot open output file
12 - Invalid compression level
13 - Already running
19 - User cancel

◆ dprintf()

void dprintf ( char * format,
... )

◆ GetFinished()

int __stdcall GetFinished ( )

◆ getfinished()

int __stdcall getfinished ( )

◆ getintret()

int __stdcall getintret ( )

◆ getmax()

uint getmax ( int por,
uint fatia )

◆ getporcentagem()

uint __stdcall getporcentagem ( )

◆ GetProgress()

int __stdcall GetProgress ( )

◆ GetReturnValue()

static int __stdcall GetReturnValue ( void )

◆ getval()

uint getval ( int max,
uint por )

◆ gzclose()

int gzclose ( myfile file)

◆ gzerror()

char * gzerror ( myfile file,
int * errnum )

◆ gzopen()

myfile gzopen ( char * path_now_as_utf8,
char * mode )

◆ gzopen_w()

myfile gzopen_w ( WCHAR * path_now_as_utf8,
char * mode )

◆ gzread()

int gzread ( myfile file,
char * buf,
uint len )

◆ gzwrite()

int gzwrite ( myfile file,
const char * buf,
uint len )

◆ inittimer()

float inittimer ( uint comando)

◆ interface1_xcx_gz()

int __stdcall interface1_xcx_gz ( int argumento1,
int argumento2,
int argumento3,
__attribute__((unused)) int argumento4 )

◆ lffilesize_dl()

__int64 lffilesize_dl ( const char * szFileName)

default function to get the size of files with Unicode support

Parameters
szFileNameutf-8 encoded file
Returns
__int64 the size of the file or 0

◆ mprintf2()

void mprintf2 ( char * format,
... )

◆ PauseExecution()

void __stdcall PauseExecution ( )

◆ pedro_dprintf()

void pedro_dprintf ( int amanda_level,
char * format,
... )

◆ pedro_dprintf2()

void pedro_dprintf2 ( int amanda_level,
char * format,
... )

pedro_dprintf2 is my variant of my debug function because too much calls to pedro_dprintf these days, I am lazy, sorry....

em brotli or brotli2

Parameters
amanda_levelif equal or above 0 print the string
formatprintf based format
...

◆ ResumeExecution()

void __stdcall ResumeExecution ( )

◆ rspcompress()

uint __stdcall rspcompress ( char * inputfile,
char * outfile )

◆ rspuncompress()

uint __stdcall rspuncompress ( uchar * outfile,
uchar * outfile2 )

◆ rspvalidatefile()

uint __stdcall rspvalidatefile ( uchar * outfile2)

◆ setfinished()

int __stdcall setfinished ( uint newvalue)

◆ startapi_xcx_gz() [1/2]

int __stdcall startapi_xcx_gz ( __attribute__((unused)) int parameter)

◆ startapi_xcx_gz() [2/2]

int __stdcall startapi_xcx_gz ( int parameter)

◆ tcompress()

uint __stdcall tcompress ( char * inputfile,
char * outfile )

◆ tcompressgzip2()

uint __stdcall tcompressgzip2 ( char * inputfile,
char * outfile )

◆ tcompressgzip2_sha512_k()

uint __stdcall tcompressgzip2_sha512_k ( char * inputfile,
char * outfile )

◆ tcompressgzip2_utf8_k()

uint __stdcall tcompressgzip2_utf8_k ( char * inputfile,
char * outfile )

◆ tuncompress()

uint __stdcall tuncompress ( uchar * outfile,
uchar * outfile2 )

◆ tuncompressgzip2()

uint __stdcall tuncompressgzip2 ( uchar * outfile,
uchar * outfile2 )

◆ tuncompressgzip2_utf8_k()

uint __stdcall tuncompressgzip2_utf8_k ( uchar * outfile,
uchar * outfile2 )

◆ Uncompress()

int __stdcall Uncompress ( char * Inputfile,
char * OutPutFile )

◆ UncompressGzip2()

int __stdcall UncompressGzip2 ( char * Inputfile,
char * OutPutFile )

◆ UncompressGzip_utf8_k()

int __stdcall UncompressGzip_utf8_k ( char * Inputfile,
char * OutPutFile )

Funtion to uncompress a standard gzip file.

Parameters
Inputfileutf-8 encoded input file
OutPutFileutf-8 encoded output file
Returns
int

0 - No error
10 - Cannot open output file
11 - Cannot open input file
15 - Internal zlib error
19 - User cancel

◆ utf8towide()

int utf8towide ( const char * pUTF8,
WCHAR * pUSC2,
int nUSC2 )

◆ WaitExecution()

int __stdcall WaitExecution ( int val)

◆ zcompress()

int zcompress ( char * input,
char * output,
int level )

◆ zcompress_sha512_k()

int zcompress_sha512_k ( char * input,
char * output,
int levelin )

◆ zuncompress()

int zuncompress ( char * input,
char * output )

Variable Documentation

◆ cancelflag

uint cancelflag

◆ comando

uint comando

◆ compressionlevel

uint compressionlevel = 6

◆ erroglobal

int erroglobal = 0

◆ fileread

uint fileread

◆ filesize

uint filesize

◆ finished

uint finished

◆ intinputfile

uchar intinputfile[AMANDA__SIZE]

◆ intoutfile

uchar intoutfile[AMANDA__SIZE]

◆ intret

uint intret

◆ intstatus

uint intstatus = 0

◆ isgzip2

int isgzip2 = 0

◆ pauseflag

uint pauseflag

◆ unicodemode

int unicodemode = 0

◆ wait

int wait = 0

◆ zlibpercent

int zlibpercent
extern