emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115529: Use bool for boolean, focusing on headers.


From: Paul Eggert
Subject: [Emacs-diffs] trunk r115529: Use bool for boolean, focusing on headers.
Date: Sat, 14 Dec 2013 21:36:52 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115529
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sat 2013-12-14 13:36:44 -0800
message:
  Use bool for boolean, focusing on headers.
  
  * configure.ac (PTY_OPEN, GC_MARK_SECONDARY_STACK):
  Use bool for boolean.
  * lib-src/emacsclient.c, lib-src/etags.c, lib-src/hexl.c (FALSE, TRUE):
  Remove.  All uses replaced with uncapitalized version.
  * lib-src/emacsclient.c (message):
  * lib-src/etags.c (make_tag, pfnote, consider_token, make_C_tag, lang_names):
  * lib-src/hexl.c (un_flag, iso_flag, endian):
  * lib-src/pop.c (pop_debug, pop_open, pop_multi_first, pop_multi_next)
  (pop_trash):
  Use bool for boolean.
  * lib-src/etags.c (bool): Remove.
  * lib-src/etags.c (globals, members, declarations, no_line_directive)
  (no_duplicates): Use 'int' for boolean values that getopt requires
  to be 'int'.  Formerly, these were 'bool' and 'bool' was 'int',
  but we can no longer rely on this implementation.
  * lib-src/pop.h (struct _popserver): Use bool_bf for boolean bit-fields.
  * lwlib/xlwmenuP.h (XlwMenu_part): Use bool_bf for boolean bit-fields.
  * src/atimer.h, src/lisp.h, src/syssignal.h, src/syswait.h, src/unexelf.c:
  No need to include <stdbool.h>, since conf_post.h does it now.
  * src/buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
  (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
  (SET_PER_BUFFER_VALUE_P):
  * src/ccl.c, src/ccl.h (setup_ccl_program):
  * src/ccl.h (CHECK_CCL_PROGRAM):
  * src/character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
  (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
  (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
  (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
  (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
  (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
  (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
  * src/charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
  (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
  (CHARSET_FAST_MAP_SET):
  * src/coding.c (decode_coding_ccl, encode_coding_ccl):
  * src/coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
  (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
  (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
  (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
  (decode_coding_c_string):
  * src/composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
  * src/conf_post.h (has_attribute):
  * src/dispextern.h (trace_redisplay_p):
  (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
  (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
  (SET_GLYPH_FROM_CHAR_GLYPH):
  (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
  (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
  (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
  (cursor_in_mouse_face_p):
  * src/dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
  (blank_row, prepare_desired_row)
  (build_frame_matrix_from_leaf_window, make_current)
  (mirror_make_current, mirrored_line_dance, mirror_line_dance)
  (update_window, scrolling_window, update_frame_line):
  * src/disptab.h (GLYPH_FOLLOW_ALIASES):
  * src/editfns.c (Fformat):
  * src/font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
  (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
  (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
  (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
  (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
  (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
  (FONT_DEFERRED_LOG):
  * src/frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P):
  (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
  (FRAME_MOUSE_UPDATE):
  * src/fringe.c (Fdefine_fringe_bitmap):
  * src/image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
  (x_create_bitmap_from_xpm_data, xpm_load_image):
  * src/intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
  (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
  (MERGE_INTERVAL_CACHE):
  * src/keymap.h (KEYMAPP):
  * src/lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
  (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
  (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
  (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
  (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
  (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
  (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
  (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
  * src/syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
  (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
  (SETUP_BUFFER_SYNTAX_TABLE):
  * src/systime.h (timespec_valid_p):
  * src/term.c (save_and_enable_current_matrix):
  * src/window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
  * src/xdisp.c (in_display_vector_p, display_tool_bar_line)
  (redisplay_internal, try_window_reusing_current_matrix)
  (sync_frame_with_window_matrix_rows, try_window_id)
  (display_menu_bar, display_tty_menu_item, display_mode_line)
  (coords_in_mouse_face_p, cursor_in_mouse_face_p):
  * src/xmenu.c (xmenu_show):
  * src/xterm.c (use_xim, x_term_init):
  * src/xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
  (struct x_bitmap_record):
  Use bool for booleans.
  * src/ccl.c (struct buffer_text):
  * src/ccl.h (struct ccl_program):
  * src/charset.h (struct charset):
  * src/cm.h (struct cm):
  * src/coding.h (struct iso_2022_spec, struct coding_system):
  * src/dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
  (struct glyph_string, struct face, struct face_cache)
  (struct bidi_string_data, struct bidi_it)
  (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
  (struct image):
  * src/editfns.c (Fformat):
  * src/frame.h (struct frame):
  * src/fringe.c (struct fringe_bitmap):
  * src/intervals.h (struct interval):
  * src/keyboard.h (struct kboard):
  * src/lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
  (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
  (struct Lisp_Buffer_Local_Value, union specbinding):
  * src/macfont.m (struct macfont_info):
  * src/process.h (struct Lisp_Process):
  * src/termchar.h (struct tty_display_info):
  * src/window.h (struct window):
  * src/xterm.h (struct x_output):
  Use bool_bf for boolean bit-fields.
  * src/ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
  All callers changed.
  * src/ccl.h (struct ccl_program): Remove unused members private_state,
  src_multibyte, dst_multibyte, cr_consumed, suppress_error,
  eight_bit_control.
  (struct ccl_spec): Remove unused members cr_carryover,
  eight_bit_carryover.
  * src/conf_post.h: Include <stdbool.h>.
  (bool_bf): New type.
  * src/dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
  * src/interval.h (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE)
  Surround statement macro with proper 'do { ... } while (false)' brackets.
  (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
  (PRODUCE_GLYPHS): Simplify use of boolean.
  * src/fileio.c (Fcopy_file):
  If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
  * src/lisp.h (UNGCPRO): Return void, not int.
  (FOR_EACH_TAIL): Use void expression, not int expression.
  * src/region-cache.c: Reindent.
  * src/region-cache.h: Copy comments from region-cache.c, to fix
  incorrect remarks about booleans.
modified:
  ChangeLog                      changelog-20091113204419-o5vbwnq5f7feedwu-1538
  configure.ac                   
configure.in-20091113204419-o5vbwnq5f7feedwu-783
  lib-src/ChangeLog              changelog-20091113204419-o5vbwnq5f7feedwu-1608
  lib-src/emacsclient.c          
emacsclient.c-20091113204419-o5vbwnq5f7feedwu-283
  lib-src/etags.c                etags.c-20091113204419-o5vbwnq5f7feedwu-216
  lib-src/hexl.c                 hexl.c-20091113204419-o5vbwnq5f7feedwu-34
  lib-src/pop.c                  pop.c-20091113204419-o5vbwnq5f7feedwu-792
  lib-src/pop.h                  pop.h-20091113204419-o5vbwnq5f7feedwu-793
  lwlib/ChangeLog                changelog-20091113204419-o5vbwnq5f7feedwu-1447
  lwlib/xlwmenuP.h               xlwmenup.h-20091113204419-o5vbwnq5f7feedwu-776
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/atimer.h                   atimer.h-20091113204419-o5vbwnq5f7feedwu-1760
  src/buffer.h                   buffer.h-20091113204419-o5vbwnq5f7feedwu-196
  src/ccl.c                      ccl.c-20091113204419-o5vbwnq5f7feedwu-1073
  src/ccl.h                      ccl.h-20091113204419-o5vbwnq5f7feedwu-1074
  src/character.h                
character.h-20091113204419-o5vbwnq5f7feedwu-8538
  src/charset.h                  charset.h-20091113204419-o5vbwnq5f7feedwu-1076
  src/cm.h                       cm.h-20091113204419-o5vbwnq5f7feedwu-435
  src/coding.c                   coding.c-20091113204419-o5vbwnq5f7feedwu-1077
  src/coding.h                   coding.h-20091113204419-o5vbwnq5f7feedwu-1078
  src/composite.h                
composite.h-20091113204419-o5vbwnq5f7feedwu-1729
  src/conf_post.h                conf_post.h-20120730211826-q0qbxxwh2emw52hd-1
  src/dispextern.h               
dispextern.h-20091113204419-o5vbwnq5f7feedwu-218
  src/dispnew.c                  dispnew.c-20091113204419-o5vbwnq5f7feedwu-258
  src/disptab.h                  disptab.h-20091113204419-o5vbwnq5f7feedwu-411
  src/editfns.c                  editfns.c-20091113204419-o5vbwnq5f7feedwu-255
  src/fileio.c                   fileio.c-20091113204419-o5vbwnq5f7feedwu-210
  src/font.h                     font.h-20091113204419-o5vbwnq5f7feedwu-8541
  src/frame.h                    frame.h-20091113204419-o5vbwnq5f7feedwu-229
  src/fringe.c                   fringe.c-20091113204419-o5vbwnq5f7feedwu-2965
  src/gnutls.h                   gnutls.h-20100926054902-dzayyj6wycit6kzn-4
  src/image.c                    image.c-20091113204419-o5vbwnq5f7feedwu-2969
  src/intervals.h                intervals.h-20091113204419-o5vbwnq5f7feedwu-520
  src/keyboard.h                 keyboard.h-20091113204419-o5vbwnq5f7feedwu-450
  src/keymap.h                   keymap.h-20091113204419-o5vbwnq5f7feedwu-2247
  src/lisp.h                     lisp.h-20091113204419-o5vbwnq5f7feedwu-253
  src/macfont.m                  macfont.m-20130915173740-04lgloz0557bz98l-2
  src/process.h                  process.h-20091113204419-o5vbwnq5f7feedwu-272
  src/region-cache.c             
regioncache.c-20091113204419-o5vbwnq5f7feedwu-850
  src/region-cache.h             
regioncache.h-20091113204419-o5vbwnq5f7feedwu-851
  src/syntax.h                   syntax.h-20091113204419-o5vbwnq5f7feedwu-439
  src/syssignal.h                syssignal.h-20091113204419-o5vbwnq5f7feedwu-459
  src/systime.h                  systime.h-20091113204419-o5vbwnq5f7feedwu-510
  src/syswait.h                  syswait.h-20091113204419-o5vbwnq5f7feedwu-623
  src/term.c                     term.c-20091113204419-o5vbwnq5f7feedwu-220
  src/termchar.h                 termchar.h-20091113204419-o5vbwnq5f7feedwu-440
  src/unexelf.c                  unexelf.c-20091113204419-o5vbwnq5f7feedwu-426
  src/window.h                   window.h-20091113204419-o5vbwnq5f7feedwu-271
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
  src/xmenu.c                    xmenu.c-20091113204419-o5vbwnq5f7feedwu-161
  src/xterm.c                    xterm.c-20091113204419-o5vbwnq5f7feedwu-244
  src/xterm.h                    xterm.h-20091113204419-o5vbwnq5f7feedwu-228
=== modified file 'ChangeLog'
--- a/ChangeLog 2013-12-14 09:30:15 +0000
+++ b/ChangeLog 2013-12-14 21:36:44 +0000
@@ -1,3 +1,9 @@
+2013-12-14  Paul Eggert  <address@hidden>
+
+       Use bool for boolean, focusing on headers.
+       * configure.ac (PTY_OPEN, GC_MARK_SECONDARY_STACK):
+       Use bool for boolean.
+
 2013-12-14  Dani Moncayo  <address@hidden>
 
        * configure.ac (srcdir) [MINGW32]: Convert to an absolute MSYS

=== modified file 'configure.ac'
--- a/configure.ac      2013-12-14 09:30:15 +0000
+++ b/configure.ac      2013-12-14 21:36:44 +0000
@@ -4067,7 +4067,7 @@
   cygwin )
     AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)])
     dnl multi-line AC_DEFINEs are hard. :(
-    AC_DEFINE(PTY_OPEN, [ do { int dummy; sigset_t blocked, procmask; 
sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask 
(SIG_BLOCK, &blocked, &procmask); if (-1 == openpty (&fd, &dummy, pty_name, 0, 
0)) fd = -1; pthread_sigmask (SIG_SETMASK, &procmask, 0); if (fd >= 0) 
emacs_close (dummy); } while (0)])
+    AC_DEFINE(PTY_OPEN, [ do { int dummy; sigset_t blocked, procmask; 
sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask 
(SIG_BLOCK, &blocked, &procmask); if (-1 == openpty (&fd, &dummy, pty_name, 0, 
0)) fd = -1; pthread_sigmask (SIG_SETMASK, &procmask, 0); if (fd >= 0) 
emacs_close (dummy); } while (false)])
     AC_DEFINE(PTY_NAME_SPRINTF, [])
     AC_DEFINE(PTY_TTY_NAME_SPRINTF, [])
     ;;
@@ -4080,7 +4080,7 @@
     dnl Note that openpty may fork via grantpt on Mac OS X 10.4/Darwin 8.
     dnl But we don't have to block SIGCHLD because it is blocked in the
     dnl implementation of grantpt.
-    AC_DEFINE(PTY_OPEN, [ do { int slave; if (openpty (&fd, &slave, pty_name, 
NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (0)])
+    AC_DEFINE(PTY_OPEN, [ do { int slave; if (openpty (&fd, &slave, pty_name, 
NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (false)])
     AC_DEFINE(PTY_NAME_SPRINTF, [])
     AC_DEFINE(PTY_TTY_NAME_SPRINTF, [])
     ;;
@@ -4099,7 +4099,7 @@
       AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptyname = 0; sigset_t blocked; 
sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask 
(SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) 
ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if 
(!ptyname) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, 
"%s", ptyname); }])
       dnl if HAVE_POSIX_OPENPT
       if test "x$ac_cv_func_posix_openpt" = xyes; then
-        AC_DEFINE(PTY_OPEN, [do { fd = posix_openpt (O_RDWR | O_CLOEXEC | 
O_NOCTTY); if (fd < 0 && errno == EINVAL) fd = posix_openpt (O_RDWR | 
O_NOCTTY); } while (0)])
+        AC_DEFINE(PTY_OPEN, [do { fd = posix_openpt (O_RDWR | O_CLOEXEC | 
O_NOCTTY); if (fd < 0 && errno == EINVAL) fd = posix_openpt (O_RDWR | 
O_NOCTTY); } while (false)])
         AC_DEFINE(PTY_NAME_SPRINTF, [])
       dnl if HAVE_GETPT
       elif test "x$ac_cv_func_getpt" = xyes; then
@@ -4232,7 +4232,7 @@
 # error "not ia64"
 #endif
       ]], [[]])], AC_DEFINE(GC_MARK_SECONDARY_STACK(),
-        [do { extern void *__libc_ia64_register_backing_store_base; 
__builtin_ia64_flushrs (); mark_memory 
(__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while (0)],
+        [do { extern void *__libc_ia64_register_backing_store_base; 
__builtin_ia64_flushrs (); mark_memory 
(__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while 
(false)],
         [Mark a secondary stack, like the register stack on the ia64.]), [])
     ;;
 

=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2013-11-14 01:52:18 +0000
+++ b/lib-src/ChangeLog 2013-12-14 21:36:44 +0000
@@ -1,3 +1,21 @@
+2013-12-14  Paul Eggert  <address@hidden>
+
+       Use bool for boolean, focusing on headers.
+       * emacsclient.c, etags.c, hexl.c (FALSE, TRUE):
+       Remove.  All uses replaced with uncapitalized version.
+       * emacsclient.c (message):
+       * etags.c (make_tag, pfnote, consider_token, make_C_tag, lang_names):
+       * hexl.c (un_flag, iso_flag, endian):
+       * pop.c (pop_debug, pop_open, pop_multi_first, pop_multi_next)
+       (pop_trash):
+       Use bool for boolean.
+       * etags.c (bool): Remove.
+       * etags.c (globals, members, declarations, no_line_directive)
+       (no_duplicates): Use 'int' for boolean values that getopt requires
+       to be 'int'.  Formerly, these were 'bool' and 'bool' was 'int',
+       but we can no longer rely on this implementation.
+       * pop.h (struct _popserver): Use bool_bf for boolean bit-fields.
+
 2013-11-14  Paul Eggert  <address@hidden>
 
        * ebrowse.c (xstrdup):

=== modified file 'lib-src/emacsclient.c'
--- a/lib-src/emacsclient.c     2013-07-10 23:23:57 +0000
+++ b/lib-src/emacsclient.c     2013-12-14 21:36:44 +0000
@@ -103,14 +103,6 @@
 #define EXIT_FAILURE 1
 #endif
 
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
 /* Additional space when allocating buffers for filenames, etc.  */
 #define EXTRA_SPACE 100
 
@@ -433,9 +425,9 @@
 
 /* Display a normal or error message.
    On Windows, use a message box if compiled as a Windows app.  */
-static void message (int, const char *, ...) ATTRIBUTE_FORMAT_PRINTF (2, 3);
+static void message (bool, const char *, ...) ATTRIBUTE_FORMAT_PRINTF (2, 3);
 static void
-message (int is_error, const char *format, ...)
+message (bool is_error, const char *format, ...)
 {
   va_list args;
 
@@ -528,7 +520,7 @@
          break;
 
        case 'V':
-         message (FALSE, "emacsclient %s\n", VERSION);
+         message (false, "emacsclient %s\n", VERSION);
          exit (EXIT_SUCCESS);
          break;
 
@@ -555,7 +547,7 @@
           break;
 
        default:
-         message (TRUE, "Try `%s --help' for more information\n", progname);
+         message (true, "Try `%s --help' for more information\n", progname);
          exit (EXIT_FAILURE);
          break;
        }
@@ -614,7 +606,7 @@
 
   if (alternate_editor && alternate_editor[0] == '\0')
     {
-      message (TRUE, "--alternate-editor argument or ALTERNATE_EDITOR variable 
cannot be\n\
+      message (true, "--alternate-editor argument or ALTERNATE_EDITOR variable 
cannot be\n\
 an empty string");
       exit (EXIT_FAILURE);
     }
@@ -629,7 +621,7 @@
      message aligns properly both in a tty and in a Windows message box.
      Please try to preserve them; otherwise the output is very hard to read
      when using emacsclientw.  */
-  message (FALSE,
+  message (false,
           "Usage: %s [OPTIONS] FILE...\n%s%s%s", progname, "\
 Tell the Emacs server to visit the specified files.\n\
 Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.\n\
@@ -679,7 +671,7 @@
       int i = optind - 1;
 
       execvp (alternate_editor, main_argv + i);
-      message (TRUE, "%s: error executing alternate editor \"%s\"\n",
+      message (true, "%s: error executing alternate editor \"%s\"\n",
               progname, alternate_editor);
     }
   exit (EXIT_FAILURE);
@@ -693,7 +685,7 @@
 {
   main_argv = argv;
   progname = argv[0];
-  message (TRUE, "%s: Sorry, the Emacs server is supported only\n"
+  message (true, "%s: Sorry, the Emacs server is supported only\n"
           "on systems with Berkeley sockets.\n",
           argv[0]);
   fail ();
@@ -724,11 +716,11 @@
                  | FORMAT_MESSAGE_ARGUMENT_ARRAY,
                  NULL, WSAGetLastError (), 0, (LPTSTR)&msg, 0, NULL);
 
-  message (TRUE, "%s: %s: %s\n", progname, function_name, msg);
+  message (true, "%s: %s: %s\n", progname, function_name, msg);
 
   LocalFree (msg);
 #else
-  message (TRUE, "%s: %s: %s\n", progname, function_name, strerror (errno));
+  message (true, "%s: %s: %s\n", progname, function_name, strerror (errno));
 #endif
 }
 
@@ -759,7 +751,7 @@
          int sent = send (s, send_buffer, sblen, 0);
          if (sent < 0)
            {
-             message (TRUE, "%s: failed to send %d bytes to socket: %s\n",
+             message (true, "%s: failed to send %d bytes to socket: %s\n",
                       progname, sblen, strerror (errno));
              fail ();
            }
@@ -854,25 +846,25 @@
 file_name_absolute_p (const char *filename)
 {
   /* Sanity check, it shouldn't happen.  */
-  if (! filename) return FALSE;
+  if (! filename) return false;
 
   /* /xxx is always an absolute path.  */
-  if (filename[0] == '/') return TRUE;
+  if (filename[0] == '/') return true;
 
   /* Empty filenames (which shouldn't happen) are relative.  */
-  if (filename[0] == '\0') return FALSE;
+  if (filename[0] == '\0') return false;
 
 #ifdef WINDOWSNT
   /* X:\xxx is always absolute.  */
   if (isalpha ((unsigned char) filename[0])
       && filename[1] == ':' && (filename[2] == '\\' || filename[2] == '/'))
-    return TRUE;
+    return true;
 
   /* Both \xxx and \\xxx\yyy are absolute.  */
-  if (filename[0] == '\\') return TRUE;
+  if (filename[0] == '\\') return true;
 #endif
 
-  return FALSE;
+  return false;
 }
 
 #ifdef WINDOWSNT
@@ -891,7 +883,7 @@
 
   if (WSAStartup (MAKEWORD (2, 0), &wsaData))
     {
-      message (TRUE, "%s: error initializing WinSock2\n", progname);
+      message (true, "%s: error initializing WinSock2\n", progname);
       exit (EXIT_FAILURE);
     }
 
@@ -942,14 +934,14 @@
     }
 
   if (! config)
-    return FALSE;
+    return false;
 
   if (fgets (dotted, sizeof dotted, config)
       && (port = strchr (dotted, ':')))
     *port++ = '\0';
   else
     {
-      message (TRUE, "%s: invalid configuration info\n", progname);
+      message (true, "%s: invalid configuration info\n", progname);
       exit (EXIT_FAILURE);
     }
 
@@ -959,13 +951,13 @@
 
   if (! fread (authentication, AUTH_KEY_LENGTH, 1, config))
     {
-      message (TRUE, "%s: cannot read authentication info\n", progname);
+      message (true, "%s: cannot read authentication info\n", progname);
       exit (EXIT_FAILURE);
     }
 
   fclose (config);
 
-  return TRUE;
+  return true;
 }
 
 static HSOCKET
@@ -980,7 +972,7 @@
     return INVALID_SOCKET;
 
   if (server.sin_addr.s_addr != inet_addr ("127.0.0.1") && !quiet)
-    message (FALSE, "%s: connected to remote socket at %s\n",
+    message (false, "%s: connected to remote socket at %s\n",
              progname, inet_ntoa (server.sin_addr));
 
   /* Open up an AF_INET socket.  */
@@ -1033,7 +1025,7 @@
        return 0;
       else
        {
-         message (TRUE, "%s: could not get terminal name\n", progname);
+         message (true, "%s: could not get terminal name\n", progname);
          fail ();
        }
     }
@@ -1044,7 +1036,7 @@
        return 0;
       else
        {
-         message (TRUE, "%s: please set the TERM variable to your terminal 
type\n",
+         message (true, "%s: please set the TERM variable to your terminal 
type\n",
                   progname);
          fail ();
        }
@@ -1057,7 +1049,7 @@
       else
        {
          /* This causes nasty, MULTI_KBOARD-related input lockouts. */
-         message (TRUE, "%s: opening a frame in an Emacs term buffer"
+         message (true, "%s: opening a frame in an Emacs term buffer"
                   " is not supported\n", progname);
          fail ();
        }
@@ -1188,7 +1180,7 @@
   /* Open up an AF_UNIX socket in this person's home directory.  */
   if ((s = socket (AF_UNIX, SOCK_STREAM, 0)) < 0)
     {
-      message (TRUE, "%s: socket: %s\n", progname, strerror (errno));
+      message (true, "%s: socket: %s\n", progname, strerror (errno));
       return INVALID_SOCKET;
     }
 
@@ -1239,7 +1231,7 @@
       strcpy (server.sun_path, local_socket_name);
     else
       {
-        message (TRUE, "%s: socket-name %s too long\n",
+        message (true, "%s: socket-name %s too long\n",
                  progname, local_socket_name);
         fail ();
       }
@@ -1278,7 +1270,7 @@
                  strcpy (server.sun_path, user_socket_name);
                else
                  {
-                   message (TRUE, "%s: socket-name %s too long\n",
+                   message (true, "%s: socket-name %s too long\n",
                             progname, user_socket_name);
                    exit (EXIT_FAILURE);
                  }
@@ -1302,7 +1294,7 @@
           we are root. */
        if (0 != geteuid ())
          {
-           message (TRUE, "%s: Invalid socket owner\n", progname);
+           message (true, "%s: Invalid socket owner\n", progname);
            return INVALID_SOCKET;
          }
        break;
@@ -1310,12 +1302,12 @@
       case 2:
        /* `stat' failed */
        if (saved_errno == ENOENT)
-         message (TRUE,
+         message (true,
                   "%s: can't find socket; have you started the server?\n\
 To start the server in Emacs, type \"M-x server-start\".\n",
                   progname);
        else
-         message (TRUE, "%s: can't stat %s: %s\n",
+         message (true, "%s: can't stat %s: %s\n",
                   progname, server.sun_path, strerror (saved_errno));
        return INVALID_SOCKET;
       }
@@ -1324,7 +1316,7 @@
   if (connect (s, (struct sockaddr *) &server, strlen (server.sun_path) + 2)
       < 0)
     {
-      message (TRUE, "%s: connect: %s\n", progname, strerror (errno));
+      message (true, "%s: connect: %s\n", progname, strerror (errno));
       return INVALID_SOCKET;
     }
 
@@ -1347,7 +1339,7 @@
       s = set_local_socket (socket_name);
       if ((s != INVALID_SOCKET) || no_exit_if_error)
        return s;
-      message (TRUE, "%s: error accessing socket \"%s\"\n",
+      message (true, "%s: error accessing socket \"%s\"\n",
               progname, socket_name);
       exit (EXIT_FAILURE);
     }
@@ -1363,7 +1355,7 @@
       if ((s != INVALID_SOCKET) || no_exit_if_error)
        return s;
 
-      message (TRUE, "%s: error accessing server file \"%s\"\n",
+      message (true, "%s: error accessing server file \"%s\"\n",
               progname, local_server_file);
       exit (EXIT_FAILURE);
     }
@@ -1381,7 +1373,7 @@
     return s;
 
   /* No implicit or explicit socket, and no alternate editor.  */
-  message (TRUE, "%s: No socket or alternate editor.  Please use:\n\n"
+  message (true, "%s: No socket or alternate editor.  Please use:\n\n"
 #ifndef NO_SOCKETS_IN_FILE_SYSTEM
 "\t--socket-name\n"
 #endif
@@ -1490,15 +1482,15 @@
 
       if ((w == -1) || !WIFEXITED (status) || WEXITSTATUS (status))
        {
-         message (TRUE, "Error: Could not start the Emacs daemon\n");
+         message (true, "Error: Could not start the Emacs daemon\n");
          exit (EXIT_FAILURE);
        }
 
       /* Try connecting, the daemon should have started by now.  */
-      message (TRUE, "Emacs daemon should have started, trying to connect 
again\n");
+      message (true, "Emacs daemon should have started, trying to connect 
again\n");
       if ((emacs_socket = set_socket (1)) == INVALID_SOCKET)
        {
-         message (TRUE, "Error: Cannot connect even after starting the Emacs 
daemon\n");
+         message (true, "Error: Cannot connect even after starting the Emacs 
daemon\n");
          exit (EXIT_FAILURE);
        }
     }
@@ -1526,7 +1518,7 @@
          d_argv[1] = daemon_arg;
        }
       execvp ("emacs", d_argv);
-      message (TRUE, "%s: error starting emacs daemon\n", progname);
+      message (true, "%s: error starting emacs daemon\n", progname);
     }
 #endif /* WINDOWSNT */
 }
@@ -1556,7 +1548,7 @@
 
   if ((argc - optind < 1) && !eval && current_frame)
     {
-      message (TRUE, "%s: file name or argument required\n"
+      message (true, "%s: file name or argument required\n"
               "Try `%s --help' for more information\n",
               progname, progname);
       exit (EXIT_FAILURE);
@@ -1579,7 +1571,7 @@
   cwd = get_current_dir_name ();
   if (cwd == 0)
     {
-      message (TRUE, "%s: %s\n", progname,
+      message (true, "%s: %s\n", progname,
               "Cannot get current working directory");
       fail ();
     }

=== modified file 'lib-src/etags.c'
--- a/lib-src/etags.c   2013-11-14 01:52:18 +0000
+++ b/lib-src/etags.c   2013-12-14 21:36:44 +0000
@@ -80,14 +80,11 @@
 
 char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
 
-#define        TRUE    1
-#define        FALSE   0
-
 #ifdef DEBUG
 #  undef DEBUG
-#  define DEBUG TRUE
+#  define DEBUG true
 #else
-#  define DEBUG  FALSE
+#  define DEBUG  false
 #  define NDEBUG               /* disable assert */
 #endif
 
@@ -107,12 +104,12 @@
 
 #ifdef MSDOS
 # undef MSDOS
-# define MSDOS TRUE
+# define MSDOS true
 # include <fcntl.h>
 # include <sys/param.h>
 # include <io.h>
 #else
-# define MSDOS FALSE
+# define MSDOS false
 #endif /* MSDOS */
 
 #ifdef WINDOWSNT
@@ -150,9 +147,9 @@
  tag tables and tags typedefs, #defines and struct/union/enum by default. */
 #ifdef CTAGS
 # undef  CTAGS
-# define CTAGS TRUE
+# define CTAGS true
 #else
-# define CTAGS FALSE
+# define CTAGS false
 #endif
 
 #define streq(s,t)     (assert ((s)!=NULL || (t)!=NULL), !strcmp (s, t))
@@ -194,8 +191,6 @@
                                        (char *) (op), (n) * sizeof (Type)))
 #endif
 
-#define bool int
-
 typedef void Lang_function (FILE *);
 
 typedef struct
@@ -401,7 +396,7 @@
   *midtk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$0123456789";
 
 static bool append_to_tagfile; /* -a: append to tags */
-/* The next five default to TRUE in C and derived languages.  */
+/* The next five default to true in C and derived languages.  */
 static bool typedefs;          /* -t: create tags for C and Ada typedefs */
 static bool typedefs_or_cplusplus; /* -T: create tags for C typedefs, level */
                                /* 0 struct/enum/union decls, and C++ */
@@ -409,18 +404,18 @@
 static bool constantypedefs;   /* -d: create tags for C #define, enum */
                                /* constants and variables. */
                                /* -D: opposite of -d.  Default under ctags. */
-static bool globals;           /* create tags for global variables */
-static bool members;           /* create tags for C member variables */
-static bool declarations;      /* --declarations: tag them and extern in C&Co*/
-static bool no_line_directive; /* ignore #line directives (undocumented) */
-static bool no_duplicates;     /* no duplicate tags for ctags (undocumented) */
+static int globals;            /* create tags for global variables */
+static int members;            /* create tags for C member variables */
+static int declarations;       /* --declarations: tag them and extern in C&Co*/
+static int no_line_directive;  /* ignore #line directives (undocumented) */
+static int no_duplicates;      /* no duplicate tags for ctags (undocumented) */
 static bool update;            /* -u: update tags */
 static bool vgrind_style;      /* -v: create vgrind style index output */
 static bool no_warnings;       /* -w: suppress warnings (undocumented) */
 static bool cxref_style;       /* -x: create cxref style output */
 static bool cplusplus;         /* .[hc] means C++, not C (undocumented) */
 static bool ignoreindent;      /* -I: ignore indentation in C */
-static bool packages_only;     /* --packages-only: in Ada, only tag packages*/
+static int packages_only;      /* --packages-only: in Ada, only tag packages*/
 
 /* STDIN is defined in LynxOS system headers */
 #ifdef STDIN
@@ -436,17 +431,17 @@
 static struct option longopts[] =
 {
   { "append",             no_argument,       NULL,               'a'   },
-  { "packages-only",      no_argument,       &packages_only,     TRUE  },
+  { "packages-only",      no_argument,       &packages_only,     1     },
   { "c++",                no_argument,       NULL,               'C'   },
-  { "declarations",       no_argument,       &declarations,      TRUE  },
-  { "no-line-directive",  no_argument,       &no_line_directive, TRUE  },
-  { "no-duplicates",      no_argument,       &no_duplicates,     TRUE  },
+  { "declarations",       no_argument,       &declarations,      1     },
+  { "no-line-directive",  no_argument,       &no_line_directive, 1     },
+  { "no-duplicates",      no_argument,       &no_duplicates,     1     },
   { "help",               no_argument,       NULL,               'h'   },
   { "help",               no_argument,       NULL,               'H'   },
   { "ignore-indentation", no_argument,       NULL,               'I'   },
   { "language",           required_argument, NULL,               'l'   },
-  { "members",            no_argument,       &members,           TRUE  },
-  { "no-members",         no_argument,       &members,           FALSE },
+  { "members",            no_argument,       &members,           1     },
+  { "no-members",         no_argument,       &members,           0     },
   { "output",             required_argument, NULL,               'o'   },
   { "regex",              required_argument, NULL,               'r'   },
   { "no-regex",           no_argument,       NULL,               'R'   },
@@ -458,7 +453,7 @@
   { "backward-search",    no_argument,       NULL,               'B'   },
   { "cxref",              no_argument,       NULL,               'x'   },
   { "defines",            no_argument,       NULL,               'd'   },
-  { "globals",            no_argument,       &globals,           TRUE  },
+  { "globals",            no_argument,       &globals,           1     },
   { "typedefs",           no_argument,       NULL,               't'   },
   { "typedefs-and-c++",   no_argument,       NULL,               'T'   },
   { "update",             no_argument,       NULL,               'u'   },
@@ -467,7 +462,7 @@
 
 #else /* Etags options */
   { "no-defines",         no_argument,       NULL,               'D'   },
-  { "no-globals",         no_argument,       &globals,           FALSE },
+  { "no-globals",         no_argument,       &globals,           0     },
   { "include",            required_argument, NULL,               'i'   },
 #endif
   { NULL }
@@ -761,7 +756,7 @@
   { "scheme",    Scheme_help,    Scheme_functions,  Scheme_suffixes    },
   { "tex",       TeX_help,       TeX_commands,      TeX_suffixes       },
   { "texinfo",   Texinfo_help,   Texinfo_nodes,     Texinfo_suffixes   },
-  { "yacc",      Yacc_help,Yacc_entries,Yacc_suffixes,NULL,NULL,TRUE},
+  { "yacc",      Yacc_help,Yacc_entries,Yacc_suffixes,NULL,NULL,true},
   { "auto",      auto_help },                      /* default guessing scheme 
*/
   { "none",      none_help,      just_read_file }, /* regexp matching only */
   { NULL }                /* end of list */
@@ -820,13 +815,13 @@
 }
 
 #ifndef PRINT_UNDOCUMENTED_OPTIONS_HELP
-# define PRINT_UNDOCUMENTED_OPTIONS_HELP FALSE
+# define PRINT_UNDOCUMENTED_OPTIONS_HELP false
 #endif
 
 static _Noreturn void
 print_help (argument *argbuffer)
 {
-  bool help_for_lang = FALSE;
+  bool help_for_lang = false;
 
   for (; argbuffer->arg_type != at_end; argbuffer++)
     if (argbuffer->arg_type == at_language)
@@ -834,7 +829,7 @@
        if (help_for_lang)
          puts ("");
        puts (argbuffer->lang->help);
-       help_for_lang = TRUE;
+       help_for_lang = true;
       }
 
   if (help_for_lang)
@@ -1005,7 +1000,7 @@
   argument *argbuffer;
   int current_arg, file_count;
   linebuffer filename_lb;
-  bool help_asked = FALSE;
+  bool help_asked = false;
   ptrdiff_t len;
  char *optstring;
  int opt;
@@ -1030,8 +1025,8 @@
    * Also default to find macro constants, enum constants, struct
    * members and global variables.  Do it for both etags and ctags.
    */
-  typedefs = typedefs_or_cplusplus = constantypedefs = TRUE;
-  globals = members = TRUE;
+  typedefs = typedefs_or_cplusplus = constantypedefs = true;
+  globals = members = true;
 
   /* When the optstring begins with a '-' getopt_long does not rearrange the
      non-options arguments to be at the end, but leaves them alone. */
@@ -1069,12 +1064,12 @@
        ++file_count;
        if (parsing_stdin)
          fatal ("cannot parse standard input more than once", (char *)NULL);
-       parsing_stdin = TRUE;
+       parsing_stdin = true;
        break;
 
        /* Common options. */
-      case 'a': append_to_tagfile = TRUE;      break;
-      case 'C': cplusplus = TRUE;              break;
+      case 'a': append_to_tagfile = true;      break;
+      case 'C': cplusplus = true;              break;
       case 'f':                /* for compatibility with old makefiles */
       case 'o':
        if (tagfile)
@@ -1087,7 +1082,7 @@
        break;
       case 'I':
       case 'S':                /* for backward compatibility */
-       ignoreindent = TRUE;
+       ignoreindent = true;
        break;
       case 'l':
        {
@@ -1122,22 +1117,22 @@
        break;
       case 'h':
       case 'H':
-       help_asked = TRUE;
+       help_asked = true;
        break;
 
        /* Etags options */
-      case 'D': constantypedefs = FALSE;                       break;
+      case 'D': constantypedefs = false;                       break;
       case 'i': included_files[nincluded_files++] = optarg;    break;
 
        /* Ctags options. */
       case 'B': searchar = '?';                                        break;
-      case 'd': constantypedefs = TRUE;                                break;
-      case 't': typedefs = TRUE;                               break;
-      case 'T': typedefs = typedefs_or_cplusplus = TRUE;       break;
-      case 'u': update = TRUE;                                 break;
-      case 'v': vgrind_style = TRUE;                     /*FALLTHRU*/
-      case 'x': cxref_style = TRUE;                            break;
-      case 'w': no_warnings = TRUE;                            break;
+      case 'd': constantypedefs = true;                                break;
+      case 't': typedefs = true;                               break;
+      case 'T': typedefs = typedefs_or_cplusplus = true;       break;
+      case 'u': update = true;                                 break;
+      case 'v': vgrind_style = true;                     /*FALLTHRU*/
+      case 'x': cxref_style = true;                            break;
+      case 'w': no_warnings = true;                            break;
       default:
        suggest_asking_for_help ();
        /* NOTREACHED */
@@ -1308,7 +1303,7 @@
            fatal ("failed to execute shell command", (char *)NULL);
        }
       free (cmd);
-      append_to_tagfile = TRUE;
+      append_to_tagfile = true;
     }
 
   tagf = fopen (tagfile, append_to_tagfile ? "a" : "w");
@@ -1605,9 +1600,9 @@
         to the directory of the tags file. */
       fdp->taggedfname = relative_filename (fn, tagfiledir);
     }
-  fdp->usecharno = TRUE;       /* use char position when making tags */
+  fdp->usecharno = true;       /* use char position when making tags */
   fdp->prop = NULL;
-  fdp->written = FALSE;                /* not written on tags file yet */
+  fdp->written = false;                /* not written on tags file yet */
 
   fdhead = fdp;
   curfdp = fdhead;             /* the current file description */
@@ -1653,26 +1648,27 @@
  * This routine sets up the boolean pseudo-functions which work
  * by setting boolean flags dependent upon the corresponding character.
  * Every char which is NOT in that string is not a white char.  Therefore,
- * all of the array "_wht" is set to FALSE, and then the elements
- * subscripted by the chars in "white" are set to TRUE.  Thus "_wht"
- * of a char is TRUE if it is the string "white", else FALSE.
+ * all of the array "_wht" is set to false, and then the elements
+ * subscripted by the chars in "white" are set to true.  Thus "_wht"
+ * of a char is true if it is the string "white", else false.
  */
 static void
 init (void)
 {
-  register const char *sp;
-  register int i;
+  const char *sp;
+  int i;
 
   for (i = 0; i < CHARS; i++)
-    iswhite (i) = notinname (i) = begtoken (i) = intoken (i) = endtoken (i) = 
FALSE;
-  for (sp = white; *sp != '\0'; sp++) iswhite (*sp) = TRUE;
-  for (sp = nonam; *sp != '\0'; sp++) notinname (*sp) = TRUE;
+    iswhite (i) = notinname (i) = begtoken (i) = intoken (i) = endtoken (i)
+      = false;
+  for (sp = white; *sp != '\0'; sp++) iswhite (*sp) = true;
+  for (sp = nonam; *sp != '\0'; sp++) notinname (*sp) = true;
   notinname ('\0') = notinname ('\n');
-  for (sp = begtk; *sp != '\0'; sp++) begtoken (*sp) = TRUE;
+  for (sp = begtk; *sp != '\0'; sp++) begtoken (*sp) = true;
   begtoken ('\0') = begtoken ('\n');
-  for (sp = midtk; *sp != '\0'; sp++) intoken (*sp) = TRUE;
+  for (sp = midtk; *sp != '\0'; sp++) intoken (*sp) = true;
   intoken ('\0') = intoken ('\n');
-  for (sp = endtk; *sp != '\0'; sp++) endtoken (*sp) = TRUE;
+  for (sp = endtk; *sp != '\0'; sp++) endtoken (*sp) = true;
   endtoken ('\0') = endtoken ('\n');
 }
 
@@ -1696,7 +1692,7 @@
   /* Else try to guess the language given the file name. */
   if (parser == NULL)
     {
-      lang = get_language_from_filename (curfdp->infname, TRUE);
+      lang = get_language_from_filename (curfdp->infname, true);
       if (lang != NULL && lang->function != NULL)
        {
          curfdp->lang = lang;
@@ -1743,7 +1739,7 @@
   /* Else try to guess the language given the case insensitive file name. */
   if (parser == NULL)
     {
-      lang = get_language_from_filename (curfdp->infname, FALSE);
+      lang = get_language_from_filename (curfdp->infname, false);
       if (lang != NULL && lang->function != NULL)
        {
          curfdp->lang = lang;
@@ -1841,7 +1837,7 @@
 static void
 make_tag (const char *name,    /* tag name, or NULL if unnamed */
          int namelen,          /* tag length */
-         int is_func,          /* tag is a function */
+         bool is_func,         /* tag is a function */
          char *linestart,      /* start of the line where tag is */
          int linelen,          /* length of the line where tag is */
          int lno,              /* line number */
@@ -1869,7 +1865,7 @@
              && (cp == linestart
                  || notinname (cp[-1]))        /* rule #3 */
              && strneq (name, cp, namelen))    /* rule #2 */
-           named = FALSE;      /* use implicit tag name */
+           named = false;      /* use implicit tag name */
        }
     }
 
@@ -1881,7 +1877,8 @@
 
 /* Record a tag. */
 static void
-pfnote (char *name, int is_func, char *linestart, int linelen, int lno, long 
int cno)
+pfnote (char *name, bool is_func, char *linestart, int linelen, int lno,
+       long int cno)
                                /* tag name, or NULL if unnamed */
                                /* tag is a function */
                                /* start of the line where tag is */
@@ -1908,8 +1905,8 @@
     }
   else
     np->name = name;
-  np->valid = TRUE;
-  np->been_warned = FALSE;
+  np->valid = true;
+  np->been_warned = false;
   np->fdp = curfdp;
   np->is_func = is_func;
   np->lno = lno;
@@ -2043,7 +2040,7 @@
                (stderr,
                 "Duplicate entry in files %s and %s: %s (Warning only)\n",
                 np->fdp->infname, cur_node->fdp->infname, np->name);
-             cur_node->been_warned = TRUE;
+             cur_node->been_warned = true;
            }
          return;
        }
@@ -2071,7 +2068,7 @@
       if (np->left != NULL)
        invalidate_nodes (badfdp, &np->left);
       if (np->fdp == badfdp)
-       np->valid = FALSE;
+       np->valid = false;
       if (np->right != NULL)
        invalidate_nodes (badfdp, &np->right);
     }
@@ -2154,7 +2151,7 @@
              fdp = np->fdp;
              fprintf (tagf, "\f\n%s,%d\n",
                       fdp->taggedfname, total_size_of_entries (np));
-             fdp->written = TRUE;
+             fdp->written = true;
            }
          fputs (np->regex, tagf);
          fputc ('\177', tagf);
@@ -2625,7 +2622,7 @@
  *     function or variable, or corresponds to a typedef, or
  *     is a struct/union/enum tag, or #define, or an enum constant.
  *
- *     *IS_FUNC gets TRUE if the token is a function or #define macro
+ *     *IS_FUNC_OR_VAR gets true if the token is a function or #define macro
  *     with args.  C_EXTP points to which language we are looking at.
  *
  * Globals
@@ -2637,7 +2634,8 @@
  */
 
 static bool
-consider_token (register char *str, register int len, register int c, int 
*c_extp, int bracelev, int parlev, int *is_func_or_var)
+consider_token (char *str, int len, int c, int *c_extp,
+               int bracelev, int parlev, bool *is_func_or_var)
                                /* IN: token pointer */
                                /* IN: token length */
                                /* IN: first char after the token */
@@ -2661,8 +2659,8 @@
    */
   if (toktype == st_C_attribute)
     {
-      inattribute = TRUE;
-      return FALSE;
+      inattribute = true;
+      return false;
      }
 
    /*
@@ -2675,7 +2673,7 @@
        if (toktype == st_C_gnumacro)
         {
           fvdef = fdefunkey;
-          return FALSE;
+          return false;
         }
        break;
      case dsharpseen:
@@ -2687,20 +2685,20 @@
         {
           definedef = dignorerest;
         }
-       return FALSE;
+       return false;
      case ddefineseen:
        /*
        * Make a tag for any macro, unless it is a constant
-       * and constantypedefs is FALSE.
+       * and constantypedefs is false.
        */
        definedef = dignorerest;
        *is_func_or_var = (c == '(');
        if (!*is_func_or_var && !constantypedefs)
-        return FALSE;
+        return false;
        else
-        return TRUE;
+        return true;
      case dignorerest:
-       return FALSE;
+       return false;
      default:
        error ("internal error: definedef value.");
      }
@@ -2715,9 +2713,9 @@
         {
           if (typedefs)
             typdef = tkeyseen;
-          fvextern = FALSE;
+          fvextern = false;
           fvdef = fvnone;
-          return FALSE;
+          return false;
         }
        break;
      case tkeyseen:
@@ -2734,7 +2732,7 @@
        if (structdef == snone && fvdef == fvnone)
         {
           fvdef = fvnameseen;
-          return TRUE;
+          return true;
         }
        break;
      case tend:
@@ -2743,9 +2741,9 @@
         case st_C_class:
         case st_C_struct:
         case st_C_enum:
-          return FALSE;
+          return false;
         }
-       return TRUE;
+       return true;
      }
 
    switch (toktype)
@@ -2753,7 +2751,7 @@
      case st_C_javastruct:
        if (structdef == stagseen)
         structdef = scolonseen;
-       return FALSE;
+       return false;
      case st_C_template:
      case st_C_class:
        if ((*c_extp & C_AUTO)  /* automatic detection of C++ language */
@@ -2777,13 +2775,13 @@
           if (fvdef == fvnameseen)
             fvdef = fvnone;
         }
-       return FALSE;
+       return false;
      }
 
    if (structdef == skeyseen)
      {
        structdef = stagseen;
-       return TRUE;
+       return true;
      }
 
    if (typdef != tnone)
@@ -2797,27 +2795,27 @@
         {
         case st_C_objprot:
           objdef = oprotocol;
-          return FALSE;
+          return false;
         case st_C_objimpl:
           objdef = oimplementation;
-          return FALSE;
+          return false;
         }
        break;
      case oimplementation:
        /* Save the class tag for functions or variables defined inside. */
        objtag = savenstr (str, len);
        objdef = oinbody;
-       return FALSE;
+       return false;
      case oprotocol:
        /* Save the class tag for categories. */
        objtag = savenstr (str, len);
        objdef = otagseen;
-       *is_func_or_var = TRUE;
-       return TRUE;
+       *is_func_or_var = true;
+       return true;
      case oparenseen:
        objdef = ocatseen;
-       *is_func_or_var = TRUE;
-       return TRUE;
+       *is_func_or_var = true;
+       return true;
      case oinbody:
        break;
      case omethodsign:
@@ -2828,13 +2826,13 @@
           linebuffer_setlen (&token_name, len);
           memcpy (token_name.buffer, str, len);
           token_name.buffer[len] = '\0';
-          return TRUE;
+          return true;
         }
-       return FALSE;
+       return false;
      case omethodcolon:
        if (parlev == 0)
         objdef = omethodparm;
-       return FALSE;
+       return false;
      case omethodparm:
        if (parlev == 0)
         {
@@ -2844,9 +2842,9 @@
           linebuffer_setlen (&token_name, oldlen + len);
           memcpy (token_name.buffer + oldlen, str, len);
           token_name.buffer[oldlen + len] = '\0';
-          return TRUE;
+          return true;
         }
-       return FALSE;
+       return false;
      case oignore:
        if (toktype == st_C_objend)
         {
@@ -2858,14 +2856,14 @@
           free (objtag); */
           objdef = onone;
         }
-       return FALSE;
+       return false;
      }
 
    /* A function, variable or enum constant? */
    switch (toktype)
      {
      case st_C_extern:
-       fvextern = TRUE;
+       fvextern = true;
        switch  (fvdef)
         {
         case finlist:
@@ -2876,39 +2874,39 @@
         default:
           fvdef = fvnone;
         }
-       return FALSE;
+       return false;
      case st_C_ignore:
-       fvextern = FALSE;
+       fvextern = false;
        fvdef = vignore;
-       return FALSE;
+       return false;
      case st_C_operator:
        fvdef = foperator;
-       *is_func_or_var = TRUE;
-       return TRUE;
+       *is_func_or_var = true;
+       return true;
      case st_none:
        if (constantypedefs
           && structdef == snone
           && structtype == st_C_enum && bracelev > structbracelev)
-        return TRUE;           /* enum constant */
+        return true;           /* enum constant */
        switch (fvdef)
         {
         case fdefunkey:
           if (bracelev > 0)
             break;
           fvdef = fdefunname;  /* GNU macro */
-          *is_func_or_var = TRUE;
-          return TRUE;
+          *is_func_or_var = true;
+          return true;
         case fvnone:
           switch (typdef)
             {
             case ttypeseen:
-              return FALSE;
+              return false;
             case tnone:
               if ((strneq (str, "asm", 3) && endtoken (str[3]))
                   || (strneq (str, "__asm__", 7) && endtoken (str[7])))
                 {
                   fvdef = vignore;
-                  return FALSE;
+                  return false;
                 }
               break;
             }
@@ -2919,19 +2917,19 @@
              if (*c_extp & C_AUTO) /* automatic detection of C++ */
                *c_extp = (*c_extp | C_PLPL) & ~C_AUTO;
              fvdef = foperator;
-             *is_func_or_var = TRUE;
-             return TRUE;
+             *is_func_or_var = true;
+             return true;
            }
          if (bracelev > 0 && !instruct)
            break;
          fvdef = fvnameseen;   /* function or variable */
-         *is_func_or_var = TRUE;
-         return TRUE;
+         *is_func_or_var = true;
+         return true;
        }
       break;
     }
 
-  return FALSE;
+  return false;
 }
 
 
@@ -2963,7 +2961,7 @@
   curlinepos = charno;                                                 \
   readline (&curlb, inf);                                              \
   lp = curlb.buffer;                                                   \
-  quotednl = FALSE;                                                    \
+  quotednl = false;                                                    \
   newndx = curndx;                                                     \
 } while (0)
 
@@ -2973,16 +2971,16 @@
   if (savetoken.valid)                                                 \
     {                                                                  \
       token = savetoken;                                               \
-      savetoken.valid = FALSE;                                         \
+      savetoken.valid = false;                                         \
     }                                                                  \
   definedef = dnone;                                                   \
 } while (0)
 
 
 static void
-make_C_tag (int isfun)
+make_C_tag (bool isfun)
 {
-  /* This function is never called when token.valid is FALSE, but
+  /* This function is never called when token.valid is false, but
      we must protect against invalid input or internal errors. */
   if (token.valid)
     make_tag (token_name.buffer, token_name.len, isfun, token.line,
@@ -2995,7 +2993,7 @@
       error ("INVALID TOKEN");
     }
 
-  token.valid = FALSE;
+  token.valid = false;
 }
 
 
@@ -3043,11 +3041,11 @@
   lp = curlb.buffer;
   *lp = 0;
 
-  fvdef = fvnone; fvextern = FALSE; typdef = tnone;
+  fvdef = fvnone; fvextern = false; typdef = tnone;
   structdef = snone; definedef = dnone; objdef = onone;
-  yacc_rules = FALSE;
-  midtoken = inquote = inchar = incomm = quotednl = FALSE;
-  token.valid = savetoken.valid = FALSE;
+  yacc_rules = false;
+  midtoken = inquote = inchar = incomm = quotednl = false;
+  token.valid = savetoken.valid = false;
   bracelev = bracketlev = parlev = attrparlev = templatelev = 0;
   if (cjava)
     { qualifier = "."; qlen = 1; }
@@ -3065,7 +3063,7 @@
             to read the next line.  */
          if (*lp == '\0')
            {
-             quotednl = TRUE;
+             quotednl = true;
              continue;
            }
          lp++;
@@ -3079,7 +3077,7 @@
              if (*lp == '/')
                {
                  c = *lp++;
-                 incomm = FALSE;
+                 incomm = false;
                }
              break;
            case '\0':
@@ -3095,7 +3093,7 @@
          switch (c)
            {
            case '"':
-             inquote = FALSE;
+             inquote = false;
              break;
            case '\0':
              /* Newlines inside strings do not end macro definitions
@@ -3115,7 +3113,7 @@
              CNL ();
              /* FALLTHRU */
            case '\'':
-             inchar = FALSE;
+             inchar = false;
              break;
            }
          continue;
@@ -3123,7 +3121,7 @@
       else switch (c)
        {
        case '"':
-         inquote = TRUE;
+         inquote = true;
          if (bracketlev > 0)
            continue;
          if (inattribute)
@@ -3137,26 +3135,26 @@
            case vignore:
              break;
            default:
-             fvextern = FALSE;
+             fvextern = false;
              fvdef = fvnone;
            }
          continue;
        case '\'':
-         inchar = TRUE;
+         inchar = true;
          if (bracketlev > 0)
            continue;
          if (inattribute)
            break;
          if (fvdef != finlist && fvdef != fignore && fvdef != vignore)
            {
-             fvextern = FALSE;
+             fvextern = false;
              fvdef = fvnone;
            }
          continue;
        case '/':
          if (*lp == '*')
            {
-             incomm = TRUE;
+             incomm = true;
              lp++;
              c = ' ';
              if (bracketlev > 0)
@@ -3172,9 +3170,9 @@
            {
              /* Entering or exiting rules section in yacc file. */
              lp++;
-             definedef = dnone; fvdef = fvnone; fvextern = FALSE;
+             definedef = dnone; fvdef = fvnone; fvextern = false;
              typdef = tnone; structdef = snone;
-             midtoken = inquote = inchar = incomm = quotednl = FALSE;
+             midtoken = inquote = inchar = incomm = quotednl = false;
              bracelev = 0;
              yacc_rules = !yacc_rules;
              continue;
@@ -3185,7 +3183,7 @@
          if (definedef == dnone)
            {
              char *cp;
-             bool cpptoken = TRUE;
+             bool cpptoken = true;
 
              /* Look back on this line.  If all blanks, or nonblanks
                 followed by an end of comment, this is a preprocessor
@@ -3196,10 +3194,10 @@
                    if (*cp == '*' && cp[1] == '/')
                      {
                        cp++;
-                       cpptoken = TRUE;
+                       cpptoken = true;
                      }
                    else
-                     cpptoken = FALSE;
+                     cpptoken = false;
                  }
              if (cpptoken)
                definedef = dsharpseen;
@@ -3248,7 +3246,7 @@
                    }
                  else
                    {
-                     bool funorvar = FALSE;
+                     bool funorvar = false;
 
                      if (yacc_rules
                          || consider_token (newlb.buffer + tokoff, toklen, c,
@@ -3267,7 +3265,7 @@
                              c = *lp++;
                              toklen += lp - oldlp;
                            }
-                         token.named = FALSE;
+                         token.named = false;
                          if (!plainc
                              && nestlev > 0 && definedef == dnone)
                            /* in struct body */
@@ -3278,7 +3276,7 @@
                              linebuffer_setlen (&token_name, len+qlen+toklen);
                              sprintf (token_name.buffer + len, "%s%.*s",
                                       qualifier, toklen, newlb.buffer + 
tokoff);
-                             token.named = TRUE;
+                             token.named = true;
                            }
                          else if (objdef == ocatseen)
                            /* Objective C category */
@@ -3287,13 +3285,13 @@
                              linebuffer_setlen (&token_name, len);
                              sprintf (token_name.buffer, "%s(%.*s)",
                                       objtag, toklen, newlb.buffer + tokoff);
-                             token.named = TRUE;
+                             token.named = true;
                            }
                          else if (objdef == omethodtag
                                   || objdef == omethodparm)
                            /* Objective C method */
                            {
-                             token.named = TRUE;
+                             token.named = true;
                            }
                          else if (fvdef == fdefunname)
                            /* GNU DEFUN and similar macros */
@@ -3341,7 +3339,7 @@
                          token.length = toklen;
                          token.line = newlb.buffer;
                          token.linepos = newlinepos;
-                         token.valid = TRUE;
+                         token.valid = true;
 
                          if (definedef == dnone
                              && (fvdef == fvnameseen
@@ -3369,7 +3367,7 @@
                              fvdef = fvnone;
                            }
                        }
-                     midtoken = FALSE;
+                     midtoken = false;
                    }
                } /* if (endtoken (c)) */
              else if (intoken (c))
@@ -3395,7 +3393,7 @@
                    case flistseen:
                      if (plainc || declarations)
                        {
-                         make_C_tag (TRUE); /* a function */
+                         make_C_tag (true); /* a function */
                          fvdef = fignore;
                        }
                      break;
@@ -3414,7 +3412,7 @@
                {
                  tokoff = lp - 1 - newlb.buffer;
                  toklen = 1;
-                 midtoken = TRUE;
+                 midtoken = true;
                }
              continue;
            } /* if (begtoken) */
@@ -3430,7 +3428,7 @@
            break;
          if (yacc_rules && token.offset == 0 && token.valid)
            {
-             make_C_tag (FALSE); /* a yacc function */
+             make_C_tag (false); /* a yacc function */
              break;
            }
          if (definedef != dnone)
@@ -3439,7 +3437,7 @@
            {
            case  otagseen:
              objdef = oignore;
-             make_C_tag (TRUE); /* an Objective C class */
+             make_C_tag (true); /* an Objective C class */
              break;
            case omethodtag:
            case omethodparm:
@@ -3456,7 +3454,7 @@
          /* Should be useless, but may be work as a safety net. */
          if (cplpl && fvdef == flistseen)
            {
-             make_C_tag (TRUE); /* a function */
+             make_C_tag (true); /* a function */
              fvdef = fignore;
              break;
            }
@@ -3468,7 +3466,7 @@
            {
            case tend:
            case ttypeseen:
-             make_C_tag (FALSE); /* a typedef */
+             make_C_tag (false); /* a typedef */
              typdef = tnone;
              fvdef = fvnone;
              break;
@@ -3484,10 +3482,10 @@
                case fvnameseen:
                  if ((globals && bracelev == 0 && (!fvextern || declarations))
                      || (members && instruct))
-                   make_C_tag (FALSE); /* a variable */
-                 fvextern = FALSE;
+                   make_C_tag (false); /* a variable */
+                 fvextern = false;
                  fvdef = fvnone;
-                 token.valid = FALSE;
+                 token.valid = false;
                  break;
                case flistseen:
                  if ((declarations
@@ -3495,16 +3493,16 @@
                       && (typdef == tnone || (typdef != tignore && instruct)))
                      || (members
                          && plainc && instruct))
-                   make_C_tag (TRUE);  /* a function */
+                   make_C_tag (true);  /* a function */
                  /* FALLTHRU */
                default:
-                 fvextern = FALSE;
+                 fvextern = false;
                  fvdef = fvnone;
                  if (declarations
                       && cplpl && structdef == stagseen)
-                   make_C_tag (FALSE); /* forward declaration */
+                   make_C_tag (false); /* forward declaration */
                  else
-                   token.valid = FALSE;
+                   token.valid = false;
                } /* switch (fvdef) */
              /* FALLTHRU */
            default:
@@ -3521,7 +3519,7 @@
            {
            case omethodtag:
            case omethodparm:
-             make_C_tag (TRUE); /* an Objective C method */
+             make_C_tag (true); /* an Objective C method */
              objdef = oinbody;
              break;
            }
@@ -3544,18 +3542,18 @@
                       && templatelev == 0
                       && (!fvextern || declarations))
                      || (members && instruct)))
-                 make_C_tag (FALSE); /* a variable */
+                 make_C_tag (false); /* a variable */
              break;
            case flistseen:
              if ((declarations && typdef == tnone && !instruct)
                  || (members && typdef != tignore && instruct))
                {
-                 make_C_tag (TRUE); /* a function */
+                 make_C_tag (true); /* a function */
                  fvdef = fvnameseen;
                }
              else if (!declarations)
                fvdef = fvnone;
-             token.valid = FALSE;
+             token.valid = false;
              break;
            default:
              fvdef = fvnone;
@@ -3573,7 +3571,7 @@
            case ttypeseen:
            case tend:
              typdef = tignore;
-             make_C_tag (FALSE);       /* a typedef */
+             make_C_tag (false);       /* a typedef */
              break;
            case tnone:
            case tinbody:
@@ -3588,7 +3586,7 @@
                  if ((members && bracelev == 1)
                      || (globals && bracelev == 0
                          && (!fvextern || declarations)))
-                   make_C_tag (FALSE); /* a variable */
+                   make_C_tag (false); /* a variable */
                  /* FALLTHRU */
                default:
                  fvdef = fvnone;
@@ -3615,7 +3613,7 @@
                {
                  /* This handles constructs like:
                     typedef void OperatorFun (int fun); */
-                 make_C_tag (FALSE);
+                 make_C_tag (false);
                  typdef = tignore;
                  fvdef = fignore;
                  break;
@@ -3634,14 +3632,14 @@
          if (inattribute)
            {
              if (--attrparlev == 0)
-               inattribute = FALSE;
+               inattribute = false;
              break;
            }
          if (definedef != dnone)
            break;
          if (objdef == ocatseen && parlev == 1)
            {
-             make_C_tag (TRUE); /* an Objective C category */
+             make_C_tag (true); /* an Objective C category */
              objdef = oignore;
            }
          if (--parlev == 0)
@@ -3658,7 +3656,7 @@
                      || typdef == ttypeseen))
                {
                  typdef = tignore;
-                 make_C_tag (FALSE); /* a typedef */
+                 make_C_tag (false); /* a typedef */
                }
            }
          else if (parlev < 0)  /* can happen due to ill-conceived #if's. */
@@ -3677,7 +3675,7 @@
          switch (fvdef)
            {
            case flistseen:
-             make_C_tag (TRUE);    /* a function */
+             make_C_tag (true);    /* a function */
              /* FALLTHRU */
            case fignore:
              fvdef = fvnone;
@@ -3686,12 +3684,12 @@
              switch (objdef)
                {
                case otagseen:
-                 make_C_tag (TRUE); /* an Objective C class */
+                 make_C_tag (true); /* an Objective C class */
                  objdef = oignore;
                  break;
                case omethodtag:
                case omethodparm:
-                 make_C_tag (TRUE); /* an Objective C method */
+                 make_C_tag (true); /* an Objective C method */
                  objdef = oinbody;
                  break;
                default:
@@ -3712,7 +3710,7 @@
            case scolonseen:       /* a class */
              pushclass_above (bracelev,token.line+token.offset, token.length);
              structdef = snone;
-             make_C_tag (FALSE);  /* a struct or enum */
+             make_C_tag (false);  /* a struct or enum */
              break;
            }
          bracelev += 1;
@@ -3723,7 +3721,7 @@
          if (fvdef == fstartlist)
            {
              fvdef = fvnone;   /* avoid tagging `foo' in `foo (*bar()) ()' */
-             token.valid = FALSE;
+             token.valid = false;
            }
          break;
        case '}':
@@ -3733,13 +3731,13 @@
          if (!ignoreindent && lp == newlb.buffer + 1)
            {
              if (bracelev != 0)
-               token.valid = FALSE; /* unexpected value, token unreliable */
+               token.valid = false; /* unexpected value, token unreliable */
              bracelev = 0;     /* reset brace level if first column */
              parlev = 0;       /* also reset paren level, just in case... */
            }
          else if (bracelev < 0)
            {
-             token.valid = FALSE; /* something gone amiss, token unreliable */
+             token.valid = false; /* something gone amiss, token unreliable */
              bracelev = 0;
            }
          if (bracelev == 0 && fvdef == vignore)
@@ -3766,7 +3764,7 @@
            case fvnameseen:
              if ((members && bracelev == 1)
                  || (globals && bracelev == 0 && (!fvextern || declarations)))
-               make_C_tag (FALSE); /* a variable */
+               make_C_tag (false); /* a variable */
              /* FALLTHRU */
            default:
              fvdef = vignore;
@@ -3815,7 +3813,7 @@
        case '\0':
          if (objdef == otagseen)
            {
-             make_C_tag (TRUE); /* an Objective C class */
+             make_C_tag (true); /* an Objective C class */
              objdef = oignore;
            }
          /* If a macro spans multiple lines don't reset its state. */
@@ -3885,18 +3883,18 @@
        &&                      /* instructions at start of loop */     \
          (readline (&line_buffer, file_pointer),                       \
            char_pointer = line_buffer.buffer,                          \
-          TRUE);                                                       \
+          true);                                                       \
       )
 
 #define LOOKING_AT(cp, kw)  /* kw is the keyword, a literal string */  \
-  ((assert ("" kw), TRUE)   /* syntax error if not a literal string */ \
+  ((assert ("" kw), true)   /* syntax error if not a literal string */ \
    && strneq ((cp), kw, sizeof (kw)-1)         /* cp points at kw */   \
    && notinname ((cp)[sizeof (kw)-1])          /* end of kw */         \
    && ((cp) = skip_spaces ((cp)+sizeof (kw)-1))) /* skip spaces */
 
 /* Similar to LOOKING_AT but does not use notinname, does not skip */
 #define LOOKING_AT_NOCASE(cp, kw) /* the keyword is a literal string */        
\
-  ((assert ("" kw), TRUE) /* syntax error if not a literal string */   \
+  ((assert ("" kw), true) /* syntax error if not a literal string */   \
    && strncaseeq ((cp), kw, sizeof (kw)-1)     /* cp points at kw */   \
    && ((cp) += sizeof (kw)-1))                 /* skip spaces */
 
@@ -3959,7 +3957,7 @@
     return;
   for (cp = dbp + 1; *cp != '\0' && intoken (*cp); cp++)
     continue;
-  make_tag (dbp, cp-dbp, TRUE,
+  make_tag (dbp, cp-dbp, true,
            lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
 }
 
@@ -4036,7 +4034,7 @@
            {
              dbp = skip_spaces (dbp);
              if (*dbp == '\0') /* assume un-named */
-               make_tag ("blockdata", 9, TRUE,
+               make_tag ("blockdata", 9, true,
                          lb.buffer, dbp - lb.buffer, lineno, linecharno);
              else
                F_getit (inf);  /* look for name */
@@ -4109,7 +4107,7 @@
       *cp = '\0';
       name = concat (dbp, name_qualifier, "");
       *cp = c;
-      make_tag (name, strlen (name), TRUE,
+      make_tag (name, strlen (name), true,
                lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
       free (name);
       if (c == '"')
@@ -4121,8 +4119,8 @@
 static void
 Ada_funcs (FILE *inf)
 {
-  bool inquote = FALSE;
-  bool skip_till_semicolumn = FALSE;
+  bool inquote = false;
+  bool skip_till_semicolumn = false;
 
   LOOP_ON_INPUT_LINES (inf, lb, dbp)
     {
@@ -4134,13 +4132,13 @@
              dbp = etags_strchr (dbp + !inquote, '"');
              if (dbp != NULL)
                {
-                 inquote = FALSE;
+                 inquote = false;
                  dbp += 1;
                  continue;     /* advance char */
                }
              else
                {
-                 inquote = TRUE;
+                 inquote = true;
                  break;        /* advance line */
                }
            }
@@ -4162,7 +4160,7 @@
          if (skip_till_semicolumn)
            {
              if (*dbp == ';')
-               skip_till_semicolumn = FALSE;
+               skip_till_semicolumn = false;
              dbp++;
              continue;         /* advance char */
            }
@@ -4199,7 +4197,7 @@
                {
                  /* when tagging types, avoid tagging  use type Pack.Typename;
                     for this, we will skip everything till a ; */
-                 skip_till_semicolumn = TRUE;
+                 skip_till_semicolumn = true;
                  continue;     /* advance char */
                }
 
@@ -4248,7 +4246,7 @@
            cp++;
          if (*cp == ':' || iswhite (*cp))
            /* Found end of label, so copy it and add it to the table. */
-           make_tag (lb.buffer, cp - lb.buffer, TRUE,
+           make_tag (lb.buffer, cp - lb.buffer, true,
                      lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
        }
     }
@@ -4292,7 +4290,7 @@
          if ((pos = etags_strchr (sp, ':')) != NULL
              && pos < cp && pos[1] == ':')
            /* The name is already qualified. */
-           make_tag (sp, cp - sp, TRUE,
+           make_tag (sp, cp - sp, true,
                      lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
          else
            /* Qualify it. */
@@ -4303,7 +4301,7 @@
              *cp = '\0';
              name = concat (package, "::", sp);
              *cp = savechar;
-             make_tag (name, strlen (name), TRUE,
+             make_tag (name, strlen (name), true,
                        lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
              free (name);
            }
@@ -4346,7 +4344,7 @@
          else
            continue;
 
-         make_tag (varstart, cp - varstart, FALSE,
+         make_tag (varstart, cp - varstart, false,
                    lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
        }
     }
@@ -4373,7 +4371,7 @@
          char *name = cp;
          while (!notinname (*cp) && *cp != ':')
            cp++;
-         make_tag (name, cp - name, TRUE,
+         make_tag (name, cp - name, true,
                    lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
        }
     }
@@ -4393,8 +4391,8 @@
 static void
 PHP_functions (FILE *inf)
 {
-  register char *cp, *name;
-  bool search_identifier = FALSE;
+  char *cp, *name;
+  bool search_identifier = false;
 
   LOOP_ON_INPUT_LINES (inf, lb, cp)
     {
@@ -4405,9 +4403,9 @@
        {
          while (!notinname (*cp))
            cp++;
-         make_tag (name, cp - name, TRUE,
+         make_tag (name, cp - name, true,
                    lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
-         search_identifier = FALSE;
+         search_identifier = false;
        }
       else if (LOOKING_AT (cp, "function"))
        {
@@ -4418,11 +4416,11 @@
              name = cp;
              while (!notinname (*cp))
                cp++;
-             make_tag (name, cp - name, TRUE,
+             make_tag (name, cp - name, true,
                        lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
            }
          else
-           search_identifier = TRUE;
+           search_identifier = true;
        }
       else if (LOOKING_AT (cp, "class"))
        {
@@ -4431,11 +4429,11 @@
              name = cp;
              while (*cp != '\0' && !iswhite (*cp))
                cp++;
-             make_tag (name, cp - name, FALSE,
+             make_tag (name, cp - name, false,
                        lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
            }
          else
-           search_identifier = TRUE;
+           search_identifier = true;
        }
       else if (strneq (cp, "define", 6)
               && (cp = skip_spaces (cp+6))
@@ -4446,7 +4444,7 @@
          name = cp;
          while (*cp != quote && *cp != '\0')
            cp++;
-         make_tag (name, cp - name, FALSE,
+         make_tag (name, cp - name, false,
                    lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
        }
       else if (members
@@ -4456,7 +4454,7 @@
          name = cp;
          while (!notinname (*cp))
            cp++;
-         make_tag (name, cp - name, FALSE,
+         make_tag (name, cp - name, false,
                    lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
        }
     }
@@ -4487,7 +4485,7 @@
       for (ep = bp; ISALNUM (*ep) || *ep == '-'; ep++)
        continue;
       if (*ep++ == '.')
-       make_tag (bp, ep - bp, TRUE,
+       make_tag (bp, ep - bp, true,
                  lb.buffer, ep - lb.buffer + 1, lineno, linecharno);
     }
 }
@@ -4516,7 +4514,7 @@
          while (--bp > namestart)
            if (!notinname (*bp))
              break;
-         make_tag (namestart, bp - namestart + 1, TRUE,
+         make_tag (namestart, bp - namestart + 1, true,
                    lb.buffer, bp - lb.buffer + 2, lineno, linecharno);
        }
     }
@@ -4540,7 +4538,7 @@
   int save_lineno, namelen, taglen;
   char c, *name;
 
-  bool                         /* each of these flags is TRUE if: */
+  bool                         /* each of these flags is true if: */
     incomment,                 /* point is inside a comment */
     inquote,                   /* point is inside '..' string */
     get_tagname,               /* point is after PROCEDURE/FUNCTION
@@ -4558,11 +4556,11 @@
   *dbp = '\0';
   linebuffer_init (&tline);
 
-  incomment = inquote = FALSE;
-  found_tag = FALSE;           /* have a proc name; check if extern */
-  get_tagname = FALSE;         /* found "procedure" keyword         */
-  inparms = FALSE;             /* found '(' after "proc"            */
-  verify_tag = FALSE;          /* check if "extern" is ahead        */
+  incomment = inquote = false;
+  found_tag = false;           /* have a proc name; check if extern */
+  get_tagname = false;         /* found "procedure" keyword         */
+  inparms = false;             /* found '(' after "proc"            */
+  verify_tag = false;          /* check if "extern" is ahead        */
 
 
   while (!feof (inf))          /* long main loop to get next char */
@@ -4583,46 +4581,46 @@
       if (incomment)
        {
          if (c == '}')         /* within { } comments */
-           incomment = FALSE;
+           incomment = false;
          else if (c == '*' && *dbp == ')') /* within (* *) comments */
            {
              dbp++;
-             incomment = FALSE;
+             incomment = false;
            }
          continue;
        }
       else if (inquote)
        {
          if (c == '\'')
-           inquote = FALSE;
+           inquote = false;
          continue;
        }
       else
        switch (c)
          {
          case '\'':
-           inquote = TRUE;     /* found first quote */
+           inquote = true;     /* found first quote */
            continue;
          case '{':             /* found open { comment */
-           incomment = TRUE;
+           incomment = true;
            continue;
          case '(':
            if (*dbp == '*')    /* found open (* comment */
              {
-               incomment = TRUE;
+               incomment = true;
                dbp++;
              }
            else if (found_tag) /* found '(' after tag, i.e., parm-list */
-             inparms = TRUE;
+             inparms = true;
            continue;
          case ')':             /* end of parms list */
            if (inparms)
-             inparms = FALSE;
+             inparms = false;
            continue;
          case ';':
            if (found_tag && !inparms) /* end of proc or fn stmt */
              {
-               verify_tag = TRUE;
+               verify_tag = true;
                break;
              }
            continue;
@@ -4636,23 +4634,23 @@
            {
              if (nocase_tail ("extern")) /* superfluous, really! */
                {
-                 found_tag = FALSE;
-                 verify_tag = FALSE;
+                 found_tag = false;
+                 verify_tag = false;
                }
            }
          else if (lowcase (*dbp) == 'f')
            {
              if (nocase_tail ("forward")) /* check for forward reference */
                {
-                 found_tag = FALSE;
-                 verify_tag = FALSE;
+                 found_tag = false;
+                 verify_tag = false;
                }
            }
          if (found_tag && verify_tag) /* not external proc, so make tag */
            {
-             found_tag = FALSE;
-             verify_tag = FALSE;
-             make_tag (name, namelen, TRUE,
+             found_tag = false;
+             verify_tag = false;
+             make_tag (name, namelen, true,
                        tline.buffer, taglen, save_lineno, save_lcno);
              continue;
            }
@@ -4678,8 +4676,8 @@
          taglen = cp - lb.buffer + 1;
 
          dbp = cp;             /* set dbp to e-o-token */
-         get_tagname = FALSE;
-         found_tag = TRUE;
+         get_tagname = false;
+         found_tag = true;
          continue;
 
          /* And proceed to check for "extern". */
@@ -4691,11 +4689,11 @@
            {
            case 'p':
              if (nocase_tail ("rocedure")) /* c = 'p', dbp has advanced */
-               get_tagname = TRUE;
+               get_tagname = true;
              continue;
            case 'f':
              if (nocase_tail ("unction"))
-               get_tagname = TRUE;
+               get_tagname = true;
              continue;
            }
        }
@@ -4824,7 +4822,7 @@
               *ep != '\0' && *ep != ' ' && *ep != '{';
               ep++)
            continue;
-         make_tag (bp, ep - bp, TRUE,
+         make_tag (bp, ep - bp, true,
                    lb.buffer, ep - lb.buffer + 1, lineno, linecharno);
        }
       else if (LOOKING_AT (bp, "defineps"))
@@ -4954,14 +4952,14 @@
          for (key = TEX_toktab; key->buffer != NULL; key++)
            if (strneq (cp, key->buffer, key->len))
              {
-               register char *p;
+               char *p;
                int namelen, linelen;
-               bool opgrp = FALSE;
+               bool opgrp = false;
 
                cp = skip_spaces (cp + key->len);
                if (*cp == TEX_opgrp)
                  {
-                   opgrp = TRUE;
+                   opgrp = true;
                    cp++;
                  }
                for (p = cp;
@@ -4977,7 +4975,7 @@
                      p++;
                    linelen = p - lb.buffer + 1;
                  }
-               make_tag (cp, namelen, TRUE,
+               make_tag (cp, namelen, true,
                          lb.buffer, linelen, lineno, linecharno);
                goto tex_next_line; /* We only tag a line once */
              }
@@ -5081,7 +5079,7 @@
        start = cp;
        while (*cp != '\0' && *cp != ',')
          cp++;
-       make_tag (start, cp - start, TRUE,
+       make_tag (start, cp - start, true,
                  lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
       }
 }
@@ -5097,10 +5095,10 @@
 static void
 HTML_labels (FILE *inf)
 {
-  bool getnext = FALSE;                /* next text outside of HTML tags is a 
tag */
-  bool skiptag = FALSE;                /* skip to the end of the current HTML 
tag */
-  bool intag = FALSE;          /* inside an html tag, looking for ID= */
-  bool inanchor = FALSE;       /* when INTAG, is an anchor, look for NAME= */
+  bool getnext = false;                /* next text outside of HTML tags is a 
tag */
+  bool skiptag = false;                /* skip to the end of the current HTML 
tag */
+  bool intag = false;          /* inside an html tag, looking for ID= */
+  bool inanchor = false;       /* when INTAG, is an anchor, look for NAME= */
   char *end;
 
 
@@ -5116,7 +5114,7 @@
            if (*dbp == '>')
              {
                dbp += 1;
-               skiptag = FALSE;
+               skiptag = false;
                continue;       /* look on the same line */
              }
            break;              /* go to next line */
@@ -5132,7 +5130,7 @@
            if (*dbp == '>')
              {
                dbp += 1;
-               intag = FALSE;
+               intag = false;
                continue;       /* look on the same line */
              }
            if ((inanchor && LOOKING_AT_NOCASE (dbp, "name="))
@@ -5151,9 +5149,9 @@
                token_name.buffer[end - dbp] = '\0';
 
                dbp = end;
-               intag = FALSE;  /* we found what we looked for */
-               skiptag = TRUE; /* skip to the end of the tag */
-               getnext = TRUE; /* then grab the text */
+               intag = false;  /* we found what we looked for */
+               skiptag = true; /* skip to the end of the tag */
+               getnext = true; /* then grab the text */
                continue;       /* look on the same line */
              }
            dbp += 1;
@@ -5166,17 +5164,17 @@
              break;            /* go to next line */
            if (*dbp == '<')
              {
-               intag = TRUE;
+               intag = true;
                inanchor = (lowcase (dbp[1]) == 'a' && !intoken (dbp[2]));
                continue;       /* look on the same line */
              }
 
            for (end = dbp + 1; *end != '\0' && *end != '<'; end++)
              continue;
-           make_tag (token_name.buffer, token_name.len, TRUE,
+           make_tag (token_name.buffer, token_name.len, true,
                      dbp, end - dbp, lineno, linecharno);
            linebuffer_setlen (&token_name, 0); /* no name in buffer */
-           getnext = FALSE;
+           getnext = false;
            break;              /* go to next line */
          }
 
@@ -5186,10 +5184,10 @@
              dbp++;
            if (*dbp == '\0')
              break;            /* go to next line */
-           intag = TRUE;
+           intag = true;
            if (lowcase (dbp[1]) == 'a' && !intoken (dbp[2]))
              {
-               inanchor = TRUE;
+               inanchor = true;
                continue;       /* look on the same line */
              }
            else if (LOOKING_AT_NOCASE (dbp, "<title>")
@@ -5197,8 +5195,8 @@
                     || LOOKING_AT_NOCASE (dbp, "<h2>")
                     || LOOKING_AT_NOCASE (dbp, "<h3>"))
              {
-               intag = FALSE;
-               getnext = TRUE;
+               intag = false;
+               getnext = true;
                continue;       /* look on the same line */
              }
            dbp += 1;
@@ -5303,7 +5301,7 @@
          || len != strlen (last)
          || !strneq (s, last, len)))
        {
-         make_tag (s, len, TRUE, s, pos, lineno, linecharno);
+         make_tag (s, len, true, s, pos, lineno, linecharno);
          return len;
        }
   else
@@ -5459,7 +5457,7 @@
          || len != (int)strlen (last)
          || !strneq (s, last, len)))
        {
-         make_tag (s, len, TRUE, s, pos, lineno, linecharno);
+         make_tag (s, len, true, s, pos, lineno, linecharno);
          return len;
        }
 
@@ -5486,7 +5484,7 @@
     {
       int len = erlang_atom (skip_spaces (cp));
       if (len > 0)
-       make_tag (cp, len, TRUE, s, cp + len - s, lineno, linecharno);
+       make_tag (cp, len, true, s, cp + len - s, lineno, linecharno);
     }
   return;
 }
@@ -5539,7 +5537,7 @@
 {
   char sep = name[0];
   char *copyto = name;
-  bool quoted = FALSE;
+  bool quoted = false;
 
   for (++name; *name != '\0'; ++name)
     {
@@ -5567,10 +5565,10 @@
                }
              break;
            }
-         quoted = FALSE;
+         quoted = false;
        }
       else if (*name == '\\')
-       quoted = TRUE;
+       quoted = true;
       else if (*name == sep)
        break;
       else
@@ -5664,10 +5662,10 @@
   struct re_pattern_buffer *patbuf;
   regexp *rp;
   bool
-    force_explicit_name = TRUE, /* do not use implicit tag names */
-    ignore_case = FALSE,       /* case is significant */
-    multi_line = FALSE,                /* matches are done one line at a time 
*/
-    single_line = FALSE;       /* dot does not match newline */
+    force_explicit_name = true, /* do not use implicit tag names */
+    ignore_case = false,       /* case is significant */
+    multi_line = false,                /* matches are done one line at a time 
*/
+    single_line = false;       /* dot does not match newline */
 
 
   if (strlen (regexp_pattern) < 3)
@@ -5703,17 +5701,17 @@
       case 'N':
        if (modifiers == name)
          error ("forcing explicit tag name but no name, ignoring");
-       force_explicit_name = TRUE;
+       force_explicit_name = true;
        break;
       case 'i':
-       ignore_case = TRUE;
+       ignore_case = true;
        break;
       case 's':
-       single_line = TRUE;
+       single_line = true;
        /* FALLTHRU */
       case 'm':
-       multi_line = TRUE;
-       need_filebuf = TRUE;
+       multi_line = true;
+       need_filebuf = true;
        break;
       default:
        error ("invalid regexp modifier `%c', ignoring", modifiers[0]);
@@ -5757,7 +5755,7 @@
   p_head->lang = lang;
   p_head->pat = patbuf;
   p_head->name = savestr (name);
-  p_head->error_signaled = FALSE;
+  p_head->error_signaled = false;
   p_head->force_explicit_name = force_explicit_name;
   p_head->ignore_case = ignore_case;
   p_head->multi_line = multi_line;
@@ -5871,7 +5869,7 @@
                {
                  error ("regexp stack overflow while matching \"%s\"",
                         rp->pattern);
-                 rp->error_signaled = TRUE;
+                 rp->error_signaled = true;
                }
              break;
            case -1:
@@ -5884,7 +5882,7 @@
                    {
                      error ("regexp matches the empty string: \"%s\"",
                             rp->pattern);
-                     rp->error_signaled = TRUE;
+                     rp->error_signaled = true;
                    }
                  match = -3;   /* exit from while loop */
                  break;
@@ -5901,10 +5899,10 @@
                name = substitute (buffer, rp->name, &rp->regs);
              if (rp->force_explicit_name)
                /* Force explicit tag name, if a name is there. */
-               pfnote (name, TRUE, buffer + linecharno,
+               pfnote (name, true, buffer + linecharno,
                        charno - linecharno + 1, lineno, linecharno);
              else
-               make_tag (name, strlen (name), TRUE, buffer + linecharno,
+               make_tag (name, strlen (name), true, buffer + linecharno,
                          charno - linecharno + 1, lineno, linecharno);
              break;
            }
@@ -5923,9 +5921,9 @@
   if (*cp == '\0' && !intoken (dbp[len]))
     {
       dbp += len;
-      return TRUE;
+      return true;
     }
-  return FALSE;
+  return false;
 }
 
 static void
@@ -5938,7 +5936,7 @@
       /* Go till you get to white space or a syntactic break */
       for (cp = bp + 1; !notinname (*cp); cp++)
        continue;
-      make_tag (bp, cp - bp, TRUE,
+      make_tag (bp, cp - bp, true,
                lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
     }
 
@@ -6073,7 +6071,7 @@
                  char *taggedfname;    /* name of original file as given */
                  char *name;           /* temp var */
 
-                 discard_until_line_directive = FALSE; /* found it */
+                 discard_until_line_directive = false; /* found it */
                  name = lbp->buffer + start;
                  *endp = '\0';
                  canonicalize_filename (name);
@@ -6121,7 +6119,7 @@
                        for (fdp = fdhead; fdp != NULL; fdp = fdp->next)
                          if (streq (fdp->infabsname, taggedabsname))
                            {
-                             discard_until_line_directive = TRUE;
+                             discard_until_line_directive = true;
                              free (taggedfname);
                              break;
                            }
@@ -6137,9 +6135,9 @@
                          fdhead->infabsname = savestr (curfdp->infabsname);
                          fdhead->infabsdir = savestr (curfdp->infabsdir);
                          fdhead->taggedfname = taggedfname;
-                         fdhead->usecharno = FALSE;
+                         fdhead->usecharno = false;
                          fdhead->prop = NULL;
-                         fdhead->written = FALSE;
+                         fdhead->written = false;
                          curfdp = fdhead;
                        }
                    }
@@ -6162,7 +6160,7 @@
              return;
            }
          /* End of file. */
-         discard_until_line_directive = FALSE;
+         discard_until_line_directive = false;
          return;
        }
     } /* if #line directives should be considered */
@@ -6192,7 +6190,7 @@
                {
                  error ("regexp stack overflow while matching \"%s\"",
                         rp->pattern);
-                 rp->error_signaled = TRUE;
+                 rp->error_signaled = true;
                }
              break;
            case -1:
@@ -6203,7 +6201,7 @@
              if (!rp->error_signaled)
                {
                  error ("regexp matches the empty string: \"%s\"", 
rp->pattern);
-                 rp->error_signaled = TRUE;
+                 rp->error_signaled = true;
                }
              break;
            default:
@@ -6215,9 +6213,9 @@
                name = substitute (lbp->buffer, rp->name, &rp->regs);
              if (rp->force_explicit_name)
                /* Force explicit tag name, if a name is there. */
-               pfnote (name, TRUE, lbp->buffer, match, lineno, linecharno);
+               pfnote (name, true, lbp->buffer, match, lineno, linecharno);
              else
-               make_tag (name, strlen (name), TRUE,
+               make_tag (name, strlen (name), true,
                          lbp->buffer, match, lineno, linecharno);
              break;
            }

=== modified file 'lib-src/hexl.c'
--- a/lib-src/hexl.c    2013-01-01 09:11:05 +0000
+++ b/lib-src/hexl.c    2013-12-14 21:36:44 +0000
@@ -37,12 +37,8 @@
 #define DEFAULT_GROUPING       0x01
 #define DEFAULT_BASE           16
 
-#undef TRUE
-#undef FALSE
-#define TRUE  (1)
-#define FALSE (0)
-
-int base = DEFAULT_BASE, un_flag = FALSE, iso_flag = FALSE, endian = 1;
+int base = DEFAULT_BASE;
+bool un_flag = false, iso_flag = false, endian = true;
 int group_by = DEFAULT_GROUPING;
 char *progname;
 
@@ -83,7 +79,7 @@
        }
       else if (!strcmp (*argv, "-un") || !strcmp (*argv, "-de"))
        {
-         un_flag = TRUE;
+         un_flag = true;
          --argc; argv++;
        }
       else if (!strcmp (*argv, "-hex"))
@@ -93,7 +89,7 @@
        }
       else if (!strcmp (*argv, "-iso"))
        {
-         iso_flag = TRUE;
+         iso_flag = true;
          --argc; argv++;
        }
       else if (!strcmp (*argv, "-oct"))
@@ -103,12 +99,12 @@
        }
       else if (!strcmp (*argv, "-big-endian"))
        {
-         endian = 1;
+         endian = true;
          --argc; argv++;
        }
       else if (!strcmp (*argv, "-little-endian"))
        {
-         endian = 0;
+         endian = false;
          --argc; argv++;
        }
       else if (!strcmp (*argv, "-group-by-8-bits"))
@@ -129,7 +125,7 @@
       else if (!strcmp (*argv, "-group-by-64-bits"))
        {
          group_by = 0x07;
-         endian = 0;
+         endian = false;
          --argc; argv++;
        }
       else

=== modified file 'lib-src/pop.c'
--- a/lib-src/pop.c     2013-05-18 05:32:17 +0000
+++ b/lib-src/pop.c     2013-12-14 21:36:44 +0000
@@ -124,7 +124,7 @@
 #endif
 
 char pop_error[ERROR_MAX];
-int pop_debug = 0;
+bool pop_debug = false;
 
 /*
  * Function: pop_open (char *host, char *username, char *password,
@@ -269,8 +269,8 @@
   server->data = 0;
   server->buffer_index = 0;
   server->buffer_size = GETLINE_MIN;
-  server->in_multi = 0;
-  server->trash_started = 0;
+  server->in_multi = false;
+  server->trash_started = false;
 
   if (getok (server))
     return (0);
@@ -686,7 +686,7 @@
   else if (0 == strncmp (*response, "+OK", 3))
     {
       for (*response += 3; **response == ' '; (*response)++) /* empty */;
-      server->in_multi = 1;
+      server->in_multi = true;
       return (0);
     }
   else
@@ -728,7 +728,7 @@
       if (! fromserver[1])
        {
          *line = 0;
-         server->in_multi = 0;
+         server->in_multi = false;
          return (0);
        }
       else
@@ -1546,7 +1546,7 @@
       /* avoid recursion; sendline can call pop_trash */
       if (server->trash_started)
        return;
-      server->trash_started = 1;
+      server->trash_started = true;
 
       sendline (server, "RSET");
       sendline (server, "QUIT");

=== modified file 'lib-src/pop.h'
--- a/lib-src/pop.h     2013-01-01 09:11:05 +0000
+++ b/lib-src/pop.h     2013-12-14 21:36:44 +0000
@@ -27,15 +27,15 @@
                                /* size when it needs to grow */
 
 extern char pop_error[];
-extern int pop_debug;
+extern bool pop_debug;
 
 struct _popserver
 {
   int file, data;
   char *buffer;
   int buffer_size, buffer_index;
-  int in_multi;
-  int trash_started;
+  bool_bf in_multi : 1;
+  bool_bf trash_started : 1;
 };
 
 typedef struct _popserver *popserver;
@@ -73,4 +73,3 @@
 extern int pop_reset (popserver server);
 extern int pop_quit (popserver server);
 extern void pop_close (popserver);
-

=== modified file 'lwlib/ChangeLog'
--- a/lwlib/ChangeLog   2013-12-01 22:33:13 +0000
+++ b/lwlib/ChangeLog   2013-12-14 21:36:44 +0000
@@ -1,3 +1,8 @@
+2013-12-14  Paul Eggert  <address@hidden>
+
+       Use bool for boolean, focusing on headers.
+       * xlwmenuP.h (XlwMenu_part): Use bool_bf for boolean bit-fields.
+
 2013-11-14  Paul Eggert  <address@hidden>
 
        * lwlib.c (safe_strdup): Prefer tail calls.

=== modified file 'lwlib/xlwmenuP.h'
--- a/lwlib/xlwmenuP.h  2013-01-01 09:11:05 +0000
+++ b/lwlib/xlwmenuP.h  2013-12-14 21:36:44 +0000
@@ -83,8 +83,8 @@
   int          horizontal;
 
   /* True means top_shadow_color and/or bottom_shadow_color must be freed.  */
-  unsigned free_top_shadow_color_p : 1;
-  unsigned free_bottom_shadow_color_p : 1;
+  bool_bf free_top_shadow_color_p : 1;
+  bool_bf free_bottom_shadow_color_p : 1;
 
   /* State of the XlwMenu */
   int                   top_depth;

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-12-14 19:32:50 +0000
+++ b/src/ChangeLog     2013-12-14 21:36:44 +0000
@@ -1,3 +1,133 @@
+2013-12-14  Paul Eggert  <address@hidden>
+
+       Use bool for boolean, focusing on headers.
+       * atimer.h, lisp.h, syssignal.h, syswait.h, unexelf.c:
+       No need to include <stdbool.h>, since conf_post.h does it now.
+       * buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
+       (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
+       (SET_PER_BUFFER_VALUE_P):
+       * ccl.c, ccl.h (setup_ccl_program):
+       * ccl.h (CHECK_CCL_PROGRAM):
+       * character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
+       (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
+       (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
+       (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
+       (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
+       (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
+       (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
+       * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
+       (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
+       (CHARSET_FAST_MAP_SET):
+       * coding.c (decode_coding_ccl, encode_coding_ccl):
+       * coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
+       (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
+       (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
+       (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
+       (decode_coding_c_string):
+       * composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
+       * conf_post.h (has_attribute):
+       * dispextern.h (trace_redisplay_p):
+       (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
+       (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
+       (SET_GLYPH_FROM_CHAR_GLYPH):
+       (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
+       (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
+       (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
+       (cursor_in_mouse_face_p):
+       * dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
+       (blank_row, prepare_desired_row)
+       (build_frame_matrix_from_leaf_window, make_current)
+       (mirror_make_current, mirrored_line_dance, mirror_line_dance)
+       (update_window, scrolling_window, update_frame_line):
+       * disptab.h (GLYPH_FOLLOW_ALIASES):
+       * editfns.c (Fformat):
+       * font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
+       (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
+       (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
+       (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
+       (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
+       (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
+       (FONT_DEFERRED_LOG):
+       * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P):
+       (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
+       (FRAME_MOUSE_UPDATE):
+       * fringe.c (Fdefine_fringe_bitmap):
+       * image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
+       (x_create_bitmap_from_xpm_data, xpm_load_image):
+       * intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
+       (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
+       (MERGE_INTERVAL_CACHE):
+       * keymap.h (KEYMAPP):
+       * lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
+       (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
+       (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
+       (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
+       (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
+       (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
+       (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
+       (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
+       * syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
+       (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
+       (SETUP_BUFFER_SYNTAX_TABLE):
+       * systime.h (timespec_valid_p):
+       * term.c (save_and_enable_current_matrix):
+       * window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
+       * xdisp.c (in_display_vector_p, display_tool_bar_line)
+       (redisplay_internal, try_window_reusing_current_matrix)
+       (sync_frame_with_window_matrix_rows, try_window_id)
+       (display_menu_bar, display_tty_menu_item, display_mode_line)
+       (coords_in_mouse_face_p, cursor_in_mouse_face_p):
+       * xmenu.c (xmenu_show):
+       * xterm.c (use_xim, x_term_init):
+       * xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
+       (struct x_bitmap_record):
+       Use bool for booleans.
+       * ccl.c (struct buffer_text):
+       * ccl.h (struct ccl_program):
+       * charset.h (struct charset):
+       * cm.h (struct cm):
+       * coding.h (struct iso_2022_spec, struct coding_system):
+       * dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
+       (struct glyph_string, struct face, struct face_cache)
+       (struct bidi_string_data, struct bidi_it)
+       (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
+       (struct image):
+       * editfns.c (Fformat):
+       * frame.h (struct frame):
+       * fringe.c (struct fringe_bitmap):
+       * intervals.h (struct interval):
+       * keyboard.h (struct kboard):
+       * lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
+       (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
+       (struct Lisp_Buffer_Local_Value, union specbinding):
+       * macfont.m (struct macfont_info):
+       * process.h (struct Lisp_Process):
+       * termchar.h (struct tty_display_info):
+       * window.h (struct window):
+       * xterm.h (struct x_output):
+       Use bool_bf for boolean bit-fields.
+       * ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
+       All callers changed.
+       * ccl.h (struct ccl_program): Remove unused members private_state,
+       src_multibyte, dst_multibyte, cr_consumed, suppress_error,
+       eight_bit_control.
+       (struct ccl_spec): Remove unused members cr_carryover,
+       eight_bit_carryover.
+       * conf_post.h: Include <stdbool.h>.
+       (bool_bf): New type.
+       * dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
+       * interval.h (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE)
+       Surround statement macro with proper 'do { ... } while (false)' 
brackets.
+       (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
+       (PRODUCE_GLYPHS): Simplify use of boolean.
+       * fileio.c (Fcopy_file):
+       If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
+       * lisp.h (UNGCPRO): Return void, not int.
+       (FOR_EACH_TAIL): Use void expression, not int expression.
+       * region-cache.c: Reindent.
+       * region-cache.h: Copy comments from region-cache.c, to fix
+       incorrect remarks about booleans.
+
 2013-12-14  Eli Zaretskii  <address@hidden>
 
        * xdisp.c (Fmove_point_visually): Expect overshoot in move_it_to

=== modified file 'src/atimer.h'
--- a/src/atimer.h      2013-08-27 18:47:55 +0000
+++ b/src/atimer.h      2013-12-14 21:36:44 +0000
@@ -19,7 +19,6 @@
 #ifndef EMACS_ATIMER_H
 #define EMACS_ATIMER_H
 
-#include <stdbool.h>
 #include <time.h>
 
 /* Forward declaration.  */

=== modified file 'src/buffer.h'
--- a/src/buffer.h      2013-12-01 22:33:13 +0000
+++ b/src/buffer.h      2013-12-14 21:36:44 +0000
@@ -226,7 +226,7 @@
            BUF_BEG_UNCHANGED (buf) = (start) - BUF_BEG (buf);          \
        }                                                               \
     }                                                                  \
-  while (0)
+  while (false)
 
 
 /* Macros to set PT in the current buffer, or another buffer.  */
@@ -302,7 +302,7 @@
       else                                                             \
        wrong_type_argument (Qinteger_or_marker_p, __pos);              \
     }                                                                  \
-  while (0)
+  while (false)
 
 /* Maximum number of bytes in a buffer.
    A buffer cannot contain more bytes than a 1-origin fixnum can represent,
@@ -472,13 +472,13 @@
        to move a marker within a buffer.  */
     struct Lisp_Marker *markers;
 
-    /* Usually 0.  Temporarily set to 1 in decode_coding_gap to
+    /* Usually false.  Temporarily true in decode_coding_gap to
        prevent Fgarbage_collect from shrinking the gap and losing
        not-yet-decoded bytes.  */
-    unsigned inhibit_shrinking : 1;
+    bool_bf inhibit_shrinking : 1;
 
     /* True if it needs to be redisplayed.  */
-    unsigned redisplay : 1;
+    bool_bf redisplay : 1;
   };
 
 /* Most code should use this macro to access Lisp fields in struct buffer.  */
@@ -849,10 +849,10 @@
 
   /* Non-zero means don't use redisplay optimizations for
      displaying this buffer.  */
-  unsigned prevent_redisplay_optimizations_p : 1;
+  bool_bf prevent_redisplay_optimizations_p : 1;
 
   /* Non-zero whenever the narrowing is changed in this buffer.  */
-  unsigned clip_changed : 1;
+  bool_bf clip_changed : 1;
 
   /* List of overlays that end at or before the current center,
      in order of end-position.  */
@@ -1021,7 +1021,7 @@
        else                                            \
          eassert (b->indirections >= 0);               \
       }                                                        \
-  } while (0)
+  } while (false)
 
 /* Chain of all buffers, including killed ones.  */
 
@@ -1119,16 +1119,16 @@
   do {                                                                 \
     ptrdiff_t maxlen = 40;                                             \
     overlays = alloca (maxlen * sizeof *overlays);                     \
-    noverlays = overlays_at (posn, 0, &overlays, &maxlen,              \
+    noverlays = overlays_at (posn, false, &overlays, &maxlen,          \
                             nextp, NULL, chrq);                        \
     if (noverlays > maxlen)                                            \
       {                                                                        
\
        maxlen = noverlays;                                             \
        overlays = alloca (maxlen * sizeof *overlays);                  \
-       noverlays = overlays_at (posn, 0, &overlays, &maxlen,           \
+       noverlays = overlays_at (posn, false, &overlays, &maxlen,       \
                                 nextp, NULL, chrq);                    \
       }                                                                        
\
-  } while (0)
+  } while (false)
 
 extern Lisp_Object Vbuffer_alist;
 extern Lisp_Object Qbefore_change_functions;
@@ -1267,12 +1267,12 @@
 #define PER_BUFFER_VAR_IDX(VAR) \
     PER_BUFFER_IDX (PER_BUFFER_VAR_OFFSET (VAR))
 
-/* Value is non-zero if the variable with index IDX has a local value
+/* Value is true if the variable with index IDX has a local value
    in buffer B.  */
 
 #define PER_BUFFER_VALUE_P(B, IDX)             \
     (((IDX) < 0 || IDX >= last_per_buffer_idx) \
-     ? (emacs_abort (), 0)                     \
+     ? (emacs_abort (), false)                 \
      : ((B)->local_flags[IDX] != 0))
 
 /* Set whether per-buffer variable with index IDX has a buffer-local
@@ -1283,7 +1283,7 @@
        if ((IDX) < 0 || (IDX) >= last_per_buffer_idx)  \
         emacs_abort ();                                \
        (B)->local_flags[IDX] = (VAL);                  \
-     } while (0)
+     } while (false)
 
 /* Return the index value of the per-buffer variable at offset OFFSET
    in the buffer structure.
@@ -1348,7 +1348,7 @@
   return NATNUMP (down) ? XFASTINT (down) : c;
 }
 
-/* 1 if C is upper case.  */
+/* True if C is upper case.  */
 INLINE bool uppercasep (int c) { return downcase (c) != c; }
 
 /* Upcase a character C known to be not upper case.  */
@@ -1360,7 +1360,7 @@
   return NATNUMP (up) ? XFASTINT (up) : c;
 }
 
-/* 1 if C is lower case.  */
+/* True if C is lower case.  */
 INLINE bool
 lowercasep (int c)
 {

=== modified file 'src/ccl.c'
--- a/src/ccl.c 2013-11-04 06:09:03 +0000
+++ b/src/ccl.c 2013-12-14 21:36:44 +0000
@@ -628,7 +628,7 @@
   {                                                            \
     struct ccl_program called_ccl;                             \
     if (stack_idx >= 256                                       \
-       || (setup_ccl_program (&called_ccl, (symbol)) != 0))    \
+       || ! setup_ccl_program (&called_ccl, (symbol)))         \
       {                                                                \
        if (stack_idx > 0)                                      \
          {                                                     \
@@ -1712,9 +1712,7 @@
     }
 
  ccl_error_handler:
-  /* The suppress_error member is set when e.g. a CCL-based coding
-     system is used for terminal output.  */
-  if (!ccl->suppress_error && destination)
+  if (destination)
     {
       /* We can insert an error message only if DESTINATION is
          specified and we still have a room to store the message
@@ -1919,10 +1917,10 @@
 /* Setup fields of the structure pointed by CCL appropriately for the
    execution of CCL program CCL_PROG.  CCL_PROG is the name (symbol)
    of the CCL program or the already compiled code (vector).
-   Return 0 if we succeed this setup, else return -1.
+   Return true iff successful.
 
-   If CCL_PROG is nil, we just reset the structure pointed by CCL.  */
-int
+   If CCL_PROG is nil, just reset the structure pointed by CCL.  */
+bool
 setup_ccl_program (struct ccl_program *ccl, Lisp_Object ccl_prog)
 {
   int i;
@@ -1933,7 +1931,7 @@
 
       ccl_prog = ccl_get_compiled_code (ccl_prog, &ccl->idx);
       if (! VECTORP (ccl_prog))
-       return -1;
+       return false;
       vp = XVECTOR (ccl_prog);
       ccl->size = vp->header.size;
       ccl->prog = vp->contents;
@@ -1950,14 +1948,11 @@
   ccl->ic = CCL_HEADER_MAIN;
   for (i = 0; i < 8; i++)
     ccl->reg[i] = 0;
-  ccl->last_block = 0;
-  ccl->private_state = 0;
+  ccl->last_block = false;
   ccl->status = 0;
   ccl->stack_idx = 0;
-  ccl->suppress_error = 0;
-  ccl->eight_bit_control = 0;
-  ccl->quit_silently = 0;
-  return 0;
+  ccl->quit_silently = false;
+  return true;
 }
 
 
@@ -2003,7 +1998,7 @@
   struct ccl_program ccl;
   int i;
 
-  if (setup_ccl_program (&ccl, ccl_prog) < 0)
+  if (! setup_ccl_program (&ccl, ccl_prog))
     error ("Invalid CCL program");
 
   CHECK_VECTOR (reg);
@@ -2065,7 +2060,7 @@
   ptrdiff_t consumed_chars, consumed_bytes, produced_chars;
   int buf_magnification;
 
-  if (setup_ccl_program (&ccl, ccl_prog) < 0)
+  if (! setup_ccl_program (&ccl, ccl_prog))
     error ("Invalid CCL program");
 
   CHECK_VECTOR (status);

=== modified file 'src/ccl.h'
--- a/src/ccl.h 2012-09-01 06:38:52 +0000
+++ b/src/ccl.h 2013-12-14 21:36:44 +0000
@@ -51,34 +51,16 @@
   int reg[8];                  /* CCL registers, reg[7] is used for
                                   condition flag of relational
                                   operations.  */
-  int private_state;            /* CCL instruction may use this
-                                  for private use, mainly for saving
-                                  internal states on suspending.
-                                  This variable is set to 0 when ccl is
-                                  set up.  */
-  int last_block;              /* Set to 1 while processing the last
-                                  block. */
   int status;                  /* Exit status of the CCL program.  */
   int buf_magnification;       /* Output buffer magnification.  How
                                   many times bigger the output buffer
                                   should be than the input buffer.  */
   int stack_idx;               /* How deep the call of CCL_Call is nested.  */
-  int src_multibyte;           /* 1 if the input buffer is multibyte.  */
-  int dst_multibyte;           /* 1 if the output buffer is multibyte.  */
-  int cr_consumed;             /* Flag for encoding DOS-like EOL
-                                  format when the CCL program is used
-                                  for encoding by a coding
-                                  system.  */
   int consumed;
   int produced;
-  int suppress_error;          /* If nonzero, don't insert error
-                                  message in the output.  */
-  int eight_bit_control;       /* If nonzero, ccl_driver counts all
-                                  eight-bit-control bytes written by
-                                  CCL_WRITE_CHAR.  After execution,
-                                  if no such byte is written, set
-                                  this value to zero.  */
-  int quit_silently;           /* If nonzero, don't append "CCL:
+  bool_bf last_block : 1;      /* Set to true while processing the last
+                                  block. */
+  bool_bf quit_silently : 1;   /* If true, don't append "CCL:
                                   Quitted" to the generated text when
                                   CCL program is quitted. */
 };
@@ -88,15 +70,13 @@
 
 struct ccl_spec {
   struct ccl_program ccl;
-  int cr_carryover;            /* CR carryover flag.  */
-  unsigned char eight_bit_carryover[MAX_MULTIBYTE_LENGTH];
 };
 
 #define CODING_SPEC_CCL_PROGRAM(coding) ((coding)->spec.ccl.ccl)
 
 /* Setup fields of the structure pointed by CCL appropriately for the
    execution of ccl program CCL_PROG (symbol or vector).  */
-extern int setup_ccl_program (struct ccl_program *, Lisp_Object);
+extern bool setup_ccl_program (struct ccl_program *, Lisp_Object);
 
 extern void ccl_driver (struct ccl_program *, int *, int *, int, int,
                         Lisp_Object);
@@ -107,6 +87,6 @@
   do {                                         \
     if (NILP (Fccl_program_p (x)))             \
       wrong_type_argument (Qcclp, (x));        \
-  } while (0);
+  } while (false);
 
 #endif /* EMACS_CCL_H */

=== modified file 'src/character.h'
--- a/src/character.h   2013-11-04 06:09:03 +0000
+++ b/src/character.h   2013-12-14 21:36:44 +0000
@@ -91,7 +91,7 @@
   do {                         \
     if (! ASCII_CHAR_P (c))    \
       c = CHAR_TO_BYTE8 (c);   \
-  } while (0)
+  } while (false)
 
 
 /* If C is not ASCII, make it multibyte.  Assumes C < 256.  */
@@ -123,14 +123,14 @@
     Lisp_Object tmp = XCAR (x);                \
     CHECK_CHARACTER (tmp);             \
     XSETCAR ((x), tmp);                        \
-  } while (0)
+  } while (false)
 
 #define CHECK_CHARACTER_CDR(x) \
   do {                                 \
     Lisp_Object tmp = XCDR (x);                \
     CHECK_CHARACTER (tmp);             \
     XSETCDR ((x), tmp);                        \
-  } while (0)
+  } while (false)
 
 /* Nonzero iff C is a character of code less than 0x100.  */
 #define SINGLE_BYTE_CHAR_P(c) UNSIGNED_CMP (c, <, 0x100)
@@ -209,7 +209,7 @@
        verify (sizeof (c) <= sizeof (unsigned));       \
        (p) += char_string (c, p);              \
       }                                                \
-  } while (0)
+  } while (false)
 
 
 /* Nonzero iff BYTE starts a non-ASCII character in a multibyte
@@ -274,7 +274,7 @@
   do {                                 \
     if ((p) < (limit))                 \
       (p) += BYTES_BY_CHAR_HEAD (*(p));        \
-  } while (0)
+  } while (false)
 
 
 /* If P is after LIMIT, advance P to the previous character boundary.
@@ -291,7 +291,7 @@
        } while (chp >= limit && ! CHAR_HEAD_P (*chp));                 \
        (p) = (BYTES_BY_CHAR_HEAD (*chp) == (p) - chp) ? chp : (p) - 1; \
       }                                                                        
\
-  } while (0)
+  } while (false)
 
 /* Return the character code of character whose multibyte form is at
    P.  Note that this macro unifies CJK characters whose codepoints
@@ -382,7 +382,7 @@
          BYTEIDX++;                                                    \
        }                                                               \
     }                                                                  \
-  while (0)
+  while (false)
 
 /* Like FETCH_STRING_CHAR_ADVANCE, but return a multibyte character
    even if STRING is unibyte.  */
@@ -406,7 +406,7 @@
          MAKE_CHAR_MULTIBYTE (OUTPUT);                                       \
        }                                                                     \
     }                                                                        \
-  while (0)
+  while (false)
 
 
 /* Like FETCH_STRING_CHAR_ADVANCE, but assumes STRING is multibyte.  */
@@ -421,7 +421,7 @@
       BYTEIDX += fetch_len;                                                 \
       CHARIDX++;                                                            \
     }                                                                       \
-  while (0)
+  while (false)
 
 
 /* Like FETCH_STRING_CHAR_ADVANCE, but fetch character from the current
@@ -445,7 +445,7 @@
          BYTEIDX++;                                            \
        }                                                       \
     }                                                          \
-  while (0)
+  while (false)
 
 
 /* Like FETCH_CHAR_ADVANCE, but assumes the current buffer is multibyte.  */
@@ -460,7 +460,7 @@
       BYTEIDX += chlen;                                                \
       CHARIDX++;                                               \
     }                                                          \
-  while (0)
+  while (false)
 
 
 /* Increment the buffer byte position POS_BYTE of the current buffer to
@@ -470,7 +470,7 @@
   do {                                                 \
     unsigned char *chp = BYTE_POS_ADDR (pos_byte);     \
     pos_byte += BYTES_BY_CHAR_HEAD (*chp);             \
-  } while (0)
+  } while (false)
 
 
 /* Decrement the buffer byte position POS_BYTE of the current buffer to
@@ -490,7 +490,7 @@
        chp--;                                  \
        pos_byte--;                             \
       }                                                \
-  } while (0)
+  } while (false)
 
 /* Increment both CHARPOS and BYTEPOS, each in the appropriate way.  */
 
@@ -503,7 +503,7 @@
       else                                                     \
        INC_POS ((bytepos));                                    \
     }                                                          \
-  while (0)
+  while (false)
 
 
 /* Decrement both CHARPOS and BYTEPOS, each in the appropriate way.  */
@@ -517,7 +517,7 @@
       else                                                     \
        DEC_POS ((bytepos));                                    \
     }                                                          \
-  while (0)
+  while (false)
 
 
 /* Increment the buffer byte position POS_BYTE of the current buffer to
@@ -529,7 +529,7 @@
   do {                                                         \
     unsigned char *chp = BUF_BYTE_ADDRESS (buf, pos_byte);     \
     pos_byte += BYTES_BY_CHAR_HEAD (*chp);                     \
-  } while (0)
+  } while (false)
 
 
 /* Decrement the buffer byte position POS_BYTE of the current buffer to
@@ -548,7 +548,7 @@
        chp--;                                                          \
        pos_byte--;                                                     \
       }                                                                        
\
-  } while (0)
+  } while (false)
 
 
 /* Return a non-outlandish value for the tab width.  */
@@ -602,7 +602,7 @@
    : 0)
 
 /* If C is a high surrogate, return 1.  If C is a low surrogate,
-   return 0.  Otherwise, return 0.  */
+   return 2.  Otherwise, return 0.  */
 
 #define CHAR_SURROGATE_PAIR_P(c)       \
   ((c) < 0xD800 ? 0                    \

=== modified file 'src/charset.h'
--- a/src/charset.h     2013-12-01 22:33:13 +0000
+++ b/src/charset.h     2013-12-14 21:36:44 +0000
@@ -171,23 +171,23 @@
   unsigned char *code_space_mask;
 
   /* True if there's no gap in code-points.  */
-  unsigned code_linear_p : 1;
+  bool_bf code_linear_p : 1;
 
   /* True if the charset is treated as 96 chars in ISO-2022
      as opposed to 94 chars.  */
-  unsigned iso_chars_96 : 1;
+  bool_bf iso_chars_96 : 1;
 
   /* True if the charset is compatible with ASCII.  */
-  unsigned ascii_compatible_p : 1;
+  bool_bf ascii_compatible_p : 1;
 
   /* True if the charset is supplementary.  */
-  unsigned supplementary_p : 1;
+  bool_bf supplementary_p : 1;
 
   /* True if all the code points are representable by Lisp_Int.  */
-  unsigned compact_codes_p : 1;
+  bool_bf compact_codes_p : 1;
 
   /* True if the charset is unified with Unicode.  */
-  unsigned unified_p : 1;
+  bool_bf unified_p : 1;
 
   /* ISO final byte of the charset: 48..127.  It may be -1 if the
      charset doesn't conform to ISO-2022.  */
@@ -344,7 +344,7 @@
   do {                                                         \
     if (! SYMBOLP (x) || CHARSET_SYMBOL_HASH_INDEX (x) < 0)    \
       wrong_type_argument (Qcharsetp, (x));                    \
-  } while (0)
+  } while (false)
 
 
 /* Check if X is a valid charset symbol.  If valid, set ID to the id
@@ -357,7 +357,7 @@
       wrong_type_argument (Qcharsetp, (x));                            \
     id = XINT (AREF (HASH_VALUE (XHASH_TABLE (Vcharset_hash_table), idx), \
                     charset_id));                                      \
-  } while (0)
+  } while (false)
 
 
 /* Check if X is a valid charset symbol.  If valid, set ATTR to the
@@ -366,7 +366,7 @@
   do {                                                                 \
     if (!SYMBOLP (x) || NILP (attr = CHARSET_SYMBOL_ATTRIBUTES (x)))   \
       wrong_type_argument (Qcharsetp, (x));                            \
-  } while (0)
+  } while (false)
 
 
 #define CHECK_CHARSET_GET_CHARSET(x, charset)  \
@@ -374,7 +374,7 @@
     int csid;                                  \
     CHECK_CHARSET_GET_ID (x, csid);            \
     charset = CHARSET_FROM_ID (csid);          \
-  } while (0)
+  } while (false)
 
 
 /* Lookup Vcharset_ordered_list and return the first charset that
@@ -383,7 +383,7 @@
   ((c) < 0x80 ? CHARSET_FROM_ID (charset_ascii)        \
    : char_charset ((c), Qnil, NULL))
 
-#if 0
+#if false
 /* Char-table of charset-sets.  Each element is a bool vector indexed
    by a charset ID.  */
 extern Lisp_Object Vchar_charset_set;
@@ -452,7 +452,7 @@
      : encode_char (charset, c))))
 
 
-/* Set to 1 when a charset map is loaded to warn that a buffer text
+/* Set to true when a charset map is loaded to warn that a buffer text
    and a string data may be relocated.  */
 extern bool charset_map_loaded;
 
@@ -489,7 +489,7 @@
       (fast_map)[(c) >> 10] |= 1 << (((c) >> 7) & 7);          \
     else                                                       \
       (fast_map)[((c) >> 15) + 62] |= 1 << (((c) >> 12) & 7);  \
-  } while (0)
+  } while (false)
 
 
 

=== modified file 'src/cm.h'
--- a/src/cm.h  2013-09-05 11:00:55 +0000
+++ b/src/cm.h  2013-12-14 21:36:44 +0000
@@ -47,7 +47,7 @@
     char *cm_abs;              /* absolute (cm) */
     const char *cm_habs;       /* horizontal absolute (ch) */
     const char *cm_vabs;       /* vertical absolute (cv) */
-#if 0
+#if false
     const char *cm_ds;         /* "don't send" string (ds) */
 #endif
     const char *cm_multiup;    /* multiple up (UP) */
@@ -57,19 +57,19 @@
     int cm_cols;               /* number of cols on screen (co) */
     int cm_rows;               /* number of rows on screen (li) */
     int cm_tabwidth;           /* tab width (it) */
-    unsigned int cm_autowrap:1;        /* autowrap flag (am) */
-    unsigned int cm_magicwrap:1; /* VT-100: cursor stays in last col but
+    bool_bf cm_autowrap : 1;   /* autowrap flag (am) */
+    bool_bf cm_magicwrap : 1;  /* VT-100: cursor stays in last col but
                                    will cm_wrap if next char is
                                    printing (xn) */
-    unsigned int cm_usetabs:1; /* if set, use tabs */
-    unsigned int cm_losewrap:1;        /* if reach right margin, forget cursor
+    bool_bf cm_usetabs : 1;    /* if set, use tabs */
+    bool_bf cm_losewrap : 1;   /* if reach right margin, forget cursor
                                   location */
-    unsigned int cm_autolf:1;  /* \r performs a \r\n (rn) */
+    bool_bf cm_autolf : 1;     /* \r performs a \r\n (rn) */
 
     /* Parameterized capabilities.  This needs to be a struct since
        the costs are accessed through pointers.  */
 
-#if 0
+#if false
     struct parmcap cc_abs;     /* absolute (cm) */
     struct parmcap cc_habs;    /* horizontal absolute (ch) */
     struct parmcap cc_vabs;    /* vertical absolute (cv) */

=== modified file 'src/coding.c'
--- a/src/coding.c      2013-11-18 16:45:48 +0000
+++ b/src/coding.c      2013-12-14 21:36:44 +0000
@@ -5199,7 +5199,7 @@
          source_charbuf[i++] = *p++;
 
       if (p == src_end && coding->mode & CODING_MODE_LAST_BLOCK)
-       ccl->last_block = 1;
+       ccl->last_block = true;
       /* As ccl_driver calls DECODE_CHAR, buffer may be relocated.  */
       charset_map_loaded = 0;
       ccl_driver (ccl, source_charbuf, charbuf, i, charbuf_end - charbuf,
@@ -5259,7 +5259,7 @@
   CODING_GET_INFO (coding, attrs, charset_list);
   if (coding->consumed_char == coding->src_chars
       && coding->mode & CODING_MODE_LAST_BLOCK)
-    ccl->last_block = 1;
+    ccl->last_block = true;
 
   do
     {

=== modified file 'src/coding.h'
--- a/src/coding.h      2013-11-18 16:45:48 +0000
+++ b/src/coding.h      2013-12-14 21:36:44 +0000
@@ -226,7 +226,7 @@
   hash_lookup (XHASH_TABLE (Vcoding_system_hash_table),                \
               coding_system_symbol, NULL)
 
-/* Return 1 if CODING_SYSTEM_SYMBOL is a coding system.  */
+/* Return true if CODING_SYSTEM_SYMBOL is a coding system.  */
 
 #define CODING_SYSTEM_P(coding_system_symbol)          \
   (CODING_SYSTEM_ID (coding_system_symbol) >= 0                \
@@ -240,7 +240,7 @@
     if (CODING_SYSTEM_ID (x) < 0                       \
        && NILP (Fcheck_coding_system (x)))             \
       wrong_type_argument (Qcoding_system_p, (x));     \
-  } while (0)
+  } while (false)
 
 
 /* Check if X is a coding system or not.  If it is, set SEPC to the
@@ -256,7 +256,7 @@
       }                                                        \
     if (NILP (spec))                                   \
       wrong_type_argument (Qcoding_system_p, (x));     \
-  } while (0)
+  } while (false)
 
 
 /* Check if X is a coding system or not.  If it is, set ID to the
@@ -273,7 +273,7 @@
        }                                                       \
       if (id < 0)                                              \
        wrong_type_argument (Qcoding_system_p, (x));    \
-    } while (0)
+    } while (false)
 
 
 /*** GENERAL section ***/
@@ -361,13 +361,13 @@
 
   /* True temporarily only when graphic register 2 or 3 is invoked by
      single-shift while encoding.  */
-  unsigned single_shifting : 1;
+  bool_bf single_shifting : 1;
 
   /* True temporarily only when processing at beginning of line.  */
-  unsigned bol : 1;
+  bool_bf bol : 1;
 
   /* If true, we are now scanning embedded UTF-8 sequence.  */
-  unsigned embedded_utf_8 : 1;
+  bool_bf embedded_utf_8 : 1;
 
   /* The current composition.  */
   struct composition_status cmp_status;
@@ -455,11 +455,11 @@
   unsigned char *safe_charsets;
 
   /* The following two members specify how binary 8-bit code 128..255
-     are represented in source and destination text respectively.  1
-     means they are represented by 2-byte sequence, 0 means they are
+     are represented in source and destination text respectively.  True
+     means they are represented by 2-byte sequence, false means they are
      represented by 1-byte as is (see the comment in character.h).  */
-  unsigned src_multibyte : 1;
-  unsigned dst_multibyte : 1;
+  bool_bf src_multibyte : 1;
+  bool_bf dst_multibyte : 1;
 
   /* How may heading bytes we can skip for decoding.  This is set to
      -1 in setup_coding_system, and updated by detect_coding.  So,
@@ -510,14 +510,14 @@
 
   /* True if the source of conversion is not in the member
      `charbuf', but at `src_object'.  */
-  unsigned chars_at_source : 1;
+  bool_bf chars_at_source : 1;
 
   /* Nonzero if the result of conversion is in `destination'
      buffer rather than in `dst_object'.  */
-  unsigned raw_destination : 1;
+  bool_bf raw_destination : 1;
 
-  /* Set to 1 if charbuf contains an annotation.  */
-  unsigned annotated : 1;
+  /* Set to true if charbuf contains an annotation.  */
+  bool_bf annotated : 1;
 
   unsigned char carryover[64];
   int carryover_bytes;
@@ -543,28 +543,29 @@
 #define CODING_REQUIRE_DETECTION_MASK          0x1000
 #define CODING_RESET_AT_BOL_MASK               0x2000
 
-/* Return 1 if the coding context CODING requires annotation
+/* Return nonzero if the coding context CODING requires annotation
    handling.  */
 #define CODING_REQUIRE_ANNOTATION(coding) \
   ((coding)->common_flags & CODING_ANNOTATION_MASK)
 
-/* Return 1 if the coding context CODING prefers decoding into unibyte.  */
+/* Return nonzero if the coding context CODING prefers decoding into
+   unibyte.  */
 #define CODING_FOR_UNIBYTE(coding) \
   ((coding)->common_flags & CODING_FOR_UNIBYTE_MASK)
 
-/* Return 1 if the coding context CODING requires specific code to be
+/* Return nonzero if the coding context CODING requires specific code to be
    attached at the tail of converted text.  */
 #define CODING_REQUIRE_FLUSHING(coding) \
   ((coding)->common_flags & CODING_REQUIRE_FLUSHING_MASK)
 
-/* Return 1 if the coding context CODING requires code conversion on
+/* Return nonzero if the coding context CODING requires code conversion on
    decoding.  */
 #define CODING_REQUIRE_DECODING(coding)        \
   ((coding)->dst_multibyte             \
    || (coding)->common_flags & CODING_REQUIRE_DECODING_MASK)
 
 
-/* Return 1 if the coding context CODING requires code conversion on
+/* Return nonzero if the coding context CODING requires code conversion on
    encoding.
    The non-multibyte part of the condition is to support encoding of
    unibyte strings/buffers generated by string-as-unibyte or
@@ -575,12 +576,12 @@
    || (coding)->mode & CODING_MODE_SELECTIVE_DISPLAY)
 
 
-/* Return 1 if the coding context CODING requires some kind of code
+/* Return nonzero if the coding context CODING requires some kind of code
    detection.  */
 #define CODING_REQUIRE_DETECTION(coding) \
   ((coding)->common_flags & CODING_REQUIRE_DETECTION_MASK)
 
-/* Return 1 if the coding context CODING requires code conversion on
+/* Return nonzero if the coding context CODING requires code conversion on
    decoding or some kind of code detection.  */
 #define CODING_MAY_REQUIRE_DECODING(coding)    \
   (CODING_REQUIRE_DECODING (coding)            \
@@ -604,7 +605,7 @@
       (j1 = s1 * 2 - ((s1 >= 0xE0) ? 0x161 : 0xE1),    \
        j2 = s2 - ((s2 >= 0x7F) ? 0x20 : 0x1F));                \
     (code) = (j1 << 8) | j2;                           \
-  } while (0)
+  } while (false)
 
 #define SJIS_TO_JIS2(code)                             \
   do {                                                 \
@@ -629,7 +630,7 @@
        j2 = s2 - ((s2 >= 0x7F ? 0x20 : 0x1F));         \
       }                                                        \
     (code) = (j1 << 8) | j2;                           \
-  } while (0)
+  } while (false)
 
 
 #define JIS_TO_SJIS(code)                              \
@@ -644,7 +645,7 @@
       (s1 = j1 / 2 + ((j1 < 0x5F) ? 0x70 : 0xB0),      \
        s2 = j2 + 0x7E);                                        \
     (code) = (s1 << 8) | s2;                           \
-  } while (0)
+  } while (false)
 
 #define JIS_TO_SJIS2(code)                             \
   do {                                                 \
@@ -668,7 +669,7 @@
        s2 = j2 + 0x7E;                                 \
       }                                                        \
     (code) = (s1 << 8) | s2;                           \
-  } while (0)
+  } while (false)
 
 /* Encode the file name NAME using the specified coding system
    for file names, if any.  */
@@ -682,18 +683,18 @@
    for system functions, if any.  */
 #define ENCODE_SYSTEM(str)                                                \
   (! NILP (Vlocale_coding_system)                                         \
-   ? code_convert_string_norecord (str, Vlocale_coding_system, 1)         \
+   ? code_convert_string_norecord (str, Vlocale_coding_system, true)      \
    : str)
 
 /* Decode the string STR using the specified coding system
    for system functions, if any.  */
 #define DECODE_SYSTEM(str)                                                \
   (! NILP (Vlocale_coding_system)                                         \
-   ? code_convert_string_norecord (str, Vlocale_coding_system, 0)         \
+   ? code_convert_string_norecord (str, Vlocale_coding_system, false)     \
    : str)
 
 /* Note that this encodes utf-8, not utf-8-emacs, so it's not a no-op.  */
-#define ENCODE_UTF_8(str) code_convert_string_norecord (str, Qutf_8, 1)
+#define ENCODE_UTF_8(str) code_convert_string_norecord (str, Qutf_8, true)
 
 /* Extern declarations.  */
 extern Lisp_Object code_conversion_save (bool, bool);
@@ -759,7 +760,7 @@
     (coding)->src_chars = (coding)->src_bytes = (bytes);               \
     decode_coding_object ((coding), Qnil, 0, 0, (bytes), (bytes),      \
                          (dst_object));                                \
-  } while (0)
+  } while (false)
 
 
 extern Lisp_Object preferred_coding_system (void);

=== modified file 'src/composite.h'
--- a/src/composite.h   2013-11-04 06:09:03 +0000
+++ b/src/composite.h   2013-12-14 21:36:44 +0000
@@ -112,7 +112,7 @@
     gref = (rule_code) / 12;                                           \
     if (gref > 12) gref = 11;                                          \
     nref = (rule_code) % 12;                                           \
-  } while (0)
+  } while (false)
 
 /* Like COMPOSITION_DECODE_REFS (RULE_CODE, GREF, NREF), but also
    decode RULE_CODE into XOFF and YOFF (vertical offset).  */
@@ -122,7 +122,7 @@
     xoff = (rule_code) >> 16;                                          \
     yoff = ((rule_code) >> 8) & 0xFF;                                  \
     COMPOSITION_DECODE_REFS (rule_code, gref, nref);                   \
-  } while (0)
+  } while (false)
 
 /* Nonzero if the global reference point GREF and new reference point NREF are
    valid.  */

=== modified file 'src/conf_post.h'
--- a/src/conf_post.h   2013-11-07 05:31:04 +0000
+++ b/src/conf_post.h   2013-12-14 21:36:44 +0000
@@ -32,6 +32,15 @@
 # include config_opsysfile
 #endif
 
+#include <stdbool.h>
+
+/* The pre-C99 <stdbool.h> emulation doesn't work for bool bitfields.  */
+#if __STDC_VERSION__ < 199901
+typedef unsigned int bool_bf;
+#else
+typedef bool bool_bf;
+#endif
+
 #ifndef WINDOWSNT
 /* On AIX 3 this must be included before any other include file.  */
 #include <alloca.h>
@@ -41,7 +50,7 @@
 #endif
 
 #ifndef __has_attribute
-# define __has_attribute(a) 0 /* non-clang */
+# define __has_attribute(a) false /* non-clang */
 #endif
 
 #ifdef DARWIN_OS

=== modified file 'src/dispextern.h'
--- a/src/dispextern.h  2013-12-12 08:39:41 +0000
+++ b/src/dispextern.h  2013-12-14 21:36:44 +0000
@@ -139,9 +139,9 @@
 /* Macros to include code only if GLYPH_DEBUG is defined.  */
 
 #ifdef GLYPH_DEBUG
-#define IF_DEBUG(X)    X
+#define IF_DEBUG(X)    (X)
 #else
-#define IF_DEBUG(X)    (void) 0
+#define IF_DEBUG(X)    ((void) 0)
 #endif
 
 /* Macro for displaying traces of redisplay.  If Emacs was compiled
@@ -150,18 +150,18 @@
 
 #ifdef GLYPH_DEBUG
 
-extern int trace_redisplay_p EXTERNALLY_VISIBLE;
+extern bool trace_redisplay_p EXTERNALLY_VISIBLE;
 #include <stdio.h>
 
 #define TRACE(X)                               \
+   do {                                                \
      if (trace_redisplay_p)                    \
        fprintf X;                              \
-     else                                      \
-       (void) 0
+   } while (false)
 
 #else /* not GLYPH_DEBUG */
 
-#define TRACE(X)       (void) 0
+#define TRACE(X)       ((void) 0)
 
 #endif /* GLYPH_DEBUG */
 
@@ -205,7 +205,7 @@
         else                                   \
           ++(POS).bytepos;                     \
        }                                       \
-     while (0)
+     while (false)
 
 /* Decrement text position POS.  */
 
@@ -218,7 +218,7 @@
         else                                   \
           --(POS).bytepos;                     \
        }                                       \
-     while (0)
+     while (false)
 
 /* Set text position POS from marker MARKER.  */
 
@@ -323,7 +323,7 @@
        SET_GLYPH (glyph, (XINT (gc) & ((1 << CHARACTERBITS)-1)),       \
                   (XINT (gc) >> CHARACTERBITS));                       \
     }                                                                  \
-  while (0)
+  while (false)
 
 /* The ID of the mode line highlighting face.  */
 enum { GLYPH_MODE_LINE_FACE = 1 };
@@ -408,41 +408,41 @@
      should be an enumerator of type enum glyph_type.  */
   unsigned type : 3;
 
-  /* 1 means this glyph was produced from multibyte text.  Zero
+  /* True means this glyph was produced from multibyte text.  False
      means it was produced from unibyte text, i.e. charsets aren't
      applicable, and encoding is not performed.  */
-  unsigned multibyte_p : 1;
+  bool_bf multibyte_p : 1;
 
-  /* Non-zero means draw a box line at the left or right side of this
+  /* True means draw a box line at the left or right side of this
      glyph.  This is part of the implementation of the face attribute
      `:box'.  */
-  unsigned left_box_line_p : 1;
-  unsigned right_box_line_p : 1;
+  bool_bf left_box_line_p : 1;
+  bool_bf right_box_line_p : 1;
 
-  /* Non-zero means this glyph's physical ascent or descent is greater
+  /* True means this glyph's physical ascent or descent is greater
      than its logical ascent/descent, i.e. it may potentially overlap
      glyphs above or below it.  */
-  unsigned overlaps_vertically_p : 1;
+  bool_bf overlaps_vertically_p : 1;
 
-  /* For terminal frames, 1 means glyph is a padding glyph.  Padding
+  /* For terminal frames, true means glyph is a padding glyph.  Padding
      glyphs are used for characters whose visual shape consists of
      more than one glyph (e.g. Asian characters).  All but the first
      glyph of such a glyph sequence have the padding_p flag set.  This
      flag is used only to minimize code changes.  A better way would
      probably be to use the width field of glyphs to express padding.
 
-     For graphic frames, 1 means the pixel width of the glyph in a
+     For graphic frames, true means the pixel width of the glyph in a
      font is 0, but 1-pixel is padded on displaying for correct cursor
      displaying.  The member `pixel_width' above is set to 1.  */
-  unsigned padding_p : 1;
+  bool_bf padding_p : 1;
 
-  /* 1 means the actual glyph is not available, draw using `struct
+  /* True means the actual glyph is not available, draw using `struct
      glyphless' below instead.  This can happen when a font couldn't
      be loaded, or a character doesn't have a glyph in a font.  */
-  unsigned glyph_not_available_p : 1;
+  bool_bf glyph_not_available_p : 1;
 
-  /* Non-zero means don't display cursor here.  */
-  unsigned avoid_cursor_p : 1;
+  /* True means don't display cursor here.  */
+  bool_bf avoid_cursor_p : 1;
 
   /* Resolved bidirectional level of this character [0..63].  */
   unsigned resolved_level : 5;
@@ -491,7 +491,7 @@
     struct
     {
       /* Flag to tell if the composition is automatic or not.  */
-      unsigned automatic : 1;
+      bool_bf automatic : 1;
       /* ID of the composition.  */
       unsigned id    : 31;
     } cmp;
@@ -515,8 +515,8 @@
     {
       /* Value is an enum of the type glyphless_display_method.  */
       unsigned method : 2;
-      /* 1 iff this glyph is for a character of no font. */
-      unsigned for_no_font : 1;
+      /* True iff this glyph is for a character of no font. */
+      bool_bf for_no_font : 1;
       /* Length of acronym or hexadecimal code string (at most 8).  */
       unsigned len : 4;
       /* Character to display.  Actually we need only 22 bits.  */
@@ -584,7 +584,7 @@
          (GLYPH).face_id = (FACE_ID);                  \
          (GLYPH).padding_p = (PADDING_P);              \
        }                                               \
-     while (0)
+     while (false)
 
 /* Fill a character type glyph GLYPH from a glyph typedef FROM as
    defined in lisp.h.  */
@@ -593,7 +593,7 @@
      SET_CHAR_GLYPH ((GLYPH),                                  \
                     GLYPH_CHAR ((FROM)),                       \
                     GLYPH_FACE ((FROM)),                       \
-                    0)
+                    false)
 
 /* Construct a glyph code from a character glyph GLYPH.  If the
    character is multibyte, return -1 as we can't use glyph table for a
@@ -607,7 +607,7 @@
       else                                                     \
        SET_GLYPH ((G), -1, 0);                                 \
     }                                                          \
-  while (0)
+  while (false)
 
 #define GLYPH_INVALID_P(GLYPH) (GLYPH_CHAR (GLYPH) < 0)
 
@@ -722,11 +722,11 @@
   /* Flag indicating that scrolling should not be tried in
      update_window.  This flag is set by functions like try_window_id
      which do their own scrolling.  */
-  unsigned no_scrolling_p : 1;
+  bool_bf no_scrolling_p : 1;
 
-  /* Non-zero means window displayed in this matrix has a header
+  /* True means window displayed in this matrix has a header
      line.  */
-  unsigned header_line_p : 1;
+  bool_bf header_line_p : 1;
 
 #ifdef GLYPH_DEBUG
   /* A string identifying the method used to display the matrix.  */
@@ -750,7 +750,7 @@
 void check_matrix_pointer_lossage (struct glyph_matrix *);
 #define CHECK_MATRIX(MATRIX) check_matrix_pointer_lossage ((MATRIX))
 #else
-#define CHECK_MATRIX(MATRIX) (void) 0
+#define CHECK_MATRIX(MATRIX) ((void) 0)
 #endif
 
 
@@ -916,107 +916,107 @@
   /* Vertical offset of the right fringe bitmap.  */
   signed right_fringe_offset : FRINGE_HEIGHT_BITS;
 
-  /* 1 means that at least one of the left and right fringe bitmaps is
+  /* True means that at least one of the left and right fringe bitmaps is
      periodic and thus depends on the y-position of the row.  */
-  unsigned fringe_bitmap_periodic_p : 1;
-
-  /* 1 means that we must draw the bitmaps of this row.  */
-  unsigned redraw_fringe_bitmaps_p : 1;
-
-  /* In a desired matrix, 1 means that this row must be updated.  In a
-     current matrix, 0 means that the row has been invalidated, i.e.
+  bool_bf fringe_bitmap_periodic_p : 1;
+
+  /* True means that we must draw the bitmaps of this row.  */
+  bool_bf redraw_fringe_bitmaps_p : 1;
+
+  /* In a desired matrix, true means that this row must be updated.  In a
+     current matrix, false means that the row has been invalidated, i.e.
      the row's contents do not agree with what is visible on the
      screen.  */
-  unsigned enabled_p : 1;
+  bool_bf enabled_p : 1;
 
-  /* 1 means row displays a text line that is truncated on the left or
+  /* True means row displays a text line that is truncated on the left or
      right side.  */
-  unsigned truncated_on_left_p : 1;
-  unsigned truncated_on_right_p : 1;
+  bool_bf truncated_on_left_p : 1;
+  bool_bf truncated_on_right_p : 1;
 
-  /* 1 means that this row displays a continued line, i.e. it has a
+  /* True means that this row displays a continued line, i.e. it has a
      continuation mark at the right side.  */
-  unsigned continued_p : 1;
+  bool_bf continued_p : 1;
 
-  /* 0 means that this row does not contain any text, i.e. it is
+  /* False means that this row does not contain any text, i.e., it is
      a blank line at the window and buffer end.  */
-  unsigned displays_text_p : 1;
-
-  /* 1 means that this line ends at ZV.  */
-  unsigned ends_at_zv_p : 1;
-
-  /* 1 means the face of the last glyph in the text area is drawn to
+  bool_bf displays_text_p : 1;
+
+  /* True means that this line ends at ZV.  */
+  bool_bf ends_at_zv_p : 1;
+
+  /* True means the face of the last glyph in the text area is drawn to
      the right end of the window.  This flag is used in
      update_text_area to optimize clearing to the end of the area.  */
-  unsigned fill_line_p : 1;
+  bool_bf fill_line_p : 1;
 
-  /* Non-zero means display a bitmap on X frames indicating that this
+  /* True means display a bitmap on X frames indicating that this
      line contains no text and ends in ZV.  */
-  unsigned indicate_empty_line_p : 1;
+  bool_bf indicate_empty_line_p : 1;
 
-  /* 1 means this row contains glyphs that overlap each other because
+  /* True means this row contains glyphs that overlap each other because
      of lbearing or rbearing.  */
-  unsigned contains_overlapping_glyphs_p : 1;
+  bool_bf contains_overlapping_glyphs_p : 1;
 
-  /* 1 means this row is as wide as the window it is displayed in, including
+  /* True means this row is as wide as the window it is displayed in, including
      scroll bars, fringes, and internal borders.  This also
      implies that the row doesn't have marginal areas.  */
-  unsigned full_width_p : 1;
-
-  /* Non-zero means row is a mode or header-line.  */
-  unsigned mode_line_p : 1;
-
-  /* 1 in a current row means this row is overlapped by another row.  */
-  unsigned overlapped_p : 1;
-
-  /* 1 means this line ends in the middle of a character consisting
+  bool_bf full_width_p : 1;
+
+  /* True means row is a mode or header-line.  */
+  bool_bf mode_line_p : 1;
+
+  /* True in a current row means this row is overlapped by another row.  */
+  bool_bf overlapped_p : 1;
+
+  /* True means this line ends in the middle of a character consisting
      of more than one glyph.  Some glyphs have been put in this row,
      the rest are put in rows below this one.  */
-  unsigned ends_in_middle_of_char_p : 1;
+  bool_bf ends_in_middle_of_char_p : 1;
 
-  /* 1 means this line starts in the middle of a character consisting
+  /* True means this line starts in the middle of a character consisting
      of more than one glyph.  Some glyphs have been put in the
      previous row, the rest are put in this row.  */
-  unsigned starts_in_middle_of_char_p : 1;
-
-  /* 1 in a current row means this row overlaps others.  */
-  unsigned overlapping_p : 1;
-
-  /* 1 means some glyphs in this row are displayed in mouse-face.  */
-  unsigned mouse_face_p : 1;
-
-  /* 1 means this row was ended by a newline from a string.  */
-  unsigned ends_in_newline_from_string_p : 1;
-
-  /* 1 means this row width is exactly the width of the window, and the
+  bool_bf starts_in_middle_of_char_p : 1;
+
+  /* True in a current row means this row overlaps others.  */
+  bool_bf overlapping_p : 1;
+
+  /* True means some glyphs in this row are displayed in mouse-face.  */
+  bool_bf mouse_face_p : 1;
+
+  /* True means this row was ended by a newline from a string.  */
+  bool_bf ends_in_newline_from_string_p : 1;
+
+  /* True means this row width is exactly the width of the window, and the
      final newline character is hidden in the right fringe.  */
-  unsigned exact_window_width_line_p : 1;
-
-  /* 1 means this row currently shows the cursor in the right fringe.  */
-  unsigned cursor_in_fringe_p : 1;
-
-  /* 1 means the last glyph in the row is part of an ellipsis.  */
-  unsigned ends_in_ellipsis_p : 1;
-
-  /* Non-zero means display a bitmap on X frames indicating that this
+  bool_bf exact_window_width_line_p : 1;
+
+  /* True means this row currently shows the cursor in the right fringe.  */
+  bool_bf cursor_in_fringe_p : 1;
+
+  /* True means the last glyph in the row is part of an ellipsis.  */
+  bool_bf ends_in_ellipsis_p : 1;
+
+  /* True means display a bitmap on X frames indicating that this
      the first line of the buffer.  */
-  unsigned indicate_bob_p : 1;
+  bool_bf indicate_bob_p : 1;
 
-  /* Non-zero means display a bitmap on X frames indicating that this
+  /* True means display a bitmap on X frames indicating that this
      the top line of the window, but not start of the buffer.  */
-  unsigned indicate_top_line_p : 1;
+  bool_bf indicate_top_line_p : 1;
 
-  /* Non-zero means display a bitmap on X frames indicating that this
+  /* True means display a bitmap on X frames indicating that this
      the last line of the buffer.  */
-  unsigned indicate_eob_p : 1;
+  bool_bf indicate_eob_p : 1;
 
-  /* Non-zero means display a bitmap on X frames indicating that this
+  /* True means display a bitmap on X frames indicating that this
      the bottom line of the window, but not end of the buffer.  */
-  unsigned indicate_bottom_line_p : 1;
+  bool_bf indicate_bottom_line_p : 1;
 
-  /* Non-zero means the row was reversed to display text in a
+  /* True means the row was reversed to display text in a
      right-to-left paragraph.  */
-  unsigned reversed_p : 1;
+  bool_bf reversed_p : 1;
 
   /* Continuation lines width at the start of the row.  */
   int continuation_lines_width;
@@ -1107,10 +1107,10 @@
 /* Set and query the enabled_p flag of glyph row ROW in MATRIX.  */
 
 #define SET_MATRIX_ROW_ENABLED_P(MATRIX, ROW, VALUE) \
-     (MATRIX_ROW ((MATRIX), (ROW))->enabled_p = (VALUE) != 0)
+     (MATRIX_ROW (MATRIX, ROW)->enabled_p = (VALUE))
 
 #define MATRIX_ROW_ENABLED_P(MATRIX, ROW) \
-     (MATRIX_ROW ((MATRIX), (ROW))->enabled_p)
+     (MATRIX_ROW (MATRIX, ROW)->enabled_p)
 
 /* Non-zero if ROW displays text.  Value is non-zero if the row is
    blank but displays a line end.  */
@@ -1188,12 +1188,12 @@
       || ((ROW)->start.overlay_string_index >= 0       \
          && (ROW)->start.string_pos.charpos > 0))
 
-/* Non-zero means ROW overlaps its predecessor.  */
+/* True means ROW overlaps its predecessor.  */
 
 #define MATRIX_ROW_OVERLAPS_PRED_P(ROW) \
      ((ROW)->phys_ascent > (ROW)->ascent)
 
-/* Non-zero means ROW overlaps its successor.  */
+/* True means ROW overlaps its successor.  */
 
 #define MATRIX_ROW_OVERLAPS_SUCC_P(ROW)                \
       ((ROW)->phys_height - (ROW)->phys_ascent \
@@ -1203,8 +1203,7 @@
 
 extern struct glyph space_glyph;
 
-/* Non-zero means last display completed.  Zero means it was
-   preempted.  */
+/* True means last display completed.  False means it was preempted.  */
 
 extern bool display_completed;
 
@@ -1300,24 +1299,24 @@
   /* Start and end glyph indices in a glyph-string.  */
   int cmp_from, cmp_to;
 
-  /* 1 means this glyph strings face has to be drawn to the right end
+  /* True means this glyph strings face has to be drawn to the right end
      of the window's drawing area.  */
-  unsigned extends_to_end_of_line_p : 1;
-
-  /* 1 means the background of this string has been drawn.  */
-  unsigned background_filled_p : 1;
-
-  /* 1 means glyph string must be drawn with 16-bit functions.  */
-  unsigned two_byte_p : 1;
-
-  /* 1 means that the original font determined for drawing this glyph
+  bool_bf extends_to_end_of_line_p : 1;
+
+  /* True means the background of this string has been drawn.  */
+  bool_bf background_filled_p : 1;
+
+  /* True means glyph string must be drawn with 16-bit functions.  */
+  bool_bf two_byte_p : 1;
+
+  /* True means that the original font determined for drawing this glyph
      string could not be loaded.  The member `font' has been set to
      the frame's default font in this case.  */
-  unsigned font_not_found_p : 1;
+  bool_bf font_not_found_p : 1;
 
-  /* 1 means that the face in which this glyph string is drawn has a
+  /* True means that the face in which this glyph string is drawn has a
      stipple pattern.  */
-  unsigned stippled_p : 1;
+  bool_bf stippled_p : 1;
 
 #define OVERLAPS_PRED          (1 << 0)
 #define OVERLAPS_SUCC          (1 << 1)
@@ -1332,10 +1331,10 @@
      respectively.  */
   unsigned for_overlaps : 3;
 
-  /* 1 means that all glyphs in this glyph string has the flag
+  /* True means that all glyphs in this glyph string has the flag
      padding_p set, and thus must be drawn one by one to have 1-pixel
      width even though the logical width in the font is zero.  */
-  unsigned padding_p : 1;
+  bool_bf padding_p : 1;
 
   /* The GC to use for drawing this glyph string.  */
 #if defined (HAVE_X_WINDOWS)
@@ -1348,7 +1347,7 @@
 
   /* A pointer to the first glyph in the string.  This glyph
      corresponds to char2b[0].  Needed to draw rectangles if
-     font_not_found_p is 1.  */
+     font_not_found_p is true.  */
   struct glyph *first_glyph;
 
   /* Image, if any.  */
@@ -1480,7 +1479,7 @@
       && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME (W)))            \
       && !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format))      \
       && WINDOW_PIXEL_HEIGHT (W) > WINDOW_FRAME_LINE_HEIGHT (W))       \
-   : 0)
+   : false)
 
 /* Value is true if window W wants a header line and is large enough
    to accommodate it.  */
@@ -1494,7 +1493,7 @@
             > (WINDOW_WANTS_MODELINE_P (W)                             \
                ? (2 * WINDOW_FRAME_LINE_HEIGHT (W))                    \
                : WINDOW_FRAME_LINE_HEIGHT (W))))                       \
-      : 0)
+      : false)
 
 /* Return proper value to be used as baseline offset of font that has
    ASCENT and DESCENT to draw characters by the font at the vertical
@@ -1656,54 +1655,54 @@
   /* Style of underlining. */
   ENUM_BF (face_underline_type) underline_type : 1;
 
-  /* If `box' above specifies a 3D type, 1 means use box_color for
+  /* If `box' above specifies a 3D type, true means use box_color for
      drawing shadows.  */
-  unsigned use_box_color_for_shadows_p : 1;
+  bool_bf use_box_color_for_shadows_p : 1;
 
   /* Non-zero if text in this face should be underlined, overlined,
      strike-through or have a box drawn around it.  */
-  unsigned underline_p : 1;
-  unsigned overline_p : 1;
-  unsigned strike_through_p : 1;
+  bool_bf underline_p : 1;
+  bool_bf overline_p : 1;
+  bool_bf strike_through_p : 1;
 
-  /* 1 means that the colors specified for this face could not be
+  /* True means that the colors specified for this face could not be
      loaded, and were replaced by default colors, so they shouldn't be
      freed.  */
-  unsigned foreground_defaulted_p : 1;
-  unsigned background_defaulted_p : 1;
+  bool_bf foreground_defaulted_p : 1;
+  bool_bf background_defaulted_p : 1;
 
-  /* 1 means that either no color is specified for underlining or that
+  /* True means that either no color is specified for underlining or that
      the specified color couldn't be loaded.  Use the foreground
      color when drawing in that case. */
-  unsigned underline_defaulted_p : 1;
+  bool_bf underline_defaulted_p : 1;
 
-  /* 1 means that either no color is specified for the corresponding
+  /* True means that either no color is specified for the corresponding
      attribute or that the specified color couldn't be loaded.
      Use the foreground color when drawing in that case. */
-  unsigned overline_color_defaulted_p : 1;
-  unsigned strike_through_color_defaulted_p : 1;
-  unsigned box_color_defaulted_p : 1;
+  bool_bf overline_color_defaulted_p : 1;
+  bool_bf strike_through_color_defaulted_p : 1;
+  bool_bf box_color_defaulted_p : 1;
 
   /* TTY appearances.  Colors are found in `lface' with empty color
      string meaning the default color of the TTY.  */
-  unsigned tty_bold_p : 1;
-  unsigned tty_italic_p : 1;
-  unsigned tty_underline_p : 1;
-  unsigned tty_reverse_p : 1;
+  bool_bf tty_bold_p : 1;
+  bool_bf tty_italic_p : 1;
+  bool_bf tty_underline_p : 1;
+  bool_bf tty_reverse_p : 1;
 
-  /* 1 means that colors of this face may not be freed because they
+  /* True means that colors of this face may not be freed because they
      have been copied bitwise from a base face (see
      realize_x_face).  */
-  unsigned colors_copied_bitwise_p : 1;
+  bool_bf colors_copied_bitwise_p : 1;
 
   /* If non-zero, use overstrike (to simulate bold-face).  */
-  unsigned overstrike : 1;
+  bool_bf overstrike : 1;
 
 /* NOTE: this is not used yet, but eventually this impl should be done
          similarly to overstrike */
 #ifdef HAVE_NS
   /* If non-zero, use geometric rotation (to simulate italic).  */
-  unsigned synth_ital : 1;
+  bool_bf synth_ital : 1;
 #endif
 
   /* The hash value of this face.  */
@@ -1791,7 +1790,7 @@
 
   /* Flag indicating that attributes of the `menu' face have been
      changed.  */
-  unsigned menu_face_changed_p : 1;
+  bool_bf menu_face_changed_p : 1;
 };
 
 
@@ -1799,10 +1798,10 @@
    using X resources of FACE.  */
 
 #define PREPARE_FACE_FOR_DISPLAY(F, FACE)      \
+  do {                                         \
      if ((FACE)->gc == 0)                      \
        prepare_face_for_display ((F), (FACE)); \
-     else                                      \
-       (void) 0
+  } while (false)
 
 /* Return a pointer to the face with ID on frame F, or null if such a
    face doesn't exist.  */
@@ -1828,7 +1827,7 @@
 
 #else /* not HAVE_WINDOW_SYSTEM */
 
-#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) 1
+#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) true
 #define FACE_FOR_CHAR(F, FACE, CHAR, POS, OBJECT) ((FACE)->id)
 
 #endif /* not HAVE_WINDOW_SYSTEM */
@@ -1926,9 +1925,9 @@
   ptrdiff_t schars;            /* the number of characters in the string,
                                   excluding the terminating null */
   ptrdiff_t bufpos;            /* buffer position of lstring, or 0 if N/A */
-  unsigned from_disp_str : 1;  /* 1 means the string comes from a
+  bool_bf from_disp_str : 1;   /* True means the string comes from a
                                   display property */
-  unsigned unibyte : 1;                /* 1 means the string is unibyte */
+  bool_bf unibyte : 1;         /* True means the string is unibyte */
 };
 
 /* Data type for reordering bidirectional text.  */
@@ -1971,10 +1970,10 @@
   struct window *w;            /* the window being displayed */
   bidi_dir_t paragraph_dir;    /* current paragraph direction */
   ptrdiff_t separator_limit;   /* where paragraph separator should end */
-  unsigned prev_was_pdf : 1;   /* if non-zero, previous char was PDF */
-  unsigned first_elt : 1;      /* if non-zero, examine current char first */
-  unsigned new_paragraph : 1;  /* if non-zero, we expect a new paragraph */
-  unsigned frame_window_p : 1; /* non-zero if displaying on a GUI frame */
+  bool_bf prev_was_pdf : 1;    /* if true, previous char was PDF */
+  bool_bf first_elt : 1;       /* if true, examine current char first */
+  bool_bf new_paragraph : 1;   /* if true, we expect a new paragraph */
+  bool_bf frame_window_p : 1;  /* true if displaying on a GUI frame */
 };
 
 /* Value is non-zero when the bidi iterator is at base paragraph
@@ -2002,8 +2001,8 @@
   int wd, h, dh;
   int x, y;
   int bx, nx, by, ny;
-  unsigned cursor_p : 1;
-  unsigned overlay_p : 1;
+  bool_bf cursor_p : 1;
+  bool_bf overlay_p : 1;
   struct face *face;
 };
 
@@ -2238,30 +2237,30 @@
   /* Position at which redisplay end trigger functions should be run.  */
   ptrdiff_t redisplay_end_trigger_charpos;
 
-  /* 1 means multibyte characters are enabled.  */
-  unsigned multibyte_p : 1;
-
-  /* 1 means window has a mode line at its top.  */
-  unsigned header_line_p : 1;
-
-  /* 1 means `string' is the value of a `display' property.
+  /* True means multibyte characters are enabled.  */
+  bool_bf multibyte_p : 1;
+
+  /* True means window has a mode line at its top.  */
+  bool_bf header_line_p : 1;
+
+  /* True means `string' is the value of a `display' property.
      Don't handle some `display' properties in these strings.  */
-  unsigned string_from_display_prop_p : 1;
+  bool_bf string_from_display_prop_p : 1;
 
-  /* 1 means `string' comes from a `line-prefix' or `wrap-prefix'
+  /* True means `string' comes from a `line-prefix' or `wrap-prefix'
      property.  */
-  unsigned string_from_prefix_prop_p : 1;
+  bool_bf string_from_prefix_prop_p : 1;
 
-  /* 1 means we are iterating an object that came from a value of a
+  /* True means we are iterating an object that came from a value of a
      `display' property.  */
-  unsigned from_disp_prop_p : 1;
+  bool_bf from_disp_prop_p : 1;
 
   /* When METHOD == next_element_from_display_vector,
-     this is 1 if we're doing an ellipsis.  Otherwise meaningless.  */
-  unsigned ellipsis_p : 1;
+     this is true if we're doing an ellipsis.  Otherwise meaningless.  */
+  bool_bf ellipsis_p : 1;
 
   /* True means cursor shouldn't be displayed here.  */
-  unsigned avoid_cursor_p : 1;
+  bool_bf avoid_cursor_p : 1;
 
   /* Display table in effect or null for none.  */
   struct Lisp_Char_Table *dp;
@@ -2375,13 +2374,13 @@
     enum glyph_row_area area;
     enum it_method method;
     bidi_dir_t paragraph_embedding;
-    unsigned multibyte_p : 1;
-    unsigned string_from_display_prop_p : 1;
-    unsigned string_from_prefix_prop_p : 1;
-    unsigned display_ellipsis_p : 1;
-    unsigned avoid_cursor_p : 1;
-    unsigned bidi_p : 1;
-    unsigned from_disp_prop_p : 1;
+    bool_bf multibyte_p : 1;
+    bool_bf string_from_display_prop_p : 1;
+    bool_bf string_from_prefix_prop_p : 1;
+    bool_bf display_ellipsis_p : 1;
+    bool_bf avoid_cursor_p : 1;
+    bool_bf bidi_p : 1;
+    bool_bf from_disp_prop_p : 1;
     enum line_wrap_method line_wrap;
 
     /* Properties from display property that are reset by another display
@@ -2407,46 +2406,46 @@
   int face_id;
 
   /* Setting of buffer-local variable selective-display-ellipsis.  */
-  unsigned selective_display_ellipsis_p : 1;
+  bool_bf selective_display_ellipsis_p : 1;
 
-  /* 1 means control characters are translated into the form `^C'
+  /* True means control characters are translated into the form `^C'
      where the `^' can be replaced by a display table entry.  */
-  unsigned ctl_arrow_p : 1;
+  bool_bf ctl_arrow_p : 1;
 
-  /* Non-zero means that the current face has a box.  */
-  unsigned face_box_p : 1;
+  /* True means that the current face has a box.  */
+  bool_bf face_box_p : 1;
 
   /* Non-null means that the current character is the first in a run
      of characters with box face.  */
-  unsigned start_of_box_run_p : 1;
+  bool_bf start_of_box_run_p : 1;
 
-  /* Non-zero means that the current character is the last in a run
+  /* True means that the current character is the last in a run
      of characters with box face.  */
-  unsigned end_of_box_run_p : 1;
-
-  /* 1 means overlay strings at end_charpos have been processed.  */
-  unsigned overlay_strings_at_end_processed_p : 1;
-
-  /* 1 means to ignore overlay strings at current pos, as they have
+  bool_bf end_of_box_run_p : 1;
+
+  /* True means overlay strings at end_charpos have been processed.  */
+  bool_bf overlay_strings_at_end_processed_p : 1;
+
+  /* True means to ignore overlay strings at current pos, as they have
      already been processed.  */
-  unsigned ignore_overlay_strings_at_pos_p : 1;
+  bool_bf ignore_overlay_strings_at_pos_p : 1;
 
-  /* 1 means the actual glyph is not available in the current
+  /* True means the actual glyph is not available in the current
      system.  */
-  unsigned glyph_not_available_p : 1;
+  bool_bf glyph_not_available_p : 1;
 
-  /* 1 means the next line in display_line continues a character
+  /* True means the next line in display_line continues a character
      consisting of more than one glyph, and some glyphs of this
      character have been put on the previous line.  */
-  unsigned starts_in_middle_of_char_p : 1;
+  bool_bf starts_in_middle_of_char_p : 1;
 
-  /* If 1, saved_face_id contains the id of the face in front of text
+  /* If true, saved_face_id contains the id of the face in front of text
      skipped due to selective display.  */
-  unsigned face_before_selective_p : 1;
+  bool_bf face_before_selective_p : 1;
 
-  /* If 1, adjust current glyph so it does not increase current row
+  /* If true, adjust current glyph so it does not increase current row
      descent/ascent (line-height property).  Reset after this glyph.  */
-  unsigned constrain_row_ascent_descent_p : 1;
+  bool_bf constrain_row_ascent_descent_p : 1;
 
   enum line_wrap_method line_wrap;
 
@@ -2614,9 +2613,9 @@
   /* Face of the right fringe glyph.  */
   unsigned right_user_fringe_face_id : FACE_ID_BITS;
 
-  /* Non-zero means we need to reorder bidirectional text for display
+  /* True means we need to reorder bidirectional text for display
      in the visual order.  */
-  unsigned bidi_p : 1;
+  bool_bf bidi_p : 1;
 
   /* For iterating over bidirectional text.  */
   struct bidi_it bidi_it;
@@ -2636,7 +2635,7 @@
 
 #define ITERATOR_AT_END_P(IT) ((IT)->what == IT_EOB)
 
-/* Non-zero means IT is at the end of a line.  This is the case if it
+/* True means IT is at the end of a line.  This is the case if it
    is either on a newline or on a carriage return and selective
    display hides the rest of the line.  */
 
@@ -2651,19 +2650,14 @@
 #define PRODUCE_GLYPHS(IT)                              \
   do {                                                  \
     if ((IT)->glyph_row != NULL && (IT)->bidi_p)       \
-      {                                                        \
-        if ((IT)->bidi_it.paragraph_dir == R2L)                \
-         (IT)->glyph_row->reversed_p = 1;              \
-       else                                            \
-         (IT)->glyph_row->reversed_p = 0;              \
-      }                                                        \
+      (IT)->glyph_row->reversed_p = (IT)->bidi_it.paragraph_dir == R2L; \
     if (FRAME_RIF ((IT)->f) != NULL)                    \
       FRAME_RIF ((IT)->f)->produce_glyphs ((IT));       \
     else                                                \
       produce_glyphs ((IT));                            \
     if ((IT)->glyph_row != NULL)                        \
-      inhibit_free_realized_faces = 1;                  \
-  } while (0)
+      inhibit_free_realized_faces = true;              \
+  } while (false)
 
 /* Bit-flags indicating what operation move_it_to should perform.  */
 
@@ -2707,13 +2701,13 @@
 
   /* Nonzero if part of the text currently shown in
      its mouse-face is beyond the window end.  */
-  unsigned mouse_face_past_end : 1;
-
-  /* Nonzero means defer mouse-motion highlighting.  */
-  unsigned mouse_face_defer : 1;
-
-  /* Nonzero means that the mouse highlight should not be shown.  */
-  unsigned mouse_face_hidden : 1;
+  bool_bf mouse_face_past_end : 1;
+
+  /* True means defer mouse-motion highlighting.  */
+  bool_bf mouse_face_defer : 1;
+
+  /* True means that the mouse highlight should not be shown.  */
+  bool_bf mouse_face_hidden : 1;
 } Mouse_HLInfo;
 
 INLINE void
@@ -2728,9 +2722,9 @@
     hlinfo->mouse_face_mouse_frame = NULL;
     hlinfo->mouse_face_window = Qnil;
     hlinfo->mouse_face_overlay = Qnil;
-    hlinfo->mouse_face_past_end = 0;
-    hlinfo->mouse_face_hidden = 0;
-    hlinfo->mouse_face_defer = 0;
+    hlinfo->mouse_face_past_end = false;
+    hlinfo->mouse_face_hidden = false;
+    hlinfo->mouse_face_defer = false;
 }
 
 /***********************************************************************
@@ -2798,8 +2792,8 @@
   void (*update_window_begin_hook) (struct window *w);
 
   /* Function to call after window W has been updated in window-based
-     redisplay.  CURSOR_ON_P non-zero means switch cursor on.
-     MOUSE_FACE_OVERWRITTEN_P non-zero means that some lines in W
+     redisplay.  CURSOR_ON_P true means switch cursor on.
+     MOUSE_FACE_OVERWRITTEN_P true means that some lines in W
      that contained glyphs in mouse-face were overwritten, so we
      have to update the mouse highlight.  */
   void (*update_window_end_hook) (struct window *w, bool cursor_on_p,
@@ -2848,8 +2842,8 @@
                             int width, int height);
 
 /* Draw specified cursor CURSOR_TYPE of width CURSOR_WIDTH
-   at row GLYPH_ROW on window W if ON_P is 1.  If ON_P is
-   0, don't draw cursor.  If ACTIVE_P is 1, system caret
+   at row GLYPH_ROW on window W if ON_P is true.  If ON_P is
+   false, don't draw cursor.  If ACTIVE_P is true, system caret
    should track this cursor (when applicable).  */
   void (*draw_window_cursor) (struct window *w,
                              struct glyph_row *glyph_row,
@@ -2949,11 +2943,11 @@
   /* True if this image has a `transparent' background -- that is, is
      uses an image mask.  The accessor macro for this is
      `IMAGE_BACKGROUND_TRANSPARENT'.  */
-  unsigned background_transparent : 1;
+  bool_bf background_transparent : 1;
 
   /* True if the `background' and `background_transparent' fields are
      valid, respectively. */
-  unsigned background_valid : 1, background_transparent_valid : 1;
+  bool_bf background_valid : 1, background_transparent_valid : 1;
 
   /* Width and height of the image.  */
   int width, height;
@@ -2996,8 +2990,8 @@
   /* Reference to the type of the image.  */
   struct image_type *type;
 
-  /* 1 means that loading the image failed.  Don't try again.  */
-  unsigned load_failed_p;
+  /* True means that loading the image failed.  Don't try again.  */
+  bool load_failed_p;
 
   /* A place for image types to store additional data.  It is marked
      during GC.  */
@@ -3201,7 +3195,7 @@
 void move_it_in_display_line (struct it *it,
                              ptrdiff_t to_charpos, int to_x,
                              enum move_operation_enum op);
-int in_display_vector_p (struct it *);
+bool in_display_vector_p (struct it *);
 int frame_mode_line_height (struct frame *);
 extern Lisp_Object Qtool_bar;
 extern bool redisplaying_p;
@@ -3270,7 +3264,7 @@
 extern void x_clear_window_mouse_face (struct window *);
 extern void cancel_mouse_face (struct frame *);
 extern int clear_mouse_face (Mouse_HLInfo *);
-extern int cursor_in_mouse_face_p (struct window *w);
+extern bool cursor_in_mouse_face_p (struct window *w);
 extern void tty_draw_row_with_mouse_face (struct window *, struct glyph_row *,
                                          int, int, enum draw_glyphs_face);
 extern void display_tty_menu_item (const char *, int, int, int, int, int);

=== modified file 'src/dispnew.c'
--- a/src/dispnew.c     2013-11-30 09:25:31 +0000
+++ b/src/dispnew.c     2013-12-14 21:36:44 +0000
@@ -561,12 +561,12 @@
                w->window_end_valid = 0;
 
              while (i < matrix->nrows)
-               matrix->rows[i++].enabled_p = 0;
+               matrix->rows[i++].enabled_p = false;
            }
          else
            {
              for (i = 0; i < matrix->nrows; ++i)
-               matrix->rows[i].enabled_p = 0;
+               matrix->rows[i].enabled_p = false;
            }
        }
       else if (matrix == w->desired_matrix)
@@ -576,7 +576,7 @@
             had better be the case when we adjust matrices between
             redisplays.  */
          for (i = 0; i < matrix->nrows; ++i)
-           matrix->rows[i].enabled_p = 0;
+           matrix->rows[i].enabled_p = false;
        }
     }
 
@@ -684,7 +684,7 @@
   eassert (end >= 0 && end <= matrix->nrows);
 
   for (; start < end; ++start)
-    matrix->rows[start].enabled_p = 0;
+    matrix->rows[start].enabled_p = false;
 }
 
 
@@ -864,7 +864,7 @@
   if (row->y + row->height > max_y)
     row->visible_height -= row->y + row->height - max_y;
 
-  row->enabled_p = 1;
+  row->enabled_p = true;
 }
 
 
@@ -1062,7 +1062,7 @@
       bool rp = row->reversed_p;
 
       clear_glyph_row (row);
-      row->enabled_p = 1;
+      row->enabled_p = true;
       row->reversed_p = rp;
     }
 }
@@ -2416,7 +2416,7 @@
 
          /* Only when a desired row has been displayed, we want
             the corresponding frame row to be updated.  */
-         frame_row->enabled_p = 1;
+         frame_row->enabled_p = true;
 
           /* Maybe insert a vertical border between horizontally adjacent
             windows.  */
@@ -2564,7 +2564,7 @@
   assign_row (current_row, desired_row);
 
   /* Enable current_row to mark it as valid.  */
-  current_row->enabled_p = 1;
+  current_row->enabled_p = true;
   current_row->mouse_face_p = mouse_face_p;
 
   /* If we are called on frame matrices, perform analogous operations
@@ -2606,7 +2606,7 @@
                assign_row (current_row, desired_row);
              else
                swap_glyph_pointers (desired_row, current_row);
-             current_row->enabled_p = 1;
+             current_row->enabled_p = true;
 
              /* Set the Y coordinate of the mode/header line's row.
                 It is needed in draw_row_with_mouse_face to find the
@@ -2661,7 +2661,7 @@
 
       /* RETAINED_P is zero for empty lines.  */
       if (!retained_p[copy_from[i]])
-       new_rows[i].enabled_p = 0;
+       new_rows[i].enabled_p = false;
     }
 
   /* Do the same for window matrices, if MATRIX is a frame matrix.  */
@@ -2796,7 +2796,7 @@
 
                  /* If frame line is empty, window line is empty, too.  */
                  if (!retained_p[copy_from[i]])
-                   m->rows[window_to].enabled_p = 0;
+                   m->rows[window_to].enabled_p = false;
                }
              else if (to_inside_window_p)
                {
@@ -2821,7 +2821,7 @@
 
                      /* If frame line is empty, window line is empty, too.  */
                      if (!retained_p[copy_from[i]])
-                       m->rows[window_to].enabled_p = 0;
+                       m->rows[window_to].enabled_p = false;
                    }
                  sync_p = 1;
                }
@@ -3432,7 +3432,7 @@
               in the first redisplay.  */
            if (MATRIX_ROW_BOTTOM_Y (row) >= yb)
              for (i = vpos + 1; i < w->current_matrix->nrows - 1; ++i)
-               MATRIX_ROW (w->current_matrix, i)->enabled_p = 0;
+               SET_MATRIX_ROW_ENABLED_P (w->current_matrix, i, false);
          }
 
       /* Was display preempted?  */
@@ -4069,14 +4069,14 @@
          && row_equal_p (c, d, 1))
        {
          assign_row (c, d);
-         d->enabled_p = 0;
+         d->enabled_p = false;
        }
       else
        break;
     }
 
   /* Give up if some rows in the desired matrix are not enabled.  */
-  if (!MATRIX_ROW (desired_matrix, i)->enabled_p)
+  if (! MATRIX_ROW_ENABLED_P (desired_matrix, i))
     return -1;
 
   first_old = first_new = i;
@@ -4089,7 +4089,7 @@
     {
       int bottom;
 
-      if (!MATRIX_ROW (desired_matrix, i)->enabled_p)
+      if (! MATRIX_ROW_ENABLED_P (desired_matrix, i))
        return 0;
       bottom = MATRIX_ROW_BOTTOM_Y (MATRIX_ROW (desired_matrix, i));
       if (bottom <= yb)
@@ -4121,7 +4121,7 @@
   j = last_old;
   while (i - 1 > first_new
          && j - 1 > first_old
-         && MATRIX_ROW (current_matrix, j - 1)->enabled_p
+         && MATRIX_ROW_ENABLED_P (current_matrix, j - 1)
         && (MATRIX_ROW (current_matrix, j - 1)->y
             == MATRIX_ROW (desired_matrix, i - 1)->y)
         && !MATRIX_ROW (desired_matrix, i - 1)->redraw_fringe_bitmaps_p
@@ -4198,7 +4198,7 @@
 
   for (i = first_old; i < last_old; ++i)
     {
-      if (MATRIX_ROW (current_matrix, i)->enabled_p)
+      if (MATRIX_ROW_ENABLED_P (current_matrix, i))
        {
          entry = add_row_entry (MATRIX_ROW (current_matrix, i));
          old_lines[i] = entry;
@@ -4391,7 +4391,7 @@
               preceding for-loop, we no longer have such an overlap,
               and thus the assigned row should always be enabled.  */
            eassert (to->enabled_p);
-           from->enabled_p = 0;
+           from->enabled_p = false;
            to->overlapped_p = to_overlapped_p;
          }
       }
@@ -4761,7 +4761,7 @@
          olen--;
     }
 
-  current_row->enabled_p = 1;
+  current_row->enabled_p = true;
   current_row->used[TEXT_AREA] = desired_row->used[TEXT_AREA];
 
   /* If desired line is empty, just clear the line.  */

=== modified file 'src/disptab.h'
--- a/src/disptab.h     2013-11-04 06:09:03 +0000
+++ b/src/disptab.h     2013-12-14 21:36:44 +0000
@@ -80,7 +80,7 @@
       SET_GLYPH_CHAR ((g), XINT ((base)[GLYPH_CHAR (g)]));     \
     if (!GLYPH_CHAR_VALID_P (g))                               \
       SET_GLYPH_CHAR (g, ' ');                                 \
-  } while (0)
+  } while (false)
 
 /* Assuming that GLYPH_SIMPLE_P (BASE, LEN, G) is 0,
    return the length and the address of the character-sequence

=== modified file 'src/editfns.c'
--- a/src/editfns.c     2013-12-11 14:42:55 +0000
+++ b/src/editfns.c     2013-12-14 21:36:44 +0000
@@ -3636,8 +3636,8 @@
   struct info
   {
     ptrdiff_t start, end;
-    unsigned converted_to_string : 1;
-    unsigned intervals : 1;
+    bool_bf converted_to_string : 1;
+    bool_bf intervals : 1;
   } *info = 0;
 
   /* It should not be necessary to GCPRO ARGS, because
@@ -4214,7 +4214,7 @@
        if (buf == initial_buffer)
          {
            buf = xmalloc (bufsize);
-           sa_must_free = 1;
+           sa_must_free = true;
            buf_save_value_index = SPECPDL_INDEX ();
            record_unwind_protect_ptr (xfree, buf);
            memcpy (buf, initial_buffer, used);

=== modified file 'src/fileio.c'
--- a/src/fileio.c      2013-12-14 08:33:06 +0000
+++ b/src/fileio.c      2013-12-14 21:36:44 +0000
@@ -2114,7 +2114,7 @@
     {
       struct timespec atime = get_stat_atime (&st);
       struct timespec mtime = get_stat_mtime (&st);
-      if (set_file_times (ofd, SSDATA (encoded_newname), atime, mtime))
+      if (set_file_times (ofd, SSDATA (encoded_newname), atime, mtime) != 0)
        xsignal2 (Qfile_date_error,
                  build_string ("Cannot set file date"), newname);
     }
@@ -3184,7 +3184,7 @@
   encoded_absname = ENCODE_FILE (absname);
 
   {
-    if (set_file_times (-1, SSDATA (encoded_absname), t, t))
+    if (set_file_times (-1, SSDATA (encoded_absname), t, t) != 0)
       {
 #ifdef MSDOS
         /* Setting times on a directory always fails.  */

=== modified file 'src/font.h'
--- a/src/font.h        2013-12-13 15:55:23 +0000
+++ b/src/font.h        2013-12-14 21:36:44 +0000
@@ -117,7 +117,7 @@
        font.  */
     FONT_AVGWIDTH_INDEX,
 
-#if 0
+#if false
     /* The following two members are to substitute for the above 6
        members (FONT_WEIGHT_INDEX to FONT_AVGWIDTH_INDEX excluding
        FONT_SIZE_INDEX) if it is found that font-entities consumes too
@@ -201,38 +201,38 @@
    ? (XINT (AREF ((font), FONT_WIDTH_INDEX)) >> 8) : -1)
 /* Return the symbolic weight value of FONT.  */
 #define FONT_WEIGHT_SYMBOLIC(font)     \
-  font_style_symbolic (font, FONT_WEIGHT_INDEX, 0)
+  font_style_symbolic (font, FONT_WEIGHT_INDEX, false)
 /* Return the symbolic slant value of FONT.  */
 #define FONT_SLANT_SYMBOLIC(font)      \
-  font_style_symbolic (font, FONT_SLANT_INDEX, 0)
+  font_style_symbolic (font, FONT_SLANT_INDEX, false)
 /* Return the symbolic width value of FONT.  */
 #define FONT_WIDTH_SYMBOLIC(font)      \
-  font_style_symbolic (font, FONT_WIDTH_INDEX, 0)
+  font_style_symbolic (font, FONT_WIDTH_INDEX, false)
 /* Return the face-weight corresponding to the weight of FONT.  */
 #define FONT_WEIGHT_FOR_FACE(font)     \
-  font_style_symbolic (font, FONT_WEIGHT_INDEX, 1)
+  font_style_symbolic (font, FONT_WEIGHT_INDEX, true)
 /* Return the face-slant corresponding to the slant of FONT.  */
 #define FONT_SLANT_FOR_FACE(font)      \
-  font_style_symbolic (font, FONT_SLANT_INDEX, 1)
+  font_style_symbolic (font, FONT_SLANT_INDEX, true)
 /* Return the face-swidth corresponding to the slant of FONT.  */
 #define FONT_WIDTH_FOR_FACE(font)      \
-  font_style_symbolic (font, FONT_WIDTH_INDEX, 1)
+  font_style_symbolic (font, FONT_WIDTH_INDEX, true)
 
 /* Return the numeric weight value corresponding ot the symbol NAME.  */
 #define FONT_WEIGHT_NAME_NUMERIC(name) \
-  (font_style_to_value (FONT_WEIGHT_INDEX, (name), 0) >> 8)
+  (font_style_to_value (FONT_WEIGHT_INDEX, (name), false) >> 8)
 /* Return the numeric slant value corresponding ot the symbol NAME.  */
 #define FONT_SLANT_NAME_NUMERIC(name)  \
-  (font_style_to_value (FONT_SLANT_INDEX, (name), 0) >> 8)
+  (font_style_to_value (FONT_SLANT_INDEX, (name), false) >> 8)
 /* Return the numeric width value corresponding ot the symbol NAME.  */
 #define FONT_WIDTH_NAME_NUMERIC(name)  \
-  (font_style_to_value (FONT_WIDTH_INDEX, (name), 0) >> 8)
+  (font_style_to_value (FONT_WIDTH_INDEX, (name), false) >> 8)
 
 /* Set the font property PROP of FONT to VAL.  PROP is one of
    style-related font property index (FONT_WEIGHT/SLANT/WIDTH_INDEX).
    VAL (integer or symbol) is the numeric or symbolic style value.  */
 #define FONT_SET_STYLE(font, prop, val)        \
-  ASET ((font), prop, make_number (font_style_to_value (prop, val, 1)))
+  ASET ((font), prop, make_number (font_style_to_value (prop, val, true)))
 
 #define FONT_WIDTH(f) ((f)->max_width)
 #define FONT_HEIGHT(f) ((f)->height)
@@ -424,19 +424,19 @@
 
 /* Predicates to check various font-related objects.  */
 
-/* 1 iff X is one of font-spec, font-entity, and font-object.  */
+/* True iff X is one of font-spec, font-entity, and font-object.  */
 #define FONTP(x) PSEUDOVECTORP (x, PVEC_FONT)
-/* 1 iff X is font-spec.  */
+/* True iff X is font-spec.  */
 #define FONT_SPEC_P(x) \
   (FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_SPEC_MAX)
-/* 1 iff X is font-entity.  */
+/* True iff X is font-entity.  */
 #define FONT_ENTITY_P(x)       \
   (FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_ENTITY_MAX)
-/* 1 iff X is font-object.  */
+/* True iff X is font-object.  */
 #define FONT_OBJECT_P(x)       \
   (FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_OBJECT_MAX)
 
-/* 1 iff ENTITY can't be loaded.  */
+/* True iff ENTITY can't be loaded.  */
 #define FONT_ENTITY_NOT_LOADABLE(entity)       \
   EQ (AREF (entity, FONT_OBJLIST_INDEX), Qt)
 
@@ -448,19 +448,22 @@
 /* Check macros for various font-related objects.  */
 
 #define CHECK_FONT(x)  \
-  do { if (! FONTP (x)) wrong_type_argument (Qfont, x); } while (0)
+  do { if (! FONTP (x)) wrong_type_argument (Qfont, x); } while (false)
 #define CHECK_FONT_SPEC(x)     \
-  do { if (! FONT_SPEC_P (x)) wrong_type_argument (Qfont_spec, x); } while (0)
+  do { if (! FONT_SPEC_P (x)) wrong_type_argument (Qfont_spec, x); } \
+  while (false)
 #define CHECK_FONT_ENTITY(x)   \
-  do { if (! FONT_ENTITY_P (x)) wrong_type_argument (Qfont_entity, x); } while 
(0)
+  do { if (! FONT_ENTITY_P (x)) wrong_type_argument (Qfont_entity, x); } \
+  while (false)
 #define CHECK_FONT_OBJECT(x)   \
-  do { if (! FONT_OBJECT_P (x)) wrong_type_argument (Qfont_object, x); } while 
(0)
+  do { if (! FONT_OBJECT_P (x)) wrong_type_argument (Qfont_object, x); } \
+  while (false)
 
 #define CHECK_FONT_GET_OBJECT(x, font) \
   do {                                 \
     CHECK_FONT_OBJECT (x);             \
     font = XFONT_OBJECT (x);           \
-  } while (0)
+  } while (false)
 
 #define XFONT_SPEC(p)  \
   (eassert (FONT_SPEC_P (p)), (struct font_spec *) XUNTAG (p, Lisp_Vectorlike))
@@ -848,12 +851,12 @@
   do {                                         \
     if (! EQ (Vfont_log, Qt))                  \
       font_add_log ((ACTION), (ARG), (RESULT));        \
-  } while (0)
+  } while (false)
 
 #define FONT_DEFERRED_LOG(ACTION, ARG, RESULT)         \
   do {                                                 \
     if (! EQ (Vfont_log, Qt))                          \
       font_deferred_log ((ACTION), (ARG), (RESULT));   \
-  } while (0)
+  } while (false)
 
 #endif /* not EMACS_FONT_H */

=== modified file 'src/frame.h'
--- a/src/frame.h       2013-12-08 05:59:27 +0000
+++ b/src/frame.h       2013-12-14 21:36:44 +0000
@@ -177,46 +177,46 @@
   struct glyph_matrix *desired_matrix;
   struct glyph_matrix *current_matrix;
 
-  /* 1 means that glyphs on this frame have been initialized so it can
+  /* True means that glyphs on this frame have been initialized so it can
      be used for output.  */
-  unsigned glyphs_initialized_p : 1;
+  bool_bf glyphs_initialized_p : 1;
 
-  /* Set to non-zero in change_frame_size when size of frame changed
+  /* Set to true in change_frame_size when size of frame changed
      Clear the frame in clear_garbaged_frames if set.  */
-  unsigned resized_p : 1;
+  bool_bf resized_p : 1;
 
-  /* Set to non-zero if the default face for the frame has been
+  /* Set to true if the default face for the frame has been
      realized.  Reset to zero whenever the default face changes.
      Used to see the difference between a font change and face change.  */
-  unsigned default_face_done_p : 1;
+  bool_bf default_face_done_p : 1;
 
-  /* Set to non-zero if this frame has already been hscrolled during
+  /* Set to true if this frame has already been hscrolled during
      current redisplay.  */
-  unsigned already_hscrolled_p : 1;
+  bool_bf already_hscrolled_p : 1;
 
-  /* Set to non-zero when current redisplay has updated frame.  */
-  unsigned updated_p : 1;
+  /* Set to true when current redisplay has updated frame.  */
+  bool_bf updated_p : 1;
 
 #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
-  /* Set to non-zero to minimize tool-bar height even when
+  /* Set to true to minimize tool-bar height even when
      auto-resize-tool-bar is set to grow-only.  */
-  unsigned minimize_tool_bar_window_p : 1;
+  bool_bf minimize_tool_bar_window_p : 1;
 #endif
 
 #if defined (USE_GTK) || defined (HAVE_NS)
-  /* Nonzero means using a tool bar that comes from the toolkit.  */
-  unsigned external_tool_bar : 1;
+  /* True means using a tool bar that comes from the toolkit.  */
+  bool_bf external_tool_bar : 1;
 #endif
 
-  /* Nonzero means that fonts have been loaded since the last glyph
+  /* True means that fonts have been loaded since the last glyph
      matrix adjustments.  */
-  unsigned fonts_changed : 1;
+  bool_bf fonts_changed : 1;
 
-  /* Nonzero means that cursor type has been changed.  */
-  unsigned cursor_type_changed : 1;
+  /* True means that cursor type has been changed.  */
+  bool_bf cursor_type_changed : 1;
 
   /* True if it needs to be redisplayed.  */
-  unsigned redisplay : 1;
+  bool_bf redisplay : 1;
 
   /* Margin at the top of the frame.  Used to display the tool-bar.  */
   int tool_bar_lines;
@@ -353,8 +353,8 @@
 
 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
     || defined (HAVE_NS) || defined (USE_GTK)
-  /* Nonzero means using a menu bar that comes from the X toolkit.  */
-  unsigned external_menu_bar : 1;
+  /* True means using a menu bar that comes from the X toolkit.  */
+  bool_bf external_menu_bar : 1;
 #endif
 
   /* Next two bitfields are mutually exclusive.  They might both be
@@ -371,45 +371,45 @@
      updating it.  */
   unsigned visible : 2;
 
-  /* Nonzero if the frame is currently iconified.  Do not
+  /* True if the frame is currently iconified.  Do not
      set this directly, use SET_FRAME_ICONIFIED instead.  */
-  unsigned iconified : 1;
-
-  /* Nonzero if this frame should be redrawn.  */
-  unsigned garbaged : 1;
-
-  /* 0 means, if this frame has just one window,
+  bool_bf iconified : 1;
+
+  /* True if this frame should be redrawn.  */
+  bool_bf garbaged : 1;
+
+  /* False means, if this frame has just one window,
      show no modeline for that window.  */
-  unsigned wants_modeline : 1;
-
-  /* Non-0 means raise this frame to the top of the heap when selected.  */
-  unsigned auto_raise : 1;
-
-  /* Non-0 means lower this frame to the bottom of the stack when left.  */
-  unsigned auto_lower : 1;
+  bool_bf wants_modeline : 1;
+
+  /* True means raise this frame to the top of the heap when selected.  */
+  bool_bf auto_raise : 1;
+
+  /* True means lower this frame to the bottom of the stack when left.  */
+  bool_bf auto_lower : 1;
 
   /* True if frame's root window can't be split.  */
-  unsigned no_split : 1;
+  bool_bf no_split : 1;
 
   /* If this is set, then Emacs won't change the frame name to indicate
      the current buffer, etcetera.  If the user explicitly sets the frame
      name, this gets set.  If the user sets the name to Qnil, this is
      cleared.  */
-  unsigned explicit_name : 1;
-
-  /* Nonzero if size of some window on this frame has changed.  */
-  unsigned window_sizes_changed : 1;
-
-  /* Nonzero if the mouse has moved on this display device
+  bool_bf explicit_name : 1;
+
+  /* True if size of some window on this frame has changed.  */
+  bool_bf window_sizes_changed : 1;
+
+  /* True if the mouse has moved on this display device
      since the last time we checked.  */
-  unsigned mouse_moved : 1;
-
-  /* Nonzero means that the pointer is invisible.  */
-  unsigned pointer_invisible : 1;
-
-  /* Nonzero means that all windows except mini-window and
+  bool_bf mouse_moved : 1;
+
+  /* True means that the pointer is invisible.  */
+  bool_bf pointer_invisible : 1;
+
+  /* True means that all windows except mini-window and
      selected window on this frame have frozen window starts.  */
-  unsigned frozen_window_starts : 1;
+  bool_bf frozen_window_starts : 1;
 
   /* Nonzero if we should actually display the scroll bars on this frame.  */
   enum vertical_scroll_bar_type vertical_scroll_bar_type;
@@ -606,17 +606,17 @@
 #define FRAME_TERMCAP_P(f) ((f)->output_method == output_termcap)
 #define FRAME_X_P(f) ((f)->output_method == output_x_window)
 #ifndef HAVE_NTGUI
-#define FRAME_W32_P(f) (0)
+#define FRAME_W32_P(f) false
 #else
 #define FRAME_W32_P(f) ((f)->output_method == output_w32)
 #endif
 #ifndef MSDOS
-#define FRAME_MSDOS_P(f) (0)
+#define FRAME_MSDOS_P(f) false
 #else
 #define FRAME_MSDOS_P(f) ((f)->output_method == output_msdos_raw)
 #endif
 #ifndef HAVE_NS
-#define FRAME_NS_P(f) (0)
+#define FRAME_NS_P(f) false
 #else
 #define FRAME_NS_P(f) ((f)->output_method == output_ns)
 #endif
@@ -634,7 +634,7 @@
 #define FRAME_WINDOW_P(f) FRAME_NS_P(f)
 #endif
 #ifndef FRAME_WINDOW_P
-#define FRAME_WINDOW_P(f) ((void) (f), 0)
+#define FRAME_WINDOW_P(f) ((void) (f), false)
 #endif
 
 /* Dots per inch of the screen the frame F is on.  */
@@ -669,14 +669,14 @@
   (&(F)->output_data.tty->display_info->mouse_highlight)
 #endif
 
-/* Nonzero if frame F is still alive (not deleted).  */
+/* True if frame F is still alive (not deleted).  */
 #define FRAME_LIVE_P(f) ((f)->terminal != 0)
 
-/* Nonzero if frame F is a minibuffer-only frame.  */
+/* True if frame F is a minibuffer-only frame.  */
 #define FRAME_MINIBUF_ONLY_P(f) \
   EQ (FRAME_ROOT_WINDOW (f), FRAME_MINIBUF_WINDOW (f))
 
-/* Nonzero if frame F contains it's own minibuffer window.  Frame always has
+/* True if frame F contains it's own minibuffer window.  Frame always has
    minibuffer window, but it could use minibuffer window of another frame.  */
 #define FRAME_HAS_MINIBUF_P(f)                                 \
   (WINDOWP (f->minibuffer_window)                              \
@@ -714,12 +714,12 @@
 /* Pixel height of frame F's menu bar.  */
 #define FRAME_MENU_BAR_HEIGHT(f) (f)->menu_bar_height
 
-/* Nonzero if this frame should display a tool bar
+/* True if this frame should display a tool bar
    in a way that does not use any text lines.  */
 #if defined (USE_GTK) || defined (HAVE_NS)
 #define FRAME_EXTERNAL_TOOL_BAR(f) (f)->external_tool_bar
 #else
-#define FRAME_EXTERNAL_TOOL_BAR(f) 0
+#define FRAME_EXTERNAL_TOOL_BAR(f) false
 #endif
 
 /* Number of lines of frame F used for the tool-bar.  */
@@ -736,40 +736,40 @@
 #define FRAME_TOP_MARGIN_HEIGHT(F)                             \
   (FRAME_MENU_BAR_HEIGHT (F) + FRAME_TOOL_BAR_HEIGHT (F))
 
-/* Nonzero if this frame should display a menu bar
+/* True if this frame should display a menu bar
    in a way that does not use any text lines.  */
 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
      || defined (HAVE_NS) || defined (USE_GTK)
 #define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar
 #else
-#define FRAME_EXTERNAL_MENU_BAR(f) 0
+#define FRAME_EXTERNAL_MENU_BAR(f) false
 #endif
 #define FRAME_VISIBLE_P(f) (f)->visible
 
-/* Nonzero if frame F is currently visible but hidden.  */
+/* True if frame F is currently visible but hidden.  */
 #define FRAME_OBSCURED_P(f) ((f)->visible > 1)
 
-/* Nonzero if frame F is currently iconified.  */
+/* True if frame F is currently iconified.  */
 #define FRAME_ICONIFIED_P(f) (f)->iconified
 
 /* Mark frame F as currently garbaged.  */
 #define SET_FRAME_GARBAGED(f)                          \
   (frame_garbaged = true, fset_redisplay (f), f->garbaged = true)
 
-/* Nonzero if frame F is currently garbaged.  */
+/* True if frame F is currently garbaged.  */
 #define FRAME_GARBAGED_P(f) (f)->garbaged
 
-/* Nonzero means do not allow splitting this frame's window.  */
+/* True means do not allow splitting this frame's window.  */
 #define FRAME_NO_SPLIT_P(f) (f)->no_split
 
 /* Not really implemented.  */
 #define FRAME_WANTS_MODELINE_P(f) (f)->wants_modeline
 
-/* Nonzero if all windows except selected window and mini window
+/* True if all windows except selected window and mini window
    are frozen on frame F.  */
 #define FRAME_WINDOWS_FROZEN(f) (f)->frozen_window_starts
 
-/* Nonzero if a size change has been requested for frame F
+/* True if a size change has been requested for frame F
    but not yet really put into effect.  This can be true temporarily
    when an X event comes in at a bad time.  */
 #define FRAME_WINDOW_SIZES_CHANGED(f) (f)->window_sizes_changed
@@ -888,8 +888,6 @@
 #define FRAME_CURSOR_X_LIMIT(f) \
   (FRAME_COLS (f) + FRAME_LEFT_SCROLL_BAR_COLS (f))
 
-/* Nonzero if frame F has scroll bars.  */
-
 #define FRAME_SCROLL_BARS(f) (f->scroll_bars)
 
 #define FRAME_CONDEMNED_SCROLL_BARS(f) (f->condemned_scroll_bars)
@@ -934,7 +932,7 @@
 #define FOR_EACH_FRAME(list_var, frame_var)    \
   for ((list_var) = Vframe_list;               \
        (CONSP (list_var)                       \
-       && (frame_var = XCAR (list_var), 1));   \
+       && (frame_var = XCAR (list_var), true)); \
        list_var = XCDR (list_var))
 
 /* Reflect mouse movement when a complete frame update is performed.  */
@@ -950,7 +948,7 @@
                              hlinfo->mouse_face_mouse_y);      \
        unblock_input ();                                       \
       }                                                                \
-  } while (0)
+  } while (true)
 
 /* Set visibility of frame F.
    We call redisplay_other_windows to make sure the frame gets redisplayed
@@ -978,7 +976,7 @@
 extern Lisp_Object Qterminal;
 extern Lisp_Object Qnoelisp;
 
-/* Nonzero means there is at least one garbaged frame.  */
+/* True means there is at least one garbaged frame.  */
 extern bool frame_garbaged;
 
 extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);

=== modified file 'src/fringe.c'
--- a/src/fringe.c      2013-11-30 09:25:31 +0000
+++ b/src/fringe.c      2013-12-14 21:36:44 +0000
@@ -83,7 +83,7 @@
   unsigned width : 8;
   unsigned period : 8;
   unsigned align : 2;
-  unsigned dynamic : 1;
+  bool_bf dynamic : 1;
 };
 
 
@@ -1664,7 +1664,7 @@
       Fput (bitmap, Qfringe, make_number (n));
     }
 
-  fb.dynamic = 1;
+  fb.dynamic = true;
 
   xfb = xmalloc (sizeof fb + fb.height * BYTES_PER_BITMAP_ROW);
   fb.bits = b = (unsigned short *) (xfb + 1);

=== modified file 'src/gnutls.h'
--- a/src/gnutls.h      2013-12-13 03:44:59 +0000
+++ b/src/gnutls.h      2013-12-14 21:36:44 +0000
@@ -57,19 +57,19 @@
   do {                                                         \
     if ((level) <= (max))                                      \
       gnutls_log_function (level, "(Emacs) " string);          \
-  } while (0)
+  } while (false)
 
 #define GNUTLS_LOG2(level, max, string, extra)                 \
   do {                                                         \
     if ((level) <= (max))                                      \
       gnutls_log_function2 (level, "(Emacs) " string, extra);  \
-  } while (0)
+  } while (false)
 
 #define GNUTLS_LOG2i(level, max, string, extra)                        \
   do {                                                         \
     if ((level) <= (max))                                      \
       gnutls_log_function2i (level, "(Emacs) " string, extra); \
-  } while (0)
+  } while (false)
 
 extern ptrdiff_t
 emacs_gnutls_write (struct Lisp_Process *proc, const char *buf, ptrdiff_t 
nbyte);

=== modified file 'src/image.c'
--- a/src/image.c       2013-12-07 17:21:57 +0000
+++ b/src/image.c       2013-12-14 21:36:44 +0000
@@ -264,7 +264,7 @@
 
 #ifdef HAVE_X_WINDOWS
   dpyinfo->bitmaps[id - 1].pixmap = bitmap;
-  dpyinfo->bitmaps[id - 1].have_mask = 0;
+  dpyinfo->bitmaps[id - 1].have_mask = false;
   dpyinfo->bitmaps[id - 1].depth = 1;
 #endif /* HAVE_X_WINDOWS */
 
@@ -339,7 +339,7 @@
 
   id = x_allocate_bitmap_record (f);
   dpyinfo->bitmaps[id - 1].pixmap = bitmap;
-  dpyinfo->bitmaps[id - 1].have_mask = 0;
+  dpyinfo->bitmaps[id - 1].have_mask = false;
   dpyinfo->bitmaps[id - 1].refcount = 1;
   dpyinfo->bitmaps[id - 1].file = xlispstrdup (file);
   dpyinfo->bitmaps[id - 1].depth = 1;
@@ -515,7 +515,7 @@
             width, height);
   XFreeGC (FRAME_X_DISPLAY (f), gc);
 
-  dpyinfo->bitmaps[id - 1].have_mask = 1;
+  dpyinfo->bitmaps[id - 1].have_mask = true;
   dpyinfo->bitmaps[id - 1].mask = mask;
 
   XDestroyImage (ximg);
@@ -3446,7 +3446,7 @@
 
   id = x_allocate_bitmap_record (f);
   dpyinfo->bitmaps[id - 1].pixmap = bitmap;
-  dpyinfo->bitmaps[id - 1].have_mask = 1;
+  dpyinfo->bitmaps[id - 1].have_mask = true;
   dpyinfo->bitmaps[id - 1].mask = mask;
   dpyinfo->bitmaps[id - 1].file = NULL;
   dpyinfo->bitmaps[id - 1].height = attrs.height;
@@ -3974,7 +3974,7 @@
   Lisp_Object (*get_color_table) (Lisp_Object, const unsigned char *, int);
   Lisp_Object frame, color_symbols, color_table;
   int best_key;
-  bool have_mask = 0;
+  bool have_mask = false;
   XImagePtr ximg = NULL, mask_img = NULL;
 
 #define match() \
@@ -4146,7 +4146,7 @@
 #ifndef HAVE_NS
          XPutPixel (mask_img, x, y,
                     (!EQ (color_val, Qt) ? PIX_MASK_DRAW
-                     : (have_mask = 1, PIX_MASK_RETAIN)));
+                     : (have_mask = true, PIX_MASK_RETAIN)));
 #else
           if (EQ (color_val, Qt))
             ns_set_alpha (ximg, x, y, 0);

=== modified file 'src/intervals.h'
--- a/src/intervals.h   2013-11-24 18:28:33 +0000
+++ b/src/intervals.h   2013-12-14 21:36:44 +0000
@@ -42,19 +42,19 @@
     struct interval *interval;
     Lisp_Object obj;
   } up;
-  unsigned int up_obj : 1;
+  bool_bf up_obj : 1;
 
-  unsigned gcmarkbit : 1;
+  bool_bf gcmarkbit : 1;
 
   /* The remaining components are `properties' of the interval.
      The first four are duplicates for things which can be on the list,
      for purposes of speed.  */
 
-  unsigned int write_protect : 1;   /* Non-zero means can't modify.  */
-  unsigned int visible : 1;        /* Zero means don't display.  */
-  unsigned int front_sticky : 1;    /* Non-zero means text inserted just
+  bool_bf write_protect : 1;       /* True means can't modify.  */
+  bool_bf visible : 1;             /* False means don't display.  */
+  bool_bf front_sticky : 1;        /* True means text inserted just
                                       before this interval goes into it.  */
-  unsigned int rear_sticky : 1;            /* Likewise for just after it.  */
+  bool_bf rear_sticky : 1;         /* Likewise for just after it.  */
   Lisp_Object plist;               /* Other properties.  */
 };
 
@@ -116,7 +116,7 @@
 
 /* Test what type of parent we have.  Three possibilities: another
    interval, a buffer or string object, or NULL.  */
-#define INTERVAL_HAS_PARENT(i) ((i)->up_obj == 0 && (i)->up.interval != 0)
+#define INTERVAL_HAS_PARENT(i) (! (i)->up_obj && (i)->up.interval != 0)
 #define INTERVAL_HAS_OBJECT(i) ((i)->up_obj)
 
 /* Use these macros to get parent of an interval.
@@ -126,9 +126,9 @@
    progress.  */
 
 #define INTERVAL_PARENT(i)                                     \
-   (eassert ((i) != 0 && (i)->up_obj == 0), (i)->up.interval)
+   (eassert ((i) != 0 && ! (i)->up_obj), (i)->up.interval)
 
-#define GET_INTERVAL_OBJECT(d,s) (eassert ((s)->up_obj == 1), (d) = 
(s)->up.obj)
+#define GET_INTERVAL_OBJECT(d,s) (eassert ((s)->up_obj), (d) = (s)->up.obj)
 
 /* Use these functions to set Lisp_Object
    or pointer slots of struct interval.  */
@@ -136,7 +136,7 @@
 INLINE void
 set_interval_parent (INTERVAL i, INTERVAL parent)
 {
-  i->up_obj = 0;
+  i->up_obj = false;
   i->up.interval = parent;
 }
 
@@ -154,33 +154,33 @@
 
 /* Reset this interval to its vanilla, or no-property state.  */
 #define RESET_INTERVAL(i)                    \
-{                                            \
+ do {                                        \
   (i)->total_length = (i)->position = 0;      \
   (i)->left = (i)->right = NULL;             \
   set_interval_parent (i, NULL);             \
-  (i)->write_protect = 0;                    \
-  (i)->visible = 0;                          \
-  (i)->front_sticky = (i)->rear_sticky = 0;   \
+  (i)->write_protect = false;                \
+  (i)->visible = false;                              \
+  (i)->front_sticky = (i)->rear_sticky = false;        \
   set_interval_plist (i, Qnil);                      \
-}
+ } while (false)
 
 /* Copy the cached property values of interval FROM to interval TO.  */
 #define COPY_INTERVAL_CACHE(from,to)           \
-{                                              \
+ do {                                          \
   (to)->write_protect = (from)->write_protect; \
   (to)->visible = (from)->visible;             \
   (to)->front_sticky = (from)->front_sticky;   \
   (to)->rear_sticky = (from)->rear_sticky;     \
-}
+ } while (false)
 
 /* Copy only the set bits of FROM's cache.  */
-#define MERGE_INTERVAL_CACHE(from,to)                \
-{                                                    \
-  if ((from)->write_protect) (to)->write_protect = 1; \
-  if ((from)->visible) (to)->visible = 1;            \
-  if ((from)->front_sticky) (to)->front_sticky = 1;   \
-  if ((from)->rear_sticky) (to)->rear_sticky = 1;     \
-}
+#define MERGE_INTERVAL_CACHE(from,to)                          \
+ do {                                                          \
+  if ((from)->write_protect) (to)->write_protect = true;       \
+  if ((from)->visible) (to)->visible = true;                   \
+  if ((from)->front_sticky) (to)->front_sticky = true;         \
+  if ((from)->rear_sticky) (to)->rear_sticky = true;           \
+ } while (false)
 
 /* Is this interval visible?  Replace later with cache access.  */
 #define INTERVAL_VISIBLE_P(i) \
@@ -198,7 +198,7 @@
    should stick to it.  Now we have Vtext_property_default_nonsticky,
    so these macros are unreliable now and never used.  */
 
-#if 0
+#if false
 #define FRONT_STICKY_P(i)                              \
   (i && ! NILP (textget ((i)->plist, Qfront_sticky)))
 #define END_NONSTICKY_P(i)                             \

=== modified file 'src/keyboard.h'
--- a/src/keyboard.h    2013-12-11 16:52:34 +0000
+++ b/src/keyboard.h    2013-12-14 21:36:44 +0000
@@ -169,7 +169,7 @@
     char kbd_queue_has_data;
 
     /* True means echo each character as typed.  */
-    unsigned immediate_echo : 1;
+    bool_bf immediate_echo : 1;
 
     /* If we have echoed a prompt string specified by the user,
        this is its length in characters.  Otherwise this is -1.  */

=== modified file 'src/keymap.h'
--- a/src/keymap.h      2013-01-01 09:11:05 +0000
+++ b/src/keymap.h      2013-12-14 21:36:44 +0000
@@ -29,7 +29,7 @@
    We need one more byte for string terminator `\0'.  */
 #define KEY_DESCRIPTION_SIZE ((2 * 6) + 1 + (CHARACTERBITS / 3) + 1 + 1)
 
-#define KEYMAPP(m) (!NILP (get_keymap (m, 0, 0)))
+#define KEYMAPP(m) (!NILP (get_keymap (m, false, false)))
 extern Lisp_Object Qkeymap, Qmenu_bar;
 extern Lisp_Object Qremap;
 extern Lisp_Object Qmenu_item;

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2013-12-09 20:46:07 +0000
+++ b/src/lisp.h        2013-12-14 21:36:44 +0000
@@ -23,7 +23,6 @@
 #include <setjmp.h>
 #include <stdalign.h>
 #include <stdarg.h>
-#include <stdbool.h>
 #include <stddef.h>
 #include <float.h>
 #include <inttypes.h>
@@ -170,7 +169,7 @@
    for COND to call external functions or access volatile storage.  */
 
 #ifndef ENABLE_CHECKING
-# define eassert(cond) ((void) (0 && (cond))) /* Check that COND compiles.  */
+# define eassert(cond) ((void) (false && (cond))) /* Check COND compiles.  */
 # define eassume(cond) assume (cond)
 #else /* ENABLE_CHECKING */
 
@@ -251,20 +250,20 @@
    On hosts where pointers-as-ints do not exceed VAL_MAX, USE_LSB_TAG is:
     a. unnecessary, because the top bits of an EMACS_INT are unused, and
     b. slower, because it typically requires extra masking.
-   So, default USE_LSB_TAG to 1 only on hosts where it might be useful.  */
+   So, default USE_LSB_TAG to true only on hosts where it might be useful.  */
 #   if VAL_MAX < UINTPTR_MAX
-#    define USE_LSB_TAG 1
+#    define USE_LSB_TAG true
 #   endif
 #  endif
 # endif
 #endif
 #ifdef USE_LSB_TAG
 # undef USE_LSB_TAG
-enum enum_USE_LSB_TAG { USE_LSB_TAG = 1 };
-# define USE_LSB_TAG 1
+enum enum_USE_LSB_TAG { USE_LSB_TAG = true };
+# define USE_LSB_TAG true
 #else
-enum enum_USE_LSB_TAG { USE_LSB_TAG = 0 };
-# define USE_LSB_TAG 0
+enum enum_USE_LSB_TAG { USE_LSB_TAG = false };
+# define USE_LSB_TAG false
 #endif
 
 #ifndef alignas
@@ -356,7 +355,7 @@
 
 /* When compiling via gcc -O0, define the key operations as macros, as
    Emacs is too slow otherwise.  To disable this optimization, compile
-   with -DINLINING=0.  */
+   with -DINLINING=false.  */
 #if (defined __NO_INLINE__ \
      && ! defined __OPTIMIZE__ && ! defined __OPTIMIZE_SIZE__ \
      && ! (defined INLINING && ! INLINING))
@@ -550,14 +549,14 @@
 #define LISP_INITIALLY_ZERO {0}
 
 #undef CHECK_LISP_OBJECT_TYPE
-enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = 1 };
+enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = true };
 #else /* CHECK_LISP_OBJECT_TYPE */
 
 /* If a struct type is not wanted, define Lisp_Object as just a number.  */
 
 typedef EMACS_INT Lisp_Object;
 #define LISP_INITIALLY_ZERO 0
-enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = 0 };
+enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false };
 #endif /* CHECK_LISP_OBJECT_TYPE */
 
 /* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa.
@@ -736,7 +735,7 @@
 /* Return true if X and Y are the same object.  */
 LISP_MACRO_DEFUN (EQ, bool, (Lisp_Object x, Lisp_Object y), (x, y))
 
-/* Value is non-zero if I doesn't fit into a Lisp fixnum.  It is
+/* Value is true if I doesn't fit into a Lisp fixnum.  It is
    written this way so that it also works if I is of unsigned
    type or if I is a NaN.  */
 
@@ -1085,17 +1084,23 @@
   ((ptrdiff_t) min (MOST_POSITIVE_FIXNUM, min (SIZE_MAX, PTRDIFF_MAX) - 1))
 
 /* Mark STR as a unibyte string.  */
-#define STRING_SET_UNIBYTE(STR)  \
-  do { if (EQ (STR, empty_multibyte_string))  \
-      (STR) = empty_unibyte_string;  \
-    else XSTRING (STR)->size_byte = -1; } while (0)
+#define STRING_SET_UNIBYTE(STR)                                \
+  do {                                                 \
+    if (EQ (STR, empty_multibyte_string))              \
+      (STR) = empty_unibyte_string;                    \
+    else                                               \
+      XSTRING (STR)->size_byte = -1;                   \
+  } while (false)
 
 /* Mark STR as a multibyte string.  Assure that STR contains only
    ASCII characters in advance.  */
-#define STRING_SET_MULTIBYTE(STR)  \
-  do { if (EQ (STR, empty_unibyte_string))  \
-      (STR) = empty_multibyte_string;  \
-    else XSTRING (STR)->size_byte = XSTRING (STR)->size; } while (0)
+#define STRING_SET_MULTIBYTE(STR)                      \
+  do {                                                 \
+    if (EQ (STR, empty_unibyte_string))                        \
+      (STR) = empty_multibyte_string;                  \
+    else                                               \
+      XSTRING (STR)->size_byte = XSTRING (STR)->size;  \
+  } while (false)
 
 /* Convenience functions for dealing with Lisp strings.  */
 
@@ -1348,14 +1353,14 @@
 /* Compute A OP B, using the unsigned comparison operator OP.  A and B
    should be integer expressions.  This is not the same as
    mathematical comparison; for example, UNSIGNED_CMP (0, <, -1)
-   returns 1.  For efficiency, prefer plain unsigned comparison if A
+   returns true.  For efficiency, prefer plain unsigned comparison if A
    and B's sizes both fit (after integer promotion).  */
 #define UNSIGNED_CMP(a, op, b)                                         \
   (max (sizeof ((a) + 0), sizeof ((b) + 0)) <= sizeof (unsigned)       \
    ? ((a) + (unsigned) 0) op ((b) + (unsigned) 0)                      \
    : ((a) + (uintmax_t) 0) op ((b) + (uintmax_t) 0))
 
-/* Nonzero iff C is an ASCII character.  */
+/* True iff C is an ASCII character.  */
 #define ASCII_CHAR_P(c) UNSIGNED_CMP (c, <, 0x80)
 
 /* A char-table is a kind of vectorlike, with contents are like a
@@ -1536,7 +1541,7 @@
 
 struct Lisp_Symbol
 {
-  unsigned gcmarkbit : 1;
+  bool_bf gcmarkbit : 1;
 
   /* Indicates where the value can be found:
      0 : it's a plain var, the value is in the `value' field.
@@ -1554,9 +1559,9 @@
      enum symbol_interned.  */
   unsigned interned : 2;
 
-  /* Non-zero means that this variable has been explicitly declared
+  /* True means that this variable has been explicitly declared
      special (with `defvar' etc), and shouldn't be lexically bound.  */
-  unsigned declared_special : 1;
+  bool_bf declared_special : 1;
 
   /* The symbol's name, as a Lisp string.  */
   Lisp_Object name;
@@ -1654,7 +1659,7 @@
 LISP_MACRO_DEFUN (SYMBOL_CONSTANT_P, int, (Lisp_Object sym), (sym))
 
 #define DEFSYM(sym, name)                                              \
-  do { (sym) = intern_c_string ((name)); staticpro (&(sym)); } while (0)
+  do { (sym) = intern_c_string ((name)); staticpro (&(sym)); } while (false)
 
 
 /***********************************************************************
@@ -1832,22 +1837,22 @@
 struct Lisp_Misc_Any           /* Supertype of all Misc types.  */
 {
   ENUM_BF (Lisp_Misc_Type) type : 16;          /* = Lisp_Misc_??? */
-  unsigned gcmarkbit : 1;
+  bool_bf gcmarkbit : 1;
   unsigned spacer : 15;
 };
 
 struct Lisp_Marker
 {
   ENUM_BF (Lisp_Misc_Type) type : 16;          /* = Lisp_Misc_Marker */
-  unsigned gcmarkbit : 1;
+  bool_bf gcmarkbit : 1;
   unsigned spacer : 13;
   /* This flag is temporarily used in the functions
      decode/encode_coding_object to record that the marker position
      must be adjusted after the conversion.  */
-  unsigned int need_adjustment : 1;
-  /* 1 means normal insertion at the marker's position
+  bool_bf need_adjustment : 1;
+  /* True means normal insertion at the marker's position
      leaves the marker after the inserted text.  */
-  unsigned int insertion_type : 1;
+  bool_bf insertion_type : 1;
   /* This is the buffer that the marker points into, or 0 if it points nowhere.
      Note: a chain of markers can contain markers pointing into different
      buffers (the chain is per buffer_text rather than per buffer, so it's
@@ -1893,7 +1898,7 @@
 */
   {
     ENUM_BF (Lisp_Misc_Type) type : 16;        /* = Lisp_Misc_Overlay */
-    unsigned gcmarkbit : 1;
+    bool_bf gcmarkbit : 1;
     unsigned spacer : 15;
     struct Lisp_Overlay *next;
     Lisp_Object start;
@@ -1971,7 +1976,7 @@
 struct Lisp_Save_Value
   {
     ENUM_BF (Lisp_Misc_Type) type : 16;        /* = Lisp_Misc_Save_Value */
-    unsigned gcmarkbit : 1;
+    bool_bf gcmarkbit : 1;
     unsigned spacer : 32 - (16 + 1 + SAVE_TYPE_BITS);
 
     /* V->data may hold up to SAVE_VALUE_SLOTS entries.  The type of
@@ -2047,7 +2052,7 @@
 struct Lisp_Free
   {
     ENUM_BF (Lisp_Misc_Type) type : 16;        /* = Lisp_Misc_Free */
-    unsigned gcmarkbit : 1;
+    bool_bf gcmarkbit : 1;
     unsigned spacer : 15;
     union Lisp_Misc *chain;
   };
@@ -2116,8 +2121,8 @@
 
 /* Boolean forwarding pointer to an int variable.
    This is like Lisp_Intfwd except that the ostensible
-   "value" of the symbol is t if the int variable is nonzero,
-   nil if it is zero.  */
+   "value" of the symbol is t if the bool variable is true,
+   nil if it is false.  */
 struct Lisp_Boolfwd
   {
     enum Lisp_Fwd_Type type;   /* = Lisp_Fwd_Bool */
@@ -2170,15 +2175,15 @@
 
 struct Lisp_Buffer_Local_Value
   {
-    /* 1 means that merely setting the variable creates a local
+    /* True means that merely setting the variable creates a local
        binding for the current buffer.  */
-    unsigned int local_if_set : 1;
-    /* 1 means this variable can have frame-local bindings, otherwise, it is
+    bool_bf local_if_set : 1;
+    /* True means this variable can have frame-local bindings, otherwise, it is
        can have buffer-local bindings.  The two cannot be combined.  */
-    unsigned int frame_local : 1;
-    /* 1 means that the binding now loaded was found.
+    bool_bf frame_local : 1;
+    /* True means that the binding now loaded was found.
        Presumably equivalent to (defcell!=valcell).  */
-    unsigned int found : 1;
+    bool_bf found : 1;
     /* If non-NULL, a forwarding to the C var where it should also be set.  */
     union Lisp_Fwd *fwd;       /* Should never be (Buffer|Kboard)_Objfwd.  */
     /* The buffer or frame for which the loaded binding was found.  */
@@ -2373,7 +2378,7 @@
 PSEUDOVECTORP (Lisp_Object a, int code)
 {
   if (! VECTORLIKEP (a))
-    return 0;
+    return false;
   else
     {
       /* Converting to struct vectorlike_header * avoids aliasing issues.  */
@@ -2541,18 +2546,22 @@
                      ? MOST_NEGATIVE_FIXNUM                            \
                      : (lo)),                                          \
         make_number (min (hi, MOST_POSITIVE_FIXNUM)));                 \
-  } while (0)
+  } while (false)
 #define CHECK_TYPE_RANGED_INTEGER(type, x) \
   do {                                                                 \
     if (TYPE_SIGNED (type))                                            \
       CHECK_RANGED_INTEGER (x, TYPE_MINIMUM (type), TYPE_MAXIMUM (type)); \
     else                                                               \
       CHECK_RANGED_INTEGER (x, 0, TYPE_MAXIMUM (type));                        
\
-  } while (0)
+  } while (false)
 
-#define CHECK_NUMBER_COERCE_MARKER(x) \
-  do { if (MARKERP ((x))) XSETFASTINT (x, marker_position (x)); \
-    else CHECK_TYPE (INTEGERP (x), Qinteger_or_marker_p, x); } while (0)
+#define CHECK_NUMBER_COERCE_MARKER(x)                                  \
+  do {                                                                 \
+    if (MARKERP ((x)))                                                 \
+      XSETFASTINT (x, marker_position (x));                            \
+    else                                                               \
+      CHECK_TYPE (INTEGERP (x), Qinteger_or_marker_p, x);              \
+  } while (false)
 
 INLINE double
 XFLOATINT (Lisp_Object n)
@@ -2566,9 +2575,13 @@
   CHECK_TYPE (FLOATP (x) || INTEGERP (x), Qnumberp, x);
 }
 
-#define CHECK_NUMBER_OR_FLOAT_COERCE_MARKER(x) \
-  do { if (MARKERP (x)) XSETFASTINT (x, marker_position (x)); \
-    else CHECK_TYPE (INTEGERP (x) || FLOATP (x), Qnumber_or_marker_p, x); } 
while (0)
+#define CHECK_NUMBER_OR_FLOAT_COERCE_MARKER(x)                         \
+  do {                                                                 \
+    if (MARKERP (x))                                                   \
+      XSETFASTINT (x, marker_position (x));                            \
+    else                                                               \
+      CHECK_TYPE (INTEGERP (x) || FLOATP (x), Qnumber_or_marker_p, x); \
+  } while (false)
 
 /* Since we can't assign directly to the CAR or CDR fields of a cons
    cell, use these when checking that those fields contain numbers.  */
@@ -2701,34 +2714,34 @@
   do {                                         \
     static struct Lisp_Objfwd o_fwd;           \
     defvar_lisp (&o_fwd, lname, &globals.f_ ## vname);         \
-  } while (0)
+  } while (false)
 #define DEFVAR_LISP_NOPRO(lname, vname, doc)   \
   do {                                         \
     static struct Lisp_Objfwd o_fwd;           \
     defvar_lisp_nopro (&o_fwd, lname, &globals.f_ ## vname);   \
-  } while (0)
+  } while (false)
 #define DEFVAR_BOOL(lname, vname, doc)         \
   do {                                         \
     static struct Lisp_Boolfwd b_fwd;          \
     defvar_bool (&b_fwd, lname, &globals.f_ ## vname);         \
-  } while (0)
+  } while (false)
 #define DEFVAR_INT(lname, vname, doc)          \
   do {                                         \
     static struct Lisp_Intfwd i_fwd;           \
     defvar_int (&i_fwd, lname, &globals.f_ ## vname);          \
-  } while (0)
+  } while (false)
 
 #define DEFVAR_BUFFER_DEFAULTS(lname, vname, doc)              \
   do {                                                         \
     static struct Lisp_Objfwd o_fwd;                           \
     defvar_lisp_nopro (&o_fwd, lname, &BVAR (&buffer_defaults, vname));        
\
-  } while (0)
+  } while (false)
 
 #define DEFVAR_KBOARD(lname, vname, doc)                       \
   do {                                                         \
     static struct Lisp_Kboard_Objfwd ko_fwd;                   \
     defvar_kboard (&ko_fwd, lname, offsetof (KBOARD, vname ## _)); \
-  } while (0)
+  } while (false)
 
 /* Save and restore the instruction and environment pointers,
    without affecting the signal mask.  */
@@ -2812,7 +2825,7 @@
     } let;
     struct {
       ENUM_BF (specbind_tag) kind : CHAR_BIT;
-      unsigned debug_on_exit : 1;
+      bool_bf debug_on_exit : 1;
       Lisp_Object function;
       Lisp_Object *args;
       ptrdiff_t nargs;
@@ -2869,7 +2882,7 @@
 
   /* Most global vars are reset to their value via the specpdl mechanism,
      but a few others are handled by storing their value here.  */
-#if 1 /* GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS, but they're defined later.  */
+#if true /* GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS, but defined later.  */
   struct gcpro *gcpro;
 #endif
   sys_jmp_buf jmp;
@@ -2917,7 +2930,7 @@
    Unless that is impossible, of course.
    But it is very desirable to avoid creating loops where QUIT is impossible.
 
-   Exception: if you set immediate_quit to nonzero,
+   Exception: if you set immediate_quit to true,
    then the handler that responds to the C-g does the quit itself.
    This is a good thing to do around a loop that has no side effects
    and (in particular) cannot call arbitrary Lisp code.
@@ -2935,10 +2948,10 @@
       process_quit_flag ();                            \
     else if (pending_signals)                          \
       process_pending_signals ();                      \
-  } while (0)
-
-
-/* Nonzero if ought to quit now.  */
+  } while (false)
+
+
+/* True if ought to quit now.  */
 
 #define QUITP (!NILP (Vquit_flag) && NILP (Vinhibit_quit))
 
@@ -3121,9 +3134,9 @@
   gcprolist = &gcpro6; }
 
 #define UNGCPRO                                        \
- ((--gcpro_level != gcpro1.level)              \
-  ? (emacs_abort (), 0)                                \
-  : ((gcprolist = gcpro1.next), 0))
+  (--gcpro_level != gcpro1.level               \
+   ? emacs_abort ()                            \
+   : (void) (gcprolist = gcpro1.next))
 
 #endif /* DEBUG_GCPRO */
 #endif /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */
@@ -3131,14 +3144,14 @@
 
 /* Evaluate expr, UNGCPRO, and then return the value of expr.  */
 #define RETURN_UNGCPRO(expr)                   \
-do                                             \
+  do                                           \
     {                                          \
       Lisp_Object ret_ungc_val;                        \
       ret_ungc_val = (expr);                   \
       UNGCPRO;                                 \
       return ret_ungc_val;                     \
     }                                          \
-while (0)
+  while (false)
 
 /* Call staticpro (&var) to protect static variable `var'.  */
 
@@ -4390,13 +4403,13 @@
 extern void *record_xmalloc (size_t);
 
 #define USE_SAFE_ALLOCA                        \
-  ptrdiff_t sa_count = SPECPDL_INDEX (); bool sa_must_free = 0
+  ptrdiff_t sa_count = SPECPDL_INDEX (); bool sa_must_free = false
 
 /* SAFE_ALLOCA allocates a simple buffer.  */
 
 #define SAFE_ALLOCA(size) ((size) < MAX_ALLOCA \
                           ? alloca (size)      \
-                          : (sa_must_free = 1, record_xmalloc (size)))
+                          : (sa_must_free = true, record_xmalloc (size)))
 
 /* SAFE_NALLOCA sets BUF to a newly allocated array of MULTIPLIER *
    NITEMS items, each of the same type as *BUF.  MULTIPLIER must
@@ -4409,20 +4422,20 @@
     else                                                        \
       {                                                                 \
        (buf) = xnmalloc (nitems, sizeof *(buf) * (multiplier)); \
-       sa_must_free = 1;                                        \
+       sa_must_free = true;                                     \
        record_unwind_protect_ptr (xfree, buf);                  \
       }                                                                 \
-  } while (0)
+  } while (false)
 
 /* SAFE_FREE frees xmalloced memory and enables GC as needed.  */
 
 #define SAFE_FREE()                    \
   do {                                 \
     if (sa_must_free) {                        \
-      sa_must_free = 0;                        \
+      sa_must_free = false;            \
       unbind_to (sa_count, Qnil);      \
     }                                  \
-  } while (0)
+  } while (false)
 
 
 /* SAFE_ALLOCA_LISP allocates an array of Lisp_Objects.  */
@@ -4430,39 +4443,40 @@
 #define SAFE_ALLOCA_LISP(buf, nelt)                           \
   do {                                                        \
     if ((nelt) < MAX_ALLOCA / word_size)                      \
-      buf = alloca ((nelt) * word_size);                      \
+      (buf) = alloca ((nelt) * word_size);                    \
     else if ((nelt) < min (PTRDIFF_MAX, SIZE_MAX) / word_size) \
       {                                                               \
        Lisp_Object arg_;                                      \
-       buf = xmalloc ((nelt) * word_size);                    \
+       (buf) = xmalloc ((nelt) * word_size);                  \
        arg_ = make_save_memory (buf, nelt);                   \
-       sa_must_free = 1;                                      \
+       sa_must_free = true;                                   \
        record_unwind_protect (free_save_value, arg_);         \
       }                                                               \
     else                                                      \
       memory_full (SIZE_MAX);                                 \
-  } while (0)
+  } while (false)
 
 /* Loop over all tails of a list, checking for cycles.
    FIXME: Make tortoise and n internal declarations.
    FIXME: Unroll the loop body so we don't need `n'.  */
 #define FOR_EACH_TAIL(hare, list, tortoise, n) \
-  for (tortoise = hare = (list), n = true;                     \
+  for ((tortoise) = (hare) = (list), (n) = true;               \
        CONSP (hare);                                           \
-       (hare = XCDR (hare), n = !n,                            \
-       (n                                                      \
-        ? ((EQ (hare, tortoise)                                \
-            && (xsignal1 (Qcircular_list, (list)), 0)))        \
+       (hare = XCDR (hare), (n) = !(n),                                \
+       ((n)                                                    \
+        ? (EQ (hare, tortoise)                                 \
+           ? xsignal1 (Qcircular_list, list)                   \
+           : (void) 0)                                         \
         /* Move tortoise before the next iteration, in case */ \
         /* the next iteration does an Fsetcdr.  */             \
-        : (tortoise = XCDR (tortoise), 0))))
+        : (void) ((tortoise) = XCDR (tortoise)))))
 
 /* Do a `for' loop over alist values.  */
 
 #define FOR_EACH_ALIST_VALUE(head_var, list_var, value_var)            \
-  for (list_var = head_var;                                            \
-       (CONSP (list_var) && (value_var = XCDR (XCAR (list_var)), 1));  \
-       list_var = XCDR (list_var))
+  for ((list_var) = (head_var);                                                
\
+       (CONSP (list_var) && ((value_var) = XCDR (XCAR (list_var)), true)); \
+       (list_var) = XCDR (list_var))
 
 /* Check whether it's time for GC, and run it if so.  */
 
@@ -4498,14 +4512,14 @@
   if (SUBRP (object))
     return XSUBR (object)->max_args != UNEVALLED;
   else if (COMPILEDP (object))
-    return 1;
+    return true;
   else if (CONSP (object))
     {
       Lisp_Object car = XCAR (object);
       return EQ (car, Qlambda) || EQ (car, Qclosure);
     }
   else
-    return 0;
+    return false;
 }
 
 INLINE_HEADER_END

=== modified file 'src/macfont.m'
--- a/src/macfont.m     2013-12-13 15:55:23 +0000
+++ b/src/macfont.m     2013-12-14 21:36:44 +0000
@@ -95,11 +95,11 @@
   struct macfont_cache *cache;
   struct macfont_metrics **metrics;
   short metrics_nrows;
-  unsigned synthetic_italic_p : 1;
-  unsigned synthetic_bold_p : 1;
+  bool_bf synthetic_italic_p : 1;
+  bool_bf synthetic_bold_p : 1;
   unsigned spacing : 2;
   unsigned antialias : 2;
-  unsigned color_bitmap_p : 1;
+  bool_bf color_bitmap_p : 1;
 };
 
 /* Values for the `spacing' member in `struct macfont_info'.  */

=== modified file 'src/process.h'
--- a/src/process.h     2013-10-17 06:42:21 +0000
+++ b/src/process.h     2013-12-14 21:36:44 +0000
@@ -138,23 +138,23 @@
        0 = nil, 1 = t, 2 = other.  */
     unsigned int adaptive_read_buffering : 2;
     /* Skip reading this process on next read.  */
-    unsigned int read_output_skip : 1;
-    /* Non-nil means kill silently if Emacs is exited.
+    bool_bf read_output_skip : 1;
+    /* True means kill silently if Emacs is exited.
        This is the inverse of the `query-on-exit' flag.  */
-    unsigned int kill_without_query : 1;
-    /* Non-nil if communicating through a pty.  */
-    unsigned int pty_flag : 1;
+    bool_bf kill_without_query : 1;
+    /* True if communicating through a pty.  */
+    bool_bf pty_flag : 1;
     /* Flag to set coding-system of the process buffer from the
        coding_system used to decode process output.  */
-    unsigned int inherit_coding_system_flag : 1;
+    bool_bf inherit_coding_system_flag : 1;
     /* Whether the process is alive, i.e., can be waited for.  Running
        processes can be waited for, but exited and fake processes cannot.  */
-    unsigned int alive : 1;
+    bool_bf alive : 1;
     /* Record the process status in the raw form in which it comes from `wait'.
        This is to avoid consing in a signal handler.  The `raw_status_new'
        flag indicates that `raw_status' contains a new status that still
        needs to be synced to `status'.  */
-    unsigned int raw_status_new : 1;
+    bool_bf raw_status_new : 1;
     int raw_status;
 
 #ifdef HAVE_GNUTLS
@@ -164,7 +164,7 @@
     gnutls_anon_client_credentials_t gnutls_anon_cred;
     int gnutls_log_level;
     int gnutls_handshakes_tried;
-    unsigned int gnutls_p : 1;
+    bool_bf gnutls_p : 1;
 #endif
 };
 

=== modified file 'src/region-cache.c'
--- a/src/region-cache.c        2013-03-15 07:23:49 +0000
+++ b/src/region-cache.c        2013-12-14 21:36:44 +0000
@@ -716,8 +716,9 @@
    value is known, for the purposes of CACHE, and return zero
    otherwise.  If NEXT is non-zero, set *NEXT to the nearest
    position before POS where the knowledge changes.  */
-int region_cache_backward (struct buffer *buf, struct region_cache *c,
-                          ptrdiff_t pos, ptrdiff_t *next)
+int
+region_cache_backward (struct buffer *buf, struct region_cache *c,
+                      ptrdiff_t pos, ptrdiff_t *next)
 {
   revalidate_region_cache (buf, c);
 

=== modified file 'src/region-cache.h'
--- a/src/region-cache.h        2013-02-11 23:37:18 +0000
+++ b/src/region-cache.h        2013-12-14 21:36:44 +0000
@@ -89,24 +89,19 @@
 /* The scanning functions.
 
    Basically, if you're scanning forward/backward from position POS,
-   and region_cache_forward/backward returns true, you can skip all
-   the text between POS and *NEXT.  And if the function returns false,
+   and region_cache_forward/backward returns nonzero, you can skip all
+   the text between POS and *NEXT.  And if the function returns zero,
    you should examine all the text from POS to *NEXT, and call
    know_region_cache depending on what you find there; this way, you
    might be able to avoid scanning it again.  */
 
-/* Return true if the text immediately after POS in BUF is known, for
-   the purposes of CACHE.  If NEXT is non-zero, set *NEXT to the nearest
+/* Return the value for the text immediately after POS in BUF if the value
+   is known, for the purposes of CACHE, and return zero otherwise.
+   If NEXT is non-zero, set *NEXT to the nearest
    position after POS where the knowledge changes.  */
-extern int region_cache_forward (struct buffer *BUF,
-                                 struct region_cache *CACHE,
-                                 ptrdiff_t POS,
-                                 ptrdiff_t *NEXT);
+extern int region_cache_forward (struct buffer *buf, struct region_cache *c,
+                                ptrdiff_t pos, ptrdiff_t *next);
 
-/* Return true if the text immediately before POS in BUF is known, for
-   the purposes of CACHE.  If NEXT is non-zero, set *NEXT to the nearest
-   position before POS where the knowledge changes.  */
-extern int region_cache_backward (struct buffer *BUF,
-                                  struct region_cache *CACHE,
-                                  ptrdiff_t POS,
-                                  ptrdiff_t *NEXT);
+/* Likewise, except before POS rather than after POS.  */
+extern int region_cache_backward (struct buffer *buf, struct region_cache *c,
+                                 ptrdiff_t pos, ptrdiff_t *next);

=== modified file 'src/syntax.h'
--- a/src/syntax.h      2013-09-22 06:22:05 +0000
+++ b/src/syntax.h      2013-12-14 21:36:44 +0000
@@ -99,7 +99,7 @@
 INLINE Lisp_Object
 SYNTAX_ENTRY (int c)
 {
-  return syntax_property_entry (c, 0);
+  return syntax_property_entry (c, false);
 }
 
 /* Extract the information from the entry for character C
@@ -114,7 +114,7 @@
 INLINE int
 SYNTAX_WITH_FLAGS (int c)
 {
-  return syntax_property_with_flags (c, 0);
+  return syntax_property_with_flags (c, false);
 }
 
 INLINE enum syntaxcode
@@ -125,7 +125,7 @@
 INLINE enum syntaxcode
 SYNTAX (int c)
 {
-  return syntax_property (c, 0);
+  return syntax_property (c, false);
 }
 
 
@@ -146,7 +146,8 @@
    for the object recorded in gl_state with SETUP_SYNTAX_TABLE_FOR_OBJECT.
 
    The value is meant for use in code that does nothing when
-   parse_sexp_lookup_properties is 0, so return 0 in that case, for speed.  */
+   parse_sexp_lookup_properties is false, so return 0 in that case,
+   for speed.  */
 
 INLINE ptrdiff_t
 SYNTAX_TABLE_BYTE_TO_CHAR (ptrdiff_t bytepos)
@@ -172,7 +173,7 @@
 UPDATE_SYNTAX_TABLE_FORWARD (ptrdiff_t charpos)
 {
   if (parse_sexp_lookup_properties && charpos >= gl_state.e_property)
-    update_syntax_table (charpos + gl_state.offset, 1, 0, gl_state.object);
+    update_syntax_table (charpos + gl_state.offset, 1, false, gl_state.object);
 }
 
 /* Make syntax table state (gl_state) good for CHARPOS, assuming it is
@@ -182,7 +183,7 @@
 UPDATE_SYNTAX_TABLE_BACKWARD (ptrdiff_t charpos)
 {
   if (parse_sexp_lookup_properties && charpos < gl_state.b_property)
-    update_syntax_table (charpos + gl_state.offset, -1, 0, gl_state.object);
+    update_syntax_table (charpos + gl_state.offset, -1, false, 
gl_state.object);
 }
 
 /* Make syntax table good for CHARPOS.  */
@@ -199,7 +200,7 @@
 INLINE void
 SETUP_BUFFER_SYNTAX_TABLE (void)
 {
-  gl_state.use_global = 0;
+  gl_state.use_global = false;
   gl_state.current_syntax_table = BVAR (current_buffer, syntax_table);
 }
 

=== modified file 'src/syssignal.h'
--- a/src/syssignal.h   2013-06-05 17:04:13 +0000
+++ b/src/syssignal.h   2013-12-14 21:36:44 +0000
@@ -18,7 +18,6 @@
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <signal.h>
-#include <stdbool.h>
 
 extern void init_signals (bool);
 

=== modified file 'src/systime.h'
--- a/src/systime.h     2013-09-20 15:34:36 +0000
+++ b/src/systime.h     2013-12-14 21:36:44 +0000
@@ -57,10 +57,10 @@
   return make_timespec (0, -1);
 }
 
-/* Return 1 if TIME is a valid timespec.  This currently doesn't worry
+/* Return true if TIME is a valid timespec.  This currently doesn't worry
    about whether tv_nsec is less than TIMESPEC_RESOLUTION; leap seconds
    might cause a problem if it did.  */
-INLINE int
+INLINE bool
 timespec_valid_p (struct timespec t)
 {
   return t.tv_nsec >= 0;

=== modified file 'src/syswait.h'
--- a/src/syswait.h     2013-08-12 07:12:07 +0000
+++ b/src/syswait.h     2013-12-14 21:36:44 +0000
@@ -23,7 +23,6 @@
 #ifndef EMACS_SYSWAIT_H
 #define EMACS_SYSWAIT_H
 
-#include <stdbool.h>
 #include <sys/types.h>
 
 #ifdef HAVE_SYS_WAIT_H /* We have sys/wait.h with POSIXoid definitions. */

=== modified file 'src/term.c'
--- a/src/term.c        2013-12-11 15:06:04 +0000
+++ b/src/term.c        2013-12-14 21:36:44 +0000
@@ -3027,7 +3027,7 @@
       /* Make sure every row is enabled, or else update_frame will not
         redraw them.  (Rows that are identical to what is already on
         screen will not be redrawn anyway.)  */
-      to->enabled_p = 1;
+      to->enabled_p = true;
       to->hash = from->hash;
     }
 

=== modified file 'src/termchar.h'
--- a/src/termchar.h    2013-10-14 12:19:21 +0000
+++ b/src/termchar.h    2013-12-14 21:36:44 +0000
@@ -54,7 +54,8 @@
 
   struct emacs_tty *old_tty;    /* The initial tty mode bits */
 
-  unsigned term_initted : 1;    /* 1 if we have been through init_sys_modes. */
+  bool_bf term_initted : 1;    /* True if we have been through
+                                  init_sys_modes. */
 
   int reference_count;          /* Number of frames that are on this display. 
*/
 
@@ -166,12 +167,12 @@
 
   int RPov;                     /* # chars to start a TS_repeat */
 
-  unsigned delete_in_insert_mode : 1;    /* delete mode == insert mode */
-
-  unsigned costs_set : 1;       /* Nonzero if costs have been calculated. */
-
-  unsigned insert_mode : 1;     /* Nonzero when in insert mode.  */
-  unsigned standout_mode : 1;   /* Nonzero when in standout mode.  */
+  bool_bf delete_in_insert_mode : 1;    /* delete mode == insert mode */
+
+  bool_bf costs_set : 1;       /* True if costs have been calculated. */
+
+  bool_bf insert_mode : 1;     /* True when in insert mode.  */
+  bool_bf standout_mode : 1;   /* True when in standout mode.  */
 
   /* 1 if should obey 0200 bit in input chars as "Meta", 2 if should
      keep 0200 bit in input chars.  0 to ignore the 0200 bit.  */
@@ -189,33 +190,33 @@
 
   /* Flag used in tty_show/hide_cursor.  */
 
-  unsigned cursor_hidden : 1;
-
-  /* Nonzero means use ^S/^Q for flow control.  */
-
-  unsigned flow_control : 1;
-
-  /* Non-zero means we are displaying a TTY menu on this tty.  */
-  unsigned showing_menu : 1;
-
-  /* Nonzero means spaces in the text must actually be output;
+  bool_bf cursor_hidden : 1;
+
+  /* True means use ^S/^Q for flow control.  */
+
+  bool_bf flow_control : 1;
+
+  /* True means we are displaying a TTY menu on this tty.  */
+  bool_bf showing_menu : 1;
+
+  /* True means spaces in the text must actually be output;
      can't just skip over some columns to leave them blank.  */
-  unsigned must_write_spaces : 1;
-
-  /* Nonzero if TTY can insert and delete lines.  */
-  unsigned line_ins_del_ok : 1;
-
-  /* Nonzero if TTY can insert and delete chars.  */
-  unsigned char_ins_del_ok : 1;
-
-  /* Nonzero if TTY supports setting the scroll window.  */
-  unsigned scroll_region_ok : 1;
-
-  /* Nonzero if TTY remembers lines scrolled off bottom.  */
-  unsigned memory_below_frame : 1;
+  bool_bf must_write_spaces : 1;
+
+  /* True if TTY can insert and delete lines.  */
+  bool_bf line_ins_del_ok : 1;
+
+  /* True if TTY can insert and delete chars.  */
+  bool_bf char_ins_del_ok : 1;
+
+  /* True if TTY supports setting the scroll window.  */
+  bool_bf scroll_region_ok : 1;
+
+  /* True if TTY remembers lines scrolled off bottom.  */
+  bool_bf memory_below_frame : 1;
 
   /* Cost of setting the scroll window, measured in characters.  */
-  int scroll_region_cost;      
+  int scroll_region_cost;
 };
 
 /* A chain of structures for all tty devices currently in use. */

=== modified file 'src/unexelf.c'
--- a/src/unexelf.c     2013-07-12 02:03:47 +0000
+++ b/src/unexelf.c     2013-12-14 21:36:44 +0000
@@ -393,7 +393,6 @@
 #include <fcntl.h>
 #include <limits.h>
 #include <memory.h>
-#include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <sys/stat.h>

=== modified file 'src/window.h'
--- a/src/window.h      2013-11-30 09:25:31 +0000
+++ b/src/window.h      2013-12-14 21:36:44 +0000
@@ -287,78 +287,78 @@
     int header_line_height;
 
     /* Z - the buffer position of the last glyph in the current
-       matrix of W.  Only valid if window_end_valid is nonzero.  */
+       matrix of W.  Only valid if window_end_valid is true.  */
     ptrdiff_t window_end_pos;
 
     /* Glyph matrix row of the last glyph in the current matrix
-       of W.  Only valid if window_end_valid is nonzero.  */
+       of W.  Only valid if window_end_valid is true.  */
     int window_end_vpos;
 
-    /* Non-zero if this window is a minibuffer window.  */
-    unsigned mini : 1;
+    /* True if this window is a minibuffer window.  */
+    bool_bf mini : 1;
 
     /* Meaningful only if contents is a window, non-zero if this
        internal window is used in horizontal combination.  */
-    unsigned horizontal : 1;
-
-    /* Non-zero means must regenerate mode line of this window.  */
-    unsigned update_mode_line : 1;
-
-    /* Non-nil if the buffer was "modified" when the window
+    bool_bf horizontal : 1;
+
+    /* True means must regenerate mode line of this window.  */
+    bool_bf update_mode_line : 1;
+
+    /* True if the buffer was "modified" when the window
        was last updated.  */
-    unsigned last_had_star : 1;
+    bool_bf last_had_star : 1;
 
-    /* Non-zero means current value of `start'
+    /* True means current value of `start'
        was the beginning of a line when it was chosen.  */
-    unsigned start_at_line_beg : 1;
+    bool_bf start_at_line_beg : 1;
 
-    /* Non-zero means next redisplay must use the value of start
+    /* True means next redisplay must use the value of start
        set up for it in advance.  Set by scrolling commands.  */
-    unsigned force_start : 1;
+    bool_bf force_start : 1;
 
-    /* Non-zero means we have explicitly changed the value of start,
+    /* True means we have explicitly changed the value of start,
        but that the next redisplay is not obliged to use the new value.
        This is used in Fdelete_other_windows to force a call to
        Vwindow_scroll_functions; also by Frecenter with argument.  */
-    unsigned optional_new_start : 1;
+    bool_bf optional_new_start : 1;
 
-    /* Non-zero means the cursor is currently displayed.  This can be
+    /* True means the cursor is currently displayed.  This can be
        set to zero by functions overpainting the cursor image.  */
-    unsigned phys_cursor_on_p : 1;
+    bool_bf phys_cursor_on_p : 1;
 
-    /* 0 means cursor is logically on, 1 means it's off.  Used for
+    /* False means cursor is logically on, true means it's off.  Used for
        blinking cursor.  */
-    unsigned cursor_off_p : 1;
+    bool_bf cursor_off_p : 1;
 
     /* Value of cursor_off_p as of the last redisplay.  */
-    unsigned last_cursor_off_p : 1;
+    bool_bf last_cursor_off_p : 1;
 
-    /* 1 means desired matrix has been build and window must be
+    /* True means desired matrix has been build and window must be
        updated in update_frame.  */
-    unsigned must_be_updated_p : 1;
+    bool_bf must_be_updated_p : 1;
 
     /* Flag indicating that this window is not a real one.
        Currently only used for menu bar windows of frames.  */
-    unsigned pseudo_window_p : 1;
+    bool_bf pseudo_window_p : 1;
 
-    /* Non-zero means fringes are drawn outside display margins.
+    /* True means fringes are drawn outside display margins.
        Otherwise draw them between margin areas and text.  */
-    unsigned fringes_outside_margins : 1;
+    bool_bf fringes_outside_margins : 1;
 
-    /* Nonzero if window_end_pos and window_end_vpos are truly valid.
-       This is zero if nontrivial redisplay is preempted since in that case
+    /* True if window_end_pos and window_end_vpos are truly valid.
+       This is false if nontrivial redisplay is preempted since in that case
        the frame image that window_end_pos did not get onto the frame.  */
-    unsigned window_end_valid : 1;
+    bool_bf window_end_valid : 1;
 
     /* True if it needs to be redisplayed.  */
-    unsigned redisplay : 1;
+    bool_bf redisplay : 1;
 
     /* Amount by which lines of this window are scrolled in
        y-direction (smooth scrolling).  */
     int vscroll;
 
     /* Z_BYTE - buffer position of the last glyph in the current matrix of W.
-       Should be nonnegative, and only valid if window_end_valid is nonzero.  
*/
+       Should be nonnegative, and only valid if window_end_valid is true.  */
     ptrdiff_t window_end_bytepos;
   };
 
@@ -412,7 +412,7 @@
   w->next_buffers = val;
 }
 
-/* 1 if W is a minibuffer window.  */
+/* True if W is a minibuffer window.  */
 
 #define MINI_WINDOW_P(W)       ((W)->mini)
 
@@ -443,17 +443,17 @@
 
 /* A handy macro.  */
 
-/* Non-zero if W is leaf (carry the buffer).  */
+/* Non-nil if W is leaf (carry the buffer).  */
 
 #define WINDOW_LEAF_P(W) \
   (BUFFERP ((W)->contents))
 
-/* Non-zero if W is a member of horizontal combination.  */
+/* True if W is a member of horizontal combination.  */
 
 #define WINDOW_HORIZONTAL_COMBINATION_P(W) \
   (WINDOWP ((W)->contents) && (W)->horizontal)
 
-/* Non-zero if W is a member of vertical combination.  */
+/* True if W is a member of vertical combination.  */
 
 #define WINDOW_VERTICAL_COMBINATION_P(W) \
   (WINDOWP ((W)->contents) && !(W)->horizontal)
@@ -563,7 +563,7 @@
   (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
    + WINDOW_RIGHT_PIXEL_EDGE (W))
 
-/* 1 if W is a menu bar window.  */
+/* True if W is a menu bar window.  */
 
 #if defined (HAVE_X_WINDOWS) && ! defined (USE_X_TOOLKIT) && ! defined 
(USE_GTK)
 #define WINDOW_MENU_BAR_P(W) \
@@ -571,16 +571,16 @@
    && (W) == XWINDOW (WINDOW_XFRAME (W)->menu_bar_window))
 #else
 /* No menu bar windows if X toolkit is in use.  */
-#define WINDOW_MENU_BAR_P(W) (0)
+#define WINDOW_MENU_BAR_P(W) false
 #endif
 
-/* 1 if W is a tool bar window.  */
+/* True if W is a tool bar window.  */
 #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
 #define WINDOW_TOOL_BAR_P(W) \
   (WINDOWP (WINDOW_XFRAME (W)->tool_bar_window) \
    && (W) == XWINDOW (WINDOW_XFRAME (W)->tool_bar_window))
 #else
-#define WINDOW_TOOL_BAR_P(W) (0)
+#define WINDOW_TOOL_BAR_P(W) false
 #endif
 
 /* Return the frame y-position at which window W starts.
@@ -600,24 +600,24 @@
     ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \
    + WINDOW_BOTTOM_PIXEL_EDGE (W))
 
-/* 1 if window W takes up the full width of its frame.  */
+/* True if window W takes up the full width of its frame.  */
 #define WINDOW_FULL_WIDTH_P(W)                                 \
   (WINDOW_PIXEL_WIDTH (W)                                      \
    == (WINDOW_PIXEL_WIDTH                                      \
        (XWINDOW (FRAME_ROOT_WINDOW (WINDOW_XFRAME (W))))))     \
 
-/* 1 if window W's has no other windows to its left in its frame.  */
+/* True if window W's has no other windows to its left in its frame.  */
 
 #define WINDOW_LEFTMOST_P(W) \
   (WINDOW_LEFT_PIXEL_EDGE (W) == 0)
 
-/* 1 if window W's has no other windows to its right in its frame.  */
+/* True if window W's has no other windows to its right in its frame.  */
 #define WINDOW_RIGHTMOST_P(W)                                  \
   (WINDOW_RIGHT_PIXEL_EDGE (W)                                 \
    == (WINDOW_RIGHT_PIXEL_EDGE                                 \
        (XWINDOW (FRAME_ROOT_WINDOW (WINDOW_XFRAME (W))))))     \
 
-/* 1 if window W's has no other windows below it in its frame
+/* True if window W's has no other windows below it in its frame
    (the minibuffer window is not counted in this respect).  */
 #define WINDOW_BOTTOMMOST_P(W)                                 \
   (WINDOW_BOTTOM_PIXEL_EDGE (W)                                        \
@@ -882,7 +882,7 @@
 #define WINDOW_TEXT_TO_FRAME_PIXEL_X(W, X)     \
   (window_box_left ((W), TEXT_AREA) + (X))
 
-/* Nonzero if the background of the window W's fringe that is adjacent to
+/* True if the background of the window W's fringe that is adjacent to
    a scroll bar is extended to the gap between the fringe and the bar.  */
 
 #define WINDOW_FRINGE_EXTENDED_P(w)                    \

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2013-12-14 19:32:50 +0000
+++ b/src/xdisp.c       2013-12-14 21:36:44 +0000
@@ -984,7 +984,7 @@
 
 static void produce_special_glyphs (struct it *, enum display_element_type);
 static void show_mouse_face (Mouse_HLInfo *, enum draw_glyphs_face);
-static int coords_in_mouse_face_p (struct window *, int, int);
+static bool coords_in_mouse_face_p (struct window *, int, int);
 
 
 
@@ -9469,9 +9469,9 @@
     }
 }
 
-/* Return 1 if IT points into the middle of a display vector.  */
+/* Return true if IT points into the middle of a display vector.  */
 
-int
+bool
 in_display_vector_p (struct it *it)
 {
   return (it->method == GET_FROM_DISPLAY_VECTOR
@@ -11939,7 +11939,7 @@
 
   /* Don't extend on a previously drawn tool bar items (Bug#16058).  */
   clear_glyph_row (row);
-  row->enabled_p = 1;
+  row->enabled_p = true;
   row->y = it->current_y;
 
   /* Note that this isn't made use of if the face hasn't a box,
@@ -12771,7 +12771,7 @@
 static ptrdiff_t debug_end_vpos;
 
 /* Append a string to W->desired_matrix->method.  FMT is a printf
-   format string.  If trace_redisplay_p is non-zero also printf the
+   format string.  If trace_redisplay_p is true also printf the
    resulting string to stderr.  */
 
 static void debug_method_add (struct window *, char const *, ...)
@@ -13556,7 +13556,7 @@
 
     cancel:
       /* Text changed drastically or point moved off of line.  */
-      SET_MATRIX_ROW_ENABLED_P (w->desired_matrix, this_line_vpos, 0);
+      SET_MATRIX_ROW_ENABLED_P (w->desired_matrix, this_line_vpos, false);
     }
 
   CHARPOS (this_line_start_pos) = 0;
@@ -16742,7 +16742,7 @@
 
          /* Disable lines that must be updated.  */
          for (i = 0; i < nrows_scrolled; ++i)
-           (start_row + i)->enabled_p = 0;
+           (start_row + i)->enabled_p = false;
 
          /* Re-compute Y positions.  */
          min_y = WINDOW_HEADER_LINE_HEIGHT (w);
@@ -16922,7 +16922,7 @@
 
       /* Disable rows not reused.  */
       for (row -= nrows_scrolled; row < bottom_row; ++row)
-       row->enabled_p = 0;
+       row->enabled_p = false;
 
       /* Point may have moved to a different line, so we cannot assume that
         the previous cursor position is valid; locate the correct row.  */
@@ -17207,7 +17207,7 @@
       /* Disable frame rows whose corresponding window rows have
         been disabled in try_window_id.  */
       if (!window_row->enabled_p)
-       frame_row->enabled_p = 0;
+       frame_row->enabled_p = false;
 
       ++window_row, ++frame_row;
     }
@@ -17950,7 +17950,7 @@
             the current matrix?  I don't think so, so we mark rows
             displayed invalid in the current matrix by setting their
             enabled_p flag to zero.  */
-         MATRIX_ROW (w->current_matrix, it.vpos)->enabled_p = 0;
+         SET_MATRIX_ROW_ENABLED_P (w->current_matrix, it.vpos, false);
          if (display_line (&it))
            last_text_row_at_end = it.glyph_row - 1;
        }
@@ -20773,7 +20773,7 @@
     {
       struct glyph_row *row = it.glyph_row + i;
       clear_glyph_row (row);
-      row->enabled_p = 1;
+      row->enabled_p = true;
       row->full_width_p = 1;
     }
 
@@ -20883,7 +20883,7 @@
   row->full_width_p = 1;
   saved_reversed = row->reversed_p;
   row->reversed_p = 0;
-  row->enabled_p = 1;
+  row->enabled_p = true;
 
   /* Arrange for the menu item glyphs to start at (X,Y) and have the
      desired face.  */
@@ -21049,7 +21049,7 @@
   init_iterator (&it, w, -1, -1, NULL, face_id);
   /* Don't extend on a previously drawn mode-line.
      This may happen if called from pos_visible_p.  */
-  it.glyph_row->enabled_p = 0;
+  it.glyph_row->enabled_p = false;
   prepare_desired_row (it.glyph_row);
 
   it.glyph_row->mode_line_p = 1;
@@ -27088,9 +27088,9 @@
   return cleared;
 }
 
-/* Return non-zero if the coordinates HPOS and VPOS on windows W are
+/* Return true if the coordinates HPOS and VPOS on windows W are
    within the mouse face on that window.  */
-static int
+static bool
 coords_in_mouse_face_p (struct window *w, int hpos, int vpos)
 {
   Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
@@ -27098,48 +27098,48 @@
   /* Quickly resolve the easy cases.  */
   if (!(WINDOWP (hlinfo->mouse_face_window)
        && XWINDOW (hlinfo->mouse_face_window) == w))
-    return 0;
+    return false;
   if (vpos < hlinfo->mouse_face_beg_row
       || vpos > hlinfo->mouse_face_end_row)
-    return 0;
+    return false;
   if (vpos > hlinfo->mouse_face_beg_row
       && vpos < hlinfo->mouse_face_end_row)
-    return 1;
+    return true;
 
   if (!MATRIX_ROW (w->current_matrix, vpos)->reversed_p)
     {
       if (hlinfo->mouse_face_beg_row == hlinfo->mouse_face_end_row)
        {
          if (hlinfo->mouse_face_beg_col <= hpos && hpos < 
hlinfo->mouse_face_end_col)
-           return 1;
+           return true;
        }
       else if ((vpos == hlinfo->mouse_face_beg_row
                && hpos >= hlinfo->mouse_face_beg_col)
               || (vpos == hlinfo->mouse_face_end_row
                   && hpos < hlinfo->mouse_face_end_col))
-       return 1;
+       return true;
     }
   else
     {
        if (hlinfo->mouse_face_beg_row == hlinfo->mouse_face_end_row)
        {
          if (hlinfo->mouse_face_end_col < hpos && hpos <= 
hlinfo->mouse_face_beg_col)
-           return 1;
+           return true;
        }
       else if ((vpos == hlinfo->mouse_face_beg_row
                && hpos <= hlinfo->mouse_face_beg_col)
               || (vpos == hlinfo->mouse_face_end_row
                   && hpos > hlinfo->mouse_face_end_col))
-       return 1;
+       return true;
     }
-  return 0;
+  return false;
 }
 
 
 /* EXPORT:
-   Non-zero if physical cursor of window W is within mouse face.  */
+   True if physical cursor of window W is within mouse face.  */
 
-int
+bool
 cursor_in_mouse_face_p (struct window *w)
 {
   int hpos = w->phys_cursor.hpos;

=== modified file 'src/xmenu.c'
--- a/src/xmenu.c       2013-12-07 23:04:10 +0000
+++ b/src/xmenu.c       2013-12-14 21:36:44 +0000
@@ -1647,7 +1647,7 @@
 #endif
 
       wv_title->name = SSDATA (title);
-      wv_title->enabled = TRUE;
+      wv_title->enabled = true;
       wv_title->button_type = BUTTON_TYPE_NONE;
       wv_title->help = Qnil;
       wv_title->next = wv_sep1;

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2013-12-12 04:04:35 +0000
+++ b/src/xterm.c       2013-12-14 21:36:44 +0000
@@ -133,9 +133,9 @@
 
 /* Default to using XIM if available.  */
 #ifdef USE_XIM
-int use_xim = 1;
+bool use_xim = true;
 #else
-int use_xim = 0;  /* configure --without-xim */
+bool use_xim = false;  /* configure --without-xim */
 #endif
 
 /* Non-zero means that a HELP_EVENT has been generated since Emacs
@@ -6172,7 +6172,7 @@
 #ifdef USE_GTK
           /* Don't pass keys to GTK.  A Tab will shift focus to the
              tool bar in GTK 2.4.  Keys will still go to menus and
-             dialogs because in that case popup_activated is TRUE
+             dialogs because in that case popup_activated is nonzero
              (see above).  */
           *finish = X_EVENT_DROP;
 #endif
@@ -10092,12 +10092,12 @@
     if (STRINGP (value)
        && (!strcmp (SSDATA (value), "false")
            || !strcmp (SSDATA (value), "off")))
-      use_xim = 0;
+      use_xim = false;
 #else
     if (STRINGP (value)
        && (!strcmp (SSDATA (value), "true")
            || !strcmp (SSDATA (value), "on")))
-      use_xim = 1;
+      use_xim = true;
 #endif
   }
 

=== modified file 'src/xterm.h'
--- a/src/xterm.h       2013-12-07 23:04:10 +0000
+++ b/src/xterm.h       2013-12-14 21:36:44 +0000
@@ -50,7 +50,7 @@
 #define XtParent(x) (gtk_widget_get_parent (x))
 #undef XSync
 #define XSync(d, b) do { gdk_window_process_all_updates (); \
-                         XSync (d, b);  } while (0)
+                         XSync (d, b);  } while (false)
 #endif /* USE_GTK */
 
 /* True iff GTK's version is at least I.J.K.  */
@@ -62,7 +62,7 @@
                             < GTK_MINOR_VERSION + ((k) \
                                                    <= GTK_MICRO_VERSION)))
 # else
-#  define GTK_CHECK_VERSION(i, j, k) 0
+#  define GTK_CHECK_VERSION(i, j, k) false
 # endif
 #endif
 
@@ -115,7 +115,7 @@
 struct x_bitmap_record
 {
   Pixmap pixmap;
-  int have_mask;
+  bool have_mask;
   Pixmap mask;
   char *file;
   int refcount;
@@ -400,7 +400,7 @@
 
 #ifdef HAVE_X_I18N
 /* Whether or not to use XIM if we have it.  */
-extern int use_xim;
+extern bool use_xim;
 #endif
 
 /* This is a chain of structures for all the X displays currently in use.  */
@@ -488,9 +488,9 @@
 /* The handle box that makes the tool bar detachable.  */
   GtkWidget *handlebox_widget;
 #endif
-  /* Non-zero if tool bar is packed into the hbox widget (i.e. vertical).  */
-  bool toolbar_in_hbox;
-  bool toolbar_is_packed;
+  /* True if tool bar is packed into the hbox widget (i.e. vertical).  */
+  bool_bf toolbar_in_hbox : 1;
+  bool_bf toolbar_is_packed : 1;
 
   /* The last size hints set.  */
   GdkGeometry size_hints;
@@ -551,9 +551,6 @@
      mapped to display an hourglass cursor.  */
   Window hourglass_window;
 
-  /* Non-zero means hourglass cursor is currently displayed.  */
-  unsigned hourglass_p : 1;
-
   /* These are the current window manager hints.  It seems that
      XSetWMHints, when presented with an unset bit in the `flags'
      member of the hints structure, does not leave the corresponding
@@ -579,15 +576,28 @@
   int id;
 #endif
 
-  /* Nonzero means our parent is another application's window
+  /* True means hourglass cursor is currently displayed.  */
+  bool_bf hourglass_p : 1;
+
+  /* True means our parent is another application's window
      and was explicitly specified.  */
-  unsigned explicit_parent : 1;
-
-  /* Nonzero means tried already to make this frame visible.  */
-  unsigned asked_for_visible : 1;
-
-  /* Nonzero if this frame was ever previously visible.  */
-  unsigned has_been_visible : 1;
+  bool_bf explicit_parent : 1;
+
+  /* True means tried already to make this frame visible.  */
+  bool_bf asked_for_visible : 1;
+
+  /* True if this frame was ever previously visible.  */
+  bool_bf has_been_visible : 1;
+
+  /* Xt waits for a ConfigureNotify event from the window manager in
+     EmacsFrameSetCharSize when the shell widget is resized.  For some
+     window managers like fvwm2 2.2.5 and KDE 2.1 this event doesn't
+     arrive for an unknown reason and Emacs hangs in Xt.  If this is
+     false, tell Xt not to wait.  */
+  bool_bf wait_for_wm : 1;
+
+  /* True if _NET_WM_STATE_HIDDEN is set for this frame.  */
+  bool_bf net_wm_state_hidden_seen : 1;
 
 #ifdef HAVE_X_I18N
   /* Input context (currently, this means Compose key handler setup).  */
@@ -608,13 +618,6 @@
      They are changed only when a different background is involved.  */
   unsigned long relief_background;
 
-  /* Xt waits for a ConfigureNotify event from the window manager in
-     EmacsFrameSetCharSize when the shell widget is resized.  For some
-     window managers like fvwm2 2.2.5 and KDE 2.1 this event doesn't
-     arrive for an unknown reason and Emacs hangs in Xt.  If this is
-     zero, tell Xt not to wait.  */
-  int wait_for_wm;
-
   /* As x_pixels_diff, but to FRAME_OUTER_WINDOW.  For some reason the
      two might differ by a pixel, depending on WM */
   int x_pixels_outer_diff;
@@ -632,9 +635,6 @@
   /* The offset we need to add to compensate for type A WMs.  */
   int move_offset_top;
   int move_offset_left;
-
-  /* Non-zero if _NET_WM_STATE_HIDDEN is set for this frame.  */
-  unsigned net_wm_state_hidden_seen : 1;
 };
 
 #define No_Cursor (None)
@@ -827,7 +827,7 @@
   do {                                         \
     Window window = XtWindow (w);              \
     ptr->x_window = window;                    \
-} while (0)
+  } while (false)
 
 #endif /* USE_X_TOOLKIT */
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]