From nobody Sat Nov 30 16:51:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzX4yffz5fJ2p; Sat, 30 Nov 2024 16:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzX1jW9z4n8J; Sat, 30 Nov 2024 16:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pXp3785D9chzPuib4mP4ifvRKg2GAtIFiN0YM4MjisM=; b=oqzQ8Q9ij3pOsRJO6YVmotVduIs7zEdLvxAUKK0ZpaBZDtsYw2iK5ZRIfl9w3h9cp8lnCr YkgXfV2q6KCiKbps/RbRueCr4geU0gZbwjDYNyQCMGSVEsPQTSBOifH9DAyva+fbBVkh/c lF+adykOFXqQxPWs72h1tUgUdDIUPkW2N9Uj8c57yvkFAaI+jzaCpg5XHqebfog/pspyzJ GU+m7PrGm7zsAt3Quw703g/zDzbSJw43HCQrM5dwd/mf5ifTh1umQQa0ajVQtGKZPuX++y NipvIc894h1iBFgTAgwlCTZyn+mr3ueHBCwfE2I4BPZVXz3kl0V0b40hzTUsmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pXp3785D9chzPuib4mP4ifvRKg2GAtIFiN0YM4MjisM=; b=qOl7YMdorneBYDiZ8Gm9WPhRL+odRdxHn4olHSxYIvAxpFcLCQRX0NVO4WJqOgtP5h1Bwu l8MqYENxXwngN5DCnorhF0EQSfBKcrfY0FjWoq9eCCEVjivrReR0vZU//2u0E+ioFRtAx5 uqF6duHiKmQosRWh3YvSBrTTv7/vHDNLZMCVY6jiG7QvTZ40fgjAdMUSmMMCr5eXt4Q3lw Vn4wQIOoqzhY7Dvb3Sw1KsZjVSJIAMVcUtmt5qZfDLGJFFlDMLUN8zDVsEFyxxphTwf18M 3KAUS/YPPWNSp1S7DyQWOg5TuAbymoiGfFSvYcd661VNOjTmLSaPmT9Hbj2Lew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985464; a=rsa-sha256; cv=none; b=FHQ2k5EbS/4KbNYuxZbiPFwCwYS1N1TiDC7HuI8qeFjs+g8kFptHC0wycqtGY6ogYhopTu VIWu+/QvdezxX7GQkPJ0cUrWdc5wfcv4qG17+U/VpVrhb/7CiYel/xhkSs/SMWNc9obTuk c0Di7dhbEzu9o3WupjICVjsEX64m/Cfr+h1eZlohmKNLXxMwNhaUSV4xurgVHSammoaPvQ fUm82wYaGkKHNT6d2e1V6THn0xBW1Xizx7JoG5HztCEzzUy+76391/7tqMckYTllxirxLn QH0b4uZLpNcFi+yNxJazoDJFaRY4dmMbmJLPcoge68wnv8N0imsxRl5Pr4xJHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzX1KJ9zG0H; Sat, 30 Nov 2024 16:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGp4Ir043099; Sat, 30 Nov 2024 16:51:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGp4r0043096; Sat, 30 Nov 2024 16:51:04 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:04 GMT Message-Id: <202411301651.4AUGp4r0043096@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 8bebcb26763a - stable/14 - speaker: Use standard C bool List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8bebcb26763a8d80c255b2c9367d510e98da17b4 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8bebcb26763a8d80c255b2c9367d510e98da17b4 commit 8bebcb26763a8d80c255b2c9367d510e98da17b4 Author: John Baldwin AuthorDate: 2024-02-05 23:40:34 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 speaker: Use standard C bool Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43717 (cherry picked from commit c83d83206a39c7c47139acac46885bea54ee4876) --- sys/dev/speaker/spkr.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index b1bbfe95510c..2a48f8f3daa8 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -122,12 +122,6 @@ rest(int centisecs) * except possibly at physical block boundaries. */ -#ifndef __bool_true_false_are_defined -typedef int bool; -#endif -#define TRUE 1 -#define FALSE 0 - #define dtoi(c) ((c) - '0') static int octave; /* currently selected octave */ @@ -183,8 +177,8 @@ playinit(void) whole = (100 * SECS_PER_MIN * WHOLE_NOTE) / DFLT_TEMPO; fill = NORMAL; value = DFLT_VALUE; - octtrack = FALSE; - octprefix = TRUE; /* act as though there was an initial O(n) */ + octtrack = false; + octprefix = true; /* act as though there was an initial O(n) */ } /* @@ -281,7 +275,7 @@ playstring(char *cp, size_t slen) pitch -= OCTAVE_NOTES; } } - octprefix = FALSE; + octprefix = false; lastpitch = pitch; /* ...which may in turn be followed by an override time value */ @@ -310,29 +304,29 @@ playstring(char *cp, size_t slen) break; case 'O': if (cp[1] == 'N' || cp[1] == 'n') { - octprefix = octtrack = FALSE; + octprefix = octtrack = false; ++cp; slen--; } else if (cp[1] == 'L' || cp[1] == 'l') { - octtrack = TRUE; + octtrack = true; ++cp; slen--; } else { GETNUM(cp, octave); if (octave >= nitems(pitchtab) / OCTAVE_NOTES) octave = DFLT_OCTAVE; - octprefix = TRUE; + octprefix = true; } break; case '>': if (octave < nitems(pitchtab) / OCTAVE_NOTES - 1) octave++; - octprefix = TRUE; + octprefix = true; break; case '<': if (octave > 0) octave--; - octprefix = TRUE; + octprefix = true; break; case 'N': GETNUM(cp, pitch); @@ -397,7 +391,7 @@ playstring(char *cp, size_t slen) * endtone(), and rest() functions defined above. */ -static int spkr_active = FALSE; /* exclusion flag */ +static bool spkr_active = false; /* exclusion flag */ static char *spkr_inbuf; /* incoming buf */ static int @@ -415,7 +409,7 @@ spkropen(struct cdev *dev, int flags, int fmt, struct thread *td) #endif /* DEBUG */ playinit(); spkr_inbuf = malloc(DEV_BSIZE, M_SPKR, M_WAITOK); - spkr_active = TRUE; + spkr_active = true; return(0); } } @@ -456,7 +450,7 @@ spkrclose(struct cdev *dev, int flags, int fmt, struct thread *td) wakeup(&endtone); wakeup(&endrest); free(spkr_inbuf, M_SPKR); - spkr_active = FALSE; + spkr_active = false; return(0); }