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 (c) 1995, by Sun Microsystems, Inc. 2N/A * All rights reserved. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * Copyright 1990, 1995 by Mortice Kern Systems Inc. All rights reserved. 2N/A * Push a wide character back onto the input queue. 2N/A * XPG4 is silent as to whether wget_wch() and wgetch() 2N/A * can both be used in an applicaton. Assume they can, 2N/A * in which case we have to push the multibyte equivalent 2N/A * back onto the input queue. 2N/A /* Disable echo temporarily, because we're using 2N/A * wgetch() to read in individual bytes and only 2N/A * want echo the resulting character, not the 2N/A * individual bytes composing the character. 2N/A /* Input function is wgetch(), which takes a WINDOW * for 2N/A * a parameter. The WINDOW * is used to set the "focus" by 2N/A * updatng and position the cursor in the relevant window and 2N/A * provide window specific settings. Input for all windows 2N/A * comes from one stream (__m_screen->_if), which is normally 2N/A * the terminal, but can be redirected. 2N/A /* Get the first byte or KEY_ value. */ 2N/A /* Push the byte back onto the input stream so that 2N/A * it can be processed by __m_wio_get(). 2N/A /* Fetch a wide character from a narrow input stream. 2N/A * Invalid sequences are preserved as individual bytes. 2N/A * Handles insignificant and redundant shifts in the input 2N/A /* Push any invalid multibyte sequence back onto the 2N/A * input stack, so that no data is lost, just in case 2N/A * the application mixes wide (wget_wch()) and narrow 2N/A * (wgetch()) input methods. 2N/A /* Now echo wide character if necessary. */