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) 1988 AT&T */ 2N/A/* All Rights Reserved */ 2N/A * Copyright (c) 1997, by Sun Microsystems, Inc. 2N/A * All rights reserved. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * Clear the space occupied by a multicolumn character 2N/A /* ASSERT(_scrmax > 1); */ 2N/A /* compute the bounds for the character */ 2N/A /* update the change structure */ 2N/A /* clear the character */ 2N/A * Make sure the window cursor point to a valid place. 2N/A * If win->_insmode or isedge, the cursor has to 2N/A * point to the start of a whole character; otherwise, the 2N/A * cursor has to point to a part of a whole character. 2N/A /* ASSERT(_scrmax > 1); */ 2N/A /* make wp points to the start column of a mb-character */ 2N/A /* make sure that wp points to a whole character */ 2N/A /* ASSERT(_mbtrue); */ 2N/A /* decode the character into a sequence of bytes */ 2N/A /* add the sequence to the image */ 2N/A for (n = 0; n <
nc; ++n) {
2N/A /* first byte of a multi-byte character */ 2N/A /* non-first byte */ 2N/A /* if character is not ready to process */ 2N/A /* begin processing the character */ 2N/A /* window too small or char cannot be stored */ 2N/A /* if the character won't fit into the line */ 2N/A /* perform the right shift */ 2N/A /* clear any multi-byte char about to be overwritten */ 2N/A /* pack two bytes at a time */ 2N/A /* do the remaining byte if any */ 2N/A /* fill-in for remaining display columns */ 2N/A /* the first column has Continue BIT off */