From eee0b78320c382ee23b133fda19dcb9f5520f9e1 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 12 Oct 2006 11:04:38 +0200 Subject: [PATCH] aplay/arecord -L command: process properly end-of-line characters --- aplay/aplay.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/aplay/aplay.c b/aplay/aplay.c index 79bbd19..f21d71a 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -294,8 +294,17 @@ static void pcm_list(void) goto __end; } printf("%s\n", *n); - if (delim) - printf(" %s\n", delim + 1); + if (delim++) { + printf(" "); + while (*delim) { + if (*delim == '\n') + printf("\n "); + else + putchar(*delim); + delim++; + } + putchar('\n'); + } __end: n++; }