Ticket #139: compatibility_move_mc_files-rev1.patch

File compatibility_move_mc_files-rev1.patch, 2.8 KB (added by slavazanko, 15 years ago)

remove compatibility_move_mc_files stuff

  • src/ChangeLog

    diff --git a/src/ChangeLog b/src/ChangeLog
    index 55b4d40..5653ea6 100644
    a b  
     12009-01-05  Slava Zanko    
     2        * main.c (main): remove compatibility_move_mc_files stuff. 
     3 
    142008-12-19  Roland Illig  <roland.illig@gmx.de> 
    25 
    36        * x11conn.c (x11_available): If the X11 shared library cannot be 
  • src/main.c

    diff --git a/src/main.c b/src/main.c
    index a59607e..949dcf9 100644
    a b handle_args (int argc, char *argv[]) 
    21142114    poptFreeContext (ctx); 
    21152115} 
    21162116 
    2117 /* 
    2118  * The compatibility_move_mc_files routine is intended to 
    2119  * move all of the hidden .mc files into a private ~/.mc 
    2120  * directory in the home directory, to avoid cluttering the users. 
    2121  * 
    2122  * Previous versions of the program had all of their files in 
    2123  * the $HOME, we are now putting them in $HOME/.mc 
    2124  */ 
    2125  
    21262117static int 
    21272118do_mc_filename_rename (const char *o_name, const char *n_name) 
    21282119{ 
    do_mc_filename_rename (const char *o_name, const char *n_name) 
    21362127    return move; 
    21372128} 
    21382129 
    2139 static int 
    2140 compatibility_move_mc_files (void) 
    2141 { 
    2142     struct stat s; 
    2143     int move = 0; 
    2144     char *mc_dir = concat_dir_and_file (home_dir, ".mc"); 
    2145  
    2146     if (stat (mc_dir, &s) && (errno == ENOENT) 
    2147         && (mkdir (mc_dir, 0777) != -1)) { 
    2148  
    2149         move = do_mc_filename_rename (".mc.ini", "ini"); 
    2150         move += do_mc_filename_rename (".mc.hot", "hotlist"); 
    2151         move += do_mc_filename_rename (".mc.ext", "bindings"); 
    2152         move += do_mc_filename_rename (".mc.menu", "menu"); 
    2153         move += do_mc_filename_rename (".mc.bashrc", "bashrc"); 
    2154         move += do_mc_filename_rename (".mc.inputrc", "inputrc"); 
    2155         move += do_mc_filename_rename (".mc.tcshrc", "tcshrc"); 
    2156         move += do_mc_filename_rename (".mc.tree", "Tree"); 
    2157     } 
    2158     g_free (mc_dir); 
    2159     return move; 
    2160 } 
    2161  
    21622130int 
    21632131main (int argc, char *argv[]) 
    21642132{ 
    2165     /* if on, it displays the information that files have been moved to ~/.mc */ 
    2166     int show_change_notice = 0; 
    2167  
    21682133    /* We had LC_CTYPE before, LC_ALL includs LC_TYPE as well */ 
    21692134    setlocale (LC_ALL, ""); 
    21702135    bindtextdomain ("mc", LOCALEDIR); 
    main (int argc, char *argv[]) 
    22092174    /* Install the SIGCHLD handler; must be done before init_subshell() */ 
    22102175    init_sigchld (); 
    22112176 
    2212     show_change_notice = compatibility_move_mc_files (); 
    2213  
    22142177    /* We need this, since ncurses endwin () doesn't restore the signals */ 
    22152178    save_stop_handler (); 
    22162179 
    main (int argc, char *argv[]) 
    22482211    if (alternate_plus_minus) 
    22492212        application_keypad_mode (); 
    22502213 
    2251     if (show_change_notice) { 
    2252         message (1, _(" Notice "), 
    2253                  _(" The Midnight Commander configuration files \n" 
    2254                    " are now stored in the ~/.mc directory, the \n" 
    2255                    " files have been moved now\n")); 
    2256     } 
    22572214#ifdef HAVE_SUBSHELL_SUPPORT 
    22582215    if (use_subshell) { 
    22592216        prompt = strip_ctrl_codes (subshell_prompt);