Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
32d86ef9
Commit
32d86ef9
authored
Jul 14, 2011
by
Pieter Noordhuis
Browse files
Align escapes
parent
d9c05672
Changes
1
Hide whitespace changes
Inline
Side-by-side
parser.c
View file @
32d86ef9
...
...
@@ -6,8 +6,8 @@
#include "parser.h"
#define ERRNO(code) REDIS_PARSER_##code
#define SET_ERRNO(code) do { \
parser->errno = ERRNO(code); \
#define SET_ERRNO(code) do {
\
parser->errno = ERRNO(code);
\
} while(0)
/* The redis_protocol_t argument to the callback function must be provided by
...
...
@@ -61,25 +61,25 @@ static const char *errno_str[] = {
};
#undef _GEN
#define STATE(st) \
case s_##st: \
l_##st: \
state = s_##st; \
if (pos >= end) {
/* No more data */
\
goto finalize; \
#define STATE(st)
\
case s_##st:
\
l_##st:
\
state = s_##st;
\
if (pos >= end) {
/* No more data */
\
goto finalize;
\
}
#define ADVANCE(bytes) do { \
pos += (bytes); nread += (bytes); \
#define ADVANCE(bytes) do {
\
pos += (bytes); nread += (bytes);
\
} while(0)
#define MOVE(st) do { \
goto l_##st; \
#define MOVE(st) do {
\
goto l_##st;
\
} while(0)
#define ADVANCE_AND_MOVE(st) do { \
ADVANCE(1); \
MOVE(st); \
#define ADVANCE_AND_MOVE(st) do {
\
ADVANCE(1);
\
MOVE(st);
\
} while(0)
#ifdef DEBUG
...
...
@@ -89,9 +89,9 @@ static const char *state_str[] = {
};
#undef _ENUM_GEN
#define LOG(fmt, ...) do { \
fprintf(stderr, fmt "\n", __VA_ARGS__); \
fflush(stderr); \
#define LOG(fmt, ...) do {
\
fprintf(stderr, fmt "\n", __VA_ARGS__);
\
fflush(stderr);
\
} while(0)
#include <ctype.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment