MINOR: buffer: add a new file for ist + buffer manipulation functions
authorWilly Tarreau <w@1wt.eu>
Thu, 12 Jul 2018 07:02:47 +0000 (09:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 19 Jul 2018 14:23:43 +0000 (16:23 +0200)
commitea1b06d5bbc50baf9f2f50267131988b90245e20
tree069a7bc8818bc185b630ea1458d42c28e3087c6d
parent55372f646ff957c8adf45fc807bcfaa0709afd63
MINOR: buffer: add a new file for ist + buffer manipulation functions

The new file istbuf.h links the indirect strings (ist) with the buffers.
The purpose is to encourage addition of more standard buffer manipulation
functions that rely on this in order to improve the overall ease of use
along all the code. Just like ist.h and buf.h, this new file is not
expected to depend on anything beyond these two files.

A few functions were added and/or converted from buffer.h :
  - b_isteq()  : indicates if a buffer and a string match
  - b_isteat() : consumes a string from the buffer if it matches
  - b_istput() : appends a small string to a buffer (all or none)
  - b_putist() : appends part of a large string to a buffer

The equivalent functions were removed from buffer.h and changed at the
various call places.
include/common/buffer.h
include/common/istbuf.h [new file with mode: 0644]
src/mux_h2.c