1 /***************************************************************************/
2 /*                                                                         */
3 /* Fast Webpage Exchanger - an FTP client for updating webpages            */
4 /* Copyright (C) 1999-2000 Yuuki NINOMIYA <gm@debian.or.jp>                */
5 /*                                                                         */
6 /* This program is free software; you can redistribute it and/or modify    */
7 /* it under the terms of the GNU General Public License as published by    */
8 /* the Free Software Foundation; either version 2, or (at your option)     */
9 /* any later version.                                                      */
10 /*                                                                         */
11 /* This program is distributed in the hope that it will be useful,         */
12 /* but WITHOUT ANY WARRANTY; without even the implied warranty of          */
13 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           */
14 /* GNU General Public License for more details.                            */
15 /*                                                                         */
16 /* You should have received a copy of the GNU General Public License       */
17 /* along with this program; if not, write to the                           */
18 /* Free Software Foundation, Inc., 59 Temple Place - Suite 330,            */
19 /* Boston, MA 02111-1307, USA.                                             */
20 /*                                                                         */
21 /***************************************************************************/
22 
23 #ifndef VARIABLE_H_INCLUDED
24 #define VARIABLE_H_INCLUDED
25 
26 #ifdef GLOBAL_VALUE_DEFINE
27 #  define GLOBAL
28 #  define GLOBAL_VAL(v) =(v)
29 #else
30 #  define GLOBAL extern
31 #  define GLOBAL_VAL(v)  /* */
32 #endif
33 
34 
35 #include "parsecfg.h"
36 #include "ftplib.h"
37 
38 
39 #ifdef DEBUG
40 #  define DebugPrint(str) fprintf str
41 #else
42 #  define DebugPrint(str)
43 #endif
44 
45 typedef enum{
46 	LOCAL,REMOTE
47 } LocalOrRemote;
48 
49 typedef enum{
50 	CONNECT,DISCONNECT,ENTER,LEAVE,ASCII_SEND,BINARY_SEND,CHMOD,REMOVE,MKDIR,ASCII_LOWER_SEND,BINARY_LOWER_SEND,PROCESS
51 } Message;
52 
53 typedef struct{
54 	char *name;
55 	long date;
56 	long time;
57 } Cache;
58 
59 typedef struct{
60 	char *name;
61 	int max_file;
62 	Cache *ptr;
63 } Cache_dir;
64 
65 typedef struct{
66 	char *name;
67 	long date;
68 	long time;
69 	int isdir;
70 } FileData;
71 
72 
73 GLOBAL netbuf *ftp_buf;
74 
75 GLOBAL int host_number;
76 GLOBAL char *current_dir[2];
77 GLOBAL int is_cache_existent;
78 
79 /* command line options */
80 GLOBAL int opt_silent;
81 GLOBAL int opt_force;
82 GLOBAL int opt_monochrome;
83 GLOBAL int opt_test;
84 GLOBAL int rebuild_cache;
85 
86 /* configuration file options */
87 GLOBAL char **host_name;
88 GLOBAL char **login_name;
89 GLOBAL char **authorization_name;
90 GLOBAL char **password;
91 GLOBAL char **src_dir;
92 GLOBAL char **dest_dir;
93 GLOBAL int *host_use_SSL;
94 GLOBAL int *host_use_SSL_verify;
95 GLOBAL char **host_use_SSL_cafile;
96 GLOBAL cfgList **ignore_local_dir;
97 GLOBAL cfgList **ignore_local_file;
98 GLOBAL cfgList **ignore_remote_dir;
99 GLOBAL cfgList **ignore_remote_file;
100 GLOBAL cfgList **keep_remote_dir;
101 GLOBAL cfgList **ascii_file;
102 GLOBAL char **change_permission;
103 GLOBAL cfgList **change_permission_dir;
104 GLOBAL cfgList **preserve_permission_dir;
105 GLOBAL int *conv_to_lower;
106 GLOBAL int *overwrite_ok;
107 GLOBAL int *rename_ok;
108 GLOBAL int *record_log;
109 GLOBAL int *cfg_silent;
110 GLOBAL int *cfg_force;
111 GLOBAL int *cfg_monochrome;
112 GLOBAL int *ftp_passive;
113 GLOBAL int *nest_spaces;
114 GLOBAL int *log_detail_level;
115 GLOBAL int *max_retry_to_send;
116 GLOBAL int *show_hidden_file;
117 GLOBAL int *follow_symlinks;
118 GLOBAL int *chdir_at_connection;
119 
120 
121 #undef	GLOBAL
122 #undef	GLOBAL_VAL
123 #endif /* VARIABLE_H_INCLUDED */
124 
125