pushString: remove unused variables
[nedit-bw.git] / smartIndent-remove-statics.patch
blob5df25f16ff7ce830ab52e390a15ac5ec5b49a276
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 @@ -821,8 +821,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 @@ -892,10 +891,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 @@ -903,7 +899,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 @@ -912,7 +908,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 @@ -921,7 +916,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)