aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-04-05 19:59:30 -0400
committerB. Watson <urchlay@slackware.uk>2026-04-05 19:59:30 -0400
commit900eb9bca18f57531bc74d3a5f5b5e87870cd1ae (patch)
tree5ee6d1047444e9e2473945e2df6025897a89d16a /src/irc.c
parent06bdd272adb09ae5b55a068dfa879ce005cf4748 (diff)
downloadfujinet-chat-900eb9bca18f57531bc74d3a5f5b5e87870cd1ae.tar.gz
Replace cc65 lib isdigit() and atoi() with less bloated isnum() and a2uint().
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/irc.c b/src/irc.c
index e518205..e581e94 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -1,7 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <ctype.h>
#include "irc.h"
#include "screen.h"
@@ -123,7 +122,7 @@ static void print_ping_time(char *p) {
static unsigned int sec, frac;
now = read_rtclok();
- pingtime = (unsigned int)atoi(p);
+ pingtime = (unsigned int)a2uint(p);
/* correct for rtclock rollover (every ~9 mins) */
if(now < pingtime) now |= 0x8000;
@@ -384,7 +383,7 @@ static void do_forward_chan(void) {
static void do_numeric(void) {
static unsigned int num;
- num = atoi(msg_cmd);
+ num = a2uint(msg_cmd);
switch(num) {
/* use the server's idea of what our nick is, in case it got
@@ -559,7 +558,7 @@ static void dispatch_msg(void) {
} else {
do_server_pong();
}
- } else if(isdigit(msg_cmd[0])) {
+ } else if(isnum(msg_cmd[0])) {
do_numeric();
} else {
do_catchall(0);