File: main.m

package info (click to toggle)
wcalc 2.4-1.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,916 kB
  • sloc: ansic: 7,089; objc: 2,002; sh: 890; lex: 816; yacc: 641; makefile: 103
file content (36 lines) | stat: -rw-r--r-- 816 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
//  main.m
//  Wcalc
//
//  Created by Kyle Wheeler on Thu Jan 17 2002.
//  Copyright (c) 2001 Kyle Wheeler. All rights reserved.
//

#include <Cocoa/Cocoa.h>

#include "calculator.h" /* needed to set standard_output = 0 */
#include "variables.h" /* needed to run variable initialization */
#include "WcalcService.h" /* needed to init the service */

#ifdef MEMWATCH
#include "memwatch.h"
#endif

int main(int argc, const char *argv[])
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    WcalcService* wserv = [[WcalcService alloc] init];
    int retval;
    
    initvar();
    standard_output = 0;
    
    NSRegisterServicesProvider(wserv,@"Wcalc");
    [NSApp setServicesProvider:wserv];
    
    retval = NSApplicationMain(argc, argv);
    
    [pool release];
    exit(0);
    return 0;
}