Fri Jun 18 11:29:56 1999 Norbert Warmuth <nwarmuth@privat.circular.de>

* src/user.c (user_menu_cmd): Allow national characters as hotkeys.
Don't dump core when the menu file contains only empty lines

* src/view.c (search, block_search): Use the correct column for the
percent display while searching.


Fri Jun 18 11:49:05 1999  Norbert Warmuth  <nwarmuth@privat.circular.de>

* vfs/ftpfs.c (resolve_symlink_with_ls_options): Some ftp servers don't
make a difference between "LIST -la" and "LIST -lLa". If we find such
a server don't use -lLa when resolving symbolic links.
This commit is contained in:
Norbert Warmuth 1999-06-18 22:25:24 +00:00
parent 7a22a993e7
commit d32e4e77e6
5 changed files with 40 additions and 8 deletions

View File

@ -1,3 +1,11 @@
Fri Jun 18 11:29:56 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* user.c (user_menu_cmd): Allow national characters as hotkeys.
Don't dump core when the menu file contains only empty lines
* view.c (search, block_search): Use the correct column for the
percent display while searching.
1999-06-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* complete.c (complete_engine): Put an #ifndef HAVE_GNOME around

View File

@ -657,7 +657,6 @@ void user_menu_cmd (void)
g_free (menu);
return;
}
g_free (menu);
max_cols = 0;
for (i = 0; i < MAX_ENTRIES; i++)
@ -699,7 +698,7 @@ void user_menu_cmd (void)
selected = menu_lines;
}
}
else if (*p > ' ' && *p < 127){
else if (*p != ' ' && *p != '\t' && is_printable (*p)) {
/* A menu entry title line */
if (accept_entry)
entries [menu_lines] = p;
@ -721,15 +720,22 @@ void user_menu_cmd (void)
col = 0;
}
}
max_cols = min (max (max_cols, col), MAX_ENTRY_LEN);
if (menu_lines == 0) {
message (1, MSG_ERROR, _(" Empty file %s "), menu);
g_free (menu);
return;
}
g_free (menu);
max_cols = min (max (max_cols, col), MAX_ENTRY_LEN);
/* Create listbox */
listbox = create_listbox_window (max_cols+2, menu_lines, _(" User menu "),
"[Menu File Edit]");
/* insert all the items found */
for (i = 0; i < menu_lines; i++)
LISTBOX_APPEND_TEXT (listbox, entries [i][0],
LISTBOX_APPEND_TEXT (listbox, (unsigned char)entries [i][0],
extract_line (entries [i],
entries [i]+MAX_ENTRY_LEN),
entries [i]);

View File

@ -1474,7 +1474,8 @@ cancel_pressed (GtkWidget *widget, int *abort)
static void
search (WView *view, char *text, int (*search)(WView *, char *, char *, int))
{
int w = view->widget.cols - (view->have_frame * 2);
int w = view->widget.cols - view->have_frame + 1;
char *s = NULL; /* The line we read from the view buffer */
long p, beginning;
int ch;
@ -1615,7 +1616,8 @@ search (WView *view, char *text, int (*search)(WView *, char *, char *, int))
static long
block_search (WView *view, char *buffer, int len)
{
int w = view->widget.cols - (view->have_frame * 2);
int w = view->widget.cols - view->have_frame + 1;
char *d = buffer, b;
unsigned long e;

View File

@ -1,7 +1,13 @@
Fri Jun 18 11:49:05 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* ftpfs.c (resolve_symlink_with_ls_options): Some ftp servers don't
make a difference between "LIST -la" and "LIST -lLa". If we find such
a server don't use -lLa when resolving symbolic links.
1999-05-12 Christian GENNERAT <christian.gennerat@alcatel.fr>
* urar.in, uzip.in: patches to use in #urar and #uzip the new features
added in mc-4.5.31 (unlink, mkdir, rmdir)
* urar.in, uzip.in: patches to use in #urar and #uzip the new features
added in mc-4.5.31 (unlink, mkdir, rmdir)
1999-04-30 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>

View File

@ -1152,6 +1152,7 @@ resolve_symlink_with_ls_options(struct connection *bucket, struct dir *dir)
struct stat s;
struct linklist *flist;
struct direntry *fe;
int switch_method = 0;
dir->symlink_status = FTPFS_RESOLVED_SYMLINKS;
if (strchr (dir->remote_path, ' ')) {
@ -1196,6 +1197,11 @@ resolve_symlink_with_ls_options(struct connection *bucket, struct dir *dir)
int r = strcmp(fe->name, filename);
g_free(filename);
if (r == 0) {
if (S_ISLNK (s.st_mode)) {
/* This server doesn't understand LIST -lLa */
switch_method = 1;
goto done;
}
fe->l_stat = g_new (struct stat, 1);
if (fe->l_stat == NULL)
goto done;
@ -1213,6 +1219,10 @@ done:
disable_interrupt_key();
fclose(fp);
get_reply(qsock(bucket), NULL, 0);
if (switch_method) {
bucket->strict_rfc959_list_cmd = 1;
resolve_symlink_without_ls_options(bucket, dir);
}
}
static void