1 #ifndef _SUCK_BOTH_H
2 #define _SUCK_BOTH_H 1
3 
4 #include <stdio.h> /* for FILE */
5 #include <sys/types.h>
6 #include <netdb.h> /* for struct hostent */
7 #include "suck_config.h" /* for debug etc stuff */
8 
9 /* declarations */
10 int sgetline(int fd, char **sbuf, int, void *);
11 int sputline(int fd, const char *outbuf, int, void *);
12 int connect_to_nntphost(const char *host, char *, size_t, FILE *, unsigned short int, int, void **);
13 void disconnect_from_nntphost(int, int, void **);
14 char *number(char *sp, int *intPtr);
15 char *get_long(char *, long *);
16 struct hostent *get_hostent(const char *host);
17 void signal_block(int);
18 void error_log(int mode, const char *fmt, ...);
19 void MyPerror(const char *);
20 void free_args(int, char *[]);
21 char **build_args(const char *, int *);
22 char **read_array(FILE *, int, int);
23 void free_array(int, char **);
24 char *do_a_phrase(char []);
25 void print_phrases(FILE *, const char *, ...);
26 char *str_int(int);
27 char *str_long(long);
28 void do_debug(const char *, ...);
29 void do_debug_binary(int, const char *);
30 const char *null_str(const char *);
31 const char *true_str(int);
32 
33 #define N_DEBUG "debug.suck"
34 
35 enum { MYSIGNAL_SETUP, MYSIGNAL_BLOCK, MYSIGNAL_UNBLOCK, MYSIGNAL_ADDPIPE };
36 enum { ERRLOG_SET_FILE, ERRLOG_SET_STDERR, ERRLOG_REPORT, ERRLOG_SET_DEBUG };
37 
38 #define SOCKET_PROTOCOL 0	/* so testhost.c can get at it */
39 
40 #ifndef FALSE
41 #define FALSE 0
42 #define TRUE !FALSE
43 #endif
44 
45 #ifdef TIMEOUT
46 extern int TimeOut;		/* used to pass TimeOut value to sgetline() */
47 #endif
48 
49 #ifdef HAVE_SOCKS_H
50 #include <socks.h>
51 #endif
52 
53 #endif /* _SUCK_BOTH_H */
54