/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <fcntl.h>
#include <strings.h>
#include <ctype.h>
#include <stdlib.h>
#include "list.h"
#include "proto_list.h"
static void
{
}
/*
* int is_num()
*
* returns 1 if the string is entirely numeric - if not it returns 0
*
*/
static int
{
int i;
if (len < 1)
return (0);
for (i = 0; i < len; i++)
return (0);
return (1);
}
/*
* void check_line()
*
* read in - print warning messages as errors are encountered.
*
* these are simple checks, but then they catch the simple errors-:)
*
*/
static void
{
}
static char **
{
char *rc;
char *p;
int len;
static int line_count = 0;
p = buf;
p[0] = '\0';
do {
line_count ++;
/*
* check for continuation marks at the end of the
* line - if it exists then append the next line at the
* end of this one.
*/
if (buf[0] == '#') {
/*
* skip comments.
*/
continue;
/*
* check for continuation marks at the end of the
* line - if it exists then append the next line at the
* end of this one.
*/
p += len - 2;
} else
cont = 0;
} while (cont);
return (NULL);
/*
* breakup the line into the various fields.
*/
if (v[PROTOS])
*v[PROTOS]++ = '\0';
check_line(v, line_count);
return (v);
}
static void
{
e->flag = 0;
e->major = -1;
else
e->minor = -1;
else
else {
if (e->file_type != SYM_LINK_T)
#if defined(__sparc)
#else
#error "Unknown instruction set"
#endif
else {
"warning: Unknown relocation architecture "
"for %s\n", e->symsrc);
}
}
}
int
{
int count = 0;
exit(1);
}
if (verbose)
count = 0;
if (!e)
parse_line(line_vec, e);
e = NULL;
count++;
}
}
if (verbose)
return (count);
}