Annotation of capa/capa51/GUITools/scorer.init.c, revision 1.1

1.1     ! albertel    1: /*
        !             2:  * scorer.c
        !             3:  * Copyright Guy Albertelli II 1998
        !             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 "scorer.h"
        !            12: #include "manager.h"
        !            13: 
        !            14: Tcl_Interp * gInterp;
        !            15: 
        !            16: int Scorer_Init(Tcl_Interp *interp)
        !            17: {
        !            18:   char buf[BUFFER_SIZE];
        !            19: 
        !            20:   signal(SIGSEGV,signalHandler);
        !            21:   signal(SIGILL,signalHandler);
        !            22:   signal(SIGFPE,signalHandler);
        !            23:   signal(SIGBUS,signalHandler);
        !            24: 
        !            25:   gInterp=interp;
        !            26:   
        !            27:   Tcl_CreateCommand(interp, "buildStudentList", buildStudentList,
        !            28: 		    (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
        !            29:   Tcl_CreateCommand(interp, "freeStudentList", freeStudentList,
        !            30: 		    (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
        !            31:   Tcl_CreateCommand(interp, "getAnswersFromSet", getAnswersFromSet,
        !            32: 		    (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
        !            33:   Tcl_CreateCommand(interp, "compareCapaID", compareCapaID,
        !            34: 		    (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
        !            35:   Tcl_CreateCommand(interp,"scorer_get_entry", scorer_get_entry,
        !            36: 		    (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
        !            37:   Tcl_CreateCommand(interp,"scorer_set_entry", scorer_set_entry,
        !            38: 		    (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
        !            39:   
        !            40:   sprintf(buf,"%s.%s",MAJORVER,MANAGERMINORVER);
        !            41:   Tcl_SetVar(interp,"gVer",buf,TCL_GLOBAL_ONLY);
        !            42:   sprintf(buf,"Compiled on %s",COMPILE_DATE);
        !            43:   Tcl_SetVar(interp,"gCompileDate",buf,TCL_GLOBAL_ONLY);
        !            44:   
        !            45:   return TCL_OK;
        !            46: }
        !            47: 
        !            48: int Scorer_InitStandAlone(Tcl_Interp *interp)
        !            49: {
        !            50:   return Scorer_Init(interp);
        !            51: }
        !            52: 
        !            53: int Scorer_SafeInit(Tcl_Interp *interp)
        !            54: {
        !            55:   return Scorer_Init(interp);
        !            56: }
        !            57: 

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