+2008-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * process.c (Faccept_process_output): If `millisec' is non-nil,
+ `seconds' default to 0.
+ (wait_reading_process_output): Also return non-nil if we read output
+ from a non-running process.
+
2008-05-29 Jason Rumney <jasonr@gnu.org>
- * w32font.c (w32font_open_internal): Prefer truetype fonts unless
- 'raster' specified.
+ * w32font.c (w32font_open_internal): Prefer truetype fonts unless
+ 'raster' specified.
2008-05-29 Juanma Barranquero <lekktu@gmail.com>
seconds and milliseconds to wait; return after that much time whether
or not there is input. If SECONDS is a floating point number,
it specifies a fractional number of seconds to wait.
+The MILLISEC argument is obsolete and should be avoided.
If optional fourth arg JUST-THIS-ONE is non-nil, only accept output
from PROCESS, suspending reading output from other processes.
else
just_this_one = Qnil;
+ if (!NILP (millisec))
+ { /* Obsolete calling convention using integers rather than floats. */
+ CHECK_NUMBER (millisec);
+ if (NILP (seconds))
+ seconds = make_float (XINT (millisec) / 1000.0);
+ else
+ {
+ CHECK_NUMBER (seconds);
+ seconds = make_float (XINT (millisec) / 1000.0 + XINT (seconds));
+ }
+ }
+
if (!NILP (seconds))
{
if (INTEGERP (seconds))
else
wrong_type_argument (Qnumberp, seconds);
- if (INTEGERP (millisec))
- {
- int carry;
- usecs += XINT (millisec) * 1000;
- carry = usecs / 1000000;
- secs += carry;
- if ((usecs -= carry * 1000000) < 0)
- {
- secs--;
- usecs += 1000000;
- }
- }
-
if (secs < 0 || (secs == 0 && usecs == 0))
secs = -1, usecs = 0;
}
break;
if (0 < nread)
- total_nread += nread;
+ {
+ total_nread += nread;
+ got_some_input = 1;
+ }
#ifdef EIO
else if (nread == -1 && EIO == errno)
break;