emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111788: * composite.c (fill_gstring_


From: Dmitry Antipov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111788: * composite.c (fill_gstring_header): Remove useless prototype.
Date: Fri, 15 Feb 2013 16:26:42 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111788
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Fri 2013-02-15 16:26:42 +0400
message:
  * 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.
modified:
  src/ChangeLog
  src/composite.c
  src/lisp.h
  src/print.c
  src/search.c
  src/xdisp.c
  src/xfaces.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-02-15 06:35:54 +0000
+++ b/src/ChangeLog     2013-02-15 12:26:42 +0000
@@ -1,3 +1,17 @@
+2013-02-15  Dmitry Antipov  <address@hidden>
+
+       * 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  <address@hidden>
 
        Fix AIX port (Bug#13650).

=== modified file 'src/composite.c'
--- a/src/composite.c   2013-02-13 07:14:38 +0000
+++ b/src/composite.c   2013-02-15 12:26:42 +0000
@@ -698,10 +698,6 @@
   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_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;

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2013-02-15 06:35:54 +0000
+++ b/src/lisp.h        2013-02-15 12:26:42 +0000
@@ -2953,7 +2953,7 @@
 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 @@
 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);

=== modified file 'src/print.c'
--- a/src/print.c       2013-02-01 07:23:18 +0000
+++ b/src/print.c       2013-02-15 12:26:42 +0000
@@ -102,7 +102,8 @@
    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 @@
          /* 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);
 

=== modified file 'src/search.c'
--- a/src/search.c      2013-02-11 23:37:18 +0000
+++ b/src/search.c      2013-02-15 12:26:42 +0000
@@ -209,7 +209,8 @@
    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 @@
    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 @@
       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 @@
               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 @@
   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 @@
       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

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2013-02-12 16:43:09 +0000
+++ b/src/xdisp.c       2013-02-15 12:26:42 +0000
@@ -910,8 +910,8 @@
 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 @@
    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 @@
    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 @@
 
 
 /* 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 @@
    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 @@
   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 @@
   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 @@
                                             risky);
                else if (c != 0)
                  {
-                   int multibyte;
+                   bool multibyte;
                    ptrdiff_t bytepos, charpos;
                    const char *spec;
                    Lisp_Object string;
@@ -21100,7 +21100,7 @@
 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.  */

=== modified file 'src/xfaces.c'
--- a/src/xfaces.c      2013-02-08 05:28:52 +0000
+++ b/src/xfaces.c      2013-02-15 12:26:42 +0000
@@ -6152,7 +6152,7 @@
   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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]