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 1997 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 * Remove the padding sequences from the input string. 2N/A * Return the new string without the padding sequences 2N/A * and the padding itself in padbuffer. 2N/A /* check for decimal */ 2N/A /* Termcap does not support mandatory padding */ 2N/A /* marked with /. Just remove it. */ 2N/A "padding removed\n",
2N/A /* oops, not a padding spec after all */ 2N/A /* put us back after the '$<' */ 2N/A /* Flag padding info that is not at the end */ 2N/A /* of the string. */ 2N/A "%s: padding information " 2N/A * Convert a character, making appropriate changes to make it printable 2N/A * for a termcap source entry. Change escape, tab, etc., into their 2N/A * appropriate equivalents. Return the number of characters printed. 2N/A /* should check here to make sure that there is enough room */ 2N/A /* in retbuffer and realloc it if necessary. */ 2N/A /* we ignore the return value from sprintf because BSD/V7 */ 2N/A /* systems return a (char *) rather than an int. */ 2N/A else if (c ==
'\033') {
2N/A else if (c ==
'\t') {
2N/A else if (c ==
'\b') {
2N/A else if (c ==
'\f') {
2N/A else if (c ==
'\n') {
2N/A else if (c ==
'\r') {
2N/A /* unfortunately \: did not work */ 2N/A else if (c ==
':') {
2N/A else if (c ==
'^') {
2N/A else if (c <
' ' || c == 0
177) {
2N/A * Convert the terminfo string into a termcap string. 2N/A * Most of the work is done by rmpadding() above and cconvert(); this 2N/A * function mainly just pieces things back together. A pointer to the 2N/A * return buffer is returned. 2N/A * NOTE: Some things can not be done at all: converting the terminfo 2N/A * parameterized strings into termcap parameterized strings. 2N/A * Print out a string onto a stream, changing unprintables into 2N/A * termcap printables.