macro.c (119610) | macro.c (157184) |
---|---|
1/* macro.c -- keyboard macros for readline. */ 2 3/* Copyright (C) 1994 Free Software Foundation, Inc. 4 5 This file is part of the GNU Readline Library, a library for 6 reading lines of text with interactive input and history editing. 7 8 The GNU Readline Library is free software; you can redistribute it --- 86 unchanged lines hidden (view full) --- 95 RL_SETSTATE(RL_STATE_MACROINPUT); 96} 97 98/* Return the next character available from a macro, or 0 if 99 there are no macro characters. */ 100int 101_rl_next_macro_key () 102{ | 1/* macro.c -- keyboard macros for readline. */ 2 3/* Copyright (C) 1994 Free Software Foundation, Inc. 4 5 This file is part of the GNU Readline Library, a library for 6 reading lines of text with interactive input and history editing. 7 8 The GNU Readline Library is free software; you can redistribute it --- 86 unchanged lines hidden (view full) --- 95 RL_SETSTATE(RL_STATE_MACROINPUT); 96} 97 98/* Return the next character available from a macro, or 0 if 99 there are no macro characters. */ 100int 101_rl_next_macro_key () 102{ |
103 int c; 104 |
|
103 if (rl_executing_macro == 0) 104 return (0); 105 106 if (rl_executing_macro[executing_macro_index] == 0) 107 { 108 _rl_pop_executing_macro (); 109 return (_rl_next_macro_key ()); 110 } 111 | 105 if (rl_executing_macro == 0) 106 return (0); 107 108 if (rl_executing_macro[executing_macro_index] == 0) 109 { 110 _rl_pop_executing_macro (); 111 return (_rl_next_macro_key ()); 112 } 113 |
114#if defined (READLINE_CALLBACKS) 115 c = rl_executing_macro[executing_macro_index++]; 116 if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_ISSTATE (RL_STATE_READCMD) && rl_executing_macro[executing_macro_index] == 0) 117 _rl_pop_executing_macro (); 118 return c; 119#else |
|
112 return (rl_executing_macro[executing_macro_index++]); | 120 return (rl_executing_macro[executing_macro_index++]); |
121#endif |
|
113} 114 115/* Save the currently executing macro on a stack of saved macros. */ 116void 117_rl_push_executing_macro () 118{ 119 struct saved_macro *saver; 120 --- 142 unchanged lines hidden --- | 122} 123 124/* Save the currently executing macro on a stack of saved macros. */ 125void 126_rl_push_executing_macro () 127{ 128 struct saved_macro *saver; 129 --- 142 unchanged lines hidden --- |