annotate lib/options.h @ 28:b3e16d1f19c9

2002-09-24 Brian Masney <masneyb@gftp.org> * configure.in - take [external] off of AM_GNU_GETTEXT * de.po, ja.po, nl.po, no.po, pl.po, sv.po, zh_CN.po - fixed several format modifiers on some strings
author masneyb
date Tue, 24 Sep 2002 13:00:16 +0000
parents 8b1883341c6f
children c8ec7877432e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1 /*****************************************************************************/
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
2 /* options.h - the global variables for the program */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
3 /* Copyright (C) 1998-2002 Brian Masney <masneyb@gftp.org> */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
4 /* */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
5 /* This program is free software; you can redistribute it and/or modify */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
6 /* it under the terms of the GNU General Public License as published by */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
7 /* the Free Software Foundation; either version 2 of the License, or */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
8 /* (at your option) any later version. */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
9 /* */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
10 /* This program is distributed in the hope that it will be useful, */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
11 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
12 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
13 /* GNU General Public License for more details. */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
14 /* */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
15 /* You should have received a copy of the GNU General Public License */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
16 /* along with this program; if not, write to the Free Software */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
17 /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
18 /*****************************************************************************/
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
19
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
20 #include "gftp.h"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
21
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
22 supported_gftp_protocols gftp_protocols[] =
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
23 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
24 {"FTP", rfc959_init, "ftp", 1},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
25 {"HTTP", rfc2068_init, "http", 1},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
26 {"Local", local_init, "file", 1},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
27 {"SSH2", sshv2_init, "ssh2", 1},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
28 {"Bookmark", bookmark_init, "bookmark", 0},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
29 {"SSH", ssh_init, "ssh", 1},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
30 {NULL, NULL, NULL, 0}
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
31 };
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
32
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
33 gftp_proxy_type proxy_type[] = {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
34 {N_("none"), ""},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
35 {N_("SITE command"), "USER %pu\nPASS %pp\nSITE %hh\nUSER %hu\nPASS %hp\n"},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
36 {N_("user@host"), "USER %pu\nPASS %pp\nUSER %hu@%hh\nPASS %hp\n"},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
37 {N_("user@host:port"), "USER %hu@%hh:%ho\nPASS %hp\n"},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
38 {N_("AUTHENTICATE"), "USER %hu@%hh\nPASS %hp\nSITE AUTHENTICATE %pu\nSITE RESPONSE %pp\n"},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
39 {N_("user@host port"), "USER %hu@%hh %ho\nPASS %hp\n"},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
40 {N_("user@host NOAUTH"), "USER %hu@%hh\nPASS %hp\n"},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
41 {N_("HTTP Proxy"), "http"},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
42 {N_("Custom"), ""},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
43 {NULL, NULL}
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
44 };
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
45
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
46 /* Most of these should be self explanatory */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
47 char version[] = "gFTP " VERSION,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
48 *emailaddr = NULL, /* Email address for logging in
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
49 anonymously */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
50 *default_protocol = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
51 *edit_program = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
52 *view_program = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
53 *firewall_host = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
54 *firewall_username = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
55 *firewall_password = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
56 *firewall_account = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
57 *proxy_config = NULL, /* The way to log into the proxy */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
58 *http_proxy_host = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
59 *http_proxy_username = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
60 *http_proxy_password = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
61 *tmp_directory = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
62 *startup_directory = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
63 *ssh_prog_name = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
64 *ssh_extra_params = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
65 **ssh_extra_params_list = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
66 *ssh1_sftp_path = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
67 *ssh2_sftp_path = NULL;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
68 int num_ssh_extra_params;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
69
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
70 FILE * logfd = NULL; /* Our fd to write logs to */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
71
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
72 double maxkbs = 0.00; /* Bandwidth throttling */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
73 GList * proxy_hosts = NULL, /* Our local hosts that won't need to
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
74 use the proxy */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
75 * registered_exts = NULL, /* Registered file extensions */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
76 * viewedit_processes = NULL, /* View/Edit processes that are
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
77 running */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
78 * file_transfers = NULL, /* File transfers in progress */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
79 * file_transfer_logs = NULL; /* Logs generated by other threads */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
80
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
81 gftp_bookmarks * bookmarks = NULL;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
82 GHashTable * bookmarks_htable = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
83 * config_htable = NULL;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
84
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
85 int do_one_transfer_at_a_time = 1, /* Only allow one transfer at a time.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
86 The other transfers will be queued */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
87 start_file_transfers = 1, /* Shall we start the file transfers? */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
88 transfer_in_progress = 0, /* Any transfers transferring files? */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
89 passive_transfer = 1, /* Are we sending PASV or PORT to the
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
90 server */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
91 sort_dirs_first = 1, /* Put the dirs first when sorting */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
92 use_default_dl_types = 1, /* If this is set, then files will use
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
93 their default dl type. For example,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
94 if you set in the config file .txt
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
95 files to have a default option of
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
96 ASCII, and if this setting is set,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
97 it will use ASCII. Otherwise, it
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
98 would use the setting in the FTP
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
99 menu */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
100 show_hidden_files = 1, /* Show hidden files */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
101 refresh_files = 0, /* Refresh the listbox after each file
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
102 is done */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
103 listbox_local_width = 302, /* Width of the local listbox */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
104 listbox_remote_width = 302, /* Width of the remote listbox */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
105 listbox_file_height = 265, /* Height of the local/remote listbox */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
106 transfer_height = 80, /* Height of the transfer window */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
107 log_height = 105, /* Height of the logging window */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
108 retries = 3, /* Number of auto-retries */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
109 sleep_time = 30, /* Number of seconds to wait between
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
110 retries */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
111 network_timeout = 120, /* Timeout on the read()s and write()s */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
112 use_http11 = 1, /* Use HTTP/1.1 or HTTP/1.0 */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
113 listbox_dblclick_action = 0, /* What happens when you double click in the
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
114 file listboxes. 0 = View, 1 = Edit,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
115 2 = Download */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
116 file_trans_column = 100, /* The width of the File column in the
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
117 listbox */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
118 local_columns[6] = {0, 85, 75, 76, 120, 75}, /* The width of the local
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
119 file, size, user, group, date and attribs column */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
120 remote_columns[6] = {0, 85, 75, 76, 120, 75}, /* The width of the remote
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
121 file, size, user, group, date and attribs column */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
122 resolve_symlinks = 1, /* Send LIST -L or LIST to the remote ftp
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
123 server */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
124 firewall_port = 21, /* What port to connect to for ftp? */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
125 http_proxy_port = 80, /* What port to connect to for http? */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
126 overwrite_by_default = 0, /* Resume file transfers or set to
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
127 overwrite by default */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
128 append_file_transfers = 1, /* Append new file transfers onto
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
129 existing ones for the same
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
130 hostname */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
131 enable_old_ssh = 0, /* Enable older SSH protocol */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
132 ssh_need_userpass = 0, /* Require a user/pass for SSH
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
133 connections */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
134 ssh_use_askpass = 0, /* Use the ssh-askpass tool to
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
135 grab the password. I personally
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
136 don't like this, but some people
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
137 do */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
138 sshv2_use_sftp_subsys = 0; /* Call ssh -s sftp. If you set this
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
139 it'll automatically use the askpass
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
140 utility above */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
141
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
142 guint max_log_window_size = 5000; /* Max size of the log window for the
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
143 GTK port */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
144
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
145 GList * host_history = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
146 * port_history = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
147 * user_history = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
148 * localhistory = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
149 * remotehistory = NULL;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
150
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
151 unsigned int host_len = 0,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
152 port_len = 0,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
153 user_len = 0,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
154 localhistlen = 0,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
155 remotehistlen = 0;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
156
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
157 volatile sig_atomic_t viewedit_process_done = 0;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
158
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
159 gftp_color send_color, recv_color, error_color, misc_color;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
160