* 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.
This commit is contained in:
parent
0f63df79f0
commit
0063fdb148
7 changed files with 44 additions and 30 deletions
|
@ -1,3 +1,17 @@
|
|||
2013-02-15 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
* 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.
|
||||
|
||||
2013-02-15 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Fix AIX port (Bug#13650).
|
||||
|
|
|
@ -698,10 +698,6 @@ composition_gstring_from_id (ptrdiff_t id)
|
|||
return HASH_VALUE (h, id);
|
||||
}
|
||||
|
||||
static Lisp_Object fill_gstring_header (Lisp_Object, Lisp_Object,
|
||||
Lisp_Object, Lisp_Object,
|
||||
Lisp_Object);
|
||||
|
||||
bool
|
||||
composition_gstring_p (Lisp_Object gstring)
|
||||
{
|
||||
|
@ -791,7 +787,8 @@ static Lisp_Object gstring_work;
|
|||
static Lisp_Object gstring_work_headers;
|
||||
|
||||
static Lisp_Object
|
||||
fill_gstring_header (Lisp_Object header, Lisp_Object start, Lisp_Object end, Lisp_Object font_object, Lisp_Object string)
|
||||
fill_gstring_header (Lisp_Object header, Lisp_Object start, Lisp_Object end,
|
||||
Lisp_Object font_object, Lisp_Object string)
|
||||
{
|
||||
ptrdiff_t from, to, from_byte;
|
||||
ptrdiff_t len, i;
|
||||
|
|
|
@ -2953,7 +2953,7 @@ extern void message1 (const char *);
|
|||
extern void message1_nolog (const char *);
|
||||
extern void message3 (Lisp_Object);
|
||||
extern void message3_nolog (Lisp_Object);
|
||||
extern void message_dolog (const char *, ptrdiff_t, int, int);
|
||||
extern void message_dolog (const char *, ptrdiff_t, bool, bool);
|
||||
extern void message_with_string (const char *, Lisp_Object, int);
|
||||
extern void message_log_maybe_newline (void);
|
||||
extern void update_echo_area (void);
|
||||
|
@ -3335,7 +3335,7 @@ extern void record_unwind_save_match_data (void);
|
|||
struct re_registers;
|
||||
extern struct re_pattern_buffer *compile_pattern (Lisp_Object,
|
||||
struct re_registers *,
|
||||
Lisp_Object, int, int);
|
||||
Lisp_Object, int, bool);
|
||||
extern ptrdiff_t fast_string_match (Lisp_Object, Lisp_Object);
|
||||
extern ptrdiff_t fast_c_string_match_ignore_case (Lisp_Object, const char *,
|
||||
ptrdiff_t);
|
||||
|
|
|
@ -102,7 +102,8 @@ int print_output_debug_flag EXTERNALLY_VISIBLE = 1;
|
|||
ptrdiff_t old_point_byte = -1, start_point_byte = -1; \
|
||||
ptrdiff_t specpdl_count = SPECPDL_INDEX (); \
|
||||
int free_print_buffer = 0; \
|
||||
int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); \
|
||||
bool multibyte \
|
||||
= !NILP (BVAR (current_buffer, enable_multibyte_characters)); \
|
||||
Lisp_Object original
|
||||
|
||||
#define PRINTPREPARE \
|
||||
|
@ -1396,7 +1397,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
|
|||
/* 1 means we must ensure that the next character we output
|
||||
cannot be taken as part of a hex character escape. */
|
||||
int need_nonhex = 0;
|
||||
int multibyte = STRING_MULTIBYTE (obj);
|
||||
bool multibyte = STRING_MULTIBYTE (obj);
|
||||
|
||||
GCPRO1 (obj);
|
||||
|
||||
|
|
20
src/search.c
20
src/search.c
|
@ -209,7 +209,8 @@ clear_regexp_cache (void)
|
|||
for this pattern. 0 means backtrack only enough to get a valid match. */
|
||||
|
||||
struct re_pattern_buffer *
|
||||
compile_pattern (Lisp_Object pattern, struct re_registers *regp, Lisp_Object translate, int posix, int multibyte)
|
||||
compile_pattern (Lisp_Object pattern, struct re_registers *regp,
|
||||
Lisp_Object translate, int posix, bool multibyte)
|
||||
{
|
||||
struct regexp_cache *cp, **cpp;
|
||||
|
||||
|
@ -534,9 +535,10 @@ fast_string_match_ignore_case (Lisp_Object regexp, Lisp_Object string)
|
|||
data. */
|
||||
|
||||
ptrdiff_t
|
||||
fast_looking_at (Lisp_Object regexp, ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t limit, ptrdiff_t limit_byte, Lisp_Object string)
|
||||
fast_looking_at (Lisp_Object regexp, ptrdiff_t pos, ptrdiff_t pos_byte,
|
||||
ptrdiff_t limit, ptrdiff_t limit_byte, Lisp_Object string)
|
||||
{
|
||||
int multibyte;
|
||||
bool multibyte;
|
||||
struct re_pattern_buffer *buf;
|
||||
unsigned char *p1, *p2;
|
||||
ptrdiff_t s1, s2;
|
||||
|
@ -1248,7 +1250,7 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
|
|||
ptrdiff_t raw_pattern_size;
|
||||
ptrdiff_t raw_pattern_size_byte;
|
||||
unsigned char *patbuf;
|
||||
int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters));
|
||||
bool multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters));
|
||||
unsigned char *base_pat;
|
||||
/* Set to positive if we find a non-ASCII char that need
|
||||
translation. Otherwise set to zero later. */
|
||||
|
@ -1461,8 +1463,8 @@ simple_search (EMACS_INT n, unsigned char *pat,
|
|||
ptrdiff_t pos, ptrdiff_t pos_byte,
|
||||
ptrdiff_t lim, ptrdiff_t lim_byte)
|
||||
{
|
||||
int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
|
||||
int forward = n > 0;
|
||||
bool multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
|
||||
bool forward = n > 0;
|
||||
/* Number of buffer bytes matched. Note that this may be different
|
||||
from len_byte in a multibyte buffer. */
|
||||
ptrdiff_t match_byte = PTRDIFF_MIN;
|
||||
|
@ -1681,7 +1683,7 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat,
|
|||
register ptrdiff_t i;
|
||||
register int j;
|
||||
unsigned char *pat, *pat_end;
|
||||
int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
|
||||
bool multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
|
||||
|
||||
unsigned char simple_translate[0400];
|
||||
/* These are set to the preceding bytes of a byte to be translated
|
||||
|
@ -2507,8 +2509,8 @@ since only regular expressions have distinguished subexpressions. */)
|
|||
ptrdiff_t length = SBYTES (newtext);
|
||||
unsigned char *substed;
|
||||
ptrdiff_t substed_alloc_size, substed_len;
|
||||
int buf_multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters));
|
||||
int str_multibyte = STRING_MULTIBYTE (newtext);
|
||||
bool buf_multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters));
|
||||
bool str_multibyte = STRING_MULTIBYTE (newtext);
|
||||
int really_changed = 0;
|
||||
|
||||
substed_alloc_size = ((STRING_BYTES_BOUND - 100) / 2 < length
|
||||
|
|
22
src/xdisp.c
22
src/xdisp.c
|
@ -910,8 +910,8 @@ static int forward_to_next_line_start (struct it *, int *, struct bidi_it *);
|
|||
static struct text_pos string_pos_nchars_ahead (struct text_pos,
|
||||
Lisp_Object, ptrdiff_t);
|
||||
static struct text_pos string_pos (ptrdiff_t, Lisp_Object);
|
||||
static struct text_pos c_string_pos (ptrdiff_t, const char *, int);
|
||||
static ptrdiff_t number_of_chars (const char *, int);
|
||||
static struct text_pos c_string_pos (ptrdiff_t, const char *, bool);
|
||||
static ptrdiff_t number_of_chars (const char *, bool);
|
||||
static void compute_stop_pos (struct it *);
|
||||
static void compute_string_pos (struct text_pos *, struct text_pos,
|
||||
Lisp_Object);
|
||||
|
@ -1650,7 +1650,7 @@ string_pos (ptrdiff_t charpos, Lisp_Object string)
|
|||
means recognize multibyte characters. */
|
||||
|
||||
static struct text_pos
|
||||
c_string_pos (ptrdiff_t charpos, const char *s, int multibyte_p)
|
||||
c_string_pos (ptrdiff_t charpos, const char *s, bool multibyte_p)
|
||||
{
|
||||
struct text_pos pos;
|
||||
|
||||
|
@ -1681,7 +1681,7 @@ c_string_pos (ptrdiff_t charpos, const char *s, int multibyte_p)
|
|||
non-zero means recognize multibyte characters. */
|
||||
|
||||
static ptrdiff_t
|
||||
number_of_chars (const char *s, int multibyte_p)
|
||||
number_of_chars (const char *s, bool multibyte_p)
|
||||
{
|
||||
ptrdiff_t nchars;
|
||||
|
||||
|
@ -9357,8 +9357,8 @@ message_log_maybe_newline (void)
|
|||
|
||||
|
||||
/* Add a string M of length NBYTES to the message log, optionally
|
||||
terminated with a newline when NLFLAG is non-zero. MULTIBYTE, if
|
||||
nonzero, means interpret the contents of M as multibyte. This
|
||||
terminated with a newline when NLFLAG is true. MULTIBYTE, if
|
||||
true, means interpret the contents of M as multibyte. This
|
||||
function calls low-level routines in order to bypass text property
|
||||
hooks, etc. which might not be safe to run.
|
||||
|
||||
|
@ -9366,7 +9366,7 @@ message_log_maybe_newline (void)
|
|||
so the buffer M must NOT point to a Lisp string. */
|
||||
|
||||
void
|
||||
message_dolog (const char *m, ptrdiff_t nbytes, int nlflag, int multibyte)
|
||||
message_dolog (const char *m, ptrdiff_t nbytes, bool nlflag, bool multibyte)
|
||||
{
|
||||
const unsigned char *msg = (const unsigned char *) m;
|
||||
|
||||
|
@ -9591,7 +9591,7 @@ message3 (Lisp_Object m)
|
|||
if (STRINGP (m))
|
||||
{
|
||||
ptrdiff_t nbytes = SBYTES (m);
|
||||
int multibyte = STRING_MULTIBYTE (m);
|
||||
bool multibyte = STRING_MULTIBYTE (m);
|
||||
USE_SAFE_ALLOCA;
|
||||
char *buffer = SAFE_ALLOCA (nbytes);
|
||||
memcpy (buffer, SDATA (m), nbytes);
|
||||
|
@ -18064,7 +18064,7 @@ get_overlay_arrow_glyph_row (struct window *w, Lisp_Object overlay_arrow_string)
|
|||
const unsigned char *arrow_end = arrow_string + arrow_len;
|
||||
const unsigned char *p;
|
||||
struct it it;
|
||||
int multibyte_p;
|
||||
bool multibyte_p;
|
||||
int n_glyphs_before;
|
||||
|
||||
set_buffer_temp (buffer);
|
||||
|
@ -20495,7 +20495,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision,
|
|||
risky);
|
||||
else if (c != 0)
|
||||
{
|
||||
int multibyte;
|
||||
bool multibyte;
|
||||
ptrdiff_t bytepos, charpos;
|
||||
const char *spec;
|
||||
Lisp_Object string;
|
||||
|
@ -21100,7 +21100,7 @@ static char *
|
|||
decode_mode_spec_coding (Lisp_Object coding_system, register char *buf, int eol_flag)
|
||||
{
|
||||
Lisp_Object val;
|
||||
int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters));
|
||||
bool multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters));
|
||||
const unsigned char *eol_str;
|
||||
int eol_str_len;
|
||||
/* The EOL conversion we are using. */
|
||||
|
|
|
@ -6152,7 +6152,7 @@ face_at_string_position (struct window *w, Lisp_Object string,
|
|||
struct frame *f = XFRAME (WINDOW_FRAME (w));
|
||||
Lisp_Object attrs[LFACE_VECTOR_SIZE];
|
||||
struct face *base_face;
|
||||
int multibyte_p = STRING_MULTIBYTE (string);
|
||||
bool multibyte_p = STRING_MULTIBYTE (string);
|
||||
Lisp_Object prop_name = mouse_p ? Qmouse_face : Qface;
|
||||
|
||||
/* Get the value of the face property at the current position within
|
||||
|
|
Loading…
Add table
Reference in a new issue