aboutsummaryrefslogtreecommitdiff
path: root/src/cmdline.opt
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-04 22:34:23 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-02-04 22:38:10 +0200
commit67a97c12e855298a2d5e46eb994d7415237c2e78 (patch)
treec1e1f63236547164718cc175781218e241774d2b /src/cmdline.opt
parent73e4a3f9dfc693a3b25e7f7d903fd885a71850f4 (diff)
downloadidest-67a97c12e855298a2d5e46eb994d7415237c2e78.tar.gz
idest-67a97c12e855298a2d5e46eb994d7415237c2e78.tar.bz2
Add gnulib framework
Diffstat (limited to 'src/cmdline.opt')
-rw-r--r--src/cmdline.opt72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/cmdline.opt b/src/cmdline.opt
new file mode 100644
index 0000000..b4ba979
--- /dev/null
+++ b/src/cmdline.opt
@@ -0,0 +1,72 @@
+OPTIONS_BEGIN(gnu, "id3ed",
+ [<id3ed - ID3 tag editor>],
+ [<FILE [FILE...]>])
+
+OPTION(title,t,NUMBER,
+ [<set song title>])
+BEGIN
+ ID3_COPY(id, title, optarg);
+ mode = MODE_MOD;
+END
+
+OPTION(artist,a,NAME,
+ [<set artist name>])
+BEGIN
+ ID3_COPY(id, artist, optarg);
+ mode = MODE_MOD;
+END
+
+OPTION(album,A,NAME,
+ [<set album name>])
+BEGIN
+ ID3_COPY(id, album, optarg);
+ mode = MODE_MOD;
+END
+
+OPTION(year,y,YEAR,
+ [<set year>])
+BEGIN
+ ID3_COPY(id, year, optarg);
+ mode = MODE_MOD;
+END
+
+OPTION(comment,c,TEXT,
+ [<set comment>])
+BEGIN
+ ID3_COPY(id, comment, optarg);
+ mode = MODE_MOD;
+END
+
+OPTION(track,T,NUMBER,
+ [<set track number>])
+BEGIN
+ id.pad[0] = 0;
+ id.track[0] = atoi(optarg);
+ mode = MODE_MOD;
+END
+
+OPTION(genre,g,NAME,
+ [<set genre>])
+BEGIN
+ int n = id3v1_genre_to_n(optarg);
+ if (n == -1)
+ error(1, 0, "%s: unknown genre", optarg);
+ else if (n == -2)
+ error(1, 0, "%s: ambiguous genre", optarg);
+ id.genre[0] = n;
+ mode = MODE_MOD;
+END
+
+OPTION(query,q,,
+ [<query mode>])
+BEGIN
+ mode = MODE_QUERY;
+END
+
+OPTIONS_END
+
+void
+get_options(int argc, char *argv[])
+{
+ GETOPT(argc, argv)
+}

Return to:

Send suggestions and report system problems to the System administrator.