summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMike Pechkin <mpech@cvs.openbsd.org>2002-03-14 06:51:43 +0000
committerMike Pechkin <mpech@cvs.openbsd.org>2002-03-14 06:51:43 +0000
commit589df74d6e3673fb8255ea0f6dbe205b69a73683 (patch)
tree90364789fc8ae5e67b30350658fc5c2e2b0fb4dd /usr.bin
parent50aefd34a9b151f57aa0a541ca4600e9269c8290 (diff)
Remove \n from err/errx/warn/warnx().
millert@ ok
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/chpass/chpass.c6
-rw-r--r--usr.bin/error/main.c6
-rw-r--r--usr.bin/file/apprentice.c6
-rw-r--r--usr.bin/fstat/fstat.c6
-rw-r--r--usr.bin/hexdump/parse.c10
-rw-r--r--usr.bin/locate/locate/locate.c10
-rw-r--r--usr.bin/mail/fio.c6
-rw-r--r--usr.bin/midiplay/midiplay.c22
-rw-r--r--usr.bin/xlint/xlint/xlint.c6
9 files changed, 39 insertions, 39 deletions
diff --git a/usr.bin/chpass/chpass.c b/usr.bin/chpass/chpass.c
index 9958e511cff..494a2647002 100644
--- a/usr.bin/chpass/chpass.c
+++ b/usr.bin/chpass/chpass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: chpass.c,v 1.21 2002/02/16 21:27:44 millert Exp $ */
+/* $OpenBSD: chpass.c,v 1.22 2002/03/14 06:51:41 mpech Exp $ */
/* $NetBSD: chpass.c,v 1.8 1996/05/15 21:50:43 jtc Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)chpass.c 8.4 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: chpass.c,v 1.21 2002/02/16 21:27:44 millert Exp $";
+static char rcsid[] = "$OpenBSD: chpass.c,v 1.22 2002/03/14 06:51:41 mpech Exp $";
#endif
#endif /* not lint */
@@ -148,7 +148,7 @@ main(argc, argv)
pw = ypgetpwuid(uid);
#endif /* YP */
if (!pw)
- errx(1, "unknown user: uid %u\n", uid);
+ errx(1, "unknown user: uid %u", uid);
break;
case 1:
pw = getpwnam(*argv);
diff --git a/usr.bin/error/main.c b/usr.bin/error/main.c
index fbf498fb412..a52912f2e94 100644
--- a/usr.bin/error/main.c
+++ b/usr.bin/error/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.6 2001/07/12 05:17:02 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.7 2002/03/14 06:51:41 mpech Exp $ */
/* $NetBSD: main.c,v 1.3 1995/09/02 06:15:37 jtc Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: main.c,v 1.6 2001/07/12 05:17:02 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.7 2002/03/14 06:51:41 mpech Exp $";
#endif /* not lint */
#include <signal.h>
@@ -171,7 +171,7 @@ main(argc, argv)
if (argc > 1) {
if (argc > 3)
- errx(3, "Only takes 0 or 1 arguments.\n");
+ errx(3, "Only takes 0 or 1 arguments.");
if ((errorfile = fopen(argv[1], "r")) == NULL)
err(4, "%s", argv[1]);
}
diff --git a/usr.bin/file/apprentice.c b/usr.bin/file/apprentice.c
index c6bc2814c6a..e484243bec1 100644
--- a/usr.bin/file/apprentice.c
+++ b/usr.bin/file/apprentice.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apprentice.c,v 1.12 2002/02/16 21:27:46 millert Exp $ */
+/* $OpenBSD: apprentice.c,v 1.13 2002/03/14 06:51:41 mpech Exp $ */
/*
* apprentice - make one pass through /etc/magic, learning its secrets.
@@ -36,7 +36,7 @@
#include "file.h"
#ifndef lint
-static char *moduleid = "$OpenBSD: apprentice.c,v 1.12 2002/02/16 21:27:46 millert Exp $";
+static char *moduleid = "$OpenBSD: apprentice.c,v 1.13 2002/03/14 06:51:41 mpech Exp $";
#endif /* lint */
#define EATAB {while (isascii((unsigned char) *l) && \
@@ -164,7 +164,7 @@ uint32 v;
case STRING:
break;
default:
- warnx("can't happen: m->type=%d\n", m->type);
+ warnx("can't happen: m->type=%d", m->type);
return -1;
}
return v;
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index dc8c2f66c8b..cb42637b5cd 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fstat.c,v 1.35 2002/02/16 21:27:46 millert Exp $ */
+/* $OpenBSD: fstat.c,v 1.36 2002/03/14 06:51:41 mpech Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -41,7 +41,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)fstat.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$OpenBSD: fstat.c,v 1.35 2002/02/16 21:27:46 millert Exp $";
+static char *rcsid = "$OpenBSD: fstat.c,v 1.36 2002/03/14 06:51:41 mpech Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -199,7 +199,7 @@ main(argc, argv)
if (pflg++)
usage();
if (!isdigit(*optarg)) {
- warnx( "-p requires a process id\n");
+ warnx( "-p requires a process id");
usage();
}
what = KERN_PROC_PID;
diff --git a/usr.bin/hexdump/parse.c b/usr.bin/hexdump/parse.c
index e3198ab99bb..a6a9e0b93c2 100644
--- a/usr.bin/hexdump/parse.c
+++ b/usr.bin/hexdump/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.9 2001/12/30 08:17:32 pvalchev Exp $ */
+/* $OpenBSD: parse.c,v 1.10 2002/03/14 06:51:42 mpech Exp $ */
/* $NetBSD: parse.c,v 1.12 2001/12/07 13:37:39 bjh21 Exp $ */
/*
@@ -36,7 +36,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)parse.c 5.6 (Berkeley) 3/9/91";*/
-static char rcsid[] = "$OpenBSD: parse.c,v 1.9 2001/12/30 08:17:32 pvalchev Exp $";
+static char rcsid[] = "$OpenBSD: parse.c,v 1.10 2002/03/14 06:51:42 mpech Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -502,19 +502,19 @@ badcnt(s)
void
badsfmt()
{
- errx(1, "%%s: requires a precision or a byte count\n");
+ errx(1, "%%s: requires a precision or a byte count");
}
void
badfmt(fmt)
const char *fmt;
{
- errx(1, "\"%s\": bad format\n", fmt);
+ errx(1, "\"%s\": bad format", fmt);
}
void
badconv(ch)
char *ch;
{
- errx(1, "%%%s: bad conversion character\n", ch);
+ errx(1, "%%%s: bad conversion character", ch);
}
diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locate.c
index d98dc88909a..18790a4c5ca 100644
--- a/usr.bin/locate/locate/locate.c
+++ b/usr.bin/locate/locate/locate.c
@@ -1,5 +1,5 @@
/*
- * $OpenBSD: locate.c,v 1.12 2002/02/17 19:42:31 millert Exp $
+ * $OpenBSD: locate.c,v 1.13 2002/03/14 06:51:42 mpech Exp $
*
* Copyright (c) 1995 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
* Copyright (c) 1989, 1993
@@ -36,7 +36,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: locate.c,v 1.12 2002/02/17 19:42:31 millert Exp $
+ * $Id: locate.c,v 1.13 2002/03/14 06:51:42 mpech Exp $
*/
#ifndef lint
@@ -50,7 +50,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)locate.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: locate.c,v 1.12 2002/02/17 19:42:31 millert Exp $";
+static char rcsid[] = "$OpenBSD: locate.c,v 1.13 2002/03/14 06:51:42 mpech Exp $";
#endif
#endif /* not lint */
@@ -270,7 +270,7 @@ search_fopen(db, s)
#endif
if (!f_stdin &&
fseek(fp, (long)0, SEEK_SET) == -1)
- err(1, "fseek to begin of ``%s''\n", path_fcodes);
+ err(1, "fseek to begin of ``%s''", path_fcodes);
if (f_icase)
fastfind_icase(fp, *s, path_fcodes);
@@ -323,7 +323,7 @@ search_mmap(db, s)
}
if (munmap(p, (size_t)len) == -1)
- warn("munmap %s\n", path_fcodes);
+ warn("munmap %s", path_fcodes);
(void)close(fd);
}
diff --git a/usr.bin/mail/fio.c b/usr.bin/mail/fio.c
index 8974869ab72..c22f73f71e9 100644
--- a/usr.bin/mail/fio.c
+++ b/usr.bin/mail/fio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fio.c,v 1.21 2001/12/18 16:55:06 millert Exp $ */
+/* $OpenBSD: fio.c,v 1.22 2002/03/14 06:51:42 mpech Exp $ */
/* $NetBSD: fio.c,v 1.8 1997/07/07 22:57:55 phil Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static const char sccsid[] = "@(#)fio.c 8.2 (Berkeley) 4/20/95";
#else
-static const char rcsid[] = "$OpenBSD: fio.c,v 1.21 2001/12/18 16:55:06 millert Exp $";
+static const char rcsid[] = "$OpenBSD: fio.c,v 1.22 2002/03/14 06:51:42 mpech Exp $";
#endif
#endif /* not lint */
@@ -287,7 +287,7 @@ makemessage(FILE *f, int omsgCount)
size = (msgCount + 1) * sizeof(struct message);
nmessage = (struct message *)realloc(message, size);
if (nmessage == 0)
- errx(1, "Insufficient memory for %d messages\n",
+ errx(1, "Insufficient memory for %d messages",
msgCount);
if (omsgCount == 0 || message == NULL)
dot = nmessage;
diff --git a/usr.bin/midiplay/midiplay.c b/usr.bin/midiplay/midiplay.c
index 655f4f1df47..ecfe0a3d99e 100644
--- a/usr.bin/midiplay/midiplay.c
+++ b/usr.bin/midiplay/midiplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: midiplay.c,v 1.2 2002/02/16 21:27:49 millert Exp $ */
+/* $OpenBSD: midiplay.c,v 1.3 2002/03/14 06:51:42 mpech Exp $ */
/* $NetBSD: midiplay.c,v 1.8 1998/11/25 22:17:07 augustss Exp $ */
/*
@@ -265,7 +265,7 @@ playfile(f, name)
size = 1000;
buf = malloc(size);
if (buf == 0)
- errx(1, "malloc() failed\n");
+ errx(1, "malloc() failed");
nread = size;
tot = 0;
for (;;) {
@@ -278,7 +278,7 @@ playfile(f, name)
size *= 2;
buf = realloc(buf, size);
if (buf == NULL)
- errx(1, "realloc() failed\n");
+ errx(1, "realloc() failed");
}
playdata(buf, tot, name);
free(buf);
@@ -303,11 +303,11 @@ playdata(buf, tot, name)
printf("Playing %s (%d bytes) ... \n", name, tot);
if (memcmp(buf, MARK_HEADER, MARK_LEN) != 0) {
- warnx("Not a MIDI file, missing header\n");
+ warnx("Not a MIDI file, missing header");
return;
}
if (GET32(buf + MARK_LEN) != HEADER_LEN) {
- warnx("Not a MIDI file, bad header\n");
+ warnx("Not a MIDI file, bad header");
return;
}
format = GET16(buf + MARK_LEN + SIZE_LEN);
@@ -318,27 +318,27 @@ playdata(buf, tot, name)
if ((divfmt & 0x80) == 0)
ticks |= divfmt << 8;
else
- errx(1, "Absolute time codes not implemented yet\n");
+ errx(1, "Absolute time codes not implemented yet");
if (verbose > 1)
printf("format=%d ntrks=%d divfmt=%x ticks=%d\n",
format, ntrks, divfmt, ticks);
if (format != 0 && format != 1) {
- warnx("Cannnot play MIDI file of type %d\n", format);
+ warnx("Cannnot play MIDI file of type %d", format);
return;
}
if (ntrks == 0)
return;
tracks = malloc(ntrks * sizeof(struct track));
if (tracks == NULL)
- errx(1, "malloc() tracks failed\n");
+ errx(1, "malloc() tracks failed");
for (t = 0; t < ntrks; ) {
if (p >= end - MARK_LEN - SIZE_LEN) {
- warnx("Cannot find track %d\n", t);
+ warnx("Cannot find track %d", t);
goto ret;
}
len = GET32(p + MARK_LEN);
if (len > 1000000) { /* a safe guard */
- warnx("Crazy track length\n");
+ warnx("Crazy track length");
goto ret;
}
if (memcmp(p, MARK_TRACK, MARK_LEN) == 0) {
@@ -539,7 +539,7 @@ main(argc, argv)
if (ioctl(fd, SEQUENCER_NRMIDIS, &nmidi) < 0)
err(1, "ioctl(SEQUENCER_NRMIDIS) failed, ");
if (nmidi == 0)
- errx(1, "Sorry, no MIDI devices available\n");
+ errx(1, "Sorry, no MIDI devices available");
if (listdevs) {
for (info.device = 0; info.device < nmidi; info.device++) {
if (ioctl(fd, SEQUENCER_INFO, &info) < 0)
diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c
index 54201383c34..6386b5c8063 100644
--- a/usr.bin/xlint/xlint/xlint.c
+++ b/usr.bin/xlint/xlint/xlint.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xlint.c,v 1.8 2002/02/16 21:27:59 millert Exp $ */
+/* $OpenBSD: xlint.c,v 1.9 2002/03/14 06:51:42 mpech 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.8 2002/02/16 21:27:59 millert Exp $";
+static char rcsid[] = "$OpenBSD: xlint.c,v 1.9 2002/03/14 06:51:42 mpech Exp $";
#endif
#include <sys/param.h>
@@ -541,7 +541,7 @@ fname(name, last)
if (strcmp(suff, "c") != 0 &&
(strncmp(bn, "llib-l", 6) != 0 || bn != suff)) {
- warnx("unknown file type: %s\n", name);
+ warnx("unknown file type: %s", name);
return;
}