summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-08-26 21:51:37 -0400
committerPaul Duncan <pabs@pablotron.org>2016-08-26 21:51:37 -0400
commit23661f102f363ae9e783afb06cf5d0b8474fdc16 (patch)
tree995c8446b323dbf7be09f724f30420a81399daf5
parente1c4626dc792f9ff0fa1916e5445157f30de1db5 (diff)
downloadlibfhp-23661f102f363ae9e783afb06cf5d0b8474fdc16.tar.bz2
libfhp-23661f102f363ae9e783afb06cf5d0b8474fdc16.zip
whitespace
-rw-r--r--fhp.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fhp.c b/fhp.c
index 428fc38..7b95722 100644
--- a/fhp.c
+++ b/fhp.c
@@ -123,7 +123,7 @@ fhp_strerror(
size_t err_len = strlen(fhp_errors[err]) + 1;
if (len < err_len)
return FHP_ERR_BUFFER_TOO_SMALL;
-
+
// copy string
memcpy(buf, fhp_errors[err], err_len);
@@ -471,7 +471,7 @@ retry:
// FIXME: invalid character
return FHP_ERR_INVALID_CHAR;
}
-
+
break;
case FHP_STATE_HEADER_NAME_END:
switch (byte) {
@@ -517,21 +517,23 @@ retry:
case '\n':
fhp->state = FHP_STATE_HEADER_VALUE_END;
break;
- default:
+ default:
return FHP_ERR_INVALID_CHAR;
}
-
+
break;
case FHP_STATE_HEADER_VALUE_END:
switch (byte) {
CASE_OWS_CHARS
// ows-fold
-
+
// add to buffer
if (!fhp_buf_push(fhp, FHP_TOKEN_HEADER_VALUE_FRAGMENT, ' '))
return FHP_ERR_CB;
+ // set state
fhp->state = FHP_STATE_HEADER_VALUE;
+
break;
CASE_TOKEN_CHARS
// flush buffer
@@ -598,6 +600,7 @@ retry:
break;
case FHP_STATE_HEADERS_END:
// TODO
+
break;
default:
// FIXME: invalid state