--- libaitsync/inc/defs.h 2012/11/13 10:00:30 1.3.2.1 +++ libaitsync/inc/defs.h 2013/05/30 09:24:18 1.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: defs.h,v 1.3.2.1 2012/11/13 10:00:30 misho Exp $ +* $Id: defs.h,v 1.5 2013/05/30 09:24:18 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -51,8 +51,12 @@ SUCH DAMAGE. #define STRSIZ 256 #endif -#define CHUNK_MAX 2048 -#define DLTSYNC_MAGIC 0xD34DC0D3 +#define DIFF_D0 '=' +#define DIFF_D1 '-' +#define DIFF_D2 '+' + +#define CHUNK_MAX 4096 +#define DLTSYNC_MAGIC 0xDEBAC0DA #define SIGSYNC_MAGIC 0xDEADBEEF #define TABLESIZ (1 << 16) @@ -61,7 +65,7 @@ SUCH DAMAGE. #define GETTAG2(s1, s2) (((s1) + (s2)) & 0xFFFF) #define GETTAG(sum) GETTAG2((sum) & 0xFFFF, (sum) >> 16) -#define SETERR syncSetErr(errno, strerror(errno)); +#define LOGERR sync_SetErr(errno, strerror(errno)) typedef struct tagSyncChunk { @@ -74,15 +78,6 @@ typedef struct tagSyncChunk { } sync_chunk_t; -struct tagDirName { - u_char ch; - u_short tag; - u_int hash; - char name[MAXPATHLEN]; - char extra[STRSIZ]; -}; - - typedef struct tagSyncTag { u_long st_id; u_short st_tag; @@ -95,7 +90,7 @@ struct tagPiece { }; -inline void syncSetErr(int eno, char *estr, ...); +void sync_SetErr(int eno, char *estr, ...);