fix frame walk in interpret.c::stackDumpStr()
[nedit-bw.git] / smartIndent-remove-statics.patch
blob7a72ebbb27b65b669695c7685bb70321f2c21654
1 Subject: smartIndent.c: remove statics
3 By comments in the code, reove static variables.
5 ---
7 source/smartIndent.c | 12 +++---------
8 1 file changed, 3 insertions(+), 9 deletions(-)
10 diff --quilt old/source/smartIndent.c new/source/smartIndent.c
11 --- old/source/smartIndent.c
12 +++ new/source/smartIndent.c
13 @@ -818,8 +818,7 @@ static void executeNewlineMacro(WindowIn
15 windowSmartIndentData *winData =
16 (windowSmartIndentData *)window->smartIndentData;
17 - /* posValue probably shouldn't be static due to re-entrance issues <slobasso> */
18 - static DataValue posValue = {INT_TAG, {0}};
19 + DataValue posValue = {INT_TAG, {0}};
20 DataValue result;
21 RestartData *continuation;
22 char *errMsg;
23 @@ -889,10 +888,7 @@ static void executeModMacro(WindowInfo *
25 windowSmartIndentData *winData =
26 (windowSmartIndentData *)window->smartIndentData;
27 - /* args probably shouldn't be static due to future re-entrance issues <slobasso> */
28 - static DataValue args[2] = {{INT_TAG, {0}}, {STRING_TAG, {0}}};
29 - /* after 5.2 release remove inModCB and use new winData->inModMacro value */
30 - static int inModCB = False;
31 + DataValue args[2] = {{INT_TAG, {0}}, {STRING_TAG, {0}}};
32 DataValue result;
33 RestartData *continuation;
34 char *errMsg;
35 @@ -900,7 +896,7 @@ static void executeModMacro(WindowInfo *
37 /* Check for inappropriate calls and prevent re-entering if the macro
38 makes a buffer modification */
39 - if (winData == NULL || winData->modMacro == NULL || inModCB)
40 + if (winData == NULL || winData->modMacro == NULL || winData->inModMacro)
41 return;
43 /* Call modification macro with the position of the modification,
44 @@ -909,7 +905,6 @@ static void executeModMacro(WindowInfo *
45 args[0].val.n = cbInfo->pos;
46 AllocNStringCpy(&args[1].val.str, cbInfo->charsTyped);
48 - inModCB = True;
49 ++(winData->inModMacro);
51 stat = ExecuteMacro(window, winData->modMacro, 2, args, &result,
52 @@ -918,7 +913,6 @@ static void executeModMacro(WindowInfo *
53 stat = ContinueMacro(continuation, &result, &errMsg);
55 --(winData->inModMacro);
56 - inModCB = False;
58 /* Process errors in macro execution */
59 if (stat == MACRO_PREEMPT || stat == MACRO_ERROR)