Added -v flag. Some changes trying to merge a XML file.
[mx3r.git] / util.h
blob6db64753546dd12ca6eb1c3202ffeddb242d8515
1 #ifndef __utilh__
2 #define __utilh__
3 // Tipos de hashes :
4 // GCRY_MD_CRC32 - CRC32, sencillo, rápido.
5 // GCRY_MD_SHA1 - SHA1 potente y seguro.
6 #define HASH_TYPE GCRY_MD_SHA1
8 // Establece cual es el ancho máximo de línea para trabajar.
9 // Establecer como mínimo a 90. Recomendado 128 o 256.
10 #define MAX_LINE 1024
11 #define MAX_LOADED_LINES 8096
13 typedef struct structhashblock {
14 int line1;
15 int line2;
16 int size;
17 } hashblock;
19 typedef struct struct_BLRintA {
20 int *base,*local,*remote;
21 int basesz,localsz,remotesz;
22 } BLRintA;
24 void reducetext(char * txt);
25 unsigned int ihash(char *txt);
26 unsigned int *hash_loadfile(char *filename, int *size);
27 char *loadfile(char *filename, int *size);
29 int compare2hashvectors(int *Bvector, int Bsize, int *Mvector, int Msize,
30 int MinPassSize, int MaxPassSize, hashblock *blocks, int blocksize);
32 int compare2bytevectors(char *Bvector, int Bsize, char *Mvector, int Msize,
33 int MinPassSize,int MaxPassSize, hashblock *blocks, int blocksize);
35 int loadsplitplugin(void);
36 BLRintA splitBLR(char *base, char *local, char *remote);
37 BLRintA hashBLR(void);
39 #endif