diff options
author | Anton Kling <anton@kling.gg> | 2024-03-19 01:41:22 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-03-19 01:41:22 +0100 |
commit | 553b43d2e563dcff74d4c86904fa3737e96d7365 (patch) | |
tree | 002b70c9d919b8a18a95bb5754c57db897b5977e /userland/irc/sb.h | |
parent | 0dccff86e50dfe1555b8bc29862dba2b972a3705 (diff) |
IRC: Add the IRC client I am working on
Diffstat (limited to 'userland/irc/sb.h')
-rw-r--r-- | userland/irc/sb.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/userland/irc/sb.h b/userland/irc/sb.h new file mode 100644 index 0000000..aad5806 --- /dev/null +++ b/userland/irc/sb.h @@ -0,0 +1,22 @@ +#ifndef SB_H +#define SB_H +#include "sv.h" +#include <stddef.h> + +struct sb { + char *string; + size_t length; + size_t capacity; +}; + +struct sv; + +void sb_init(struct sb *ctx); +void sb_free(struct sb *ctx); +void sb_reset(struct sb *ctx); +int sb_isempty(const struct sb *ctx); +void sb_append_char(struct sb *ctx, char c); +int sb_delete_right(struct sb *ctx, int n); +void sb_append(struct sb *ctx, const char *s); +void sb_append_sv(struct sb *ctx, struct sv sv); +#endif |