annotate lib/options.h @ 118:ed3c66c2aced

Updated Polish translation by GNOME PL Team <translators@gnome.pl>
author chyla
date Mon, 10 Mar 2003 19:08:47 +0000
parents 5f9ad9facf0e
children 76e2b58a9440
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
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 1
diff changeset
20 /* $Id$ */
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 1
diff changeset
21
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
22 #include "gftp.h"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
23
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
24 supported_gftp_protocols gftp_protocols[] =
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
25 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
26 {"FTP", rfc959_init, "ftp", 1},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
27 {"HTTP", rfc2068_init, "http", 1},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
28 {"Local", local_init, "file", 1},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
29 {"SSH2", sshv2_init, "ssh2", 1},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
30 {"Bookmark", bookmark_init, "bookmark", 0},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
31 {NULL, NULL, NULL, 0}
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
32 };
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
33
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
34 gftp_proxy_type proxy_type[] = {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
35 {N_("none"), ""},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
36 {N_("SITE command"), "USER %pu\nPASS %pp\nSITE %hh\nUSER %hu\nPASS %hp\n"},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
37 {N_("user@host"), "USER %pu\nPASS %pp\nUSER %hu@%hh\nPASS %hp\n"},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
38 {N_("user@host:port"), "USER %hu@%hh:%ho\nPASS %hp\n"},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
39 {N_("AUTHENTICATE"), "USER %hu@%hh\nPASS %hp\nSITE AUTHENTICATE %pu\nSITE RESPONSE %pp\n"},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
40 {N_("user@host port"), "USER %hu@%hh %ho\nPASS %hp\n"},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
41 {N_("user@host NOAUTH"), "USER %hu@%hh\nPASS %hp\n"},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
42 {N_("HTTP Proxy"), "http"},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
43 {N_("Custom"), ""},
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
44 {NULL, NULL}
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
45 };
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
46
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
47 /* Most of these should be self explanatory */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
48 char version[] = "gFTP " VERSION,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
49 *emailaddr = NULL, /* Email address for logging in
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
50 anonymously */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
51 *default_protocol = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
52 *edit_program = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
53 *view_program = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
54 *firewall_host = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
55 *firewall_username = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
56 *firewall_password = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
57 *firewall_account = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
58 *proxy_config = NULL, /* The way to log into the proxy */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
59 *http_proxy_host = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
60 *http_proxy_username = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
61 *http_proxy_password = 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 *ssh2_sftp_path = NULL;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
67 int num_ssh_extra_params;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
68
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
69 FILE * logfd = NULL; /* Our fd to write logs to */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
70
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
71 double maxkbs = 0.00; /* Bandwidth throttling */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
72 GList * proxy_hosts = NULL, /* Our local hosts that won't need to
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
73 use the proxy */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
74 * registered_exts = NULL, /* Registered file extensions */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
75 * viewedit_processes = NULL, /* View/Edit processes that are
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
76 running */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
77 * file_transfers = NULL, /* File transfers in progress */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
78 * file_transfer_logs = NULL; /* Logs generated by other threads */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
79
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
80 gftp_bookmarks * bookmarks = NULL;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
81 GHashTable * bookmarks_htable = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
82 * config_htable = NULL;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
83
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
84 int do_one_transfer_at_a_time = 1, /* Only allow one transfer at a time.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
85 The other transfers will be queued */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
86 start_file_transfers = 1, /* Shall we start the file transfers? */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
87 transfer_in_progress = 0, /* Any transfers transferring files? */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
88 passive_transfer = 1, /* Are we sending PASV or PORT to the
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
89 server */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
90 sort_dirs_first = 1, /* Put the dirs first when sorting */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
91 show_hidden_files = 1, /* Show hidden files */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
92 refresh_files = 0, /* Refresh the listbox after each file
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
93 is done */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
94 listbox_local_width = 302, /* Width of the local listbox */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
95 listbox_remote_width = 302, /* Width of the remote listbox */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
96 listbox_file_height = 265, /* Height of the local/remote listbox */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
97 transfer_height = 80, /* Height of the transfer window */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
98 log_height = 105, /* Height of the logging window */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
99 retries = 3, /* Number of auto-retries */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
100 sleep_time = 30, /* Number of seconds to wait between
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
101 retries */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
102 network_timeout = 120, /* Timeout on the read()s and write()s */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
103 use_http11 = 1, /* Use HTTP/1.1 or HTTP/1.0 */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
104 listbox_dblclick_action = 0, /* What happens when you double click in the
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
105 file listboxes. 0 = View, 1 = Edit,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
106 2 = Download */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
107 file_trans_column = 100, /* The width of the File column in the
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
108 listbox */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
109 local_columns[6] = {0, 85, 75, 76, 120, 75}, /* The width of the local
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
110 file, size, user, group, date and attribs column */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
111 remote_columns[6] = {0, 85, 75, 76, 120, 75}, /* The width of the remote
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
112 file, size, user, group, date and attribs column */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
113 resolve_symlinks = 1, /* Send LIST -L or LIST to the remote ftp
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
114 server */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
115 firewall_port = 21, /* What port to connect to for ftp? */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
116 http_proxy_port = 80, /* What port to connect to for http? */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
117 overwrite_by_default = 0, /* Resume file transfers or set to
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
118 overwrite by default */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
119 append_file_transfers = 1, /* Append new file transfers onto
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
120 existing ones for the same
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
121 hostname */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
122 ssh_need_userpass = 0, /* Require a user/pass for SSH
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
123 connections */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
124 ssh_use_askpass = 0, /* Use the ssh-askpass tool to
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
125 grab the password. I personally
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
126 don't like this, but some people
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
127 do */
37
5a178bd04ca5 2002-10-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
128 sshv2_use_sftp_subsys = 0, /* Call ssh -s sftp. If you set this
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
129 it'll automatically use the askpass
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
130 utility above */
37
5a178bd04ca5 2002-10-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
131 local_sortcol = 1,
5a178bd04ca5 2002-10-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
132 local_sortasds = 1,
5a178bd04ca5 2002-10-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
133 remote_sortcol = 1,
5a178bd04ca5 2002-10-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
134 remote_sortasds = 1;
5a178bd04ca5 2002-10-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
135
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
136
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
137 guint max_log_window_size = 5000; /* Max size of the log window for the
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
138 GTK port */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
139
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
140 GList * host_history = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
141 * port_history = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
142 * user_history = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
143 * localhistory = NULL,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
144 * remotehistory = NULL;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
145
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
146 unsigned int host_len = 0,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
147 port_len = 0,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
148 user_len = 0,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
149 localhistlen = 0,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
150 remotehistlen = 0;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
151
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
152 volatile sig_atomic_t viewedit_process_done = 0;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
153
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
154 gftp_color send_color, recv_color, error_color, misc_color;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
155