From: Chris Hanson Date: Fri, 8 Mar 1991 01:41:48 +0000 (+0000) Subject: Add new primitive `have-ptys?'. X-Git-Tag: 20090517-FFI~10873 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b9cbfad1e366d47a7694df90a7bec73a48ddfc4a;p=mit-scheme.git Add new primitive `have-ptys?'. --- diff --git a/v7/src/microcode/osterm.h b/v7/src/microcode/osterm.h index 9ffbeb358..1884fa778 100644 --- a/v7/src/microcode/osterm.h +++ b/v7/src/microcode/osterm.h @@ -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)); diff --git a/v7/src/microcode/prosterm.c b/v7/src/microcode/prosterm.c index 58516304e..7de200135 100644 --- a/v7/src/microcode/prosterm.c +++ b/v7/src/microcode/prosterm.c @@ -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); } +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).") diff --git a/v7/src/microcode/uxterm.c b/v7/src/microcode/uxterm.c index d71093278..cdcaf3ae1 100644 --- a/v7/src/microcode/uxterm.c +++ b/v7/src/microcode/uxterm.c @@ -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) #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 */ } - + #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) diff --git a/v7/src/microcode/version.h b/v7/src/microcode/version.h index e28ee83f3..530e831ba 100644 --- a/v7/src/microcode/version.h +++ b/v7/src/microcode/version.h @@ -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 diff --git a/v8/src/microcode/version.h b/v8/src/microcode/version.h index 4036d1241..7bb4a5da3 100644 --- a/v8/src/microcode/version.h +++ b/v8/src/microcode/version.h @@ -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