Revision: 3314
http://skim-app.svn.sourceforge.net/skim-app/?rev=3314&view=rev
Author: hofman
Date: 2007-12-06 02:50:04 -0800 (Thu, 06 Dec 2007)
Log Message:
-----------
Compare options case insensitively. Increase version number.
Modified Paths:
--------------
trunk/skimnotes.m
Modified: trunk/skimnotes.m
===================================================================
--- trunk/skimnotes.m 2007-12-06 10:40:16 UTC (rev 3313)
+++ trunk/skimnotes.m 2007-12-06 10:50:04 UTC (rev 3314)
@@ -6,7 +6,7 @@
#define SKIM_TEXT_NOTES_KEY @"net_sourceforge_skim-app_text_notes"
static char *usageStr = "Usage:\n skimnotes set PDF_FILE [SKIM_FILE|-]\n
skimnotes get [-format skim|text|rtf] PDF_FILE
[SKIM_FILE|RTF_FILE|TEXT_FILE|-]\n skimnotes remove PDF_FILE\n skimnotes help";
-static char *versionStr = "SkimNotes command-line client, version 0.3.";
+static char *versionStr = "SkimNotes command-line client, version 1.0.";
enum {
SKNActionGet,
@@ -43,7 +43,7 @@
NSArray *args = [[NSProcessInfo processInfo] arguments];
if (argc < 3) {
- if (argc == 2 && ([[args objectAtIndex:1] isEqualToString:@"-h"] ||
[[args objectAtIndex:1] isEqualToString:@"-help"] || [[args objectAtIndex:1]
isEqualToString:@"help"])) {
+ if (argc == 2 && ([[args objectAtIndex:1]
caseInsensitiveCompare:@"-h"] == NSOrderedSame || [[args objectAtIndex:1]
caseInsensitiveCompare:@"-help"] == NSOrderedSame || [[args objectAtIndex:1]
caseInsensitiveCompare:@"help"] == NSOrderedSame)) {
SKNWriteUsageAndVersion();
exit (0);
} else {
@@ -53,11 +53,11 @@
}
NSString *actionString = [args objectAtIndex:1];
- if ([actionString isEqualToString:@"get"]) {
+ if ([actionString caseInsensitiveCompare:@"get"] == NSOrderedSame) {
action = SKNActionGet;
- } else if ([actionString isEqualToString:@"set"]) {
+ } else if ([actionString caseInsensitiveCompare:@"set"] == NSOrderedSame) {
action = SKNActionSet;
- } else if ([actionString isEqualToString:@"remove"]) {
+ } else if ([actionString caseInsensitiveCompare:@"remove"] ==
NSOrderedSame) {
action = SKNActionRemove;
} else {
SKNWriteUsageAndVersion();
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit