diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/irc.c | 3 | ||||
| -rw-r--r-- | src/main.c | 20 |
2 files changed, 10 insertions, 13 deletions
@@ -620,7 +620,7 @@ int irc_read(void) { } // Get # of bytes waiting, no more than size of rx_buf - rxbuflen = OS.dvstat[1] * 256 + OS.dvstat[0]; + rxbuflen = (OS.dvstat[1] << 8) | OS.dvstat[0]; if(rxbuflen > MAX_MSG) rxbuflen = MAX_MSG; @@ -628,7 +628,6 @@ int irc_read(void) { if(rxbuflen > 0) { err = nread(url, rx_buf, rxbuflen); if(err != 1) { - scr_print_current("READ ERROR: "); print_errnum(); return 0; } @@ -9,26 +9,24 @@ #define DEF_CHANNEL "##atari" #include <atari.h> -#include <stdbool.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <ctype.h> -#include <conio.h> // for kbhit() and cgetc() -// #include "conio.h" // our local one. +#include <conio.h> // for cgetc() only #include "nio.h" #include "irc.h" #include "screen.h" #include "edbox.h" -char url[256] = DEF_URL; // URL -char usernick[32] = DEF_NICK; +char url[256] = DEF_URL; // URL. +char usernick[32] = DEF_NICK; // our current nick (can be changed by the server) unsigned char err; // error code of last operation. -unsigned char trip=0; // if trip=1, fujinet is asking us for attention. -bool old_enabled=false; // were interrupts enabled for old vector -void* old_vprced; // old PROCEED vector, restored on exit. -unsigned short rxbuflen; -unsigned int txbuflen; // TX buffer length +unsigned char trip = 0; // if trip == 1, fujinet is asking us for attention. +char old_enabled = 0; // were interrupts enabled for old vector +void *old_vprced; // old PROCEED vector, restored on exit. +unsigned short rxbuflen; // RX buffer length +unsigned int txbuflen; // TX buffer length char hz; /* 50 for PAL, 60 for NSTC */ /* TODO: user modes (default +iw), fg/bg color... */ @@ -89,7 +87,7 @@ void txbuf_set_str3(const char *s1, const char *s2, const char *s3) { } void txbuf_send(void) { - /* don't sent empty buffer */ + /* don't send empty buffer */ if(!txbuflen) return; /* always terminate with EOL */ |
