-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: eui action: blob revision: path_from: derptail.c revision_from: refs/heads/trunk: path_to: revision_to:
/ derptail.c
refs/heads/trunk:/derptail.c #include <stdio.h> #include <string.h> #include <unistd.h> int main(int argc,char *argv[]) { FILE *fp; char line[4096];//big enough. who cares? char oldline[4096]=""; for(;;) { if((fp=fopen(argv[1],"r")) == NULL) { perror("fopen"); return 1; } fgets(line,sizeof(line)-1,fp); if(strcmp(line,oldline)) { printf("%s",line); memcpy(oldline,line,sizeof(line)); } //rewind(fp); sleep(1);//slow enough? fclose(fp); } }
-- Response ended
-- Page fetched on Sun Jun 2 15:21:40 2024