diff -urN mc-4.7.1-old/lib/skin/colors.c mc-4.7.1-new/lib/skin/colors.c
old
|
new
|
|
308 | 308 | if (keys == NULL) |
309 | 309 | continue; |
310 | 310 | |
311 | | if(*keys == NULL) { |
312 | | g_strfreev (keys); |
313 | | continue; |
314 | | } |
315 | | |
316 | 311 | for (; *keys; keys++) { |
317 | 312 | mc_skin_color = mc_skin_color_get_from_ini_file (mc_skin, *groups, *keys); |
318 | 313 | if (mc_skin_color != NULL) |
diff -urN mc-4.7.1-old/lib/skin/common.c mc-4.7.1-new/lib/skin/common.c
old
|
new
|
|
42 | 42 | |
43 | 43 | /*** file scope variables ************************************************************************/ |
44 | 44 | |
45 | | static gboolean mc_skin_is_init = FALSE; |
46 | | |
47 | 45 | /* --------------------------------------------------------------------------------------------- */ |
48 | 46 | /*** file scope functions ************************************************************************/ |
49 | 47 | /* --------------------------------------------------------------------------------------------- */ |
… |
… |
|
109 | 107 | mc_skin_reinit (); |
110 | 108 | mc_skin_set_hardcoded_skin (&mc_skin__default); |
111 | 109 | } |
112 | | |
113 | 110 | } |
114 | 111 | |
115 | 112 | /* --------------------------------------------------------------------------------------------- */ |
… |
… |
|
148 | 145 | (void) mc_skin_ini_file_parse (&mc_skin__default); |
149 | 146 | is_good_init = FALSE; |
150 | 147 | } |
151 | | mc_skin_is_init = TRUE; |
152 | 148 | return is_good_init; |
153 | 149 | } |
154 | 150 | |
… |
… |
|
170 | 166 | mc_config_deinit (mc_skin__default.config); |
171 | 167 | mc_skin__default.config = NULL; |
172 | 168 | } |
173 | | |
174 | | mc_skin_is_init = FALSE; |
175 | 169 | } |
176 | 170 | |
177 | 171 | /* --------------------------------------------------------------------------------------------- */ |
diff -urN mc-4.7.1-old/lib/vfs/mc-vfs/undelfs.c mc-4.7.1-new/lib/vfs/mc-vfs/undelfs.c
old
|
new
|
|
289 | 289 | return 0; |
290 | 290 | } |
291 | 291 | |
292 | | |
293 | | /* |
294 | | * This function overrides com_err() from libcom_err library. |
295 | | * It is used in libext2fs to report errors. |
296 | | */ |
297 | | void |
298 | | com_err (const char *whoami, long err_code, const char *fmt, ...) |
299 | | { |
300 | | va_list ap; |
301 | | char *str; |
302 | | |
303 | | va_start (ap, fmt); |
304 | | str = g_strdup_vprintf (fmt, ap); |
305 | | va_end (ap); |
306 | | |
307 | | message (D_ERROR, _(" Ext2lib error "), " %s (%s: %ld) ", str, whoami, err_code); |
308 | | g_free (str); |
309 | | } |
310 | | |
311 | 292 | static void * |
312 | 293 | undelfs_opendir (struct vfs_class *me, const char *dirname) |
313 | 294 | { |
… |
… |
|
362 | 343 | return 0; |
363 | 344 | } |
364 | 345 | |
365 | | |
366 | 346 | static void * |
367 | 347 | undelfs_readdir (void *vfs_info) |
368 | 348 | { |
diff -urN mc-4.7.1-old/lib/vfs/mc-vfs/vfs.c mc-4.7.1-new/lib/vfs/mc-vfs/vfs.c
old
|
new
|
|
470 | 470 | } |
471 | 471 | str_close_conv (coder); |
472 | 472 | return state; |
473 | | } else { |
474 | | errno = EINVAL; |
475 | | return ESTR_FAILURE; |
476 | 473 | } |
477 | | break; |
478 | 474 | default: |
479 | 475 | errno = EINVAL; |
480 | 476 | return ESTR_FAILURE; |
diff -urN mc-4.7.1-old/src/listmode.c mc-4.7.1-new/src/listmode.c
old
|
new
|
|
36 | 36 | #include <unistd.h> |
37 | 37 | |
38 | 38 | #include "lib/global.h" |
39 | | #include "tty.h" |
40 | | #include "key.h" |
41 | | #include "color.h" |
42 | 39 | #include "dialog.h" |
43 | 40 | #include "widget.h" |
44 | 41 | #include "wtools.h" |
diff -urN mc-4.7.1-old/src/main.c mc-4.7.1-new/src/main.c
old
|
new
|
|
1585 | 1585 | if (parm == '\n') { |
1586 | 1586 | size_t i; |
1587 | 1587 | |
1588 | | for (i = 0; cmdline->buffer[i] && (cmdline->buffer[i] == ' ' || |
1589 | | cmdline->buffer[i] == '\t'); i++) |
1590 | | ; |
| 1588 | for (i = 0; (cmdline->buffer[i] == ' ') || (cmdline->buffer[i] == '\t'); i++); |
| 1589 | |
1591 | 1590 | if (cmdline->buffer[i]) { |
1592 | 1591 | send_message ((Widget *) cmdline, WIDGET_KEY, parm); |
1593 | 1592 | return MSG_HANDLED; |
… |
… |
|
2200 | 2199 | application_keypad_mode (); |
2201 | 2200 | |
2202 | 2201 | #ifdef HAVE_SUBSHELL_SUPPORT |
2203 | | if (use_subshell) { |
| 2202 | if (use_subshell) |
2204 | 2203 | mc_prompt = strip_ctrl_codes (subshell_prompt); |
2205 | | if (mc_prompt == NULL) |
2206 | | mc_prompt = (geteuid () == 0) ? "# " : "$ "; |
2207 | | } else |
2208 | 2204 | #endif /* HAVE_SUBSHELL_SUPPORT */ |
| 2205 | if (mc_prompt == NULL) |
2209 | 2206 | mc_prompt = (geteuid () == 0) ? "# " : "$ "; |
2210 | 2207 | |
2211 | 2208 | /* Program main loop */ |
diff -urN mc-4.7.1-old/src/panelize.c mc-4.7.1-new/src/panelize.c
old
|
new
|
|
398 | 398 | dir_list *list = ¤t_panel->dir; |
399 | 399 | char line [MC_MAXPATHLEN]; |
400 | 400 | char *name; |
401 | | FILE *external; |
| 401 | FILE *eksternal; |
402 | 402 | |
403 | 403 | open_error_pipe (); |
404 | | external = popen (command, "r"); |
405 | | if (!external){ |
| 404 | eksternal = popen (command, "r"); |
| 405 | if (eksternal == NULL) { |
406 | 406 | close_error_pipe (D_ERROR, _("Cannot invoke command.")); |
407 | 407 | return; |
408 | 408 | } |
… |
… |
|
410 | 410 | panel_clean_dir (current_panel); |
411 | 411 | |
412 | 412 | while (1) { |
413 | | clearerr(external); |
414 | | if (fgets (line, MC_MAXPATHLEN, external) == NULL) { |
415 | | if (ferror(external) && errno == EINTR) |
| 413 | clearerr(eksternal); |
| 414 | if (fgets (line, MC_MAXPATHLEN, eksternal) == NULL) { |
| 415 | if (ferror(eksternal) && errno == EINTR) |
416 | 416 | continue; |
417 | 417 | else |
418 | 418 | break; |
… |
… |
|
455 | 455 | } else { |
456 | 456 | current_panel->count = set_zero_dir (list) ? 1 : 0; |
457 | 457 | } |
458 | | if (pclose (external) < 0) |
| 458 | if (pclose (eksternal) < 0) |
459 | 459 | message (D_NORMAL, _("External panelize"), _("Pipe close failed")); |
460 | 460 | close_error_pipe (D_NORMAL, NULL); |
461 | 461 | try_to_select (current_panel, NULL); |
diff -urN mc-4.7.1-old/src/widget.c mc-4.7.1-new/src/widget.c
old
|
new
|
|
740 | 740 | void |
741 | 741 | label_set_text (WLabel *label, const char *text) |
742 | 742 | { |
743 | | int newcols = label->widget.cols; |
| 743 | int newcols; |
744 | 744 | int newlines; |
745 | 745 | |
| 746 | if (label == NULL) |
| 747 | return; |
| 748 | |
| 749 | newcols = label->widget.cols; |
746 | 750 | if (label->text && text && !strcmp (label->text, text)) |
747 | 751 | return; /* Flickering is not nice */ |
748 | 752 | |
… |
… |
|
753 | 757 | if (label->auto_adjust_cols) { |
754 | 758 | str_msg_term_size (text, &newlines, &newcols); |
755 | 759 | if (newcols > label->widget.cols) |
756 | | label->widget.cols = newcols; |
| 760 | label->widget.cols = newcols; |
| 761 | |
757 | 762 | if (newlines > label->widget.lines) |
758 | 763 | label->widget.lines = newlines; |
759 | 764 | } |