ap_ getword — extract one word from a list of words
char *ap_ getword(pool *p, const char **line, char stop) char *ap_ getword_nc(pool *p, char **line, char stop)
Looks for the first occurrence of stop
in
*line
and copies everything before it to a new
buffer, which it returns. If *line
contains no
stop
s, the whole of *line
is
copied. *line
is updated to point after the
occurrence of stop
, skipping multiple instances of
stop
if present. ap_ getword_nc(
)
is a version of ap_ getword()
that
takes a nonconstant pointer. This is because some C compilers
complain if a char **
is passed to a function
expecting a const char **
.