/[emacs]/emacs/src/editfns.c
ViewVC logotype

Diff of /emacs/src/editfns.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.330.2.15 by miles, Mon Oct 25 04:22:26 2004 UTC revision 1.330.2.16 by miles, Fri Oct 29 02:05:10 2004 UTC
# Line 2775  It returns the number of characters chan Line 2775  It returns the number of characters chan
2775    
2776    pos = XINT (start);    pos = XINT (start);
2777    pos_byte = CHAR_TO_BYTE (pos);    pos_byte = CHAR_TO_BYTE (pos);
2778    end_pos = XINT (end);    end_pos = XINT (end);
2779    modify_region (current_buffer, pos, XINT (end));    modify_region (current_buffer, pos, XINT (end));
2780    
2781    cnt = 0;    cnt = 0;
# Line 3049  static int message_length; Line 3049  static int message_length;
3049    
3050  DEFUN ("message", Fmessage, Smessage, 1, MANY, 0,  DEFUN ("message", Fmessage, Smessage, 1, MANY, 0,
3051         doc: /* Print a one-line message at the bottom of the screen.         doc: /* Print a one-line message at the bottom of the screen.
3052    The message also goes into the `*Messages*' buffer.
3053    \(In keyboard macros, that's all it does.)
3054    
3055  The first argument is a format control string, and the rest are data  The first argument is a format control string, and the rest are data
3056  to be formatted under control of the string.  See `format' for details.  to be formatted under control of the string.  See `format' for details.
3057    
3058  If the first argument is nil, clear any existing message; let the  If the first argument is nil, the function clears any existing message;
3059  minibuffer contents show.  this lets the minibuffer contents show.  See also `current-message'.
3060    
3061  usage: (message STRING &rest ARGS)  */)  usage: (message STRING &rest ARGS)  */)
3062       (nargs, args)       (nargs, args)
# Line 3268  usage: (format STRING &rest OBJECTS)  */ Line 3271  usage: (format STRING &rest OBJECTS)  */
3271    /* discarded[I] is 1 if byte I of the format    /* discarded[I] is 1 if byte I of the format
3272       string was not copied into the output.       string was not copied into the output.
3273       It is 2 if byte I was not the first byte of its character.  */       It is 2 if byte I was not the first byte of its character.  */
3274    char *discarded;    char *discarded = 0;
3275    
3276    /* Each element records, for one argument,    /* Each element records, for one argument,
3277       the start and end bytepos in the output string,       the start and end bytepos in the output string,
# Line 3319  usage: (format STRING &rest OBJECTS)  */ Line 3322  usage: (format STRING &rest OBJECTS)  */
3322    {    {
3323      int nbytes = (nargs+1) * sizeof *info;      int nbytes = (nargs+1) * sizeof *info;
3324      int i;      int i;
3325      info = (struct info *) alloca (nbytes);      if (!info)
3326          info = (struct info *) alloca (nbytes);
3327      bzero (info, nbytes);      bzero (info, nbytes);
3328      for (i = 0; i <= nargs; i++)      for (i = 0; i <= nargs; i++)
3329        info[i].start = -1;        info[i].start = -1;
3330      discarded = (char *) alloca (SBYTES (args[0]));      if (!discarded)
3331          SAFE_ALLOCA (discarded, char *, SBYTES (args[0]));
3332      bzero (discarded, SBYTES (args[0]));      bzero (discarded, SBYTES (args[0]));
3333    }    }
3334    
# Line 3684  usage: (format STRING &rest OBJECTS)  */ Line 3689  usage: (format STRING &rest OBJECTS)  */
3689    val = make_specified_string (buf, nchars, p - buf, multibyte);    val = make_specified_string (buf, nchars, p - buf, multibyte);
3690    
3691    /* If we allocated BUF with malloc, free it too.  */    /* If we allocated BUF with malloc, free it too.  */
3692    SAFE_FREE (total);    SAFE_FREE ();
3693    
3694    /* If the format string has text properties, or any of the string    /* If the format string has text properties, or any of the string
3695       arguments has text properties, set up text properties of the       arguments has text properties, set up text properties of the
# Line 4056  Transposing beyond buffer boundaries is Line 4061  Transposing beyond buffer boundaries is
4061            bcopy (start2_addr, temp, len2_byte);            bcopy (start2_addr, temp, len2_byte);
4062            bcopy (start1_addr, start1_addr + len2_byte, len1_byte);            bcopy (start1_addr, start1_addr + len2_byte, len1_byte);
4063            bcopy (temp, start1_addr, len2_byte);            bcopy (temp, start1_addr, len2_byte);
4064            SAFE_FREE (len2_byte);            SAFE_FREE ();
4065          }          }
4066        else        else
4067          /* First region not smaller than second.  */          /* First region not smaller than second.  */
# Line 4069  Transposing beyond buffer boundaries is Line 4074  Transposing beyond buffer boundaries is
4074            bcopy (start1_addr, temp, len1_byte);            bcopy (start1_addr, temp, len1_byte);
4075            bcopy (start2_addr, start1_addr, len2_byte);            bcopy (start2_addr, start1_addr, len2_byte);
4076            bcopy (temp, start1_addr + len2_byte, len1_byte);            bcopy (temp, start1_addr + len2_byte, len1_byte);
4077            SAFE_FREE (len1_byte);            SAFE_FREE ();
4078          }          }
4079        graft_intervals_into_buffer (tmp_interval1, start1 + len2,        graft_intervals_into_buffer (tmp_interval1, start1 + len2,
4080                                     len1, current_buffer, 0);                                     len1, current_buffer, 0);
# Line 4105  Transposing beyond buffer boundaries is Line 4110  Transposing beyond buffer boundaries is
4110            bcopy (start1_addr, temp, len1_byte);            bcopy (start1_addr, temp, len1_byte);
4111            bcopy (start2_addr, start1_addr, len2_byte);            bcopy (start2_addr, start1_addr, len2_byte);
4112            bcopy (temp, start2_addr, len1_byte);            bcopy (temp, start2_addr, len1_byte);
4113            SAFE_FREE (len1_byte);            SAFE_FREE ();
4114    
4115            graft_intervals_into_buffer (tmp_interval1, start2,            graft_intervals_into_buffer (tmp_interval1, start2,
4116                                         len1, current_buffer, 0);                                         len1, current_buffer, 0);
# Line 4134  Transposing beyond buffer boundaries is Line 4139  Transposing beyond buffer boundaries is
4139            bcopy (start1_addr, start1_addr + len_mid + len2_byte, len1_byte);            bcopy (start1_addr, start1_addr + len_mid + len2_byte, len1_byte);
4140            safe_bcopy (start1_addr + len1_byte, start1_addr + len2_byte, len_mid);            safe_bcopy (start1_addr + len1_byte, start1_addr + len2_byte, len_mid);
4141            bcopy (temp, start1_addr, len2_byte);            bcopy (temp, start1_addr, len2_byte);
4142            SAFE_FREE (len2_byte);            SAFE_FREE ();
4143    
4144            graft_intervals_into_buffer (tmp_interval1, end2 - len1,            graft_intervals_into_buffer (tmp_interval1, end2 - len1,
4145                                         len1, current_buffer, 0);                                         len1, current_buffer, 0);
# Line 4165  Transposing beyond buffer boundaries is Line 4170  Transposing beyond buffer boundaries is
4170            bcopy (start2_addr, start1_addr, len2_byte);            bcopy (start2_addr, start1_addr, len2_byte);
4171            bcopy (start1_addr + len1_byte, start1_addr + len2_byte, len_mid);            bcopy (start1_addr + len1_byte, start1_addr + len2_byte, len_mid);
4172            bcopy (temp, start1_addr + len2_byte + len_mid, len1_byte);            bcopy (temp, start1_addr + len2_byte + len_mid, len1_byte);
4173            SAFE_FREE (len1_byte);            SAFE_FREE ();
4174    
4175            graft_intervals_into_buffer (tmp_interval1, end2 - len1,            graft_intervals_into_buffer (tmp_interval1, end2 - len1,
4176                                         len1, current_buffer, 0);                                         len1, current_buffer, 0);

Legend:
Removed from v.1.330.2.15  
changed lines
  Added in v.1.330.2.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26