Author: greg.ercolano
Date: 2010-10-10 18:49:20 -0700 (Sun, 10 Oct 2010)
New Revision: 7713
Log:
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..
Modified:
branches/branch-1.3/test/checkers.cxx
Modified: branches/branch-1.3/test/checkers.cxx
===================================================================
--- branches/branch-1.3/test/checkers.cxx 2010-10-11 01:41:50 UTC (rev
7712)
+++ branches/branch-1.3/test/checkers.cxx 2010-10-11 01:49:20 UTC (rev
7713)
@@ -66,6 +66,10 @@
#include <stdarg.h>
#include <time.h>
+#ifdef VT100
+#include <ctype.h> // toupper
+#endif
+
////////////////////////////////////////////////////////////////
// The algorithim:
@@ -732,7 +736,7 @@
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;
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit