Commit f2980264 authored by Jim Blandy's avatar Jim Blandy

Rename int-to-string to number-to-string, since it can handle

	floating-point as well as integer arguments.  subr.el defines the
	former as an alias for the latter.
	* data.c (Fnumber_to_string): Renamed from Fint_to_string.
	(wrong_type_argument): Adjust caller.
	(syms_of_data): Adjust defsubr.
	* fns.c (concat): Adjust caller.
	* lisp.h (Fnumber_to_string): Adjust extern declaration.
	* mocklisp.c (Finsert_string): Adjust caller.
	* process.c (status_message): Adjust caller.
parent 555b2421
......@@ -72,7 +72,7 @@ wrong_type_argument (predicate, value)
(EQ (predicate, Qintegerp) || EQ (predicate, Qinteger_or_marker_p)))
return Fstring_to_number (value);
if (XTYPE (value) == Lisp_Int && EQ (predicate, Qstringp))
return Fint_to_string (value);
return Fnumber_to_string (value);
}
value = Fsignal (Qwrong_type_argument, Fcons (predicate, Fcons (value, Qnil)));
tem = call1 (predicate, value);
......@@ -1425,7 +1425,7 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, "T if NUMBER is zero.")
return Qnil;
}
DEFUN ("int-to-string", Fint_to_string, Sint_to_string, 1, 1, 0,
DEFUN ("number-to-string", Fnumber_to_string, Snumber_to_string, 1, 1, 0,
"Convert NUM to a string by printing it in decimal.\n\
Uses a minus sign if negative.\n\
NUM may be an integer or a floating point number.")
......@@ -2121,7 +2121,7 @@ syms_of_data ()
defsubr (&Skill_local_variable);
defsubr (&Saref);
defsubr (&Saset);
defsubr (&Sint_to_string);
defsubr (&Snumber_to_string);
defsubr (&Sstring_to_number);
defsubr (&Seqlsign);
defsubr (&Slss);
......
......@@ -262,7 +262,7 @@ concat (nargs, args, target_type, last_special)
|| XTYPE (this) == Lisp_Compiled))
{
if (XTYPE (this) == Lisp_Int)
args[argnum] = Fint_to_string (this);
args[argnum] = Fnumber_to_string (this);
else
args[argnum] = wrong_type_argument (Qsequencep, this);
}
......
......@@ -974,7 +974,7 @@ extern Lisp_Object Fdefault_value (), Fset_default (), Fdefault_boundp ();
extern Lisp_Object Faref (), Faset (), Farray_length ();
extern Lisp_Object Fstring_to_number (), Fint_to_string ();
extern Lisp_Object Fstring_to_number (), Fnumber_to_string ();
extern Lisp_Object Feqlsign (), Fgtr (), Flss (), Fgeq (), Fleq ();
extern Lisp_Object Fneq (), Fzerop ();
extern Lisp_Object Fplus (), Fminus (), Ftimes (), Fquo (), Frem ();
......
......@@ -211,7 +211,7 @@ is converted into a string by expressing it in decimal.")
tem = args[argnum];
retry:
if (XTYPE (tem) == Lisp_Int)
tem = Fint_to_string (tem);
tem = Fnumber_to_string (tem);
if (XTYPE (tem) == Lisp_String)
insert1 (tem);
else
......
......@@ -359,7 +359,7 @@ status_message (status)
{
if (code == 0)
return build_string ("finished\n");
string = Fint_to_string (make_number (code));
string = Fnumber_to_string (make_number (code));
string2 = build_string (coredump ? " (core dumped)\n" : "\n");
return concat2 (build_string ("exited abnormally with code "),
concat2 (string, string2));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment