/*
* 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) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
#define DEBUG
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include "awk.h"
#include "y.tab.h"
void
syminit(void)
{
/* initialize $0 */
/* this is used for if(x)... tests: */
}
void
{
int i;
/* first make FILENAME first real argument */
for (i = 1; i < ac; i++) {
av[i]);
break;
}
}
for (i = 0; i < ac; i++) {
} else {
}
av++;
}
}
void
{
uchar *p;
continue;
*p++ = 0; /* split into two strings at = */
if (is_number(p)) {
} else {
}
/* restore in case env is passed down to a shell */
p[-1] = '=';
}
}
Array *
makesymtab(int n)
{
return (ap);
}
void
{
int i;
return;
/*LINTED align*/
return;
}
}
}
void
{
int h;
/*LINTED align*/
else /* middle somewhere */
if (freeable(p))
free(p);
return;
}
}
Cell *
{
register int h;
register Cell *p;
dprintf((" s=\"%s\" f=%g t=%p\n",
return (p);
}
if (p == NULL)
p->fval = f;
p->tval = t;
p->csub = 0;
return (p);
}
int
{
register unsigned hashval;
for (hashval = 0; *s != '\0'; s++)
return (hashval % n);
}
static void
{
}
}
}
Cell *
{
register Cell *p;
int h;
return (p); /* found it */
}
return (NULL); /* not found */
}
{
int i;
donerec = 0; /* mark $0 invalid */
if (i > *NF)
newfld(i);
dprintf(("setting field %d to %g\n", i, f));
donefld = 0; /* mark $1... invalid */
donerec = 1;
}
}
void
{
ERROR "funny variable %o: n=%s s=\"%s\" f=%g t=%o",
}
uchar *
{
int i;
donerec = 0; /* mark $0 invalid */
if (i > *NF)
newfld(i);
dprintf(("setting field %d to %s\n", i, s));
donefld = 0; /* mark $1... invalid */
donerec = 1;
}
dprintf(("setsval %p: %s = \"%s\", t=%p\n",
(void *)vp,
s,
}
{
fldbld();
recbld();
}
dprintf(("getfval %p: %s = %g, t=%p\n",
}
uchar *
{
uchar s[256];
fldbld();
recbld();
(void) snprintf((char *)s, sizeof (s),
} else {
/*LINTED*/
(void) snprintf((char *)s, sizeof (s),
}
}
dprintf(("getsval %p: %s = \"%s\", t=%p\n",
(void *)vp,
}
uchar *
{
register uchar *p;
if (p == NULL)
(void) strcpy((char *)p, (char *)s);
return (p);
}
uchar *
{
int c, n;
if (c == '\n') {
} else if (c != '\\') {
} else { /* \something */
switch (c = *++s) {
default:
if (!isdigit(c)) {
break;
}
n = c - '0';
if (isdigit(s[1])) {
n = 8 * n + *++s - '0';
if (isdigit(s[1]))
n = 8 * n + *++s - '0';
}
break;
}
}
}
return (ret);
}