diff src/libvterm/src/pen.c @ 11780:c76b672df584 v8.0.0772

patch 8.0.0772: other stdbool.h dependencies in libvterm commit https://github.com/vim/vim/commit/b2a76ec06bb1130cfb632bdfef64e479fa55dd5c Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jul 25 21:34:46 2017 +0200 patch 8.0.0772: other stdbool.h dependencies in libvterm Problem: Other stdbool.h dependencies in libvterm. Solution: Remove the dependency and use TRUE/FALSE/int. (Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Tue, 25 Jul 2017 21:45:04 +0200
parents b8299e742f41
children 4dfebc1b2674
line wrap: on
line diff
--- a/src/libvterm/src/pen.c
+++ b/src/libvterm/src/pen.c
@@ -33,17 +33,17 @@ static int ramp24[] = {
   0x85, 0x90, 0x9B, 0xA6, 0xB1, 0xBC, 0xC7, 0xD2, 0xDD, 0xE8, 0xF3, 0xFF,
 };
 
-static bool lookup_colour_ansi(const VTermState *state, long index, VTermColor *col)
+static int lookup_colour_ansi(const VTermState *state, long index, VTermColor *col)
 {
   if(index >= 0 && index < 16) {
     *col = state->colors[index];
-    return true;
+    return TRUE;
   }
 
-  return false;
+  return FALSE;
 }
 
-static bool lookup_colour_palette(const VTermState *state, long index, VTermColor *col)
+static int lookup_colour_palette(const VTermState *state, long index, VTermColor *col)
 {
   if(index >= 0 && index < 16) {
     /* Normal 8 colours or high intensity - parse as palette 0 */
@@ -57,7 +57,7 @@ static bool lookup_colour_palette(const 
     col->green = ramp6[index/6   % 6];
     col->red   = ramp6[index/6/6 % 6];
 
-    return true;
+    return TRUE;
   }
   else if(index >= 232 && index < 256) {
     /* 24 greyscales */
@@ -67,10 +67,10 @@ static bool lookup_colour_palette(const 
     col->green = ramp24[index];
     col->red   = ramp24[index];
 
-    return true;
+    return TRUE;
   }
 
-  return false;
+  return FALSE;
 }
 
 static int lookup_colour(const VTermState *state, int palette, const long args[], int argcount, VTermColor *col, int *index)