fm_mn_par.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 1993 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <string.h>
#include "wish.h"
#include "token.h"
#include "actrec.h"
#include "fm_mn_par.h"
#include "var_arrays.h"
#include "terror.h"
#include "eval.h"
#include "vtdefs.h"
#include "moremacros.h"
/*
** Frees one attribute. This involves freeing the "def" if set,
** and the "cur" as an array if the flags say so, or as a string
** if set.
*/
void
{
}
else {
}
}
}
}
/*
** If the "single" array is NULL then this structure does
** not contain any data to be freed
*/
void
{
register int i, j;
return;
for (i = 0; i < lcv; i++)
return;
for (j = 0; j < lcv; j++)
for (i = 0; i < lcv2; i++)
}
}
/*
** Fills an array with the information from another (in this case,
** the array of defaults.
*/
void
int no;
{
int i;
struct attribute *p;
for (i = 0; i < no; i++)
{
{
*p = defaults[i];
{
{
}
}
}
else
p = defaults + i;
}
}
/*
** Boosts a the sequence number for the whole object. This will
** force every variable field to be evaluated.
*/
{
}
/*
** This parses an object. The "flags" say whether info_or_file is
** the information itself or the file of where the information sits.
** Sdfl, sdflsize, mdfl and mdflsize describe the default arrays and
** single and multi are the addresses of pointers to store the
** information in.
*/
int flags;
char *info_or_file;
int sdflsize;
int mdflsize;
{
int i;
int more;
else
{
}
{
*val++ = '\0';
else
for (i = 0; i < sdflsize; i++)
break;
if (i == sdflsize)
{
break;
}
else
{
}
}
{
if (!kwd)
{
*val++ = '\0';
else
}
for (i = 0; i < mdflsize; i++)
break;
if (i == PAR_NAME) /* if its the first multi-descriptor */
{
}
if (i != mdflsize) /* if its the one we're looking for */
{
/* don't comment out until you're SURE
if (mdfl[i].flags & MAKE_COPY)
free(ptr.attrs[i]);
*/
}
}
}
/*
** This puts the args into an altenv ($ARG1, $ARG2 and $ARG3)
*/
void
int flags;
register char **args;
register char ***altenv;
{
char argbuf[6];
char *envbuf;
register int i;
dofree = 0;
/*
* Value is greater than 1K so malloc
* enough space to hold it.
*/
dofree++;
}
else {
/*
* ... otherwise, use static 1K buffer
*/
dofree = 0;
}
if (dofree) /* if buffer was malloc'd, free it */
}
(argbuf[3])++;
copyAltenv(*altenv);
}
/*
** This will setup the lifetime and positioning for an object.
*/
void
register struct actrec *a;
register char *life;
register char *begrow;
register char *begcol;
int *prow;
int *pcol;
int *ptype;
{
void setlifetime();
*prow = VT_UNDEFINED;
*pcol = VT_UNDEFINED;
*ptype = 0;
*pcol = VT_UNDEFINED;
}
*prow = VT_UNDEFINED;
}
*ptype = VT_COVERCUR;
*ptype = VT_NOCOVERCUR;
else {
*prow = VT_UNDEFINED;
*pcol = VT_UNDEFINED;
}
else {
*pcol = VT_UNDEFINED;
}
}
if (life)
setlifetime(a, life);
}
void
setlifetime(a, life)
struct actrec *a;
char *life;
{
/* Added a check for a->id to be >= 0 for an active frame. mek 112289 */
return; /* abs k17 */
a->lifetime = AR_SHORTERM;
a->lifetime = AR_PERMANENT;
a->lifetime = AR_IMMORTAL;
else
a->lifetime = AR_LONGTERM;
}