=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/fetch.c,v retrieving revision 1.176 retrieving revision 1.177 diff -c -r1.176 -r1.177 *** src/usr.bin/ftp/fetch.c 2019/11/03 19:26:15 1.176 --- src/usr.bin/ftp/fetch.c 2019/11/04 15:36:36 1.177 *************** *** 1,4 **** ! /* $OpenBSD: fetch.c,v 1.176 2019/11/03 19:26:15 jca Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: fetch.c,v 1.177 2019/11/04 15:36:36 jca Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- *************** *** 69,86 **** #include "cmds.h" static int url_get(const char *, const char *, const char *, int); ! void aborthttp(int); ! void abortfile(int); ! char hextochar(const char *); ! char *urldecode(const char *); ! char *recode_credentials(const char *_userinfo); ! char *ftp_readline(FILE *, size_t *); ! void ftp_close(FILE **fin, struct tls **tls, volatile int *fd); ! const char *sockerror(struct tls *); #ifndef NOSSL ! int proxy_connect(int, char *, char *); ! int stdio_tls_write_wrapper(void *, const char *, int); ! int stdio_tls_read_wrapper(void *, char *, int); #endif /* !NOSSL */ #define FTP_URL "ftp://" /* ftp URL prefix */ --- 69,86 ---- #include "cmds.h" static int url_get(const char *, const char *, const char *, int); ! static void aborthttp(int); ! static void abortfile(int); ! static char hextochar(const char *); ! static char *urldecode(const char *); ! static char *recode_credentials(const char *_userinfo); ! static char *ftp_readline(FILE *, size_t *); ! static void ftp_close(FILE **, struct tls **, volatile int *); ! static const char *sockerror(struct tls *); #ifndef NOSSL ! static int proxy_connect(int, char *, char *); ! static int stdio_tls_write_wrapper(void *, const char *, int); ! static int stdio_tls_read_wrapper(void *, char *, int); #endif /* !NOSSL */ #define FTP_URL "ftp://" /* ftp URL prefix */ *************** *** 95,101 **** static const char at_encoding_warning[] = "Extra `@' characters in usernames and passwords should be encoded as %%40"; ! jmp_buf httpabort; static int redirect_loop; static int retried; --- 95,101 ---- static const char at_encoding_warning[] = "Extra `@' characters in usernames and passwords should be encoded as %%40"; ! static jmp_buf httpabort; static int redirect_loop; static int retried; *************** *** 1085,1091 **** * Abort a http retrieval */ /* ARGSUSED */ ! void aborthttp(int signo) { --- 1085,1091 ---- * Abort a http retrieval */ /* ARGSUSED */ ! static void aborthttp(int signo) { *************** *** 1099,1105 **** * Abort a http retrieval */ /* ARGSUSED */ ! void abortfile(int signo) { --- 1099,1105 ---- * Abort a http retrieval */ /* ARGSUSED */ ! static void abortfile(int signo) { *************** *** 1461,1467 **** return ret-reallen; } ! char * recode_credentials(const char *userinfo) { char *ui, *creds; --- 1461,1467 ---- return ret-reallen; } ! static char * recode_credentials(const char *userinfo) { char *ui, *creds; *************** *** 1481,1487 **** return (creds); } ! char hextochar(const char *str) { unsigned char c, ret; --- 1481,1487 ---- return (creds); } ! static char hextochar(const char *str) { unsigned char c, ret; *************** *** 1518,1530 **** return (0); } ! char * ftp_readline(FILE *fp, size_t *lenp) { return fparseln(fp, lenp, NULL, "\0\0\0", 0); } ! void ftp_close(FILE **fin, struct tls **tls, volatile int *fd) { #ifndef NOSSL --- 1518,1530 ---- return (0); } ! static char * ftp_readline(FILE *fp, size_t *lenp) { return fparseln(fp, lenp, NULL, "\0\0\0", 0); } ! static void ftp_close(FILE **fin, struct tls **tls, volatile int *fd) { #ifndef NOSSL *************** *** 1551,1557 **** } } ! const char * sockerror(struct tls *tls) { int save_errno = errno; --- 1551,1557 ---- } } ! static const char * sockerror(struct tls *tls) { int save_errno = errno; *************** *** 1566,1572 **** } #ifndef NOSSL ! int proxy_connect(int socket, char *host, char *cookie) { int l; --- 1566,1572 ---- } #ifndef NOSSL ! static int proxy_connect(int socket, char *host, char *cookie) { int l; *************** *** 1608,1614 **** return(200); } ! int stdio_tls_write_wrapper(void *arg, const char *buf, int len) { struct tls *tls = arg; --- 1608,1614 ---- return(200); } ! static int stdio_tls_write_wrapper(void *arg, const char *buf, int len) { struct tls *tls = arg; *************** *** 1621,1627 **** return ret; } ! int stdio_tls_read_wrapper(void *arg, char *buf, int len) { struct tls *tls = arg; --- 1621,1627 ---- return ret; } ! static int stdio_tls_read_wrapper(void *arg, char *buf, int len) { struct tls *tls = arg;