1 /***********************************************************************
3 * This software is part of the ast package *
4 * Copyright (c) 1985-2010 AT&T Intellectual Property *
5 * and is licensed under the *
6 * Common Public License, Version 1.0 *
7 * by AT&T Intellectual Property *
9 * A copy of the License is available at *
10 * http://www.opensource.org/licenses/cpl1.0.txt *
11 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
13 * Information and Software Systems Research *
17 * Glenn Fowler <gsf@research.att.com> *
18 * David Korn <dgk@research.att.com> *
19 * Phong Vo <kpv@research.att.com> *
21 ***********************************************************************/
26 * sfio discipline interface definitions
34 #define SFDCEVENT(a,b,n) ((((a)-'A'+1)<<11)^(((b)-'A'+1)<<6)^(n))
36 #if _BLD_ast && defined(__EXPORT__)
37 #define extern __EXPORT__
40 #define SFSK_DISCARD SFDCEVENT('S','K',1)
43 * %(...) printf support
46 typedef int (*Sf_key_lookup_t
)(void*, Sffmt_t
*, const char*, char**, Sflong_t
*);
47 typedef char* (*Sf_key_convert_t
)(void*, Sffmt_t
*, const char*, char*, Sflong_t
);
49 extern int sfkeyprintf(Sfio_t
*, void*, const char*, Sf_key_lookup_t
, Sf_key_convert_t
);
50 #define sfkeyprintf sfkeyprintf_20000308 /* Sffmt_t* callback args */
51 extern int sfkeyprintf(Sfio_t
*, void*, const char*, Sf_key_lookup_t
, Sf_key_convert_t
);
54 * pure sfio read and/or write disciplines
57 extern int sfdcdio(Sfio_t
*, size_t);
58 extern int sfdcdos(Sfio_t
*);
59 extern int sfdcfilter(Sfio_t
*, const char*);
60 extern int sfdcmore(Sfio_t
*, const char*, int, int);
61 extern int sfdcprefix(Sfio_t
*, const char*);
62 extern int sfdcseekable(Sfio_t
*);
63 extern int sfdcslow(Sfio_t
*);
64 extern int sfdctee(Sfio_t
*, Sfio_t
*);
65 extern int sfdcunion(Sfio_t
*, Sfio_t
**, int);
67 extern Sfio_t
* sfdcsubstream(Sfio_t
*, Sfio_t
*, Sfoff_t
, Sfoff_t
);