/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 2003-2011 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* Phong Vo <[email protected]> *17* *18***********************************************************************/19#ifndef _VCSFIO_H20#define _VCSFIO_H 12122#if _PACKAGE_ast23#include <vcodex.h>24#endif2526/* FILE I/O.27**28** Written by Kiem-Phong Vo ([email protected])29*/3031#if _SFIO_H /* let Sfio take care of I/O */32#define Vcsfio_t Sfio_t33#define vcsfread sfread34#define vcsfwrite sfwrite35#define vcsfsync sfsync36#define vcsfclose sfclose37#else /* above functions will be explicitly provided */38#define Vcsfio_t Void_t39#endif /*_SFIO_H*/4041/* header processing modes */42#define VCSF_VCDIFF 000001 /* output RFC3284 VCDIFF header */43#define VCSF_PLAIN 000002 /* no header to be output */44#define VCSF_TRANS 000004 /* set trans on VC_DECODE */45#define VCSF_FREE 000010 /* free sfdt on disc pop */4647/* application-defined function to process error messages */48typedef void (*Vcsferror_f)_ARG_((const char*));4950/* data passed to vcsfio() to initialize a stream */51typedef struct _vcsfdata_s52{ int type; /* various types of processing */53char* trans; /* transformation specification */54char* window; /* window specification */55char* source; /* source file to delta against */56Vcsferror_f errorf; /* to process errors */57} Vcsfdata_t;5859_BEGIN_EXTERNS_6061#if _BLD_vcodex && defined(__EXPORT__)62#define extern __EXPORT__63#endif6465extern Vcsfio_t* vcsfio _ARG_((Sfio_t*, Vcsfdata_t*, int));6667#if !_SFIO_H68extern ssize_t vcsfread _ARG_((Vcsfio_t*, Void_t*, size_t));69extern ssize_t vcsfwrite _ARG_((Vcsfio_t*, Void_t*, size_t));70extern int vcsfsync _ARG_((Vcsfio_t*));71extern int vcsfclose _ARG_((Vcsfio_t*));72#endif7374#undef extern7576_END_EXTERNS_7778#endif /*_VCSFIO_H*/798081