slk.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 (c) 1995-1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/* LINTLIBRARY */
/*
* slk.c
*
* XCurses Library
*
* Copyright 1990, 1995 by Mortice Kern Systems Inc. All rights reserved.
*
*/
#if M_RCSID
#ifndef lint
static char rcsID[] =
"$Header: /team/ps/sun_xcurses/archive/local_changes/xcurses/src/lib/"
"cbates Exp $";
#endif
#endif
#include <private.h>
#include <string.h>
int __m_slk_labels_on;
int __m_slk_touched = 0;
/*
* Flag for initialisation soft label keys once setupterm() has been called.
*/
int
{
__m_slk_labels_on = 1;
}
return (code);
}
int
{
return (code);
}
int
{
return (code);
}
int
{
return (code);
}
int
{
return (code);
}
int
{
return (code);
}
int
{
return (code);
}
int
{
return (code);
}
int
slk_touch(void)
{
if (w != NULL) {
wtouchln_hard(w, 0, 1);
} else
__m_slk_touched = 1;
return (code);
}
/*
* These label start columns assume 80 columns in order to
* fit 8 _slk._labels of 8 columns.
*/
static const int format[][8] = {
{ 0, 9, 18, 31, 40, 53, 62, 71 },
{ 0, 9, 18, 27, 44, 53, 62, 71 },
};
#define _LABEL_LENGTH_MALLOC \
void
__m_slk_set_all(void)
{
int i;
for (i = 0; i < 8; ++i) {
}
}
}
int
__m_slk_clear(int kluge)
{
int i;
int index;
if (kluge) {
/* Test suite expects spaces to have FG attributes */
}
0, i, 0, i + 7);
}
char *p;
if (!p) {
p = (char *)malloc(_LABEL_LENGTH_MALLOC);
if (p == NULL)
goto error;
}
}
}
} else {
__m_slk_labels_on = 0;
code = slk_refresh();
}
return (code);
}
int
slk_clear(void)
{
return (__m_slk_clear(0));
}
int
slk_restore(void)
{
int code;
__m_slk_labels_on = 1;
code = slk_refresh();
return (code);
}
int
slk_noutrefresh(void)
{
int code;
else {
if (__m_slk_touched) {
__m_slk_touched = 0;
}
if (__m_slk_labels_on) {
}
} else {
}
}
}
return (code);
}
int
slk_refresh(void)
{
int code;
return (code);
}
void
__m_slk_doupdate(void)
{
int index;
if (s) {
(long) s, 0L, 0L, 0L, 0L, 0L, 0L, 0L),
1, __m_outc);
}
}
}
}
char *
{
char *label;
} else {
}
return (label);
}
int
{
label = " ";
return (code);
}
int
{
char mbs[_LABEL_LENGTH_MALLOC];
char tmbs[_LABEL_LENGTH_MALLOC];
int ww = 0;
static const char *spcs = " ";
goto error1;
index--; /* Shift from {1..8} to {0..7} */
label = L"";
/* Copy the characters that fill the first 8 columns of the label. */
goto error1;
if (ww > 8)
break;
else
}
*wp = '\0';
goto error1;
if (width == 8) {
} else {
switch (justify) {
case 0:
break;
case 1:
break;
case 2:
break;
}
}
/* Remember the new label. */
goto error1;
char *p;
if (!p) {
p = (char *)malloc(_LABEL_LENGTH_MALLOC);
if (p == NULL)
goto error1;
}
}
__m_slk_labels_on = 1;
/* Write the justified label into the slk window. */
}
return (code);
}