/************************************************************************* * (C) 2010 AITNET ltd - Sofia/Bulgaria - * by Michael Pounov * * $Author: misho $ * $Id: defs.h,v 1.1 2010/03/24 16:00:15 misho Exp $ * *************************************************************************/ #ifndef __DEFS_H #define __DEFS_H #define STRSIZ 256 #define TABLESIZ (1 << 16) #define NULL_TAG (-1) #define GETTAG2(s1, s2) (((s1) + (s2)) & 0xFFFF) #define GETTAG(sum) GETTAG2((sum) & 0xFFFF, (sum) >> 16) #define SETERR syncSetErr(errno, strerror(errno)); typedef struct tagSyncTag { u_long st_id; u_short st_tag; } sync_tag_t; struct tagPiece { sync_chunk_t *pfx; void *buf; sync_chunk_t *sfx; }; inline void syncSetErr(int eno, char *estr, ...); #endif