summaryrefslogtreecommitdiff
path: root/usr.bin/midiplay
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/midiplay')
-rw-r--r--usr.bin/midiplay/midiplay.c22
1 files changed, 11 insertions, 11 deletions
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)