From 8e285f7ff4c456263338a241415f61d58e72ed01 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 11 Feb 2026 15:08:34 -0500 Subject: remove more netcat cruft, add README.txt and numerics.h --- src/main.c | 137 ------------------------------------------------------------- 1 file changed, 137 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 81f598e..6de8697 100644 --- a/src/main.c +++ b/src/main.c @@ -172,140 +172,3 @@ int main(void) { OS.soundr = 3; // Restore SIO beeping sound return 0; } - -/* cruft from netcat: */ -/** - * Main entrypoint - */ -#if 0 -int main(int argc, char* argv[]) -{ - OS.soundr=0; // Turn off SIO beeping sound - cursor(1); // Keep cursor on - - while (running==true) - { - if (get_url(argc, argv)) - nc(); - else - running=false; - } - - OS.soundr=3; // Restore SIO beeping sound - return 0; -} -#endif - -#if 0 -/** - * NetCat - */ -void nc() -{ - OS.lmargn=0; // Set left margin to 0 - OS.shflok=0; // turn off shift-lock. - - // Attempt open. - print("\x9bOpening:\x9b"); - print(url); - print("\x9b"); - - err=nopen(url,trans); - - if (err != SUCCESS) - { - print("OPEN ERROR: "); - print_error(err); - return; - } - - // Open successful, set up interrupt - old_vprced = OS.vprced; // save the old interrupt vector - old_enabled = PIA.pactl & 1; // keep track of old interrupt state - PIA.pactl &= (~1); // Turn off interrupts before changing vector - OS.vprced = ih; // Set PROCEED interrupt vector to our interrupt handler. - PIA.pactl |= 1; // Indicate to PIA we are ready for PROCEED interrupt. - - // MAIN LOOP /////////////////////////////////////////////////////////// - - while (running==true) - { - // If key pressed, send it. - while (kbhit()) - { - tx_buf[txbuflen++]=cgetc(); - } - - if (txbuflen>0) - { - if (echo==true) - for (i=0;isizeof(rx_buf)) - bw=sizeof(rx_buf); - - if (bw>0) - { - err=nread(url,rx_buf,bw); - - if (err!=1) - { - print("READ ERROR: "); - print_error(err); - running=false; - continue; - } - - // Print the buffer to screen. - printl(rx_buf,bw); - - trip=0; - PIA.pactl |= 1; // Flag interrupt as serviced, ready for next one. - } // if bw > 0 - } // while running - - // END MAIN LOOP /////////////////////////////////////////////////////// - - // Restore old PROCEED interrupt. - PIA.pactl &= ~1; // disable interrupts - OS.vprced=old_vprced; - PIA.pactl |= old_enabled; - -} -#endif -- cgit v1.2.3