-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: hackvr action: commit revision: path_from: revision_from: dfb4cc611bde166e56cae44c3ab389ba1bcbc2a5: path_to: revision_to:
commit dfb4cc611bde166e56cae44c3ab389ba1bcbc2a5 Author: epoch <epoch@hacking.allowed.org> Date: Mon Jan 15 03:00:12 2018 -0600 added a counter to at least draw the screen every 100 lines read from stdin diff --git a/src/hackvr.c b/src/hackvr.c
--- a/src/hackvr.c +++ b/src/hackvr.c @@ -90,6 +90,7 @@ int load_stdin() {//this function returns -1 to quit, 0 to not ask for a redraw, int len; int ret=0; int j,k,l; + int counter; //struct timeval timeout; //fd_set master; //fd_set readfs; @@ -115,7 +116,11 @@ int load_stdin() {//this function returns -1 to quit, 0 to not ask for a redraw, } if(FD_ISSET(0,&readfs)) {*/ //#endif - while((line=line?free(line),read_line_hack(stdin,0):read_line_hack(stdin,0))) {//load as long there's something to load + counter=0; + for(counter=0;counter < 100 && (line=line?free(line),read_line_hack(stdin,0):read_line_hack(stdin,0));counter++) {//load as long there's something to load + //but doing this will make it not ever redraw the screen as long as there's more to read. + //how do we compensate for this? an alarm that will break us out? + //a counter that will break us out? if(*line == '#') continue; // fprintf(stderr,"# read command: %s\n",line); if(a) free(a);//use a static char pointer array so I don't have to use the heap. possible optimization.
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 17:49:42 2024