1
1

Reverted the use of bool in favour of gboolean

Signed-off-by: Patrick Winnertz <winnie@debian.org>
Этот коммит содержится в:
Patrick Winnertz 2009-02-05 23:46:07 +01:00
родитель 281652cc23
Коммит ae987b923e
21 изменённых файлов: 97 добавлений и 114 удалений

Просмотреть файл

@ -59,7 +59,7 @@ typedef struct Config {
typedef struct Command { typedef struct Command {
const char *name; const char *name;
bool (*handler) (config_t *cfg, int argc, char *argv[]); int (*handler) (config_t *cfg, int argc, char *argv[]);
} command_t; } command_t;
static char error_msg[200] = "Nobody see this"; static char error_msg[200] = "Nobody see this";
@ -255,7 +255,7 @@ cfg_free_maps(config_t *cfg)
static GPtrArray * static GPtrArray *
split_line(char *str) split_line(char *str)
{ {
bool inside_quote = FALSE; gboolean inside_quote = FALSE;
int move = 0; int move = 0;
GPtrArray *args; GPtrArray *args;
@ -345,7 +345,7 @@ keymap_add(GArray *keymap, int key, int cmd)
} }
/* bind <key> <command> */ /* bind <key> <command> */
static bool static gboolean
cmd_bind(config_t *cfg, int argc, char *argv[]) cmd_bind(config_t *cfg, int argc, char *argv[])
{ {
char *keyname, *command; char *keyname, *command;
@ -471,7 +471,7 @@ static void edit_my_define (Dlg_head * h, int idx, const char *text,
#endif #endif
/* label <number> <command> <label> */ /* label <number> <command> <label> */
static bool static gboolean
cmd_label(config_t *cfg, int argc, char *argv[]) cmd_label(config_t *cfg, int argc, char *argv[])
{ {
const name_map_t *cmd = command_names; 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) parse_file(config_t *cfg, const char *file, const command_t *cmd)
{ {
char buf[200]; char buf[200];
@ -568,7 +568,7 @@ parse_file(config_t *cfg, const char *file, const command_t *cmd)
return TRUE; return TRUE;
} }
static bool static gboolean
load_user_keymap(config_t *cfg, const char *file) load_user_keymap(config_t *cfg, const char *file)
{ {
const command_t cmd[] = { const command_t cmd[] = {
@ -588,7 +588,7 @@ load_user_keymap(config_t *cfg, const char *file)
return TRUE; return TRUE;
} }
bool gboolean
edit_load_user_map(WEdit *edit) edit_load_user_map(WEdit *edit)
{ {
static config_t cfg; static config_t cfg;

Просмотреть файл

@ -1,13 +1,11 @@
#ifndef MC_USERMAP_H #ifndef MC_USERMAP_H
#define MC_USERMAP_H #define MC_USERMAP_H
#include <mhl/types.h>
#define MC_USERMAP ".mc/cedit/cooledit.bindings" #define MC_USERMAP ".mc/cedit/cooledit.bindings"
#include "edit.h" #include "edit.h"
/* load user map */ /* load user map */
bool edit_load_user_map(WEdit *); gboolean edit_load_user_map(WEdit *);
#endif #endif

Просмотреть файл

@ -29,13 +29,11 @@
#include <locale.h> #include <locale.h>
#include <stdio.h> #include <stdio.h>
#include <mhl/types.h>
#include "global.h" #include "global.h"
#include "ecs.h" #include "ecs.h"
#ifdef EXTCHARSET_ENABLED #ifdef EXTCHARSET_ENABLED
static bool static gboolean
change_locale(const char *loc) change_locale(const char *loc)
{ {
const char *ident; const char *ident;
@ -67,7 +65,7 @@ test_locale_en_US_UTF_8(void)
const char *teststr_c = "Zuckert\374te"; const char *teststr_c = "Zuckert\374te";
ecs_char *ecs; ecs_char *ecs;
char *mbs; char *mbs;
bool valid; gboolean valid;
if (!change_locale("en_US.UTF-8")) return; if (!change_locale("en_US.UTF-8")) return;

Просмотреть файл

@ -37,7 +37,7 @@
* String type conversion * 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 #ifdef EXTCHARSET_ENABLED
size_t maxlen, len; size_t maxlen, len;
@ -61,7 +61,7 @@ extern bool ecs_mbstr_to_str(ecs_char **ret_str, const char *s)
#endif #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 #ifdef EXTCHARSET_ENABLED
size_t maxlen, len; size_t maxlen, len;
@ -103,57 +103,57 @@ extern bool ecs_str_to_mbstr(char **ret_str, const ecs_char *s)
(cf(c)) (cf(c))
#endif #endif
extern bool ecs_isalnum(ecs_char c) extern gboolean ecs_isalnum(ecs_char c)
{ {
return ECS_CTYPE(iswalnum, isalnum, 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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) ecs_strbox(const ecs_char *s, size_t *ret_width, size_t *ret_height)
{ {
size_t nlines = 0, ncolumns = 0, colindex = 0, i; size_t nlines = 0, ncolumns = 0, colindex = 0, i;

Просмотреть файл

@ -44,8 +44,6 @@ typedef char ecs_char;
# define ECS_STR(s) (s) # define ECS_STR(s) (s)
#endif #endif
#include <mhl/types.h>
/* /*
* String conversion functions between the wide character encoding and * String conversion functions between the wide character encoding and
* the multibyte encoding. The returned strings should be freed using * the multibyte encoding. The returned strings should be freed using
@ -53,24 +51,24 @@ typedef char ecs_char;
* and has been converted, FALSE otherwise. * and has been converted, FALSE otherwise.
*/ */
extern bool ecs_mbstr_to_str(ecs_char **ret_str, const char *); extern gboolean 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_str_to_mbstr(char **ret_str, const ecs_char *);
/* /*
* Replacements for the ISO C90 <ctype.h> functions. * Replacements for the ISO C90 <ctype.h> functions.
*/ */
extern bool ecs_isalnum(ecs_char); extern gboolean ecs_isalnum(ecs_char);
extern bool ecs_isalpha(ecs_char); extern gboolean ecs_isalpha(ecs_char);
extern bool ecs_iscntrl(ecs_char); extern gboolean ecs_iscntrl(ecs_char);
extern bool ecs_isdigit(ecs_char); extern gboolean ecs_isdigit(ecs_char);
extern bool ecs_isgraph(ecs_char); extern gboolean ecs_isgraph(ecs_char);
extern bool ecs_islower(ecs_char); extern gboolean ecs_islower(ecs_char);
extern bool ecs_isprint(ecs_char); extern gboolean ecs_isprint(ecs_char);
extern bool ecs_ispunct(ecs_char); extern gboolean ecs_ispunct(ecs_char);
extern bool ecs_isspace(ecs_char); extern gboolean ecs_isspace(ecs_char);
extern bool ecs_isupper(ecs_char); extern gboolean ecs_isupper(ecs_char);
extern bool ecs_isxdigit(ecs_char); extern gboolean ecs_isxdigit(ecs_char);
/* /*
* Replacements for the ISO C90 <string.h> functions. * 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 * displayed on screen. Returns TRUE if all characters in the string are
* either '\n' or printable, according to the current locale. If the * either '\n' or printable, according to the current locale. If the
* return value is FALSE, ''width'' and ''height'' are not modified. */ * 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); size_t *ret_height);
#endif #endif

Просмотреть файл

@ -50,7 +50,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <mhl/types.h>
#include <mhl/memory.h> #include <mhl/memory.h>
#include <mhl/escape.h> #include <mhl/escape.h>
#include <mhl/string.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; struct stat src_stats, dst_stats;
int return_status = FILE_CONT; int return_status = FILE_CONT;
bool copy_done = FALSE; gboolean copy_done = FALSE;
if (file_progress_show_source (ctx, s) == FILE_ABORT if (file_progress_show_source (ctx, s) == FILE_ABORT
|| file_progress_show_target (ctx, d) == FILE_ABORT) || file_progress_show_target (ctx, d) == FILE_ABORT)

Просмотреть файл

@ -145,7 +145,7 @@ static void get_list_info (char **file, char **dir) {
static regex_t *r; /* Pointer to compiled content_pattern */ static regex_t *r; /* Pointer to compiled content_pattern */
static int case_sensitive = 1; static int case_sensitive = 1;
static bool find_regex_flag = TRUE; static gboolean find_regex_flag = TRUE;
static int find_recursively = 1; static int find_recursively = 1;
/* /*

Просмотреть файл

@ -184,7 +184,7 @@ inline static int add_selects (fd_set *select_set)
static void check_selects (fd_set *select_set) static void check_selects (fd_set *select_set)
{ {
SelectList *p; SelectList *p;
bool retry; gboolean retry;
if (disabled_channels) if (disabled_channels)
return; return;

Просмотреть файл

@ -35,11 +35,11 @@
/*** file scope functions **********************************************/ /*** file scope functions **********************************************/
static bool static gboolean
is_logging_enabled(void) is_logging_enabled(void)
{ {
static bool logging_initialized = FALSE; static gboolean logging_initialized = FALSE;
static bool logging_enabled = FALSE; static gboolean logging_enabled = FALSE;
char *mc_ini; char *mc_ini;
if (!logging_initialized) { if (!logging_initialized) {

Просмотреть файл

@ -746,7 +746,7 @@ process_special_dirs(GList ** special_dirs, char *file)
g_free(buffer); g_free(buffer);
} }
static bool static gboolean
should_skip_directory(const char *dir) should_skip_directory(const char *dir)
{ {
static GList *special_dirs; static GList *special_dirs;

Просмотреть файл

@ -29,8 +29,6 @@
#include <signal.h> #include <signal.h>
#include <stdarg.h> #include <stdarg.h>
#include <mhl/types.h>
#include "global.h" #include "global.h"
#include "color.h" #include "color.h"
#include "main.h" /* for slow_terminal */ #include "main.h" /* for slow_terminal */
@ -89,10 +87,10 @@ tty_disable_interrupt_key(void)
sigaction (SIGINT, &act, NULL); sigaction (SIGINT, &act, NULL);
} }
extern bool extern gboolean
tty_got_interrupt(void) tty_got_interrupt(void)
{ {
bool rv; gboolean rv;
rv = (got_interrupt != 0); rv = (got_interrupt != 0);
got_interrupt = 0; got_interrupt = 0;

Просмотреть файл

@ -25,13 +25,11 @@
#endif /* WANT_TERM_H */ #endif /* WANT_TERM_H */
#endif /* USE_NCURSES */ #endif /* USE_NCURSES */
#include <mhl/types.h>
/* {{{ Input }}} */ /* {{{ Input }}} */
extern void tty_enable_interrupt_key(void); extern void tty_enable_interrupt_key(void);
extern void tty_disable_interrupt_key(void); extern void tty_disable_interrupt_key(void);
extern bool tty_got_interrupt(void); extern gboolean tty_got_interrupt(void);
/* {{{ Output }}} */ /* {{{ Output }}} */

Просмотреть файл

@ -723,7 +723,7 @@ mc_realpath (const char *path, char resolved_path[])
/* Return the index of the permissions triplet */ /* Return the index of the permissions triplet */
int int
get_user_permissions (struct stat *st) { get_user_permissions (struct stat *st) {
static bool initialized = FALSE; static gboolean initialized = FALSE;
static gid_t *groups; static gid_t *groups;
static int ngroups; static int ngroups;
static uid_t uid; static uid_t uid;

Просмотреть файл

@ -145,23 +145,23 @@ struct WView {
size_t ds_string_len; /* The length of the string */ size_t ds_string_len; /* The length of the string */
/* Growing buffers information */ /* 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 */ byte **growbuf_blockptr; /* Pointer to the block pointers */
size_t growbuf_blocks; /* The number of blocks in *block_ptr */ size_t growbuf_blocks; /* The number of blocks in *block_ptr */
size_t growbuf_lastindex; /* Number of bytes in the last page of the size_t growbuf_lastindex; /* Number of bytes in the last page of the
growing buffer */ growing buffer */
bool growbuf_finished; /* TRUE when all data has been read. */ gboolean growbuf_finished; /* TRUE when all data has been read. */
/* Editor modes */ /* Editor modes */
bool hex_mode; /* Hexview or Hexedit */ gboolean hex_mode; /* Hexview or Hexedit */
bool hexedit_mode; /* Hexedit */ gboolean hexedit_mode; /* Hexedit */
bool hexview_in_text; /* Is the hexview cursor in the text area? */ gboolean hexview_in_text; /* Is the hexview cursor in the text area? */
bool text_nroff_mode; /* Nroff-style highlighting */ gboolean text_nroff_mode; /* Nroff-style highlighting */
bool text_wrap_mode; /* Wrap text lines to fit them on the screen */ gboolean text_wrap_mode; /* Wrap text lines to fit them on the screen */
bool magic_mode; /* Preprocess the file using external programs */ gboolean magic_mode; /* Preprocess the file using external programs */
/* Additional editor state */ /* 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 */ GArray *coord_cache; /* Cache for mapping offsets to cursor positions */
/* Display information */ /* Display information */
@ -179,7 +179,7 @@ struct WView {
struct area data_area; /* Where the data is displayed */ struct area data_area; /* Where the data is displayed */
int dirty; /* Number of skipped updates */ 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 */ /* Mode variables */
int bytes_per_line; /* Number of bytes per line in hex mode */ int bytes_per_line; /* Number of bytes per line in hex mode */
@ -191,7 +191,7 @@ struct WView {
int direction; /* 1= forward; -1 backward */ int direction; /* 1= forward; -1 backward */
void (*last_search)(WView *); void (*last_search)(WView *);
/* Pointer to the last search command */ /* Pointer to the last search command */
bool want_to_quit; /* Prepare for cleanup ... */ gboolean want_to_quit; /* Prepare for cleanup ... */
/* Markers */ /* Markers */
int marker; /* mark to use */ int marker; /* mark to use */
@ -282,7 +282,7 @@ offset_rounddown (offset_type a, offset_type b)
/* {{{ Simple Primitive Functions for WView }}} */ /* {{{ Simple Primitive Functions for WView }}} */
static inline bool static inline gboolean
view_is_in_panel (WView *view) view_is_in_panel (WView *view)
{ {
return (view->dpy_frame_size != 0); return (view->dpy_frame_size != 0);
@ -402,7 +402,7 @@ view_growbuf_read_until (WView *view, offset_type ofs)
ssize_t nread; ssize_t nread;
byte *p; byte *p;
size_t bytesfree; size_t bytesfree;
bool short_read; gboolean short_read;
assert (view->growbuf_in_use); 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) view_may_still_grow (WView *view)
{ {
return (view->growbuf_in_use && !view->growbuf_finished); 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 /* returns TRUE if the idx lies in the half-open interval
* [offset; offset + size), FALSE otherwise. * [offset; offset + size), FALSE otherwise.
*/ */
static inline bool static inline gboolean
already_loaded (offset_type offset, offset_type idx, size_t size) already_loaded (offset_type offset, offset_type idx, size_t size)
{ {
return (offset <= idx && idx - offset < size); return (offset <= idx && idx - offset < size);
@ -742,10 +742,10 @@ enum ccache_type {
CCACHE_LINECOL CCACHE_LINECOL
}; };
static inline bool static inline gboolean
coord_cache_entry_less (const struct coord_cache_entry *a, coord_cache_entry_less (const struct coord_cache_entry *a,
const struct coord_cache_entry *b, enum ccache_type crit, const struct coord_cache_entry *b, enum ccache_type crit,
bool nroff_mode) gboolean nroff_mode)
{ {
if (crit == CCACHE_OFFSET) if (crit == CCACHE_OFFSET)
return (a->cc_offset < b->cc_offset); return (a->cc_offset < b->cc_offset);
@ -831,7 +831,7 @@ view_ccache_dump (WView *view)
} }
#endif #endif
static inline bool static inline gboolean
is_nroff_sequence (WView *view, offset_type offset) is_nroff_sequence (WView *view, offset_type offset)
{ {
int c0, c1, c2; int c0, c1, c2;
@ -1091,7 +1091,7 @@ view_scroll_to_cursor (WView *view)
} }
static void static void
view_movement_fixups (WView *view, bool reset_search) view_movement_fixups (WView *view, gboolean reset_search)
{ {
view_scroll_to_cursor (view); view_scroll_to_cursor (view);
if (reset_search) { 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) view_load_command_output (WView *view, const char *command)
{ {
FILE *fp; FILE *fp;
@ -1487,7 +1487,7 @@ view_load_command_output (WView *view, const char *command)
return TRUE; return TRUE;
} }
bool gboolean
view_load (WView *view, const char *command, const char *file, view_load (WView *view, const char *command, const char *file,
int start_line) int start_line)
{ {
@ -1495,7 +1495,7 @@ view_load (WView *view, const char *command, const char *file,
int fd = -1; int fd = -1;
char tmp[BUF_MEDIUM]; char tmp[BUF_MEDIUM];
struct stat st; struct stat st;
bool retval = FALSE; gboolean retval = FALSE;
assert (view->bytes_per_line != 0); assert (view->bytes_per_line != 0);
view_done (view); view_done (view);
@ -2139,7 +2139,7 @@ view_handle_editkey (WView *view, int key)
return MSG_HANDLED; return MSG_HANDLED;
} }
static bool static gboolean
view_hexedit_save_changes (WView *view) view_hexedit_save_changes (WView *view)
{ {
struct hexedit_change_node *curr, *next; struct hexedit_change_node *curr, *next;
@ -2196,7 +2196,7 @@ view_hexedit_save_changes (WView *view)
/* {{{ Miscellaneous functions }}} */ /* {{{ Miscellaneous functions }}} */
static bool static gboolean
view_ok_to_quit (WView *view) view_ok_to_quit (WView *view)
{ {
int r; int r;
@ -3320,7 +3320,7 @@ int
mc_internal_viewer (const char *command, const char *file, mc_internal_viewer (const char *command, const char *file,
int *move_dir_p, int start_line) int *move_dir_p, int start_line)
{ {
bool succeeded; gboolean succeeded;
WView *wview; WView *wview;
WButtonBar *bar; WButtonBar *bar;
Dlg_head *view_dlg; Dlg_head *view_dlg;

Просмотреть файл

@ -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 * {command} and ignores {file}. If {command} is NULL, loads the
* {file}. If the {file} is also NULL, loads nothing. If {start_line} * {file}. If the {file} is also NULL, loads nothing. If {start_line}
* is positive, the output is shown starting in that 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); int start_line);
/* Shows {file} or the output of {command} in the internal viewer, /* Shows {file} or the output of {command} in the internal viewer,

Просмотреть файл

@ -71,7 +71,7 @@ static int button_event (Gpm_Event *event, void *);
int quote = 0; int quote = 0;
static void static void
widget_selectcolor (Widget *w, bool focused, bool hotkey) widget_selectcolor (Widget *w, gboolean focused, gboolean hotkey)
{ {
Dlg_head *h = w->parent; Dlg_head *h = w->parent;
@ -360,7 +360,7 @@ radio_callback (Widget *w, widget_msg_t msg, int parm)
case WIDGET_DRAW: case WIDGET_DRAW:
for (i = 0; i < r->count; i++) { for (i = 0; i < r->count; i++) {
register const char *cp; 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_selectcolor (w, focused, FALSE);
widget_move (&r->widget, i, 0); 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. */ /* returns TRUE if a function has been called, FALSE otherwise. */
static bool static gboolean
buttonbar_call (WButtonBar *bb, int i) buttonbar_call (WButtonBar *bb, int i)
{ {
switch (bb->labels[i].tag) { switch (bb->labels[i].tag) {
@ -2443,7 +2443,7 @@ buttonbar_set_label (Dlg_head *h, int idx, const char *text, voidfn cback)
} }
void void
buttonbar_set_visible (WButtonBar *bb, bool visible) buttonbar_set_visible (WButtonBar *bb, gboolean visible)
{ {
bb->visible = visible; bb->visible = visible;
} }

Просмотреть файл

@ -1,8 +1,6 @@
#ifndef MC_WIDGET_H #ifndef MC_WIDGET_H
#define MC_WIDGET_H #define MC_WIDGET_H
#include <mhl/types.h>
#include "dialog.h" /* Widget */ #include "dialog.h" /* Widget */
/* Completion stuff */ /* 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 (Dlg_head *, int index, const char *text, voidfn);
void buttonbar_set_label_data (Dlg_head *h, int idx, const char *text, void buttonbar_set_label_data (Dlg_head *h, int idx, const char *text,
buttonbarfn cback, void *data); buttonbarfn cback, void *data);
void buttonbar_set_visible (WButtonBar *, bool); void buttonbar_set_visible (WButtonBar *, gboolean);
void buttonbar_redraw (Dlg_head *h); void buttonbar_redraw (Dlg_head *h);
void free_completions (WInput *); void free_completions (WInput *);

Просмотреть файл

@ -44,8 +44,6 @@ typedef int dummy; /* C99 forbids empty compilation unit */
# include <gmodule.h> # include <gmodule.h>
#endif #endif
#include <mhl/types.h>
#include "x11conn.h" #include "x11conn.h"
/*** file scope type declarations **************************************/ /*** file scope type declarations **************************************/
@ -78,15 +76,15 @@ static GModule *x11_module;
#endif #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 /* 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 * means that the DISPLAY is not available anymore. We do not try to
* reconnect, as that would violate the X11 protocol. */ * 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 jmp_buf x11_exception; /* FIXME: get a better name */
static bool longjmp_allowed = FALSE; static gboolean longjmp_allowed = FALSE;
/*** file private functions ********************************************/ /*** file private functions ********************************************/
@ -118,7 +116,7 @@ static void install_error_handlers(void)
handlers_installed = TRUE; handlers_installed = TRUE;
} }
static bool x11_available(void) static gboolean x11_available(void)
{ {
#ifdef HAVE_GMODULE #ifdef HAVE_GMODULE
gchar *x11_module_fname; gchar *x11_module_fname;

Просмотреть файл

@ -74,8 +74,8 @@ extern struct in_addr ipzero;
static mode_t myumask = 0755; static mode_t myumask = 0755;
extern pstring global_myname; extern pstring global_myname;
static int smbfs_open_connections = 0; static int smbfs_open_connections = 0;
static bool got_user = FALSE; static gboolean got_user = FALSE;
static bool got_pass = FALSE; static gboolean got_pass = FALSE;
static pstring password; static pstring password;
static pstring username; static pstring username;
static struct vfs_class vfs_smbfs_ops; static struct vfs_class vfs_smbfs_ops;
@ -439,7 +439,7 @@ typedef struct dir_entry {
} dir_entry; } dir_entry;
typedef struct { typedef struct {
bool server_list; gboolean server_list;
char *dirname; char *dirname;
char *path; /* the dir originally passed to smbfs_opendir */ char *path; /* the dir originally passed to smbfs_opendir */
smbfs_connection *conn; smbfs_connection *conn;
@ -453,7 +453,7 @@ static opendir_info
*current_share_info, *current_share_info,
*current_server_info; *current_server_info;
static bool first_direntry; static gboolean first_direntry;
static dir_entry * static dir_entry *
smbfs_new_dir_entry (const char *name) 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" */ /* takes "/foo/bar/file" and gives malloced "\\foo\\bar\\file" */
static char * 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; const char *p, *my_remote;
char *result; char *result;

Просмотреть файл

@ -414,7 +414,7 @@ is_year (char *str, struct tm *tim)
return 1; return 1;
} }
bool gboolean
vfs_parse_filetype (const char *s, size_t *ret_skipped, mode_t *ret_type) vfs_parse_filetype (const char *s, size_t *ret_skipped, mode_t *ret_type)
{ {
mode_t type; mode_t type;
@ -451,7 +451,7 @@ vfs_parse_filetype (const char *s, size_t *ret_skipped, mode_t *ret_type)
return TRUE; return TRUE;
} }
bool gboolean
vfs_parse_fileperms (const char *s, size_t *ret_skipped, mode_t *ret_perms) vfs_parse_fileperms (const char *s, size_t *ret_skipped, mode_t *ret_perms)
{ {
const char *p; const char *p;
@ -521,7 +521,7 @@ vfs_parse_fileperms (const char *s, size_t *ret_skipped, mode_t *ret_perms)
return TRUE; return TRUE;
} }
bool gboolean
vfs_parse_filemode (const char *s, size_t *ret_skipped, vfs_parse_filemode (const char *s, size_t *ret_skipped,
mode_t *ret_mode) mode_t *ret_mode)
{ {
@ -544,7 +544,7 @@ vfs_parse_filemode (const char *s, size_t *ret_skipped,
return TRUE; return TRUE;
} }
bool gboolean
vfs_parse_raw_filemode (const char *s, size_t *ret_skipped, vfs_parse_raw_filemode (const char *s, size_t *ret_skipped,
mode_t *ret_mode) mode_t *ret_mode)
{ {

Просмотреть файл

@ -3,8 +3,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <mhl/types.h>
/* Flags for vfs_split_url() */ /* Flags for vfs_split_url() */
#define URL_ALLOW_ANON 1 #define URL_ALLOW_ANON 1
#define URL_NOSLASH 2 #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); void vfs_die (const char *msg);
char *vfs_get_password (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); 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); 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); 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); mode_t *ret_mode);
int vfs_parse_ls_lga (const char *p, struct stat *s, char **filename, int vfs_parse_ls_lga (const char *p, struct stat *s, char **filename,