add newTabTab.patch
[nedit-bw.git] / macro_c-macro-cleanup.patch
blob866c324dc157e4db9141f5fc4767ad3afa5a71c9
1 Subject: macro.c: macro cleanup
3 ---
5 source/macro.c | 17 ++++++++++++++---
6 1 file changed, 14 insertions(+), 3 deletions(-)
8 diff --quilt old/source/macro.c new/source/macro.c
9 --- old/source/macro.c
10 +++ new/source/macro.c
11 @@ -108,9 +108,20 @@ static const char CVSID[] = "$Id: macro.
13 /* The following definitions cause an exit from the macro with a message */
14 /* added if (1) to remove compiler warnings on solaris */
15 -#define M_FAILURE(s) do { *errMsg = s; if (1) return False; } while (0)
16 -#define M_STR_ALLOC_ASSERT(xDV) do { if (xDV.tag == STRING_TAG && !xDV.val.str.rep) { *errMsg = "Failed to allocate value: %s"; return(False); } } while (0)
17 -#define M_ARRAY_INSERT_FAILURE() M_FAILURE("array element failed to insert: %s")
18 +#define M_FAILURE(s) \
19 + do { \
20 + *errMsg = s; \
21 + if (1) return False; \
22 + } while (0)
23 +#define M_STR_ALLOC_ASSERT(xDV) \
24 + do { \
25 + if ((xDV).tag == STRING_TAG && !(xDV).val.str.rep) \
26 + M_FAILURE("Failed to allocate string: %s"); \
27 + } while (0)
28 +#define M_ARRAY_INSERT_FAILURE() \
29 + do { \
30 + M_FAILURE("Failed to insert array element: %s"); \
31 + } while (0)
33 /* Data attached to window during shell command execution with
34 information for controling and communicating with the process */