/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/osio.h,v 1.4 1990/11/08 11:03:44 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/osio.h,v 1.5 1990/11/12 04:00:45 cph Rel $
Copyright (c) 1990 Massachusetts Institute of Technology
channel_type_unix_stream_socket,
channel_type_tcp_stream_socket,
channel_type_tcp_server_socket,
- channel_type_directory
+ channel_type_directory,
+ channel_type_character_device,
+ channel_type_block_device
};
extern size_t OS_channel_table_size;
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxfile.c,v 1.2 1990/11/08 11:07:33 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxfile.c,v 1.3 1990/11/12 04:01:05 cph Rel $
Copyright (c) 1990 Massachusetts Institute of Technology
mode_t type = ((stat_buf . st_mode) & S_IFMT);
return
((type == S_IFREG) ? channel_type_file
- : ((type == S_IFCHR) && (isatty (fd))) ? channel_type_terminal
+ : (type == S_IFCHR)
+ ? ((isatty (fd))
+ ? channel_type_terminal
+ : channel_type_character_device)
#ifdef S_IFIFO
: (type == S_IFIFO) ? channel_type_fifo
+#endif
+#ifdef S_IFBLK
+ : (type == S_IFBLK) ? channel_type_block_device
#endif
: (type == S_IFDIR) ? channel_type_directory
: channel_type_unknown);