1/*********************************************************************** 2* * 3* This software is part of the ast package * 4* Copyright (c) 1985-2011 AT&T Intellectual Property * 5* and is licensed under the * 6* Eclipse Public License, Version 1.0 * 7* by AT&T Intellectual Property * 8* * 9* A copy of the License is available at * 10* http://www.eclipse.org/org/documents/epl-v10.html * 11* (with md5 checksum b35adb5213ca9657e911e9befb180842) * 12* * 13* Information and Software Systems Research * 14* AT&T Research * 15* Florham Park NJ * 16* * 17* Glenn Fowler <gsf@research.att.com> * 18* David Korn <dgk@research.att.com> * 19* Phong Vo <kpv@research.att.com> * 20* * 21***********************************************************************/ 22#pragma prototyped 23/* 24 * AT&T Research 25 * 26 * sfio discipline interface definitions 27 */ 28 29#ifndef _SFDISC_H 30#define _SFDISC_H 31 32#include <ast.h> 33 34#define SFDCEVENT(a,b,n) ((((a)-'A'+1)<<11)^(((b)-'A'+1)<<6)^(n)) 35 36#if _BLD_ast && defined(__EXPORT__) 37#define extern __EXPORT__ 38#endif 39 40#define SFSK_DISCARD SFDCEVENT('S','K',1) 41 42/* 43 * %(...) printf support 44 */ 45 46typedef int (*Sf_key_lookup_t)(void*, Sffmt_t*, const char*, char**, Sflong_t*); 47typedef char* (*Sf_key_convert_t)(void*, Sffmt_t*, const char*, char*, Sflong_t); 48 49extern int sfkeyprintf(Sfio_t*, void*, const char*, Sf_key_lookup_t, Sf_key_convert_t); 50extern int sfkeyprintf_20000308(Sfio_t*, void*, const char*, Sf_key_lookup_t, Sf_key_convert_t); 51 52/* 53 * pure sfio read and/or write disciplines 54 */ 55 56extern int sfdcdio(Sfio_t*, size_t); 57extern int sfdcdos(Sfio_t*); 58extern int sfdcfilter(Sfio_t*, const char*); 59extern int sfdcmore(Sfio_t*, const char*, int, int); 60extern int sfdcprefix(Sfio_t*, const char*); 61extern int sfdcseekable(Sfio_t*); 62extern int sfdcslow(Sfio_t*); 63extern int sfdctee(Sfio_t*, Sfio_t*); 64extern int sfdcunion(Sfio_t*, Sfio_t**, int); 65 66extern Sfio_t* sfdcsubstream(Sfio_t*, Sfio_t*, Sfoff_t, Sfoff_t); 67 68#undef extern 69 70#endif 71