/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/prosio.c,v 1.6 1991/03/14 04:22:45 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/prosio.c,v 1.7 1992/02/04 04:36:56 cph Exp $
-Copyright (c) 1987-91 Massachusetts Institute of Technology
+Copyright (c) 1987-92 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
DEFINE_PRIMITIVE ("CHANNEL-SELECT-THEN-READ", Prim_channel_select_then_read, 4, 4,
"Like CHANNEL-READ, but also watches registered input channels.\n\
-If there is no input on CHANNEL, but there is input on some other registered\n\
-channel or some subprocess status changes, this procedure returns #T.")
+If there is no input on CHANNEL, returns #F.\n\
+If there is input on some other registered channel, returns -2.\n\
+If the status of some subprocess changes, returns -3.\n\
+If an interrupt occurs during the read, returns -4.")
{
PRIMITIVE_HEADER (4);
CHECK_ARG (2, STRING_P);
(OS_channel_select_then_read ((arg_channel (1)),
(STRING_LOC (buffer, start)),
(end - start)));
- PRIMITIVE_RETURN
- ((nread == -2)
- ? SHARP_T
- : (nread < 0)
- ? SHARP_F
- : (long_to_integer (nread)));
+ PRIMITIVE_RETURN ((nread == (-1)) ? SHARP_F : (long_to_integer (nread)));
}
}
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxio.c,v 1.17 1992/01/20 18:52:26 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxio.c,v 1.18 1992/02/04 04:37:03 cph Exp $
-Copyright (c) 1990-1992 Massachusetts Institute of Technology
+Copyright (c) 1990-92 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
error_system_call (errno, syscall_select);
else if (status_change_p)
return (select_input_process_status);
- deliver_pending_interrupts ();
+ if (pending_interrupts_p ())
+ return (select_input_interrupt);
}
#else
+ error_system_call (ENOSYS, syscall_select);
return (select_input_argument);
#endif
}
PTR buffer AND
size_t nbytes)
{
-#ifdef HAVE_SELECT
switch (UX_select_input ((CHANNEL_DESCRIPTOR (channel)),
(! (CHANNEL_NONBLOCKING (channel)))))
{
case select_input_none:
return (-1);
case select_input_other:
- case select_input_process_status:
return (-2);
+ case select_input_process_status:
+ return (-3);
+ case select_input_interrupt:
+ return (-4);
}
-#endif
return (OS_channel_read (channel, buffer, nbytes));
}
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxselect.h,v 1.1 1991/06/22 19:09:15 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxselect.h,v 1.2 1992/02/04 04:37:11 cph Exp $
-Copyright (c) 1991 Massachusetts Institute of Technology
+Copyright (c) 1991-92 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
select_input_argument,
select_input_other,
select_input_none,
- select_input_process_status
+ select_input_process_status,
+ select_input_interrupt
};
extern CONST int UX_have_select_p;
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.106 1992/02/04 00:43:55 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.107 1992/02/04 04:37:16 cph Exp $
Copyright (c) 1988-92 Massachusetts Institute of Technology
#define VERSION 11
#endif
#ifndef SUBVERSION
-#define SUBVERSION 106
+#define SUBVERSION 107
#endif
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11base.c,v 1.30 1992/01/22 23:13:31 arthur Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11base.c,v 1.31 1992/02/04 04:37:26 cph Exp $
-Copyright (c) 1989-91 Massachusetts Institute of Technology
+Copyright (c) 1989-92 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
case select_input_none:
return (SHARP_F);
case select_input_other:
+ return (LONG_TO_FIXNUM (-2));
case select_input_process_status:
- return (SHARP_T);
+ return (LONG_TO_FIXNUM (-3));
+ case select_input_interrupt:
+ return (LONG_TO_FIXNUM (-4));
case select_input_argument:
events_queued = (XEventsQueued (display, QueuedAfterReading));
continue;
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.106 1992/02/04 00:43:55 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.107 1992/02/04 04:37:16 cph Exp $
Copyright (c) 1988-92 Massachusetts Institute of Technology
#define VERSION 11
#endif
#ifndef SUBVERSION
-#define SUBVERSION 106
+#define SUBVERSION 107
#endif