diff options
| author | Paul Eggert | 2013-12-03 14:36:49 -0800 |
|---|---|---|
| committer | Paul Eggert | 2013-12-03 14:36:49 -0800 |
| commit | 5df474aaa900307b90d55434308c32c555314313 (patch) | |
| tree | bd95be90b49d93039720ad80484e13c85b61db28 /src | |
| parent | 2654ac09ccc5da6e2fe99e60291d4c6013958c3e (diff) | |
| download | emacs-5df474aaa900307b90d55434308c32c555314313.tar.gz emacs-5df474aaa900307b90d55434308c32c555314313.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/tparam.c | 2 | ||||
| -rw-r--r-- | src/undo.c | 6 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 44039f83d8b..f7ed14c1f40 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2013-12-03 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2013-12-03 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Use bool for boolean. | ||
| 4 | * tparam.c (tparam1): | ||
| 5 | * undo.c (record_point, record_property_change): | ||
| 6 | Use bool for boolean, for local vars that are always true or false. | ||
| 7 | |||
| 3 | Minor integer overflow fixes (Bug#16033). | 8 | Minor integer overflow fixes (Bug#16033). |
| 4 | * window.c (Fset_window_new_pixel): Don't let new_pixel go negative. | 9 | * window.c (Fset_window_new_pixel): Don't let new_pixel go negative. |
| 5 | This improves on the previous fix to this function. | 10 | This improves on the previous fix to this function. |
diff --git a/src/tparam.c b/src/tparam.c index c3ecfb9e3a3..e97544d9234 100644 --- a/src/tparam.c +++ b/src/tparam.c | |||
| @@ -79,7 +79,7 @@ tparam1 (const char *string, char *outstring, int len, | |||
| 79 | register int tem; | 79 | register int tem; |
| 80 | int *old_argp = argp; /* can move */ | 80 | int *old_argp = argp; /* can move */ |
| 81 | int *fixed_argp = argp; /* never moves */ | 81 | int *fixed_argp = argp; /* never moves */ |
| 82 | int explicit_param_p = 0; /* set by %p */ | 82 | bool explicit_param_p = 0; /* set by %p */ |
| 83 | ptrdiff_t doleft = 0; | 83 | ptrdiff_t doleft = 0; |
| 84 | ptrdiff_t doup = 0; | 84 | ptrdiff_t doup = 0; |
| 85 | ptrdiff_t append_len = 0; | 85 | ptrdiff_t append_len = 0; |
diff --git a/src/undo.c b/src/undo.c index 234b8510f0a..88cca102b6d 100644 --- a/src/undo.c +++ b/src/undo.c | |||
| @@ -55,7 +55,7 @@ static Lisp_Object pending_boundary; | |||
| 55 | static void | 55 | static void |
| 56 | record_point (ptrdiff_t pt) | 56 | record_point (ptrdiff_t pt) |
| 57 | { | 57 | { |
| 58 | int at_boundary; | 58 | bool at_boundary; |
| 59 | 59 | ||
| 60 | /* Don't record position of pt when undo_inhibit_record_point holds. */ | 60 | /* Don't record position of pt when undo_inhibit_record_point holds. */ |
| 61 | if (undo_inhibit_record_point) | 61 | if (undo_inhibit_record_point) |
| @@ -77,7 +77,7 @@ record_point (ptrdiff_t pt) | |||
| 77 | 77 | ||
| 78 | if (CONSP (BVAR (current_buffer, undo_list))) | 78 | if (CONSP (BVAR (current_buffer, undo_list))) |
| 79 | { | 79 | { |
| 80 | /* Set AT_BOUNDARY to 1 only when we have nothing other than | 80 | /* Set AT_BOUNDARY only when we have nothing other than |
| 81 | marker adjustment before undo boundary. */ | 81 | marker adjustment before undo boundary. */ |
| 82 | 82 | ||
| 83 | Lisp_Object tail = BVAR (current_buffer, undo_list), elt; | 83 | Lisp_Object tail = BVAR (current_buffer, undo_list), elt; |
| @@ -244,7 +244,7 @@ record_property_change (ptrdiff_t beg, ptrdiff_t length, | |||
| 244 | { | 244 | { |
| 245 | Lisp_Object lbeg, lend, entry; | 245 | Lisp_Object lbeg, lend, entry; |
| 246 | struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer); | 246 | struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer); |
| 247 | int boundary = 0; | 247 | bool boundary = 0; |
| 248 | 248 | ||
| 249 | if (EQ (BVAR (buf, undo_list), Qt)) | 249 | if (EQ (BVAR (buf, undo_list), Qt)) |
| 250 | return; | 250 | return; |