diff --git a/README b/README index ed94734..5a2eeaf 100644 --- a/README +++ b/README @@ -18,11 +18,10 @@ TECHNICALS int parsme(char **buff, /* out */ struct httpars *pars); Library is designed to follow source input unaltering. - Which means, that it does not directly alter the input - data or strings while storing the information of all - parsed results on the stack or as pointers to specific - parts of the source data. This allows to provide it - with input that resides both within the stack or heap. + Which suggests, that it does not directly alter the input + data or strings while giving users the ability to + store the parsed information (struct httpars) either on the + stack or heap. LEAKS diff --git a/tinyparser.c b/tinyparser.c index 4ca407b..a882747 100644 --- a/tinyparser.c +++ b/tinyparser.c @@ -62,7 +62,7 @@ void fretres(void) { free(header_tree); } -int read_line(char **buff, char **buff_lim) { +int readlin(char **buff, char **buff_lim) { int diff = 0; if ((*buff) >= (*buff_lim)) { return diff; @@ -203,7 +203,7 @@ int parsme(char *buff, struct httpars *pars) { char *buff_lim = buff+strlen(buff); char *title_offset = buff; - int title_len = read_line(&buff, &buff_lim); + int title_len = readlin(&buff, &buff_lim); if ((ret = parstitle(title_offset, title_len, &pars->titl)) < 0) { fprintf(stderr, "Failed parsing title\n"); return -1; @@ -211,7 +211,7 @@ int parsme(char *buff, struct httpars *pars) { for (int bound = 0; bound < MAX_BOUND; bound++) { char *header_offset = buff; - int header_len = read_line(&buff, &buff_lim); + int header_len = readlin(&buff, &buff_lim); char *header_limit = header_offset+header_len; // IF END OF MESSAGE