Ticket #2079: 2079-src-cmd.c-seems-UN-needed-function-do_edit.patch

File 2079-src-cmd.c-seems-UN-needed-function-do_edit.patch, 2.2 KB (added by vit_r, 15 years ago)

src-cmd.c-seems-UN-needed-function-do_edit

  • src/cmd.c

    From 2396f2c83c562b6d6b9c1f1e597d2abc75fa474d Mon Sep 17 00:00:00 2001
    From: Vit Rosin <vit_r@list.ru>
    Date: Tue, 2 Mar 2010 19:12:12 +0000
    Subject: [PATCH]  src/cmd.c seems UN needed function do_edit()
    
    ---
     src/cmd.c |   20 +++++++-------------
     1 files changed, 7 insertions(+), 13 deletions(-)
    
    diff --git a/src/cmd.c b/src/cmd.c
    index 3436778..20b0c6b 100644
    a b do_edit_at_line (const char *what, int start_line) 
    318318    repaint_screen (); 
    319319} 
    320320 
    321 static void 
    322 do_edit (const char *what) 
    323 { 
    324     do_edit_at_line (what, 0); 
    325 } 
    326  
    327321void 
    328322edit_cmd (void) 
    329323{ 
    330324    if (regex_command (selection (current_panel)->fname, "Edit", 0) == 0) 
    331         do_edit (selection (current_panel)->fname); 
     325        do_edit_at_line (selection (current_panel)->fname, 0); 
    332326} 
    333327 
    334328void 
    edit_cmd_new (void) 
    337331#if HAVE_CHARSET 
    338332    source_codepage = default_source_codepage; 
    339333#endif 
    340     do_edit (NULL); 
     334    do_edit_at_line (NULL, 0); 
    341335} 
    342336 
    343337/* Invoked by F5.  Copy, default to the other panel.  */ 
    void ext_cmd (void) 
    608602    if (dir == 0){ 
    609603        buffer = g_build_filename (home_dir, MC_USERCONF_DIR, MC_FILEBIND_FILE, NULL); 
    610604        check_for_default (extdir, buffer); 
    611         do_edit (buffer); 
     605        do_edit_at_line (buffer, 0); 
    612606        g_free (buffer); 
    613607    } else if (dir == 1) { 
    614608        if (!exist_file(extdir)) { 
    615609            g_free (extdir); 
    616610            extdir = concat_dir_and_file (mc_home_alt, MC_LIB_EXT); 
    617611        } 
    618         do_edit (extdir); 
     612        do_edit_at_line (extdir, 0); 
    619613    } 
    620614   g_free (extdir); 
    621615   flush_extension_file (); 
    edit_mc_menu_cmd (void) 
    668662            return; 
    669663    } 
    670664 
    671     do_edit (buffer); 
     665    do_edit_at_line (buffer, 0); 
    672666 
    673667    g_free (buffer); 
    674668    g_free (menufile); 
    void edit_fhl_cmd (void) 
    692686    if (dir == 0){ 
    693687        buffer = g_build_filename (home_dir, MC_USERCONF_DIR, MC_FHL_INI_FILE, NULL); 
    694688        check_for_default (fhlfile, buffer); 
    695         do_edit (buffer); 
     689        do_edit_at_line (buffer, 0); 
    696690        g_free (buffer); 
    697691    } else if (dir == 1) { 
    698692        if (!exist_file(fhlfile)) { 
    699693            g_free (fhlfile); 
    700694            fhlfile = concat_dir_and_file (mc_home, MC_FHL_INI_FILE); 
    701695        } 
    702         do_edit (fhlfile); 
     696        do_edit_at_line (fhlfile, 0); 
    703697    } 
    704698   g_free (fhlfile); 
    705699