Problem: Other stdbool.h dependencies in libvterm.
Solution: Remove the dependency and use TRUE/FALSE/int. (Ken Takata)
}
vt = vterm_new(rows, cols);
- vterm_set_utf8(vt, true);
+ vterm_set_utf8(vt, TRUE);
vts = vterm_obtain_screen(vt);
vterm_screen_set_callbacks(vts, &cb_screen, NULL);
#include <stdint.h>
#include <stdlib.h>
-#include <stdbool.h>
#include "vterm_keycodes.h"
+#define TRUE 1
+#define FALSE 0
+
typedef struct VTerm VTerm;
typedef struct VTermState VTermState;
typedef struct VTermScreen VTermScreen;
void vterm_keyboard_end_paste(VTerm *vt);
void vterm_mouse_move(VTerm *vt, int row, int col, VTermModifier mod);
-void vterm_mouse_button(VTerm *vt, int button, bool pressed, VTermModifier mod);
+void vterm_mouse_button(VTerm *vt, int button, int pressed, VTermModifier mod);
/* ------------
* Parser layer
int (*erase)(VTermRect rect, int selective, void *user);
int (*initpen)(void *user);
int (*setpenattr)(VTermAttr attr, VTermValue *val, void *user);
+ /* Callback for setting various properties. Must return 1 if the property
+ * was accepted, 0 otherwise. */
int (*settermprop)(VTermProp prop, VTermValue *val, void *user);
int (*bell)(void *user);
int (*resize)(int rows, int cols, VTermPos *delta, void *user);
}
}
-void vterm_mouse_button(VTerm *vt, int button, bool pressed, VTermModifier mod)
+void vterm_mouse_button(VTerm *vt, int button, int pressed, VTermModifier mod)
{
VTermState *state = vt->state;
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 */
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 */
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)
rect.start_row, rect.end_row, rect.start_col, rect.end_col);
if(want_screen_damage_cells) {
- bool equals = false;
+ int equals = FALSE;
int row;
int col;
break;
if(!equals)
- printf(" ="), equals = true;
+ printf(" ="), equals = TRUE;
printf(" %d<", row);
for(col = rect.start_col; col < eol; col++) {
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 772,
/**/
771,
/**/