Commit a336a1e7 authored by rrt's avatar rrt
Browse files

[project @ 2001-02-19 16:07:48 by rrt]

Move if #ifndefs so that no code is compiled on win32; the code that was
compiled was doing nothing useful, and probably shouldn't have been.
parent 984b949e
/*
* (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
*
* $Id: echoAux.c,v 1.4 2001/01/16 14:06:14 simonmar Exp $
* $Id: echoAux.c,v 1.5 2001/02/19 16:07:48 rrt Exp $
*
* Support functions for changing echoing
*/
......@@ -28,13 +28,13 @@
StgInt
setTerminalEcho(StgForeignPtr ptr, StgInt on)
{
#ifndef mingw32_TARGET_OS
IOFileObject* fo = (IOFileObject*)ptr;
struct termios tios;
int fd, rc;
fd = fo->fd;
#ifndef mingw32_TARGET_OS
while ( (rc = tcgetattr(fd,&tios)) == -1) {
if (errno != EINTR) {
cvtErrno();
......@@ -61,16 +61,15 @@ setTerminalEcho(StgForeignPtr ptr, StgInt on)
}
StgInt
getTerminalEcho(ptr)
StgForeignPtr ptr;
getTerminalEcho(StgForeignPtr ptr)
{
#ifndef mingw32_TARGET_OS
IOFileObject* fo = (IOFileObject*)ptr;
struct termios tios;
int fd, rc;
fd = fo->fd;
#ifndef mingw32_TARGET_OS
while ( (rc = tcgetattr(fd,&tios)) == -1) {
if (errno != EINTR) {
cvtErrno();
......@@ -85,16 +84,15 @@ StgForeignPtr ptr;
}
StgInt
isTerminalDevice(ptr)
StgForeignPtr ptr;
isTerminalDevice(StgForeignPtr ptr)
{
#ifndef mingw32_TARGET_OS
IOFileObject* fo = (IOFileObject*)ptr;
struct termios tios;
int fd, rc;
fd = fo -> fd;
#ifndef mingw32_TARGET_OS
while ( (rc = tcgetattr(fd,&tios)) == -1) {
if (errno == ENOTTY) return 0;
if (errno != EINTR) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment