Also, be more systematic in calls to string_to_number.
* src/sysdep.c (list_system_processes) [HAVE_PROCFS]: Allow pids
to be floating-point if they exceed fixnum range. This partially
reverts my patch 2018-03-09T20:06:05Z!eggert@cs.ucla.edu, which
went too far in fixing string-to-number mishandling.
while (*p == ' ' || *p == '\t')
p++;
- val = string_to_number (p, b, 1);
+ val = string_to_number (p, b, true);
return NILP (val) ? make_number (0) : val;
}
\f
invalid_syntax (buf);
}
- return string_to_number (buf, radix, 0);
+ return string_to_number (buf, radix, false);
}
if (!quoted && !uninterned_symbol)
{
- Lisp_Object result = string_to_number (read_buffer, 10, 0);
+ Lisp_Object result = string_to_number (read_buffer, 10, false);
if (! NILP (result))
return unbind_to (count, result);
}
if (NILP (tem))
{
Lisp_Object process_number
- = string_to_number (SSDATA (process), 10, 1);
+ = string_to_number (SSDATA (process), 10, true);
if (NUMBERP (process_number))
tem = process_number;
}
for (tail = proclist; CONSP (tail); tail = next)
{
next = XCDR (tail);
- Lisp_Object pidstring = XCAR (tail);
- Lisp_Object pid = Fstring_to_number (pidstring, Qnil);
- if (!INTEGERP (pid) || XINT (pid) <= 0)
- xsignal1 (Qoverflow_error, pidstring);
- XSETCAR (tail, pid);
+ XSETCAR (tail, Fstring_to_number (XCAR (tail), Qnil));
}
/* directory_files_internal returns the files in reverse order; undo
value = Qunspecified;
else if (EQ (attr, QCheight))
{
- value = Fstring_to_number (value, make_number (10));
+ value = Fstring_to_number (value, Qnil);
if (!INTEGERP (value) || XINT (value) <= 0)
signal_error ("Invalid face height from X resource", value);
}