aboutsummaryrefslogtreecommitdiff
path: root/src/irc.h
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-04-13 18:27:08 -0400
committerB. Watson <urchlay@slackware.uk>2026-04-13 18:27:20 -0400
commit66219401006e845f1a176e6a78c4682bd9de8785 (patch)
tree2b7426294a58069b4e8c1b06229682012685fdb9 /src/irc.h
parent5c3a3b18659a863f4983ab1579dc68333b429e08 (diff)
downloadfujinet-chat-66219401006e845f1a176e6a78c4682bd9de8785.tar.gz
Rewrite most of the txbuf_* functions in asm. 7803 bytes free.
Diffstat (limited to 'src/irc.h')
-rw-r--r--src/irc.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/irc.h b/src/irc.h
index 55f1d4d..013798a 100644
--- a/src/irc.h
+++ b/src/irc.h
@@ -10,22 +10,27 @@ extern unsigned char err;
extern unsigned char trip;
extern char reconnect_timeout;
+/**** these are in txbuf.s: */
+
/* clears the transmit buffer. */
void txbuf_init(void);
-
-/* these are in txbuf.s: */
+/* append \x01 (CTCP marker) character */
void txbuf_append_01(void);
+/* append a space */
void txbuf_append_spc(void);
+/* append an arbitrary character */
void txbuf_append_chr(char c);
-
/* appends a string to the transmit buffer, updates txbuflen. */
void txbuf_append_str(const char *str);
-/* convenience macro */
-#define txbuf_append_str2(s1, s2) do { txbuf_append_str(s1); txbuf_append_str(s2); } while(0)
-
/* clears the transmit buffer, then appends a string to it. */
-/* turning into a macro bloats the code */
void txbuf_set_str(const char *str);
+/* sends a string. clears transmit buffer first, then clears it again on exit. */
+void txbuf_send_str(const char *str);
+
+/****************************/
+
+/* convenience macro */
+#define txbuf_append_str2(s1, s2) do { txbuf_append_str(s1); txbuf_append_str(s2); } while(0)
/* as txbuf_set_str(), but multiple strings. */
/* making them macros actually makes the code smaller. */
@@ -36,9 +41,6 @@ void txbuf_set_str(const char *str);
in the buffer, nothing gets sent. */
void txbuf_send(void);
-/* sends a string. clears transmit buffer first, then clears it again on exit. */
-void txbuf_send_str(const char *str);
-
void print_error(unsigned char err);
/* does exactly what you think */