Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
att
GitHub Repository: att/ast
Path: blob/master/src/lib/libuu/uu.h
1808 views
1
/***********************************************************************
2
* *
3
* This software is part of the ast package *
4
* Copyright (c) 1998-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
* *
19
***********************************************************************/
20
#pragma prototyped
21
/*
22
* uu encode/decode interface definitions
23
*
24
* AT&T Research
25
*/
26
27
#ifndef _UU_H
28
#define _UU_H
29
30
#include <ast.h>
31
32
#define UU_VERSION 19980611L
33
34
#define UU_HEADER (1<<0) /* header/trailer encoded too */
35
#define UU_TEXT (1<<1) /* process text file */
36
#define UU_LOCAL (1<<2) /* embedded paths in . */
37
38
struct Uu_s; typedef struct Uu_s Uu_t;
39
struct Uudisc_s; typedef struct Uudisc_s Uudisc_t;
40
struct Uumeth_s; typedef struct Uumeth_s Uumeth_t;
41
42
typedef int (*Uu_f)(Uu_t*);
43
44
struct Uumeth_s
45
{
46
const char* name;
47
const char* alias;
48
const char* id;
49
Uu_f headerf;
50
Uu_f encodef;
51
Uu_f decodef;
52
void* data;
53
};
54
55
struct Uudisc_s
56
{
57
unsigned long version;
58
unsigned long flags;
59
Error_f errorf;
60
};
61
62
struct Uu_s
63
{
64
const char* id;
65
Uumeth_t meth;
66
Uudisc_t* disc;
67
char* path;
68
69
#ifdef _UU_PRIVATE_
70
_UU_PRIVATE_
71
#endif
72
73
};
74
75
#if _BLD_uu && defined(__EXPORT__)
76
#define extern __EXPORT__
77
#endif
78
79
extern Uu_t* uuopen(Uudisc_t*, Uumeth_t*);
80
extern int uuclose(Uu_t*);
81
82
extern ssize_t uuencode(Uu_t*, Sfio_t*, Sfio_t*, size_t, const char*);
83
extern ssize_t uudecode(Uu_t*, Sfio_t*, Sfio_t*, size_t, const char*);
84
85
extern int uumain(char**, int);
86
87
extern int uulist(Sfio_t*);
88
extern Uumeth_t* uumeth(const char*);
89
90
#undef extern
91
92
#endif
93
94