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) 1984, 1986, 1987, 1988, 1989 AT&T */ 2N/A/* All Rights Reserved */ 2N/A * Copyright (c) 1997-1999 by Sun Microsystems, Inc. 2N/A * All rights reserved. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */ 2N/A ++
wp;
/* eat leading white space */ 2N/A * Using putc instead of fputwc here to avoid 2N/A * mixing up the byte stream and the wide stream 2N/A * nothing will be outputted 2N/A * if wlen is a negative value (*wp is not printable), 2N/A * add 1 to n. (non-printable char shares 1 column. 2N/A while ((*++
wp == L
'\t') || (*
wp ==
'\n'));
2N/A }
else if (*
wp == L
'\\') {
2N/A }
else if (*(
wp +
1) == L
't') {
2N/A }
else if (*(
wp +
1) == L
' ') {
2N/A * Only if both *wp and *(wp +1) are printable, 2N/A * tries to check the binding weight between them. 2N/A * if (n + wlen) is larger than width, *wp will be 2N/A * put to the next line. 2N/A * binding weight between *wp and *(wp + 1) is 2N/A * enough small to fold the line there. 2N/A * if (n + wlen) is larger than width, *wp will 2N/A * be put to the next line. 2N/A * *wp is not printable, and shares 1 column. 2N/A * Only if both *wp and *(wp + 1) are printable, 2N/A * tries to check the binding weight between them. 2N/A * if (n + wlen) is larger than width, *wp will be 2N/A * put to the next line. 2N/A * binding weight between *wp and *(wp + 1) is 2N/A * enough small to fold the line there. 2N/A * if (n + wlen) is larger than width, *wp will 2N/A * be put to the next line. 2N/A * *wp is not printable, and shares 1 column.