/*
 * Copyright (c) 1992, The Geometry Center
 *                     University of Minnesota 
 *                     1300 South Second Street
 *                     Minneapolis, MN  55454
 *
 * email address: software@geom.umn.edu
 *
 * This software is copyrighted as noted above.  It may be freely copied,
 * modified, and redistributed, provided that the copyright notice is
 * preserved on all copies.
 *
 * There is no warranty or other guarantee of fitness for this software,
 * it is provided solely "as is".  Bug reports or fixes may be sent
 * to the authors, who may or may not act on them as they desire.
 *
 * You may not include this software in a program or other software product
 * without supplying the source, or without informing the end-user that the
 * source is available for no extra charge.
 *
 * If you modify this software, you should include a notice giving the
 * name of the person performing the modification, the date of modification,
 * and the reason for such modification.
 *
 *     The National Science and Technology Research Center for
 *      Computation and Visualization of Geometric Structures
 */

/*
 *     Generated by the NeXT Interface Builder.
 */

#import <stdlib.h>
#import <appkit/Application.h>
#import <appkit/SavePanel.h>
#include <stdio.h>
#include "link_types.h"
#include "link_edit_types.h"
#include <objects.h>

id globalNXApp;
/*Display *dpy;*/
double xppmm,yppmm;  /* x and y pixels per millimeter */
double WidthMM,HeightMM;

int dave_file_type;

id globalEditView;
id globalDisplayView;

LinkStatus link_status;
LinkData link_data;
LinkEditStatus link_edit_status, *gnrc;
id currentLinkObj;
// LinkEditData link_edit_data;

/* Stuff for display */
char *three_d_ext;
char *three_d_dir;
char *three_d_file, *three_d_file_from_edit;

extern void comma__init();

void main(int argc, char *argv[]) {
  
    id savepanel;
    NXApp = [Application new];
    [NXApp loadNibSection:"Linktool.nib" owner:NXApp];
    /** Initialize global variables **/
    xppmm = yppmm = 3.031496;
    gnrc = NULL;
//    gnrc = link_edit_status_ptr;

    /* Initialize scheme procedure */
    comma__init();

    /* Initialize save type */
    dave_file_type = DAVE_EDIT_TYPE;
    savepanel = [SavePanel new];
    [savepanel setRequiredFileType:"lnkp"];

    [globalEditView display];
    [NXApp run];
    [NXApp free];
    exit(0);
}
