2 /* : : generated by proto : : */
3 /***********************************************************************
5 * This software is part of the ast package *
6 * Copyright (c) 1985-2010 AT&T Intellectual Property *
7 * and is licensed under the *
8 * Common Public License, Version 1.0 *
9 * by AT&T Intellectual Property *
11 * A copy of the License is available at *
12 * http://www.opensource.org/licenses/cpl1.0.txt *
13 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
15 * Information and Software Systems Research *
19 * Glenn Fowler <gsf@research.att.com> *
20 * David Korn <dgk@research.att.com> *
21 * Phong Vo <kpv@research.att.com> *
23 ***********************************************************************/
28 * sfio discipline interface definitions
32 #if !defined(__PROTO__)
33 #include <prototyped.h>
35 #if !defined(__LINKAGE__)
36 #define __LINKAGE__ /* 2004-08-11 transition */
43 #define SFDCEVENT(a,b,n) ((((a)-'A'+1)<<11)^(((b)-'A'+1)<<6)^(n))
45 #if _BLD_ast && defined(__EXPORT__)
47 #define __MANGLE__ __LINKAGE__ __EXPORT__
50 #define SFSK_DISCARD SFDCEVENT('S','K',1)
53 * %(...) printf support
56 typedef int (*Sf_key_lookup_t
) __PROTO__((__V_
*, Sffmt_t
*, const char*, char**, Sflong_t
*));
57 typedef char* (*Sf_key_convert_t
) __PROTO__((__V_
*, Sffmt_t
*, const char*, char*, Sflong_t
));
59 extern __MANGLE__
int sfkeyprintf
__PROTO__((Sfio_t
*, __V_
*, const char*, Sf_key_lookup_t
, Sf_key_convert_t
));
60 #define sfkeyprintf sfkeyprintf_20000308 /* Sffmt_t* callback args */
61 extern __MANGLE__
int sfkeyprintf
__PROTO__((Sfio_t
*, __V_
*, const char*, Sf_key_lookup_t
, Sf_key_convert_t
));
64 * pure sfio read and/or write disciplines
67 extern __MANGLE__
int sfdcdio
__PROTO__((Sfio_t
*, size_t));
68 extern __MANGLE__
int sfdcdos
__PROTO__((Sfio_t
*));
69 extern __MANGLE__
int sfdcfilter
__PROTO__((Sfio_t
*, const char*));
70 extern __MANGLE__
int sfdcmore
__PROTO__((Sfio_t
*, const char*, int, int));
71 extern __MANGLE__
int sfdcprefix
__PROTO__((Sfio_t
*, const char*));
72 extern __MANGLE__
int sfdcseekable
__PROTO__((Sfio_t
*));
73 extern __MANGLE__
int sfdcslow
__PROTO__((Sfio_t
*));
74 extern __MANGLE__
int sfdctee
__PROTO__((Sfio_t
*, Sfio_t
*));
75 extern __MANGLE__
int sfdcunion
__PROTO__((Sfio_t
*, Sfio_t
**, int));
77 extern __MANGLE__ Sfio_t
* sfdcsubstream
__PROTO__((Sfio_t
*, Sfio_t
*, Sfoff_t
, Sfoff_t
));
80 #define __MANGLE__ __LINKAGE__