From: Mike L. <mli...@us...> - 2003-10-25 23:45:20
|
Update of /cvsroot/bitcollider/bitcollider/src In directory sc8-pr-cvs1:/tmp/cvs-serv15806/src Modified Files: bitcollider.c Log Message: http://sourceforge.net/tracker/index.php?func=detail&aid=610360&group_id=21211&atid=371211 http://sourceforge.net/tracker/index.php?func=detail&aid=481033&group_id=21211&atid=121211 http://sourceforge.net/tracker/index.php?func=detail&aid=491787&group_id=21211&atid=121211 Index: bitcollider.c =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/src/bitcollider.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** bitcollider.c 12 Oct 2001 22:01:15 -0000 1.18 --- bitcollider.c 25 Oct 2003 23:43:33 -0000 1.19 *************** *** 35,39 **** printf(" -n - show submission in browser, without submitting\n"); printf(" -u - send submission to alternate URL\n"); - printf(" -3 - force mp3 analysis even if file does not end in .mp3\n"); printf(" -e [ext] - treat file as if it had a given extension\n"); printf(" -d - debug print during plugin loading\n"); --- 35,38 ---- *************** *** 42,53 **** printf(" (Default is to analyze only known extensions)\n"); printf(" -f <file> - read tags from <file> instead of analyzing\n"); #ifdef USE_BDB printf(" -c - clear the bitprint cache\n"); #endif #ifndef _WIN32 ! printf(" -k - use the Konqueror to submit\n"); ! printf(" -m - use the Mozilla to submit\n"); ! printf(" -o - use the Opera to submit\n"); ! printf(" -l - use the lynx to submit\n"); printf("\nBy default Netscape will be used. You may also set the\n"); printf("BROWSER environment variable to specify your browser of choice.\n"); --- 41,53 ---- printf(" (Default is to analyze only known extensions)\n"); printf(" -f <file> - read tags from <file> instead of analyzing\n"); + printf(" -m - calculate MD5\n"); #ifdef USE_BDB printf(" -c - clear the bitprint cache\n"); #endif #ifndef _WIN32 ! printf(" --konqueror - use the Konqueror to submit\n"); ! printf(" --lynx - use the lynx to submit\n"); ! printf(" --mozilla - use the Mozilla to submit\n"); ! printf(" --opera - use the Opera to submit\n"); printf("\nBy default Netscape will be used. You may also set the\n"); printf("BROWSER environment variable to specify your browser of choice.\n"); *************** *** 140,143 **** --- 140,144 ---- b_bool quiet = false; b_bool clearCache = false; + b_bool calculateMD5 = false; b_bool ret; char fileName[MAX_PATH]; *************** *** 159,178 **** { #ifndef _WIN32 ! if (strcmp(argv[argIndex], "-m") == 0) { browser = eBrowserMozilla; } else ! if (strcmp(argv[argIndex], "-k") == 0) { browser = eBrowserKonqueror; } else ! if (strcmp(argv[argIndex], "-o") == 0) { browser = eBrowserOpera; } else ! if (strcmp(argv[argIndex], "-l") == 0) { browser = eBrowserLynx; --- 160,179 ---- { #ifndef _WIN32 ! if (strcmp(argv[argIndex], "--mozilla") == 0) { browser = eBrowserMozilla; } else ! if (strcmp(argv[argIndex], "--konqueror") == 0) { browser = eBrowserKonqueror; } else ! if (strcmp(argv[argIndex], "--opera") == 0) { browser = eBrowserOpera; } else ! if (strcmp(argv[argIndex], "--lynx") == 0) { browser = eBrowserLynx; *************** *** 225,228 **** --- 226,234 ---- } else + if (strcmp(argv[argIndex], "-m") == 0) + { + calculateMD5 = true; + } + else if (strcmp(argv[argIndex], "-e") == 0) { *************** *** 234,248 **** } else - if (strcmp(argv[argIndex], "-3") == 0) - { - if (checkAsExt[0]) - { - fprintf(stderr, "You cannot use -3 and -e at the same time."); - fprintf(stderr, " -3 ignored.\n"); - } - else - strcpy(checkAsExt, ".mp3"); - } - else break; } --- 240,243 ---- *************** *** 255,265 **** if (submitTarget) { ! if (strncmp(submitTarget, "http://", 7)) { fprintf(stderr, "'%s' is not a valid URL. Ignoring.\n\n", submitTarget); submitTarget = NULL; } - else - fprintf(stderr, "Submitting to: %s\n\n", submitTarget); } --- 250,262 ---- if (submitTarget) { ! if (!strncmp(submitTarget, "http://", 7) || !strncmp(submitTarget, "https://", 8)) ! { ! fprintf(stderr, "Submitting to: %s\n\n", submitTarget); ! } ! else { fprintf(stderr, "'%s' is not a valid URL. Ignoring.\n\n", submitTarget); submitTarget = NULL; } } *************** *** 275,278 **** --- 272,277 ---- } + set_calculateMD5(bc, calculateMD5); + if (clearCache) { *************** *** 343,347 **** continue; } ! if (type == eFile) { --- 342,346 ---- continue; } ! if (type == eFile) { *************** *** 349,356 **** if (!ret) { ! print_error(bc, "Cannot analyze file"); ! bitcollider_shutdown(bc); ! bc = NULL; ! exit(-1); } } --- 348,353 ---- if (!ret) { ! fprintf(stderr, "%s problem: %s\n", fileName, get_error(bc)); ! continue; } } |