Ticket #3547: mc-3547-clarify-macro-variables-for-use_internal_edit.patch

File mc-3547-clarify-macro-variables-for-use_internal_edit.patch, 2.2 KB (added by and, 7 years ago)
  • src/main.c

    From bb6c2628ce4320f95168d37ebdd2ca3a93ba3b99 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Fri, 1 Jan 2016 20:19:47 +0000
    Subject: [PATCH] clarify macro variables for use_internal_edit
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     src/main.c  | 4 ++++
     src/setup.c | 2 ++
     src/setup.h | 2 ++
     3 files changed, 8 insertions(+)
    
    diff --git a/src/main.c b/src/main.c
    index 060f31b..492980b 100644
    a b main (int argc, char *argv[]) 
    351351 
    352352    load_keymap_defs (!mc_args__nokeymap); 
    353353 
     354#ifdef USE_INTERNAL_EDIT 
    354355    macros_list = g_array_new (TRUE, FALSE, sizeof (macros_t)); 
     356#endif /* USE_INTERNAL_EDIT */ 
    355357 
    356358    tty_init_colors (mc_global.tty.disable_colors, mc_args__force_colors); 
    357359 
    main (int argc, char *argv[]) 
    450452 
    451453    done_key (); 
    452454 
     455#ifdef USE_INTERNAL_EDIT 
    453456    if (macros_list != NULL) 
    454457    { 
    455458        guint i; 
    main (int argc, char *argv[]) 
    464467        } 
    465468        (void) g_array_free (macros_list, TRUE); 
    466469    } 
     470#endif /* USE_INTERNAL_EDIT */ 
    467471 
    468472    str_uninit_strings (); 
    469473 
  • src/setup.c

    diff --git a/src/setup.c b/src/setup.c
    index 542d16c..3f6a38e 100644
    a b int quit = 0; 
    203203/* Set to TRUE to suppress printing the last directory */ 
    204204int print_last_revert = FALSE; 
    205205 
     206#ifdef USE_INTERNAL_EDIT 
    206207/* index to record_macro_buf[], -1 if not recording a macro */ 
    207208int macro_index = -1; 
    208209 
    int macro_index = -1; 
    210211struct macro_action_t record_macro_buf[MAX_MACRO_LENGTH]; 
    211212 
    212213GArray *macros_list; 
     214#endif /* USE_INTERNAL_EDIT */ 
    213215 
    214216/*** file scope macro definitions ****************************************************************/ 
    215217 
  • src/setup.h

    diff --git a/src/setup.h b/src/setup.h
    index 20ef2eb..169c635 100644
    a b extern int quit; 
    126126/* Set to TRUE to suppress printing the last directory */ 
    127127extern gboolean print_last_revert; 
    128128 
     129#ifdef USE_INTERNAL_EDIT 
    129130/* index to record_macro_buf[], -1 if not recording a macro */ 
    130131extern int macro_index; 
    131132 
    extern int macro_index; 
    133134extern struct macro_action_t record_macro_buf[MAX_MACRO_LENGTH]; 
    134135 
    135136extern GArray *macros_list; 
     137#endif /* USE_INTERNAL_EDIT */ 
    136138 
    137139extern int saving_setup; 
    138140