xref: /titanic_50/usr/src/lib/libast/amd64/include/ast/sfdisc.h (revision 356f72340a69936724c69f2f87fffa6f5887f885)
1 
2 /* : : generated by proto : : */
3 /***********************************************************************
4 *                                                                      *
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                     *
10 *                                                                      *
11 *                A copy of the License is available at                 *
12 *            http://www.opensource.org/licenses/cpl1.0.txt             *
13 *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
14 *                                                                      *
15 *              Information and Software Systems Research               *
16 *                            AT&T Research                             *
17 *                           Florham Park NJ                            *
18 *                                                                      *
19 *                 Glenn Fowler <gsf@research.att.com>                  *
20 *                  David Korn <dgk@research.att.com>                   *
21 *                   Phong Vo <kpv@research.att.com>                    *
22 *                                                                      *
23 ***********************************************************************/
24 
25 /*
26  * AT&T Research
27  *
28  * sfio discipline interface definitions
29  */
30 
31 #ifndef _SFDISC_H
32 #if !defined(__PROTO__)
33 #include <prototyped.h>
34 #endif
35 #if !defined(__LINKAGE__)
36 #define __LINKAGE__		/* 2004-08-11 transition */
37 #endif
38 
39 #define _SFDISC_H
40 
41 #include <ast.h>
42 
43 #define SFDCEVENT(a,b,n)	((((a)-'A'+1)<<11)^(((b)-'A'+1)<<6)^(n))
44 
45 #if _BLD_ast && defined(__EXPORT__)
46 #undef __MANGLE__
47 #define __MANGLE__ __LINKAGE__		__EXPORT__
48 #endif
49 
50 #define SFSK_DISCARD		SFDCEVENT('S','K',1)
51 
52 /*
53  * %(...) printf support
54  */
55 
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));
58 
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));
62 
63 /*
64  * pure sfio read and/or write disciplines
65  */
66 
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));
76 
77 extern __MANGLE__ Sfio_t*		sfdcsubstream __PROTO__((Sfio_t*, Sfio_t*, Sfoff_t, Sfoff_t));
78 
79 #undef __MANGLE__
80 #define __MANGLE__ __LINKAGE__
81 
82 #endif
83