Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/sub.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 29 - (show annotations) (download) (as text)
Sat Feb 28 12:48:31 2009 UTC (15 years, 1 month ago) by hirohitohigashi
File MIME type: text/x-chdr
File size: 1783 byte(s)
changed error messageing system. and added ftp_timeout() function.

1 /*
2 liboftp: this is an FTP library to simplify the work to a Developer
3 who want to work with FTP servers (RFC 959).
4
5 Copyright (c) 2009 hirohito higashi. All rights reserved.
6 This file is distributed under BSD license.
7 */
8
9
10 #ifndef __libOftp_Sub_H_proto_
11 #define __libOftp_Sub_H_proto_
12
13 /***** Feature test switches ************************************************/
14 #define FTP_DEBUG
15
16
17 /***** System headers *******************************************************/
18 #include <string.h>
19 #include <errno.h>
20 #ifdef FTP_DEBUG
21 #include <stdio.h>
22 #endif
23
24
25 /***** Local headers ********************************************************/
26 /***** Constat values *******************************************************/
27 /***** Macros ***************************************************************/
28 /***** Typedefs *************************************************************/
29 #ifdef FTP_DEBUG
30 #define DEBUGPRINT1(f,a1) printf( "(" __FILE__ ") " f,(a1))
31 #else
32 #define DEBUGPRINT1(f,a1)
33 #endif
34
35 #define copy_strerror() \
36 strncpy( ftp->error_message, strerror(errno), sizeof(ftp->error_message)-1 );
37
38
39
40 /***** Global variables *****************************************************/
41 /***** Function prototypes **************************************************/
42 int sendn( int sd, const char *buf, int len, int flags );
43 int ftp_send_command( LIBOFTP *ftp, const char *cmd );
44 int ftp_receive_response( LIBOFTP *ftp, char *res_buf, int bufsiz );
45 int ftp_getready_active( LIBOFTP *ftp, const char *cmd, const char *fname );
46 int ftp_getready_pasv( LIBOFTP *ftp, const char *cmd, const char *fname );
47
48
49 #if defined( __QNX__ ) && !defined( __QNXNTO__ )
50 int snprintf( char *, int, char *, ... );
51 #endif
52
53
54 /***** Inline functions *****************************************************/
55
56
57 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26