questions asked by mouse commands. */
int use_file_dialog;
-extern int minibuffer_auto_raise;
-extern Lisp_Object minibuf_window;
-extern Lisp_Object Vlocale_coding_system;
-extern int load_in_progress;
-
Lisp_Object Qstring_lessp, Qprovide, Qrequire;
Lisp_Object Qyes_or_no_p_history;
Lisp_Object Qcursor_in_echo_area;
Lisp_Object Qwidget_type;
Lisp_Object Qcodeset, Qdays, Qmonths, Qpaper;
-extern Lisp_Object Qinput_method_function;
-
-static int internal_equal P_ ((Lisp_Object , Lisp_Object, int, int));
+static int internal_equal (Lisp_Object , Lisp_Object, int, int);
-extern long get_random ();
-extern void seed_random P_ ((long));
+extern long get_random (void);
+extern void seed_random (long);
#ifndef HAVE_UNISTD_H
extern long time ();
\f
DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0,
doc: /* Return the argument unchanged. */)
- (arg)
- Lisp_Object arg;
+ (Lisp_Object arg)
{
return arg;
}
With positive integer LIMIT, return random number in interval [0,LIMIT).
With argument t, set the random number seed from the current time and pid.
Other values of LIMIT are ignored. */)
- (limit)
- Lisp_Object limit;
+ (Lisp_Object limit)
{
EMACS_INT val;
Lisp_Object lispy_val;
If the string contains multibyte characters, this is not necessarily
the number of bytes in the string; it is the number of characters.
To get the number of bytes, use `string-bytes'. */)
- (sequence)
- register Lisp_Object sequence;
+ (register Lisp_Object sequence)
{
register Lisp_Object val;
register int i;
This function never gets an error. If LIST is not really a list,
it returns 0. If LIST is circular, it returns a finite value
which is at least the number of distinct elements. */)
- (list)
- Lisp_Object list;
+ (Lisp_Object list)
{
Lisp_Object tail, halftail, length;
int len = 0;
DEFUN ("string-bytes", Fstring_bytes, Sstring_bytes, 1, 1, 0,
doc: /* Return the number of bytes in STRING.
If STRING is multibyte, this may be greater than the length of STRING. */)
- (string)
- Lisp_Object string;
+ (Lisp_Object string)
{
CHECK_STRING (string);
return make_number (SBYTES (string));
doc: /* Return t if two strings have identical contents.
Case is significant, but text properties are ignored.
Symbols are also allowed; their print names are used instead. */)
- (s1, s2)
- register Lisp_Object s1, s2;
+ (register Lisp_Object s1, Lisp_Object s2)
{
if (SYMBOLP (s1))
s1 = SYMBOL_NAME (s1);
if (SCHARS (s1) != SCHARS (s2)
|| SBYTES (s1) != SBYTES (s2)
- || bcmp (SDATA (s1), SDATA (s2), SBYTES (s1)))
+ || memcmp (SDATA (s1), SDATA (s2), SBYTES (s1)))
return Qnil;
return Qt;
}
- 1 - N is the number of characters that match at the beginning.
If string STR1 is greater, the value is a positive number N;
N - 1 is the number of characters that match at the beginning. */)
- (str1, start1, end1, str2, start2, end2, ignore_case)
- Lisp_Object str1, start1, end1, start2, str2, end2, ignore_case;
+ (Lisp_Object str1, Lisp_Object start1, Lisp_Object end1, Lisp_Object str2, Lisp_Object start2, Lisp_Object end2, Lisp_Object ignore_case)
{
register int end1_char, end2_char;
register int i1, i1_byte, i2, i2_byte;
doc: /* Return t if first arg string is less than second in lexicographic order.
Case is significant.
Symbols are also allowed; their print names are used instead. */)
- (s1, s2)
- register Lisp_Object s1, s2;
+ (register Lisp_Object s1, Lisp_Object s2)
{
register int end;
register int i1, i1_byte, i2, i2_byte;
return i1 < SCHARS (s2) ? Qt : Qnil;
}
\f
-#if __GNUC__
-/* "gcc -O3" enables automatic function inlining, which optimizes out
- the arguments for the invocations of this function, whereas it
- expects these values on the stack. */
-static Lisp_Object concat P_ ((int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special)) __attribute__((noinline));
-#else /* !__GNUC__ */
-static Lisp_Object concat P_ ((int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special));
-#endif
+static Lisp_Object concat (int nargs, Lisp_Object *args,
+ enum Lisp_Type target_type, int last_special);
/* ARGSUSED */
Lisp_Object
-concat2 (s1, s2)
- Lisp_Object s1, s2;
+concat2 (Lisp_Object s1, Lisp_Object s2)
{
-#ifdef NO_ARG_ARRAY
Lisp_Object args[2];
args[0] = s1;
args[1] = s2;
return concat (2, args, Lisp_String, 0);
-#else
- return concat (2, &s1, Lisp_String, 0);
-#endif /* NO_ARG_ARRAY */
}
/* ARGSUSED */
Lisp_Object
-concat3 (s1, s2, s3)
- Lisp_Object s1, s2, s3;
+concat3 (Lisp_Object s1, Lisp_Object s2, Lisp_Object s3)
{
-#ifdef NO_ARG_ARRAY
Lisp_Object args[3];
args[0] = s1;
args[1] = s2;
args[2] = s3;
return concat (3, args, Lisp_String, 0);
-#else
- return concat (3, &s1, Lisp_String, 0);
-#endif /* NO_ARG_ARRAY */
}
DEFUN ("append", Fappend, Sappend, 0, MANY, 0,
Each argument may be a list, vector or string.
The last argument is not copied, just used as the tail of the new list.
usage: (append &rest SEQUENCES) */)
- (nargs, args)
- int nargs;
- Lisp_Object *args;
+ (int nargs, Lisp_Object *args)
{
return concat (nargs, args, Lisp_Cons, 1);
}
The result is a string whose elements are the elements of all the arguments.
Each argument may be a string or a list or vector of characters (integers).
usage: (concat &rest SEQUENCES) */)
- (nargs, args)
- int nargs;
- Lisp_Object *args;
+ (int nargs, Lisp_Object *args)
{
return concat (nargs, args, Lisp_String, 0);
}
The result is a vector whose elements are the elements of all the arguments.
Each argument may be a list, vector or string.
usage: (vconcat &rest SEQUENCES) */)
- (nargs, args)
- int nargs;
- Lisp_Object *args;
+ (int nargs, Lisp_Object *args)
{
return concat (nargs, args, Lisp_Vectorlike, 0);
}
doc: /* Return a copy of a list, vector, string or char-table.
The elements of a list or vector are not copied; they are shared
with the original. */)
- (arg)
- Lisp_Object arg;
+ (Lisp_Object arg)
{
if (NILP (arg)) return arg;
/ BOOL_VECTOR_BITS_PER_CHAR);
val = Fmake_bool_vector (Flength (arg), Qnil);
- bcopy (XBOOL_VECTOR (arg)->data, XBOOL_VECTOR (val)->data,
- size_in_chars);
+ memcpy (XBOOL_VECTOR (val)->data, XBOOL_VECTOR (arg)->data,
+ size_in_chars);
return val;
}
};
static Lisp_Object
-concat (nargs, args, target_type, last_special)
- int nargs;
- Lisp_Object *args;
- enum Lisp_Type target_type;
- int last_special;
+concat (int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special)
{
Lisp_Object val;
register Lisp_Object tail;
{
int thislen_byte = SBYTES (this);
- bcopy (SDATA (this), SDATA (val) + toindex_byte,
- SBYTES (this));
+ memcpy (SDATA (val) + toindex_byte, SDATA (this), SBYTES (this));
if (! NULL_INTERVAL_P (STRING_INTERVALS (this)))
{
textprops[num_textprops].argnum = argnum;
static EMACS_INT string_char_byte_cache_bytepos;
void
-clear_string_char_byte_cache ()
+clear_string_char_byte_cache (void)
{
string_char_byte_cache_string = Qnil;
}
/* Return the byte index corresponding to CHAR_INDEX in STRING. */
EMACS_INT
-string_char_to_byte (string, char_index)
- Lisp_Object string;
- EMACS_INT char_index;
+string_char_to_byte (Lisp_Object string, EMACS_INT char_index)
{
EMACS_INT i_byte;
EMACS_INT best_below, best_below_byte;
/* Return the character index corresponding to BYTE_INDEX in STRING. */
EMACS_INT
-string_byte_to_char (string, byte_index)
- Lisp_Object string;
- EMACS_INT byte_index;
+string_byte_to_char (Lisp_Object string, EMACS_INT byte_index)
{
EMACS_INT i, i_byte;
EMACS_INT best_below, best_below_byte;
/* Convert STRING to a multibyte string. */
Lisp_Object
-string_make_multibyte (string)
- Lisp_Object string;
+string_make_multibyte (Lisp_Object string)
{
unsigned char *buf;
EMACS_INT nbytes;
converted to eight-bit characters. */
Lisp_Object
-string_to_multibyte (string)
- Lisp_Object string;
+string_to_multibyte (Lisp_Object string)
{
unsigned char *buf;
EMACS_INT nbytes;
return make_multibyte_string (SDATA (string), nbytes, nbytes);
SAFE_ALLOCA (buf, unsigned char *, nbytes);
- bcopy (SDATA (string), buf, SBYTES (string));
+ memcpy (buf, SDATA (string), SBYTES (string));
str_to_multibyte (buf, nbytes, SBYTES (string));
ret = make_multibyte_string (buf, SCHARS (string), nbytes);
/* Convert STRING to a single-byte string. */
Lisp_Object
-string_make_unibyte (string)
- Lisp_Object string;
+string_make_unibyte (Lisp_Object string)
{
int nchars;
unsigned char *buf;
STRING is unibyte and entirely ASCII, the returned string is unibyte.
\(When the characters are all ASCII, Emacs primitives will treat the
string the same way whether it is unibyte or multibyte.) */)
- (string)
- Lisp_Object string;
+ (Lisp_Object string)
{
CHECK_STRING (string);
`nonascii-translation-table' or, if that is nil, `nonascii-insert-offset'.
If the lookup in the translation table fails, this function takes just
the low 8 bits of each character. */)
- (string)
- Lisp_Object string;
+ (Lisp_Object string)
{
CHECK_STRING (string);
Otherwise it is a newly created string, with no text properties.
If STRING is multibyte and contains a character of charset
`eight-bit', it is converted to the corresponding single byte. */)
- (string)
- Lisp_Object string;
+ (Lisp_Object string)
{
CHECK_STRING (string);
int bytes = SBYTES (string);
unsigned char *str = (unsigned char *) xmalloc (bytes);
- bcopy (SDATA (string), str, bytes);
+ memcpy (str, SDATA (string), bytes);
bytes = str_as_unibyte (str, bytes);
string = make_unibyte_string (str, bytes);
xfree (str);
It is similar to (decode-coding-string STRING 'utf-8-emacs).
If you're not sure, whether to use `string-as-multibyte' or
`string-to-multibyte', use `string-to-multibyte'. */)
- (string)
- Lisp_Object string;
+ (Lisp_Object string)
{
CHECK_STRING (string);
SBYTES (string),
&nchars, &nbytes);
new_string = make_uninit_multibyte_string (nchars, nbytes);
- bcopy (SDATA (string), SDATA (new_string),
- SBYTES (string));
+ memcpy (SDATA (new_string), SDATA (string), SBYTES (string));
if (nbytes != SBYTES (string))
str_as_multibyte (SDATA (new_string), nbytes,
SBYTES (string), NULL);
This differs from `string-as-multibyte' by converting each byte of a correct
utf-8 sequence to an eight-bit character, not just bytes that don't form a
correct sequence. */)
- (string)
- Lisp_Object string;
+ (Lisp_Object string)
{
CHECK_STRING (string);
where each `eight-bit' character is converted to the corresponding byte.
If STRING contains a non-ASCII, non-`eight-bit' character,
an error is signaled. */)
- (string)
- Lisp_Object string;
+ (Lisp_Object string)
{
CHECK_STRING (string);
The objects mapped (cars and cdrs of elements of the alist)
are shared, however.
Elements of ALIST that are not conses are also shared. */)
- (alist)
- Lisp_Object alist;
+ (Lisp_Object alist)
{
register Lisp_Object tem;
The STRING argument may also be a vector. In that case, the return
value is a new vector that contains the elements between index FROM
\(inclusive) and index TO (exclusive) of that vector argument. */)
- (string, from, to)
- Lisp_Object string;
- register Lisp_Object from, to;
+ (Lisp_Object string, register Lisp_Object from, Lisp_Object to)
{
Lisp_Object res;
int size;
If FROM or TO is negative, it counts from the end.
With one argument, just copy STRING without its properties. */)
- (string, from, to)
- Lisp_Object string;
- register Lisp_Object from, to;
+ (Lisp_Object string, register Lisp_Object from, Lisp_Object to)
{
int size, size_byte;
int from_char, to_char;
both in characters and in bytes. */
Lisp_Object
-substring_both (string, from, from_byte, to, to_byte)
- Lisp_Object string;
- int from, from_byte, to, to_byte;
+substring_both (Lisp_Object string, int from, int from_byte, int to, int to_byte)
{
Lisp_Object res;
int size;
\f
DEFUN ("nthcdr", Fnthcdr, Snthcdr, 2, 2, 0,
doc: /* Take cdr N times on LIST, return the result. */)
- (n, list)
- Lisp_Object n;
- register Lisp_Object list;
+ (Lisp_Object n, Lisp_Object list)
{
register int i, num;
CHECK_NUMBER (n);
DEFUN ("nth", Fnth, Snth, 2, 2, 0,
doc: /* Return the Nth element of LIST.
N counts from zero. If LIST is not that long, nil is returned. */)
- (n, list)
- Lisp_Object n, list;
+ (Lisp_Object n, Lisp_Object list)
{
return Fcar (Fnthcdr (n, list));
}
DEFUN ("elt", Felt, Selt, 2, 2, 0,
doc: /* Return element of SEQUENCE at index N. */)
- (sequence, n)
- register Lisp_Object sequence, n;
+ (register Lisp_Object sequence, Lisp_Object n)
{
CHECK_NUMBER (n);
if (CONSP (sequence) || NILP (sequence))
DEFUN ("member", Fmember, Smember, 2, 2, 0,
doc: /* Return non-nil if ELT is an element of LIST. Comparison done with `equal'.
The value is actually the tail of LIST whose car is ELT. */)
- (elt, list)
- register Lisp_Object elt;
- Lisp_Object list;
+ (register Lisp_Object elt, Lisp_Object list)
{
register Lisp_Object tail;
for (tail = list; CONSP (tail); tail = XCDR (tail))
DEFUN ("memq", Fmemq, Smemq, 2, 2, 0,
doc: /* Return non-nil if ELT is an element of LIST. Comparison done with `eq'.
The value is actually the tail of LIST whose car is ELT. */)
- (elt, list)
- register Lisp_Object elt, list;
+ (register Lisp_Object elt, Lisp_Object list)
{
while (1)
{
DEFUN ("memql", Fmemql, Smemql, 2, 2, 0,
doc: /* Return non-nil if ELT is an element of LIST. Comparison done with `eql'.
The value is actually the tail of LIST whose car is ELT. */)
- (elt, list)
- register Lisp_Object elt;
- Lisp_Object list;
+ (register Lisp_Object elt, Lisp_Object list)
{
register Lisp_Object tail;
doc: /* Return non-nil if KEY is `eq' to the car of an element of LIST.
The value is actually the first element of LIST whose car is KEY.
Elements of LIST that are not conses are ignored. */)
- (key, list)
- Lisp_Object key, list;
+ (Lisp_Object key, Lisp_Object list)
{
while (1)
{
Use only on lists known never to be circular. */
Lisp_Object
-assq_no_quit (key, list)
- Lisp_Object key, list;
+assq_no_quit (Lisp_Object key, Lisp_Object list)
{
while (CONSP (list)
&& (!CONSP (XCAR (list))
DEFUN ("assoc", Fassoc, Sassoc, 2, 2, 0,
doc: /* Return non-nil if KEY is `equal' to the car of an element of LIST.
The value is actually the first element of LIST whose car equals KEY. */)
- (key, list)
- Lisp_Object key, list;
+ (Lisp_Object key, Lisp_Object list)
{
Lisp_Object car;
Use only on lists known never to be circular. */
Lisp_Object
-assoc_no_quit (key, list)
- Lisp_Object key, list;
+assoc_no_quit (Lisp_Object key, Lisp_Object list)
{
while (CONSP (list)
&& (!CONSP (XCAR (list))
DEFUN ("rassq", Frassq, Srassq, 2, 2, 0,
doc: /* Return non-nil if KEY is `eq' to the cdr of an element of LIST.
The value is actually the first element of LIST whose cdr is KEY. */)
- (key, list)
- register Lisp_Object key;
- Lisp_Object list;
+ (register Lisp_Object key, Lisp_Object list)
{
while (1)
{
DEFUN ("rassoc", Frassoc, Srassoc, 2, 2, 0,
doc: /* Return non-nil if KEY is `equal' to the cdr of an element of LIST.
The value is actually the first element of LIST whose cdr equals KEY. */)
- (key, list)
- Lisp_Object key, list;
+ (Lisp_Object key, Lisp_Object list)
{
Lisp_Object cdr;
If the first member of LIST is ELT, there is no way to remove it by side effect;
therefore, write `(setq foo (delq element foo))'
to be sure of changing the value of `foo'. */)
- (elt, list)
- register Lisp_Object elt;
- Lisp_Object list;
+ (register Lisp_Object elt, Lisp_Object list)
{
register Lisp_Object tail, prev;
register Lisp_Object tem;
is not a side effect; it is simply using a different sequence.
Therefore, write `(setq foo (delete element foo))'
to be sure of changing the value of `foo'. */)
- (elt, seq)
- Lisp_Object elt, seq;
+ (Lisp_Object elt, Lisp_Object seq)
{
if (VECTORP (seq))
{
DEFUN ("nreverse", Fnreverse, Snreverse, 1, 1, 0,
doc: /* Reverse LIST by modifying cdr pointers.
Return the reversed list. */)
- (list)
- Lisp_Object list;
+ (Lisp_Object list)
{
register Lisp_Object prev, tail, next;
DEFUN ("reverse", Freverse, Sreverse, 1, 1, 0,
doc: /* Reverse LIST, copying. Return the reversed list.
See also the function `nreverse', which is used more often. */)
- (list)
- Lisp_Object list;
+ (Lisp_Object list)
{
Lisp_Object new;
return new;
}
\f
-Lisp_Object merge ();
+Lisp_Object merge (Lisp_Object org_l1, Lisp_Object org_l2, Lisp_Object pred);
DEFUN ("sort", Fsort, Ssort, 2, 2, 0,
doc: /* Sort LIST, stably, comparing elements using PREDICATE.
Returns the sorted list. LIST is modified by side effects.
PREDICATE is called with two elements of LIST, and should return non-nil
if the first element should sort before the second. */)
- (list, predicate)
- Lisp_Object list, predicate;
+ (Lisp_Object list, Lisp_Object predicate)
{
Lisp_Object front, back;
register Lisp_Object len, tem;
}
Lisp_Object
-merge (org_l1, org_l2, pred)
- Lisp_Object org_l1, org_l2;
- Lisp_Object pred;
+merge (Lisp_Object org_l1, Lisp_Object org_l2, Lisp_Object pred)
{
Lisp_Object value;
register Lisp_Object tail;
\(PROP1 VALUE1 PROP2 VALUE2...). This function returns the value
corresponding to the given PROP, or nil if PROP is not one of the
properties on the list. This function never signals an error. */)
- (plist, prop)
- Lisp_Object plist;
- Lisp_Object prop;
+ (Lisp_Object plist, Lisp_Object prop)
{
Lisp_Object tail, halftail;
DEFUN ("get", Fget, Sget, 2, 2, 0,
doc: /* Return the value of SYMBOL's PROPNAME property.
This is the last value stored with `(put SYMBOL PROPNAME VALUE)'. */)
- (symbol, propname)
- Lisp_Object symbol, propname;
+ (Lisp_Object symbol, Lisp_Object propname)
{
CHECK_SYMBOL (symbol);
return Fplist_get (XSYMBOL (symbol)->plist, propname);
otherwise the new PROP VAL pair is added. The new plist is returned;
use `(setq x (plist-put x prop val))' to be sure to use the new value.
The PLIST is modified by side effects. */)
- (plist, prop, val)
- Lisp_Object plist;
- register Lisp_Object prop;
- Lisp_Object val;
+ (Lisp_Object plist, register Lisp_Object prop, Lisp_Object val)
{
register Lisp_Object tail, prev;
Lisp_Object newcell;
DEFUN ("put", Fput, Sput, 3, 3, 0,
doc: /* Store SYMBOL's PROPNAME property with value VALUE.
It can be retrieved with `(get SYMBOL PROPNAME)'. */)
- (symbol, propname, value)
- Lisp_Object symbol, propname, value;
+ (Lisp_Object symbol, Lisp_Object propname, Lisp_Object value)
{
CHECK_SYMBOL (symbol);
XSYMBOL (symbol)->plist
\(PROP1 VALUE1 PROP2 VALUE2...). This function returns the value
corresponding to the given PROP, or nil if PROP is not
one of the properties on the list. */)
- (plist, prop)
- Lisp_Object plist;
- Lisp_Object prop;
+ (Lisp_Object plist, Lisp_Object prop)
{
Lisp_Object tail;
otherwise the new PROP VAL pair is added. The new plist is returned;
use `(setq x (lax-plist-put x prop val))' to be sure to use the new value.
The PLIST is modified by side effects. */)
- (plist, prop, val)
- Lisp_Object plist;
- register Lisp_Object prop;
- Lisp_Object val;
+ (Lisp_Object plist, register Lisp_Object prop, Lisp_Object val)
{
register Lisp_Object tail, prev;
Lisp_Object newcell;
DEFUN ("eql", Feql, Seql, 2, 2, 0,
doc: /* Return t if the two args are the same Lisp object.
Floating-point numbers of equal value are `eql', but they may not be `eq'. */)
- (obj1, obj2)
- Lisp_Object obj1, obj2;
+ (Lisp_Object obj1, Lisp_Object obj2)
{
if (FLOATP (obj1))
return internal_equal (obj1, obj2, 0, 0) ? Qt : Qnil;
Numbers are compared by value, but integers cannot equal floats.
(Use `=' if you want integers and floats to be able to be equal.)
Symbols must match exactly. */)
- (o1, o2)
- register Lisp_Object o1, o2;
+ (register Lisp_Object o1, Lisp_Object o2)
{
return internal_equal (o1, o2, 0, 0) ? Qt : Qnil;
}
doc: /* Return t if two Lisp objects have similar structure and contents.
This is like `equal' except that it compares the text properties
of strings. (`equal' ignores text properties.) */)
- (o1, o2)
- register Lisp_Object o1, o2;
+ (register Lisp_Object o1, Lisp_Object o2)
{
return internal_equal (o1, o2, 0, 1) ? Qt : Qnil;
}
PROPS, if non-nil, means compare string text properties too. */
static int
-internal_equal (o1, o2, depth, props)
- register Lisp_Object o1, o2;
- int depth, props;
+internal_equal (register Lisp_Object o1, register Lisp_Object o2, int depth, int props)
{
if (depth > 200)
error ("Stack overflow in equal");
if (XBOOL_VECTOR (o1)->size != XBOOL_VECTOR (o2)->size)
return 0;
- if (bcmp (XBOOL_VECTOR (o1)->data, XBOOL_VECTOR (o2)->data,
- size_in_chars))
+ if (memcmp (XBOOL_VECTOR (o1)->data, XBOOL_VECTOR (o2)->data,
+ size_in_chars))
return 0;
return 1;
}
return 0;
if (SBYTES (o1) != SBYTES (o2))
return 0;
- if (bcmp (SDATA (o1), SDATA (o2),
- SBYTES (o1)))
+ if (memcmp (SDATA (o1), SDATA (o2), SBYTES (o1)))
return 0;
if (props && !compare_string_intervals (o1, o2))
return 0;
return 0;
}
\f
-extern Lisp_Object Fmake_char_internal ();
DEFUN ("fillarray", Ffillarray, Sfillarray, 2, 2, 0,
doc: /* Store each element of ARRAY with ITEM.
ARRAY is a vector, string, char-table, or bool-vector. */)
- (array, item)
- Lisp_Object array, item;
+ (Lisp_Object array, Lisp_Object item)
{
register int size, index, charval;
if (VECTORP (array))
if (size != size_byte)
while (p1 < endp)
{
- int this_len = MULTIBYTE_FORM_LENGTH (p1, endp - p1);
+ int this_len = BYTES_BY_CHAR_HEAD (*p1);
if (len != this_len)
error ("Attempt to change byte length of a string");
p1 += this_len;
1, 1, 0,
doc: /* Clear the contents of STRING.
This makes STRING unibyte and may change its length. */)
- (string)
- Lisp_Object string;
+ (Lisp_Object string)
{
int len;
CHECK_STRING (string);
len = SBYTES (string);
- bzero (SDATA (string), len);
+ memset (SDATA (string), 0, len);
STRING_SET_CHARS (string, len);
STRING_SET_UNIBYTE (string);
return Qnil;
\f
/* ARGSUSED */
Lisp_Object
-nconc2 (s1, s2)
- Lisp_Object s1, s2;
+nconc2 (Lisp_Object s1, Lisp_Object s2)
{
-#ifdef NO_ARG_ARRAY
Lisp_Object args[2];
args[0] = s1;
args[1] = s2;
return Fnconc (2, args);
-#else
- return Fnconc (2, &s1);
-#endif /* NO_ARG_ARRAY */
}
DEFUN ("nconc", Fnconc, Snconc, 0, MANY, 0,
doc: /* Concatenate any number of lists by altering them.
Only the last argument is not altered, and need not be a list.
usage: (nconc &rest LISTS) */)
- (nargs, args)
- int nargs;
- Lisp_Object *args;
+ (int nargs, Lisp_Object *args)
{
register int argnum;
register Lisp_Object tail, tem, val;
LENI is the length of VALS, which should also be the length of SEQ. */
static void
-mapcar1 (leni, vals, fn, seq)
- int leni;
- Lisp_Object *vals;
- Lisp_Object fn, seq;
+mapcar1 (int leni, Lisp_Object *vals, Lisp_Object fn, Lisp_Object seq)
{
register Lisp_Object tail;
Lisp_Object dummy;
In between each pair of results, stick in SEPARATOR. Thus, " " as
SEPARATOR results in spaces between the values returned by FUNCTION.
SEQUENCE may be a list, a vector, a bool-vector, or a string. */)
- (function, sequence, separator)
- Lisp_Object function, sequence, separator;
+ (Lisp_Object function, Lisp_Object sequence, Lisp_Object separator)
{
Lisp_Object len;
register int leni;
doc: /* Apply FUNCTION to each element of SEQUENCE, and make a list of the results.
The result is a list just as long as SEQUENCE.
SEQUENCE may be a list, a vector, a bool-vector, or a string. */)
- (function, sequence)
- Lisp_Object function, sequence;
+ (Lisp_Object function, Lisp_Object sequence)
{
register Lisp_Object len;
register int leni;
doc: /* Apply FUNCTION to each element of SEQUENCE for side effects only.
Unlike `mapcar', don't accumulate the results. Return SEQUENCE.
SEQUENCE may be a list, a vector, a bool-vector, or a string. */)
- (function, sequence)
- Lisp_Object function, sequence;
+ (Lisp_Object function, Lisp_Object sequence)
{
register int leni;
Under a windowing system a dialog box will be used if `last-nonmenu-event'
is nil and `use-dialog-box' is non-nil. */)
- (prompt)
- Lisp_Object prompt;
+ (Lisp_Object prompt)
{
register Lisp_Object obj, key, def, map;
register int answer;
Anything that calls this function must protect from GC! */
Lisp_Object
-do_yes_or_no_p (prompt)
- Lisp_Object prompt;
+do_yes_or_no_p (Lisp_Object prompt)
{
return call1 (intern ("yes-or-no-p"), prompt);
}
Under a windowing system a dialog box will be used if `last-nonmenu-event'
is nil, and `use-dialog-box' is non-nil. */)
- (prompt)
- Lisp_Object prompt;
+ (Lisp_Object prompt)
{
register Lisp_Object ans;
Lisp_Object args[2];
cases making it work would require Emacs being installed setuid or
setgid so that it can read kernel information, and that usually isn't
advisable. */)
- (use_floats)
- Lisp_Object use_floats;
+ (Lisp_Object use_floats)
{
double load_ave[3];
int loads = getloadavg (load_ave, 3);
}
\f
Lisp_Object Vfeatures, Qsubfeatures;
-extern Lisp_Object Vafter_load_alist;
DEFUN ("featurep", Ffeaturep, Sfeaturep, 1, 2, 0,
doc: /* Return t if FEATURE is present in this Emacs.
Use `provide' to declare that a feature is available. This function
looks at the value of the variable `features'. The optional argument
SUBFEATURE can be used to check a specific subfeature of FEATURE. */)
- (feature, subfeature)
- Lisp_Object feature, subfeature;
+ (Lisp_Object feature, Lisp_Object subfeature)
{
register Lisp_Object tem;
CHECK_SYMBOL (feature);
doc: /* Announce that FEATURE is a feature of the current Emacs.
The optional argument SUBFEATURES should be a list of symbols listing
particular subfeatures supported in this version of FEATURE. */)
- (feature, subfeatures)
- Lisp_Object feature, subfeatures;
+ (Lisp_Object feature, Lisp_Object subfeatures)
{
register Lisp_Object tem;
CHECK_SYMBOL (feature);
Lisp_Object require_nesting_list;
Lisp_Object
-require_unwind (old_value)
- Lisp_Object old_value;
+require_unwind (Lisp_Object old_value)
{
return require_nesting_list = old_value;
}
then return nil if the file is not found instead of signaling an error.
Normally the return value is FEATURE.
The normal messages at start and end of loading FILENAME are suppressed. */)
- (feature, filename, noerror)
- Lisp_Object feature, filename, noerror;
+ (Lisp_Object feature, Lisp_Object filename, Lisp_Object noerror)
{
register Lisp_Object tem;
struct gcpro gcpro1, gcpro2;
Unlike `plist-get', this allows you to distinguish between a missing
property and a property with the value nil.
The value is actually the tail of PLIST whose car is PROP. */)
- (plist, prop)
- Lisp_Object plist, prop;
+ (Lisp_Object plist, Lisp_Object prop)
{
while (CONSP (plist) && !EQ (XCAR (plist), prop))
{
DEFUN ("widget-put", Fwidget_put, Swidget_put, 3, 3, 0,
doc: /* In WIDGET, set PROPERTY to VALUE.
The value can later be retrieved with `widget-get'. */)
- (widget, property, value)
- Lisp_Object widget, property, value;
+ (Lisp_Object widget, Lisp_Object property, Lisp_Object value)
{
CHECK_CONS (widget);
XSETCDR (widget, Fplist_put (XCDR (widget), property, value));
doc: /* In WIDGET, get the value of PROPERTY.
The value could either be specified when the widget was created, or
later with `widget-put'. */)
- (widget, property)
- Lisp_Object widget, property;
+ (Lisp_Object widget, Lisp_Object property)
{
Lisp_Object tmp;
doc: /* Apply the value of WIDGET's PROPERTY to the widget itself.
ARGS are passed as extra arguments to the function.
usage: (widget-apply WIDGET PROPERTY &rest ARGS) */)
- (nargs, args)
- int nargs;
- Lisp_Object *args;
+ (int nargs, Lisp_Object *args)
{
/* This function can GC. */
Lisp_Object newargs[3];
See also Info node `(libc)Locales'.
The data read from the system are decoded using `locale-coding-system'. */)
- (item)
- Lisp_Object item;
+ (Lisp_Object item)
{
char *str = NULL;
#ifdef HAVE_LANGINFO_CODESET
base64 characters. */
-static int base64_encode_1 P_ ((const char *, char *, int, int, int));
-static int base64_decode_1 P_ ((const char *, char *, int, int, int *));
+static int base64_encode_1 (const char *, char *, int, int, int);
+static int base64_decode_1 (const char *, char *, int, int, int *);
DEFUN ("base64-encode-region", Fbase64_encode_region, Sbase64_encode_region,
2, 3, "r",
Return the length of the encoded text.
Optional third argument NO-LINE-BREAK means do not break long lines
into shorter lines. */)
- (beg, end, no_line_break)
- Lisp_Object beg, end, no_line_break;
+ (Lisp_Object beg, Lisp_Object end, Lisp_Object no_line_break)
{
char *encoded;
int allength, length;
doc: /* Base64-encode STRING and return the result.
Optional second argument NO-LINE-BREAK means do not break long lines
into shorter lines. */)
- (string, no_line_break)
- Lisp_Object string, no_line_break;
+ (Lisp_Object string, Lisp_Object no_line_break)
{
int allength, length, encoded_length;
char *encoded;
}
static int
-base64_encode_1 (from, to, length, line_break, multibyte)
- const char *from;
- char *to;
- int length;
- int line_break;
- int multibyte;
+base64_encode_1 (const char *from, char *to, int length, int line_break, int multibyte)
{
int counter = 0, i = 0;
char *e = to;
doc: /* Base64-decode the region between BEG and END.
Return the length of the decoded text.
If the region can't be decoded, signal an error and don't modify the buffer. */)
- (beg, end)
- Lisp_Object beg, end;
+ (Lisp_Object beg, Lisp_Object end)
{
int ibeg, iend, length, allength;
char *decoded;
DEFUN ("base64-decode-string", Fbase64_decode_string, Sbase64_decode_string,
1, 1, 0,
doc: /* Base64-decode STRING and return the result. */)
- (string)
- Lisp_Object string;
+ (Lisp_Object string)
{
char *decoded;
int length, decoded_length;
characters in *NCHARS_RETURN. */
static int
-base64_decode_1 (from, to, length, multibyte, nchars_return)
- const char *from;
- char *to;
- int length;
- int multibyte;
- int *nchars_return;
+base64_decode_1 (const char *from, char *to, int length, int multibyte, int *nchars_return)
{
int i = 0;
char *e = to;
/* Function prototypes. */
-static struct Lisp_Hash_Table *check_hash_table P_ ((Lisp_Object));
-static int get_key_arg P_ ((Lisp_Object, int, Lisp_Object *, char *));
-static void maybe_resize_hash_table P_ ((struct Lisp_Hash_Table *));
-static int cmpfn_eql P_ ((struct Lisp_Hash_Table *, Lisp_Object, unsigned,
- Lisp_Object, unsigned));
-static int cmpfn_equal P_ ((struct Lisp_Hash_Table *, Lisp_Object, unsigned,
- Lisp_Object, unsigned));
-static int cmpfn_user_defined P_ ((struct Lisp_Hash_Table *, Lisp_Object,
- unsigned, Lisp_Object, unsigned));
-static unsigned hashfn_eq P_ ((struct Lisp_Hash_Table *, Lisp_Object));
-static unsigned hashfn_eql P_ ((struct Lisp_Hash_Table *, Lisp_Object));
-static unsigned hashfn_equal P_ ((struct Lisp_Hash_Table *, Lisp_Object));
-static unsigned hashfn_user_defined P_ ((struct Lisp_Hash_Table *,
- Lisp_Object));
-static unsigned sxhash_string P_ ((unsigned char *, int));
-static unsigned sxhash_list P_ ((Lisp_Object, int));
-static unsigned sxhash_vector P_ ((Lisp_Object, int));
-static unsigned sxhash_bool_vector P_ ((Lisp_Object));
-static int sweep_weak_table P_ ((struct Lisp_Hash_Table *, int));
+static struct Lisp_Hash_Table *check_hash_table (Lisp_Object);
+static int get_key_arg (Lisp_Object, int, Lisp_Object *, char *);
+static void maybe_resize_hash_table (struct Lisp_Hash_Table *);
+static int cmpfn_eql (struct Lisp_Hash_Table *, Lisp_Object, unsigned,
+ Lisp_Object, unsigned);
+static int cmpfn_equal (struct Lisp_Hash_Table *, Lisp_Object, unsigned,
+ Lisp_Object, unsigned);
+static int cmpfn_user_defined (struct Lisp_Hash_Table *, Lisp_Object,
+ unsigned, Lisp_Object, unsigned);
+static unsigned hashfn_eq (struct Lisp_Hash_Table *, Lisp_Object);
+static unsigned hashfn_eql (struct Lisp_Hash_Table *, Lisp_Object);
+static unsigned hashfn_equal (struct Lisp_Hash_Table *, Lisp_Object);
+static unsigned hashfn_user_defined (struct Lisp_Hash_Table *,
+ Lisp_Object);
+static unsigned sxhash_string (unsigned char *, int);
+static unsigned sxhash_list (Lisp_Object, int);
+static unsigned sxhash_vector (Lisp_Object, int);
+static unsigned sxhash_bool_vector (Lisp_Object);
+static int sweep_weak_table (struct Lisp_Hash_Table *, int);
\f
Lisp_Hash_Table. Otherwise, signal an error. */
static struct Lisp_Hash_Table *
-check_hash_table (obj)
- Lisp_Object obj;
+check_hash_table (Lisp_Object obj)
{
CHECK_HASH_TABLE (obj);
return XHASH_TABLE (obj);
number. */
int
-next_almost_prime (n)
- int n;
+next_almost_prime (int n)
{
if (n % 2 == 0)
n += 1;
a DEFUN parameter list. */
static int
-get_key_arg (key, nargs, args, used)
- Lisp_Object key;
- int nargs;
- Lisp_Object *args;
- char *used;
+get_key_arg (Lisp_Object key, int nargs, Lisp_Object *args, char *used)
{
int i;
vector that are not copied from VEC are set to INIT. */
Lisp_Object
-larger_vector (vec, new_size, init)
- Lisp_Object vec;
- int new_size;
- Lisp_Object init;
+larger_vector (Lisp_Object vec, int new_size, Lisp_Object init)
{
struct Lisp_Vector *v;
int i, old_size;
xassert (new_size >= old_size);
v = allocate_vector (new_size);
- bcopy (XVECTOR (vec)->contents, v->contents,
- old_size * sizeof *v->contents);
+ memcpy (v->contents, XVECTOR (vec)->contents, old_size * sizeof *v->contents);
for (i = old_size; i < new_size; ++i)
v->contents[i] = init;
XSETVECTOR (vec, v);
KEY2 are the same. */
static int
-cmpfn_eql (h, key1, hash1, key2, hash2)
- struct Lisp_Hash_Table *h;
- Lisp_Object key1, key2;
- unsigned hash1, hash2;
+cmpfn_eql (struct Lisp_Hash_Table *h, Lisp_Object key1, unsigned int hash1, Lisp_Object key2, unsigned int hash2)
{
return (FLOATP (key1)
&& FLOATP (key2)
KEY2 are the same. */
static int
-cmpfn_equal (h, key1, hash1, key2, hash2)
- struct Lisp_Hash_Table *h;
- Lisp_Object key1, key2;
- unsigned hash1, hash2;
+cmpfn_equal (struct Lisp_Hash_Table *h, Lisp_Object key1, unsigned int hash1, Lisp_Object key2, unsigned int hash2)
{
return hash1 == hash2 && !NILP (Fequal (key1, key2));
}
if KEY1 and KEY2 are the same. */
static int
-cmpfn_user_defined (h, key1, hash1, key2, hash2)
- struct Lisp_Hash_Table *h;
- Lisp_Object key1, key2;
- unsigned hash1, hash2;
+cmpfn_user_defined (struct Lisp_Hash_Table *h, Lisp_Object key1, unsigned int hash1, Lisp_Object key2, unsigned int hash2)
{
if (hash1 == hash2)
{
in a Lisp integer. */
static unsigned
-hashfn_eq (h, key)
- struct Lisp_Hash_Table *h;
- Lisp_Object key;
+hashfn_eq (struct Lisp_Hash_Table *h, Lisp_Object key)
{
unsigned hash = XUINT (key) ^ XTYPE (key);
xassert ((hash & ~INTMASK) == 0);
in a Lisp integer. */
static unsigned
-hashfn_eql (h, key)
- struct Lisp_Hash_Table *h;
- Lisp_Object key;
+hashfn_eql (struct Lisp_Hash_Table *h, Lisp_Object key)
{
unsigned hash;
if (FLOATP (key))
in a Lisp integer. */
static unsigned
-hashfn_equal (h, key)
- struct Lisp_Hash_Table *h;
- Lisp_Object key;
+hashfn_equal (struct Lisp_Hash_Table *h, Lisp_Object key)
{
unsigned hash = sxhash (key, 0);
xassert ((hash & ~INTMASK) == 0);
guaranteed to fit in a Lisp integer. */
static unsigned
-hashfn_user_defined (h, key)
- struct Lisp_Hash_Table *h;
- Lisp_Object key;
+hashfn_user_defined (struct Lisp_Hash_Table *h, Lisp_Object key)
{
Lisp_Object args[2], hash;
one of the symbols `key', `value', `key-or-value', or `key-and-value'. */
Lisp_Object
-make_hash_table (test, size, rehash_size, rehash_threshold, weak,
- user_test, user_hash)
- Lisp_Object test, size, rehash_size, rehash_threshold, weak;
- Lisp_Object user_test, user_hash;
+make_hash_table (Lisp_Object test, Lisp_Object size, Lisp_Object rehash_size,
+ Lisp_Object rehash_threshold, Lisp_Object weak,
+ Lisp_Object user_test, Lisp_Object user_hash)
{
struct Lisp_Hash_Table *h;
Lisp_Object table;
only the table itself is. */
Lisp_Object
-copy_hash_table (h1)
- struct Lisp_Hash_Table *h1;
+copy_hash_table (struct Lisp_Hash_Table *h1)
{
Lisp_Object table;
struct Lisp_Hash_Table *h2;
h2 = allocate_hash_table ();
next = h2->vec_next;
- bcopy (h1, h2, sizeof *h2);
+ memcpy (h2, h1, sizeof *h2);
h2->vec_next = next;
h2->key_and_value = Fcopy_sequence (h1->key_and_value);
h2->hash = Fcopy_sequence (h1->hash);
because it's already too large, throw an error. */
static INLINE void
-maybe_resize_hash_table (h)
- struct Lisp_Hash_Table *h;
+maybe_resize_hash_table (struct Lisp_Hash_Table *h)
{
if (NILP (h->next_free))
{
matching KEY, or -1 if not found. */
int
-hash_lookup (h, key, hash)
- struct Lisp_Hash_Table *h;
- Lisp_Object key;
- unsigned *hash;
+hash_lookup (struct Lisp_Hash_Table *h, Lisp_Object key, unsigned int *hash)
{
unsigned hash_code;
int start_of_bucket;
Value is the index of the entry in H matching KEY. */
int
-hash_put (h, key, value, hash)
- struct Lisp_Hash_Table *h;
- Lisp_Object key, value;
- unsigned hash;
+hash_put (struct Lisp_Hash_Table *h, Lisp_Object key, Lisp_Object value, unsigned int hash)
{
int start_of_bucket, i;
/* Remove the entry matching KEY from hash table H, if there is one. */
static void
-hash_remove_from_table (h, key)
- struct Lisp_Hash_Table *h;
- Lisp_Object key;
+hash_remove_from_table (struct Lisp_Hash_Table *h, Lisp_Object key)
{
unsigned hash_code;
int start_of_bucket;
/* Clear hash table H. */
void
-hash_clear (h)
- struct Lisp_Hash_Table *h;
+hash_clear (struct Lisp_Hash_Table *h)
{
if (h->count > 0)
{
************************************************************************/
void
-init_weak_hash_tables ()
+init_weak_hash_tables (void)
{
weak_hash_tables = NULL;
}
non-zero if anything was marked. */
static int
-sweep_weak_table (h, remove_entries_p)
- struct Lisp_Hash_Table *h;
- int remove_entries_p;
+sweep_weak_table (struct Lisp_Hash_Table *h, int remove_entries_p)
{
int bucket, n, marked;
from Vweak_hash_tables. Called from gc_sweep. */
void
-sweep_weak_hash_tables ()
+sweep_weak_hash_tables (void)
{
struct Lisp_Hash_Table *h, *used, *next;
int marked;
code returned is guaranteed to fit in a Lisp integer. */
static unsigned
-sxhash_string (ptr, len)
- unsigned char *ptr;
- int len;
+sxhash_string (unsigned char *ptr, int len)
{
unsigned char *p = ptr;
unsigned char *end = p + len;
list. We don't recurse deeper than SXHASH_MAX_DEPTH in it. */
static unsigned
-sxhash_list (list, depth)
- Lisp_Object list;
- int depth;
+sxhash_list (Lisp_Object list, int depth)
{
unsigned hash = 0;
int i;
the Lisp structure. */
static unsigned
-sxhash_vector (vec, depth)
- Lisp_Object vec;
- int depth;
+sxhash_vector (Lisp_Object vec, int depth)
{
unsigned hash = ASIZE (vec);
int i, n;
/* Return a hash for bool-vector VECTOR. */
static unsigned
-sxhash_bool_vector (vec)
- Lisp_Object vec;
+sxhash_bool_vector (Lisp_Object vec)
{
unsigned hash = XBOOL_VECTOR (vec)->size;
int i, n;
structure. Value is an unsigned integer clipped to INTMASK. */
unsigned
-sxhash (obj, depth)
- Lisp_Object obj;
- int depth;
+sxhash (Lisp_Object obj, int depth)
{
unsigned hash;
DEFUN ("sxhash", Fsxhash, Ssxhash, 1, 1, 0,
doc: /* Compute a hash code for OBJ and return it as integer. */)
- (obj)
- Lisp_Object obj;
+ (Lisp_Object obj)
{
unsigned hash = sxhash (obj, 0);
return make_number (hash);
is nil.
usage: (make-hash-table &rest KEYWORD-ARGS) */)
- (nargs, args)
- int nargs;
- Lisp_Object *args;
+ (int nargs, Lisp_Object *args)
{
Lisp_Object test, size, rehash_size, rehash_threshold, weak;
Lisp_Object user_test, user_hash;
/* The vector `used' is used to keep track of arguments that
have been consumed. */
used = (char *) alloca (nargs * sizeof *used);
- bzero (used, nargs * sizeof *used);
+ memset (used, 0, nargs * sizeof *used);
/* See if there's a `:test TEST' among the arguments. */
i = get_key_arg (QCtest, nargs, args, used);
DEFUN ("copy-hash-table", Fcopy_hash_table, Scopy_hash_table, 1, 1, 0,
doc: /* Return a copy of hash table TABLE. */)
- (table)
- Lisp_Object table;
+ (Lisp_Object table)
{
return copy_hash_table (check_hash_table (table));
}
DEFUN ("hash-table-count", Fhash_table_count, Shash_table_count, 1, 1, 0,
doc: /* Return the number of elements in TABLE. */)
- (table)
- Lisp_Object table;
+ (Lisp_Object table)
{
return make_number (check_hash_table (table)->count);
}
DEFUN ("hash-table-rehash-size", Fhash_table_rehash_size,
Shash_table_rehash_size, 1, 1, 0,
doc: /* Return the current rehash size of TABLE. */)
- (table)
- Lisp_Object table;
+ (Lisp_Object table)
{
return check_hash_table (table)->rehash_size;
}
DEFUN ("hash-table-rehash-threshold", Fhash_table_rehash_threshold,
Shash_table_rehash_threshold, 1, 1, 0,
doc: /* Return the current rehash threshold of TABLE. */)
- (table)
- Lisp_Object table;
+ (Lisp_Object table)
{
return check_hash_table (table)->rehash_threshold;
}
The size can be used as an argument to `make-hash-table' to create
a hash table than can hold as many elements as TABLE holds
without need for resizing. */)
- (table)
- Lisp_Object table;
+ (Lisp_Object table)
{
struct Lisp_Hash_Table *h = check_hash_table (table);
return make_number (HASH_TABLE_SIZE (h));
DEFUN ("hash-table-test", Fhash_table_test, Shash_table_test, 1, 1, 0,
doc: /* Return the test TABLE uses. */)
- (table)
- Lisp_Object table;
+ (Lisp_Object table)
{
return check_hash_table (table)->test;
}
DEFUN ("hash-table-weakness", Fhash_table_weakness, Shash_table_weakness,
1, 1, 0,
doc: /* Return the weakness of TABLE. */)
- (table)
- Lisp_Object table;
+ (Lisp_Object table)
{
return check_hash_table (table)->weak;
}
DEFUN ("hash-table-p", Fhash_table_p, Shash_table_p, 1, 1, 0,
doc: /* Return t if OBJ is a Lisp hash table object. */)
- (obj)
- Lisp_Object obj;
+ (Lisp_Object obj)
{
return HASH_TABLE_P (obj) ? Qt : Qnil;
}
DEFUN ("clrhash", Fclrhash, Sclrhash, 1, 1, 0,
doc: /* Clear hash table TABLE and return it. */)
- (table)
- Lisp_Object table;
+ (Lisp_Object table)
{
hash_clear (check_hash_table (table));
/* Be compatible with XEmacs. */
DEFUN ("gethash", Fgethash, Sgethash, 2, 3, 0,
doc: /* Look up KEY in TABLE and return its associated value.
If KEY is not found, return DFLT which defaults to nil. */)
- (key, table, dflt)
- Lisp_Object key, table, dflt;
+ (Lisp_Object key, Lisp_Object table, Lisp_Object dflt)
{
struct Lisp_Hash_Table *h = check_hash_table (table);
int i = hash_lookup (h, key, NULL);
doc: /* Associate KEY with VALUE in hash table TABLE.
If KEY is already present in table, replace its current value with
VALUE. */)
- (key, value, table)
- Lisp_Object key, value, table;
+ (Lisp_Object key, Lisp_Object value, Lisp_Object table)
{
struct Lisp_Hash_Table *h = check_hash_table (table);
int i;
DEFUN ("remhash", Fremhash, Sremhash, 2, 2, 0,
doc: /* Remove KEY from TABLE. */)
- (key, table)
- Lisp_Object key, table;
+ (Lisp_Object key, Lisp_Object table)
{
struct Lisp_Hash_Table *h = check_hash_table (table);
hash_remove_from_table (h, key);
DEFUN ("maphash", Fmaphash, Smaphash, 2, 2, 0,
doc: /* Call FUNCTION for all entries in hash table TABLE.
FUNCTION is called with two arguments, KEY and VALUE. */)
- (function, table)
- Lisp_Object function, table;
+ (Lisp_Object function, Lisp_Object table)
{
struct Lisp_Hash_Table *h = check_hash_table (table);
Lisp_Object args[3];
argument and return an integer that is the hash code of the argument.
Hash code computation should use the whole value range of integers,
including negative integers. */)
- (name, test, hash)
- Lisp_Object name, test, hash;
+ (Lisp_Object name, Lisp_Object test, Lisp_Object hash)
{
return Fput (name, Qhash_table_test, list2 (test, hash));
}
If NOERROR is non-nil, silently assume the `raw-text' coding if the
guesswork fails. Normally, an error is signaled in such case. */)
- (object, start, end, coding_system, noerror)
- Lisp_Object object, start, end, coding_system, noerror;
+ (Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp_Object coding_system, Lisp_Object noerror)
{
unsigned char digest[16];
unsigned char value[33];
\f
void
-syms_of_fns ()
+syms_of_fns (void)
{
/* Hash table stuff. */
Qhash_table_p = intern_c_string ("hash-table-p");
void
-init_fns ()
+init_fns (void)
{
}