* dispextern.h (face_at_buffer_position, face_for_overlay_string)
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 26 Feb 2008 18:18:05 +0000 (18:18 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 26 Feb 2008 18:18:05 +0000 (18:18 +0000)
(face_at_string_position):
* xfaces.c (face_at_buffer_position, face_for_overlay_string)
(face_at_string_position):
* xdisp.c (display_string, next_overlay_change):
* buffer.h (overlays_at):
* buffer.c (overlays_at): Use EMACS_INT for buffer positions.
Update callers.

src/ChangeLog
src/buffer.c
src/buffer.h
src/dispextern.h
src/font.c
src/fontset.c
src/msdos.c
src/term.c
src/xdisp.c
src/xfaces.c

index f9fdb60..2e81f6d 100644 (file)
@@ -1,3 +1,14 @@
+2008-02-26  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * dispextern.h (face_at_buffer_position, face_for_overlay_string)
+       (face_at_string_position):
+       * xfaces.c (face_at_buffer_position, face_for_overlay_string)
+       (face_at_string_position):
+       * xdisp.c (display_string, next_overlay_change):
+       * buffer.h (overlays_at):
+       * buffer.c (overlays_at): Use EMACS_INT for buffer positions.
+       Update callers.
+
 2008-02-26  Chong Yidong  <cyd@stupidchicken.com>
 
        * editfns.c (Fformat): Doc fix.
index efcaafb..366f02a 100644 (file)
@@ -2691,8 +2691,8 @@ overlays_at (pos, extend, vec_ptr, len_ptr, next_ptr, prev_ptr, change_req)
      int extend;
      Lisp_Object **vec_ptr;
      int *len_ptr;
-     int *next_ptr;
-     int *prev_ptr;
+     EMACS_INT *next_ptr;
+     EMACS_INT *prev_ptr;
      int change_req;
 {
   Lisp_Object overlay, start, end;
@@ -4097,7 +4097,7 @@ DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0,
   /* Put all the overlays we want in a vector in overlay_vec.
      Store the length in len.  */
   noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len,
-                          (int *) 0, (int *) 0, 0);
+                          (EMACS_INT *) 0, (EMACS_INT *) 0, 0);
 
   /* Make a list of them all.  */
   result = Flist (noverlays, overlay_vec);
@@ -4147,7 +4147,7 @@ the value is (point-max).  */)
      Lisp_Object pos;
 {
   int noverlays;
-  int endpos;
+  EMACS_INT endpos;
   Lisp_Object *overlay_vec;
   int len;
   int i;
@@ -4161,14 +4161,14 @@ the value is (point-max).  */)
      Store the length in len.
      endpos gets the position where the next overlay starts.  */
   noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len,
-                          &endpos, (int *) 0, 1);
+                          &endpos, (EMACS_INT *) 0, 1);
 
   /* If any of these overlays ends before endpos,
      use its ending point instead.  */
   for (i = 0; i < noverlays; i++)
     {
       Lisp_Object oend;
-      int oendpos;
+      EMACS_INT oendpos;
 
       oend = OVERLAY_END (overlay_vec[i]);
       oendpos = OVERLAY_POSITION (oend);
@@ -4189,7 +4189,7 @@ the value is (point-min).  */)
      Lisp_Object pos;
 {
   int noverlays;
-  int prevpos;
+  EMACS_INT prevpos;
   Lisp_Object *overlay_vec;
   int len;
 
@@ -4207,7 +4207,7 @@ the value is (point-min).  */)
      Store the length in len.
      prevpos gets the position of the previous change.  */
   noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len,
-                          (int *) 0, &prevpos, 1);
+                          (EMACS_INT *) 0, &prevpos, 1);
 
   xfree (overlay_vec);
   return make_number (prevpos);
index 54c32d9..c5544e7 100644 (file)
@@ -834,7 +834,9 @@ extern struct buffer buffer_local_symbols;
 extern void delete_all_overlays P_ ((struct buffer *));
 extern void reset_buffer P_ ((struct buffer *));
 extern void evaporate_overlays P_ ((EMACS_INT));
-extern int overlays_at P_ ((EMACS_INT, int, Lisp_Object **, int *, int *, int *, int));
+extern int overlays_at P_ ((EMACS_INT pos, int extend, Lisp_Object **vec_ptr,
+                           int *len_ptr, EMACS_INT *next_ptr,
+                           EMACS_INT *prev_ptr, int change_req));
 extern int sort_overlays P_ ((Lisp_Object *, int, struct window *));
 extern void recenter_overlay_lists P_ ((struct buffer *, EMACS_INT));
 extern int overlay_strings P_ ((EMACS_INT, struct window *, unsigned char **));
index 652980b..642bd97 100644 (file)
@@ -2882,13 +2882,18 @@ int lookup_derived_face P_ ((struct frame *, Lisp_Object, int, int));
 void init_frame_faces P_ ((struct frame *));
 void free_frame_faces P_ ((struct frame *));
 void recompute_basic_faces P_ ((struct frame *));
-int face_at_buffer_position P_ ((struct window *, int, int, int, int *,
-                                int, int));
-int face_for_overlay_string P_ ((struct window *, int, int,
-                                int, int *,
-                                int, int, Lisp_Object));
-int face_at_string_position P_ ((struct window *, Lisp_Object, int, int, int,
-                                int, int *, enum face_id, int));
+int face_at_buffer_position P_ ((struct window *w, EMACS_INT pos,
+                                EMACS_INT region_beg, EMACS_INT region_end,
+                                EMACS_INT *endptr, EMACS_INT limit,
+                                int mouse));
+int face_for_overlay_string P_ ((struct window *w, EMACS_INT pos,
+                                EMACS_INT region_beg, EMACS_INT region_end,
+                                EMACS_INT *endptr, EMACS_INT limit,
+                                int mouse, Lisp_Object overlay));
+int face_at_string_position P_ ((struct window *w, Lisp_Object string,
+                                EMACS_INT pos, EMACS_INT bufpos,
+                                EMACS_INT region_beg, EMACS_INT region_end,
+                                EMACS_INT *endptr, enum face_id, int mouse));
 int merge_faces P_ ((struct frame *, Lisp_Object, int, int));
 int compute_char_face P_ ((struct frame *, int, Lisp_Object));
 void free_all_realized_faces P_ ((Lisp_Object));
index 754b47e..ce040fe 100644 (file)
@@ -3138,7 +3138,7 @@ font_at (c, pos, face, w, string)
   if (! face)
     {
       int face_id;
-      int endptr;
+      EMACS_INT endptr;
 
       if (STRINGP (string))
        face_id = face_at_string_position (w, string, pos, 0, -1, -1, &endptr,
index bd4553b..7e68a72 100644 (file)
@@ -2025,7 +2025,7 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0,
      (position, ch)
      Lisp_Object position, ch;
 {
-  int pos, pos_byte, dummy;
+  EMACS_INT pos, pos_byte, dummy;
   int face_id;
   int c;
   struct frame *f;
index e015942..b5418ba 100644 (file)
@@ -1645,7 +1645,7 @@ IT_note_mouse_highlight (struct frame *f, int x, int y)
                /* Find the range of text around this char that
                   should be active.  */
                Lisp_Object before, after;
-               int ignore;
+               EMACS_INT ignore;
 
                before = Foverlay_start (overlay);
                after = Foverlay_end (overlay);
@@ -1672,7 +1672,7 @@ IT_note_mouse_highlight (struct frame *f, int x, int y)
                /* Find the range of text around this char that
                   should be active.  */
                Lisp_Object before, after, beginning, end;
-               int ignore;
+               EMACS_INT ignore;
 
                beginning = Fmarker_position (w->start);
                XSETINT (end, (BUF_Z (XBUFFER (w->buffer))
index 1613223..6c236d1 100644 (file)
@@ -2775,7 +2775,7 @@ term_mouse_highlight (struct frame *f, int x, int y)
                /* Find the range of text around this char that
                   should be active.  */
                Lisp_Object before, after;
-               int ignore;
+               EMACS_INT ignore;
 
 
                before = Foverlay_start (overlay);
@@ -2804,7 +2804,7 @@ term_mouse_highlight (struct frame *f, int x, int y)
                /* Find the range of text around this char that
                   should be active.  */
                Lisp_Object before, after, beginning, end;
-               int ignore;
+               EMACS_INT ignore;
 
                beginning = Fmarker_position (w->start);
                XSETINT (end, (BUF_Z (b) - XFASTINT (w->window_end_pos)));
index dd90368..6876f16 100644 (file)
@@ -922,7 +922,7 @@ static char *decode_mode_spec P_ ((struct window *, int, int, int, int *,
 static void display_menu_bar P_ ((struct window *));
 static int display_count_lines P_ ((int, int, int, int, int *));
 static int display_string P_ ((unsigned char *, Lisp_Object, Lisp_Object,
-                              int, int, struct it *, int, int, int, int));
+                              EMACS_INT, EMACS_INT, struct it *, int, int, int, int));
 static void compute_line_metrics P_ ((struct it *));
 static void run_redisplay_end_trigger_hook P_ ((struct it *));
 static int get_overlay_strings P_ ((struct it *, int));
@@ -964,7 +964,7 @@ static void compute_stop_pos P_ ((struct it *));
 static void compute_string_pos P_ ((struct text_pos *, struct text_pos,
                                    Lisp_Object));
 static int face_before_or_after_it_pos P_ ((struct it *, int));
-static int next_overlay_change P_ ((int));
+static EMACS_INT next_overlay_change P_ ((EMACS_INT));
 static int handle_single_display_spec P_ ((struct it *, Lisp_Object,
                                           Lisp_Object, Lisp_Object,
                                           struct text_pos *, int));
@@ -3224,9 +3224,9 @@ compute_stop_pos (it)
    follows.  This is like `next-overlay-change' but doesn't use
    xmalloc.  */
 
-static int
+static EMACS_INT
 next_overlay_change (pos)
-     int pos;
+     EMACS_INT pos;
 {
   int noverlays;
   EMACS_INT endpos;
@@ -3241,7 +3241,7 @@ next_overlay_change (pos)
   for (i = 0; i < noverlays; ++i)
     {
       Lisp_Object oend;
-      int oendpos;
+      EMACS_INT oendpos;
 
       oend = OVERLAY_END (overlays[i]);
       oendpos = OVERLAY_POSITION (oend);
@@ -3353,7 +3353,8 @@ static enum prop_handled
 handle_face_prop (it)
      struct it *it;
 {
-  int new_face_id, next_stop;
+  int new_face_id;
+  EMACS_INT next_stop;
 
   if (!STRINGP (it->string))
     {
@@ -3521,7 +3522,7 @@ face_before_or_after_it_pos (it, before_p)
      int before_p;
 {
   int face_id, limit;
-  int next_check_charpos;
+  EMACS_INT next_check_charpos;
   struct text_pos pos;
 
   xassert (it->s == NULL);
@@ -4743,6 +4744,7 @@ handle_composition_prop (it)
 #ifdef USE_FONT_BACKEND
          if (composition_table[id]->method == COMPOSITION_WITH_GLYPH_STRING)
            {
+             /* FIXME: This doesn't do anything!?! */
              Lisp_Object lgstring = AREF (XHASH_TABLE (composition_hash_table)
                                           ->key_and_value,
                                           cmp->hash_index * 2);
@@ -18482,8 +18484,8 @@ display_string (string, lisp_string, face_string, face_string_pos,
      unsigned char *string;
      Lisp_Object lisp_string;
      Lisp_Object face_string;
-     int face_string_pos;
-     int start;
+     EMACS_INT face_string_pos;
+     EMACS_INT start;
      struct it *it;
      int field_width, precision, max_x;
      int multibyte;
@@ -18501,7 +18503,7 @@ display_string (string, lisp_string, face_string, face_string_pos,
      from LISP_STRING, if that's given.  */
   if (STRINGP (face_string))
     {
-      int endptr;
+      EMACS_INT endptr;
       struct face *face;
 
       it->face_id
@@ -23078,7 +23080,7 @@ note_mode_line_or_margin_highlight (window, x, y, area)
          int gpos;
          int gseq_length;
          int total_pixel_width;
-         int ignore;
+         EMACS_INT ignore;
 
          int vpos, hpos;
 
@@ -23430,7 +23432,7 @@ note_mouse_highlight (f, x, y)
              /* Find the range of text around this char that
                 should be active.  */
              Lisp_Object before, after;
-             int ignore;
+             EMACS_INT ignore;
 
              before = Foverlay_start (overlay);
              after = Foverlay_end (overlay);
@@ -23464,7 +23466,7 @@ note_mouse_highlight (f, x, y)
              /* Find the range of text around this char that
                 should be active.  */
              Lisp_Object before, after, beginning, end;
-             int ignore;
+             EMACS_INT ignore;
 
              beginning = Fmarker_position (w->start);
              end = make_number (BUF_Z (XBUFFER (object))
@@ -23504,7 +23506,7 @@ note_mouse_highlight (f, x, y)
          else if (!NILP (mouse_face) && STRINGP (object))
            {
              Lisp_Object b, e;
-             int ignore;
+             EMACS_INT ignore;
 
              b = Fprevious_single_property_change (make_number (pos + 1),
                                                    Qmouse_face,
@@ -23551,7 +23553,7 @@ note_mouse_highlight (f, x, y)
                {
                  Lisp_Object before = Foverlay_start (overlay);
                  Lisp_Object after = Foverlay_end (overlay);
-                 int ignore;
+                 EMACS_INT ignore;
 
                  /* Note that we might not be able to find position
                     BEFORE in the glyph matrix if the overlay is
index 897d838..087dc86 100644 (file)
@@ -8111,10 +8111,10 @@ int
 face_at_buffer_position (w, pos, region_beg, region_end,
                         endptr, limit, mouse)
      struct window *w;
-     int pos;
-     int region_beg, region_end;
-     int *endptr;
-     int limit;
+     EMACS_INT pos;
+     EMACS_INT region_beg, region_end;
+     EMACS_INT *endptr;
+     EMACS_INT limit;
      int mouse;
 {
   struct frame *f = XFRAME (w->frame);
@@ -8123,7 +8123,7 @@ face_at_buffer_position (w, pos, region_beg, region_end,
   int i, noverlays;
   Lisp_Object *overlay_vec;
   Lisp_Object frame;
-  int endpos;
+  EMACS_INT endpos;
   Lisp_Object propname = mouse ? Qmouse_face : Qface;
   Lisp_Object limit1, end;
   struct face *default_face;
@@ -8216,10 +8216,10 @@ int
 face_for_overlay_string (w, pos, region_beg, region_end,
                         endptr, limit, mouse, overlay)
      struct window *w;
-     int pos;
-     int region_beg, region_end;
-     int *endptr;
-     int limit;
+     EMACS_INT pos;
+     EMACS_INT region_beg, region_end;
+     EMACS_INT *endptr;
+     EMACS_INT limit;
      int mouse;
      Lisp_Object overlay;
 {
@@ -8310,9 +8310,9 @@ face_at_string_position (w, string, pos, bufpos, region_beg,
                         region_end, endptr, base_face_id, mouse_p)
      struct window *w;
      Lisp_Object string;
-     int pos, bufpos;
-     int region_beg, region_end;
-     int *endptr;
+     EMACS_INT pos, bufpos;
+     EMACS_INT region_beg, region_end;
+     EMACS_INT *endptr;
      enum face_id base_face_id;
      int mouse_p;
 {