summaryrefslogtreecommitdiff
path: root/usr.bin/xlint
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2005-11-20 18:24:00 +0000
committerChad Loder <cloder@cvs.openbsd.org>2005-11-20 18:24:00 +0000
commit5edbb1a26ab00ad05a30182a83cf4bb42af50dd1 (patch)
tree629e4d7c434762b76cd3e7d04bffac5b75f73a5c /usr.bin/xlint
parent338ad77b2dfbba9d53f8f7ce5ed7831888e4669a (diff)
Rename basename() to lbasename() to avoid conflict with basename(3).
Diffstat (limited to 'usr.bin/xlint')
-rw-r--r--usr.bin/xlint/lint1/err.c18
-rw-r--r--usr.bin/xlint/lint2/msg.c10
-rw-r--r--usr.bin/xlint/xlint/xlint.c12
3 files changed, 20 insertions, 20 deletions
diff --git a/usr.bin/xlint/lint1/err.c b/usr.bin/xlint/lint1/err.c
index 3b1d7d9a5b9..c4df54e4201 100644
--- a/usr.bin/xlint/lint1/err.c
+++ b/usr.bin/xlint/lint1/err.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: err.c,v 1.7 2005/11/20 17:42:49 deraadt Exp $ */
+/* $OpenBSD: err.c,v 1.8 2005/11/20 18:23:58 cloder Exp $ */
/* $NetBSD: err.c,v 1.8 1995/10/02 17:37:00 jpo Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: err.c,v 1.7 2005/11/20 17:42:49 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: err.c,v 1.8 2005/11/20 18:23:58 cloder Exp $";
#endif
/* number of errors found */
@@ -47,7 +47,7 @@ int sytxerr;
#include "lint1.h"
-static const char *basename(const char *);
+static const char *lbasename(const char *);
static void verror(int, va_list);
static void vwarning(int, va_list);
@@ -366,11 +366,11 @@ const char *msgs[] = {
};
/*
- * If Fflag is not set basename() returns a pointer to the last
+ * If Fflag is not set lbasename() returns a pointer to the last
* component of the path, otherwise it returns the argument.
*/
static const char *
-basename(const char *path)
+lbasename(const char *path)
{
const char *cp, *cp1, *cp2;
@@ -392,7 +392,7 @@ verror(int n, va_list ap)
{
const char *fn;
- fn = basename(curr_pos.p_file);
+ fn = lbasename(curr_pos.p_file);
(void)printf("%s(%d): ", fn, curr_pos.p_line);
(void)vprintf(msgs[n], ap);
(void)printf("\n");
@@ -408,7 +408,7 @@ vwarning(int n, va_list ap)
/* this warning is suppressed by a LINTED comment */
return;
- fn = basename(curr_pos.p_file);
+ fn = lbasename(curr_pos.p_file);
(void)printf("%s(%d): warning: ", fn, curr_pos.p_line);
(void)vprintf(msgs[n], ap);
(void)printf("\n");
@@ -431,7 +431,7 @@ lerror(const char *msg, ...)
const char *fn;
va_start(ap, msg);
- fn = basename(curr_pos.p_file);
+ fn = lbasename(curr_pos.p_file);
(void)fprintf(stderr, "%s(%d): lint error: ", fn, curr_pos.p_line);
(void)vfprintf(stderr, msg, ap);
(void)fprintf(stderr, "\n");
@@ -456,7 +456,7 @@ message(int n, ...)
const char *fn;
va_start(ap, n);
- fn = basename(curr_pos.p_file);
+ fn = lbasename(curr_pos.p_file);
(void)printf("%s(%d): ", fn, curr_pos.p_line);
(void)vprintf(msgs[n], ap);
(void)printf("\n");
diff --git a/usr.bin/xlint/lint2/msg.c b/usr.bin/xlint/lint2/msg.c
index 8249f95bd15..e83cbe2c8b4 100644
--- a/usr.bin/xlint/lint2/msg.c
+++ b/usr.bin/xlint/lint2/msg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msg.c,v 1.6 2005/11/20 17:09:55 cloder Exp $ */
+/* $OpenBSD: msg.c,v 1.7 2005/11/20 18:23:59 cloder Exp $ */
/* $NetBSD: msg.c,v 1.2 1995/07/03 21:24:56 cgd Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: msg.c,v 1.6 2005/11/20 17:09:55 cloder Exp $";
+static char rcsid[] = "$OpenBSD: msg.c,v 1.7 2005/11/20 18:23:59 cloder Exp $";
#endif
#include <string.h>
@@ -65,7 +65,7 @@ static const char *msgs[] = {
"%s function value must be declared before use \t%s :: %s",/* 17 */
};
-static const char *basename(const char *);
+static const char *lbasename(const char *);
void
msg(int n, ...)
@@ -84,7 +84,7 @@ msg(int n, ...)
* Return a pointer to the last component of a path.
*/
static const char *
-basename(const char *path)
+lbasename(const char *path)
{
const char *cp, *cp1, *cp2;
@@ -122,7 +122,7 @@ mkpos(pos_t *posp)
}
qm = !Hflag && posp->p_src != posp->p_isrc;
- len = strlen(fn = basename(fnames[src]));
+ len = strlen(fn = lbasename(fnames[src]));
len += 3 * sizeof (u_short) + 4;
if (len > blen)
diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c
index f72888d599d..e983321fdc9 100644
--- a/usr.bin/xlint/xlint/xlint.c
+++ b/usr.bin/xlint/xlint/xlint.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xlint.c,v 1.18 2005/11/20 17:42:50 deraadt Exp $ */
+/* $OpenBSD: xlint.c,v 1.19 2005/11/20 18:23:59 cloder Exp $ */
/* $NetBSD: xlint.c,v 1.3 1995/10/23 14:29:30 jpo Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: xlint.c,v 1.18 2005/11/20 17:42:50 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: xlint.c,v 1.19 2005/11/20 18:23:59 cloder Exp $";
#endif
#include <sys/param.h>
@@ -118,7 +118,7 @@ static void freelst(char ***);
static char *concat2(const char *, const char *);
static char *concat3(const char *, const char *, const char *);
static void terminate(int);
-static const char *basename(const char *, int);
+static const char *lbasename(const char *, int);
static void appdef(char ***, const char *);
static void usage(void);
static void fname(const char *, int);
@@ -242,7 +242,7 @@ terminate(int signo)
* Returns strg if the string does not contain delim.
*/
static const char *
-basename(const char *strg, int delim)
+lbasename(const char *strg, int delim)
{
const char *cp, *cp1, *cp2;
@@ -516,8 +516,8 @@ fname(const char *name, int last)
size_t len;
int error;
- bn = basename(name, '/');
- suff = basename(bn, '.');
+ bn = lbasename(name, '/');
+ suff = lbasename(bn, '.');
if (strcmp(suff, "ln") == 0) {
/* only for lint2 */