aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons/constr_SET_OF.c
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2004-09-23 22:06:26 +0000
committerLev Walkin <vlm@lionet.info>2004-09-23 22:06:26 +0000
commitcc6a910ae4734c8731fb1d0cd1e7dc42ef211a42 (patch)
tree1c2bf241f2e07b9d407f449e07ffd5e2271d503e /skeletons/constr_SET_OF.c
parent06b8d7aa3355121c8810850972955374f884dc20 (diff)
pretty-printing
Diffstat (limited to 'skeletons/constr_SET_OF.c')
-rw-r--r--skeletons/constr_SET_OF.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/skeletons/constr_SET_OF.c b/skeletons/constr_SET_OF.c
index 0a8ee281..05567605 100644
--- a/skeletons/constr_SET_OF.c
+++ b/skeletons/constr_SET_OF.c
@@ -24,12 +24,13 @@
* if the V processor returns with "want more data" even if the buffer
* contains way more data than the V processor have seen.
*/
-#define SIZE_VIOLATION (ctx->left != -1 && (size_t)ctx->left <= size)
+#define SIZE_VIOLATION (ctx->left >= 0 && (size_t)ctx->left <= size)
/*
* This macro "eats" the part of the buffer which is definitely "consumed",
* i.e. was correctly converted into local representation or rightfully skipped.
*/
+#undef ADVANCE
#define ADVANCE(num_bytes) do { \
size_t num = num_bytes; \
ptr = ((char *)ptr) + num; \
@@ -42,6 +43,8 @@
/*
* Switch to the next phase of parsing.
*/
+#undef NEXT_PHASE
+#undef PHASE_OUT
#define NEXT_PHASE(ctx) do { \
ctx->phase++; \
ctx->step = 0; \
@@ -51,6 +54,7 @@
/*
* Return a standardized complex structure.
*/
+#undef RETURN
#define RETURN(_code) do { \
rval.code = _code; \
rval.consumed = consumed_myself;\