1/* $Header: /src/pub/tcsh/tc.disc.c,v 3.15 2004/11/23 02:10:49 christos Exp $ */ |
2/* 3 * tc.disc.c: Functions to set/clear line disciplines 4 * 5 */ 6/*- 7 * Copyright (c) 1980, 1991 The Regents of the University of California. 8 * All rights reserved. 9 * --- 18 unchanged lines hidden (view full) --- 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 */ 34#include "sh.h" 35 |
36RCSID("$Id: tc.disc.c,v 3.15 2004/11/23 02:10:49 christos Exp $") |
37 38#ifdef OREO 39#include <compat.h> 40#endif /* OREO */ 41 42#include "ed.h" 43 |
44static int add_discipline = 0; /* Did we add a line discipline */ |
45 46#if defined(IRIS4D) || defined(OREO) || defined(sonyrisc) 47# define HAVE_DISC 48# ifndef POSIX 49static struct termio otermiob; 50# else 51static struct termios otermiob; 52# endif /* POSIX */ --- 107 unchanged lines hidden (view full) --- 160 } 161 else 162 oldisc = -1; 163 return (0); 164 } 165 else 166 return (-1); 167# else |
168 USE(f); |
169 return (0); 170# endif /* TIOCGETD && NTTYDISC */ 171#endif /* !HAVE_DISC */ 172} /* end setdisc */ 173 174 175int 176/*ARGSUSED*/ --- 11 unchanged lines hidden (view full) --- 188#endif /* _IBMR2 */ 189 190#ifndef HAVE_DISC 191# if defined(TIOCSETD) && defined(NTTYDISC) 192 return (ioctl(f, TIOCSETD, (ioctl_t) & oldisc)); 193# endif /* TIOCSETD && NTTYDISC */ 194#endif /* !HAVE_DISC */ 195 } |
196 USE(f); |
197 return (0); 198} /* end resetdisc */ |