/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1985-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* Glenn Fowler <[email protected]> *17* David Korn <[email protected]> *18* Phong Vo <[email protected]> *19* *20***********************************************************************/21#pragma prototyped22/*23* AT&T Research24*25* sfio discipline interface definitions26*/2728#ifndef _SFDISC_H29#define _SFDISC_H3031#include <ast.h>3233#define SFDCEVENT(a,b,n) ((((a)-'A'+1)<<11)^(((b)-'A'+1)<<6)^(n))3435#if _BLD_ast && defined(__EXPORT__)36#define extern __EXPORT__37#endif3839#define SFSK_DISCARD SFDCEVENT('S','K',1)4041/*42* %(...) printf support43*/4445typedef int (*Sf_key_lookup_t)(void*, Sffmt_t*, const char*, char**, Sflong_t*);46typedef char* (*Sf_key_convert_t)(void*, Sffmt_t*, const char*, char*, Sflong_t);4748extern int sfkeyprintf(Sfio_t*, void*, const char*, Sf_key_lookup_t, Sf_key_convert_t);49extern int sfkeyprintf_20000308(Sfio_t*, void*, const char*, Sf_key_lookup_t, Sf_key_convert_t);5051/*52* pure sfio read and/or write disciplines53*/5455extern int sfdcdio(Sfio_t*, size_t);56extern int sfdcdos(Sfio_t*);57extern int sfdcfilter(Sfio_t*, const char*);58extern int sfdcmore(Sfio_t*, const char*, int, int);59extern int sfdcprefix(Sfio_t*, const char*);60extern int sfdcseekable(Sfio_t*);61extern int sfdcslow(Sfio_t*);62extern int sfdctee(Sfio_t*, Sfio_t*);63extern int sfdcunion(Sfio_t*, Sfio_t**, int);6465extern Sfio_t* sfdcsubstream(Sfio_t*, Sfio_t*, Sfoff_t, Sfoff_t);6667#undef extern6869#endif707172