Ticket #2097: 2097-some-unused-in-mc-4.7.1-lines-2.diff

File 2097-some-unused-in-mc-4.7.1-lines-2.diff, 6.7 KB (added by vit_r, 15 years ago)

some-unused-in-mc-4.7.1-lines-2

  • lib/skin/colors.c

    diff -urN mc-4.7.1-old/lib/skin/colors.c mc-4.7.1-new/lib/skin/colors.c
    old new  
    308308        if (keys == NULL) 
    309309            continue; 
    310310 
    311         if(*keys == NULL) { 
    312             g_strfreev (keys); 
    313             continue; 
    314         } 
    315  
    316311        for (; *keys; keys++) { 
    317312            mc_skin_color = mc_skin_color_get_from_ini_file (mc_skin, *groups, *keys); 
    318313            if (mc_skin_color != NULL) 
  • lib/skin/common.c

    diff -urN mc-4.7.1-old/lib/skin/common.c mc-4.7.1-new/lib/skin/common.c
    old new  
    4242 
    4343/*** file scope variables ************************************************************************/ 
    4444 
    45 static gboolean mc_skin_is_init = FALSE; 
    46  
    4745/* --------------------------------------------------------------------------------------------- */ 
    4846/*** file scope functions ************************************************************************/ 
    4947/* --------------------------------------------------------------------------------------------- */ 
     
    109107        mc_skin_reinit (); 
    110108        mc_skin_set_hardcoded_skin (&mc_skin__default); 
    111109    } 
    112  
    113110} 
    114111 
    115112/* --------------------------------------------------------------------------------------------- */ 
     
    148145        (void) mc_skin_ini_file_parse (&mc_skin__default); 
    149146        is_good_init = FALSE; 
    150147    } 
    151     mc_skin_is_init = TRUE; 
    152148    return is_good_init; 
    153149} 
    154150 
     
    170166        mc_config_deinit (mc_skin__default.config); 
    171167        mc_skin__default.config = NULL; 
    172168    } 
    173  
    174     mc_skin_is_init = FALSE; 
    175169} 
    176170 
    177171/* --------------------------------------------------------------------------------------------- */ 
  • lib/vfs/mc-vfs/undelfs.c

    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  
    289289    return 0; 
    290290} 
    291291 
    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  
    311292static void * 
    312293undelfs_opendir (struct vfs_class *me, const char *dirname) 
    313294{ 
     
    362343    return 0; 
    363344} 
    364345 
    365  
    366346static void * 
    367347undelfs_readdir (void *vfs_info) 
    368348{ 
  • lib/vfs/mc-vfs/vfs.c

    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  
    470470                    } 
    471471                    str_close_conv (coder); 
    472472                    return state; 
    473                 } else { 
    474                     errno = EINVAL; 
    475                     return ESTR_FAILURE; 
    476473                } 
    477                 break; 
    478474            default: 
    479475                errno = EINVAL; 
    480476                return ESTR_FAILURE; 
  • src/listmode.c

    diff -urN mc-4.7.1-old/src/listmode.c mc-4.7.1-new/src/listmode.c
    old new  
    3636#include <unistd.h> 
    3737 
    3838#include "lib/global.h" 
    39 #include "tty.h" 
    40 #include "key.h" 
    41 #include "color.h" 
    4239#include "dialog.h" 
    4340#include "widget.h" 
    4441#include "wtools.h" 
  • src/main.c

    diff -urN mc-4.7.1-old/src/main.c mc-4.7.1-new/src/main.c
    old new  
    15851585        if (parm == '\n') { 
    15861586            size_t i; 
    15871587 
    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 
    15911590            if (cmdline->buffer[i]) { 
    15921591                send_message ((Widget *) cmdline, WIDGET_KEY, parm); 
    15931592                return MSG_HANDLED; 
     
    22002199        application_keypad_mode (); 
    22012200 
    22022201#ifdef HAVE_SUBSHELL_SUPPORT 
    2203     if (use_subshell) { 
     2202    if (use_subshell) 
    22042203        mc_prompt = strip_ctrl_codes (subshell_prompt); 
    2205         if (mc_prompt == NULL) 
    2206             mc_prompt = (geteuid () == 0) ? "# " : "$ "; 
    2207     } else 
    22082204#endif                          /* HAVE_SUBSHELL_SUPPORT */ 
     2205    if (mc_prompt == NULL) 
    22092206        mc_prompt = (geteuid () == 0) ? "# " : "$ "; 
    22102207 
    22112208    /* Program main loop */ 
  • src/panelize.c

    diff -urN mc-4.7.1-old/src/panelize.c mc-4.7.1-new/src/panelize.c
    old new  
    398398    dir_list *list = &current_panel->dir; 
    399399    char line [MC_MAXPATHLEN]; 
    400400    char *name; 
    401     FILE *external; 
     401    FILE *eksternal; 
    402402 
    403403    open_error_pipe (); 
    404     external = popen (command, "r"); 
    405     if (!external){ 
     404    eksternal = popen (command, "r"); 
     405    if (eksternal == NULL) { 
    406406        close_error_pipe (D_ERROR, _("Cannot invoke command.")); 
    407407        return; 
    408408    } 
     
    410410    panel_clean_dir (current_panel); 
    411411 
    412412    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) 
    416416                continue; 
    417417            else 
    418418                break; 
     
    455455    } else { 
    456456        current_panel->count = set_zero_dir (list) ? 1 : 0; 
    457457    } 
    458     if (pclose (external) < 0) 
     458    if (pclose (eksternal) < 0) 
    459459        message (D_NORMAL, _("External panelize"), _("Pipe close failed")); 
    460460    close_error_pipe (D_NORMAL, NULL); 
    461461    try_to_select (current_panel, NULL); 
  • src/widget.c

    diff -urN mc-4.7.1-old/src/widget.c mc-4.7.1-new/src/widget.c
    old new  
    740740void 
    741741label_set_text (WLabel *label, const char *text) 
    742742{ 
    743     int newcols = label->widget.cols; 
     743    int newcols; 
    744744    int newlines; 
    745745 
     746    if (label == NULL)  
     747        return;  
     748 
     749    newcols = label->widget.cols; 
    746750    if (label->text && text && !strcmp (label->text, text)) 
    747751        return; /* Flickering is not nice */ 
    748752 
     
    753757        if (label->auto_adjust_cols) { 
    754758            str_msg_term_size (text, &newlines, &newcols); 
    755759            if (newcols > label->widget.cols) 
    756             label->widget.cols = newcols; 
     760                label->widget.cols = newcols; 
     761 
    757762            if (newlines > label->widget.lines) 
    758763                label->widget.lines = newlines; 
    759764        }