]> git.alsa-project.org Git - alsa-utils.git/commitdiff
aplay/arecord -L command: process properly end-of-line characters
authorJaroslav Kysela <perex@perex.cz>
Thu, 12 Oct 2006 09:04:38 +0000 (11:04 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 12 Oct 2006 09:04:38 +0000 (11:04 +0200)
aplay/aplay.c

index 79bbd198bf52c0d4539844945a94b18b4a0db54a..f21d71a432295b972c9390ed444325035a7a198d 100644 (file)
@@ -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++;
        }