From: Eric S. Raymond Date: Thu, 4 Nov 2004 21:37:49 +0000 (+0000) Subject: Next step: seal off the input logic. X-Git-Tag: 2.0~430 X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=commitdiff_plain;h=a6c062d033c2cf9be1eb9e1164de84ba45379681;hp=25f221b092e0e9d85aa5d3e6863043f2ab4d7c43 Next step: seal off the input logic. --- 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);