updated: [ae987b9] Reverted the use of bool in favour of gboolean

Patrick Winnertz winnie at debian.org
Tue Feb 10 11:49:55 UTC 2009


The following commit has been merged in the master branch:
commit ae987b923e5341422bdc3048079ce2c5a2b8dd2f
Author: Patrick Winnertz <winnie at debian.org>
Date:   Thu Feb 5 23:46:07 2009 +0100

    Reverted the use of bool in favour of gboolean
    
    Signed-off-by: Patrick Winnertz <winnie at debian.org>

diff --git a/edit/usermap.c b/edit/usermap.c
index bbc0dd7..e30c011 100644
--- a/edit/usermap.c
+++ b/edit/usermap.c
@@ -59,7 +59,7 @@ typedef struct Config {
 
 typedef struct Command {
     const char *name;
-    bool (*handler) (config_t *cfg, int argc, char *argv[]);
+    int (*handler) (config_t *cfg, int argc, char *argv[]);
 } command_t;
 
 static char error_msg[200] = "Nobody see this";
@@ -255,7 +255,7 @@ cfg_free_maps(config_t *cfg)
 static GPtrArray *
 split_line(char *str)
 {
-    bool inside_quote = FALSE;
+    gboolean inside_quote = FALSE;
     int move = 0;
     GPtrArray *args;    
 
@@ -345,7 +345,7 @@ keymap_add(GArray *keymap, int key, int cmd)
 }
 
 /* bind <key> <command> */
-static bool
+static gboolean
 cmd_bind(config_t *cfg, int argc, char *argv[])
 {
     char *keyname, *command;
@@ -471,7 +471,7 @@ static void edit_my_define (Dlg_head * h, int idx, const char *text,
 #endif
 
 /* label <number> <command> <label> */
-static bool
+static gboolean
 cmd_label(config_t *cfg, int argc, char *argv[])
 {
     const name_map_t *cmd = command_names;
@@ -511,7 +511,7 @@ cmd_label(config_t *cfg, int argc, char *argv[])
 }
 
 
-static bool
+static gboolean
 parse_file(config_t *cfg, const char *file, const command_t *cmd)
 {
     char buf[200];
@@ -568,7 +568,7 @@ parse_file(config_t *cfg, const char *file, const command_t *cmd)
     return TRUE;
 }
 
-static bool
+static gboolean
 load_user_keymap(config_t *cfg, const char *file)
 {
     const command_t cmd[] = {
@@ -588,7 +588,7 @@ load_user_keymap(config_t *cfg, const char *file)
     return TRUE;
 }
 
-bool
+gboolean
 edit_load_user_map(WEdit *edit)
 {
     static config_t cfg;
diff --git a/edit/usermap.h b/edit/usermap.h
index bf06d12..fecf03b 100644
--- a/edit/usermap.h
+++ b/edit/usermap.h
@@ -1,13 +1,11 @@
 #ifndef MC_USERMAP_H
 #define MC_USERMAP_H
 
-#include <mhl/types.h>
-
 #define MC_USERMAP ".mc/cedit/cooledit.bindings"
 
 #include "edit.h"
 
 /* load user map */
-bool edit_load_user_map(WEdit *);
+gboolean edit_load_user_map(WEdit *);
 
 #endif
diff --git a/src/ecs-test.c b/src/ecs-test.c
index e7f64e5..a194280 100644
--- a/src/ecs-test.c
+++ b/src/ecs-test.c
@@ -29,13 +29,11 @@
 #include <locale.h>
 #include <stdio.h>
 
-#include <mhl/types.h>
-
 #include "global.h"
 #include "ecs.h"
 
 #ifdef EXTCHARSET_ENABLED
-static bool
+static gboolean
 change_locale(const char *loc)
 {
 	const char *ident;
@@ -67,7 +65,7 @@ test_locale_en_US_UTF_8(void)
 	const char     *teststr_c   = "Zuckert\374te";
 	ecs_char       *ecs;
 	char           *mbs;
-	bool        valid;
+	gboolean        valid;
 
 	if (!change_locale("en_US.UTF-8")) return;
 
diff --git a/src/ecs.c b/src/ecs.c
index 62683a6..89ef8e0 100644
--- a/src/ecs.c
+++ b/src/ecs.c
@@ -37,7 +37,7 @@
  * String type conversion
  */
 
-extern bool ecs_mbstr_to_str(ecs_char **ret_str, const char *s)
+extern gboolean ecs_mbstr_to_str(ecs_char **ret_str, const char *s)
 {
 #ifdef EXTCHARSET_ENABLED
 	size_t maxlen, len;
@@ -61,7 +61,7 @@ extern bool ecs_mbstr_to_str(ecs_char **ret_str, const char *s)
 #endif
 }
 
-extern bool ecs_str_to_mbstr(char **ret_str, const ecs_char *s)
+extern gboolean ecs_str_to_mbstr(char **ret_str, const ecs_char *s)
 {
 #ifdef EXTCHARSET_ENABLED
 	size_t maxlen, len;
@@ -103,57 +103,57 @@ extern bool ecs_str_to_mbstr(char **ret_str, const ecs_char *s)
 	(cf(c))
 #endif
 
-extern bool ecs_isalnum(ecs_char c)
+extern gboolean ecs_isalnum(ecs_char c)
 {
 	return ECS_CTYPE(iswalnum, isalnum, c);
 }
 
-extern bool ecs_isalpha(ecs_char c)
+extern gboolean ecs_isalpha(ecs_char c)
 {
 	return ECS_CTYPE(iswalpha, isalpha, c);
 }
 
-extern bool ecs_iscntrl(ecs_char c)
+extern gboolean ecs_iscntrl(ecs_char c)
 {
 	return ECS_CTYPE(iswcntrl, iscntrl, c);
 }
 
-extern bool ecs_isdigit(ecs_char c)
+extern gboolean ecs_isdigit(ecs_char c)
 {
 	return ECS_CTYPE(iswdigit, isdigit, c);
 }
 
-extern bool ecs_isgraph(ecs_char c)
+extern gboolean ecs_isgraph(ecs_char c)
 {
 	return ECS_CTYPE(iswgraph, isgraph, c);
 }
 
-extern bool ecs_islower(ecs_char c)
+extern gboolean ecs_islower(ecs_char c)
 {
 	return ECS_CTYPE(iswlower, islower, c);
 }
 
-extern bool ecs_isprint(ecs_char c)
+extern gboolean ecs_isprint(ecs_char c)
 {
 	return ECS_CTYPE(iswprint, isprint, c);
 }
 
-extern bool ecs_ispunct(ecs_char c)
+extern gboolean ecs_ispunct(ecs_char c)
 {
 	return ECS_CTYPE(iswpunct, ispunct, c);
 }
 
-extern bool ecs_isspace(ecs_char c)
+extern gboolean ecs_isspace(ecs_char c)
 {
 	return ECS_CTYPE(iswspace, isspace, c);
 }
 
-extern bool ecs_isupper(ecs_char c)
+extern gboolean ecs_isupper(ecs_char c)
 {
 	return ECS_CTYPE(iswupper, isupper, c);
 }
 
-extern bool ecs_isxdigit(ecs_char c)
+extern gboolean ecs_isxdigit(ecs_char c)
 {
 	return ECS_CTYPE(iswxdigit, isxdigit, c);
 }
@@ -317,7 +317,7 @@ ecs_strlcat(ecs_char *dst, const ecs_char *src, size_t dstsize)
 	return di + ecs_strlcpy(dst + di, src, dstsize - di);
 }
 
-bool
+gboolean
 ecs_strbox(const ecs_char *s, size_t *ret_width, size_t *ret_height)
 {
 	size_t nlines = 0, ncolumns = 0, colindex = 0, i;
diff --git a/src/ecs.h b/src/ecs.h
index 9ba672c..571d93e 100644
--- a/src/ecs.h
+++ b/src/ecs.h
@@ -44,8 +44,6 @@ typedef char ecs_char;
 #  define ECS_STR(s)		(s)
 #endif
 
-#include <mhl/types.h>
-
 /*
  * String conversion functions between the wide character encoding and
  * the multibyte encoding. The returned strings should be freed using
@@ -53,24 +51,24 @@ typedef char ecs_char;
  * and has been converted, FALSE otherwise.
  */
 
-extern bool ecs_mbstr_to_str(ecs_char **ret_str, const char *);
-extern bool ecs_str_to_mbstr(char **ret_str, const ecs_char *);
+extern gboolean ecs_mbstr_to_str(ecs_char **ret_str, const char *);
+extern gboolean ecs_str_to_mbstr(char **ret_str, const ecs_char *);
 
 /*
  * Replacements for the ISO C90 <ctype.h> functions.
  */
 
-extern bool ecs_isalnum(ecs_char);
-extern bool ecs_isalpha(ecs_char);
-extern bool ecs_iscntrl(ecs_char);
-extern bool ecs_isdigit(ecs_char);
-extern bool ecs_isgraph(ecs_char);
-extern bool ecs_islower(ecs_char);
-extern bool ecs_isprint(ecs_char);
-extern bool ecs_ispunct(ecs_char);
-extern bool ecs_isspace(ecs_char);
-extern bool ecs_isupper(ecs_char);
-extern bool ecs_isxdigit(ecs_char);
+extern gboolean ecs_isalnum(ecs_char);
+extern gboolean ecs_isalpha(ecs_char);
+extern gboolean ecs_iscntrl(ecs_char);
+extern gboolean ecs_isdigit(ecs_char);
+extern gboolean ecs_isgraph(ecs_char);
+extern gboolean ecs_islower(ecs_char);
+extern gboolean ecs_isprint(ecs_char);
+extern gboolean ecs_ispunct(ecs_char);
+extern gboolean ecs_isspace(ecs_char);
+extern gboolean ecs_isupper(ecs_char);
+extern gboolean ecs_isxdigit(ecs_char);
 
 /*
  * Replacements for the ISO C90 <string.h> functions.
@@ -107,7 +105,7 @@ extern size_t ecs_strlcat(ecs_char *, const ecs_char *, size_t);
  * displayed on screen. Returns TRUE if all characters in the string are
  * either '\n' or printable, according to the current locale. If the
  * return value is FALSE, ''width'' and ''height'' are not modified. */
-extern bool ecs_strbox(const ecs_char *, size_t *ret_width,
+extern gboolean ecs_strbox(const ecs_char *, size_t *ret_width,
 	size_t *ret_height);
 
 #endif
diff --git a/src/file.c b/src/file.c
index 2d78e05..e3bba04 100644
--- a/src/file.c
+++ b/src/file.c
@@ -50,7 +50,6 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
-#include <mhl/types.h>
 #include <mhl/memory.h>
 #include <mhl/escape.h>
 #include <mhl/string.h>
@@ -1035,7 +1034,7 @@ move_file_file (FileOpContext *ctx, const char *s, const char *d,
 {
     struct stat src_stats, dst_stats;
     int return_status = FILE_CONT;
-    bool copy_done = FALSE;
+    gboolean copy_done = FALSE;
 
     if (file_progress_show_source (ctx, s) == FILE_ABORT
 	|| file_progress_show_target (ctx, d) == FILE_ABORT)
diff --git a/src/find.c b/src/find.c
index 7ae6bb9..f493b3d 100644
--- a/src/find.c
+++ b/src/find.c
@@ -145,7 +145,7 @@ static void get_list_info (char **file, char **dir) {
 static regex_t *r; /* Pointer to compiled content_pattern */
  
 static int case_sensitive = 1;
-static bool find_regex_flag = TRUE;
+static gboolean find_regex_flag = TRUE;
 static int find_recursively = 1;
 
 /*
diff --git a/src/key.c b/src/key.c
index 2447c5b..60da653 100644
--- a/src/key.c
+++ b/src/key.c
@@ -184,7 +184,7 @@ inline static int add_selects (fd_set *select_set)
 static void check_selects (fd_set *select_set)
 {
     SelectList *p;
-    bool retry;
+    gboolean retry;
 
     if (disabled_channels)
 	return;
diff --git a/src/logging.c b/src/logging.c
index 6dc8094..d057e8a 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -35,11 +35,11 @@
 
 /*** file scope functions **********************************************/
 
-static bool
+static gboolean
 is_logging_enabled(void)
 {
-	static bool logging_initialized = FALSE;
-	static bool logging_enabled = FALSE;
+	static gboolean logging_initialized = FALSE;
+	static gboolean logging_enabled = FALSE;
 	char *mc_ini;
 
 	if (!logging_initialized) {
diff --git a/src/treestore.c b/src/treestore.c
index 5826556..91cfb1e 100644
--- a/src/treestore.c
+++ b/src/treestore.c
@@ -746,7 +746,7 @@ process_special_dirs(GList ** special_dirs, char *file)
     g_free(buffer);
 }
 
-static bool
+static gboolean
 should_skip_directory(const char *dir)
 {
     static GList *special_dirs;
diff --git a/src/tty.c b/src/tty.c
index 44b40e5..a71c6cc 100644
--- a/src/tty.c
+++ b/src/tty.c
@@ -29,8 +29,6 @@
 #include <signal.h>
 #include <stdarg.h>
 
-#include <mhl/types.h>
-
 #include "global.h"
 #include "color.h"
 #include "main.h"		/* for slow_terminal */
@@ -89,10 +87,10 @@ tty_disable_interrupt_key(void)
     sigaction (SIGINT, &act, NULL);
 }
 
-extern bool
+extern gboolean
 tty_got_interrupt(void)
 {
-    bool rv;
+    gboolean rv;
 
     rv = (got_interrupt != 0);
     got_interrupt = 0;
diff --git a/src/tty.h b/src/tty.h
index f6d520b..85d286b 100644
--- a/src/tty.h
+++ b/src/tty.h
@@ -25,13 +25,11 @@
 #endif /* WANT_TERM_H */
 #endif /* USE_NCURSES */
 
-#include <mhl/types.h>
-
 /* {{{ Input }}} */
 
 extern void tty_enable_interrupt_key(void);
 extern void tty_disable_interrupt_key(void);
-extern bool tty_got_interrupt(void);
+extern gboolean tty_got_interrupt(void);
 
 /* {{{ Output }}} */
 
diff --git a/src/utilunix.c b/src/utilunix.c
index f3bdce1..213ea6d 100644
--- a/src/utilunix.c
+++ b/src/utilunix.c
@@ -723,7 +723,7 @@ mc_realpath (const char *path, char resolved_path[])
 /* Return the index of the permissions triplet */
 int
 get_user_permissions (struct stat *st) {
-    static bool initialized = FALSE;
+    static gboolean initialized = FALSE;
     static gid_t *groups;
     static int ngroups;
     static uid_t uid;
diff --git a/src/view.c b/src/view.c
index 47c2d4f..d83f00f 100644
--- a/src/view.c
+++ b/src/view.c
@@ -145,23 +145,23 @@ struct WView {
     size_t ds_string_len;	/* The length of the string */
 
     /* Growing buffers information */
-    bool growbuf_in_use;	/* Use the growing buffers? */
+    gboolean growbuf_in_use;	/* Use the growing buffers? */
     byte   **growbuf_blockptr;	/* Pointer to the block pointers */
     size_t   growbuf_blocks;	/* The number of blocks in *block_ptr */
     size_t   growbuf_lastindex;	/* Number of bytes in the last page of the
 				   growing buffer */
-    bool growbuf_finished;	/* TRUE when all data has been read. */
+    gboolean growbuf_finished;	/* TRUE when all data has been read. */
 
     /* Editor modes */
-    bool hex_mode;		/* Hexview or Hexedit */
-    bool hexedit_mode;	/* Hexedit */
-    bool hexview_in_text;	/* Is the hexview cursor in the text area? */
-    bool text_nroff_mode;	/* Nroff-style highlighting */
-    bool text_wrap_mode;	/* Wrap text lines to fit them on the screen */
-    bool magic_mode;	/* Preprocess the file using external programs */
+    gboolean hex_mode;		/* Hexview or Hexedit */
+    gboolean hexedit_mode;	/* Hexedit */
+    gboolean hexview_in_text;	/* Is the hexview cursor in the text area? */
+    gboolean text_nroff_mode;	/* Nroff-style highlighting */
+    gboolean text_wrap_mode;	/* Wrap text lines to fit them on the screen */
+    gboolean magic_mode;	/* Preprocess the file using external programs */
 
     /* Additional editor state */
-    bool hexedit_lownibble;	/* Are we editing the last significant nibble? */
+    gboolean hexedit_lownibble;	/* Are we editing the last significant nibble? */
     GArray *coord_cache;	/* Cache for mapping offsets to cursor positions */
 
     /* Display information */
@@ -179,7 +179,7 @@ struct WView {
     struct area data_area;	/* Where the data is displayed */
 
     int dirty;			/* Number of skipped updates */
-    bool dpy_bbar_dirty;	/* Does the button bar need to be updated? */
+    gboolean dpy_bbar_dirty;	/* Does the button bar need to be updated? */
 
     /* Mode variables */
     int bytes_per_line;		/* Number of bytes per line in hex mode */
@@ -191,7 +191,7 @@ struct WView {
     int  direction;		/* 1= forward; -1 backward */
     void (*last_search)(WView *);
 				/* Pointer to the last search command */
-    bool want_to_quit;	/* Prepare for cleanup ... */
+    gboolean want_to_quit;	/* Prepare for cleanup ... */
 
     /* Markers */
     int marker;			/* mark to use */
@@ -282,7 +282,7 @@ offset_rounddown (offset_type a, offset_type b)
 
 /* {{{ Simple Primitive Functions for WView }}} */
 
-static inline bool
+static inline gboolean
 view_is_in_panel (WView *view)
 {
     return (view->dpy_frame_size != 0);
@@ -402,7 +402,7 @@ view_growbuf_read_until (WView *view, offset_type ofs)
     ssize_t nread;
     byte *p;
     size_t bytesfree;
-    bool short_read;
+    gboolean short_read;
 
     assert (view->growbuf_in_use);
 
@@ -517,7 +517,7 @@ view_get_filesize (WView *view)
     }
 }
 
-static inline bool
+static inline gboolean
 view_may_still_grow (WView *view)
 {
     return (view->growbuf_in_use && !view->growbuf_finished);
@@ -526,7 +526,7 @@ view_may_still_grow (WView *view)
 /* returns TRUE if the idx lies in the half-open interval
  * [offset; offset + size), FALSE otherwise.
  */
-static inline bool
+static inline gboolean
 already_loaded (offset_type offset, offset_type idx, size_t size)
 {
     return (offset <= idx && idx - offset < size);
@@ -742,10 +742,10 @@ enum ccache_type {
     CCACHE_LINECOL
 };
 
-static inline bool
+static inline gboolean
 coord_cache_entry_less (const struct coord_cache_entry *a,
 	const struct coord_cache_entry *b, enum ccache_type crit,
-	bool nroff_mode)
+	gboolean nroff_mode)
 {
     if (crit == CCACHE_OFFSET)
 	return (a->cc_offset < b->cc_offset);
@@ -831,7 +831,7 @@ view_ccache_dump (WView *view)
 }
 #endif
 
-static inline bool
+static inline gboolean
 is_nroff_sequence (WView *view, offset_type offset)
 {
     int c0, c1, c2;
@@ -1091,7 +1091,7 @@ view_scroll_to_cursor (WView *view)
 }
 
 static void
-view_movement_fixups (WView *view, bool reset_search)
+view_movement_fixups (WView *view, gboolean reset_search)
 {
     view_scroll_to_cursor (view);
     if (reset_search) {
@@ -1457,7 +1457,7 @@ view_show_error (WView *view, const char *msg)
     }
 }
 
-static bool
+static gboolean
 view_load_command_output (WView *view, const char *command)
 {
     FILE *fp;
@@ -1487,7 +1487,7 @@ view_load_command_output (WView *view, const char *command)
     return TRUE;
 }
 
-bool
+gboolean
 view_load (WView *view, const char *command, const char *file,
 	   int start_line)
 {
@@ -1495,7 +1495,7 @@ view_load (WView *view, const char *command, const char *file,
     int fd = -1;
     char tmp[BUF_MEDIUM];
     struct stat st;
-    bool retval = FALSE;
+    gboolean retval = FALSE;
 
     assert (view->bytes_per_line != 0);
     view_done (view);
@@ -2139,7 +2139,7 @@ view_handle_editkey (WView *view, int key)
     return MSG_HANDLED;
 }
 
-static bool
+static gboolean
 view_hexedit_save_changes (WView *view)
 {
     struct hexedit_change_node *curr, *next;
@@ -2196,7 +2196,7 @@ view_hexedit_save_changes (WView *view)
 
 /* {{{ Miscellaneous functions }}} */
 
-static bool
+static gboolean
 view_ok_to_quit (WView *view)
 {
     int r;
@@ -3320,7 +3320,7 @@ int
 mc_internal_viewer (const char *command, const char *file,
 	int *move_dir_p, int start_line)
 {
-    bool succeeded;
+    gboolean succeeded;
     WView *wview;
     WButtonBar *bar;
     Dlg_head *view_dlg;
diff --git a/src/view.h b/src/view.h
index 832e768..2b2a6cf 100644
--- a/src/view.h
+++ b/src/view.h
@@ -11,7 +11,7 @@ extern WView *view_new (int y, int x, int cols, int lines, int is_panel);
  * {command} and ignores {file}. If {command} is NULL, loads the
  * {file}. If the {file} is also NULL, loads nothing. If {start_line}
  * is positive, the output is shown starting in that line. */
-extern bool view_load (WView *view, const char *command, const char *file,
+extern int view_load (WView *view, const char *command, const char *file,
 	int start_line);
 
 /* Shows {file} or the output of {command} in the internal viewer,
diff --git a/src/widget.c b/src/widget.c
index ff41515..909a6c1 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -71,7 +71,7 @@ static int button_event (Gpm_Event *event, void *);
 int quote = 0;
 
 static void
-widget_selectcolor (Widget *w, bool focused, bool hotkey)
+widget_selectcolor (Widget *w, gboolean focused, gboolean hotkey)
 {
     Dlg_head *h = w->parent;
 
@@ -360,7 +360,7 @@ radio_callback (Widget *w, widget_msg_t msg, int parm)
     case WIDGET_DRAW:
 	for (i = 0; i < r->count; i++) {
 	    register const char *cp;
-	    const bool focused = (i == r->pos && msg == WIDGET_FOCUS);
+	    const gboolean focused = (i == r->pos && msg == WIDGET_FOCUS);
 	    widget_selectcolor (w, focused, FALSE);
 	    widget_move (&r->widget, i, 0);
 
@@ -2284,7 +2284,7 @@ listbox_get_current (WListbox *l, char **string, char **extra)
 }
 
 /* returns TRUE if a function has been called, FALSE otherwise. */
-static bool
+static gboolean
 buttonbar_call (WButtonBar *bb, int i)
 {
     switch (bb->labels[i].tag) {
@@ -2443,7 +2443,7 @@ buttonbar_set_label (Dlg_head *h, int idx, const char *text, voidfn cback)
 }
 
 void
-buttonbar_set_visible (WButtonBar *bb, bool visible)
+buttonbar_set_visible (WButtonBar *bb, gboolean visible)
 {
     bb->visible = visible;
 }
diff --git a/src/widget.h b/src/widget.h
index d7596b1..8c6f781 100644
--- a/src/widget.h
+++ b/src/widget.h
@@ -1,8 +1,6 @@
 #ifndef MC_WIDGET_H
 #define MC_WIDGET_H
 
-#include <mhl/types.h>
-
 #include "dialog.h"		/* Widget */
 
 /* Completion stuff */
@@ -217,7 +215,7 @@ void buttonbar_clear_label (Dlg_head *, int idx);
 void buttonbar_set_label (Dlg_head *, int index, const char *text, voidfn);
 void buttonbar_set_label_data (Dlg_head *h, int idx, const char *text,
 			       buttonbarfn cback, void *data);
-void buttonbar_set_visible (WButtonBar *, bool);
+void buttonbar_set_visible (WButtonBar *, gboolean);
 void buttonbar_redraw (Dlg_head *h);
 
 void free_completions (WInput *);
diff --git a/src/x11conn.c b/src/x11conn.c
index 09a135f..fd2aadd 100644
--- a/src/x11conn.c
+++ b/src/x11conn.c
@@ -44,8 +44,6 @@ typedef int dummy;		/* C99 forbids empty compilation unit */
 #  include <gmodule.h>
 #endif
 
-#include <mhl/types.h>
-
 #include "x11conn.h"
 
 /*** file scope type declarations **************************************/
@@ -78,15 +76,15 @@ static GModule *x11_module;
 
 #endif
 
-static bool handlers_installed = FALSE;
+static gboolean handlers_installed = FALSE;
 
 /* This flag is set as soon as an X11 error is reported. Usually that
  * means that the DISPLAY is not available anymore. We do not try to
  * reconnect, as that would violate the X11 protocol. */
-static bool lost_connection = FALSE;
+static gboolean lost_connection = FALSE;
 
 static jmp_buf x11_exception; /* FIXME: get a better name */
-static bool longjmp_allowed = FALSE;
+static gboolean longjmp_allowed = FALSE;
 
 /*** file private functions ********************************************/
 
@@ -118,7 +116,7 @@ static void install_error_handlers(void)
     handlers_installed = TRUE;
 }
 
-static bool x11_available(void)
+static gboolean x11_available(void)
 {
 #ifdef HAVE_GMODULE
     gchar *x11_module_fname;
diff --git a/vfs/smbfs.c b/vfs/smbfs.c
index 809c37a..ea30ed2 100644
--- a/vfs/smbfs.c
+++ b/vfs/smbfs.c
@@ -74,8 +74,8 @@ extern struct in_addr ipzero;
 static mode_t myumask = 0755;
 extern pstring global_myname;
 static int smbfs_open_connections = 0;
-static bool got_user = FALSE;
-static bool got_pass = FALSE;
+static gboolean got_user = FALSE;
+static gboolean got_pass = FALSE;
 static pstring password;
 static pstring username;
 static struct vfs_class vfs_smbfs_ops;
@@ -439,7 +439,7 @@ typedef struct dir_entry {
 } dir_entry;
 
 typedef struct {
-    bool server_list;
+    gboolean server_list;
     char *dirname;
     char *path;			/* the dir originally passed to smbfs_opendir */
     smbfs_connection *conn;
@@ -453,7 +453,7 @@ static opendir_info
 	*current_share_info,
 	*current_server_info;
 
-static bool first_direntry;
+static gboolean first_direntry;
 
 static dir_entry *
 smbfs_new_dir_entry (const char *name)
@@ -552,7 +552,7 @@ smbfs_loaddir_helper (file_info * finfo, const char *mask, void *entry)
 
 /* takes "/foo/bar/file" and gives malloced "\\foo\\bar\\file" */
 static char *
-smbfs_convert_path (const char *remote_file, bool trailing_asterik)
+smbfs_convert_path (const char *remote_file, gboolean trailing_asterik)
 {
     const char *p, *my_remote;
     char *result;
diff --git a/vfs/utilvfs.c b/vfs/utilvfs.c
index adb9867..cc55d7d 100644
--- a/vfs/utilvfs.c
+++ b/vfs/utilvfs.c
@@ -414,7 +414,7 @@ is_year (char *str, struct tm *tim)
     return 1;
 }
 
-bool
+gboolean
 vfs_parse_filetype (const char *s, size_t *ret_skipped, mode_t *ret_type)
 {
     mode_t type;
@@ -451,7 +451,7 @@ vfs_parse_filetype (const char *s, size_t *ret_skipped, mode_t *ret_type)
     return TRUE;
 }
 
-bool
+gboolean
 vfs_parse_fileperms (const char *s, size_t *ret_skipped, mode_t *ret_perms)
 {
     const char *p;
@@ -521,7 +521,7 @@ vfs_parse_fileperms (const char *s, size_t *ret_skipped, mode_t *ret_perms)
     return TRUE;
 }
 
-bool
+gboolean
 vfs_parse_filemode (const char *s, size_t *ret_skipped,
 		    mode_t *ret_mode)
 {
@@ -544,7 +544,7 @@ vfs_parse_filemode (const char *s, size_t *ret_skipped,
     return TRUE;
 }
 
-bool
+gboolean
 vfs_parse_raw_filemode (const char *s, size_t *ret_skipped,
 		    mode_t *ret_mode)
 {
diff --git a/vfs/utilvfs.h b/vfs/utilvfs.h
index 75316bc..d025503 100644
--- a/vfs/utilvfs.h
+++ b/vfs/utilvfs.h
@@ -3,8 +3,6 @@
 
 #include <sys/stat.h>
 
-#include <mhl/types.h>
-
 /* Flags for vfs_split_url() */
 #define URL_ALLOW_ANON 1
 #define URL_NOSLASH 2
@@ -20,13 +18,13 @@ int vfs_mkstemps (char **pname, const char *prefix, const char *basename);
 void vfs_die (const char *msg);
 char *vfs_get_password (const char *msg);
 
-bool vfs_parse_filetype (const char *s, size_t *ret_skipped,
+gboolean vfs_parse_filetype (const char *s, size_t *ret_skipped,
 			     mode_t *ret_type);
-bool vfs_parse_fileperms (const char *s, size_t *ret_skipped,
+gboolean vfs_parse_fileperms (const char *s, size_t *ret_skipped,
 			      mode_t *ret_perms);
-bool vfs_parse_filemode (const char *s, size_t *ret_skipped,
+gboolean vfs_parse_filemode (const char *s, size_t *ret_skipped,
 			     mode_t *ret_mode);
-bool vfs_parse_raw_filemode (const char *s, size_t *ret_skipped,
+gboolean vfs_parse_raw_filemode (const char *s, size_t *ret_skipped,
 			     mode_t *ret_mode);
 
 int vfs_parse_ls_lga (const char *p, struct stat *s, char **filename,

-- 
Midnight Commander Development



More information about the mc-devel mailing list