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

/*************************************************************************
* (C) 2010 AITNET ltd - Sofia/Bulgaria - <misho@aitbg.com>
*  by Michael Pounov <misho@openbsd-bg.org>
*
* $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

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