From: Chris Hanson Date: Fri, 18 Dec 1987 00:03:51 +0000 (+0000) Subject: Alter `OS_tty_read_char' under unix so that it echoes the input if the X-Git-Tag: 20090517-FFI~12979 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=21a18ee24d047af5ae5e47daae2b76487569ad75;p=mit-scheme.git Alter `OS_tty_read_char' under unix so that it echoes the input if the standard input is a file. --- diff --git a/v7/src/microcode/pruxfs.c b/v7/src/microcode/pruxfs.c index 6f3fe8c1f..02f362496 100644 --- a/v7/src/microcode/pruxfs.c +++ b/v7/src/microcode/pruxfs.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/pruxfs.c,v 9.24 1987/11/23 06:46:36 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/pruxfs.c,v 9.25 1987/12/18 00:03:51 cph Rel $ Copyright (c) 1987 Massachusetts Institute of Technology @@ -246,69 +246,18 @@ filemodestring (s, a) struct stat *s; char *a; { - static char ftypelet (); - static void rwx (), setst (); + extern char file_type_letter (); + extern void rwx (), setst (); - a[0] = ftypelet (s); + (a [0]) = (file_type_letter (s)); /* Aren't there symbolic names for these byte-fields? */ - rwx ((s->st_mode & 0700) << 0, &(a[1])); - rwx ((s->st_mode & 0070) << 3, &(a[4])); - rwx ((s->st_mode & 0007) << 6, &(a[7])); - setst (s->st_mode, a); + rwx (((s -> st_mode) & 0700) << 0, (& (a [1]))); + rwx (((s -> st_mode) & 0070) << 3, (& (a [4]))); + rwx (((s -> st_mode) & 0007) << 6, (& (a [7]))); + setst ((s -> st_mode), a); return; } -/* ftypelet - file type letter - - Ftypelet accepts a file status block and returns a character code - describing the type of the file. 'd' is returned for directories, - 'b' for block special files, 'c' for character special files, 'm' - for multiplexor files, 'l' for symbolic link, 's' for socket, 'p' - for fifo, '-' for any other file type */ - -static char -ftypelet (s) - struct stat *s; -{ - switch (s->st_mode & S_IFMT) - { - default: - return '-'; - case S_IFDIR: - return 'd'; -#ifdef S_IFLNK - case S_IFLNK: - return 'l'; -#endif -#ifdef S_IFCHR - case S_IFCHR: - return 'c'; -#endif -#ifdef S_IFBLK - case S_IFBLK: - return 'b'; -#endif -#ifdef S_IFMPC -/* These do not seem to exist */ - case S_IFMPC: - case S_IFMPB: - return 'm'; -#endif -#ifdef S_IFSOCK - case S_IFSOCK: - return 's'; -#endif -#ifdef S_IFIFO - case S_IFIFO: - return 'p'; -#endif -#ifdef S_IFNWK /* hp-ux hack */ - case S_IFNWK: - return 'n'; -#endif - } -} - /* rwx - look at read, write, and execute bits and set character flags accordingly. */ diff --git a/v7/src/microcode/version.h b/v7/src/microcode/version.h index 2d215792b..19c26e9ec 100644 --- a/v7/src/microcode/version.h +++ b/v7/src/microcode/version.h @@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising, promotional, or sales literature without prior written consent from MIT in each case. */ -/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 10.15 1987/12/16 19:39:33 cph Exp $ +/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 10.16 1987/12/18 00:02:45 cph Exp $ This file contains version information for the microcode. */ @@ -46,7 +46,7 @@ This file contains version information for the microcode. */ #define VERSION 10 #endif #ifndef SUBVERSION -#define SUBVERSION 15 +#define SUBVERSION 16 #endif #ifndef UCODE_TABLES_FILENAME diff --git a/v8/src/microcode/version.h b/v8/src/microcode/version.h index 3b2d07ea8..0d9996ab1 100644 --- a/v8/src/microcode/version.h +++ b/v8/src/microcode/version.h @@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising, promotional, or sales literature without prior written consent from MIT in each case. */ -/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 10.15 1987/12/16 19:39:33 cph Exp $ +/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 10.16 1987/12/18 00:02:45 cph Exp $ This file contains version information for the microcode. */ @@ -46,7 +46,7 @@ This file contains version information for the microcode. */ #define VERSION 10 #endif #ifndef SUBVERSION -#define SUBVERSION 15 +#define SUBVERSION 16 #endif #ifndef UCODE_TABLES_FILENAME