diff ui.h @ 713:93d0e1547842

th-libs now uses stdbool.h if possible, so we need to rename all BOOL/TRUE/FALSE to bool/true/false.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 07 Dec 2022 13:20:25 +0200
parents 6fa9c36d0634
children
line wrap: on
line diff
--- a/ui.h	Wed Dec 07 13:19:25 2022 +0200
+++ b/ui.h	Wed Dec 07 13:20:25 2022 +0200
@@ -40,7 +40,7 @@
 {
     th_ringbuf_t *data; // "Backbuffer" data for this window
     int pos;            // Current position in the window, 0 = real time
-    BOOL dirty;
+    bool dirty;
 
     int num;
     char *id;           // Chatter ID, NULL = main window
@@ -57,41 +57,41 @@
 typedef struct
 {
     time_t prevKeepAlive;
-    BOOL insertMode, isError, update, mask, done;
+    bool insertMode, isError, update, mask, done;
     th_conn_t *conn;
     void (*debugMsg)(const char *fmt, ...);
 } nn_editstate_t;
 
 
 extern nn_window_t *currWin;
-extern BOOL appCursesInit, appQuitFlag;
+extern bool appCursesInit, appQuitFlag;
 extern int scrHeight, scrWidth;
 
-BOOL           nnwin_init(int delay);
+bool           nnwin_init(int delay);
 void           nnwin_shutdown();
 void           nnwin_reset(void);
 
-void           nnwin_update(BOOL force, BOOL mask, nn_editbuf_t *ebuf, const char *username, const unsigned int usercolor);
+void           nnwin_update(bool force, bool mask, nn_editbuf_t *ebuf, const char *username, const unsigned int usercolor);
 
 nn_window_t *  nnwin_main_window();
 nn_window_t *  nnwin_get(const int index);
 nn_window_t *  nnwin_find(const char *id);
 void           nnwin_set_current(nn_window_t *);
 
-BOOL           nnwin_open(const char *name, BOOL curwin);
+bool           nnwin_open(const char *name, bool curwin);
 void           nnwin_close(nn_window_t *win);
 
 int            nnwin_print(nn_window_t *win, const char *fmt);
 
 void nnwin_input_process(nn_editbuf_t *editBuf, nn_editstate_t *editState,
-    BOOL (*callback)(int, nn_editbuf_t *, nn_editstate_t *));
+    bool (*callback)(int, nn_editbuf_t *, nn_editstate_t *));
 
-char *         nnwin_prompt_requester(BOOL allowEmpty, nn_editstate_t *,
-    BOOL (*callback)(int, nn_editbuf_t *, nn_editstate_t *),
+char *         nnwin_prompt_requester(bool allowEmpty, nn_editstate_t *,
+    bool (*callback)(int, nn_editbuf_t *, nn_editstate_t *),
     void (*update)(nn_editbuf_t *, nn_editstate_t *));
 
 
-BOOL nn_log_open(nn_window_t *win);
+bool nn_log_open(nn_window_t *win);
 void nn_log_close(nn_window_t *win);
 
 #endif