--- libaitsync/src/aitsync.c 2011/05/09 14:36:33 1.2 +++ libaitsync/src/aitsync.c 2012/07/22 22:09:47 1.3 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsync.c,v 1.2 2011/05/09 14:36:33 misho Exp $ +* $Id: aitsync.c,v 1.3 2012/07/22 22:09:47 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 +Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -54,7 +54,8 @@ static int sync_Errno; static char sync_Error[STRSIZ]; -static inline int func_comp(sync_tag_t const *t1, sync_tag_t const *t2) +static inline int +func_comp(sync_tag_t const *t1, sync_tag_t const *t2) { return t1->st_tag - t2->st_tag; } @@ -64,19 +65,22 @@ static inline int func_comp(sync_tag_t const *t1, sync // // sync_GetErrno() Get error code of last operation -inline int sync_GetErrno() +inline int +sync_GetErrno() { return sync_Errno; } // sync_GetError() Get error text of last operation -inline const char *sync_GetError() +inline const char * +sync_GetError() { return sync_Error; } // sync_SetErr() Set error to variables for internal use!!! -inline void syncSetErr(int eno, char *estr, ...) +inline void +syncSetErr(int eno, char *estr, ...) { va_list lst; @@ -96,7 +100,8 @@ inline void syncSetErr(int eno, char *estr, ...) * @compress = 2 compress signatures output, 0 not compressed * return: -1 error, 0 ok */ -int syncSignature(const char *csInput, const char *csSig, int compress) +int +syncSignature(const char *csInput, const char *csSig, int compress) { int inf, outf, f, ret; u_char buf[CHUNK_MAX]; @@ -168,7 +173,8 @@ end: * @compress = 3 everything compress, 2 compressed signatures, 1 compress delta output, 0 not compressed * return: -1 error, 0 ok */ -int syncDelta(const char *csInput, const char *csSig, const char *csDelta, int compress) +int +syncDelta(const char *csInput, const char *csSig, const char *csDelta, int compress) { int inf, outf, f, sigf, ret, cnt; size_t blk; @@ -421,7 +427,8 @@ end: * @compress = 1 compress delta input, 0 not compressed * return: -1 error, 0 ok, create delta patch, 1 ok, no differences and not create patch */ -int syncPatch(const char *csInput, const char *csDelta, const char *csPatch, int compress) +int +syncPatch(const char *csInput, const char *csDelta, const char *csPatch, int compress) { int inf, outf, f, d, ret, readlen; char szTemp[MAXPATHLEN];