Use bool for boolean.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 3 Dec 2013 22:36:49 +0000 (14:36 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 3 Dec 2013 22:36:49 +0000 (14:36 -0800)
* tparam.c (tparam1):
* undo.c (record_point, record_property_change):
Use bool for boolean, for local vars that are always true or false.

src/ChangeLog
src/tparam.c
src/undo.c

index 44039f8..f7ed14c 100644 (file)
@@ -1,5 +1,10 @@
 2013-12-03  Paul Eggert  <eggert@cs.ucla.edu>
 
+       Use bool for boolean.
+       * tparam.c (tparam1):
+       * undo.c (record_point, record_property_change):
+       Use bool for boolean, for local vars that are always true or false.
+
        Minor integer overflow fixes (Bug#16033).
        * window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
        This improves on the previous fix to this function.
index c3ecfb9..e97544d 100644 (file)
@@ -79,7 +79,7 @@ tparam1 (const char *string, char *outstring, int len,
   register int tem;
   int *old_argp = argp;                 /* can move */
   int *fixed_argp = argp;               /* never moves */
-  int explicit_param_p = 0;             /* set by %p */
+  bool explicit_param_p = 0;            /* set by %p */
   ptrdiff_t doleft = 0;
   ptrdiff_t doup = 0;
   ptrdiff_t append_len = 0;
index 234b851..88cca10 100644 (file)
@@ -55,7 +55,7 @@ static Lisp_Object pending_boundary;
 static void
 record_point (ptrdiff_t pt)
 {
-  int at_boundary;
+  bool at_boundary;
 
   /* Don't record position of pt when undo_inhibit_record_point holds.  */
   if (undo_inhibit_record_point)
@@ -77,7 +77,7 @@ record_point (ptrdiff_t pt)
 
   if (CONSP (BVAR (current_buffer, undo_list)))
     {
-      /* Set AT_BOUNDARY to 1 only when we have nothing other than
+      /* Set AT_BOUNDARY only when we have nothing other than
          marker adjustment before undo boundary.  */
 
       Lisp_Object tail = BVAR (current_buffer, undo_list), elt;
@@ -244,7 +244,7 @@ record_property_change (ptrdiff_t beg, ptrdiff_t length,
 {
   Lisp_Object lbeg, lend, entry;
   struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer);
-  int boundary = 0;
+  bool boundary = 0;
 
   if (EQ (BVAR (buf, undo_list), Qt))
     return;