From e37737c0c997c668d7d6d786356956956c5c06d0 Mon Sep 17 00:00:00 2001 From: Norbert Warmuth Date: Wed, 23 Feb 2000 07:43:14 +0000 Subject: [PATCH] 2000-02-23 Norbert Warmuth * vfs/ftpfs.c: Definition of PORT changed in the middle of ftpfs.c with unexpected side effects (only when HSC_PROXY was defined). Introduce HSC_PROXY_PORT and FTP_COMMAND_PORT and use where appropriate. (dir_load): Do not hard code the directory cache timeout to 10 seconds. Instead use the setting from Options/Virtual VFS ... * vfs/fish.c (file_store): honour changed semantics for return value (on error -1 is expected). * vfs/ftpfs.c (file_store): dito * gtkedit/editcmd.c (edit_replace_prompt): fix incorrect initialization of array of structure (gcc version 2.96 20000131 chokes on it). * lib/mc.hint: C-y and not C-u can be used to insert text in input lines (e. g. text which has been deleted with M-d). * configure.in: Fix the extfs-configure-fragment-in-final-output bug * src/main.c (parse_control_file): add missing right parentheses * src/boxes.c: fix incorrect initialization of array of structure (gcc version 2.96 20000131 chokes on it). --- ChangeLog | 11 +++++++++++ configure.in | 9 ++++----- gtkedit/editcmd.c | 2 +- lib/mc.hint | 2 +- src/ChangeLog | 7 +++++++ src/boxes.c | 4 ++-- src/main.c | 2 +- vfs/ChangeLog | 15 +++++++++++++++ vfs/fish.c | 2 +- vfs/ftpfs.c | 23 +++++++++++------------ 10 files changed, 54 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index addb59493..ee087b7e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2000-02-23 Norbert Warmuth + + * gtkedit/editcmd.c (edit_replace_prompt): fix incorrect + initialization of array of structure (gcc version 2.96 20000131 + chokes on it). + + * lib/mc.hint: C-y and not C-u can be used to insert text in input + lines (e. g. text which has been deleted with M-d). + + * configure.in: Fix the extfs-configure-fragment-in-final-output bug + 2000-01-31 Yuan-Chung Cheng * configure.in: Added "zh_CN.GB2312" to ALL_LINGUAS. diff --git a/configure.in b/configure.in index 0f919032c..730670c0c 100644 --- a/configure.in +++ b/configure.in @@ -974,7 +974,7 @@ AC_DEFUN(AC_EXT2_UNDEL, [ GNOME_UNDELFS_CHECKS if test "$ext2fs_undel" = yes; then AC_MSG_RESULT(With ext2fs file recovery code) - vfs_flags="${vfs_flags}, undelfs" + vfs_flags=["${vfs_flags}, undelfs"] undelfs_o="undelfs.o" LIBS="$LIBS $EXT2FS_UNDEL_LIBS" else @@ -992,10 +992,10 @@ AC_ARG_WITH(ext2undel, CPPFLAGS="$CPPFLAGS -I$withval/include" fi AC_EXT2_UNDEL - fi], + fi],[ dnl Default: detect AC_CHECK_LIB(ext2fs, ext2fs_close, AC_EXT2_UNDEL,,-lcom_err) -) +]) AC_SUBST(undelfs_o) @@ -1245,9 +1245,8 @@ SHELL=${SHELL-"/bin/sh"} AC_SUBST(SHELL) dnl -dnl Output configuration filesn +dnl Output configuration files dnl - AC_CONFIG_SUBDIRS(vfs/samba) AC_OUTPUT([ diff --git a/gtkedit/editcmd.c b/gtkedit/editcmd.c index 4203b1537..6d1229be0 100644 --- a/gtkedit/editcmd.c +++ b/gtkedit/editcmd.c @@ -1196,7 +1196,7 @@ int edit_replace_prompt (WEdit * edit, char *replace_text, int xpos, int ypos) {quick_button, 4, CONFIRM_DLG_WIDTH, 3, CONFIRM_DLG_HEIGTH, N_ ("&Replace"), 0, B_ENTER, 0, 0, XV_WLAY_DONTCARE, NULL}, {quick_label, 2, CONFIRM_DLG_WIDTH, 2, CONFIRM_DLG_HEIGTH, 0, - 0, 0, 0, XV_WLAY_DONTCARE, 0}, + 0, 0, 0, 0, XV_WLAY_DONTCARE, 0}, {0}}; quick_widgets[4].text = catstrs (_ (" Replace with: "), replace_text, 0); diff --git a/lib/mc.hint b/lib/mc.hint index 49c0e9fc2..831e4efbe 100644 --- a/lib/mc.hint +++ b/lib/mc.hint @@ -30,7 +30,7 @@ Hint: Find File: you can work on the files found using the Panelize button. Hint: Want to do complex searches? Use the External Panelize command. Hint: To change directory halfway through typing a command, use M-c (quick cd). Note: Shell commands will not work when you are on a non-local file system. -Hint: Bring text back from the dead with C-u. +Hint: Bring text back from the dead with C-y. Hint: Are some of your keys not working? Look at Options/Learn keys. Hint: To look at the output of a command in the viewer, use M-! Hint: F13 (or Shift-F3) invokes the viewer in raw mode. diff --git a/src/ChangeLog b/src/ChangeLog index 7fb4270f9..258d165a1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2000-02-23 Norbert Warmuth + + * main.c (parse_control_file): add missing right parentheses + + * boxes.c: fix incorrect initialization of array of structure (gcc + version 2.96 20000131 chokes on it). + 2000-02-18 Paul Sheer * gtkedit/*.[ch], edit.c et al: updates to reflect diff --git a/src/boxes.c b/src/boxes.c index 575a73b24..6759dde07 100644 --- a/src/boxes.c +++ b/src/boxes.c @@ -386,7 +386,7 @@ static QuickWidget conf_widgets [] = { 10, 0, &my_overwrite, 0, XV_WLAY_BELOWCLOSE, "ov" }, { quick_checkbox, 1, 13, 3, CONFY, N_(" confirm &Delete "), 9, 0, &my_delete, 0, XV_WLAY_BELOWCLOSE, "de" }, -{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE } +{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE, 0 } }; static QuickDialog confirmation = @@ -667,7 +667,7 @@ static QuickWidget confvfs_widgets [] = { XV_WLAY_RIGHTOF, "input-timo-vfs" }, { quick_label, 4, VFSX, 3, VFSY, N_("Timeout for freeing VFSs:"), 0, 0, 0, 0, XV_WLAY_BELOWCLOSE, "label-vfs" }, -{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE, 0 } +{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE, 0 } }; static QuickDialog confvfs_dlg = diff --git a/src/main.c b/src/main.c index 6aa55ef0e..cc6cb98ac 100644 --- a/src/main.c +++ b/src/main.c @@ -603,7 +603,7 @@ static void parse_control_file (void) /* Security: Check that the user owns the control file and this file is not group/world writable to prevent other users from playing tricks on him/her. */ - if (s.st_uid != getuid () || ((s.st_mode) & (S_IWGRP|S_IWOTH)){ + if (s.st_uid != getuid () || ((s.st_mode) & (S_IWGRP|S_IWOTH))) { fclose (file); return; } diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 52255bc2f..196cbb5d6 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,18 @@ +2000-02-23 Norbert Warmuth + + * ftpfs.c: Definition of PORT changed in the middle of ftpfs.c + with unexpected side effects (only when HSC_PROXY was + defined). Introduce HSC_PROXY_PORT and FTP_COMMAND_PORT and use + where appropriate. + + (dir_load): Do not hard code the directory cache timeout to 10 + seconds. Instead use the setting from Options/Virtual VFS ... + + * fish.c (file_store): honour changed semantics for return value + (on error -1 is expected). + + * ftpfs.c (file_store): dito + 2000-02-22 Pavel Machek * cpio.c: added. Thanx to Jan Hudec , who wrote diff --git a/vfs/fish.c b/vfs/fish.c index 30f12173e..18eb79164 100644 --- a/vfs/fish.c +++ b/vfs/fish.c @@ -475,7 +475,7 @@ file_store(vfs *me, vfs_s_super *super, char *name, char *localname) was_error ? "zeros" : "file", total, s.st_size); } if ((get_reply (me, SUP.sockr, NULL, 0) != COMPLETE) || was_error) - ERRNOR (E_REMOTE, 0); + ERRNOR (E_REMOTE, -1); close(h); return 0; error_return: diff --git a/vfs/ftpfs.c b/vfs/ftpfs.c index c5f22a043..5f0796c18 100644 --- a/vfs/ftpfs.c +++ b/vfs/ftpfs.c @@ -204,12 +204,13 @@ translate_path (vfs *me, vfs_s_super *super, const char *remote_path) * */ -#define PORT 21 +#define FTP_COMMAND_PORT 21 +#define HSC_PROXY_PORT 9875 static char * my_get_host_and_username (char *path, char **host, char **user, int *port, char **pass) { - return vfs_split_url (path, host, user, port, pass, PORT, URL_DEFAULTANON); + return vfs_split_url (path, host, user, port, pass, FTP_COMMAND_PORT, URL_DEFAULTANON); } /* Returns a reply code, check /usr/include/arpa/ftp.h for possible values */ @@ -614,11 +615,10 @@ ftpfs_get_proxy_host_and_port (char *proxy, char **host, int *port) char *user, *pass, *dir; #if defined(HSC_PROXY) -#define PORT 9875 + dir = vfs_split_url (proxy, host, &user, port, &pass, HSC_PROXY_PORT, URL_DEFAULTANON); #else -#define PORT 21 + dir = vfs_split_url (proxy, host, &user, port, &pass, FTP_COMMAND_PORT, URL_DEFAULTANON); #endif - dir = vfs_split_url (proxy, host, &user, port, &pass, PORT, URL_DEFAULTANON); g_free (user); if (pass) @@ -763,7 +763,7 @@ open_archive (vfs *me, vfs_s_super *super, char *archive_name, char *op) char *host, *user, *password; int port; - vfs_split_url (strchr(op, ':')+1, &host, &user, &port, &password, PORT, URL_DEFAULTANON); + vfs_split_url (strchr(op, ':')+1, &host, &user, &port, &password, FTP_COMMAND_PORT, URL_DEFAULTANON); SUP.host = g_strdup (host); SUP.user = g_strdup (user); @@ -1186,8 +1186,7 @@ dir_load(vfs *me, vfs_s_inode *dir, char *remote_path) } gettimeofday(&dir->u.ftp.timestamp, NULL); - dir->u.ftp.timestamp.tv_sec += 10; /* was 360: 10 is good for - stressing direntry layer a bit */ + dir->u.ftp.timestamp.tv_sec += ftpfs_directory_timeout; if (SUP.strict == RFC_STRICT) sock = open_data_connection (me, super, "LIST", 0, TYPE_ASCII, 0); @@ -1293,12 +1292,12 @@ file_store(vfs *me, vfs_s_super *super, char *name, char *localname) h = open(localname, O_RDONLY); if (h == -1) - ERRNOR (EIO, 0); + ERRNOR (EIO, -1); fstat(h, &s); sock = open_data_connection(me, super, "STOR", name, TYPE_BINARY, 0); if (sock < 0) { close(h); - return 0; + return -1; } #ifdef HAVE_STRUCT_LINGER li.l_onoff = 1; @@ -1345,8 +1344,8 @@ file_store(vfs *me, vfs_s_super *super, char *name, char *localname) close(sock); close(h); if (get_reply (me, SUP.sock, NULL, 0) != COMPLETE) - ERRNOR (EIO, 0); - return 1; + ERRNOR (EIO, -1); + return 0; error_return: disable_interrupt_key(); close(sock);