4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
22 /* Copyright (c) 1988 AT&T */
23 /* All Rights Reserved */
27 * Copyright (c) 1997, by Sun Mircrosystems, Inc.
28 * All rights reserved.
31 #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5 */
35 #include <sys/types.h>
38 /* Position the cursor in the user's subwindow. */
41 _position_cursor(MENU
*m
)
47 /* x and y represent the position in our subwindow */
48 y
= Y(Current(m
)) - Top(m
);
49 x
= X(Current(m
))*(Itemlen(m
)+1);
53 x
+= Pindex(m
) + Marklen(m
) - 1;
59 (void) wmove(us
, y
, x
);
65 * The next statement gets around some aberrant
66 * behavior in curses. The subwindow is never being
67 * untouched and this results in the parent window
68 * being touched every time a syncup is done.
70 (void) untouchwin(us
);
76 pos_menu_cursor(MENU
*m
)
79 return (E_BAD_ARGUMENT
);
82 return (E_NOT_POSTED
);