Commit 14a1e98a authored by conrad's avatar conrad

use -c, --content-type to select on content-type in oggz-comment, and rename

--clear to --delete (+update help text and man page accordingly)


git-svn-id: http://svn.annodex.net/liboggz/trunk@3316 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent a05c1f85
...@@ -73,7 +73,7 @@ manpage.1: manpage.sgml ...@@ -73,7 +73,7 @@ manpage.1: manpage.sgml
<arg choice="opt">--output <parameter>filename</parameter></arg> <arg choice="opt">--output <parameter>filename</parameter></arg>
</group> </group>
<group><arg choice="opt">-c</arg><arg choice="opt">--clear</arg></group> <group><arg choice="opt">-d</arg><arg choice="opt">--delete</arg></group>
<group><arg choice="opt">-a</arg><arg choice="opt">--all</arg></group> <group><arg choice="opt">-a</arg><arg choice="opt">--all</arg></group>
<group> <group>
...@@ -82,8 +82,8 @@ manpage.1: manpage.sgml ...@@ -82,8 +82,8 @@ manpage.1: manpage.sgml
</group> </group>
<group> <group>
<arg choice="opt">-t <parameter>content-type</parameter></arg> <arg choice="opt">-c <parameter>content-type</parameter></arg>
<arg choice="opt">--type <parameter>content-type</parameter></arg> <arg choice="opt">--content-type <parameter>content-type</parameter></arg>
</group> </group>
<arg choice="plain">filename</arg> <arg choice="plain">filename</arg>
...@@ -131,8 +131,8 @@ manpage.1: manpage.sgml ...@@ -131,8 +131,8 @@ manpage.1: manpage.sgml
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-c, --clear</term> <term>-d, --delete</term>
<listitem><para>Clear comments before editing.</para></listitem> <listitem><para>Delete comments before editing.</para></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
<varlistentry> <varlistentry>
...@@ -141,7 +141,7 @@ manpage.1: manpage.sgml ...@@ -141,7 +141,7 @@ manpage.1: manpage.sgml
</varlistentry> </varlistentry>
</variablelist> </variablelist>
<varlistentry> <varlistentry>
<term>-t <parameter>content-type</parameter>, --type <parameter>content-type</parameter></term> <term>-c <parameter>content-type</parameter>, --content-type <parameter>content-type</parameter></term>
<listitem><para>Edit comments of the logical bitstreams with <listitem><para>Edit comments of the logical bitstreams with
specified <parameter>content-type</parameter>.</para></listitem> specified <parameter>content-type</parameter>.</para></listitem>
</varlistentry> </varlistentry>
......
...@@ -56,9 +56,9 @@ usage (char * progname) ...@@ -56,9 +56,9 @@ usage (char * progname)
printf ("\nEditing options\n"); printf ("\nEditing options\n");
printf (" -o filename, --output filename\n"); printf (" -o filename, --output filename\n");
printf (" Specify output filename\n"); printf (" Specify output filename\n");
printf (" -c, --clear Clear comments before editing\n"); printf (" -d, --delete Delete comments before editing\n");
printf (" -a, --all Edit comments for all logical bitstreams\n"); printf (" -a, --all Edit comments for all logical bitstreams\n");
printf (" -t content-type, --type content-type\n"); printf (" -c content-type, --content-type content-type\n");
printf (" Edit comments of the logical bitstreams with\n"); printf (" Edit comments of the logical bitstreams with\n");
printf (" specified content-type\n"); printf (" specified content-type\n");
printf (" -s serialno, --serialno serialno\n"); printf (" -s serialno, --serialno serialno\n");
...@@ -253,8 +253,8 @@ int main(int argc, char *argv[]) { ...@@ -253,8 +253,8 @@ int main(int argc, char *argv[]) {
for(i = 2; i < argc; i++) { for(i = 2; i < argc; i++) {
if(!strcmp(argv[i], "-o")) if(!strcmp(argv[i], "-o"))
out_file = argv[++i]; out_file = argv[++i];
else if(!strcmp(argv[i], "-c") else if(!strcmp(argv[i], "-d")
|| !strcmp(argv[i], "--clear")) || !strcmp(argv[i], "--delete"))
clear = 1; clear = 1;
else if(!strcmp(argv[i], "-l") else if(!strcmp(argv[i], "-l")
|| !strcmp(argv[i], "--list")) { || !strcmp(argv[i], "--list")) {
...@@ -270,8 +270,8 @@ int main(int argc, char *argv[]) { ...@@ -270,8 +270,8 @@ int main(int argc, char *argv[]) {
comments[temp = 0].name = "0"; comments[temp = 0].name = "0";
} }
serialno = -11; serialno = -11;
} else if(!strcmp(argv[i], "-t") } else if(!strcmp(argv[i], "-c")
|| !strcmp(argv[i], "--type")) { || !strcmp(argv[i], "--content-type")) {
if(comment_table_insert(type_table, comment_table, serialno, comments)) { if(comment_table_insert(type_table, comment_table, serialno, comments)) {
comments = calloc(argc - 2, sizeof(OggzComment)); comments = calloc(argc - 2, sizeof(OggzComment));
comments[temp = 0].name = "0"; comments[temp = 0].name = "0";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment