1
/* Copyright (c) 1997-1999 Miller Puckette.
2
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
3
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
5
/* This file should be compared with the corresponding thing in the TK
6
* distribution whenever updating to newer versions of TCL/TK. */
9
* Copyright (c) 1993 The Regents of the University of California.
10
* Copyright (c) 1994 Sun Microsystems, Inc.
12
* See the file "license.terms" for information on usage and redistribution
13
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
17
#ifndef __APPLE__ /* linux and IRIX only; in __APPLE__ we don't link this in */
22
*----------------------------------------------------------------------
26
* This is the main program for the application.
29
* None: Tk_Main never returns here, so this procedure never
33
* Whatever the application does.
35
*----------------------------------------------------------------------
38
void pdgui_startup(Tcl_Interp *interp);
39
void pdgui_setname(char *name);
40
void pdgui_setsock(int port);
41
void pdgui_sethost(char *name);
44
main(int argc, char **argv)
46
pdgui_setname(argv[0]);
49
pdgui_setsock(atoi(argv[1]));
55
pdgui_sethost(argv[1]);
59
Tk_Main(argc, argv, Tcl_AppInit);
60
return 0; /* Needed only to prevent compiler warning. */
65
*----------------------------------------------------------------------
69
* This procedure performs application-specific initialization.
70
* Most applications, especially those that incorporate additional
71
* packages, will have their own version of this procedure.
74
* Returns a standard Tcl completion code, and leaves an error
75
* message in interp->result if an error occurs.
78
* Depends on the startup script.
80
*----------------------------------------------------------------------
86
Tcl_Interp *interp; /* Interpreter for application. */
90
if (Tcl_Init(interp) == TCL_ERROR) {
93
if (Tk_Init(interp) == TCL_ERROR) {
97
/* setup specific to pd-gui: */
99
pdgui_startup(interp);
102
* Specify a user-specific startup file to invoke if the application
103
* is run interactively. Typically the startup file is "~/.apprc"
104
* where "app" is the name of the application. If this line is deleted
105
* then no user-specific startup file will be run under any conditions.
109
tcl_RcFileName = "~/.apprc";
115
#endif /* __APPLE__ */