diff options
author | Wincent Balin <wincent@rockbox.org> | 2010-06-03 00:39:13 +0000 |
---|---|---|
committer | Wincent Balin <wincent@rockbox.org> | 2010-06-03 00:39:13 +0000 |
commit | c1ae4414d4ac6504992434b949b252c30daf0c48 (patch) | |
tree | 696c5781e9a00cea694117eb3ef404d37f10930e /apps/plugins/pdbox/PDa/src/t_main.c | |
parent | 5edd8cf736232a240e2f4f47eb847e1901d18379 (diff) | |
download | rockbox-c1ae4414d4ac6504992434b949b252c30daf0c48.tar.gz rockbox-c1ae4414d4ac6504992434b949b252c30daf0c48.zip |
pdbox: Source cleanup. Removed unneeded files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26497 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pdbox/PDa/src/t_main.c')
-rw-r--r-- | apps/plugins/pdbox/PDa/src/t_main.c | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/apps/plugins/pdbox/PDa/src/t_main.c b/apps/plugins/pdbox/PDa/src/t_main.c deleted file mode 100644 index d68579e745..0000000000 --- a/apps/plugins/pdbox/PDa/src/t_main.c +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
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. */ | ||
4 | |||
5 | /* This file should be compared with the corresponding thing in the TK | ||
6 | * distribution whenever updating to newer versions of TCL/TK. */ | ||
7 | |||
8 | /* | ||
9 | * Copyright (c) 1993 The Regents of the University of California. | ||
10 | * Copyright (c) 1994 Sun Microsystems, Inc. | ||
11 | * | ||
12 | * See the file "license.terms" for information on usage and redistribution | ||
13 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES. | ||
14 | */ | ||
15 | |||
16 | |||
17 | #ifndef MACOSX /* linux and IRIX only; in MACOSX we don't link this in */ | ||
18 | #include "tk.h" | ||
19 | #include <stdlib.h> | ||
20 | |||
21 | /* | ||
22 | * The following variable is a special hack that is needed in order for | ||
23 | * Sun shared libraries to be used for Tcl. | ||
24 | */ | ||
25 | |||
26 | extern int matherr(void); | ||
27 | int *tclDummyMathPtr = (int *) matherr; | ||
28 | |||
29 | /* | ||
30 | *---------------------------------------------------------------------- | ||
31 | * | ||
32 | * main -- | ||
33 | * | ||
34 | * This is the main program for the application. | ||
35 | * | ||
36 | * Results: | ||
37 | * None: Tk_Main never returns here, so this procedure never | ||
38 | * returns either. | ||
39 | * | ||
40 | * Side effects: | ||
41 | * Whatever the application does. | ||
42 | * | ||
43 | *---------------------------------------------------------------------- | ||
44 | */ | ||
45 | |||
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); | ||
50 | |||
51 | int | ||
52 | main(int argc, char **argv) | ||
53 | { | ||
54 | pdgui_setname(argv[0]); | ||
55 | if (argc >= 2) | ||
56 | { | ||
57 | pdgui_setsock(atoi(argv[1])); | ||
58 | argc--; argv++; | ||
59 | argv[0] = "Pd"; | ||
60 | } | ||
61 | if (argc >= 2) | ||
62 | { | ||
63 | pdgui_sethost(argv[1]); | ||
64 | argc--; argv++; | ||
65 | argv[0] = "Pd"; | ||
66 | } | ||
67 | Tk_Main(argc, argv, Tcl_AppInit); | ||
68 | return 0; /* Needed only to prevent compiler warning. */ | ||
69 | } | ||
70 | |||
71 | |||
72 | /* | ||
73 | *---------------------------------------------------------------------- | ||
74 | * | ||
75 | * Tcl_AppInit -- | ||
76 | * | ||
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. | ||
80 | * Results: | ||
81 | * Returns a standard Tcl completion code, and leaves an error | ||
82 | * message in interp->result if an error occurs. | ||
83 | * | ||
84 | * Side effects: | ||
85 | * Depends on the startup script. | ||
86 | * | ||
87 | *---------------------------------------------------------------------- | ||
88 | */ | ||
89 | |||
90 | int | ||
91 | Tcl_AppInit(interp) | ||
92 | Tcl_Interp *interp; /* Interpreter for application. */ | ||
93 | { | ||
94 | |||
95 | if (Tcl_Init(interp) == TCL_ERROR) { | ||
96 | return TCL_ERROR; | ||
97 | } | ||
98 | if (Tk_Init(interp) == TCL_ERROR) { | ||
99 | return TCL_ERROR; | ||
100 | } | ||
101 | |||
102 | /* setup specific to pd-gui: */ | ||
103 | |||
104 | pdgui_startup(interp); | ||
105 | |||
106 | /* | ||
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. | ||
111 | */ | ||
112 | |||
113 | #if 0 | ||
114 | tcl_RcFileName = "~/.pdrc"; | ||
115 | #endif | ||
116 | |||
117 | return TCL_OK; | ||
118 | } | ||
119 | |||
120 | #endif /* MACOSX */ | ||
121 | |||