File ChangeLog changed (mode: 100644) (index 2c9822264..556d01b08) |
20 |
20 |
Pause on Windows on failed execution of a help command. Thanks to |
Pause on Windows on failed execution of a help command. Thanks to |
21 |
21 |
filterfalse. |
filterfalse. |
22 |
22 |
|
|
|
23 |
|
Pause on Windows, when executing of shell command fails. |
|
24 |
|
|
23 |
25 |
Fixed generation of vifm-help.txt file on Windows (all occurrences of the |
Fixed generation of vifm-help.txt file on Windows (all occurrences of the |
24 |
26 |
"[m" sequence were removed). Thanks to Sebastian Cyprych. |
"[m" sequence were removed). Thanks to Sebastian Cyprych. |
25 |
27 |
|
|
File src/running.c changed (mode: 100644) (index 238c98ecd..a11ee928e) |
... |
... |
shellout(const char *command, int pause, int allow_screen) |
893 |
893 |
* subprocess exited. */ |
* subprocess exited. */ |
894 |
894 |
result = WEXITSTATUS(ec); |
result = WEXITSTATUS(ec); |
895 |
895 |
|
|
896 |
|
#ifndef _WIN32 |
|
897 |
896 |
if(result != 0 && pause < 0) |
if(result != 0 && pause < 0) |
898 |
897 |
{ |
{ |
899 |
898 |
LOG_ERROR_MSG("Subprocess (%s) exit code: %d (0x%x); status = 0x%x", buf, |
LOG_ERROR_MSG("Subprocess (%s) exit code: %d (0x%x); status = 0x%x", buf, |
900 |
899 |
result, result, ec); |
result, result, ec); |
901 |
|
my_system(PAUSE_CMD); |
|
902 |
|
} |
|
|
900 |
|
#ifdef _WIN32 |
|
901 |
|
if(stroscmp(cfg.shell, "cmd") == 0) |
|
902 |
|
{ |
|
903 |
|
my_system_no_cls("pause"); |
|
904 |
|
} |
|
905 |
|
else |
903 |
906 |
#endif |
#endif |
|
907 |
|
{ |
|
908 |
|
my_system_no_cls(PAUSE_CMD); |
|
909 |
|
} |
|
910 |
|
} |
904 |
911 |
|
|
905 |
912 |
/* force views update */ |
/* force views update */ |
906 |
913 |
request_view_update(&lwin); |
request_view_update(&lwin); |
File src/utils/utils.c changed (mode: 100644) (index ba9056326..13b4c7b71) |
... |
... |
static void unquote(char quoted[]); |
71 |
71 |
#endif |
#endif |
72 |
72 |
|
|
73 |
73 |
int |
int |
74 |
|
my_system(char *command) |
|
|
74 |
|
my_system(char command[]) |
|
75 |
|
{ |
|
76 |
|
#ifdef _WIN32 |
|
77 |
|
system("cls"); |
|
78 |
|
#endif |
|
79 |
|
return my_system_no_cls(command); |
|
80 |
|
} |
|
81 |
|
|
|
82 |
|
int |
|
83 |
|
my_system_no_cls(char command[]) |
75 |
84 |
{ |
{ |
76 |
85 |
#ifndef _WIN32 |
#ifndef _WIN32 |
77 |
86 |
typedef void (*sig_handler)(int); |
typedef void (*sig_handler)(int); |
|
... |
... |
my_system(char *command) |
140 |
149 |
#else |
#else |
141 |
150 |
char buf[strlen(cfg.shell) + 5 + strlen(command)*4 + 1 + 1]; |
char buf[strlen(cfg.shell) + 5 + strlen(command)*4 + 1 + 1]; |
142 |
151 |
|
|
143 |
|
system("cls"); |
|
144 |
|
|
|
145 |
152 |
if(stroscmp(cfg.shell, "cmd") == 0) |
if(stroscmp(cfg.shell, "cmd") == 0) |
146 |
153 |
{ |
{ |
147 |
154 |
snprintf(buf, sizeof(buf), "%s /C \"%s\"", cfg.shell, command); |
snprintf(buf, sizeof(buf), "%s /C \"%s\"", cfg.shell, command); |
File src/utils/utils.h changed (mode: 100644) (index 2fd1bdf00..b14da0148) |
... |
... |
const char * get_regexp_error(int err, regex_t *re); |
56 |
56 |
|
|
57 |
57 |
/* Program running. */ |
/* Program running. */ |
58 |
58 |
|
|
59 |
|
int my_system(char *command); |
|
|
59 |
|
/* Executes an external command. Clears the screen up on Windows before running |
|
60 |
|
* the command. Returns error code, which is zero on success. */ |
|
61 |
|
int my_system(char command[]); |
|
62 |
|
/* Executes an external command without clearing up the screen. Returns error |
|
63 |
|
* code, which is zero on success. */ |
|
64 |
|
int my_system_no_cls(char command[]); |
60 |
65 |
void _gnuc_noreturn run_from_fork(int pipe[2], int err, char *cmd); |
void _gnuc_noreturn run_from_fork(int pipe[2], int err, char *cmd); |
61 |
66 |
|
|
62 |
67 |
/* Other functions. */ |
/* Other functions. */ |