From d255de5940dcc2d1415252565af64ca6b5bcfd2b Mon Sep 17 00:00:00 2001 From: dtb Date: Tue, 30 Aug 2022 20:38:36 -0400 Subject: [PATCH] old edits uncommitted --- homepage/bookmarks/index.html | 4 +--- homepage/cat/cat.c | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/homepage/bookmarks/index.html b/homepage/bookmarks/index.html index 126e179..7c70ed4 100644 --- a/homepage/bookmarks/index.html +++ b/homepage/bookmarks/index.html @@ -81,7 +81,6 @@ Oh well.
  • IRC Rite
  • Jack of Diamonds
  • Kit FUI
  • -
  • "A hacker fox!" [Xenia] - Alan Mackey
  • Maine Snow Forecast
  • MATRA Computer Automations
  • mebious.co.uk entry wired
  • @@ -549,6 +548,7 @@ Oh well.
  • GCC4TI Documentation
  • History of C
  • How to allocate memory
  • +
  • A Regular Expression Matcher
  • String-Handling Functions
  • Sensible line buffer size in C?
  • Some things every C programmer should know about C
  • @@ -617,11 +617,9 @@ Oh well.
  • checkra1n 0.11.0 hangs or crashes on userland boot
  • Color Emulation
  • Commentary on the Sixth Edition UNIX Operating System
  • -
  • Common pronunciations of Linux directories, commands, etc
  • Computer Engineering: A DEC View of Hardware Systems Design
  • Computer Science Illustrated
  • Computing Machinery and Intelligence
  • -
  • Configurations for ctwm
  • Create a Partition Accessable to Both Windows and Linux
  • Crouching T2 Hidden Danger
  • Crouching T2 Hidden Danger (axi0mX thread)
  • diff --git a/homepage/cat/cat.c b/homepage/cat/cat.c index bd09008..7ee4c6a 100644 --- a/homepage/cat/cat.c +++ b/homepage/cat/cat.c @@ -33,7 +33,7 @@ error(enum error_type type, char *argv0, char *file_name){ /* print input to output, returns 0 if successful and 1 if unsuccessful */ int file_copy(FILE *input, FILE *output){ - char c; + int c; while((c = getc(input)) != EOF) if(putc(c, output) == EOF) return 1; @@ -76,7 +76,7 @@ main(int argc, char *argv[]){ /* ignore `-u` if still parsing options */ }else if(parsing_opts && !strcmp(argv[i], "-u")) - continue; + setbuf(output, (char *)NULL); /* take `-` to mean standard input if still parsing options */ else if(parsing_opts && !strcmp(argv[i], "-")){