Annotation of capa/capa51/GUITools/manager.init.c, revision 1.3

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); */
1.2       albertel   30:   Tcl_CreateCommand(interp, "CTcreateSummary", capaCTcreateSummary,
                     31: 		    (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
1.1       albertel   32:   Tcl_CreateCommand(interp, "getExistingSections", capaGetExistingSections,
                     33: 		    (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); 
1.3     ! albertel   34:   Tcl_CreateCommand( interp, "getSpecificCapaId", capaGetSpecifiCapaId,
        !            35: 		     (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); 
        !            36:   Tcl_CreateCommand( interp, "isSetOpen", capaIsSetOpen,
        !            37: 		     (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); 
1.1       albertel   38:   sprintf(buf,"%s.%s",MAJORVER,MANAGERMINORVER);
                     39:   Tcl_SetVar(interp,"gVer",buf,TCL_GLOBAL_ONLY);
                     40:   sprintf(buf,"Compiled on %s",COMPILE_DATE);
                     41:   Tcl_SetVar(interp,"gCompileDate",buf,TCL_GLOBAL_ONLY);
                     42:   
                     43:   argv=Tcl_GetVar(interp,"argv", TCL_GLOBAL_ONLY);
                     44:   if (argv!=NULL && strlen(argv) > 9 && 
                     45:       argv[0]=='-' && 
                     46:       argv[1]=='c' && 
                     47:       argv[2]=='o' && 
                     48:       argv[3]=='p' && 
                     49:       argv[4]=='y' && 
                     50:       argv[5]=='r' && 
                     51:       argv[6]=='i' && 
                     52:       argv[7]=='g' && 
                     53:       argv[8]=='h' && 
                     54:       argv[9]=='t' ) message();
                     55: 
                     56:   Scorer_Init(interp);
                     57:   return TCL_OK;
                     58: }
                     59: 
                     60: int Manager_InitStandAlone(Tcl_Interp *interp)
                     61: {
                     62:   return Manager_Init(interp);
                     63: }
                     64: 
                     65: int Manager_SafeInit(Tcl_Interp *interp)
                     66: {
                     67:   return Manager_Init(interp);
                     68: }
                     69: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>