Deleted Added
full compact
spkr.c (228443) spkr.c (298307)
1/*-
2 * spkr.c -- device driver for console speaker
3 *
4 * v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993
5 * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su>
6 * modified for PC98 by Kakefuda
7 */
8
9#include <sys/cdefs.h>
1/*-
2 * spkr.c -- device driver for console speaker
3 *
4 * v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993
5 * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su>
6 * modified for PC98 by Kakefuda
7 */
8
9#include <sys/cdefs.h>
10__FBSDID("$FreeBSD: head/sys/dev/speaker/spkr.c 228443 2011-12-12 18:43:24Z mdf $");
10__FBSDID("$FreeBSD: head/sys/dev/speaker/spkr.c 298307 2016-04-19 23:37:24Z pfg $");
11
12#include <sys/param.h>
13#include <sys/systm.h>
14#include <sys/kernel.h>
15#include <sys/module.h>
16#include <sys/uio.h>
17#include <sys/conf.h>
18#include <sys/ctype.h>

--- 303 unchanged lines hidden (view full) ---

322 ++cp;
323 slen--;
324 } else if (cp[1] == 'L' || cp[1] == 'l') {
325 octtrack = TRUE;
326 ++cp;
327 slen--;
328 } else {
329 GETNUM(cp, octave);
11
12#include <sys/param.h>
13#include <sys/systm.h>
14#include <sys/kernel.h>
15#include <sys/module.h>
16#include <sys/uio.h>
17#include <sys/conf.h>
18#include <sys/ctype.h>

--- 303 unchanged lines hidden (view full) ---

322 ++cp;
323 slen--;
324 } else if (cp[1] == 'L' || cp[1] == 'l') {
325 octtrack = TRUE;
326 ++cp;
327 slen--;
328 } else {
329 GETNUM(cp, octave);
330 if (octave >= sizeof(pitchtab) / sizeof(pitchtab[0]) /
331 OCTAVE_NOTES)
330 if (octave >= nitems(pitchtab) / OCTAVE_NOTES)
332 octave = DFLT_OCTAVE;
333 octprefix = TRUE;
334 }
335 break;
336 case '>':
331 octave = DFLT_OCTAVE;
332 octprefix = TRUE;
333 }
334 break;
335 case '>':
337 if (octave < sizeof(pitchtab) / sizeof(pitchtab[0]) /
338 OCTAVE_NOTES - 1)
336 if (octave < nitems(pitchtab) / OCTAVE_NOTES - 1)
339 octave++;
340 octprefix = TRUE;
341 break;
342 case '<':
343 if (octave > 0)
344 octave--;
345 octprefix = TRUE;
346 break;

--- 207 unchanged lines hidden ---
337 octave++;
338 octprefix = TRUE;
339 break;
340 case '<':
341 if (octave > 0)
342 octave--;
343 octprefix = TRUE;
344 break;

--- 207 unchanged lines hidden ---