-
diff --git a/edit/editcmd.c b/edit/editcmd.c
index 01262f1..b1c3879 100644
a
|
b
|
edit_replace_cmd (WEdit *edit, int again) |
2051 | 2051 | edit->force |= REDRAW_PAGE; |
2052 | 2052 | edit_render_keypress (edit); |
2053 | 2053 | if (times_replaced) { |
2054 | | message (0, msg, _(" %ld replacements made. "), |
| 2054 | message (D_NORMAL, msg, _(" %ld replacements made. "), |
2055 | 2055 | times_replaced); |
2056 | 2056 | } else |
2057 | 2057 | query_dialog (msg, _(" Search string not found "), |
… |
… |
void edit_search_cmd (WEdit * edit, int again) |
2130 | 2130 | } |
2131 | 2131 | if (found) { |
2132 | 2132 | /* in response to number of bookmarks added because of string being found %d times */ |
2133 | | message (0, _("Search"), _(" %d items found, %d bookmarks added "), found, books); |
| 2133 | message (D_NORMAL, _("Search"), _(" %d items found, %d bookmarks added "), found, books); |
2134 | 2134 | } else { |
2135 | 2135 | edit_error_dialog (_ ("Search"), _ (" Search string not found ")); |
2136 | 2136 | } |
… |
… |
edit_block_process_cmd (WEdit *edit, const char *shell_cmd, int block) |
2584 | 2584 | quoted_name, (char *) NULL)); |
2585 | 2585 | } |
2586 | 2586 | g_free (quoted_name); |
2587 | | close_error_pipe (0, 0); |
| 2587 | close_error_pipe (D_NORMAL, NULL); |
2588 | 2588 | |
2589 | 2589 | edit_refresh_cmd (edit); |
2590 | 2590 | edit->force |= REDRAW_COMPLETELY; |
-
diff --git a/src/achown.c b/src/achown.c
index 72ddcad..8f436fb 100644
a
|
b
|
static void apply_advanced_chowns (struct stat *sf) |
627 | 627 | fname = current_panel->dir.list[current_file].fname; |
628 | 628 | need_update = end_chown = 1; |
629 | 629 | if (mc_chmod (fname, get_mode ()) == -1) |
630 | | message (1, MSG_ERROR, _(" Cannot chmod \"%s\" \n %s "), |
| 630 | message (D_ERROR, MSG_ERROR, _(" Cannot chmod \"%s\" \n %s "), |
631 | 631 | fname, unix_error_string (errno)); |
632 | 632 | /* call mc_chown only, if mc_chmod didn't fail */ |
633 | 633 | else if (mc_chown (fname, (ch_flags[9] == '+') ? sf->st_uid : (uid_t) -1, |
634 | 634 | (ch_flags[10] == '+') ? sf->st_gid : (gid_t) -1) == -1) |
635 | | message (1, MSG_ERROR, _(" Cannot chown \"%s\" \n %s "), |
| 635 | message (D_ERROR, MSG_ERROR, _(" Cannot chown \"%s\" \n %s "), |
636 | 636 | fname, unix_error_string (errno)); |
637 | 637 | do_file_mark (current_panel, current_file, 0); |
638 | 638 | |
… |
… |
static void apply_advanced_chowns (struct stat *sf) |
643 | 643 | break; |
644 | 644 | ch_cmode = sf->st_mode; |
645 | 645 | if (mc_chmod (fname, get_mode ()) == -1) |
646 | | message (1, MSG_ERROR, _(" Cannot chmod \"%s\" \n %s "), |
| 646 | message (D_ERROR, MSG_ERROR, _(" Cannot chmod \"%s\" \n %s "), |
647 | 647 | fname, unix_error_string (errno)); |
648 | 648 | /* call mc_chown only, if mc_chmod didn't fail */ |
649 | 649 | else if (mc_chown (fname, (ch_flags[9] == '+') ? a_uid : (uid_t) -1, |
650 | 650 | (ch_flags[10] == '+') ? a_gid : (gid_t) -1) == -1) |
651 | | message (1, MSG_ERROR, _(" Cannot chown \"%s\" \n %s "), |
| 651 | message (D_ERROR, MSG_ERROR, _(" Cannot chown \"%s\" \n %s "), |
652 | 652 | fname, unix_error_string (errno)); |
653 | 653 | |
654 | 654 | do_file_mark (current_panel, current_file, 0); |
… |
… |
chown_advanced_cmd (void) |
690 | 690 | case B_ENTER: |
691 | 691 | need_update = 1; |
692 | 692 | if (mc_chmod (fname, get_mode ()) == -1) |
693 | | message (1, MSG_ERROR, _(" Cannot chmod \"%s\" \n %s "), |
| 693 | message (D_ERROR, MSG_ERROR, _(" Cannot chmod \"%s\" \n %s "), |
694 | 694 | fname, unix_error_string (errno)); |
695 | 695 | /* call mc_chown only, if mc_chmod didn't fail */ |
696 | 696 | else if (mc_chown (fname, (ch_flags[9] == '+') ? sf_stat->st_uid : (uid_t) -1, |
697 | 697 | (ch_flags[10] == '+') ? sf_stat->st_gid : (gid_t) -1) == -1) |
698 | | message (1, MSG_ERROR, _(" Cannot chown \"%s\" \n %s "), |
| 698 | message (D_ERROR, MSG_ERROR, _(" Cannot chown \"%s\" \n %s "), |
699 | 699 | fname, unix_error_string (errno)); |
700 | 700 | break; |
701 | 701 | case B_SETALL: |
-
diff --git a/src/background.c b/src/background.c
index 7d733dd..fa828dd 100644
a
|
b
|
background_attention (int fd, void *closure) |
213 | 213 | if (!waitpid (ctx->pid, &status, WNOHANG)) { |
214 | 214 | /* the process is still running, but it misbehaves - kill it */ |
215 | 215 | kill (ctx->pid, SIGTERM); |
216 | | message (1, background_process_error, _(" Unknown error in child ")); |
| 216 | message (D_ERROR, background_process_error, _(" Unknown error in child ")); |
217 | 217 | return 0; |
218 | 218 | } |
219 | 219 | |
… |
… |
background_attention (int fd, void *closure) |
221 | 221 | if (WIFEXITED (status) && (WEXITSTATUS (status) == 0)) |
222 | 222 | return 0; |
223 | 223 | |
224 | | message (1, background_process_error, _(" Child died unexpectedly ")); |
| 224 | message (D_ERROR, background_process_error, _(" Child died unexpectedly ")); |
225 | 225 | |
226 | 226 | return 0; |
227 | 227 | } |
228 | 228 | |
229 | 229 | read (fd, &argc, sizeof (argc)); |
230 | 230 | if (argc > MAXCALLARGS){ |
231 | | message (1, _(" Background protocol error "), |
| 231 | message (D_ERROR, _(" Background protocol error "), |
232 | 232 | _(" Background process sent us a request for more arguments \n" |
233 | 233 | " than we can handle. \n")); |
234 | 234 | } |
-
diff --git a/src/boxes.c b/src/boxes.c
index 0fd2a0b..e672df9 100644
a
|
b
|
display_bits_box (void) |
629 | 629 | errmsg = |
630 | 630 | init_translation_table (source_codepage, display_codepage); |
631 | 631 | if (errmsg) |
632 | | message (1, MSG_ERROR, "%s", errmsg); |
| 632 | message (D_ERROR, MSG_ERROR, "%s", errmsg); |
633 | 633 | #ifndef HAVE_SLANG |
634 | 634 | meta (stdscr, display_codepage != 0); |
635 | 635 | #else |
-
diff --git a/src/chmod.c b/src/chmod.c
index 599c0c0..2671c65 100644
a
|
b
|
static void do_chmod (struct stat *sf) |
243 | 243 | sf->st_mode &= and_mask; |
244 | 244 | sf->st_mode |= or_mask; |
245 | 245 | if (mc_chmod (current_panel->dir.list [c_file].fname, sf->st_mode) == -1) |
246 | | message (1, MSG_ERROR, _(" Cannot chmod \"%s\" \n %s "), |
| 246 | message (D_ERROR, MSG_ERROR, _(" Cannot chmod \"%s\" \n %s "), |
247 | 247 | current_panel->dir.list [c_file].fname, unix_error_string (errno)); |
248 | 248 | |
249 | 249 | do_file_mark (current_panel, c_file, 0); |
… |
… |
void chmod_cmd (void) |
313 | 313 | case B_ENTER: |
314 | 314 | if (mode_change) |
315 | 315 | if (mc_chmod (fname, c_stat) == -1) |
316 | | message (1, MSG_ERROR, _(" Cannot chmod \"%s\" \n %s "), |
| 316 | message (D_ERROR, MSG_ERROR, _(" Cannot chmod \"%s\" \n %s "), |
317 | 317 | fname, unix_error_string (errno)); |
318 | 318 | need_update = 1; |
319 | 319 | break; |
-
diff --git a/src/chown.c b/src/chown.c
index 31f8f25..6598b43 100644
a
|
b
|
static inline void |
211 | 211 | do_chown (uid_t u, gid_t g) |
212 | 212 | { |
213 | 213 | if (mc_chown (current_panel->dir.list [current_file].fname, u, g) == -1) |
214 | | message (1, MSG_ERROR, _(" Cannot chown \"%s\" \n %s "), |
| 214 | message (D_ERROR, MSG_ERROR, _(" Cannot chown \"%s\" \n %s "), |
215 | 215 | current_panel->dir.list [current_file].fname, unix_error_string (errno)); |
216 | 216 | |
217 | 217 | do_file_mark (current_panel, current_file, 0); |
… |
… |
chown_cmd (void) |
319 | 319 | if (ch_dlg->ret_value==B_ENTER) { |
320 | 320 | need_update = 1; |
321 | 321 | if (mc_chown (fname, new_user, new_group) == -1) |
322 | | message (1, MSG_ERROR, _(" Cannot chown \"%s\" \n %s "), |
| 322 | message (D_ERROR, MSG_ERROR, _(" Cannot chown \"%s\" \n %s "), |
323 | 323 | fname, unix_error_string (errno)); |
324 | 324 | } else |
325 | 325 | apply_chowns (new_user, new_group); |
-
diff --git a/src/cmd.c b/src/cmd.c
index 01d110f..9fab944 100644
a
|
b
|
do_view_cmd (int normal) |
189 | 189 | || link_isdir (selection (current_panel))) { |
190 | 190 | if (confirm_view_dir && (current_panel->marked || current_panel->dirs_marked)) { |
191 | 191 | if (query_dialog |
192 | | (_(" Confirmation "), _("Files tagged, want to cd?"), 0, 2, |
| 192 | (_(" Confirmation "), _("Files tagged, want to cd?"), D_NORMAL, 2, |
193 | 193 | _("&Yes"), _("&No")) != 0) { |
194 | 194 | return; |
195 | 195 | } |
196 | 196 | } |
197 | 197 | if (!do_cd (selection (current_panel)->fname, cd_exact)) |
198 | | message (1, MSG_ERROR, _("Cannot change directory")); |
| 198 | message (D_ERROR, MSG_ERROR, _("Cannot change directory")); |
199 | 199 | |
200 | 200 | return; |
201 | 201 | |
… |
… |
mkdir_cmd (void) |
365 | 365 | repaint_screen (); |
366 | 366 | select_item (current_panel); |
367 | 367 | } else { |
368 | | message (1, MSG_ERROR, " %s ", unix_error_string (errno)); |
| 368 | message (D_ERROR, MSG_ERROR, " %s ", unix_error_string (errno)); |
369 | 369 | } |
370 | 370 | |
371 | 371 | g_free (absdir); |
… |
… |
select_unselect_cmd (const char *title, int cmd) |
508 | 508 | c = regexp_match (reg_exp_t, current_panel->dir.list[i].fname, |
509 | 509 | match_file); |
510 | 510 | if (c == -1) { |
511 | | message (1, MSG_ERROR, _(" Malformed regular expression ")); |
| 511 | message (D_ERROR, MSG_ERROR, _(" Malformed regular expression ")); |
512 | 512 | g_free (reg_exp); |
513 | 513 | return; |
514 | 514 | } |
… |
… |
void ext_cmd (void) |
560 | 560 | dir = 0; |
561 | 561 | if (geteuid () == 0){ |
562 | 562 | dir = query_dialog (_("Extension file edit"), |
563 | | _(" Which extension file you want to edit? "), 0, 2, |
| 563 | _(" Which extension file you want to edit? "), D_NORMAL, 2, |
564 | 564 | _("&User"), _("&System Wide")); |
565 | 565 | } |
566 | 566 | extdir = concat_dir_and_file (mc_home, MC_LIB_EXT); |
… |
… |
menu_edit_cmd (int where) |
589 | 589 | dir = query_dialog ( |
590 | 590 | _(" Menu edit "), |
591 | 591 | _(" Which menu file do you want to edit? "), |
592 | | 0, geteuid() ? 2 : 3, |
| 592 | D_NORMAL, geteuid() ? 2 : 3, |
593 | 593 | _("&Local"), _("&User"), _("&System Wide") |
594 | 594 | ); |
595 | 595 | |
… |
… |
void quick_chdir_cmd (void) |
633 | 633 | tree_chdir (the_tree, target); |
634 | 634 | else |
635 | 635 | if (!do_cd (target, cd_exact)) |
636 | | message (1, MSG_ERROR, _("Cannot change directory") ); |
| 636 | message (D_ERROR, MSG_ERROR, _("Cannot change directory") ); |
637 | 637 | g_free (target); |
638 | 638 | } |
639 | 639 | |
… |
… |
edit_syntax_cmd (void) |
663 | 663 | if (geteuid () == 0) { |
664 | 664 | dir = |
665 | 665 | query_dialog (_("Syntax file edit"), |
666 | | _(" Which syntax file you want to edit? "), 0, 2, |
| 666 | _(" Which syntax file you want to edit? "), D_NORMAL, 2, |
667 | 667 | _("&User"), _("&System Wide")); |
668 | 668 | } |
669 | 669 | extdir = concat_dir_and_file (mc_home, "syntax" PATH_SEP_STR "Syntax"); |
… |
… |
void reselect_vfs (void) |
690 | 690 | return; |
691 | 691 | |
692 | 692 | if (!do_cd (target, cd_exact)) |
693 | | message (1, MSG_ERROR, _("Cannot change directory") ); |
| 693 | message (D_ERROR, MSG_ERROR, _("Cannot change directory") ); |
694 | 694 | g_free (target); |
695 | 695 | } |
696 | 696 | #endif /* USE_VFS */ |
… |
… |
compare_dirs_cmd (void) |
818 | 818 | |
819 | 819 | choice = |
820 | 820 | query_dialog (_(" Compare directories "), |
821 | | _(" Select compare method: "), 0, 3, _("&Quick"), |
822 | | _("&Size only"), _("&Thorough"), _("&Cancel")); |
| 821 | _(" Select compare method: "), 0, D_NORMAL, |
| 822 | _("&Quick"), _("&Size only"), _("&Thorough"), _("&Cancel")); |
823 | 823 | |
824 | 824 | if (choice < 0 || choice > 2) |
825 | 825 | return; |
… |
… |
compare_dirs_cmd (void) |
831 | 831 | compare_dir (current_panel, other_panel, thorough_flag); |
832 | 832 | compare_dir (other_panel, current_panel, thorough_flag); |
833 | 833 | } else { |
834 | | message (1, MSG_ERROR, |
| 834 | message (D_ERROR, MSG_ERROR, |
835 | 835 | _(" Both panels should be in the " |
836 | 836 | "listing mode to use this command ")); |
837 | 837 | } |
… |
… |
history_cmd (void) |
848 | 848 | cmdline->need_push = 0; |
849 | 849 | } |
850 | 850 | if (!cmdline->history) { |
851 | | message (1, MSG_ERROR, _(" The command history is empty ")); |
| 851 | message (D_ERROR, MSG_ERROR, _(" The command history is empty ")); |
852 | 852 | return; |
853 | 853 | } |
854 | 854 | current = g_list_first (cmdline->history); |
… |
… |
view_other_cmd (void) |
887 | 887 | |
888 | 888 | if (!xterm_flag && !console_flag && !use_subshell && !output_starts_shell) { |
889 | 889 | if (message_flag) |
890 | | message (1, MSG_ERROR, |
| 890 | message (D_ERROR, MSG_ERROR, |
891 | 891 | _(" Not an xterm or Linux console; \n" |
892 | 892 | " the panels cannot be toggled. ")); |
893 | 893 | message_flag = FALSE; |
… |
… |
do_link (int symbolic_link, const char *fname) |
908 | 908 | goto cleanup; |
909 | 909 | save_cwds_stat (); |
910 | 910 | if (-1 == mc_link (fname, dest)) |
911 | | message (1, MSG_ERROR, _(" link: %s "), |
| 911 | message (D_ERROR, MSG_ERROR, _(" link: %s "), |
912 | 912 | unix_error_string (errno)); |
913 | 913 | } else { |
914 | 914 | char *s; |
… |
… |
do_link (int symbolic_link, const char *fname) |
931 | 931 | goto cleanup; |
932 | 932 | save_cwds_stat (); |
933 | 933 | if (-1 == mc_symlink (dest, src)) |
934 | | message (1, MSG_ERROR, _(" symlink: %s "), |
| 934 | message (D_ERROR, MSG_ERROR, _(" symlink: %s "), |
935 | 935 | unix_error_string (errno)); |
936 | 936 | } |
937 | 937 | update_panels (UP_OPTIMIZE, UP_KEEPSEL); |
… |
… |
void edit_symlink_cmd (void) |
977 | 977 | if (*dest && strcmp (buffer, dest)) { |
978 | 978 | save_cwds_stat (); |
979 | 979 | if (-1 == mc_unlink (p)){ |
980 | | message (1, MSG_ERROR, _(" edit symlink, unable to remove %s: %s "), |
| 980 | message (D_ERROR, MSG_ERROR, _(" edit symlink, unable to remove %s: %s "), |
981 | 981 | p, unix_error_string (errno)); |
982 | 982 | } else { |
983 | 983 | if (-1 == mc_symlink (dest, p)) |
984 | | message (1, MSG_ERROR, _(" edit symlink: %s "), |
| 984 | message (D_ERROR, MSG_ERROR, _(" edit symlink: %s "), |
985 | 985 | unix_error_string (errno)); |
986 | 986 | } |
987 | 987 | update_panels (UP_OPTIMIZE, UP_KEEPSEL); |
… |
… |
void edit_symlink_cmd (void) |
992 | 992 | } |
993 | 993 | g_free (q); |
994 | 994 | } else { |
995 | | message (1, MSG_ERROR, _("`%s' is not a symbolic link"), |
| 995 | message (D_ERROR, MSG_ERROR, _("`%s' is not a symbolic link"), |
996 | 996 | selection (current_panel)->fname); |
997 | 997 | } |
998 | 998 | } |
… |
… |
nice_cd (const char *text, const char *xtext, const char *help, const char *pref |
1110 | 1110 | if (do_panel_cd (MENU_PANEL, cd_path, 0)) |
1111 | 1111 | directory_history_add (MENU_PANEL, (MENU_PANEL)->cwd); |
1112 | 1112 | else |
1113 | | message (1, MSG_ERROR, _(" Cannot chdir to %s "), cd_path); |
| 1113 | message (D_ERROR, MSG_ERROR, _(" Cannot chdir to %s "), cd_path); |
1114 | 1114 | g_free (cd_path); |
1115 | 1115 | g_free (machine); |
1116 | 1116 | } |
… |
… |
dirsizes_cmd (void) |
1223 | 1223 | void |
1224 | 1224 | save_setup_cmd (void) |
1225 | 1225 | { |
1226 | | char *str; |
1227 | | |
1228 | 1226 | save_setup (); |
1229 | 1227 | sync_profiles (); |
1230 | 1228 | |
1231 | | message (0, _(" Setup "), _(" Setup saved to ~/%s"), PROFILE_NAME); |
| 1229 | message (D_NORMAL, _(" Setup "), _(" Setup saved to ~/%s"), PROFILE_NAME); |
1232 | 1230 | } |
1233 | 1231 | |
1234 | 1232 | static void |
-
diff --git a/src/command.c b/src/command.c
index b204b8d..d118c03 100644
a
|
b
|
void do_cd_command (char *cmd) |
183 | 183 | } else |
184 | 184 | if (!examine_cd (&cmd [3])) { |
185 | 185 | char *d = strip_password (g_strdup (&cmd [3]), 1); |
186 | | message (1, MSG_ERROR, _(" Cannot chdir to \"%s\" \n %s "), |
| 186 | message (D_ERROR, MSG_ERROR, _(" Cannot chdir to \"%s\" \n %s "), |
187 | 187 | d, unix_error_string (errno)); |
188 | 188 | g_free (d); |
189 | 189 | return; |
… |
… |
enter (WInput *cmdline) |
215 | 215 | size_t i, j, cmd_len; |
216 | 216 | |
217 | 217 | if (!vfs_current_is_local ()) { |
218 | | message (1, MSG_ERROR, |
| 218 | message (D_ERROR, MSG_ERROR, |
219 | 219 | _ |
220 | 220 | (" Cannot execute commands on non-local filesystems")); |
221 | 221 | |
… |
… |
enter (WInput *cmdline) |
225 | 225 | /* Check this early before we clean command line |
226 | 226 | * (will be checked again by shell_execute) */ |
227 | 227 | if (use_subshell && subshell_state != INACTIVE) { |
228 | | message (1, MSG_ERROR, |
| 228 | message (D_ERROR, MSG_ERROR, |
229 | 229 | _(" The shell is already running a command ")); |
230 | 230 | return MSG_NOT_HANDLED; |
231 | 231 | } |
-
diff --git a/src/dir.c b/src/dir.c
index 6992f40..471a044 100644
a
|
b
|
do_load_dir (const char *path, dir_list *list, sortfn *sort, int reverse, |
397 | 397 | |
398 | 398 | dirp = mc_opendir (path); |
399 | 399 | if (!dirp) { |
400 | | message (1, MSG_ERROR, _("Cannot read directory contents")); |
| 400 | message (D_ERROR, MSG_ERROR, _("Cannot read directory contents")); |
401 | 401 | return next_free; |
402 | 402 | } |
403 | 403 | tree_store_start_check (path); |
… |
… |
do_reload_dir (const char *path, dir_list *list, sortfn *sort, int count, |
496 | 496 | |
497 | 497 | dirp = mc_opendir (path); |
498 | 498 | if (!dirp) { |
499 | | message (1, MSG_ERROR, _("Cannot read directory contents")); |
| 499 | message (D_ERROR, MSG_ERROR, _("Cannot read directory contents")); |
500 | 500 | clean_dir (list, count); |
501 | 501 | return set_zero_dir (list); |
502 | 502 | } |
-
diff --git a/src/execute.c b/src/execute.c
index eb31cac..970a177 100644
a
|
b
|
shell_execute (const char *command, int flags) |
189 | 189 | if (subshell_state == INACTIVE) |
190 | 190 | do_execute (shell, cmd ? cmd : command, flags | EXECUTE_AS_SHELL); |
191 | 191 | else |
192 | | message (1, MSG_ERROR, |
| 192 | message (D_ERROR, MSG_ERROR, |
193 | 193 | _(" The shell is already running a command ")); |
194 | 194 | else |
195 | 195 | #endif /* HAVE_SUBSHELL_SUPPORT */ |
… |
… |
execute_with_vfs_arg (const char *command, const char *filename) |
352 | 352 | |
353 | 353 | localcopy = mc_getlocalcopy (filename); |
354 | 354 | if (localcopy == NULL) { |
355 | | message (1, MSG_ERROR, _(" Cannot fetch a local copy of %s "), |
| 355 | message (D_ERROR, MSG_ERROR, _(" Cannot fetch a local copy of %s "), |
356 | 356 | filename); |
357 | 357 | return; |
358 | 358 | } |
-
diff --git a/src/ext.c b/src/ext.c
index 8e64d2c..1ad3f19 100644
a
|
b
|
exec_extension (const char *filename, const char *data, int *move_dir, |
100 | 100 | cmd_file_fd = mc_mkstemps (&file_name, "mcext", SCRIPT_SUFFIX); |
101 | 101 | |
102 | 102 | if (cmd_file_fd == -1) { |
103 | | message (1, MSG_ERROR, |
| 103 | message (D_ERROR, MSG_ERROR, |
104 | 104 | _(" Cannot create temporary command file \n %s "), |
105 | 105 | unix_error_string (errno)); |
106 | 106 | return; |
… |
… |
regex_command (const char *filename, const char *action, int *move_dir) |
464 | 464 | char *title = |
465 | 465 | g_strdup_printf (_(" %s%s file error"), |
466 | 466 | mc_home, MC_LIB_EXT); |
467 | | message (1, title, _("The format of the %smc.ext " |
| 467 | message (D_ERROR, title, _("The format of the %smc.ext " |
468 | 468 | "file has changed with version 3.0. It seems that " |
469 | 469 | "the installation failed. Please fetch a fresh " |
470 | 470 | "copy from the Midnight Commander package."), |
… |
… |
regex_command (const char *filename, const char *action, int *move_dir) |
477 | 477 | if (home_error) { |
478 | 478 | char *title = |
479 | 479 | g_strdup_printf (_(" ~/%s file error "), MC_USER_EXT); |
480 | | message (1, title, _("The format of the ~/%s file has " |
| 480 | message (D_ERROR, title, _("The format of the ~/%s file has " |
481 | 481 | "changed with version 3.0. You may either want to copy " |
482 | 482 | "it from %smc.ext or use that file as an example of how " |
483 | 483 | "to write it."), MC_USER_EXT, mc_home); |
-
diff --git a/src/file.c b/src/file.c
index a19633a..100ab3e 100644
a
|
b
|
do_transform_source (FileOpContext *ctx, const char *source) |
212 | 212 | case '*': |
213 | 213 | if (next_reg < 0 || next_reg >= RE_NREGS |
214 | 214 | || ctx->regs.start[next_reg] < 0) { |
215 | | message (1, MSG_ERROR, _(" Invalid target mask ")); |
| 215 | message (D_ERROR, MSG_ERROR, _(" Invalid target mask ")); |
216 | 216 | transform_error = FILE_ABORT; |
217 | 217 | return NULL; |
218 | 218 | } |
… |
… |
check_hardlinks (const char *src_name, const char *dst_name, struct stat *pstat) |
312 | 312 | } |
313 | 313 | } |
314 | 314 | } |
315 | | message (1, MSG_ERROR, _(" Cannot make the hardlink ")); |
| 315 | message (D_ERROR, MSG_ERROR, _(" Cannot make the hardlink ")); |
316 | 316 | return 0; |
317 | 317 | } |
318 | 318 | lp = (struct link *) g_malloc (sizeof (struct link) + strlen (src_name) |
… |
… |
make_symlink (FileOpContext *ctx, const char *src_path, const char *dst_path) |
366 | 366 | |
367 | 367 | if (ctx->stable_symlinks) |
368 | 368 | if (!vfs_file_is_local (src_path) || !vfs_file_is_local (dst_path)) { |
369 | | message (1, MSG_ERROR, |
| 369 | message (D_ERROR, MSG_ERROR, |
370 | 370 | _(" Cannot make stable symlinks across " |
371 | 371 | "non-local filesystems: \n\n" |
372 | 372 | " Option Stable Symlinks will be disabled ")); |
… |
… |
copy_file_file (FileOpContext *ctx, const char *src_path, const char *dst_path, |
510 | 510 | if (dst_exists) { |
511 | 511 | /* Destination already exists */ |
512 | 512 | if (sb.st_dev == sb2.st_dev && sb.st_ino == sb2.st_ino) { |
513 | | message (1, MSG_ERROR, |
| 513 | message (D_ERROR, MSG_ERROR, |
514 | 514 | _(" `%s' and `%s' are the same file "), src_path, dst_path); |
515 | 515 | do_refresh (); |
516 | 516 | return FILE_SKIP; |
… |
… |
copy_file_file (FileOpContext *ctx, const char *src_path, const char *dst_path, |
586 | 586 | |
587 | 587 | if (ctx->do_reget) { |
588 | 588 | if (mc_lseek (src_desc, ctx->do_reget, SEEK_SET) != ctx->do_reget) { |
589 | | message (1, _("Warning"), |
| 589 | message (D_ERROR, _("Warning"), |
590 | 590 | _(" Reget failed, about to overwrite file ")); |
591 | 591 | ctx->do_reget = ctx->do_append = 0; |
592 | 592 | } |
… |
… |
copy_dir_dir (FileOpContext *ctx, const char *s, const char *d, int toplevel, |
868 | 868 | |
869 | 869 | if (is_in_linklist (parent_dirs, s, &cbuf)) { |
870 | 870 | /* we found a cyclic symbolic link */ |
871 | | message (1, MSG_ERROR, |
| 871 | message (D_ERROR, MSG_ERROR, |
872 | 872 | _(" Cannot copy cyclic symbolic link \n `%s' "), s); |
873 | 873 | return FILE_SKIP; |
874 | 874 | } |
… |
… |
move_file_file (FileOpContext *ctx, const char *s, const char *d, |
1052 | 1052 | |
1053 | 1053 | strcpy (st, path_trunc (s, msize)); |
1054 | 1054 | strcpy (dt, path_trunc (d, msize)); |
1055 | | message (1, MSG_ERROR, |
| 1055 | message (D_ERROR, MSG_ERROR, |
1056 | 1056 | _(" `%s' and `%s' are the same file "), st, dt); |
1057 | 1057 | do_refresh (); |
1058 | 1058 | return FILE_SKIP; |
1059 | 1059 | } |
1060 | 1060 | |
1061 | 1061 | if (S_ISDIR (dst_stats.st_mode)) { |
1062 | | message (1, MSG_ERROR, |
| 1062 | message (D_ERROR, MSG_ERROR, |
1063 | 1063 | _(" Cannot overwrite directory `%s' "), d); |
1064 | 1064 | do_refresh (); |
1065 | 1065 | return FILE_SKIP; |
… |
… |
move_dir_dir (FileOpContext *ctx, const char *s, const char *d, |
1175 | 1175 | |
1176 | 1176 | strcpy (st, path_trunc (s, msize)); |
1177 | 1177 | strcpy (dt, path_trunc (d, msize)); |
1178 | | message (1, MSG_ERROR, |
| 1178 | message (D_ERROR, MSG_ERROR, |
1179 | 1179 | _(" `%s' and `%s' are the same directory "), st, dt); |
1180 | 1180 | do_refresh (); |
1181 | 1181 | return FILE_SKIP; |
… |
… |
panel_operate (void *source_panel, FileOperation operation, |
1753 | 1753 | } |
1754 | 1754 | |
1755 | 1755 | if (!strcmp (source, "..")) { |
1756 | | message (1, MSG_ERROR, _(" Cannot operate on \"..\"! ")); |
| 1756 | message (D_ERROR, MSG_ERROR, _(" Cannot operate on \"..\"! ")); |
1757 | 1757 | return 0; |
1758 | 1758 | } |
1759 | 1759 | } |
… |
… |
panel_operate (void *source_panel, FileOperation operation, |
1808 | 1808 | g_strconcat (op_names[operation], ": ", |
1809 | 1809 | panel->cwd, NULL)); |
1810 | 1810 | if (v == -1) { |
1811 | | message (1, MSG_ERROR, |
| 1811 | message (D_ERROR, MSG_ERROR, |
1812 | 1812 | _(" Sorry, I could not put the job in background ")); |
1813 | 1813 | } |
1814 | 1814 | |
-
diff --git a/src/filegui.c b/src/filegui.c
index 441adb7..c1c8a7c 100644
a
|
b
|
file_mask_dialog (FileOpContext *ctx, FileOperation operation, const char *text, |
868 | 868 | |
869 | 869 | g_return_val_if_fail (ctx != NULL, NULL); |
870 | 870 | #if 0 |
871 | | message (1, __FUNCTION__, "text = `%s' \n def_text = `%s'", text, |
| 871 | message (D_ERROR, __FUNCTION__, "text = `%s' \n def_text = `%s'", text, |
872 | 872 | def_text); |
873 | 873 | #endif |
874 | 874 | fmd_init_i18n (FALSE); |
… |
… |
file_mask_dialog (FileOpContext *ctx, FileOperation operation, const char *text, |
946 | 946 | &ctx->rx); |
947 | 947 | |
948 | 948 | if (error) { |
949 | | message (1, MSG_ERROR, _("Invalid source pattern `%s' \n %s "), |
| 949 | message (D_ERROR, MSG_ERROR, _("Invalid source pattern `%s' \n %s "), |
950 | 950 | orig_mask, error); |
951 | 951 | g_free (orig_mask); |
952 | 952 | goto ask_file_mask; |
-
diff --git a/src/find.c b/src/find.c
index baf1504..9fce565 100644
a
|
b
|
find_parm_callback (struct Dlg_head *h, dlg_msg_t msg, int parm) |
166 | 166 | flags |= REG_ICASE; |
167 | 167 | |
168 | 168 | if (regcomp (r, in_with->buffer, flags)) { |
169 | | message (1, MSG_ERROR, _(" Malformed regular expression ")); |
| 169 | message (D_ERROR, MSG_ERROR, _(" Malformed regular expression ")); |
170 | 170 | dlg_select_widget (in_with); |
171 | 171 | h->running = 1; /* Don't stop the dialog */ |
172 | 172 | } |
-
diff --git a/src/help.c b/src/help.c
index 3261cbb..5ce6868 100644
a
|
b
|
static void start_link_area (int x, int y, const char *link_name) |
292 | 292 | Link_Area *new; |
293 | 293 | |
294 | 294 | if (inside_link_area) |
295 | | message (0, _("Warning"), _(" Internal bug: Double start of link area ")); |
| 295 | message (D_NORMAL, _("Warning"), _(" Internal bug: Double start of link area ")); |
296 | 296 | |
297 | 297 | /* Allocate memory for a new link area */ |
298 | 298 | new = g_new (Link_Area, 1); |
… |
… |
help_index_cmd (void *vp) |
540 | 540 | const char *new_item; |
541 | 541 | |
542 | 542 | if (!(new_item = search_string (data, "[Contents]"))) { |
543 | | message (1, MSG_ERROR, _(" Cannot find node %s in help file "), |
| 543 | message (D_ERROR, MSG_ERROR, _(" Cannot find node %s in help file "), |
544 | 544 | "[Contents]"); |
545 | 545 | return; |
546 | 546 | } |
… |
… |
interactive_display (const char *filename, const char *node) |
769 | 769 | data = load_mc_home_file ("mc.hlp", &hlpfile); |
770 | 770 | |
771 | 771 | if (data == NULL) { |
772 | | message (1, MSG_ERROR, _(" Cannot open file %s \n %s "), filename ? filename : hlpfile, |
| 772 | message (D_ERROR, MSG_ERROR, _(" Cannot open file %s \n %s "), filename ? filename : hlpfile, |
773 | 773 | unix_error_string (errno)); |
774 | 774 | } |
775 | 775 | |
… |
… |
interactive_display (const char *filename, const char *node) |
783 | 783 | node = "[main]"; |
784 | 784 | |
785 | 785 | if (!(main_node = search_string (data, node))) { |
786 | | message (1, MSG_ERROR, _(" Cannot find node %s in help file "), |
| 786 | message (D_ERROR, MSG_ERROR, _(" Cannot find node %s in help file "), |
787 | 787 | node); |
788 | 788 | |
789 | 789 | /* Fallback to [main], return if it also cannot be found */ |
-
diff --git a/src/learn.c b/src/learn.c
index dff560c..fb98033 100644
a
|
b
|
_("Please press the %s\n" |
113 | 113 | } |
114 | 114 | |
115 | 115 | if (!seq_ok) { |
116 | | message (0, _(" Cannot accept this key "), |
| 116 | message (D_NORMAL, _(" Cannot accept this key "), |
117 | 117 | _(" You have entered \"%s\""), seq); |
118 | 118 | } |
119 | 119 | |
… |
… |
learn_check_key (int c) |
172 | 172 | if (query_dialog (learn_title, |
173 | 173 | _ |
174 | 174 | ("It seems that all your keys already\n" |
175 | | "work fine. That's great."), 1, 2, |
| 175 | "work fine. That's great."), D_ERROR, 2, |
176 | 176 | _("&Save"), _("&Discard")) == 0) |
177 | 177 | learn_dlg->ret_value = B_ENTER; |
178 | 178 | } else { |
179 | | message (1, learn_title, |
| 179 | message (D_ERROR, learn_title, |
180 | 180 | _ |
181 | 181 | ("Great! You have a complete terminal database!\n" |
182 | 182 | "All your keys work well.")); |
-
diff --git a/src/main.c b/src/main.c
index 949dcf9..150d785 100644
a
|
b
|
void |
425 | 425 | do_possible_cd (const char *new_dir) |
426 | 426 | { |
427 | 427 | if (!do_cd (new_dir, cd_exact)) |
428 | | message (1, _("Warning"), |
| 428 | message (D_ERROR, _("Warning"), |
429 | 429 | _(" The Commander can't change to the directory that \n" |
430 | 430 | " the subshell claims you are in. Perhaps you have \n" |
431 | 431 | " deleted your working directory, or given yourself \n" |
… |
… |
quit_cmd_internal (int quiet) |
471 | 471 | } else { |
472 | 472 | if (query_dialog |
473 | 473 | (_(" The Midnight Commander "), |
474 | | _(" Do you really want to quit the Midnight Commander? "), 0, |
| 474 | _(" Do you really want to quit the Midnight Commander? "), D_NORMAL, |
475 | 475 | 2, _("&Yes"), _("&No")) == 0) |
476 | 476 | q = 1; |
477 | 477 | } |
… |
… |
directory_history_list (WPanel *panel) |
685 | 685 | if (_do_panel_cd (panel, s, cd_exact)) |
686 | 686 | directory_history_add (panel, panel->cwd); |
687 | 687 | else |
688 | | message (1, MSG_ERROR, _("Cannot change directory")); |
| 688 | message (D_ERROR, MSG_ERROR, _("Cannot change directory")); |
689 | 689 | g_free (s); |
690 | 690 | } |
691 | 691 | |
… |
… |
toggle_fast_reload (void) |
990 | 990 | { |
991 | 991 | fast_reload = !fast_reload; |
992 | 992 | if (fast_reload_w == 0 && fast_reload) { |
993 | | message (0, _(" Information "), |
| 993 | message (D_NORMAL, _(" Information "), |
994 | 994 | _ |
995 | 995 | (" Using the fast reload option may not reflect the exact \n" |
996 | 996 | " directory contents. In this case you'll need to do a \n" |
-
diff --git a/src/panelize.c b/src/panelize.c
index c2d2121..9ac3c2f 100644
a
|
b
|
external_panelize (void) |
264 | 264 | char *target = NULL; |
265 | 265 | |
266 | 266 | if (!vfs_current_is_local ()){ |
267 | | message (1, MSG_ERROR, |
| 267 | message (D_ERROR, MSG_ERROR, |
268 | 268 | _(" Cannot run external panelize in a non-local directory ")); |
269 | 269 | return; |
270 | 270 | } |
… |
… |
static void do_external_panelize (char *command) |
367 | 367 | open_error_pipe (); |
368 | 368 | external = popen (command, "r"); |
369 | 369 | if (!external){ |
370 | | close_error_pipe (1, _("Cannot invoke command.")); |
| 370 | close_error_pipe (D_ERROR, _("Cannot invoke command.")); |
371 | 371 | return; |
372 | 372 | } |
373 | 373 | /* Clear the counters and the directory list */ |
… |
… |
static void do_external_panelize (char *command) |
418 | 418 | current_panel->count = set_zero_dir (list); |
419 | 419 | } |
420 | 420 | if (pclose (external) < 0) |
421 | | message (0, _("External panelize"), _("Pipe close failed")); |
422 | | close_error_pipe (0, 0); |
| 421 | message (D_NORMAL, _("External panelize"), _("Pipe close failed")); |
| 422 | close_error_pipe (D_NORMAL, NULL); |
423 | 423 | try_to_select (current_panel, NULL); |
424 | 424 | panel_re_sort (current_panel); |
425 | 425 | } |
-
diff --git a/src/screen.c b/src/screen.c
index 74604f4..74b9aca 100644
a
|
b
|
do_enter_on_file_entry (file_entry *fe) |
1964 | 1964 | if (S_ISDIR (fe->st.st_mode) || link_isdir (fe) |
1965 | 1965 | || (fe->st.st_mode == 0)) { |
1966 | 1966 | if (!do_cd (fe->fname, cd_exact)) |
1967 | | message (1, MSG_ERROR, _("Cannot change directory")); |
| 1967 | message (D_ERROR, MSG_ERROR, _("Cannot change directory")); |
1968 | 1968 | return 1; |
1969 | 1969 | } |
1970 | 1970 | |
… |
… |
do_enter_on_file_entry (file_entry *fe) |
1983 | 1983 | if (confirm_execute) { |
1984 | 1984 | if (query_dialog |
1985 | 1985 | (_(" The Midnight Commander "), |
1986 | | _(" Do you really want to execute? "), 0, 2, _("&Yes"), |
| 1986 | _(" Do you really want to execute? "), D_NORMAL, 2, _("&Yes"), |
1987 | 1987 | _("&No")) != 0) |
1988 | 1988 | return 1; |
1989 | 1989 | } |
… |
… |
panel_callback (Widget *w, widget_msg_t msg, int parm) |
2251 | 2251 | panel->active = 1; |
2252 | 2252 | if (mc_chdir (panel->cwd) != 0) { |
2253 | 2253 | char *cwd = strip_password (g_strdup (panel->cwd), 1); |
2254 | | message (1, MSG_ERROR, _(" Cannot chdir to \"%s\" \n %s "), |
| 2254 | message (D_ERROR, MSG_ERROR, _(" Cannot chdir to \"%s\" \n %s "), |
2255 | 2255 | cwd, unix_error_string (errno)); |
2256 | 2256 | g_free(cwd); |
2257 | 2257 | } else |
-
diff --git a/src/selcodepage.c b/src/selcodepage.c
index 3e9ec63..4f7fa3e 100644
a
|
b
|
do_select_codepage (void) |
99 | 99 | errmsg = |
100 | 100 | init_translation_table (source_codepage, display_codepage); |
101 | 101 | if (errmsg) { |
102 | | message (1, MSG_ERROR, "%s", errmsg); |
| 102 | message (D_ERROR, MSG_ERROR, "%s", errmsg); |
103 | 103 | return -1; |
104 | 104 | } |
105 | 105 | } else { |
106 | | message (1, _("Warning"), |
| 106 | message (D_ERROR, _("Warning"), |
107 | 107 | _("To use this feature select your codepage in\n" |
108 | 108 | "Setup / Display Bits dialog!\n" |
109 | 109 | "Do not forget to save options.")); |
-
diff --git a/src/subshell.c b/src/subshell.c
index 09c9930..32d91fe 100644
a
|
b
|
void resize_subshell (void) |
655 | 655 | int |
656 | 656 | exit_subshell (void) |
657 | 657 | { |
658 | | int quit = TRUE; |
| 658 | int subshell_quit = TRUE; |
659 | 659 | |
660 | 660 | if (subshell_state != INACTIVE && subshell_alive) |
661 | | quit = |
| 661 | subshell_quit = |
662 | 662 | !query_dialog (_("Warning"), |
663 | 663 | _(" The shell is still active. Quit anyway? "), |
664 | | 0, 2, _("&Yes"), _("&No")); |
| 664 | D_NORMAL, 2, _("&Yes"), _("&No")); |
665 | 665 | |
666 | | if (quit) { |
| 666 | if (subshell_quit) { |
667 | 667 | if (subshell_type == TCSH) { |
668 | 668 | if (unlink (tcsh_fifo) == -1) |
669 | 669 | fprintf (stderr, "Cannot remove named pipe %s: %s\r\n", |
… |
… |
exit_subshell (void) |
676 | 676 | pty_buffer = NULL; |
677 | 677 | } |
678 | 678 | |
679 | | return quit; |
| 679 | return subshell_quit; |
680 | 680 | } |
681 | 681 | |
682 | 682 | |
-
diff --git a/src/tree.c b/src/tree.c
index 132d170..de93055 100644
a
|
b
|
static void tree_move (WTree *tree, const char *default_dest) |
649 | 649 | return; |
650 | 650 | } |
651 | 651 | if (stat (dest, &buf)){ |
652 | | message (1, MSG_ERROR, _(" Cannot stat the destination \n %s "), |
| 652 | message (D_ERROR, MSG_ERROR, _(" Cannot stat the destination \n %s "), |
653 | 653 | unix_error_string (errno)); |
654 | 654 | g_free (dest); |
655 | 655 | return; |
… |
… |
tree_rmdir_cmd (WTree *tree) |
714 | 714 | g_strdup_printf (_(" Delete %s? "), |
715 | 715 | tree->selected_ptr->name); |
716 | 716 | result = |
717 | | query_dialog (_(" Delete "), buf, 3, 2, _("&Yes"), _("&No")); |
| 717 | query_dialog (_(" Delete "), buf, D_ERROR, 2, _("&Yes"), _("&No")); |
718 | 718 | g_free (buf); |
719 | 719 | if (result != 0) |
720 | 720 | return; |
… |
… |
chdir_sel (WTree *tree) |
831 | 831 | if (do_cd (tree->selected_ptr->name, cd_exact)) { |
832 | 832 | select_item (current_panel); |
833 | 833 | } else { |
834 | | message (1, MSG_ERROR, _(" Cannot chdir to \"%s\" \n %s "), |
| 834 | message (D_ERROR, MSG_ERROR, _(" Cannot chdir to \"%s\" \n %s "), |
835 | 835 | tree->selected_ptr->name, unix_error_string (errno)); |
836 | 836 | } |
837 | 837 | change_panel (); |
-
diff --git a/src/user.c b/src/user.c
index 01022aa..6a745d2 100644
a
|
b
|
int check_format_var (const char *p, char **v) |
130 | 130 | return 0; |
131 | 131 | |
132 | 132 | if (!dots || dots == q+5){ |
133 | | message (1, |
| 133 | message (D_ERROR, |
134 | 134 | _(" Format error on file Extensions File "), |
135 | 135 | !dots ? _(" The %%var macro has no default ") |
136 | 136 | : _(" The %%var macro has no variable ")); |
… |
… |
debug_out (char *start, char *end, int cond) |
463 | 463 | len = strlen (msg); |
464 | 464 | if (len) |
465 | 465 | msg [len - 1] = 0; |
466 | | message (0, _(" Debug "), "%s", msg); |
| 466 | message (D_NORMAL, _(" Debug "), "%s", msg); |
467 | 467 | |
468 | 468 | } |
469 | 469 | debug_flag = 0; |
… |
… |
execute_menu_command (WEdit *edit_widget, const char *commands) |
580 | 580 | cmd_file_fd = mc_mkstemps (&file_name, "mcusr", SCRIPT_SUFFIX); |
581 | 581 | |
582 | 582 | if (cmd_file_fd == -1){ |
583 | | message (1, MSG_ERROR, _(" Cannot create temporary command file \n %s "), |
| 583 | message (D_ERROR, MSG_ERROR, _(" Cannot create temporary command file \n %s "), |
584 | 584 | unix_error_string (errno)); |
585 | 585 | return; |
586 | 586 | } |
… |
… |
menu_file_own(char* path) |
688 | 688 | } |
689 | 689 | if (verbose) |
690 | 690 | { |
691 | | message (0, _(" Warning -- ignoring file "), |
| 691 | message (D_NORMAL, _(" Warning -- ignoring file "), |
692 | 692 | _("File %s is not owned by root or you or is world writable.\n" |
693 | 693 | "Using it may compromise your security"), |
694 | 694 | path |
… |
… |
user_menu_cmd (struct WEdit *edit_widget) |
712 | 712 | Listbox *listbox; |
713 | 713 | |
714 | 714 | if (!vfs_current_is_local ()){ |
715 | | message (1, MSG_ERROR, |
| 715 | message (D_ERROR, MSG_ERROR, |
716 | 716 | _(" Cannot execute commands on non-local filesystems")); |
717 | 717 | return; |
718 | 718 | } |
… |
… |
user_menu_cmd (struct WEdit *edit_widget) |
730 | 730 | } |
731 | 731 | |
732 | 732 | if ((data = load_file (menu)) == NULL){ |
733 | | message (1, MSG_ERROR, _(" Cannot open file %s \n %s "), |
| 733 | message (D_ERROR, MSG_ERROR, _(" Cannot open file %s \n %s "), |
734 | 734 | menu, unix_error_string (errno)); |
735 | 735 | g_free (menu); |
736 | 736 | menu = NULL; |
… |
… |
user_menu_cmd (struct WEdit *edit_widget) |
811 | 811 | } |
812 | 812 | |
813 | 813 | if (menu_lines == 0) { |
814 | | message (1, MSG_ERROR, _(" No suitable entries found in %s "), menu); |
| 814 | message (D_ERROR, MSG_ERROR, _(" No suitable entries found in %s "), menu); |
815 | 815 | } else { |
816 | 816 | |
817 | 817 | max_cols = min (max (max_cols, col), MAX_ENTRY_LEN); |
-
diff --git a/src/utilunix.c b/src/utilunix.c
index 7565eb1..cd3c7cc 100644
a
|
b
|
static int old_error; /* File descriptor of old standard error */ |
339 | 339 | void open_error_pipe (void) |
340 | 340 | { |
341 | 341 | if (pipe (error_pipe) < 0){ |
342 | | message (0, _("Warning"), _(" Pipe failed ")); |
| 342 | message (D_NORMAL, _("Warning"), _(" Pipe failed ")); |
343 | 343 | } |
344 | 344 | old_error = dup (2); |
345 | 345 | if(old_error < 0 || close(2) || dup (error_pipe[1]) != 2){ |
346 | | message (0, _("Warning"), _(" Dup failed ")); |
| 346 | message (D_NORMAL, _("Warning"), _(" Dup failed ")); |
347 | 347 | close (error_pipe[0]); |
348 | 348 | close (error_pipe[1]); |
349 | 349 | } |
-
diff --git a/src/view.c b/src/view.c
index ddb093d..2f2c33a 100644
a
|
b
|
view_growbuf_read_until (WView *view, offset_type ofs) |
432 | 432 | view->growbuf_finished = TRUE; |
433 | 433 | (void) pclose (view->ds_stdio_pipe); |
434 | 434 | display (view); |
435 | | close_error_pipe (0, NULL); |
| 435 | close_error_pipe (D_NORMAL, NULL); |
436 | 436 | view->ds_stdio_pipe = NULL; |
437 | 437 | return; |
438 | 438 | } |
… |
… |
view_close_datasource (WView *view) |
690 | 690 | if (view->ds_stdio_pipe != NULL) { |
691 | 691 | (void) pclose (view->ds_stdio_pipe); |
692 | 692 | display (view); |
693 | | close_error_pipe (0, NULL); |
| 693 | close_error_pipe (D_NORMAL, NULL); |
694 | 694 | view->ds_stdio_pipe = NULL; |
695 | 695 | } |
696 | 696 | view_growbuf_free (view); |
… |
… |
view_show_error (WView *view, const char *msg) |
1450 | 1450 | if (view_is_in_panel (view)) { |
1451 | 1451 | view_set_datasource_string (view, msg); |
1452 | 1452 | } else { |
1453 | | message (1, MSG_ERROR, "%s", msg); |
| 1453 | message (D_ERROR, MSG_ERROR, "%s", msg); |
1454 | 1454 | } |
1455 | 1455 | } |
1456 | 1456 | |
… |
… |
view_load_command_output (WView *view, const char *command) |
1465 | 1465 | if ((fp = popen (command, "r")) == NULL) { |
1466 | 1466 | /* Avoid two messages. Message from stderr has priority. */ |
1467 | 1467 | display (view); |
1468 | | if (!close_error_pipe (view_is_in_panel (view) ? -1 : 1, NULL)) |
| 1468 | if (!close_error_pipe (view_is_in_panel (view) ? -1 : D_ERROR, NULL)) |
1469 | 1469 | view_show_error (view, _(" Cannot spawn child process ")); |
1470 | 1470 | return FALSE; |
1471 | 1471 | } |
… |
… |
view_load_command_output (WView *view, const char *command) |
1477 | 1477 | |
1478 | 1478 | /* Avoid two messages. Message from stderr has priority. */ |
1479 | 1479 | display (view); |
1480 | | if (!close_error_pipe (view_is_in_panel (view) ? -1 : 1, NULL)) |
| 1480 | if (!close_error_pipe (view_is_in_panel (view) ? -1 : D_ERROR, NULL)) |
1481 | 1481 | view_show_error (view, _("Empty output from child filter")); |
1482 | 1482 | return FALSE; |
1483 | 1483 | } |
… |
… |
search (WView *view, char *text, |
2445 | 2445 | destroy_dlg (d); |
2446 | 2446 | } |
2447 | 2447 | if (!s) { |
2448 | | message (0, _("Search"), _(" Search string not found ")); |
| 2448 | message (D_NORMAL, _("Search"), _(" Search string not found ")); |
2449 | 2449 | view->search_length = 0; |
2450 | 2450 | } |
2451 | 2451 | } |
… |
… |
hex_search (WView *view, const char *text) |
2596 | 2596 | |
2597 | 2597 | /* No valid bytes in the user input */ |
2598 | 2598 | if (block_len <= 0 || parse_error) { |
2599 | | message (0, _("Search"), _("Invalid hex search expression")); |
| 2599 | message (D_NORMAL, _("Search"), _("Invalid hex search expression")); |
2600 | 2600 | g_free (buffer); |
2601 | 2601 | view->search_length = 0; |
2602 | 2602 | return; |
… |
… |
hex_search (WView *view, const char *text) |
2608 | 2608 | g_free (buffer); |
2609 | 2609 | |
2610 | 2610 | if (pos == INVALID_OFFSET) { |
2611 | | message (0, _("Search"), _(" Search string not found ")); |
| 2611 | message (D_NORMAL, _("Search"), _(" Search string not found ")); |
2612 | 2612 | view->search_length = 0; |
2613 | 2613 | return; |
2614 | 2614 | } |
… |
… |
regexp_view_search (WView *view, char *pattern, char *string, |
2648 | 2648 | } |
2649 | 2649 | flags |= REG_EXTENDED; |
2650 | 2650 | if (regcomp (&r, pattern, flags)) { |
2651 | | message (1, MSG_ERROR, _(" Invalid regular expression ")); |
| 2651 | message (D_ERROR, MSG_ERROR, _(" Invalid regular expression ")); |
2652 | 2652 | return -1; |
2653 | 2653 | } |
2654 | 2654 | old_pattern = g_strdup (pattern); |
-
diff --git a/vfs/cpio.c b/vfs/cpio.c
index fb93d9a..3b1dd89 100644
a
|
b
|
cpio_open_cpio_file (struct vfs_class *me, struct vfs_s_super *super, |
157 | 157 | struct vfs_s_inode *root; |
158 | 158 | |
159 | 159 | if ((fd = mc_open (name, O_RDONLY)) == -1) { |
160 | | message (1, MSG_ERROR, _("Cannot open cpio archive\n%s"), name); |
| 160 | message (D_ERROR, MSG_ERROR, _("Cannot open cpio archive\n%s"), name); |
161 | 161 | return -1; |
162 | 162 | } |
163 | 163 | |
… |
… |
cpio_open_cpio_file (struct vfs_class *me, struct vfs_s_super *super, |
173 | 173 | mc_close (fd); |
174 | 174 | s = g_strconcat (name, decompress_extension (type), (char *) NULL); |
175 | 175 | if ((fd = mc_open (s, O_RDONLY)) == -1) { |
176 | | message (1, MSG_ERROR, _("Cannot open cpio archive\n%s"), s); |
| 176 | message (D_ERROR, MSG_ERROR, _("Cannot open cpio archive\n%s"), s); |
177 | 177 | g_free (s); |
178 | 178 | return -1; |
179 | 179 | } |
… |
… |
static int cpio_find_head(struct vfs_class *me, struct vfs_s_super *super) |
239 | 239 | top = 128; |
240 | 240 | } |
241 | 241 | if((tmp = mc_read(super->u.arch.fd, buf, top)) == 0 || tmp == -1) { |
242 | | message (1, MSG_ERROR, _("Premature end of cpio archive\n%s"), super->name); |
| 242 | message (D_ERROR, MSG_ERROR, _("Premature end of cpio archive\n%s"), super->name); |
243 | 243 | cpio_free_archive(me, super); |
244 | 244 | return CPIO_UNKNOWN; |
245 | 245 | } |
… |
… |
static int cpio_read_bin_head(struct vfs_class *me, struct vfs_s_super *super) |
284 | 284 | g_assert(u.buf.c_magic == 070707); |
285 | 285 | |
286 | 286 | if (u.buf.c_namesize == 0 || u.buf.c_namesize > MC_MAXPATHLEN) { |
287 | | message (1, MSG_ERROR, _("Corrupted cpio header encountered in\n%s"), |
| 287 | message (D_ERROR, MSG_ERROR, _("Corrupted cpio header encountered in\n%s"), |
288 | 288 | super->name); |
289 | 289 | return STATUS_FAIL; |
290 | 290 | } |
… |
… |
static int cpio_read_oldc_head(struct vfs_class *me, struct vfs_s_super *super) |
336 | 336 | &hd.c_dev, &hd.c_ino, &hd.c_mode, &hd.c_uid, &hd.c_gid, |
337 | 337 | &hd.c_nlink, &hd.c_rdev, &hd.c_mtime, |
338 | 338 | &hd.c_namesize, &hd.c_filesize) < 10) { |
339 | | message (1, MSG_ERROR, _("Corrupted cpio header encountered in\n%s"), |
| 339 | message (D_ERROR, MSG_ERROR, _("Corrupted cpio header encountered in\n%s"), |
340 | 340 | super->name); |
341 | 341 | return STATUS_FAIL; |
342 | 342 | } |
343 | 343 | |
344 | 344 | if (hd.c_namesize == 0 || hd.c_namesize > MC_MAXPATHLEN) { |
345 | | message (1, MSG_ERROR, _("Corrupted cpio header encountered in\n%s"), |
| 345 | message (D_ERROR, MSG_ERROR, _("Corrupted cpio header encountered in\n%s"), |
346 | 346 | super->name); |
347 | 347 | return STATUS_FAIL; |
348 | 348 | } |
… |
… |
static int cpio_read_crc_head(struct vfs_class *me, struct vfs_s_super *super) |
396 | 396 | &hd.c_nlink, &hd.c_mtime, &hd.c_filesize, |
397 | 397 | &hd.c_dev, &hd.c_devmin, &hd.c_rdev, &hd.c_rdevmin, |
398 | 398 | &hd.c_namesize, &hd.c_chksum) < 14) { |
399 | | message (1, MSG_ERROR, _("Corrupted cpio header encountered in\n%s"), |
| 399 | message (D_ERROR, MSG_ERROR, _("Corrupted cpio header encountered in\n%s"), |
400 | 400 | super->name); |
401 | 401 | return STATUS_FAIL; |
402 | 402 | } |
… |
… |
static int cpio_read_crc_head(struct vfs_class *me, struct vfs_s_super *super) |
406 | 406 | return STATUS_FAIL; |
407 | 407 | |
408 | 408 | if (hd.c_namesize == 0 || hd.c_namesize > MC_MAXPATHLEN) { |
409 | | message (1, MSG_ERROR, _("Corrupted cpio header encountered in\n%s"), |
| 409 | message (D_ERROR, MSG_ERROR, _("Corrupted cpio header encountered in\n%s"), |
410 | 410 | super->name); |
411 | 411 | return STATUS_FAIL; |
412 | 412 | } |
… |
… |
cpio_create_entry (struct vfs_class *me, struct vfs_s_super *super, |
480 | 480 | inode = l->inode; |
481 | 481 | if (inode->st.st_size && st->st_size |
482 | 482 | && (inode->st.st_size != st->st_size)) { |
483 | | message (1, MSG_ERROR, |
| 483 | message (D_ERROR, MSG_ERROR, |
484 | 484 | _ |
485 | 485 | ("Inconsistent hardlinks of\n%s\nin cpio archive\n%s"), |
486 | 486 | name, super->name); |
… |
… |
cpio_create_entry (struct vfs_class *me, struct vfs_s_super *super, |
507 | 507 | 'No such file or directory' is such case) */ |
508 | 508 | |
509 | 509 | if (!S_ISDIR (entry->ino->st.st_mode)) { /* This can be considered archive inconsistency */ |
510 | | message (1, MSG_ERROR, |
| 510 | message (D_ERROR, MSG_ERROR, |
511 | 511 | _("%s contains duplicate entries! Skipping!"), |
512 | 512 | super->name); |
513 | 513 | } else { |
… |
… |
cpio_open_archive (struct vfs_class *me, struct vfs_s_super *super, |
579 | 579 | |
580 | 580 | switch (status) { |
581 | 581 | case STATUS_EOF: |
582 | | message (1, MSG_ERROR, _("Unexpected end of file\n%s"), name); |
| 582 | message (D_ERROR, MSG_ERROR, _("Unexpected end of file\n%s"), name); |
583 | 583 | return 0; |
584 | 584 | case STATUS_OK: |
585 | 585 | continue; |
-
diff --git a/vfs/direntry.c b/vfs/direntry.c
index 3a52d22..b807414 100644
a
|
b
|
vfs_s_free_super (struct vfs_class *me, struct vfs_s_super *super) |
431 | 431 | #if 0 |
432 | 432 | /* FIXME: We currently leak small ammount of memory, sometimes. Fix it if you can. */ |
433 | 433 | if (super->ino_usage) |
434 | | message (1, " Direntry warning ", |
| 434 | message (D_ERROR, " Direntry warning ", |
435 | 435 | "Super ino_usage is %d, memory leak", |
436 | 436 | super->ino_usage); |
437 | 437 | |
438 | 438 | if (super->want_stale) |
439 | | message (1, " Direntry warning ", "Super has want_stale set"); |
| 439 | message (D_ERROR, " Direntry warning ", "Super has want_stale set"); |
440 | 440 | #endif |
441 | 441 | |
442 | 442 | if (super->prevp){ |
-
diff --git a/vfs/extfs.c b/vfs/extfs.c
index d634e33..8024ab6 100644
a
|
b
|
extfs_open_archive (int fstype, const char *name, struct archive **pparc) |
256 | 256 | result = popen (cmd, "r"); |
257 | 257 | g_free (cmd); |
258 | 258 | if (result == NULL) { |
259 | | close_error_pipe (1, NULL); |
| 259 | close_error_pipe (D_ERROR, NULL); |
260 | 260 | if (local_name) { |
261 | 261 | mc_ungetlocalcopy (name, local_name, 0); |
262 | 262 | g_free(local_name); |
… |
… |
extfs_read_archive (int fstype, const char *name, struct archive **pparc) |
314 | 314 | |
315 | 315 | if ((extfsd = |
316 | 316 | extfs_open_archive (fstype, name, ¤t_archive)) == NULL) { |
317 | | message (1, MSG_ERROR, _("Cannot open %s archive\n%s"), |
| 317 | message (D_ERROR, MSG_ERROR, _("Cannot open %s archive\n%s"), |
318 | 318 | extfs_prefixes[fstype], name); |
319 | 319 | return -1; |
320 | 320 | } |
… |
… |
extfs_read_archive (int fstype, const char *name, struct archive **pparc) |
354 | 354 | /* FIXME: Should clean everything one day */ |
355 | 355 | g_free (buffer); |
356 | 356 | pclose (extfsd); |
357 | | close_error_pipe (1, _("Inconsistent extfs archive")); |
| 357 | close_error_pipe (D_ERROR, _("Inconsistent extfs archive")); |
358 | 358 | return -1; |
359 | 359 | } |
360 | 360 | entry = g_new (struct entry, 1); |
… |
… |
extfs_read_archive (int fstype, const char *name, struct archive **pparc) |
373 | 373 | /* FIXME: Should clean everything one day */ |
374 | 374 | g_free (buffer); |
375 | 375 | pclose (extfsd); |
376 | | close_error_pipe (1, |
| 376 | close_error_pipe (D_ERROR, |
377 | 377 | _("Inconsistent extfs archive")); |
378 | 378 | return -1; |
379 | 379 | } else { |
… |
… |
extfs_read_archive (int fstype, const char *name, struct archive **pparc) |
425 | 425 | /* Check if extfs 'list' returned 0 */ |
426 | 426 | if (pclose (extfsd) != 0) { |
427 | 427 | extfs_free (current_archive); |
428 | | close_error_pipe (1, _("Inconsistent extfs archive")); |
| 428 | close_error_pipe (D_ERROR, _("Inconsistent extfs archive")); |
429 | 429 | return -1; |
430 | 430 | } |
431 | 431 | |
432 | | close_error_pipe (1, NULL); |
| 432 | close_error_pipe (D_ERROR, NULL); |
433 | 433 | *pparc = current_archive; |
434 | 434 | return 0; |
435 | 435 | } |
… |
… |
extfs_cmd (const char *extfs_cmd, struct archive *archive, |
633 | 633 | open_error_pipe (); |
634 | 634 | retval = my_system (EXECUTE_AS_SHELL, shell, cmd); |
635 | 635 | g_free (cmd); |
636 | | close_error_pipe (1, NULL); |
| 636 | close_error_pipe (D_ERROR, NULL); |
637 | 637 | return retval; |
638 | 638 | } |
639 | 639 | |
-
diff --git a/vfs/fish.c b/vfs/fish.c
index 2a2deb6..63e4d60 100644
a
|
b
|
fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super) |
239 | 239 | /* Currently, this does not work. ssh reads passwords from |
240 | 240 | /dev/tty, not from stdin :-(. */ |
241 | 241 | |
242 | | message (1, MSG_ERROR, |
| 242 | message (D_ERROR, MSG_ERROR, |
243 | 243 | _ |
244 | 244 | ("Sorry, we cannot do password authenticated connections for now.")); |
245 | 245 | ERRNOR (EPERM, -1); |
-
diff --git a/vfs/ftpfs.c b/vfs/ftpfs.c
index 43d363c..4df1737 100644
a
|
b
|
ftpfs_login_server (struct vfs_class *me, struct vfs_s_super *super, |
527 | 527 | goto login_fail; |
528 | 528 | } |
529 | 529 | } |
530 | | message (1, MSG_ERROR, _("ftpfs: Login incorrect for user %s "), |
| 530 | message (D_ERROR, MSG_ERROR, _("ftpfs: Login incorrect for user %s "), |
531 | 531 | SUP.user); |
532 | 532 | login_fail: |
533 | 533 | wipe_password (pass); |
… |
… |
static int ftpfs_netrc_bad_mode (const char *netrcname) |
1786 | 1786 | |
1787 | 1787 | if (stat (netrcname, &mystat) >= 0 && (mystat.st_mode & 077)) { |
1788 | 1788 | if (be_angry) { |
1789 | | message (1, MSG_ERROR, |
| 1789 | message (D_ERROR, MSG_ERROR, |
1790 | 1790 | _("~/.netrc file has incorrect mode.\n" |
1791 | 1791 | "Remove password or correct mode.")); |
1792 | 1792 | be_angry = 0; |
-
diff --git a/vfs/mcfs.c b/vfs/mcfs.c
index 07de5a3..4c03097 100644
a
|
b
|
mcfs_login_server (int my_socket, char *user, int port, |
130 | 130 | return 0; |
131 | 131 | |
132 | 132 | if (result != MC_VERSION_OK) { |
133 | | message (1, _(" MCFS "), |
| 133 | message (D_ERROR, _(" MCFS "), |
134 | 134 | _(" The server does not support this version ")); |
135 | 135 | close (my_socket); |
136 | 136 | return 0; |
… |
… |
mcfs_login_server (int my_socket, char *user, int port, |
151 | 151 | (" The remote server is not running on a system port \n" |
152 | 152 | " you need a password to log in, but the information may \n" |
153 | 153 | " not be safe on the remote side. Continue? \n"), |
154 | | 3, 2, _("&Yes"), _("&No")); |
| 154 | D_ERROR, 2, _("&Yes"), _("&No")); |
155 | 155 | |
156 | 156 | if (v == 1) { |
157 | 157 | close (my_socket); |
… |
… |
mcfs_login_server (int my_socket, char *user, int port, |
175 | 175 | return 0; |
176 | 176 | |
177 | 177 | if (result != MC_LOGINOK) { |
178 | | message (1, _(" MCFS "), _(" Invalid password ")); |
| 178 | message (D_ERROR, _(" MCFS "), _(" Invalid password ")); |
179 | 179 | rpc_send (my_socket, RPC_INT, MC_QUIT, RPC_END); |
180 | 180 | close (my_socket); |
181 | 181 | return 0; |
… |
… |
mcfs_create_tcp_link (const char *host, int *port, int *version, const char *cal |
235 | 235 | sizeof (inaddr)); |
236 | 236 | else { |
237 | 237 | if ((hp = gethostbyname (host)) == NULL) { |
238 | | message (1, caller, _(" Cannot locate hostname: %s "), |
| 238 | message (D_ERROR, caller, _(" Cannot locate hostname: %s "), |
239 | 239 | host); |
240 | 240 | return 0; |
241 | 241 | } |
… |
… |
mcfs_create_tcp_link (const char *host, int *port, int *version, const char *cal |
254 | 254 | server_address.sin_port = htons (*port); |
255 | 255 | |
256 | 256 | if ((my_socket = socket (AF_INET, SOCK_STREAM, 0)) < 0) { |
257 | | message (1, caller, _(" Cannot create socket: %s "), |
| 257 | message (D_ERROR, caller, _(" Cannot create socket: %s "), |
258 | 258 | unix_error_string (errno)); |
259 | 259 | return 0; |
260 | 260 | } |
261 | 261 | if (connect (my_socket, (struct sockaddr *) &server_address, |
262 | 262 | sizeof (server_address)) < 0) { |
263 | | message (1, caller, _(" Cannot connect to server: %s "), |
| 263 | message (D_ERROR, caller, _(" Cannot connect to server: %s "), |
264 | 264 | unix_error_string (errno)); |
265 | 265 | close (my_socket); |
266 | 266 | return 0; |
… |
… |
mcfs_open_link (char *host, char *user, int *port, char *netrcpass) |
330 | 330 | return &mcfs_connections[i]; |
331 | 331 | } |
332 | 332 | if (mcfs_open_connections == MCFS_MAX_CONNECTIONS) { |
333 | | message (1, MSG_ERROR, _(" Too many open connections ")); |
| 333 | message (D_ERROR, MSG_ERROR, _(" Too many open connections ")); |
334 | 334 | return 0; |
335 | 335 | } |
336 | 336 | |
-
diff --git a/vfs/sfs.c b/vfs/sfs.c
index f4989ca..0770482 100644
a
|
b
|
sfs_vfmake (struct vfs_class *me, const char *name, char *cache) |
147 | 147 | g_free (pqname); |
148 | 148 | open_error_pipe (); |
149 | 149 | if (my_system (EXECUTE_AS_SHELL, "/bin/sh", pad)) { |
150 | | close_error_pipe (1, NULL); |
| 150 | close_error_pipe (D_ERROR, NULL); |
151 | 151 | return -1; |
152 | 152 | } |
153 | 153 | |
154 | | close_error_pipe (0, NULL); |
| 154 | close_error_pipe (D_NORMAL, NULL); |
155 | 155 | return 0; /* OK */ |
156 | 156 | } |
157 | 157 | |
-
diff --git a/vfs/smbfs.c b/vfs/smbfs.c
index a133fa3..74b5c39 100644
a
|
b
|
smbfs_reconnect(smbfs_connection *conn, int *retries) |
604 | 604 | cli_shutdown(conn->cli); |
605 | 605 | |
606 | 606 | if (!(conn->cli = smbfs_do_connect(host, conn->service))) { |
607 | | message (1, MSG_ERROR, |
| 607 | message (D_ERROR, MSG_ERROR, |
608 | 608 | _(" reconnect to %s failed\n "), conn->host); |
609 | 609 | g_free(host); |
610 | 610 | return False; |
… |
… |
smbfs_open_link (char *host, char *path, const char *user, int *port, |
1162 | 1162 | |
1163 | 1163 | if (my_errno != EPERM) |
1164 | 1164 | return 0; |
1165 | | message (1, MSG_ERROR, _(" Authentication failed ")); |
| 1165 | message (D_ERROR, MSG_ERROR, _(" Authentication failed ")); |
1166 | 1166 | |
1167 | 1167 | /* authentication failed, try again */ |
1168 | 1168 | smbfs_auth_remove (bucket->host, bucket->service); |
… |
… |
smbfs_mkdir (struct vfs_class * me, const char *path, mode_t mode) |
1685 | 1685 | |
1686 | 1686 | if (!cli_mkdir (sc->cli, cpath)) { |
1687 | 1687 | my_errno = cli_error (sc->cli, NULL, &err, NULL); |
1688 | | message (1, MSG_ERROR, _(" Error %s creating directory %s "), |
| 1688 | message (D_ERROR, MSG_ERROR, _(" Error %s creating directory %s "), |
1689 | 1689 | cli_errstr (sc->cli), CNV_LANG (cpath)); |
1690 | 1690 | g_free (cpath); |
1691 | 1691 | return -1; |
… |
… |
smbfs_rmdir (struct vfs_class *me, const char *path) |
1711 | 1711 | |
1712 | 1712 | if (!cli_rmdir(sc->cli, cpath)) { |
1713 | 1713 | my_errno = cli_error(sc->cli, NULL, &err, NULL); |
1714 | | message (1, MSG_ERROR, _(" Error %s removing directory %s "), |
| 1714 | message (D_ERROR, MSG_ERROR, _(" Error %s removing directory %s "), |
1715 | 1715 | cli_errstr(sc->cli), CNV_LANG(cpath)); |
1716 | 1716 | g_free (cpath); |
1717 | 1717 | return -1; |
… |
… |
smbfs_open_readwrite (smbfs_handle *remote_handle, char *rname, int flags, int m |
1813 | 1813 | flags : O_RDONLY, DENY_NONE); |
1814 | 1814 | #endif |
1815 | 1815 | if (remote_handle->fnum == -1) { |
1816 | | message (1, MSG_ERROR, _(" %s opening remote file %s "), |
| 1816 | message (D_ERROR, MSG_ERROR, _(" %s opening remote file %s "), |
1817 | 1817 | cli_errstr (remote_handle->cli), CNV_LANG (rname)); |
1818 | 1818 | DEBUG (1, ("smbfs_open(rname:%s) error:%s\n", |
1819 | 1819 | rname, cli_errstr (remote_handle->cli))); |
… |
… |
smbfs_open_readwrite (smbfs_handle *remote_handle, char *rname, int flags, int m |
1829 | 1829 | NULL) |
1830 | 1830 | && !cli_getattrE (remote_handle->cli, remote_handle->fnum, |
1831 | 1831 | &remote_handle->attr, &size, NULL, NULL, NULL)) { |
1832 | | message (1, MSG_ERROR, " getattrib: %s ", |
| 1832 | message (D_ERROR, MSG_ERROR, " getattrib: %s ", |
1833 | 1833 | cli_errstr (remote_handle->cli)); |
1834 | 1834 | DEBUG (1, |
1835 | 1835 | ("smbfs_open(rname:%s) getattrib:%s\n", rname, |
… |
… |
smbfs_unlink (struct vfs_class *me, const char *path) |
1892 | 1892 | remote_file = free_after(smbfs_convert_path (remote_file, FALSE), remote_file); |
1893 | 1893 | |
1894 | 1894 | if (!cli_unlink(sc->cli, remote_file)) { |
1895 | | message (1, MSG_ERROR, _(" %s removing remote file %s "), |
| 1895 | message (D_ERROR, MSG_ERROR, _(" %s removing remote file %s "), |
1896 | 1896 | cli_errstr(sc->cli), CNV_LANG(remote_file)); |
1897 | 1897 | g_free (remote_file); |
1898 | 1898 | return -1; |
… |
… |
smbfs_rename (struct vfs_class *me, const char *a, const char *b) |
1927 | 1927 | g_free (rb); |
1928 | 1928 | |
1929 | 1929 | if (!retval) { |
1930 | | message (1, MSG_ERROR, _(" %s renaming files\n"), |
| 1930 | message (D_ERROR, MSG_ERROR, _(" %s renaming files\n"), |
1931 | 1931 | cli_errstr(sc->cli)); |
1932 | 1932 | return -1; |
1933 | 1933 | } |
-
diff --git a/vfs/tar.c b/vfs/tar.c
index bcde169..6911baa 100644
a
|
b
|
tar_open_archive_int (struct vfs_class *me, const char *name, |
223 | 223 | |
224 | 224 | result = mc_open (name, O_RDONLY); |
225 | 225 | if (result == -1) { |
226 | | message (1, MSG_ERROR, _("Cannot open tar archive\n%s"), name); |
| 226 | message (D_ERROR, MSG_ERROR, _("Cannot open tar archive\n%s"), name); |
227 | 227 | ERRNOR (ENOENT, -1); |
228 | 228 | } |
229 | 229 | |
… |
… |
tar_open_archive_int (struct vfs_class *me, const char *name, |
241 | 241 | s = g_strconcat (archive->name, decompress_extension (type), (char *) NULL); |
242 | 242 | result = mc_open (s, O_RDONLY); |
243 | 243 | if (result == -1) |
244 | | message (1, MSG_ERROR, _("Cannot open tar archive\n%s"), s); |
| 244 | message (D_ERROR, MSG_ERROR, _("Cannot open tar archive\n%s"), s); |
245 | 245 | g_free (s); |
246 | 246 | if (result == -1) |
247 | 247 | ERRNOR (ENOENT, -1); |
… |
… |
tar_read_header (struct vfs_class *me, struct vfs_s_super *archive, |
483 | 483 | archive->u.arch.type = TAR_GNU; |
484 | 484 | |
485 | 485 | if (*h_size > MC_MAXPATHLEN) { |
486 | | message (1, MSG_ERROR, _("Inconsistent tar archive")); |
| 486 | message (D_ERROR, MSG_ERROR, _("Inconsistent tar archive")); |
487 | 487 | return STATUS_BADCHECKSUM; |
488 | 488 | } |
489 | 489 | |
… |
… |
tar_read_header (struct vfs_class *me, struct vfs_s_super *archive, |
498 | 498 | if (data == NULL) { |
499 | 499 | g_free (*longp); |
500 | 500 | *longp = NULL; |
501 | | message (1, MSG_ERROR, |
| 501 | message (D_ERROR, MSG_ERROR, |
502 | 502 | _("Unexpected EOF on archive file")); |
503 | 503 | return STATUS_BADCHECKSUM; |
504 | 504 | } |
… |
… |
tar_read_header (struct vfs_class *me, struct vfs_s_super *archive, |
513 | 513 | if (bp - *longp == MC_MAXPATHLEN && bp[-1] != '\0') { |
514 | 514 | g_free (*longp); |
515 | 515 | *longp = NULL; |
516 | | message (1, MSG_ERROR, _("Inconsistent tar archive")); |
| 516 | message (D_ERROR, MSG_ERROR, _("Inconsistent tar archive")); |
517 | 517 | return STATUS_BADCHECKSUM; |
518 | 518 | } |
519 | 519 | *bp = 0; |
… |
… |
tar_read_header (struct vfs_class *me, struct vfs_s_super *archive, |
588 | 588 | parent = |
589 | 589 | vfs_s_find_inode (me, archive, q, LINK_NO_FOLLOW, FL_MKDIR); |
590 | 590 | if (parent == NULL) { |
591 | | message (1, MSG_ERROR, _("Inconsistent tar archive")); |
| 591 | message (D_ERROR, MSG_ERROR, _("Inconsistent tar archive")); |
592 | 592 | return STATUS_BADCHECKSUM; |
593 | 593 | } |
594 | 594 | |
… |
… |
tar_read_header (struct vfs_class *me, struct vfs_s_super *archive, |
597 | 597 | vfs_s_find_inode (me, archive, current_link_name, |
598 | 598 | LINK_NO_FOLLOW, 0); |
599 | 599 | if (inode == NULL) { |
600 | | message (1, MSG_ERROR, _("Inconsistent tar archive")); |
| 600 | message (D_ERROR, MSG_ERROR, _("Inconsistent tar archive")); |
601 | 601 | } else { |
602 | 602 | entry = vfs_s_new_entry (me, p, inode); |
603 | 603 | vfs_s_insert_entry (me, parent, entry); |
… |
… |
tar_open_archive (struct vfs_class *me, struct vfs_s_super *archive, |
678 | 678 | |
679 | 679 | /* Error on first record */ |
680 | 680 | case STATUS_EOFMARK: |
681 | | message (1, MSG_ERROR, |
| 681 | message (D_ERROR, MSG_ERROR, |
682 | 682 | _ |
683 | 683 | ("Hmm,...\n%s\ndoesn't look like a tar archive."), |
684 | 684 | name); |
-
diff --git a/vfs/undelfs.c b/vfs/undelfs.c
index cea0e79..8502598 100644
a
|
b
|
undelfs_loaddel (void) |
188 | 188 | num_delarray = 0; |
189 | 189 | delarray = g_try_malloc (sizeof (struct deleted_info) * max_delarray); |
190 | 190 | if (!delarray) { |
191 | | message (1, undelfserr, _(" not enough memory ")); |
| 191 | message (D_ERROR, undelfserr, _(" not enough memory ")); |
192 | 192 | return 0; |
193 | 193 | } |
194 | 194 | block_buf = g_try_malloc (fs->blocksize * 3); |
195 | 195 | if (!block_buf) { |
196 | | message (1, undelfserr, _(" while allocating block buffer ")); |
| 196 | message (D_ERROR, undelfserr, _(" while allocating block buffer ")); |
197 | 197 | goto free_delarray; |
198 | 198 | } |
199 | 199 | if ((retval = ext2fs_open_inode_scan (fs, 0, &scan))) { |
200 | | message (1, undelfserr, _(" open_inode_scan: %d "), retval); |
| 200 | message (D_ERROR, undelfserr, _(" open_inode_scan: %d "), retval); |
201 | 201 | goto free_block_buf; |
202 | 202 | } |
203 | 203 | if ((retval = ext2fs_get_next_inode (scan, &ino, &inode))) { |
204 | | message (1, undelfserr, _(" while starting inode scan %d "), |
| 204 | message (D_ERROR, undelfserr, _(" while starting inode scan %d "), |
205 | 205 | retval); |
206 | 206 | goto error_out; |
207 | 207 | } |
… |
… |
undelfs_loaddel (void) |
227 | 227 | ext2fs_block_iterate (fs, ino, 0, block_buf, |
228 | 228 | undelfs_lsdel_proc, &lsd); |
229 | 229 | if (retval) { |
230 | | message (1, undelfserr, |
| 230 | message (D_ERROR, undelfserr, |
231 | 231 | _(" while calling ext2_block_iterate %d "), retval); |
232 | 232 | goto next; |
233 | 233 | } |
… |
… |
undelfs_loaddel (void) |
238 | 238 | sizeof (struct deleted_info) * |
239 | 239 | (max_delarray + 50)); |
240 | 240 | if (!delarray_new) { |
241 | | message (1, undelfserr, |
| 241 | message (D_ERROR, undelfserr, |
242 | 242 | _ |
243 | 243 | (" no more memory while reallocating array ")); |
244 | 244 | goto error_out; |
… |
… |
undelfs_loaddel (void) |
261 | 261 | next: |
262 | 262 | retval = ext2fs_get_next_inode (scan, &ino, &inode); |
263 | 263 | if (retval) { |
264 | | message (1, undelfserr, _(" while doing inode scan %d "), |
| 264 | message (D_ERROR, undelfserr, _(" while doing inode scan %d "), |
265 | 265 | retval); |
266 | 266 | goto error_out; |
267 | 267 | } |
… |
… |
com_err (const char *whoami, long err_code, const char *fmt, ...) |
296 | 296 | str = g_strdup_vprintf (fmt, ap); |
297 | 297 | va_end (ap); |
298 | 298 | |
299 | | message (1, _(" Ext2lib error "), " %s (%s: %ld) ", str, whoami, |
| 299 | message (D_ERROR, _(" Ext2lib error "), " %s (%s: %ld) ", str, whoami, |
300 | 300 | err_code); |
301 | 301 | g_free (str); |
302 | 302 | } |
… |
… |
undelfs_opendir (struct vfs_class *me, const char *dirname) |
324 | 324 | } |
325 | 325 | |
326 | 326 | if (ext2fs_open (ext2_fname, 0, 0, 0, unix_io_manager, &fs)){ |
327 | | message (1, undelfserr, _(" Cannot open file %s "), ext2_fname); |
| 327 | message (D_ERROR, undelfserr, _(" Cannot open file %s "), ext2_fname); |
328 | 328 | return 0; |
329 | 329 | } |
330 | 330 | print_vfs_message (_("undelfs: reading inode bitmap...")); |
331 | 331 | if (ext2fs_read_inode_bitmap (fs)){ |
332 | | message (1, undelfserr, |
| 332 | message (D_ERROR, undelfserr, |
333 | 333 | _(" Cannot load inode bitmap from: \n %s \n"), ext2_fname); |
334 | 334 | goto quit_opendir; |
335 | 335 | } |
336 | 336 | print_vfs_message (_("undelfs: reading block bitmap...")); |
337 | 337 | if (ext2fs_read_block_bitmap (fs)){ |
338 | | message (1, undelfserr, |
| 338 | message (D_ERROR, undelfserr, |
339 | 339 | _(" Cannot load block bitmap from: \n %s \n"), ext2_fname); |
340 | 340 | goto quit_opendir; |
341 | 341 | } |
… |
… |
undelfs_readdir(void *vfs_info) |
359 | 359 | static char *const dirent_dest = undelfs_readdir_data.dent.d_name; |
360 | 360 | |
361 | 361 | if (vfs_info != fs) { |
362 | | message (1, undelfserr, _(" vfs_info is not fs! ")); |
| 362 | message (D_ERROR, undelfserr, _(" vfs_info is not fs! ")); |
363 | 363 | return NULL; |
364 | 364 | } |
365 | 365 | if (readdir_ptr == num_delarray) |
… |
… |
undelfs_open (struct vfs_class *me, const char *fname, int flags, int mode) |
413 | 413 | return 0; |
414 | 414 | |
415 | 415 | if (!ext2_fname || strcmp (ext2_fname, file)) { |
416 | | message (1, undelfserr, |
| 416 | message (D_ERROR, undelfserr, |
417 | 417 | _(" You have to chdir to extract files first ")); |
418 | 418 | g_free (file); |
419 | 419 | g_free (f); |
… |
… |
undelfs_read (void *vfs_info, char *buffer, int count) |
537 | 537 | retval = ext2fs_block_iterate(fs, p->inode, 0, NULL, |
538 | 538 | undelfs_dump_read, p); |
539 | 539 | if (retval){ |
540 | | message (1, undelfserr, _(" while iterating over blocks ")); |
| 540 | message (D_ERROR, undelfserr, _(" while iterating over blocks ")); |
541 | 541 | return -1; |
542 | 542 | } |
543 | 543 | if (p->error_code && !p->finished) |
… |
… |
undelfs_lstat (struct vfs_class *me, const char *path, struct stat *buf) |
598 | 598 | } |
599 | 599 | |
600 | 600 | if (!ext2_fname || strcmp (ext2_fname, file)){ |
601 | | message (1, undelfserr, _(" You have to chdir to extract files first ")); |
| 601 | message (D_ERROR, undelfserr, _(" You have to chdir to extract files first ")); |
602 | 602 | g_free (file); |
603 | 603 | g_free (f); |
604 | 604 | return 0; |
… |
… |
undelfs_chdir(struct vfs_class *me, const char *path) |
637 | 637 | /* this could be fixed by making an ext2fs io manager to use */ |
638 | 638 | /* our vfs, but that is left as an excercise for the reader */ |
639 | 639 | if ((fd = open (file, O_RDONLY)) == -1){ |
640 | | message (1, undelfserr, _(" Cannot open file %s "), file); |
| 640 | message (D_ERROR, undelfserr, _(" Cannot open file %s "), file); |
641 | 641 | g_free (f); |
642 | 642 | g_free (file); |
643 | 643 | return -1; |
-
diff --git a/vfs/utilvfs.c b/vfs/utilvfs.c
index 5f3b5a9..ce61f49 100644
a
|
b
|
vfs_parse_ls_lga (const char *p, struct stat *s, char **filename, |
818 | 818 | static int errorcount = 0; |
819 | 819 | |
820 | 820 | if (++errorcount < 5) { |
821 | | message (1, _("Cannot parse:"), "%s", |
| 821 | message (D_ERROR, _("Cannot parse:"), "%s", |
822 | 822 | (p_copy && *p_copy) ? p_copy : line); |
823 | 823 | } else if (errorcount == 5) |
824 | | message (1, MSG_ERROR, |
| 824 | message (D_ERROR, MSG_ERROR, |
825 | 825 | _("More parsing errors will be ignored.")); |
826 | 826 | } |
827 | 827 | |
… |
… |
vfs_parse_ls_lga (const char *p, struct stat *s, char **filename, |
832 | 832 | void |
833 | 833 | vfs_die (const char *m) |
834 | 834 | { |
835 | | message (1, _("Internal error:"), "%s", m); |
| 835 | message (D_ERROR, _("Internal error:"), "%s", m); |
836 | 836 | exit (1); |
837 | 837 | } |
838 | 838 | |
-
diff --git a/vfs/vfs.c b/vfs/vfs.c
index 21b5404..2d60a51 100644
a
|
b
|
mc_def_ungetlocalcopy (struct vfs_class *vfs, const char *filename, |
841 | 841 | return 0; |
842 | 842 | |
843 | 843 | failed: |
844 | | message (1, _("Changes to file lost"), "%s", filename); |
| 844 | message (D_ERROR, _("Changes to file lost"), "%s", filename); |
845 | 845 | if (fdout != -1) |
846 | 846 | mc_close (fdout); |
847 | 847 | if (fdin != -1) |