2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A/* Copyright (c) 1988 AT&T */ 2N/A/* All Rights Reserved */ 2N/A * University Copyright- Copyright (c) 1982, 1986, 1988 2N/A * The Regents of the University of California 2N/A * All Rights Reserved 2N/A * University Acknowledgment- Portions of this document are derived from 2N/A * software developed by the University of California, Berkeley, and its 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * Figure out (roughly) how much each of these capabilities costs. 2N/A * In the parameterized cases, we just take a typical case and 2N/A * use that value. This is done only once at startup, since it 2N/A * would be too expensive for intensive use. 2N/A 52,
/* insert_character, */ 2N/A 21,
/* delete_character, */ 2N/A 12,
/* cursor_home, */ 2N/A 18,
/* cursor_to_ll, */ 2N/A 14,
/* cursor_left, */ 2N/A 17,
/* cursor_right, */ 2N/A 11,
/* cursor_down, */ 2N/A 19,
/* cursor_up, */ 2N/A 2,
/* carriage_return, */ 2N/A 108,
/* parm_ich, */ 2N/A 105,
/* parm_dch, */ 2N/A 111,
/* parm_left_cursor, */ 2N/A 114,
/* parm_up_cursor, */ 2N/A 107,
/* parm_down_cursor, */ 2N/A 112,
/* parm_right_cursor, */ 2N/A * This next block of code is actually correct in that it takes into 2N/A * account many things that wrefresh has to keep figuring in the function 2N/A * _useidch. Wrefresh MUST be changed (in the words of Tony Hansen) !!! 2N/A * Wrefresh has been changed (in my words -Phong Vo) !!!! 2N/A * Figure out the _COST in characters to print this string. 2N/A * Due to padding, we can't just use strlen, so instead we 2N/A * feed it through tputs and trap the results. 2N/A * Even if the terminal uses xon/xoff handshaking, count the 2N/A * pad chars here since they estimate the real time to do the 2N/A * operation, useful in calculating costs.