]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Change the syntax of the parameters to the touch command.
authorAndre Noll <maan@systemlinux.org>
Sat, 4 Jul 2009 16:29:31 +0000 (18:29 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 4 Jul 2009 16:29:31 +0000 (18:29 +0200)
It's more natural to specify e.g. the numplayed count as

touch -n=42

rather than

touch -n42

afs.cmd
aft.c

diff --git a/afs.cmd b/afs.cmd
index c55dfe71ed0566d2797653e8fe05a9835b98687a..de9782a3b7ce95d1faa237111a4a044d3a499f9e 100644 (file)
--- a/afs.cmd
+++ b/afs.cmd
@@ -187,7 +187,7 @@ H:  a slash (see fnmatch(3)).
 N: touch
 P: AFS_READ | AFS_WRITE
 D: Manipulate the afs data for all audio files matching a pattern.
 N: touch
 P: AFS_READ | AFS_WRITE
 D: Manipulate the afs data for all audio files matching a pattern.
-U: touch [-n numplayed] [-l lastplayed] [-y lyrics_id] [-i image_id] [-a amp] [-v] [-p] pattern
+U: touch [-n=numplayed] [-l=lastplayed] [-y=lyrics_id] [-i=image_id] [-a=amp] [-v] [-p] pattern
 H: If no option is given, lastplayed is set to the current time
 H: and numplayed is increased by one. Otherwise, only the given
 H: options are taken into account.
 H: If no option is given, lastplayed is set to the current time
 H: and numplayed is increased by one. Otherwise, only the given
 H: options are taken into account.
diff --git a/aft.c b/aft.c
index daa9a500a7712d01731fcadb577f509060768ea4..6b74b0ae499b1c2fc60e0757d5876b7d90c6f693 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -2105,33 +2105,33 @@ int com_touch(struct rc4_context *rc4c, int argc, char * const * const argv)
                        i++;
                        break;
                }
                        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 (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 (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 (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 (ret < 0)
                                return ret;
                        continue;
                }
-               if (!strncmp(arg, "-a", 2)) {
+               if (!strncmp(arg, "-a=", 3)) {
                        int32_t val;
                        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)
                        if (ret < 0)
                                return ret;
                        if (val < 0 || val > 255)