=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/midiplay/Attic/midiplay.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/midiplay/Attic/midiplay.c 2002/02/16 21:27:49 1.2 +++ src/usr.bin/midiplay/Attic/midiplay.c 2002/03/14 06:51:42 1.3 @@ -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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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)