Commit 32d86ef9 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Align escapes

parent d9c05672
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
#include "parser.h" #include "parser.h"
#define ERRNO(code) REDIS_PARSER_##code #define ERRNO(code) REDIS_PARSER_##code
#define SET_ERRNO(code) do { \ #define SET_ERRNO(code) do { \
parser->errno = ERRNO(code); \ parser->errno = ERRNO(code); \
} while(0) } while(0)
/* The redis_protocol_t argument to the callback function must be provided by /* The redis_protocol_t argument to the callback function must be provided by
...@@ -61,25 +61,25 @@ static const char *errno_str[] = { ...@@ -61,25 +61,25 @@ static const char *errno_str[] = {
}; };
#undef _GEN #undef _GEN
#define STATE(st) \ #define STATE(st) \
case s_##st: \ case s_##st: \
l_##st: \ l_##st: \
state = s_##st; \ state = s_##st; \
if (pos >= end) { /* No more data */ \ if (pos >= end) { /* No more data */ \
goto finalize; \ goto finalize; \
} }
#define ADVANCE(bytes) do { \ #define ADVANCE(bytes) do { \
pos += (bytes); nread += (bytes); \ pos += (bytes); nread += (bytes); \
} while(0) } while(0)
#define MOVE(st) do { \ #define MOVE(st) do { \
goto l_##st; \ goto l_##st; \
} while(0) } while(0)
#define ADVANCE_AND_MOVE(st) do { \ #define ADVANCE_AND_MOVE(st) do { \
ADVANCE(1); \ ADVANCE(1); \
MOVE(st); \ MOVE(st); \
} while(0) } while(0)
#ifdef DEBUG #ifdef DEBUG
...@@ -89,9 +89,9 @@ static const char *state_str[] = { ...@@ -89,9 +89,9 @@ static const char *state_str[] = {
}; };
#undef _ENUM_GEN #undef _ENUM_GEN
#define LOG(fmt, ...) do { \ #define LOG(fmt, ...) do { \
fprintf(stderr, fmt "\n", __VA_ARGS__); \ fprintf(stderr, fmt "\n", __VA_ARGS__); \
fflush(stderr); \ fflush(stderr); \
} while(0) } while(0)
#include <ctype.h> #include <ctype.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment