ecere/gui/NCursesInterface;gfx/NCursesDisplayDriver: Fixed warnings following C99...
authorJerome St-Louis <jerome@ecere.com>
Thu, 6 Feb 2014 23:53:56 +0000 (06:53 +0700)
committerJerome St-Louis <jerome@ecere.com>
Thu, 6 Feb 2014 23:56:01 +0000 (06:56 +0700)
ecere/src/gfx/drivers/NCursesDisplayDriver.ec
ecere/src/gui/drivers/NCursesInterface.ec

index eb0ca12..ffd2de7 100644 (file)
@@ -6,12 +6,8 @@ import "instance"
 
 #if (defined(__unix__) || defined(__APPLE__)) && !defined(__DOS__)
 
-#define bool CursesBool
-
 #include <curses.h>
 
-#undef bool
-
 import "Display"
 
 static int CC(int color)
@@ -431,7 +427,7 @@ class NCursesDisplayDriver : DisplayDriver
    {
       CursesDisplay cursesDisplay = display.driverData;
       curs_set(false);
-      leaveok(stdscr, (_Bool)true);
+      leaveok(stdscr, true);
       refresh();
       if(updateBox == null)
       {
index e4afbf9..e78f6f4 100644 (file)
@@ -10,13 +10,7 @@ import "instance"
 
 // #define DEBUG_THREADS
 
-#define bool CursesBool
-#define uint _uint
-
 #include <curses.h>
-
-#undef bool
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/time.h>
@@ -24,8 +18,6 @@ import "instance"
 
 import "Interface"
 
-#undef uint
-
 static class Message : struct
 {
    Message prev, next;
@@ -358,10 +350,10 @@ class NCursesInterface : Interface
 
       printf( "\033(U\017");
       fflush(stdout);
-      intrflush(stdscr, (_Bool)false);
+      intrflush(stdscr, false);
       nonl();
       curs_set(false);
-      keypad(stdscr, (_Bool)true);
+      keypad(stdscr, true);
    #ifdef NCURSES_VERSION
       ESCDELAY = 0;
       mousemask(REPORT_MOUSE_POSITION |
@@ -370,13 +362,13 @@ class NCursesInterface : Interface
                 BUTTON3_PRESSED | BUTTON3_RELEASED | BUTTON3_DOUBLE_CLICKED, null);
       mouseinterval(0);
    #endif
-      idlok(stdscr, (_Bool)false);
-      idcok(stdscr, (_Bool)false);
-      clearok(stdscr, (_Bool)false);
-      scrollok(stdscr, (_Bool)false);
+      idlok(stdscr, false);
+      idcok(stdscr, false);
+      clearok(stdscr, false);
+      scrollok(stdscr, false);
       cbreak();
       caretVisible = false;
-      leaveok(stdscr, (_Bool)true);
+      leaveok(stdscr, true);
       timeout(0);
       noecho();
 
@@ -441,7 +433,7 @@ class NCursesInterface : Interface
          messages.Free(null);
       else if(caretVisible)
       {
-         leaveok(stdscr, (_Bool)false);
+         leaveok(stdscr, false);
          move(caretY,caretX);
          refresh();
          curs_set(true);