Thu Jul 15 07:03:14 2021 UTC ()
aiomixer: avoid wasting space


(nia)
diff -r1.8 -r1.9 src/usr.bin/aiomixer/draw.c

cvs diff -r1.8 -r1.9 src/usr.bin/aiomixer/draw.c (expand / switch to unified diff)

--- src/usr.bin/aiomixer/draw.c 2021/07/15 06:59:55 1.8
+++ src/usr.bin/aiomixer/draw.c 2021/07/15 07:03:14 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: draw.c,v 1.8 2021/07/15 06:59:55 nia Exp $ */ 1/* $NetBSD: draw.c,v 1.9 2021/07/15 07:03:14 nia Exp $ */
2/*- 2/*-
3 * Copyright (c) 2021 The NetBSD Foundation, Inc. 3 * Copyright (c) 2021 The NetBSD Foundation, Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * This code is derived from software contributed to The NetBSD Foundation 6 * This code is derived from software contributed to The NetBSD Foundation
7 * by Nia Alarie. 7 * by Nia Alarie.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -301,27 +301,27 @@ draw_classbar(struct aiomixer *aio) @@ -301,27 +301,27 @@ draw_classbar(struct aiomixer *aio)
301 if (aio->curclass == i) 301 if (aio->curclass == i)
302 wattroff(aio->classbar, A_STANDOUT); 302 wattroff(aio->classbar, A_STANDOUT);
303 waddch(aio->classbar, ' '); 303 waddch(aio->classbar, ' ');
304 } 304 }
305 305
306 wprintw(aio->classbar, "\n\n"); 306 wprintw(aio->classbar, "\n\n");
307} 307}
308 308
309void 309void
310draw_header(struct aiomixer *aio) 310draw_header(struct aiomixer *aio)
311{ 311{
312 wprintw(aio->header, "\n"); 312 wprintw(aio->header, "\n");
313 mvwaddstr(aio->header, 0, 313 mvwaddstr(aio->header, 0,
314 getmaxx(aio->header) - ((int)sizeof("NetBSD audio mixer") + 1), 314 getmaxx(aio->header) - (int)sizeof("NetBSD audio mixer"),
315 "NetBSD audio mixer"); 315 "NetBSD audio mixer");
316 316
317 if (aio->mixerdev.version[0] != '\0') { 317 if (aio->mixerdev.version[0] != '\0') {
318 mvwprintw(aio->header, 0, 0, "%s %s", 318 mvwprintw(aio->header, 0, 0, "%s %s",
319 aio->mixerdev.name, aio->mixerdev.version); 319 aio->mixerdev.name, aio->mixerdev.version);
320 } else { 320 } else {
321 mvwprintw(aio->header, 0, 0, "%s", aio->mixerdev.name); 321 mvwprintw(aio->header, 0, 0, "%s", aio->mixerdev.name);
322 } 322 }
323} 323}
324 324
325void 325void
326create_widgets(struct aiomixer *aio) 326create_widgets(struct aiomixer *aio)
327{ 327{