dlist_proto.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 cw1992 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* @(#)dlist_proto.c 1.1 90/01/22 SMI */
#include <stdio.h>
#pragma ident "%Z%%M% %I% %E% SMI"
{
}
#ifdef notskip
descend()
{
int ibc = 0;
int i, f, c;
getstr();
for (i = 3; i < 6; i++) {
c = token[i];
if (c < '0' || c > '7') {
errs++;
c = 0;
}
}
buf[i] = 0;
for (i = 0; i < NDADDR; i++)
for (i = 0; i < NIADDR; i++)
} else {
}
case IFREG:
getstr();
if (f < 0) {
errs++;
break;
}
}
close(f);
break;
case IFBLK:
case IFCHR:
/*
* special file
*/
i = getnum() & 0377;
f = getnum() & 0377;
break;
case IFDIR:
/*
* directory
* put in extra links
* call recursively until
* name of "$" found
*/
}
for (;;) {
getstr();
break;
}
else
break;
}
}
/*ARGSUSED*/
char c, *s;
{
int i;
for (i = 0; s[i]; i++)
if (c == s[i])
return((&m0)[i]);
errs++;
return(0);
}
long
getnum()
{
int i, c;
long n;
getstr();
n = 0;
i = 0;
for (i = 0; c=token[i]; i++) {
if (c<'0' || c>'9') {
errs++;
return((long)0);
}
n = n*10 + (c-'0');
}
return(n);
}
getstr()
{
int i, c;
loop:
case ' ':
case '\t':
case '\n':
goto loop;
case EOF:
printf("Unexpected EOF\n");
case ':':
;
goto loop;
}
i = 0;
do {
token[i++] = c;
} while (c != ' ' && c != '\t' && c != '\n' && c != '\0');
token[i] = 0;
}
#endif