From e778cc3351883730783dedc191ae757ccd1f6be5 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Mon, 11 Oct 2010 01:49:20 +0000 Subject: gets() -> fgets(), added ctype.h include for toupper() when VT100 mode enabled. TODO: Other fixes needed to get VT100 mode to compile on latest linux releases.. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7713 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- test/checkers.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/checkers.cxx b/test/checkers.cxx index eae70019a..c5e116d6a 100644 --- a/test/checkers.cxx +++ b/test/checkers.cxx @@ -66,6 +66,10 @@ const char* copyright = #include #include +#ifdef VT100 +#include // toupper +#endif + //////////////////////////////////////////////////////////////// // The algorithim: @@ -732,7 +736,7 @@ node *getusermove(void) { else printf("\033[1mCommand?\033[0m "); abortflag = 0; - if (!gets(line)) { + if (!fgets(line, sizeof(line), stdin)) { putchar('\n'); if (feof(stdin)) fixexit(0); return 0; -- cgit v1.2.3