Add missing regex include to generated command_list files.
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index daa9a50..220e019 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -6,18 +6,18 @@
 
 /** \file aft.c Audio file table functions. */
 
+#include <regex.h>
 #include <dirent.h> /* readdir() */
 #include <openssl/rc4.h>
-
+#include <sys/mman.h>
+#include <fnmatch.h>
+#include <sys/shm.h>
 #include <osl.h>
+
 #include "para.h"
 #include "error.h"
 #include "crypt.h"
 #include "string.h"
-#include <sys/mman.h>
-#include <fnmatch.h>
-#include <sys/shm.h>
-
 #include "afh.h"
 #include "afs.h"
 #include "net.h"
@@ -2105,33 +2105,33 @@ int com_touch(struct rc4_context *rc4c, int argc, char * const * const argv)
                        i++;
                        break;
                }
-               if (!strncmp(arg, "-n", 2)) {
-                       ret = para_atoi32(arg + 2, &cto.num_played);
+               if (!strncmp(arg, "-n=", 3)) {
+                       ret = para_atoi32(arg + 3, &cto.num_played);
                        if (ret < 0)
                                return ret;
                        continue;
                }
-               if (!strncmp(arg, "-l", 2)) {
-                       ret = para_atoi64(arg + 2, &cto.last_played);
+               if (!strncmp(arg, "-l=", 3)) {
+                       ret = para_atoi64(arg + 3, &cto.last_played);
                        if (ret < 0)
                                return ret;
                        continue;
                }
-               if (!strncmp(arg, "-y", 2)) {
-                       ret = para_atoi32(arg + 2, &cto.lyrics_id);
+               if (!strncmp(arg, "-y=", 3)) {
+                       ret = para_atoi32(arg + 3, &cto.lyrics_id);
                        if (ret < 0)
                                return ret;
                        continue;
                }
-               if (!strncmp(arg, "-i", 2)) {
-                       ret = para_atoi32(arg + 2, &cto.image_id);
+               if (!strncmp(arg, "-i=", 3)) {
+                       ret = para_atoi32(arg + 3, &cto.image_id);
                        if (ret < 0)
                                return ret;
                        continue;
                }
-               if (!strncmp(arg, "-a", 2)) {
+               if (!strncmp(arg, "-a=", 3)) {
                        int32_t val;
-                       ret = para_atoi32(arg + 2, &val);
+                       ret = para_atoi32(arg + 3, &val);
                        if (ret < 0)
                                return ret;
                        if (val < 0 || val > 255)