Next step: seal off the input logic.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 4 Nov 2004 21:37:49 +0000 (21:37 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 4 Nov 2004 21:37:49 +0000 (21:37 +0000)
reports.c
sst.c
sst.h

index 858c70cb479f66689b0b5b3ff3a3fda391658fa2..f98c35c25ce617bfae95c7e14fc96b51951f7d37 100644 (file)
--- a/reports.c
+++ b/reports.c
@@ -118,7 +118,7 @@ void lrscan(void) {
        }\r
        else {\r
                skip(1);\r
-               proutn("Long-range scan for");\r
+               proutn("Long-range scan for ");\r
        }\r
        prout(cramlc(quadrant, quadx, quady));\r
        for (x = quadx-1; x <= quadx+1; x++) {\r
diff --git a/sst.c b/sst.c
index d35b2556ae1407f297b0088838a2c5124b1140c0..f65a2a5e70aaabd347b0a44ce0920b63238a1080 100644 (file)
--- a/sst.c
+++ b/sst.c
@@ -478,7 +478,7 @@ int scan(void) {
                        chew();\r
                        return IHEOL;\r
                }\r
-               fgets(line, sizeof(line), stdin);\r
+               getline(line, sizeof(line));\r
                line[strlen(line)-1] = '\0';\r
                linep = line;\r
        }\r
diff --git a/sst.h b/sst.h
index fc7ecc5355ffeb93a1c1ccda178919b261d3f404..b5ad3e4690b34931f8e9544649698e895987b156 100644 (file)
--- a/sst.h
+++ b/sst.h
@@ -422,4 +422,4 @@ void movetho(void);
 void probe(void);\r
 void clearscreen(void);\r
 void iostart(void);\r
-\r
+void getline(char *, int);\r