Minor code formatting clean-up.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
diff --git a/md4c/md4c.c b/md4c/md4c.c
index f5a094e..8737eba 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -373,89 +373,89 @@ md_text_with_null_replacement(MD_CTX* ctx, MD_TEXTTYPE type, const CHAR* str, SZ
}
-#define MD_CHECK(func) \
- do { \
- ret = (func); \
- if(ret < 0) \
- goto abort; \
+#define MD_CHECK(func) \
+ do { \
+ ret = (func); \
+ if(ret < 0) \
+ goto abort; \
} while(0)
-#define MD_TEMP_BUFFER(sz) \
- do { \
- if(sz > ctx->alloc_buffer) { \
- CHAR* new_buffer; \
- SZ new_size = ((sz) + (sz) / 2 + 128) & ~127; \
- \
- new_buffer = realloc(ctx->buffer, new_size); \
- if(new_buffer == NULL) { \
- MD_LOG("realloc() failed."); \
- ret = -1; \
- goto abort; \
- } \
- \
- ctx->buffer = new_buffer; \
- ctx->alloc_buffer = new_size; \
- } \
+#define MD_TEMP_BUFFER(sz) \
+ do { \
+ if(sz > ctx->alloc_buffer) { \
+ CHAR* new_buffer; \
+ SZ new_size = ((sz) + (sz) / 2 + 128) & ~127; \
+ \
+ new_buffer = realloc(ctx->buffer, new_size); \
+ if(new_buffer == NULL) { \
+ MD_LOG("realloc() failed."); \
+ ret = -1; \
+ goto abort; \
+ } \
+ \
+ ctx->buffer = new_buffer; \
+ ctx->alloc_buffer = new_size; \
+ } \
} while(0)
-#define MD_ENTER_BLOCK(type, arg) \
- do { \
- ret = ctx->parser.enter_block((type), (arg), ctx->userdata); \
- if(ret != 0) { \
- MD_LOG("Aborted from enter_block() callback."); \
- goto abort; \
- } \
+#define MD_ENTER_BLOCK(type, arg) \
+ do { \
+ ret = ctx->parser.enter_block((type), (arg), ctx->userdata); \
+ if(ret != 0) { \
+ MD_LOG("Aborted from enter_block() callback."); \
+ goto abort; \
+ } \
} while(0)
-#define MD_LEAVE_BLOCK(type, arg) \
- do { \
- ret = ctx->parser.leave_block((type), (arg), ctx->userdata); \
- if(ret != 0) { \
- MD_LOG("Aborted from leave_block() callback."); \
- goto abort; \
- } \
+#define MD_LEAVE_BLOCK(type, arg) \
+ do { \
+ ret = ctx->parser.leave_block((type), (arg), ctx->userdata); \
+ if(ret != 0) { \
+ MD_LOG("Aborted from leave_block() callback."); \
+ goto abort; \
+ } \
} while(0)
-#define MD_ENTER_SPAN(type, arg) \
- do { \
- ret = ctx->parser.enter_span((type), (arg), ctx->userdata); \
- if(ret != 0) { \
- MD_LOG("Aborted from enter_span() callback."); \
- goto abort; \
- } \
+#define MD_ENTER_SPAN(type, arg) \
+ do { \
+ ret = ctx->parser.enter_span((type), (arg), ctx->userdata); \
+ if(ret != 0) { \
+ MD_LOG("Aborted from enter_span() callback."); \
+ goto abort; \
+ } \
} while(0)
-#define MD_LEAVE_SPAN(type, arg) \
- do { \
- ret = ctx->parser.leave_span((type), (arg), ctx->userdata); \
- if(ret != 0) { \
- MD_LOG("Aborted from leave_span() callback."); \
- goto abort; \
- } \
+#define MD_LEAVE_SPAN(type, arg) \
+ do { \
+ ret = ctx->parser.leave_span((type), (arg), ctx->userdata); \
+ if(ret != 0) { \
+ MD_LOG("Aborted from leave_span() callback."); \
+ goto abort; \
+ } \
} while(0)
-#define MD_TEXT(type, str, size) \
- do { \
- if(size > 0) { \
- ret = ctx->parser.text((type), (str), (size), ctx->userdata); \
- if(ret != 0) { \
- MD_LOG("Aborted from text() callback."); \
- goto abort; \
- } \
- } \
+#define MD_TEXT(type, str, size) \
+ do { \
+ if(size > 0) { \
+ ret = ctx->parser.text((type), (str), (size), ctx->userdata); \
+ if(ret != 0) { \
+ MD_LOG("Aborted from text() callback."); \
+ goto abort; \
+ } \
+ } \
} while(0)
-#define MD_TEXT_INSECURE(type, str, size) \
- do { \
- if(size > 0) { \
- ret = md_text_with_null_replacement(ctx, type, str, size); \
- if(ret != 0) { \
- MD_LOG("Aborted from text() callback."); \
- goto abort; \
- } \
- } \
+#define MD_TEXT_INSECURE(type, str, size) \
+ do { \
+ if(size > 0) { \
+ ret = md_text_with_null_replacement(ctx, type, str, size); \
+ if(ret != 0) { \
+ MD_LOG("Aborted from text() callback."); \
+ goto abort; \
+ } \
+ } \
} while(0)