Annotation of capa/capa51/GUITools/manager.init.c, revision 1.1.1.1
1.1 albertel 1: /*
2: * manager.c
3: * Copyright Guy Albertelli II 1996
4: */
5: #include <stdio.h>
6: #include <sys/file.h>
7: #include <tk.h>
8: #include <stdlib.h>
9: #include <Capa/capaCommon.h>
10: #include <signal.h>
11: #include "manager.h"
12: #include <common.h>
13:
14:
15: Tcl_Interp * gInterp;
16:
17: int Manager_Init(Tcl_Interp *interp)
18: {
19: char buf[BUFFER_SIZE],*argv;
20:
21: signal(SIGSEGV,signalHandler);
22: signal(SIGILL,signalHandler);
23: signal(SIGFPE,signalHandler);
24: signal(SIGBUS,signalHandler);
25:
26: gInterp=interp;
27:
28: /*Tcl_CreateCommand( interp, "name", cname,
29: (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); */
30: Tcl_CreateCommand(interp, "getExistingSections", capaGetExistingSections,
31: (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
32:
33: sprintf(buf,"%s.%s",MAJORVER,MANAGERMINORVER);
34: Tcl_SetVar(interp,"gVer",buf,TCL_GLOBAL_ONLY);
35: sprintf(buf,"Compiled on %s",COMPILE_DATE);
36: Tcl_SetVar(interp,"gCompileDate",buf,TCL_GLOBAL_ONLY);
37:
38: argv=Tcl_GetVar(interp,"argv", TCL_GLOBAL_ONLY);
39: if (argv!=NULL && strlen(argv) > 9 &&
40: argv[0]=='-' &&
41: argv[1]=='c' &&
42: argv[2]=='o' &&
43: argv[3]=='p' &&
44: argv[4]=='y' &&
45: argv[5]=='r' &&
46: argv[6]=='i' &&
47: argv[7]=='g' &&
48: argv[8]=='h' &&
49: argv[9]=='t' ) message();
50:
51: Scorer_Init(interp);
52: return TCL_OK;
53: }
54:
55: int Manager_InitStandAlone(Tcl_Interp *interp)
56: {
57: return Manager_Init(interp);
58: }
59:
60: int Manager_SafeInit(Tcl_Interp *interp)
61: {
62: return Manager_Init(interp);
63: }
64:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>