Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
att
GitHub Repository: att/ast
Path: blob/master/src/lib/libast/include/sfdisc.h
1810 views
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 <[email protected]> *
18
* David Korn <[email protected]> *
19
* Phong Vo <[email protected]> *
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
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);
48
49
extern int sfkeyprintf(Sfio_t*, void*, const char*, Sf_key_lookup_t, Sf_key_convert_t);
50
extern 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
56
extern int sfdcdio(Sfio_t*, size_t);
57
extern int sfdcdos(Sfio_t*);
58
extern int sfdcfilter(Sfio_t*, const char*);
59
extern int sfdcmore(Sfio_t*, const char*, int, int);
60
extern int sfdcprefix(Sfio_t*, const char*);
61
extern int sfdcseekable(Sfio_t*);
62
extern int sfdcslow(Sfio_t*);
63
extern int sfdctee(Sfio_t*, Sfio_t*);
64
extern int sfdcunion(Sfio_t*, Sfio_t**, int);
65
66
extern Sfio_t* sfdcsubstream(Sfio_t*, Sfio_t*, Sfoff_t, Sfoff_t);
67
68
#undef extern
69
70
#endif
71
72