From 429938fa67beef12eb348dec04d748ab58b00678 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 29 Mar 2026 23:36:44 -0400 Subject: Banish itoa(), save 170 bytes. --- src/irc.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/irc.c') diff --git a/src/irc.c b/src/irc.c index 58e421f..f0f386f 100644 --- a/src/irc.c +++ b/src/irc.c @@ -133,19 +133,10 @@ static void print_ping_time(char *p) { scr_print_active("*** "); scr_print_active(msg_src); scr_print_active(" lag: "); - itoa(sec, numbuf, 10); - scr_print_active(numbuf); + scr_act_printnum(sec); scr_putc_active('.'); - itoa(frac, numbuf, 10); - scr_print_active(numbuf); + scr_act_printnum(frac); scr_putc_active('s'); - - /* - // for debugging: - scr_putc_active(' '); - itoa(pingtime, numbuf, 10); - scr_print_active(numbuf); - */ } static void do_server_pong(void) { @@ -679,12 +670,10 @@ static void irc_split_Lines(void) { } } -/* TODO: there needs to be a scr_printnum() */ void print_errnum(void) { extern unsigned char err; scr_print_current("Error #"); - itoa(err, numbuf, 10); - scr_print_current(numbuf); + scr_cur_printnum(err); } static void start_minute_timer() { -- cgit v1.2.3