/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1997 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <termio.h>
#include "stty.h"
static int match;
static int eqarg(char *, int);
/* set terminal modes for supplied options */
char *
int argc;
char *argv[];
int term; /* type of tty device, -1 means allow all options,
* no sanity check
*/
{
int i;
while(--argc > 0) {
match = 0;
if(match)
continue;
}
if(match)
continue;
if (eq("ek")) {
}
}
else if (eq("dec")) {
}
continue;
}
}
}
else if(eq("sane")) {
/* SWTCH purposely not set */
}
match = 0;
if(!match)
return s_arg;
continue;
}
match = 0;
if(!match)
return s_arg;
continue;
}
else if (argc == 0) {
exit(1);
}
}
}
continue;
}
else if (argc == 0) {
exit(1);
}
}
}
}
}
continue;
}
}
}
}
}
}
}
}
else if (argc == 0) {
exit(1);
}
if(!match)
return(s_arg); /* parsing failed */
}
}
return((char *)0);
}
char *string;
{
int i;
if(!s_arg)
return(0);
i = 0;
loop:
return(0);
if(s_arg[i++] != '\0')
goto loop;
match++;
return(1);
}
/* Checks for options that require an argument */
static int
{
int status;
if (argc <= 1) {
s_arg);
exit(1);
}
}
return(status);
}
/* get pseudo control characters from terminal */
/* and convert to internal representation */
char *cp;
int term;
{
int c;
c = *cp++;
if (c == '^') {
c = *cp;
if (c == '?')
c = 0177; /* map '^?' to DEL */
else if (c == '-')
else
c &= 037;
}
return(c);
}
/* get modes of tty device and fill in applicable structures */
int
int fd;
{
int i;
int term = 0;
return -1;
for(i = 0; i < NCC; i++)
} else
}
else {
}
return term;
}
/* set tty modes */
int
{
int i;
return -1;
} else {
for(i = 0; i < NCC; i++)
return -1;
}
} else {
return -1;
}
return -1;
}
return -1;
return 0;
}
int term;
{
int last;
"%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx",
return(0);
else
for(i=0; i<last; i++)
return(1);
}