1
1

* ext.c (exec_extension): Don't create self-destructing scripts

for the viewer - remove those scripts manually after calling
view().  This fixes the problem with double F8 in the viewer on
parsed files.
Reported by David Martin <dmartina@excite.com>
Этот коммит содержится в:
Pavel Roskin 2002-10-30 21:38:33 +00:00
родитель 0ff23cc6a3
Коммит 3ee1c3b3f6
3 изменённых файлов: 20 добавлений и 8 удалений

Просмотреть файл

@ -1,11 +1,17 @@
2002-10-30 Pavel Roskin <proski@gnu.org> 2002-10-30 Pavel Roskin <proski@gnu.org>
* ext.c (exec_extension): Don't create self-destructing scripts
for the viewer - remove those scripts manually after calling
view(). This fixes the problem with double F8 in the viewer on
parsed files.
Reported by David Martin <dmartina@excite.com>
* ext.c (exec_extension): Don't rely on working #! - explicitly * ext.c (exec_extension): Don't rely on working #! - explicitly
run /bin/sh on the temporary script. run /bin/sh on the temporary script.
* mouse.h: Use definitions for GPM_B_DOWN and GPM_B_UP * mouse.h: Use definitions for GPM_B_DOWN and GPM_B_UP
compatible with gpm-1.20. compatible with gpm-1.20.
Reported by by David Martin <dmartina@excite.com> Reported by David Martin <dmartina@excite.com>
2002-10-29 Pavel Roskin <proski@gnu.org> 2002-10-29 Pavel Roskin <proski@gnu.org>

Просмотреть файл

@ -12,9 +12,6 @@ security issues.
Consider applying a patch from PLD to make M-o propagate the current Consider applying a patch from PLD to make M-o propagate the current
directory to the other panel. directory to the other panel.
Pressing F8 twice in the viewer causes error messages if the file was
preprocessed (i.e. gzipped files, manpages).
ncurses 5.2 turns off keypad under heavy load on xterm. Check if ncurses 5.2 turns off keypad under heavy load on xterm. Check if
anything can be done about it. anything can be done about it.

Просмотреть файл

@ -205,8 +205,15 @@ exec_extension (const char *filename, const char *data, int *move_dir,
} }
} /* for */ } /* for */
/* Make sure that the file removes itself when it finishes */ /*
fprintf (cmd_file, "\n/bin/rm -f %s\n", file_name); * Make the script remove itself when it finishes.
* Don't do it for the viewer - it may need to rerun the script,
* so we clean up after calling view().
*/
if (!run_view) {
fprintf (cmd_file, "\n/bin/rm -f %s\n", file_name);
}
fclose (cmd_file); fclose (cmd_file);
if ((run_view && !written_nonspace) || is_cd) { if ((run_view && !written_nonspace) || is_cd) {
@ -234,10 +241,12 @@ exec_extension (const char *filename, const char *data, int *move_dir,
/* If we've written whitespace only, then just load filename /* If we've written whitespace only, then just load filename
* into view * into view
*/ */
if (written_nonspace) if (written_nonspace) {
view (cmd, filename, move_dir, start_line); view (cmd, filename, move_dir, start_line);
else unlink (file_name);
} else {
view (0, filename, move_dir, start_line); view (0, filename, move_dir, start_line);
}
if (changed_hex_mode && !altered_hex_mode) if (changed_hex_mode && !altered_hex_mode)
default_hex_mode = def_hex_mode; default_hex_mode = def_hex_mode;
if (changed_nroff_flag && !altered_nroff_flag) if (changed_nroff_flag && !altered_nroff_flag)