aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2013-02-15 16:26:42 +0400
committerDmitry Antipov2013-02-15 16:26:42 +0400
commit0063fdb148db6352a06448053227c0924110cdda (patch)
tree6711236d18fa202a83612192791b0876dbb8e761 /src
parent0f63df79f05310cf6a0bde3474c0c976bb7c2178 (diff)
downloademacs-0063fdb148db6352a06448053227c0924110cdda.tar.gz
emacs-0063fdb148db6352a06448053227c0924110cdda.zip
* composite.c (fill_gstring_header): Remove useless prototype.
Break long line. * lisp.h (message_dolog, compile_pattern): Adjust prototype. * print.c (PRINTDECLARE, print_object): * search.c (compile_pattern, fast_looking_at, search_buffer): (simple_search, boyer_moore, Freplace_match): * xdisp.c (c_string_pos, number_of_chars, message_dolog): (get_overlay_arrow_glyph_row, display_mode_element): (decode_mode_spec_coding, message3): * xfaces.c (face_at_string_position): Use bool for booleans. Adjust comments.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog14
-rw-r--r--src/composite.c7
-rw-r--r--src/lisp.h4
-rw-r--r--src/print.c5
-rw-r--r--src/search.c20
-rw-r--r--src/xdisp.c22
-rw-r--r--src/xfaces.c2
7 files changed, 44 insertions, 30 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 00cb40df9e6..448f1e1ca0f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,17 @@
12013-02-15 Dmitry Antipov <dmantipov@yandex.ru>
2
3 * composite.c (fill_gstring_header): Remove useless prototype.
4 Break long line.
5 * lisp.h (message_dolog, compile_pattern): Adjust prototype.
6 * print.c (PRINTDECLARE, print_object):
7 * search.c (compile_pattern, fast_looking_at, search_buffer):
8 (simple_search, boyer_moore, Freplace_match):
9 * xdisp.c (c_string_pos, number_of_chars, message_dolog):
10 (get_overlay_arrow_glyph_row, display_mode_element):
11 (decode_mode_spec_coding, message3):
12 * xfaces.c (face_at_string_position): Use bool for booleans.
13 Adjust comments.
14
12013-02-15 Paul Eggert <eggert@cs.ucla.edu> 152013-02-15 Paul Eggert <eggert@cs.ucla.edu>
2 16
3 Fix AIX port (Bug#13650). 17 Fix AIX port (Bug#13650).
diff --git a/src/composite.c b/src/composite.c
index 9bbd4550c7b..2da98cfc36c 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -698,10 +698,6 @@ composition_gstring_from_id (ptrdiff_t id)
698 return HASH_VALUE (h, id); 698 return HASH_VALUE (h, id);
699} 699}
700 700
701static Lisp_Object fill_gstring_header (Lisp_Object, Lisp_Object,
702 Lisp_Object, Lisp_Object,
703 Lisp_Object);
704
705bool 701bool
706composition_gstring_p (Lisp_Object gstring) 702composition_gstring_p (Lisp_Object gstring)
707{ 703{
@@ -791,7 +787,8 @@ static Lisp_Object gstring_work;
791static Lisp_Object gstring_work_headers; 787static Lisp_Object gstring_work_headers;
792 788
793static Lisp_Object 789static Lisp_Object
794fill_gstring_header (Lisp_Object header, Lisp_Object start, Lisp_Object end, Lisp_Object font_object, Lisp_Object string) 790fill_gstring_header (Lisp_Object header, Lisp_Object start, Lisp_Object end,
791 Lisp_Object font_object, Lisp_Object string)
795{ 792{
796 ptrdiff_t from, to, from_byte; 793 ptrdiff_t from, to, from_byte;
797 ptrdiff_t len, i; 794 ptrdiff_t len, i;
diff --git a/src/lisp.h b/src/lisp.h
index da1531cc1be..44a5bd571ff 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2953,7 +2953,7 @@ extern void message1 (const char *);
2953extern void message1_nolog (const char *); 2953extern void message1_nolog (const char *);
2954extern void message3 (Lisp_Object); 2954extern void message3 (Lisp_Object);
2955extern void message3_nolog (Lisp_Object); 2955extern void message3_nolog (Lisp_Object);
2956extern void message_dolog (const char *, ptrdiff_t, int, int); 2956extern void message_dolog (const char *, ptrdiff_t, bool, bool);
2957extern void message_with_string (const char *, Lisp_Object, int); 2957extern void message_with_string (const char *, Lisp_Object, int);
2958extern void message_log_maybe_newline (void); 2958extern void message_log_maybe_newline (void);
2959extern void update_echo_area (void); 2959extern void update_echo_area (void);
@@ -3335,7 +3335,7 @@ extern void record_unwind_save_match_data (void);
3335struct re_registers; 3335struct re_registers;
3336extern struct re_pattern_buffer *compile_pattern (Lisp_Object, 3336extern struct re_pattern_buffer *compile_pattern (Lisp_Object,
3337 struct re_registers *, 3337 struct re_registers *,
3338 Lisp_Object, int, int); 3338 Lisp_Object, int, bool);
3339extern ptrdiff_t fast_string_match (Lisp_Object, Lisp_Object); 3339extern ptrdiff_t fast_string_match (Lisp_Object, Lisp_Object);
3340extern ptrdiff_t fast_c_string_match_ignore_case (Lisp_Object, const char *, 3340extern ptrdiff_t fast_c_string_match_ignore_case (Lisp_Object, const char *,
3341 ptrdiff_t); 3341 ptrdiff_t);
diff --git a/src/print.c b/src/print.c
index 24886a64914..4aae4118152 100644
--- a/src/print.c
+++ b/src/print.c
@@ -102,7 +102,8 @@ int print_output_debug_flag EXTERNALLY_VISIBLE = 1;
102 ptrdiff_t old_point_byte = -1, start_point_byte = -1; \ 102 ptrdiff_t old_point_byte = -1, start_point_byte = -1; \
103 ptrdiff_t specpdl_count = SPECPDL_INDEX (); \ 103 ptrdiff_t specpdl_count = SPECPDL_INDEX (); \
104 int free_print_buffer = 0; \ 104 int free_print_buffer = 0; \
105 int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); \ 105 bool multibyte \
106 = !NILP (BVAR (current_buffer, enable_multibyte_characters)); \
106 Lisp_Object original 107 Lisp_Object original
107 108
108#define PRINTPREPARE \ 109#define PRINTPREPARE \
@@ -1396,7 +1397,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1396 /* 1 means we must ensure that the next character we output 1397 /* 1 means we must ensure that the next character we output
1397 cannot be taken as part of a hex character escape. */ 1398 cannot be taken as part of a hex character escape. */
1398 int need_nonhex = 0; 1399 int need_nonhex = 0;
1399 int multibyte = STRING_MULTIBYTE (obj); 1400 bool multibyte = STRING_MULTIBYTE (obj);
1400 1401
1401 GCPRO1 (obj); 1402 GCPRO1 (obj);
1402 1403
diff --git a/src/search.c b/src/search.c
index c25d2441018..d4508004bf6 100644
--- a/src/search.c
+++ b/src/search.c
@@ -209,7 +209,8 @@ clear_regexp_cache (void)
209 for this pattern. 0 means backtrack only enough to get a valid match. */ 209 for this pattern. 0 means backtrack only enough to get a valid match. */
210 210
211struct re_pattern_buffer * 211struct re_pattern_buffer *
212compile_pattern (Lisp_Object pattern, struct re_registers *regp, Lisp_Object translate, int posix, int multibyte) 212compile_pattern (Lisp_Object pattern, struct re_registers *regp,
213 Lisp_Object translate, int posix, bool multibyte)
213{ 214{
214 struct regexp_cache *cp, **cpp; 215 struct regexp_cache *cp, **cpp;
215 216
@@ -534,9 +535,10 @@ fast_string_match_ignore_case (Lisp_Object regexp, Lisp_Object string)
534 data. */ 535 data. */
535 536
536ptrdiff_t 537ptrdiff_t
537fast_looking_at (Lisp_Object regexp, ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t limit, ptrdiff_t limit_byte, Lisp_Object string) 538fast_looking_at (Lisp_Object regexp, ptrdiff_t pos, ptrdiff_t pos_byte,
539 ptrdiff_t limit, ptrdiff_t limit_byte, Lisp_Object string)
538{ 540{
539 int multibyte; 541 bool multibyte;
540 struct re_pattern_buffer *buf; 542 struct re_pattern_buffer *buf;
541 unsigned char *p1, *p2; 543 unsigned char *p1, *p2;
542 ptrdiff_t s1, s2; 544 ptrdiff_t s1, s2;
@@ -1248,7 +1250,7 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
1248 ptrdiff_t raw_pattern_size; 1250 ptrdiff_t raw_pattern_size;
1249 ptrdiff_t raw_pattern_size_byte; 1251 ptrdiff_t raw_pattern_size_byte;
1250 unsigned char *patbuf; 1252 unsigned char *patbuf;
1251 int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); 1253 bool multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters));
1252 unsigned char *base_pat; 1254 unsigned char *base_pat;
1253 /* Set to positive if we find a non-ASCII char that need 1255 /* Set to positive if we find a non-ASCII char that need
1254 translation. Otherwise set to zero later. */ 1256 translation. Otherwise set to zero later. */
@@ -1461,8 +1463,8 @@ simple_search (EMACS_INT n, unsigned char *pat,
1461 ptrdiff_t pos, ptrdiff_t pos_byte, 1463 ptrdiff_t pos, ptrdiff_t pos_byte,
1462 ptrdiff_t lim, ptrdiff_t lim_byte) 1464 ptrdiff_t lim, ptrdiff_t lim_byte)
1463{ 1465{
1464 int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); 1466 bool multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
1465 int forward = n > 0; 1467 bool forward = n > 0;
1466 /* Number of buffer bytes matched. Note that this may be different 1468 /* Number of buffer bytes matched. Note that this may be different
1467 from len_byte in a multibyte buffer. */ 1469 from len_byte in a multibyte buffer. */
1468 ptrdiff_t match_byte = PTRDIFF_MIN; 1470 ptrdiff_t match_byte = PTRDIFF_MIN;
@@ -1681,7 +1683,7 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat,
1681 register ptrdiff_t i; 1683 register ptrdiff_t i;
1682 register int j; 1684 register int j;
1683 unsigned char *pat, *pat_end; 1685 unsigned char *pat, *pat_end;
1684 int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); 1686 bool multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
1685 1687
1686 unsigned char simple_translate[0400]; 1688 unsigned char simple_translate[0400];
1687 /* These are set to the preceding bytes of a byte to be translated 1689 /* These are set to the preceding bytes of a byte to be translated
@@ -2507,8 +2509,8 @@ since only regular expressions have distinguished subexpressions. */)
2507 ptrdiff_t length = SBYTES (newtext); 2509 ptrdiff_t length = SBYTES (newtext);
2508 unsigned char *substed; 2510 unsigned char *substed;
2509 ptrdiff_t substed_alloc_size, substed_len; 2511 ptrdiff_t substed_alloc_size, substed_len;
2510 int buf_multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); 2512 bool buf_multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters));
2511 int str_multibyte = STRING_MULTIBYTE (newtext); 2513 bool str_multibyte = STRING_MULTIBYTE (newtext);
2512 int really_changed = 0; 2514 int really_changed = 0;
2513 2515
2514 substed_alloc_size = ((STRING_BYTES_BOUND - 100) / 2 < length 2516 substed_alloc_size = ((STRING_BYTES_BOUND - 100) / 2 < length
diff --git a/src/xdisp.c b/src/xdisp.c
index d2d4b3bbb79..c41b7f3c8cb 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -910,8 +910,8 @@ static int forward_to_next_line_start (struct it *, int *, struct bidi_it *);
910static struct text_pos string_pos_nchars_ahead (struct text_pos, 910static struct text_pos string_pos_nchars_ahead (struct text_pos,
911 Lisp_Object, ptrdiff_t); 911 Lisp_Object, ptrdiff_t);
912static struct text_pos string_pos (ptrdiff_t, Lisp_Object); 912static struct text_pos string_pos (ptrdiff_t, Lisp_Object);
913static struct text_pos c_string_pos (ptrdiff_t, const char *, int); 913static struct text_pos c_string_pos (ptrdiff_t, const char *, bool);
914static ptrdiff_t number_of_chars (const char *, int); 914static ptrdiff_t number_of_chars (const char *, bool);
915static void compute_stop_pos (struct it *); 915static void compute_stop_pos (struct it *);
916static void compute_string_pos (struct text_pos *, struct text_pos, 916static void compute_string_pos (struct text_pos *, struct text_pos,
917 Lisp_Object); 917 Lisp_Object);
@@ -1650,7 +1650,7 @@ string_pos (ptrdiff_t charpos, Lisp_Object string)
1650 means recognize multibyte characters. */ 1650 means recognize multibyte characters. */
1651 1651
1652static struct text_pos 1652static struct text_pos
1653c_string_pos (ptrdiff_t charpos, const char *s, int multibyte_p) 1653c_string_pos (ptrdiff_t charpos, const char *s, bool multibyte_p)
1654{ 1654{
1655 struct text_pos pos; 1655 struct text_pos pos;
1656 1656
@@ -1681,7 +1681,7 @@ c_string_pos (ptrdiff_t charpos, const char *s, int multibyte_p)
1681 non-zero means recognize multibyte characters. */ 1681 non-zero means recognize multibyte characters. */
1682 1682
1683static ptrdiff_t 1683static ptrdiff_t
1684number_of_chars (const char *s, int multibyte_p) 1684number_of_chars (const char *s, bool multibyte_p)
1685{ 1685{
1686 ptrdiff_t nchars; 1686 ptrdiff_t nchars;
1687 1687
@@ -9357,8 +9357,8 @@ message_log_maybe_newline (void)
9357 9357
9358 9358
9359/* Add a string M of length NBYTES to the message log, optionally 9359/* Add a string M of length NBYTES to the message log, optionally
9360 terminated with a newline when NLFLAG is non-zero. MULTIBYTE, if 9360 terminated with a newline when NLFLAG is true. MULTIBYTE, if
9361 nonzero, means interpret the contents of M as multibyte. This 9361 true, means interpret the contents of M as multibyte. This
9362 function calls low-level routines in order to bypass text property 9362 function calls low-level routines in order to bypass text property
9363 hooks, etc. which might not be safe to run. 9363 hooks, etc. which might not be safe to run.
9364 9364
@@ -9366,7 +9366,7 @@ message_log_maybe_newline (void)
9366 so the buffer M must NOT point to a Lisp string. */ 9366 so the buffer M must NOT point to a Lisp string. */
9367 9367
9368void 9368void
9369message_dolog (const char *m, ptrdiff_t nbytes, int nlflag, int multibyte) 9369message_dolog (const char *m, ptrdiff_t nbytes, bool nlflag, bool multibyte)
9370{ 9370{
9371 const unsigned char *msg = (const unsigned char *) m; 9371 const unsigned char *msg = (const unsigned char *) m;
9372 9372
@@ -9591,7 +9591,7 @@ message3 (Lisp_Object m)
9591 if (STRINGP (m)) 9591 if (STRINGP (m))
9592 { 9592 {
9593 ptrdiff_t nbytes = SBYTES (m); 9593 ptrdiff_t nbytes = SBYTES (m);
9594 int multibyte = STRING_MULTIBYTE (m); 9594 bool multibyte = STRING_MULTIBYTE (m);
9595 USE_SAFE_ALLOCA; 9595 USE_SAFE_ALLOCA;
9596 char *buffer = SAFE_ALLOCA (nbytes); 9596 char *buffer = SAFE_ALLOCA (nbytes);
9597 memcpy (buffer, SDATA (m), nbytes); 9597 memcpy (buffer, SDATA (m), nbytes);
@@ -18064,7 +18064,7 @@ get_overlay_arrow_glyph_row (struct window *w, Lisp_Object overlay_arrow_string)
18064 const unsigned char *arrow_end = arrow_string + arrow_len; 18064 const unsigned char *arrow_end = arrow_string + arrow_len;
18065 const unsigned char *p; 18065 const unsigned char *p;
18066 struct it it; 18066 struct it it;
18067 int multibyte_p; 18067 bool multibyte_p;
18068 int n_glyphs_before; 18068 int n_glyphs_before;
18069 18069
18070 set_buffer_temp (buffer); 18070 set_buffer_temp (buffer);
@@ -20495,7 +20495,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision,
20495 risky); 20495 risky);
20496 else if (c != 0) 20496 else if (c != 0)
20497 { 20497 {
20498 int multibyte; 20498 bool multibyte;
20499 ptrdiff_t bytepos, charpos; 20499 ptrdiff_t bytepos, charpos;
20500 const char *spec; 20500 const char *spec;
20501 Lisp_Object string; 20501 Lisp_Object string;
@@ -21100,7 +21100,7 @@ static char *
21100decode_mode_spec_coding (Lisp_Object coding_system, register char *buf, int eol_flag) 21100decode_mode_spec_coding (Lisp_Object coding_system, register char *buf, int eol_flag)
21101{ 21101{
21102 Lisp_Object val; 21102 Lisp_Object val;
21103 int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); 21103 bool multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters));
21104 const unsigned char *eol_str; 21104 const unsigned char *eol_str;
21105 int eol_str_len; 21105 int eol_str_len;
21106 /* The EOL conversion we are using. */ 21106 /* The EOL conversion we are using. */
diff --git a/src/xfaces.c b/src/xfaces.c
index 33a221fdd52..71709446c1d 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6152,7 +6152,7 @@ face_at_string_position (struct window *w, Lisp_Object string,
6152 struct frame *f = XFRAME (WINDOW_FRAME (w)); 6152 struct frame *f = XFRAME (WINDOW_FRAME (w));
6153 Lisp_Object attrs[LFACE_VECTOR_SIZE]; 6153 Lisp_Object attrs[LFACE_VECTOR_SIZE];
6154 struct face *base_face; 6154 struct face *base_face;
6155 int multibyte_p = STRING_MULTIBYTE (string); 6155 bool multibyte_p = STRING_MULTIBYTE (string);
6156 Lisp_Object prop_name = mouse_p ? Qmouse_face : Qface; 6156 Lisp_Object prop_name = mouse_p ? Qmouse_face : Qface;
6157 6157
6158 /* Get the value of the face property at the current position within 6158 /* Get the value of the face property at the current position within