/*
* 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 (c) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1997, by Sun Mircrosystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.10 */
/*LINTLIBRARY*/
#include "private.h"
int
{
int i, n;
int top;
int ret;
if (!m) {
return (E_BAD_ARGUMENT);
}
if (Indriver(m)) {
return (E_BAD_STATE);
}
if (!Posted(m)) {
return (E_NOT_POSTED);
}
if (c > KEY_MAX && c < MAX_COMMAND) {
/* Clear the pattern buffer if not one of these requests */
if (c != REQ_BACK_PATTERN &&
c != REQ_NEXT_MATCH &&
c != REQ_PREV_MATCH) {
Pindex(m) = 0;
IthPattern(m, 0) = '\0';
}
switch (c) {
case REQ_RIGHT_ITEM: {
break;
}
break;
}
case REQ_LEFT_ITEM: {
break;
}
break;
}
case REQ_UP_ITEM: {
break;
}
break;
}
case REQ_DOWN_ITEM: {
break;
}
break;
}
case REQ_SCR_ULINE: {
if (--top < 0) {
++top;
break;
}
break;
}
case REQ_SCR_DLINE: {
--top;
break;
}
break;
}
case REQ_SCR_UPAGE: {
if (n) {
top -= n;
for (i = n; i--; ) {
}
} else {
break;
}
break;
}
case REQ_SCR_DPAGE: {
if (n) {
top += n;
for (i = n; i--; ) {
}
} else {
break;
}
break;
}
case REQ_FIRST_ITEM: {
break;
}
case REQ_LAST_ITEM: {
break;
}
case REQ_NEXT_MATCH: {
if (IthPattern(m, 0) != NULL) {
} else {
} else {
}
}
break;
}
case REQ_NEXT_ITEM: {
if (Cyclic(m)) {
} else {
}
} else {
}
break;
}
case REQ_PREV_MATCH: {
if (IthPattern(m, 0) != NULL) {
} else {
/* This differs from PREV_ITEM in that */
/* it is cyclic */
} else {
}
}
break;
}
case REQ_PREV_ITEM: {
if (Cyclic(m)) {
} else {
}
} else {
}
break;
}
case REQ_TOGGLE_ITEM: {
if (!OneValue(m)) {
if (Selectable(Current(m))) {
_move_post_item(m, Current(m));
_show(m);
} else {
}
} else {
}
break;
}
case REQ_BACK_PATTERN: {
if (Pindex(m) > 0) {
Pindex(m) -= 1;
_position_cursor(m);
} else {
}
break;
}
case REQ_CLEAR_PATTERN: {
/* This was already done at the top */
break;
}
default: {
}
}
} else {
if (c > 037 && c < 0177) {
/*LINTED [E_PASS_INT_TO_SMALL_INT]*/
} else {
}
}
/* Verify the location of the top row */
return (ret);
}