emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/xdisp.c


From: Ken Raeburn
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c
Date: Tue, 16 Jul 2002 15:49:12 -0400

Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.766 emacs/src/xdisp.c:1.767
*** emacs/src/xdisp.c:1.766     Tue Jul 16 09:47:07 2002
--- emacs/src/xdisp.c   Tue Jul 16 15:49:12 2002
***************
*** 713,719 ****
  static void reconsider_clip_changes P_ ((struct window *, struct buffer *));
  static int text_outside_line_unchanged_p P_ ((struct window *, int, int));
  static void store_frame_title_char P_ ((char));
! static int store_frame_title P_ ((unsigned char *, int, int));
  static void x_consider_frame_title P_ ((Lisp_Object));
  static void handle_stop P_ ((struct it *));
  static int tool_bar_lines_needed P_ ((struct frame *));
--- 713,719 ----
  static void reconsider_clip_changes P_ ((struct window *, struct buffer *));
  static int text_outside_line_unchanged_p P_ ((struct window *, int, int));
  static void store_frame_title_char P_ ((char));
! static int store_frame_title P_ ((const unsigned char *, int, int));
  static void x_consider_frame_title P_ ((Lisp_Object));
  static void handle_stop P_ ((struct it *));
  static int tool_bar_lines_needed P_ ((struct frame *));
***************
*** 732,738 ****
  static int display_echo_area_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, 
EMACS_INT));
  static int resize_mini_window_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, 
EMACS_INT));
  static Lisp_Object unwind_redisplay P_ ((Lisp_Object));
! static int string_char_and_length P_ ((unsigned char *, int, int *));
  static struct text_pos display_prop_end P_ ((struct it *, Lisp_Object,
                                             struct text_pos));
  static int compute_window_start_on_continuation_line P_ ((struct window *));
--- 732,738 ----
  static int display_echo_area_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, 
EMACS_INT));
  static int resize_mini_window_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, 
EMACS_INT));
  static Lisp_Object unwind_redisplay P_ ((Lisp_Object));
! static int string_char_and_length P_ ((const unsigned char *, int, int *));
  static struct text_pos display_prop_end P_ ((struct it *, Lisp_Object,
                                             struct text_pos));
  static int compute_window_start_on_continuation_line P_ ((struct window *));
***************
*** 1149,1155 ****
  
  static INLINE int
  string_char_and_length (str, maxlen, len)
!      unsigned char *str;
       int maxlen, *len;
  {
    int c;
--- 1149,1155 ----
  
  static INLINE int
  string_char_and_length (str, maxlen, len)
!      const unsigned char *str;
       int maxlen, *len;
  {
    int c;
***************
*** 1180,1186 ****
    if (STRING_MULTIBYTE (string))
      {
        int rest = SBYTES (string) - BYTEPOS (pos);
!       unsigned char *p = SDATA (string) + BYTEPOS (pos);
        int len;
  
        while (nchars--)
--- 1180,1186 ----
    if (STRING_MULTIBYTE (string))
      {
        int rest = SBYTES (string) - BYTEPOS (pos);
!       const unsigned char *p = SDATA (string) + BYTEPOS (pos);
        int len;
  
        while (nchars--)
***************
*** 1878,1885 ****
  
    for (i = 0; i < it->n_overlay_strings; ++i)
      {
!       char *s = SDATA (it->overlay_strings[i]);
!       char *e = s + SBYTES (it->overlay_strings[i]);
  
        while (s < e && *s != '\n')
        ++s;
--- 1878,1885 ----
  
    for (i = 0; i < it->n_overlay_strings; ++i)
      {
!       const char *s = SDATA (it->overlay_strings[i]);
!       const char *e = s + SBYTES (it->overlay_strings[i]);
  
        while (s < e && *s != '\n')
        ++s;
***************
*** 2485,2491 ****
         suitable for unibyte text if IT->string is unibyte.  */
        if (STRING_MULTIBYTE (it->string))
        {
!         unsigned char *p = SDATA (it->string) + BYTEPOS (pos);
          int rest = SBYTES (it->string) - BYTEPOS (pos);
          int c, len;
          struct face *face = FACE_FROM_ID (it->f, face_id);
--- 2485,2491 ----
         suitable for unibyte text if IT->string is unibyte.  */
        if (STRING_MULTIBYTE (it->string))
        {
!         const unsigned char *p = SDATA (it->string) + BYTEPOS (pos);
          int rest = SBYTES (it->string) - BYTEPOS (pos);
          int c, len;
          struct face *face = FACE_FROM_ID (it->f, face_id);
***************
*** 4612,4618 ****
        else if (STRING_MULTIBYTE (it->string))
        {
          int remaining = SBYTES (it->string) - IT_STRING_BYTEPOS (*it);
!         unsigned char *s = SDATA (it->string) + IT_STRING_BYTEPOS (*it);
          it->c = string_char_and_length (s, remaining, &it->len);
        }
        else
--- 4612,4619 ----
        else if (STRING_MULTIBYTE (it->string))
        {
          int remaining = SBYTES (it->string) - IT_STRING_BYTEPOS (*it);
!         const unsigned char *s = (SDATA (it->string)
!                                   + IT_STRING_BYTEPOS (*it));
          it->c = string_char_and_length (s, remaining, &it->len);
        }
        else
***************
*** 4641,4647 ****
        else if (STRING_MULTIBYTE (it->string))
        {
          int maxlen = SBYTES (it->string) - IT_STRING_BYTEPOS (*it);
!         unsigned char *s = SDATA (it->string) + IT_STRING_BYTEPOS (*it);
          it->c = string_char_and_length (s, maxlen, &it->len);
        }
        else
--- 4642,4649 ----
        else if (STRING_MULTIBYTE (it->string))
        {
          int maxlen = SBYTES (it->string) - IT_STRING_BYTEPOS (*it);
!         const unsigned char *s = (SDATA (it->string)
!                                   + IT_STRING_BYTEPOS (*it));
          it->c = string_char_and_length (s, maxlen, &it->len);
        }
        else
***************
*** 5653,5659 ****
  
  void
  message_dolog (m, nbytes, nlflag, multibyte)
!      char *m;
       int nbytes, nlflag, multibyte;
  {
    if (!NILP (Vmemory_full))
--- 5655,5661 ----
  
  void
  message_dolog (m, nbytes, nlflag, multibyte)
!      const char *m;
       int nbytes, nlflag, multibyte;
  {
    if (!NILP (Vmemory_full))
***************
*** 5867,5873 ****
  
  void
  message2 (m, nbytes, multibyte)
!      char *m;
       int nbytes;
       int multibyte;
  {
--- 5869,5875 ----
  
  void
  message2 (m, nbytes, multibyte)
!      const char *m;
       int nbytes;
       int multibyte;
  {
***************
*** 5883,5889 ****
  
  void
  message2_nolog (m, nbytes, multibyte)
!      char *m;
       int nbytes;
  {
    struct frame *sf = SELECTED_FRAME ();
--- 5885,5891 ----
  
  void
  message2_nolog (m, nbytes, multibyte)
!      const char *m;
       int nbytes;
  {
    struct frame *sf = SELECTED_FRAME ();
***************
*** 6904,6910 ****
  
  void
  set_message (s, string, nbytes, multibyte_p)
!      char *s;
       Lisp_Object string;
       int nbytes;
  {
--- 6906,6912 ----
  
  void
  set_message (s, string, nbytes, multibyte_p)
!      const char *s;
       Lisp_Object string;
       int nbytes;
  {
***************
*** 6930,6936 ****
       Lisp_Object a2;
       EMACS_INT nbytes, multibyte_p;
  {
!   char *s = (char *) a1;
    Lisp_Object string = a2;
  
    xassert (BEG == Z);
--- 6932,6938 ----
       Lisp_Object a2;
       EMACS_INT nbytes, multibyte_p;
  {
!   const char *s = (const char *) a1;
    Lisp_Object string = a2;
  
    xassert (BEG == Z);
***************
*** 6984,6990 ****
        {
          /* Convert from single-byte to multi-byte.  */
          int i, c, n;
!         unsigned char *msg = (unsigned char *) s;
          unsigned char str[MAX_MULTIBYTE_LENGTH];
  
          /* Convert a single-byte string to multibyte.  */
--- 6986,6992 ----
        {
          /* Convert from single-byte to multi-byte.  */
          int i, c, n;
!         const unsigned char *msg = (const unsigned char *) s;
          unsigned char str[MAX_MULTIBYTE_LENGTH];
  
          /* Convert a single-byte string to multibyte.  */
***************
*** 7222,7228 ****
  
  static int
  store_frame_title (str, field_width, precision)
!      unsigned char *str;
       int field_width, precision;
  {
    int n = 0;
--- 7224,7230 ----
  
  static int
  store_frame_title (str, field_width, precision)
!      const unsigned char *str;
       int field_width, precision;
  {
    int n = 0;
***************
*** 12510,12519 ****
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    struct buffer *buffer = XBUFFER (w->buffer);
    struct buffer *old = current_buffer;
!   unsigned char *arrow_string = SDATA (Voverlay_arrow_string);
    int arrow_len = SCHARS (Voverlay_arrow_string);
!   unsigned char *arrow_end = arrow_string + arrow_len;
!   unsigned char *p;
    struct it it;
    int multibyte_p;
    int n_glyphs_before;
--- 12512,12521 ----
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    struct buffer *buffer = XBUFFER (w->buffer);
    struct buffer *old = current_buffer;
!   const unsigned char *arrow_string = SDATA (Voverlay_arrow_string);
    int arrow_len = SCHARS (Voverlay_arrow_string);
!   const unsigned char *arrow_end = arrow_string + arrow_len;
!   const unsigned char *p;
    struct it it;
    int multibyte_p;
    int n_glyphs_before;
***************
*** 13717,13723 ****
        {
        /* A string: output it and check for %-constructs within it.  */
        unsigned char c;
!       unsigned char *this, *lisp_string;
  
        if (!NILP (props) || risky)
          {
--- 13719,13725 ----
        {
        /* A string: output it and check for %-constructs within it.  */
        unsigned char c;
!       const unsigned char *this, *lisp_string;
  
        if (!NILP (props) || risky)
          {
***************
*** 13794,13800 ****
                   || !NILP (mode_line_string_list)
                   || it->current_x < it->last_visible_x))
          {
!           unsigned char *last = this;
  
            /* Advance to end of string or next format specifier.  */
            while ((c = *this++) != '\0' && c != '%')
--- 13796,13802 ----
                   || !NILP (mode_line_string_list)
                   || it->current_x < it->last_visible_x))
          {
!           const unsigned char *last = this;
  
            /* Advance to end of string or next format specifier.  */
            while ((c = *this++) != '\0' && c != '%')
***************
*** 13833,13839 ****
              }
            else /* c == '%' */
              {
!               unsigned char *percent_position = this;
  
                /* Get the specified minimum width.  Zero means
                   don't pad.  */
--- 13835,13841 ----
              }
            else /* c == '%' */
              {
!               const unsigned char *percent_position = this;
  
                /* Get the specified minimum width.  Zero means
                   don't pad.  */
***************
*** 14333,14339 ****
  {
    Lisp_Object val;
    int multibyte = !NILP (current_buffer->enable_multibyte_characters);
!   unsigned char *eol_str;
    int eol_str_len;
    /* The EOL conversion we are using.  */
    Lisp_Object eoltype;
--- 14335,14341 ----
  {
    Lisp_Object val;
    int multibyte = !NILP (current_buffer->enable_multibyte_characters);
!   const unsigned char *eol_str;
    int eol_str_len;
    /* The EOL conversion we are using.  */
    Lisp_Object eoltype;
***************
*** 14385,14392 ****
        else if (INTEGERP (eoltype)
               && CHAR_VALID_P (XINT (eoltype), 0))
        {
!         eol_str = (unsigned char *) alloca (MAX_MULTIBYTE_LENGTH);
!         eol_str_len = CHAR_STRING (XINT (eoltype), eol_str);
        }
        else
        {
--- 14387,14395 ----
        else if (INTEGERP (eoltype)
               && CHAR_VALID_P (XINT (eoltype), 0))
        {
!         unsigned char *tmp = (unsigned char *) alloca (MAX_MULTIBYTE_LENGTH);
!         eol_str_len = CHAR_STRING (XINT (eoltype), tmp);
!         eol_str = tmp;
        }
        else
        {



reply via email to

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