From nobody Mon Feb 05 23:45:42 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 4TTNKz4F7mz59Hgw; Mon, 5 Feb 2024 23:45:43 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTNKz1dXvz45qv; Mon, 5 Feb 2024 23:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707176743; 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=1fBKG8VYZr25nCz7RakeT9PMz95BbFGdDn8AQpQdK18=; b=x6rw5QqMMk3lt1f9RLgRIAIjU/YN67RwiaONGox92BZdwDj3rOzfooD+LncbOuLneTgmOZ Za7CjFqe/hRU/1vi0fXOMCRDhMdaOlDMvujlZQTBiTMgRTO1XQJ/Sg2IVpZs87EsuuAkRW N7z/62ZPozEwWbVHFvP9aSsP2WuP3I48O0mJr6iISnWDlFlo7gStzKK9YiD2G75qH+F3Tn sr5ctGLVdoS3GW9T6/L+matdcJ4bDA1IeYuyWzruwU2G6twxS8U17/1VqkTg0/wOTByX+u sjYoMbtJD5BgXE/RggfaNprUA+FSGadfT8HhsAUNxtvR6gS1BHx8knwH2QaJGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707176743; 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=1fBKG8VYZr25nCz7RakeT9PMz95BbFGdDn8AQpQdK18=; b=ewntLNOul5jW0PbjVfZ20x6e1zQGWPRIPBQfGBupO8dDh27rtstQTqWm/muQBiK0oFkxcY Mn0ySg7CHxu7yL+5zxfUDUkYmKkBwe7LBEjD4zs5TgmeUwkB/tJHoJKZzAoBK7dNOHaIAv nd23v/A3XOaAs4TdXUjCS+7Jcl7GTssDZAxKA2DUzNzbHx6XEjWLKD6I2BRKmSp4V7Nh8i tg5jds5lCPIO0Q0dSyifphJG1lVhLlT0TcT0KTOlVRAgzZ+CheHv7td1UR7U3V1eckOyXE ztUY6fai7IbEsCoxa0eZGpC8KD1Xza/1kSazyItqtMXM/SfNVIHKAZ5RFU7fZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707176743; a=rsa-sha256; cv=none; b=Qvl7eYf3wHGVuXs8FahjcfDo67+UxBQZvb0obohriczS3c5/bv/h7oQRND7Hln6XBEGV4d ln62D7WhTVITweOB5zm090sbUc8AgUOSxKXYkFm9Svo/JldbkZYKxua6GBdllASvQDf+M6 W7o8NTqecS5B/SlnUIJIssx+89jdCa/w/jbgkQoxekYrQyqqHR0cvJ2xHC1GVDMBX0KwHk 4fh2Iesj1AnD1X4nq5wGO4As9tA04mPhrCMtrslQSO6DLkyji9nDRJngceZPDLe+bFHz9j 8grB195976FiknmanYHoYBwjLea0SDYV961VncwKGSY7oWtw0owVVvJeBnNalg== 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 4TTNKz0RYvz10yZ; Mon, 5 Feb 2024 23:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 415NjgZk087931; Mon, 5 Feb 2024 23:45:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415NjgsS087928; Mon, 5 Feb 2024 23:45:42 GMT (envelope-from git) Date: Mon, 5 Feb 2024 23:45:42 GMT Message-Id: <202402052345.415NjgsS087928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c83d83206a39 - main - 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: c83d83206a39c7c47139acac46885bea54ee4876 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c83d83206a39c7c47139acac46885bea54ee4876 commit c83d83206a39c7c47139acac46885bea54ee4876 Author: John Baldwin AuthorDate: 2024-02-05 23:40:34 +0000 Commit: John Baldwin CommitDate: 2024-02-05 23:45:32 +0000 speaker: Use standard C bool Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43717 --- 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 fa01c7366d8d..c698a4820434 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -121,12 +121,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 */ @@ -182,8 +176,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) */ } /* @@ -280,7 +274,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 */ @@ -309,29 +303,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); @@ -396,7 +390,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 @@ -414,7 +408,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); } } @@ -455,7 +449,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); }