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 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).
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)
{
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;
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);
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);
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 \
/* 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);
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;
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;
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. */
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;
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
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
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);
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;
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;
/* 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.
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;
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);
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);
risky);
else if (c != 0)
{
- int multibyte;
+ bool multibyte;
ptrdiff_t bytepos, charpos;
const char *spec;
Lisp_Object string;
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. */
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