diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2019-11-15 19:14:11 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2019-11-15 19:14:11 +0300 |
commit | 42bb3d37c156df14560347d4c7df3f0dd0551389 (patch) | |
tree | c38f35e836d0b8193246dce6ff2ce489f5ca9026 /src/multipart.c | |
parent | 32c1fbd2cf779a65e807d0d82412ffffa2401962 (diff) | |
download | magi-42bb3d37c156df14560347d4c7df3f0dd0551389.tar magi-42bb3d37c156df14560347d4c7df3f0dd0551389.tar.xz magi-42bb3d37c156df14560347d4c7df3f0dd0551389.zip |
.
Diffstat (limited to 'src/multipart.c')
-rw-r--r-- | src/multipart.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/multipart.c b/src/multipart.c index 7847a41..6ab1258 100644 --- a/src/multipart.c +++ b/src/multipart.c @@ -433,8 +433,9 @@ static enum st parse_end(struct automata * a, char c) /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Automata Runner */ -static int run_automata(struct automata * a, int (*next)(void * thing), - void * thing) +static int run_automata(struct automata * a, + int (*next)(void * thing), + void * thing) { int ok = 1; enum st state = st_begin; @@ -485,13 +486,16 @@ static int run_automata(struct automata * a, int (*next)(void * thing), * Automata Interfaces */ int magi_parse_multipart(struct magi_field_list ** list, - int (*get_next)(void *), void * get_next_arg, + int (*get_next)(void *), + void * get_next_arg, char * boundary, void (*callback)(struct magi_field * field, - char * buffer, int len)) + char * buffer, + int len)) { - struct automata a - = { 0, { 0, 0, 0 }, { 0, 0 }, 0, 0, 1, 0, 0, 2, 0, 0, 0 }; + struct automata a = { + 0, { 0, 0, 0 }, { 0, 0 }, 0, 0, 1, 0, 0, 2, 0, 0, 0 + }; int ok = 0; a.list = list; a.boundary = boundary; |