diff options
author | djm@openbsd.org <djm@openbsd.org> | 2021-06-08 06:54:40 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2021-06-08 17:12:51 +1000 |
commit | aae4b4d3585b9f944d7dbd3c9e5ba0006c55e457 (patch) | |
tree | bfc547a420b24ea48a15030057fd6a1662fd2de0 /misc.h | |
parent | da9f9acaac5bab95dca642b48e0c8182b246ab69 (diff) | |
download | openssh-git-aae4b4d3585b9f944d7dbd3c9e5ba0006c55e457.tar.gz |
upstream: Allow argv_split() to optionally terminate tokenisation
when it encounters an unquoted comment.
Add some additional utility function for working with argument
vectors, since we'll be switching to using them to parse
ssh/sshd_config shortly.
ok markus@ as part of a larger diff; tested in snaps
OpenBSD-Commit-ID: fd9c108cef2f713f24e3bc5848861d221bb3a1ac
Diffstat (limited to 'misc.h')
-rw-r--r-- | misc.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: misc.h,v 1.96 2021/06/04 05:02:40 djm Exp $ */ +/* $OpenBSD: misc.h,v 1.97 2021/06/08 06:54:40 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -45,6 +45,7 @@ struct ForwardOptions { /* misc.c */ char *chop(char *); +void rtrim(char *); void skip_space(char **); char *strdelim(char **); char *strdelimw(char **); @@ -178,8 +179,12 @@ void child_set_env(char ***envp, u_int *envsizep, const char *name, const char *lookup_env_in_list(const char *env, char * const *envs, size_t nenvs); -int argv_split(const char *, int *, char ***); +int argv_split(const char *, int *, char ***, int); char *argv_assemble(int, char **argv); +char *argv_next(int *, char ***); +void argv_consume(int *); +void argv_free(char **, int); + int exited_cleanly(pid_t, const char *, const char *, int); struct stat; |