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 MACOSX /* linux and IRIX only; in MACOSX we don't link this in */
22 * The following variable is a special hack that is needed in order for
23 * Sun shared libraries to be used for Tcl.
26 extern int matherr(void);
27 int *tclDummyMathPtr
= (int *) matherr
;
30 *----------------------------------------------------------------------
34 * This is the main program for the application.
37 * None: Tk_Main never returns here, so this procedure never
41 * Whatever the application does.
43 *----------------------------------------------------------------------
46 void pdgui_startup(Tcl_Interp
*interp
);
47 void pdgui_setname(char *name
);
48 void pdgui_setsock(int port
);
49 void pdgui_sethost(char *name
);
52 main(int argc
, char **argv
)
54 pdgui_setname(argv
[0]);
57 pdgui_setsock(atoi(argv
[1]));
63 pdgui_sethost(argv
[1]);
67 Tk_Main(argc
, argv
, Tcl_AppInit
);
68 return 0; /* Needed only to prevent compiler warning. */
73 *----------------------------------------------------------------------
77 * This procedure performs application-specific initialization.
78 * Most applications, especially those that incorporate additional
79 * packages, will have their own version of this procedure.
81 * Returns a standard Tcl completion code, and leaves an error
82 * message in interp->result if an error occurs.
85 * Depends on the startup script.
87 *----------------------------------------------------------------------
92 Tcl_Interp
*interp
; /* Interpreter for application. */
95 if (Tcl_Init(interp
) == TCL_ERROR
) {
98 if (Tk_Init(interp
) == TCL_ERROR
) {
102 /* setup specific to pd-gui: */
104 pdgui_startup(interp
);
107 * Specify a user-specific startup file to invoke if the application
108 * is run interactively. Typically the startup file is "~/.apprc"
109 * where "app" is the name of the application. If this line is deleted
110 * then no user-specific startup file will be run under any conditions.
114 tcl_RcFileName
= "~/.pdrc";
121 /* Copyright (c) 1997-1999 Miller Puckette.
122 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
123 * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
125 /* This file should be compared with the corresponding thing in the TK
126 * distribution whenever updating to newer versions of TCL/TK. */
129 * Copyright (c) 1993 The Regents of the University of California.
130 * Copyright (c) 1994 Sun Microsystems, Inc.
132 * See the file "license.terms" for information on usage and redistribution
133 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
137 #ifndef MACOSX /* linux and IRIX only; in MACOSX we don't link this in */
142 * The following variable is a special hack that is needed in order for
143 * Sun shared libraries to be used for Tcl.
146 extern int matherr(void);
147 int *tclDummyMathPtr
= (int *) matherr
;
150 *----------------------------------------------------------------------
154 * This is the main program for the application.
157 * None: Tk_Main never returns here, so this procedure never
161 * Whatever the application does.
163 *----------------------------------------------------------------------
166 void pdgui_startup(Tcl_Interp
*interp
);
167 void pdgui_setname(char *name
);
168 void pdgui_setsock(int port
);
169 void pdgui_sethost(char *name
);
172 main(int argc
, char **argv
)
174 pdgui_setname(argv
[0]);
177 pdgui_setsock(atoi(argv
[1]));
183 pdgui_sethost(argv
[1]);
187 Tk_Main(argc
, argv
, Tcl_AppInit
);
188 return 0; /* Needed only to prevent compiler warning. */
193 *----------------------------------------------------------------------
197 * This procedure performs application-specific initialization.
198 * Most applications, especially those that incorporate additional
199 * packages, will have their own version of this procedure.
201 * Returns a standard Tcl completion code, and leaves an error
202 * message in interp->result if an error occurs.
205 * Depends on the startup script.
207 *----------------------------------------------------------------------
212 Tcl_Interp
*interp
; /* Interpreter for application. */
215 if (Tcl_Init(interp
) == TCL_ERROR
) {
218 if (Tk_Init(interp
) == TCL_ERROR
) {
222 /* setup specific to pd-gui: */
224 pdgui_startup(interp
);
227 * Specify a user-specific startup file to invoke if the application
228 * is run interactively. Typically the startup file is "~/.apprc"
229 * where "app" is the name of the application. If this line is deleted
230 * then no user-specific startup file will be run under any conditions.
234 tcl_RcFileName
= "~/.pdrc";