Add new primitive `have-ptys?'.
authorChris Hanson <org/chris-hanson/cph>
Fri, 8 Mar 1991 01:41:48 +0000 (01:41 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 8 Mar 1991 01:41:48 +0000 (01:41 +0000)
v7/src/microcode/osterm.h
v7/src/microcode/prosterm.c
v7/src/microcode/uxterm.c
v7/src/microcode/version.h
v8/src/microcode/version.h

index 9ffbeb358c6731ba9d9f5edbbf8919562b5cf5ba..1884fa778069e21db34fd64751eb8f933b09ce1a 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/osterm.h,v 1.5 1990/11/08 11:12:58 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/osterm.h,v 1.6 1991/03/08 01:41:34 cph Exp $
 
-Copyright (c) 1990 Massachusetts Institute of Technology
+Copyright (c) 1990-91 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -55,6 +55,7 @@ extern void EXFUN (OS_terminal_flush_input, (Tchannel channel));
 extern void EXFUN (OS_terminal_flush_output, (Tchannel channel));
 extern void EXFUN (OS_terminal_drain_output, (Tchannel channel));
 extern int EXFUN (OS_job_control_p, (void));
+extern int EXFUN (OS_have_ptys_p, (void));
 extern CONST char * EXFUN
   (OS_open_pty_master, (Tchannel * master_fd, CONST char ** master_fname));
 extern void EXFUN (OS_pty_master_send_signal, (Tchannel channel, int sig));
index 58516304efac994c16ecd5dc92405d4e299fb59b..7de20013583f17ee3e4cbc81ecf05f75b97180f2 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/prosterm.c,v 1.7 1990/11/14 16:59:18 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/prosterm.c,v 1.8 1991/03/08 01:41:38 cph Exp $
 
-Copyright (c) 1990 Massachusetts Institute of Technology
+Copyright (c) 1990-91 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -182,6 +182,12 @@ DEFINE_PRIMITIVE ("TERMINAL-DRAIN-OUTPUT", Prim_terminal_drain_output, 1, 1,
   PRIMITIVE_RETURN (UNSPECIFIC);
 }
 \f
+DEFINE_PRIMITIVE ("HAVE-PTYS?", Prim_have_ptys_p, 0, 0, 0)
+{
+  PRIMITIVE_HEADER (0);
+  PRIMITIVE_RETURN (BOOLEAN_TO_OBJECT (OS_have_ptys_p ()));
+}
+
 DEFINE_PRIMITIVE ("OPEN-PTY-MASTER", Prim_open_pty_master, 0, 0,
   "Open a PTY master, returning the master's channel and the slave's name.\n\
 Returns a vector #(CHANNEL MASTER-NAME SLAVE-NAME).")
index d7109327824b86ca7e1b0a8b3a783831e65c116b..cdcaf3ae16abbf93bd10a4b33b6e64ca22155abf 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxterm.c,v 1.11 1991/01/24 11:26:08 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxterm.c,v 1.12 1991/03/08 01:41:42 cph Exp $
 
 Copyright (c) 1990-1 Massachusetts Institute of Technology
 
@@ -486,6 +486,12 @@ DEFUN_VOID (OS_job_control_p)
 \f
 #ifdef HAVE_PTYS
 
+int
+DEFUN_VOID (OS_have_ptys_p)
+{
+  return (1);
+}
+
 /* Open an available pty, putting channel in (*ptyv),
    and return the file name of the pty.
    Signal error if none available.  */
@@ -564,9 +570,15 @@ DEFUN (OS_pty_master_send_signal, (channel, sig), Tchannel channel AND int sig)
 #endif /* HAVE_BSD_JOB_CONTROL */
 #endif /* TIOCSIGSEND */
 }
-\f
+
 #else /* not HAVE_PTYS */
 
+int
+DEFUN_VOID (OS_have_ptys_p)
+{
+  return (0);
+}
+
 CONST char *
 DEFUN (OS_open_pty_master, (master_fd, master_fname),
        Tchannel * master_fd AND
@@ -581,7 +593,7 @@ DEFUN (OS_pty_master_send_signal, (channel, sig), Tchannel channel AND int sig)
   error_unimplemented_primitive ();
 }
 
-#endif /* HAVE_PTYS */
+#endif /* not HAVE_PTYS */
 
 void
 DEFUN (OS_pty_master_kill, (channel), Tchannel channel)
index e28ee83f3b79908559a506ef77e3a3391b901b4f..530e831ba6f01338098cde40589f4de15a519933 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.64 1991/03/06 00:32:59 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.65 1991/03/08 01:41:48 cph Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     64
+#define SUBVERSION     65
 #endif
index 4036d1241f295c7ce7ca9519602efed73c106e7d..7bb4a5da3cf006c643f44739d6b19a3912e9797b 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.64 1991/03/06 00:32:59 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.65 1991/03/08 01:41:48 cph Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     64
+#define SUBVERSION     65
 #endif