Ticket #4032: 0003-Allow-info-flags-to-be-combined.patch

File 0003-Allow-info-flags-to-be-combined.patch, 1.5 KB (added by jpew, 4 years ago)

Allow mc information flags to be combined in a single invocation

  • src/args.c

    From 1ae307f822d27b7c15b30559844e8dc0fb97cd15 Mon Sep 17 00:00:00 2001
    From: Joshua Watt <JPEWhacker@gmail.com>
    Date: Tue, 12 Nov 2019 08:58:23 -0600
    Subject: [PATCH 3/3] Allow info flags to be combined
    
    Allows the various information flags available to mc (-V, -F, -f) to be
    combined so that all the information can be displayed in a single
    invocation of mc. For example, the command `mc -VF` will now show both
    the build time information and the data directory information in a
    single command.
    
    Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
    ---
     src/args.c | 10 ++++++----
     1 file changed, 6 insertions(+), 4 deletions(-)
    
    diff --git a/src/args.c b/src/args.c
    index 52f478c59..776e59a73 100644
    a b mc_args_parse (int *argc, char ***argv, const char *translation_domain, GError * 
    731731gboolean 
    732732mc_args_show_info (void) 
    733733{ 
     734    gboolean ret = TRUE; 
     735 
    734736    if (mc_args__show_version) 
    735737    { 
    736738        show_version (); 
    737         return FALSE; 
     739        ret = FALSE; 
    738740    } 
    739741 
    740742    if (mc_args__show_datadirs) 
    741743    { 
    742744        printf ("%s (%s)\n", mc_global.sysconfig_dir, mc_global.share_data_dir); 
    743         return FALSE; 
     745        ret = FALSE; 
    744746    } 
    745747 
    746748    if (mc_args__show_datadirs_extended) 
    747749    { 
    748750        show_datadirs_extended (); 
    749         return FALSE; 
     751        ret = FALSE; 
    750752    } 
    751753 
    752     return TRUE; 
     754    return ret; 
    753755} 
    754756 
    755757/* --------------------------------------------------------------------------------------------- */