/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdlib.h>
#include <string.h>
#include "curses_inc.h"
#include "print.h"
#include <signal.h> /* use this file to determine if this is SVR4.0 system */
#ifdef SIGSTOP /* SVR4.0 and beyond */
#else
#endif
char *progname;
/* global variables */
/* local variables */
static int printed = 0;
void
{
}
void
{
}
void
{
if (nwidth > 0)
}
void
{
}
static char capbools[] =
"ambsbwdadbeoeshchshzinkmmimsncnsosptulxbxnxoxsxt";
static char capnums[] =
"codBdCdFdNdTknlipbsgug";
static char capstrs[] =
"ALDCDLDOICLERISFSRUPaealasbcbtcdcechclcmcsctcvdcdldmdsedeifshoi1i2i"
"cifimipisk0k1k2k3k4k5k6k7k8k9kbkdkekhklkokrkskul0l1l2l3l4l5l6l7l"
"8l9ndnlpcr1r2r3rcrfrpscsesosrsttetitsucueupusvbvevivs";
static int
{
return (1);
else
else
}
return (0);
/*
* for (; *caplist; caplist += 2)
* if (caplist[0] == capname[0] && caplist[1] == capname[1])
* return (1);
* return (0);
*/
}
/*
* Print out the first line of an entry.
*/
void
{
/*
* Try to obtain $TERMINFO
*/
if (term == (char *)0)
term = "";
/*
* Build the suffix for this device
*/
tail[0] = '/';
/*
* as base directory
*/
else
/*
* Attempt to open the file.
*/
/*
* we are done, otherwise look there next.
*/
/*
* and $TERMINFO is not set.
*/
} else {
/*
* all hope is lost as we know it is not in $TERMINFO.
*/
/*
* All hope is lost
*/
getenv("TERMINFO"));
} else do_print = 1;
}
} else do_print = 1;
/*
* If we found it - print the comment(after closing the file)
*/
(void) printf("# Reconstructed via infocmp from file: "
"%s\n", buffer);
}
switch ((int)printing) {
case (int)pr_terminfo:
break;
case (int)pr_cap:
break;
case (int)pr_longnames:
break;
}
}
void
pr_bheading(void)
{
if (printing == pr_longnames)
(void) printf("flags\n");
printed = 0;
}
void
{
int vlen;
return;
if (onecolumn) {
if (value < 0)
switch ((int)printing) {
case (int)pr_terminfo:
break;
case (int)pr_cap:
break;
case (int)pr_longnames:
}
else
switch ((int)printing) {
case (int)pr_terminfo:
break;
case (int)pr_cap:
break;
case (int)pr_longnames:
}
} else {
switch ((int)printing) {
break;
break;
case (int)pr_longnames:
break;
}
switch ((int)printing) {
case (int)pr_terminfo:
case (int)pr_longnames:
(void) printf("\n");
break;
case (int)pr_cap:
(void) printf(":\\\n");
caplen += 1;
}
printed = 0;
}
if (printed == 0) {
switch ((int)printing) {
case (int)pr_terminfo:
(void) printf("\t");
printed = 8;
break;
case (int)pr_cap:
(void) printf("\t:");
printed = 9;
caplen += 2;
break;
case (int)pr_longnames:
(void) printf(" ");
printed = 2;
}
} else {
switch ((int)printing) {
case (int)pr_terminfo:
case (int)pr_longnames:
(void) printf(" ");
break;
case (int)pr_cap:
(void) printf(":");
caplen += 1;
}
printed++;
}
if (value < 0)
switch ((int)printing) {
case (int)pr_terminfo:
break;
case (int)pr_cap:
break;
case (int)pr_longnames:
}
else
switch ((int)printing) {
case (int)pr_terminfo:
break;
case (int)pr_cap:
break;
case (int)pr_longnames:
}
}
}
void
pr_bfooting(void)
{
switch ((int)printing) {
case (int)pr_terminfo:
case (int)pr_longnames:
(void) printf("\n");
break;
case (int)pr_cap:
(void) printf(":\\\n");
caplen += 1;
}
}
void
pr_nheading(void)
{
if (printing == pr_longnames)
(void) printf("\nnumbers\n");
printed = 0;
}
/*
* Return the length of the number if it were printed out
* with %d. The number is guaranteed to be in the range
* 0..maxshort.
*/
static int
{
value >= 0 ? 1 : 0);
}
void
{
int vlen;
return;
if (onecolumn) {
if (value < 0)
switch ((int)printing) {
case (int)pr_terminfo:
break;
case (int)pr_cap:
break;
case (int)pr_longnames:
}
else
switch ((int)printing) {
case (int)pr_terminfo:
value);
break;
case (int)pr_cap:
(void) printf("\t:%s#%d:\\\n",
break;
case (int)pr_longnames:
value);
}
} else {
switch ((int)printing) {
case (int)pr_terminfo:
break;
case (int)pr_cap:
break;
case (int)pr_longnames:
break;
}
switch ((int)printing) {
case (int)pr_terminfo:
case (int)pr_longnames:
(void) printf("\n");
break;
case (int)pr_cap:
(void) printf(":\\\n");
caplen += 1;
}
printed = 0;
}
if (printed == 0) {
switch ((int)printing) {
case (int)pr_terminfo:
(void) printf("\t");
printed = 8;
break;
case (int)pr_cap:
(void) printf("\t:");
printed = 9;
caplen += 2;
break;
case (int)pr_longnames:
(void) printf(" ");
printed = 2;
}
} else {
switch ((int)printing) {
case (int)pr_terminfo:
case (int)pr_longnames:
(void) printf(" ");
break;
case (int)pr_cap:
(void) printf(":");
caplen += 1;
}
printed++;
}
if (value < 0) {
switch ((int)printing) {
case (int)pr_terminfo:
break;
case (int)pr_cap:
break;
case (int)pr_longnames:
}
} else
switch ((int)printing) {
case (int)pr_terminfo:
value);
break;
case (int)pr_cap:
break;
case (int)pr_longnames:
value);
}
}
}
void
pr_nfooting(void)
{
switch ((int)printing) {
case (int)pr_terminfo:
case (int)pr_longnames:
(void) printf("\n");
break;
case (int)pr_cap:
(void) printf(":\\\n");
caplen += 1;
}
}
void
pr_sheading(void)
{
if (printing == pr_longnames)
(void) printf("\nstrings\n");
printed = 0;
}
void
{
char *evalue;
int badcapvalue;
return;
if (value)
}
if (onecolumn) {
switch ((int)printing) {
case (int)pr_terminfo:
break;
case (int)pr_cap:
break;
case (int)pr_longnames:
}
else
switch ((int)printing) {
case (int)pr_terminfo:
(void) printf(",\n");
break;
case (int)pr_cap:
(void) printf("\t:%s%s=",
(badcapvalue ? 1 : 0);
(void) printf(":\\\n");
caplen += 1;
break;
case (int)pr_longnames:
(void) printf("'\n");
}
} else {
switch ((int)printing) {
case (int)pr_terminfo:
break;
case (int)pr_cap:
if (badcapvalue)
nlen++;
break;
case (int)pr_longnames:
}
vlen = 1;
else
else
switch ((int)printing) {
case (int)pr_terminfo:
case (int)pr_longnames:
(void) printf("\n");
break;
case (int)pr_cap:
(void) printf(":\\\n");
caplen += 1;
}
printed = 0;
}
if (printed == 0) {
switch ((int)printing) {
case (int)pr_terminfo:
(void) printf("\t");
printed = 8;
break;
case (int)pr_cap:
(void) printf("\t:");
printed = 9;
caplen += 2;
break;
case (int)pr_longnames:
(void) printf(" ");
printed = 2;
}
} else {
switch ((int)printing) {
case (int)pr_terminfo:
case (int)pr_longnames:
(void) printf(" ");
break;
case (int)pr_cap:
(void) printf(":");
caplen += 1;
}
printed++;
}
switch ((int)printing) {
case (int)pr_terminfo:
break;
case (int)pr_cap:
break;
case (int)pr_longnames:
}
} else
switch ((int)printing) {
case (int)pr_terminfo:
evalue);
break;
case (int)pr_cap:
if (badcapvalue) {
(void) printf(".");
caplen += 1;
}
evalue);
break;
case (int)pr_longnames:
evalue);
}
}
}
void
pr_sfooting(void)
{
if (onecolumn) {
(void) printf("\n");
} else {
if (printed > 0)
switch ((int)printing) {
case (int)pr_terminfo:
case (int)pr_longnames:
(void) printf("\n");
break;
case (int)pr_cap:
(void) printf(":\n");
caplen += 1;
}
}
if (caplen >= 1024) {
"long!\n", progname);
}
if (printing == pr_longnames)
(void) printf("end of strings\n");
}