Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
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 @@
...
@@ -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>
...
...
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