summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2010-10-11 01:49:20 +0000
committerGreg Ercolano <erco@seriss.com>2010-10-11 01:49:20 +0000
commite778cc3351883730783dedc191ae757ccd1f6be5 (patch)
tree5a480c5429df835e7056433fe6380e1d905e219e /test
parent9e82db43ae372d5d05a43588933204cde26822e5 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/checkers.cxx6
1 files changed, 5 insertions, 1 deletions
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 <stdarg.h>
#include <time.h>
+#ifdef VT100
+#include <ctype.h> // 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;