* view.c (init_growing_view): Renamed to
view_load_command_output(). Removed dead code. Removed unused parameter.
Этот коммит содержится в:
родитель
fa7945759b
Коммит
eaa04d2269
@ -1,3 +1,11 @@
|
||||
2005-04-25 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
* view.c (view_move_forward2): Fixed a bug related to the return
|
||||
value, which had made the down and page-down keys no-ops.
|
||||
* view.c (init_growing_view): Renamed to
|
||||
view_load_command_output(). Removed dead code. Removed unused
|
||||
parameter.
|
||||
|
||||
2005-04-22 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
* view.c (view_move_forward2): Fixed a bug discovered by
|
||||
@ -7,8 +15,6 @@
|
||||
condition for breaking out of the loop when upto == 0.
|
||||
* view.c (display): Fixed operator precedence with ?: in hex
|
||||
display.
|
||||
* view.c (view_move_forward2): Fixed a bug related to the return
|
||||
value, which had made the down and page-down keys no-ops.
|
||||
|
||||
2005-04-19 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
|
20
src/view.c
20
src/view.c
@ -574,18 +574,16 @@ set_view_init_error (WView *view, const char *msg)
|
||||
|
||||
/* return values: NULL for success, else points to error message */
|
||||
static char *
|
||||
init_growing_view (WView *view, const char *name, const char *filename)
|
||||
view_load_command_output (WView *view, const char *command)
|
||||
{
|
||||
const char *err_msg = NULL;
|
||||
FILE *fp;
|
||||
|
||||
view_close_datasource (view);
|
||||
view_update_last_byte (view);
|
||||
|
||||
if (name) {
|
||||
FILE *fp;
|
||||
|
||||
open_error_pipe ();
|
||||
if ((fp = popen (name, "r")) == NULL) {
|
||||
if ((fp = popen (command, "r")) == NULL) {
|
||||
/* Avoid two messages. Message from stderr has priority. */
|
||||
if (!close_error_pipe (view_is_in_panel (view) ? -1 : 1, NULL))
|
||||
err_msg = _(" Cannot spawn child program ");
|
||||
@ -602,16 +600,6 @@ init_growing_view (WView *view, const char *name, const char *filename)
|
||||
err_msg = _("Empty output from child filter");
|
||||
return set_view_init_error (view, err_msg);
|
||||
}
|
||||
} else {
|
||||
int fd;
|
||||
|
||||
fd = mc_open (filename, O_RDONLY);
|
||||
if (fd == -1) {
|
||||
err_msg = _(" Cannot open file ");
|
||||
return set_view_init_error (view, err_msg);
|
||||
}
|
||||
view_set_datasource_vfs_pipe (view, fd);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -644,7 +632,7 @@ view_load (WView *view, const char *_command, const char *_file,
|
||||
}
|
||||
|
||||
if (_command && (view->magic_mode || _file[0] == '\0')) {
|
||||
error = init_growing_view (view, _command, view->filename);
|
||||
error = view_load_command_output (view, _command);
|
||||
} else if (_file[0]) {
|
||||
int cntlflags;
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user