[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/fns.c
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/fns.c |
Date: |
Tue, 04 Feb 2003 05:41:11 -0500 |
Index: emacs/src/fns.c
diff -c emacs/src/fns.c:1.328 emacs/src/fns.c:1.329
*** emacs/src/fns.c:1.328 Mon Jan 13 08:33:42 2003
--- emacs/src/fns.c Tue Jan 14 18:12:31 2003
***************
*** 202,208 ****
return length;
}
! DEFUN ("string-bytes", Fstring_bytes, Sstring_bytes, 1, 1, 0,
doc: /* Return the number of bytes in STRING.
If STRING is a multibyte string, this is greater than the length of STRING.
*/)
(string)
--- 202,208 ----
return length;
}
! DEFUN ("string-bytes", Fstring_bytes, Sstring_bytes, 1, 1, 0,
doc: /* Return the number of bytes in STRING.
If STRING is a multibyte string, this is greater than the length of STRING.
*/)
(string)
***************
*** 1171,1177 ****
DEFUN ("substring", Fsubstring, Ssubstring, 2, 3, 0,
doc: /* Return a substring of STRING, starting at index FROM and
ending before TO.
TO may be nil or omitted; then the substring runs to the end of STRING.
! If FROM or TO is negative, it counts from the end.
This function allows vectors as well as strings. */)
(string, from, to)
--- 1171,1177 ----
DEFUN ("substring", Fsubstring, Ssubstring, 2, 3, 0,
doc: /* Return a substring of STRING, starting at index FROM and
ending before TO.
TO may be nil or omitted; then the substring runs to the end of STRING.
! FROM and TO start at 0. If either is negative, it counts from the end.
This function allows vectors as well as strings. */)
(string, from, to)
***************
*** 1929,1935 ****
Lisp_Object prop;
{
Lisp_Object tail;
!
for (tail = plist;
CONSP (tail) && CONSP (XCDR (tail));
tail = XCDR (XCDR (tail)))
--- 1929,1935 ----
Lisp_Object prop;
{
Lisp_Object tail;
!
for (tail = plist;
CONSP (tail) && CONSP (XCDR (tail));
tail = XCDR (XCDR (tail)))
***************
*** 1945,1951 ****
if (!NILP (tail))
wrong_type_argument (Qlistp, prop);
!
return Qnil;
}
--- 1945,1951 ----
if (!NILP (tail))
wrong_type_argument (Qlistp, prop);
!
return Qnil;
}
***************
*** 1983,1989 ****
Fsetcar (XCDR (tail), val);
return plist;
}
!
prev = tail;
QUIT;
}
--- 1983,1989 ----
Fsetcar (XCDR (tail), val);
return plist;
}
!
prev = tail;
QUIT;
}
***************
*** 2018,2024 ****
Lisp_Object prop;
{
Lisp_Object tail;
!
for (tail = plist;
CONSP (tail) && CONSP (XCDR (tail));
tail = XCDR (XCDR (tail)))
--- 2018,2024 ----
Lisp_Object prop;
{
Lisp_Object tail;
!
for (tail = plist;
CONSP (tail) && CONSP (XCDR (tail));
tail = XCDR (XCDR (tail)))
***************
*** 2031,2037 ****
if (!NILP (tail))
wrong_type_argument (Qlistp, prop);
!
return Qnil;
}
--- 2031,2037 ----
if (!NILP (tail))
wrong_type_argument (Qlistp, prop);
!
return Qnil;
}
***************
*** 2059,2065 ****
Fsetcar (XCDR (tail), val);
return plist;
}
!
prev = tail;
QUIT;
}
--- 2059,2065 ----
Fsetcar (XCDR (tail), val);
return plist;
}
!
prev = tail;
QUIT;
}
***************
*** 2194,2200 ****
case Lisp_Type_Limit:
break;
}
!
return 0;
}
--- 2194,2200 ----
case Lisp_Type_Limit:
break;
}
!
return 0;
}
***************
*** 3137,3143 ****
DEFUN ("load-average", Fload_average, Sload_average, 0, 1, 0,
doc: /* Return list of 1 minute, 5 minute and 15 minute load averages.
!
Each of the three load averages is multiplied by 100, then converted
to integer.
--- 3137,3143 ----
DEFUN ("load-average", Fload_average, Sload_average, 0, 1, 0,
doc: /* Return list of 1 minute, 5 minute and 15 minute load averages.
!
Each of the three load averages is multiplied by 100, then converted
to integer.
***************
*** 3172,3178 ****
DEFUN ("featurep", Ffeaturep, Sfeaturep, 1, 2, 0,
doc: /* Returns t if FEATURE is present in this Emacs.
!
Use this to conditionalize execution of lisp code based on the
presence or absence of emacs or environment extensions.
Use `provide' to declare that a feature is available. This function
--- 3172,3178 ----
DEFUN ("featurep", Ffeaturep, Sfeaturep, 1, 2, 0,
doc: /* Returns t if FEATURE is present in this Emacs.
!
Use this to conditionalize execution of lisp code based on the
presence or absence of emacs or environment extensions.
Use `provide' to declare that a feature is available. This function
***************
*** 3249,3255 ****
CHECK_SYMBOL (feature);
tem = Fmemq (feature, Vfeatures);
!
if (NILP (tem))
{
int count = SPECPDL_INDEX ();
--- 3249,3255 ----
CHECK_SYMBOL (feature);
tem = Fmemq (feature, Vfeatures);
!
if (NILP (tem))
{
int count = SPECPDL_INDEX ();
***************
*** 3262,3268 ****
if (! NILP (Vpurify_flag))
error ("(require %s) while preparing to dump",
SDATA (SYMBOL_NAME (feature)));
!
/* A certain amount of recursive `require' is legitimate,
but if we require the same feature recursively 3 times,
signal an error. */
--- 3262,3268 ----
if (! NILP (Vpurify_flag))
error ("(require %s) while preparing to dump",
SDATA (SYMBOL_NAME (feature)));
!
/* A certain amount of recursive `require' is legitimate,
but if we require the same feature recursively 3 times,
signal an error. */
***************
*** 4709,4715 ****
{
h = XHASH_TABLE (table);
next = h->next_weak;
!
if (h->size & ARRAY_MARK_FLAG)
{
/* TABLE is marked as used. Sweep its contents. */
--- 4709,4715 ----
{
h = XHASH_TABLE (table);
next = h->next_weak;
!
if (h->size & ARRAY_MARK_FLAG)
{
/* TABLE is marked as used. Sweep its contents. */
***************
*** 4922,4928 ****
DEFUN ("make-hash-table", Fmake_hash_table, Smake_hash_table, 0, MANY, 0,
doc: /* Create and return a new hash table.
!
Arguments are specified as keyword/argument pairs. The following
arguments are defined:
--- 4922,4928 ----
DEFUN ("make-hash-table", Fmake_hash_table, Smake_hash_table, 0, MANY, 0,
doc: /* Create and return a new hash table.
!
Arguments are specified as keyword/argument pairs. The following
arguments are defined:
***************
*** 5197,5203 ****
DEFUN ("define-hash-table-test", Fdefine_hash_table_test,
Sdefine_hash_table_test, 3, 3, 0,
doc: /* Define a new hash table test with name NAME, a symbol.
!
In hash tables created with NAME specified as test, use TEST to
compare keys, and HASH for computing hash codes of keys.
--- 5197,5203 ----
DEFUN ("define-hash-table-test", Fdefine_hash_table_test,
Sdefine_hash_table_test, 3, 3, 0,
doc: /* Define a new hash table test with name NAME, a symbol.
!
In hash tables created with NAME specified as test, use TEST to
compare keys, and HASH for computing hash codes of keys.
***************
*** 5223,5229 ****
DEFUN ("md5", Fmd5, Smd5, 1, 5, 0,
doc: /* Return MD5 message digest of OBJECT, a buffer or string.
!
A message digest is a cryptographic checksum of a document, and the
algorithm to calculate it is defined in RFC 1321.
--- 5223,5229 ----
DEFUN ("md5", Fmd5, Smd5, 1, 5, 0,
doc: /* Return MD5 message digest of OBJECT, a buffer or string.
!
A message digest is a cryptographic checksum of a document, and the
algorithm to calculate it is defined in RFC 1321.
***************
*** 5271,5284 ****
if (STRING_MULTIBYTE (object))
/* use default, we can't guess correct value */
coding_system = SYMBOL_VALUE (XCAR (Vcoding_category_list));
! else
coding_system = Qraw_text;
}
!
if (NILP (Fcoding_system_p (coding_system)))
{
/* Invalid coding system. */
!
if (!NILP (noerror))
coding_system = Qraw_text;
else
--- 5271,5284 ----
if (STRING_MULTIBYTE (object))
/* use default, we can't guess correct value */
coding_system = SYMBOL_VALUE (XCAR (Vcoding_category_list));
! else
coding_system = Qraw_text;
}
!
if (NILP (Fcoding_system_p (coding_system)))
{
/* Invalid coding system. */
!
if (!NILP (noerror))
coding_system = Qraw_text;
else
***************
*** 5312,5326 ****
else
{
CHECK_NUMBER (end);
!
end_char = XINT (end);
if (end_char < 0)
end_char += size;
!
end_byte = string_char_to_byte (object, end_char);
}
!
if (!(0 <= start_char && start_char <= end_char && end_char <= size))
args_out_of_range_3 (object, make_number (start_char),
make_number (end_char));
--- 5312,5326 ----
else
{
CHECK_NUMBER (end);
!
end_char = XINT (end);
if (end_char < 0)
end_char += size;
!
end_byte = string_char_to_byte (object, end_char);
}
!
if (!(0 <= start_char && start_char <= end_char && end_char <= size))
args_out_of_range_3 (object, make_number (start_char),
make_number (end_char));
***************
*** 5330,5336 ****
CHECK_BUFFER (object);
bp = XBUFFER (object);
!
if (NILP (start))
b = BUF_BEGV (bp);
else
--- 5330,5336 ----
CHECK_BUFFER (object);
bp = XBUFFER (object);
!
if (NILP (start))
b = BUF_BEGV (bp);
else
***************
*** 5346,5361 ****
CHECK_NUMBER_COERCE_MARKER (end);
e = XINT (end);
}
!
if (b > e)
temp = b, b = e, e = temp;
!
if (!(BUF_BEGV (bp) <= b && e <= BUF_ZV (bp)))
args_out_of_range (start, end);
!
if (NILP (coding_system))
{
! /* Decide the coding-system to encode the data with.
See fileio.c:Fwrite-region */
if (!NILP (Vcoding_system_for_write))
--- 5346,5361 ----
CHECK_NUMBER_COERCE_MARKER (end);
e = XINT (end);
}
!
if (b > e)
temp = b, b = e, e = temp;
!
if (!(BUF_BEGV (bp) <= b && e <= BUF_ZV (bp)))
args_out_of_range (start, end);
!
if (NILP (coding_system))
{
! /* Decide the coding-system to encode the data with.
See fileio.c:Fwrite-region */
if (!NILP (Vcoding_system_for_write))
***************
*** 5377,5383 ****
{
/* Check file-coding-system-alist. */
Lisp_Object args[4], val;
!
args[0] = Qwrite_region; args[1] = start; args[2] = end;
args[3] = Fbuffer_file_name(object);
val = Ffind_operation_coding_system (4, args);
--- 5377,5383 ----
{
/* Check file-coding-system-alist. */
Lisp_Object args[4], val;
!
args[0] = Qwrite_region; args[1] = start; args[2] = end;
args[3] = Fbuffer_file_name(object);
val = Ffind_operation_coding_system (4, args);
***************
*** 5422,5429 ****
object = code_convert_string1 (object, coding_system, Qnil, 1);
}
! md5_buffer (SDATA (object) + start_byte,
! SBYTES (object) - (size_byte - end_byte),
digest);
for (i = 0; i < 16; i++)
--- 5422,5429 ----
object = code_convert_string1 (object, coding_system, Qnil, 1);
}
! md5_buffer (SDATA (object) + start_byte,
! SBYTES (object) - (size_byte - end_byte),
digest);
for (i = 0; i < 16; i++)
- [Emacs-diffs] Changes to emacs/src/fns.c,
Richard M. Stallman <=
- [Emacs-diffs] Changes to emacs/src/fns.c, Francesco Potortì, 2003/02/06
- [Emacs-diffs] Changes to emacs/src/fns.c, Kenichi Handa, 2003/02/09
- [Emacs-diffs] Changes to emacs/src/fns.c, Kenichi Handa, 2003/02/10
- [Emacs-diffs] Changes to emacs/src/fns.c, Dave Love, 2003/02/14
- [Emacs-diffs] Changes to emacs/src/fns.c, Kenichi Handa, 2003/02/16
- [Emacs-diffs] Changes to emacs/src/fns.c, Stefan Monnier, 2003/02/22