mirror of https://github.com/fltk/fltk
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
This commit is contained in:
parent
9e82db43ae
commit
e778cc3351
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue