emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r103812: src/xdisp.c: Remove some unu


From: Juanma Barranquero
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103812: src/xdisp.c: Remove some unused parameters.
Date: Sun, 03 Apr 2011 01:53:55 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103812
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Sun 2011-04-03 01:53:55 +0200
message:
  src/xdisp.c: Remove some unused parameters.
  
  * xdisp.c (display_count_lines): Remove parameter `start',
    unused since revno:20537 (1998-01-01).  All callers changed.
    (get_char_face_and_encoding): Remove parameter `multibyte_p',
    unused since revno:87605 (2008-05-14).  All callers changed.
    (fill_stretch_glyph_string): Remove parameters `row' and `area',
    unused at least since Kim's GUI unification at revno:50135 (2003-03-16)
    and thereabouts.  All callers changed.
    (get_per_char_metric): Remove parameter `f', unused since
    revno:87605 (2008-05-14).  All callers changed.
modified:
  src/ChangeLog
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-04-02 13:52:34 +0000
+++ b/src/ChangeLog     2011-04-02 23:53:55 +0000
@@ -1,3 +1,15 @@
+2011-04-02  Juanma Barranquero  <address@hidden>
+
+       * xdisp.c (display_count_lines): Remove parameter `start',
+       unused since revno:20537 (1998-01-01).  All callers changed.
+       (get_char_face_and_encoding): Remove parameter `multibyte_p',
+       unused since revno:87605 (2008-05-14).  All callers changed.
+       (fill_stretch_glyph_string): Remove parameters `row' and `area',
+       unused at least since Kim's GUI unification at revno:50135 (2003-03-16)
+       and thereabouts.  All callers changed.
+       (get_per_char_metric): Remove parameter `f', unused since
+       revno:87605 (2008-05-14).  All callers changed.
+
 2011-04-02  Jim Meyering  <address@hidden>
 
        do not dereference NULL upon failed strdup

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2011-03-31 19:42:38 +0000
+++ b/src/xdisp.c       2011-04-02 23:53:55 +0000
@@ -824,8 +824,7 @@
 static int store_mode_line_string (const char *, Lisp_Object, int, int, int, 
Lisp_Object);
 static const char *decode_mode_spec (struct window *, int, int, Lisp_Object *);
 static void display_menu_bar (struct window *);
-static int display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT, int,
-                               EMACS_INT *);
+static int display_count_lines (EMACS_INT, EMACS_INT, int, EMACS_INT *);
 static int display_string (const char *, Lisp_Object, Lisp_Object,
                            EMACS_INT, EMACS_INT, struct it *, int, int, int, 
int);
 static void compute_line_metrics (struct it *);
@@ -19481,7 +19480,7 @@
          }
 
        /* Count lines from base line to window start position.  */
-       nlines = display_count_lines (linepos, linepos_byte,
+       nlines = display_count_lines (linepos_byte,
                                      startpos_byte,
                                      startpos, &junk);
 
@@ -19510,7 +19509,7 @@
                limit_byte = CHAR_TO_BYTE (limit);
              }
 
-           nlines = display_count_lines (startpos, startpos_byte,
+           nlines = display_count_lines (startpos_byte,
                                          limit_byte,
                                          - (height * 2 + 30),
                                          &position);
@@ -19529,7 +19528,7 @@
          }
 
        /* Now count lines from the start pos to point.  */
-       nlines = display_count_lines (startpos, startpos_byte,
+       nlines = display_count_lines (startpos_byte,
                                      PT_BYTE, PT, &junk);
 
        /* Record that we did display the line number.  */
@@ -19699,14 +19698,14 @@
 }
 
 
-/* Count up to COUNT lines starting from START / START_BYTE.
+/* Count up to COUNT lines starting from START_BYTE.
    But don't go beyond LIMIT_BYTE.
    Return the number of lines thus found (always nonnegative).
 
    Set *BYTE_POS_PTR to 1 if we found COUNT lines, 0 if we hit LIMIT.  */
 
 static int
-display_count_lines (EMACS_INT start, EMACS_INT start_byte,
+display_count_lines (EMACS_INT start_byte,
                     EMACS_INT limit_byte, int count,
                     EMACS_INT *byte_pos_ptr)
 {
@@ -20470,16 +20469,15 @@
 }
 
 
-/* Get face and two-byte form of character C in face FACE_ID on frame
-   F.  The encoding of C is returned in *CHAR2B.  MULTIBYTE_P non-zero
-   means we want to display multibyte text.  DISPLAY_P non-zero means
+/* Get face and two-byte form of character C in face FACE_ID on frame F.
+   The encoding of C is returned in *CHAR2B.  DISPLAY_P non-zero means
    make sure that X resources for the face returned are allocated.
    Value is a pointer to a realized face that is ready for display if
    DISPLAY_P is non-zero.  */
 
 static INLINE struct face *
 get_char_face_and_encoding (struct frame *f, int c, int face_id,
-                           XChar2b *char2b, int multibyte_p, int display_p)
+                           XChar2b *char2b, int display_p)
 {
   struct face *face = FACE_FROM_ID (f, face_id);
 
@@ -20599,7 +20597,7 @@
                                       -1, Qnil);
 
          face = get_char_face_and_encoding (s->f, c, face_id,
-                                            s->char2b + i, 1, 1);
+                                            s->char2b + i, 1);
          if (face)
            {
              if (! s->face)
@@ -20798,15 +20796,13 @@
 
 /* Fill glyph string S from a sequence of stretch glyphs.
 
-   ROW is the glyph row in which the glyphs are found, AREA is the
-   area within the row.  START is the index of the first glyph to
-   consider, END is the index of the last + 1.
+   START is the index of the first glyph to consider,
+   END is the index of the last + 1.
 
    Value is the index of the first glyph not in S.  */
 
 static int
-fill_stretch_glyph_string (struct glyph_string *s, struct glyph_row *row,
-                          enum glyph_row_area area, int start, int end)
+fill_stretch_glyph_string (struct glyph_string *s, int start, int end)
 {
   struct glyph *glyph, *last;
   int voffset, face_id;
@@ -20840,7 +20836,7 @@
 }
 
 static struct font_metrics *
-get_per_char_metric (struct frame *f, struct font *font, XChar2b *char2b)
+get_per_char_metric (struct font *font, XChar2b *char2b)
 {
   static struct font_metrics metrics;
   unsigned code = (XCHAR2B_BYTE1 (char2b) << 8) | XCHAR2B_BYTE2 (char2b);
@@ -20868,7 +20864,7 @@
       struct font_metrics *pcm;
 
       face = get_glyph_face_and_encoding (f, glyph, &char2b, NULL);
-      if (face->font && (pcm = get_per_char_metric (f, face->font, &char2b)))
+      if (face->font && (pcm = get_per_char_metric (face->font, &char2b)))
        {
          if (pcm->rbearing > pcm->width)
            *right = pcm->rbearing - pcm->width;
@@ -21102,7 +21098,7 @@
        {                                                                   \
         s = (struct glyph_string *) alloca (sizeof *s);                    \
         INIT_GLYPH_STRING (s, NULL, w, row, area, START, HL);              \
-        START = fill_stretch_glyph_string (s, row, area, START, END);      \
+        START = fill_stretch_glyph_string (s, START, END);                 \
         append_glyph_string (&HEAD, &TAIL, s);                             \
          s->x = (X);                                                       \
        }                                                                   \
@@ -22475,7 +22471,7 @@
 
          if (get_char_glyph_code (it->char_to_display, font, &char2b))
            {
-             pcm = get_per_char_metric (it->f, font, &char2b);
+             pcm = get_per_char_metric (font, &char2b);
              if (pcm->width == 0
                  && pcm->rbearing == 0 && pcm->lbearing == 0)
                pcm = NULL;
@@ -22777,8 +22773,8 @@
          if (! font_not_found_p)
            {
              get_char_face_and_encoding (it->f, c, it->face_id,
-                                         &char2b, it->multibyte_p, 0);
-             pcm = get_per_char_metric (it->f, font, &char2b);
+                                         &char2b, 0);
+             pcm = get_per_char_metric (font, &char2b);
            }
 
          /* Initialize the bounding box.  */
@@ -22838,8 +22834,8 @@
              else
                {
                  get_char_face_and_encoding (it->f, ch, face_id,
-                                             &char2b, it->multibyte_p, 0);
-                 pcm = get_per_char_metric (it->f, font, &char2b);
+                                             &char2b, 0);
+                 pcm = get_per_char_metric (font, &char2b);
                }
              if (! pcm)
                cmp->offsets[i * 2] = cmp->offsets[i * 2 + 1] = 0;


reply via email to

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