/*
* 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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <ctype.h>
#include <pwd.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include "error.h"
char *lint_libs[] = {
0
};
extern char *processname;
/*
* Read the file ERRORNAME of the names of functions in lint
* to ignore complaints about.
*/
void
{
int i;
int uid;
char *username;
nignored = 0;
if (auxname == 0) { /* use the default */
username = "Unknown";
return;
}
} else {
return;
}
} else
#ifdef FULLDEBUG
printf("Opening file \"%s\" to read names to ignore.\n",
filename);
#endif
#ifdef FULLDEBUG
#endif
return;
}
/*
* Make the first pass through the file, counting lines
*/
continue;
#ifdef FULLDEBUG
#endif
nignored = 0;
return;
}
i++) {
}
#ifdef FULLDEBUG
printf("Names to ignore follow.\n");
for (i = 0; i < nignored; i++) {
}
#endif
}
static int
{
}
int
{
int halfway;
int order;
if (nignored == 0)
return (-1);
return (halfway);
if (order < 0) /* key is less than probe, throw away above */
else
}
return (-1);
}
/*
* Tell if the error text is to be ignored.
* The error must have been canonicalized, with
* the file name the zeroth entry in the errorv,
* and the linenumber the second.
* Return the new categorization of the error class.
*/
{
int language;
int i;
switch (errorclass) {
case C_SYNC:
case C_NONSPEC:
case C_UNKNOWN:
return (errorclass);
default:
break;
}
return (C_NONSPEC);
}
for (i = 0; lint_libs[i] != 0; i++) {
lint_libs[i]) == 0) {
return (C_DISCARD);
}
}
}
/*
* check if the argument to the error message
* is to be ignored
*/
if (search_ignore(
return (C_NULLED);
}
}
return (errorclass);
}