Develop and Download Open Source Software

Browse Subversion Repository

Contents of /tags/REL-2.2/sub.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 40 - (show annotations) (download) (as text)
Mon Mar 2 05:17:04 2009 UTC (15 years, 1 month ago) by hirohitohigashi
Original Path: trunk/sub.h
File MIME type: text/x-chdr
File size: 1963 byte(s)
Merged same process.

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 #if 0
15 #define FTP_DEBUG
16 #endif
17
18
19 /***** System headers *******************************************************/
20 #include <string.h>
21 #include <errno.h>
22 #ifdef FTP_DEBUG
23 #include <stdio.h>
24 #endif
25
26
27 /***** Local headers ********************************************************/
28 /***** Constat values *******************************************************/
29 /***** Macros ***************************************************************/
30 /***** Typedefs *************************************************************/
31 #ifdef FTP_DEBUG
32 #define DEBUGPRINT1(f,a1) printf( "(" __FILE__ ") " f,(a1))
33 #else
34 #define DEBUGPRINT1(f,a1)
35 #endif
36
37 #define copy_strerror() \
38 strncpy( ftp->error_message, strerror(errno), sizeof(ftp->error_message)-1 );
39
40
41
42 /***** Global variables *****************************************************/
43 /***** Function prototypes **************************************************/
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 int sendn( int sd, const char *buf, int len, int flags );
48 int ftp_send_command( LIBOFTP *ftp, const char *cmd );
49 int ftp_receive_response( LIBOFTP *ftp, char *res_buf, int bufsiz );
50 int ftp_getready_active( LIBOFTP *ftp, const char *cmd, const char *fname );
51 int ftp_getready_pasv( LIBOFTP *ftp, const char *cmd, const char *fname );
52 int ftp_get_buffer_main( LIBOFTP *ftp, const char *cmd, const char *fname, char *buf, int bufsiz );
53
54
55 #if defined( __QNX__ ) && !defined( __QNXNTO__ )
56 int snprintf( char *, int, char *, ... );
57 #endif
58
59
60 /***** Inline functions *****************************************************/
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66 #endif

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