From a6c062d033c2cf9be1eb9e1164de84ba45379681 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 4 Nov 2004 21:37:49 +0000 Subject: [PATCH] Next step: seal off the input logic. --- reports.c | 2 +- sst.c | 2 +- sst.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/reports.c b/reports.c index 858c70c..f98c35c 100644 --- a/reports.c +++ b/reports.c @@ -118,7 +118,7 @@ void lrscan(void) { } else { skip(1); - proutn("Long-range scan for"); + proutn("Long-range scan for "); } prout(cramlc(quadrant, quadx, quady)); for (x = quadx-1; x <= quadx+1; x++) { diff --git a/sst.c b/sst.c index d35b255..f65a2a5 100644 --- a/sst.c +++ b/sst.c @@ -478,7 +478,7 @@ int scan(void) { chew(); return IHEOL; } - fgets(line, sizeof(line), stdin); + getline(line, sizeof(line)); line[strlen(line)-1] = '\0'; linep = line; } diff --git a/sst.h b/sst.h index fc7ecc5..b5ad3e4 100644 --- a/sst.h +++ b/sst.h @@ -422,4 +422,4 @@ void movetho(void); void probe(void); void clearscreen(void); void iostart(void); - +void getline(char *, int); -- 2.31.1