Expand PMF_FN_* macros.
[netbsd-mini2440.git] / usr.sbin / sup / source / supextern.h
blob61a23fd6fdeb6ec9ddcc351754d7704db3aeabc7
1 /* $NetBSD: supextern.h,v 1.21 2009/10/16 12:41:37 christos Exp $ */
3 struct stat;
5 /* atoo.c */
6 unsigned int atoo(char *);
8 /* expand.c */
9 int expand(char *, char **, int);
11 /* ffilecopy.c */
12 ssize_t ffilecopy(FILE *, FILE *);
14 /* filecopy.c */
15 ssize_t filecopy(int, int );
17 /* log.c */
18 void logopen(char *);
19 void logquit(int, const char *, ...)
20 __attribute__((__format__(__printf__, 2, 3)));
21 void logerr(const char *, ...)
22 __attribute__((__format__(__printf__, 1, 2))) ;
23 void loginfo(const char *, ...)
24 __attribute__((__format__(__printf__, 1, 2)));
25 #ifdef LIBWRAP
26 void logdeny(const char *, ...)
27 __attribute__((__format__(__printf__, 1, 2)));
28 void logallow(const char *, ...)
29 __attribute__((__format__(__printf__, 1, 2)));
30 #endif
32 /* netcryptvoid.c */
33 int netcrypt(char *);
34 int getcryptbuf(int);
35 void decode(char *, char *, int);
36 void encode(char *, char *, int);
38 /* nxtarg.c */
39 char *nxtarg(char **, const char *);
41 /* path.c */
42 void path(char *, char *, char *);
44 /* quit.c */
45 void quit(int, const char *, ...)
46 __attribute__((__format__(__printf__, 2, 3)));
48 /* read_line.c */
49 char *read_line(FILE *, size_t *, size_t *, const char[3], int);
51 /* run.c */
52 int run(char *, ...);
53 int runv(char *, char **);
54 int runp(char *, ...);
55 int runvp(char *, char **);
56 int runio(char *const[], const char *, const char *, const char *);
57 int runiofd(char *const[], const int, const int, const int);
59 /* estrdup.c */
60 char *estrdup(const char *);
62 /* scan.c */
63 int getrelease(char *);
64 void makescanlists(void);
65 void getscanlists(void);
66 void cdprefix(char *);
68 /* scm.c */
69 int servicesetup(char *, int);
70 int service(void);
71 int serviceprep(void);
72 int servicekill(void);
73 int serviceend(void);
74 int dobackoff(int *, int *);
75 int request(char *, char *, int *);
76 int requestend(void);
77 const char *remotehost(void);
78 int thishost(char *);
79 int samehost(void);
80 int matchhost(char *);
81 int scmerr(int, const char *, ...)
82 __attribute__((__format__(__printf__, 2, 3)));
83 int byteswap(int);
85 /* scmio.c */
86 int writemsg(int);
87 int writemend(void);
88 int writeint(int);
89 int writestring(char *);
90 int writefile(int);
91 int writemnull(int);
92 int writemint(int, int );
93 int writemstr(int, char *);
94 int prereadcount(int *);
95 int readflush(void);
96 int readmsg(int);
97 int readmend(void);
98 int readskip(void);
99 int readint(int *);
100 int readstring(char **);
101 int readfile(int);
102 int readmnull(int);
103 int readmint(int, int *);
104 int readmstr(int, char **);
105 void crosspatch(void);
107 /* skipto.c */
108 char *skipto(const char *, const char *);
109 char *skipover(const char *, const char *);
111 /* stree.c */
112 void Tfree(TREE **);
113 TREE *Tinsert(TREE **, const char *, int);
114 TREE *Tsearch(TREE *, const char *);
115 TREE *Tlookup(TREE *, const char *);
116 int Trprocess(TREE *, int (*)(TREE *, void *), void *);
117 int Tprocess(TREE *, int (*)(TREE *, void *), void *);
118 void Tprint(TREE *, char *);
120 /* supcmeat.c */
121 int getonehost(TREE *, void *);
122 TREE *getcollhost(int *, int *, long *, int *);
123 void getcoll(void);
124 int signon(TREE *, int, int *);
125 int setup(TREE *);
126 void suplogin(void);
127 void listfiles(void);
128 void recvfiles(void);
129 int prepare(char *, int, int *, struct stat *);
130 int recvdir(TREE *, int, struct stat *);
131 int recvsym(TREE *, int, struct stat *);
132 int recvreg(TREE *, int, struct stat *);
133 int copyfile(char *, char *);
134 void finishup(int);
135 void done(int, const char *, ...)
136 __attribute__((__format__(__printf__, 2, 3)));
137 void goaway(const char *, ...)
138 __attribute__((__format__(__printf__, 1, 2)));
140 /* supcmisc.c */
141 void prtime(void);
142 int establishdir(char *);
143 int makedir(char *, unsigned int, struct stat *);
144 int estabd(char *, char *);
145 void ugconvert(char *, char *, int *, int *, int *);
146 void notify(const char *, ...)
147 __attribute__((__format__(__printf__, 1, 2)));
148 void lockout(int);
149 char *fmttime(time_t);
151 /* supcname.c */
152 void getnams(void);
154 /* supcparse.c */
155 int parsecoll(COLLECTION *, char *, char *);
156 time_t getwhen(char *, char *);
157 int putwhen(char *, time_t);
159 /* supmsg.c */
160 int msgsignon(void);
161 int msgsignonack(void);
162 int msgsetup(void);
163 int msgsetupack(void);
164 int msgcrypt(void);
165 int msgcryptok(void);
166 int msglogin(void);
167 int msglogack(void);
168 int msgrefuse(void);
169 int msglist(void);
170 int msgneed(void);
171 int msgdeny(void);
172 int msgsend(void);
173 int msgrecv(int (*)(TREE *, va_list), ...);
174 int msgdone(void);
175 int msggoaway(void);
176 int msgxpatch(void);
177 int msgcompress(void);
179 /* vprintf.c */
180 /* XXX already in system headers included already - but with different
181 argument declarations! */
182 #if 0
183 int vprintf(const char *, va_list);
184 int vfprintf(FILE *, const char *, va_list);
185 int vsprintf(char *, const char *, va_list);
186 int vsnprintf(char *, size_t, const char *, va_list);
187 #endif