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 2004 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 * Initialize usage of soft labels 2N/A * This routine should be called before each call of newscreen 2N/A * or initscr to initialize for the next terminal. 2N/A * ng: number of groupings. If gp is NULL, it denotes one 2N/A * of two default groupings: 2N/A * 0: - - - - - - - - 2N/A * 1: - - - - - - - - 2N/A /* signal newscreen() */ 2N/A /* clear this out to ready for next time */ 2N/A /* get space for slk structure */ 2N/A /* compute actual number of labels */ 2N/A /* max label length */ 2N/A /* remove one line from the screen */ 2N/A /* positions to place labels */ 2N/A * Compute placements of labels. The general idea is to spread 2N/A * the groups out evenly. This routine is designed for the day 2N/A * when > 8 labels and other kinds of groupings may be desired. 2N/A * The main assumption behind the algorithm is that the total 2N/A * # of labels in all the groups is <= LABMAX. 2N/A * len: length of a label 2N/A * labx: to return the coords of the labels. 2N/A /* compute starting coords for each group */ 2N/A /* spacing between groups */ 2N/A /* coords of groups */ 2N/A /* now set coords of each label */