updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / mp3rename / mp3rename-jf-long-options.patch
bloba9db3ce18cac84a42cd4375c676b56b6fde64cfc
1 --- ../src-org/mp3rename-0.6.orig/mp3rename.c 2007-05-25 23:11:44.000000000 +0200
2 +++ mp3rename.c 2007-05-25 23:51:42.000000000 +0200
3 @@ -15,6 +15,7 @@
4 #include <ctype.h>
5 #include <string.h>
6 #include <signal.h>
7 +#include <getopt.h>
9 void pad(char *string, int length);
10 void display_help();
11 @@ -37,14 +38,34 @@
13 if (argc < 2 ) /* If nothing is given */
15 - fprintf(stderr,"Mp3rename\n\nusage: [-vfhsbia] [file ...]\n\nUse 'mp3rename -h' for a usage summary\n\n");
16 + fprintf(stderr,"Mp3rename\n\nusage: [-vfhsbia] [file ...]\n\nUse 'mp3rename --help' for a usage summary\n\n");
18 return 0;
21 /* Lets checkout the options */
23 - while ((ch = getopt(argc, argv, "vfhsbiap")) != -1)
24 + while (1) {
25 + int this_option_optind = optind ? optind : 1;
26 + int option_index = 0;
27 + static struct option long_options[] = {
28 + {"ask", 0, 0, 'a'},
29 + {"padding", 0, 0, 'p'},
30 + {"burn", 0, 0, 'b'},
31 + {"source-look", 1, 0, 's'},
32 + {"help", 0, 0, 'h'},
33 + {"verbose",0, NULL, 'v'},
34 + {"create", 0, 0, 'c'},
35 + {"force", 0, 0, 'f'},
36 + {"info", 0, 0, 'i'},
37 + {0, 0, 0, 0}
38 + };
40 + ch = getopt_long (argc, argv, "vfhsbiap",
41 + long_options, &option_index);
42 + if (ch == -1)
43 + break;
45 switch (ch)
47 case 'v': /* Verbose mode */
48 @@ -72,9 +93,10 @@
49 padtrack = 1;
50 break;
51 default: /* If wrong option is given */
52 - fprintf(stderr,"Mp3rename\n\nusage: [-vfhsbia] [file ...]\n\nUse 'mp3rename -h' for a usage summary\n\n");
53 + fprintf(stderr,"Mp3rename\n\nusage: [-vfhsbia] [file ...]\n\nUse 'mp3rename --help' for a usage summary\n\n");
54 exit(1);
56 + }
57 argv += optind;
59 if ( info == 1 && ( forced == 1 || verbose == 1))
60 @@ -501,15 +523,15 @@
62 printf("Mp3rename 0.6\n\n");
63 printf("Options:\n");
64 - printf("\t-f\t Force non id3 rename.\n");
65 - printf("\t-v\t Verbose mode.\n");
66 - printf("\t-h\t Display this help message.\n");
67 - printf("\t-b\t Limit the file size to 32 chars.\n");
68 - printf("\t-i\t Only show the id3tags.\n");
69 - printf("\t-p\t Pad the track number with a leading zero when less than 10.\n");
70 - printf("\t-a\t Ask everything for the id3tag.\n\n");
71 - printf("\t-s\t Set the default filename look.\n");
72 - printf("\t \t for more help on this option: -s help\n\n");
73 + printf("\t-f, --force\t Force non id3 rename.\n");
74 + printf("\t-v, --verbose\t Verbose mode.\n");
75 + printf("\t-h, --help\t Display this help message.\n");
76 + printf("\t-b, --burn\t Limit the file size to 32 chars.\n");
77 + printf("\t-i, --info\t Only show the id3tags.\n");
78 + printf("\t-p, --pad\t Pad the track number with a leading zero when less than 10.\n");
79 + printf("\t-a, --ask\t Ask everything for the id3tag.\n\n");
80 + printf("\t-s, --source\t Set the default filename look.\n");
81 + printf("\t \t \t for more help on this option take a look at -s help\n\n");
82 printf("Sander Janssen <janssen@rendo.dekooi.nl>\n\n");