summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-03-02 10:39:34 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2013-03-02 10:39:34 -0800
commit81c23309e40ca529714e765b4534d6a1f4634887 (patch)
tree70da1f6a65cdeab85f10920d9c7712a68b38ccae
parentc175d44072c6a54eb921a3c55fdc2bf2f7816ddd (diff)
downloademacs-81c23309e40ca529714e765b4534d6a1f4634887.tar.gz
* textprop.c: Use bool for booleans.
(validate_interval_range, Fadd_text_properties) (Fremove_text_properties): Prefer bool to int when either works.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/intervals.h2
-rw-r--r--src/textprop.c9
3 files changed, 12 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 35cbab84096..a68b16f862c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2013-03-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ * textprop.c: Use bool for booleans.
+ (validate_interval_range, Fadd_text_properties)
+ (Fremove_text_properties): Prefer bool to int when either works.
+
2013-03-02 Eli Zaretskii <eliz@gnu.org>
* textprop.c (Fadd_text_properties, Fremove_text_properties): If
diff --git a/src/intervals.h b/src/intervals.h
index d6191225b1f..a38e83cf10e 100644
--- a/src/intervals.h
+++ b/src/intervals.h
@@ -259,7 +259,7 @@ extern Lisp_Object get_local_map (ptrdiff_t, struct buffer *, Lisp_Object);
extern INTERVAL update_interval (INTERVAL, ptrdiff_t);
extern void set_intervals_multibyte (bool);
extern INTERVAL validate_interval_range (Lisp_Object, Lisp_Object *,
- Lisp_Object *, int);
+ Lisp_Object *, bool);
extern INTERVAL interval_of (ptrdiff_t, Lisp_Object);
/* Defined in xdisp.c. */
diff --git a/src/textprop.c b/src/textprop.c
index 34009131c09..18e893b3ef2 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -125,9 +125,10 @@ modify_region (Lisp_Object buffer, Lisp_Object start, Lisp_Object end)
#define hard 1
INTERVAL
-validate_interval_range (Lisp_Object object, Lisp_Object *begin, Lisp_Object *end, int force)
+validate_interval_range (Lisp_Object object, Lisp_Object *begin,
+ Lisp_Object *end, bool force)
{
- register INTERVAL i;
+ INTERVAL i;
ptrdiff_t searchpos;
CHECK_STRING_OR_BUFFER (object);
@@ -1131,7 +1132,7 @@ Return t if any property value actually changed, nil otherwise. */)
ptrdiff_t s, len;
bool modified = 0;
struct gcpro gcpro1;
- int first_time = 1;
+ bool first_time = 1;
properties = validate_plist (properties);
if (NILP (properties))
@@ -1446,7 +1447,7 @@ Use `set-text-properties' if you want to remove all text properties. */)
INTERVAL i, unchanged;
ptrdiff_t s, len;
bool modified = 0;
- int first_time = 1;
+ bool first_time = 1;
if (NILP (object))
XSETBUFFER (object, current_buffer);