/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* ptree.c -- routines for printing the prop tree
*
* this module contains routines to print portions of the parse tree.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "out.h"
#include "stable.h"
#include "literals.h"
#include "lut.h"
#include "tree.h"
#include "ptree.h"
int Pchildgen;
#ifdef FMAPLUGIN
#include "itree.h"
#include "eval.h"
#include "config.h"
static void
{
}
#else
/*ARGSUSED*/
static void
{
}
#endif /* FMAPLUGIN */
static int
{
switch (np->t) {
case T_FAULT:
case T_UPSET:
case T_DEFECT:
case T_ERROR:
case T_EREPORT:
case T_SERD:
case T_STAT:
case T_PROP:
case T_MASK:
case T_ASRU:
case T_FRU:
case T_CONFIG:
return (1);
/*NOTREACHED*/
break;
default:
break;
}
return (0);
}
void
{
return;
switch (np->t) {
case T_NOTHING:
break;
case T_NAME:
if (!no_iterators) {
int num;
else {
}
fileline);
}
}
else
}
break;
case T_TIMEVAL:
break;
case T_NUM:
break;
case T_QUOTE:
break;
case T_GLOBID:
break;
case T_FUNC:
break;
case T_NVPAIR:
break;
case T_EVENT:
}
}
break;
case T_ASSIGN:
break;
case T_NOT:
break;
case T_AND:
break;
case T_OR:
break;
case T_EQ:
break;
case T_NE:
break;
case T_SUB:
break;
case T_ADD:
break;
case T_MUL:
break;
case T_DIV:
break;
case T_MOD:
break;
case T_LT:
break;
case T_LE:
break;
case T_GT:
break;
case T_GE:
break;
case T_BITNOT:
break;
case T_BITAND:
break;
case T_BITOR:
break;
case T_BITXOR:
break;
case T_LSHIFT:
break;
case T_RSHIFT:
break;
case T_CONDIF:
break;
case T_CONDELSE:
break;
case T_ARROW:
}
}
break;
case T_LIST:
break;
case T_FAULT:
case T_UPSET:
case T_DEFECT:
case T_ERROR:
case T_EREPORT:
if (fileline)
fileline);
}
break;
case T_SERD:
case T_STAT:
if (fileline)
fileline);
}
break;
case T_ASRU:
if (fileline)
fileline);
}
break;
case T_FRU:
if (fileline)
fileline);
}
break;
case T_CONFIG:
if (fileline)
fileline);
}
break;
case T_PROP:
if (fileline)
break;
case T_MASK:
if (fileline)
break;
default:
"internal error: ptree unexpected nodetype: %d", np->t);
/*NOTREACHED*/
}
}
void
{
int c;
static int indent;
indent++;
else
for (c = indent; c > 0; c--)
indent--;
}
void
{
}
void
{
}
const char *
{
switch (t) {
case T_NOTHING: return L_T_NOTHING;
case T_GLOBID: return L_T_GLOBID;
case T_ENGINE: return L_T_ENGINE;
case T_TIMEVAL: return L_T_TIMEVAL;
case T_NVPAIR: return L_T_NVPAIR;
case T_ASSIGN: return L_T_ASSIGN;
case T_CONDIF: return L_T_CONDIF;
case T_CONDELSE: return L_T_CONDELSE;
case T_BITAND: return L_T_BITAND;
case T_BITXOR: return L_T_BITXOR;
case T_BITNOT: return L_T_BITNOT;
case T_LSHIFT: return L_T_LSHIFT;
case T_RSHIFT: return L_T_RSHIFT;
default:
return (buf);
}
}
const char *
{
switch (t) {
case N_UNSPEC: return L_N_UNSPEC;
default:
return (buf);
}
}
struct printer_info {
enum nodetype t;
const char *pat;
int flags;
};
static int
{
return (1); /* either no pattern or we've matched it all */
return (0); /* there's more pattern and nothing to match */
while (np) {
while (*s) {
cstart++;
/* component matched */
while (*cend == '/')
cend++;
return
cend);
}
s++;
}
if (*s)
s++;
}
}
return (0);
}
static int
{
return (1);
return (0);
np->t == T_CONDELSE ||
}
return (0);
}
static void
{
return;
return;
}
static void
{
info.t = t;
switch (t) {
case T_FAULT:
return;
case T_UPSET:
return;
case T_DEFECT:
return;
case T_ERROR:
return;
case T_EREPORT:
return;
case T_SERD:
return;
case T_STAT:
return;
case T_ASRU:
return;
case T_FRU:
return;
case T_CONFIG:
return;
case T_PROP:
return;
case T_MASK:
return;
default:
}
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
unsigned long long val;
if (*ullp == 0)
else if (*ullp >= TIMEVAL_EVENTUALLY)
else
}