From 94308ce35b636c6941a4a11985aec2189cb4b9e8 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 14 May 2023 17:09:53 +0200 Subject: msg: enforce at least one word Also, move some stuff to net.c where it belongs. --- src/msg.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/msg.h') diff --git a/src/msg.h b/src/msg.h index e6541f4..158c5e6 100644 --- a/src/msg.h +++ b/src/msg.h @@ -12,8 +12,14 @@ struct msg; +int msg_from_argv(struct msg **, const char **argv); +void msg_free(struct msg *); + +int msg_copy(struct msg **, const struct msg *); + size_t msg_get_length(const struct msg *); const char **msg_get_words(const struct msg *); +const char *msg_get_first_word(const struct msg *); int msg_success(struct msg **); int msg_error(struct msg **); @@ -21,11 +27,6 @@ int msg_error(struct msg **); int msg_is_success(const struct msg *); int msg_is_error(const struct msg *); -int msg_copy(struct msg **, const struct msg *); -void msg_free(struct msg *); - -int msg_from_argv(struct msg **, const char **argv); - int msg_recv(int fd, struct msg **); int msg_send(int fd, const struct msg *); -- cgit v1.3