]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - audioc.c
Introduce the new nonblock API.
[paraslash.git] / audioc.c
index 666990dba411e65b4dfff4d4d227332e7401ac92..3134faa1165b5972bff64f230e294c40f6615fe8 100644 (file)
--- a/audioc.c
+++ b/audioc.c
@@ -1,11 +1,12 @@
 /*
- * Copyright (C) 2005-2009 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2010 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 
 /** \file audioc.c the client program used to connect to para_audiod */
 
+#include <regex.h>
 #include <sys/types.h>
 #include <dirent.h>
 
@@ -18,8 +19,8 @@
 
 INIT_AUDIOC_ERRLISTS;
 
-/** the gengetopt structure containing command line args */
-struct audioc_args_info conf;
+/** The gengetopt structure containing command line args. */
+static struct audioc_args_info conf;
 
 static int loglevel;
 INIT_STDERR_LOGGING(loglevel);
@@ -151,6 +152,8 @@ int main(int argc, char *argv[])
                                goto out;
                        }
                        loaded -= ret;
+                       if (loaded && ret)
+                               memmove(buf, buf + ret, loaded);
                }
        }
 out: