File:  [ELWIX - Embedded LightWeight unIX -] / libaitsync / inc / defs.h
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Wed Mar 24 16:00:15 2010 UTC (14 years, 3 months ago) by misho
Branches: MAIN
CVS tags: HEAD
Initial revision

    1: /*************************************************************************
    2: * (C) 2010 AITNET ltd - Sofia/Bulgaria - <misho@aitbg.com>
    3: *  by Michael Pounov <misho@openbsd-bg.org>
    4: *
    5: * $Author: misho $
    6: * $Id: defs.h,v 1.1 2010/03/24 16:00:15 misho Exp $
    7: *
    8: *************************************************************************/
    9: #ifndef __DEFS_H
   10: #define __DEFS_H
   11: 
   12: 
   13: #define STRSIZ		256
   14: #define TABLESIZ	(1 << 16)
   15: #define NULL_TAG	(-1)
   16: 
   17: #define GETTAG2(s1, s2)	(((s1) + (s2)) & 0xFFFF)
   18: #define GETTAG(sum)	GETTAG2((sum) & 0xFFFF, (sum) >> 16)
   19: 
   20: #define SETERR	syncSetErr(errno, strerror(errno));
   21: 
   22: 
   23: typedef struct tagSyncTag {
   24: 	u_long st_id;
   25: 	u_short st_tag;
   26: } sync_tag_t;
   27: 
   28: struct tagPiece {
   29: 	sync_chunk_t *pfx;
   30: 	void *buf;
   31: 	sync_chunk_t *sfx;
   32: };
   33: 
   34: 
   35: inline void syncSetErr(int eno, char *estr, ...);
   36: 
   37: 
   38: 
   39: #endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>