//
//  main.m
//  RSS Syndication
//
//  Created by Makoto Kinoshita on 05/04/20.
//  Copyright __MyCompanyName__ 2005 . All rights reserved.
//

#import <Cocoa/Cocoa.h>

NSArray*    SRSDFeedURLs = nil;
int         SRSDRemove = 500; // SRRSSRemoveNever

int main(int argc, char *argv[])
{
    NSAutoreleasePool*  pool;
    pool = [[NSAutoreleasePool alloc] init];
    
    // Check arguments
    if (argc != 3) {
        NSLog(@"Invalid arguments, argc = %d", argc);
    }
    else {
        // Get feed URLs
        NSString*   string;
        NSArray*    feedURLs;
        string = [NSString stringWithCString:argv[1]];
        feedURLs = [string propertyList];
        if (feedURLs) {
            SRSDFeedURLs = [feedURLs retain];
        }
        
        // Get remove
        int remove;
        string = [NSString stringWithCString:argv[2]];
        remove = [string intValue];
        if (remove > 0) {
            SRSDRemove = remove;
        }
    }
    
    [pool release];
    
    return NSApplicationMain(argc, (const char **) argv);
}
