Annotation of capa/capa51/GUITools/grader.init.c, revision 1.1
1.1 ! albertel 1: /*
! 2: * grader.init.c
! 3: * Copyright Guy Albertelli II 1996
! 4: */
! 5: #include <stdio.h>
! 6: #include <tk.h>
! 7: #include <stdlib.h>
! 8: #include <signal.h>
! 9: #include <unistd.h>
! 10: #include <grader.h>
! 11: #include <common.h>
! 12:
! 13: Tcl_Interp *gInterp;
! 14:
! 15: int Grader_Init(Tcl_Interp *interp)
! 16: {
! 17: char buf[BUFFER_SIZE],*argv;
! 18:
! 19: gInterp=interp;
! 20: Tcl_CreateCommand( interp, "getHeader", capaGetHeader, (ClientData)NULL,
! 21: (Tcl_CmdDeleteProc *)NULL);
! 22: Tcl_CreateCommand( interp, "getStudents", capaGetStudents,
! 23: (ClientData)NULL,(Tcl_CmdDeleteProc *)NULL);
! 24: Tcl_CreateCommand( interp, "dateUpdate", capaDateUpdate, (ClientData)NULL,
! 25: (Tcl_CmdDeleteProc *)NULL);
! 26: Tcl_CreateCommand( interp, "findSection", capaFindSection,
! 27: (ClientData)NULL,(Tcl_CmdDeleteProc *)NULL);
! 28: Tcl_CreateCommand( interp, "getReportInfo", capaGetReportInfo,
! 29: (ClientData)NULL,(Tcl_CmdDeleteProc *)NULL);
! 30: Tcl_CreateCommand( interp, "getSetSummary", capaGetSetSummary,
! 31: (ClientData)NULL,(Tcl_CmdDeleteProc *)NULL);
! 32: Tcl_CreateCommand( interp, "getTermSummary", capaGetTermSummary,
! 33: (ClientData)NULL,(Tcl_CmdDeleteProc *)NULL);
! 34: Tcl_CreateCommand( interp, "enscriptParse", capaTclParse, (ClientData)NULL,
! 35: (Tcl_CmdDeleteProc *)NULL);
! 36: Tcl_CreateCommand( interp, "setupGAnswer", capaSetupGAnswer,
! 37: (ClientData)NULL,(Tcl_CmdDeleteProc *)NULL);
! 38: Tcl_CreateCommand( interp, "saveGAnswer", capaSaveGAnswer,
! 39: (ClientData)NULL,(Tcl_CmdDeleteProc *)NULL);
! 40: Tcl_CreateCommand( interp, "capaExcuse", capaExcuse, (ClientData)NULL,
! 41: (Tcl_CmdDeleteProc *)NULL);
! 42: Tcl_CreateCommand( interp, "createSummary", capaCreateSummary,
! 43: (ClientData)NULL,(Tcl_CmdDeleteProc *)NULL);
! 44: Tcl_CreateCommand( interp, "getQuestionTypes", capaGetQuestionTypes,
! 45: (ClientData)NULL,(Tcl_CmdDeleteProc *)NULL);
! 46: Tcl_CreateCommand( interp, "setHandGrade", capaSetHandGrade,
! 47: (ClientData)NULL,(Tcl_CmdDeleteProc *)NULL);
! 48: Tcl_CreateCommand( interp, "setScore", capaSetScore,
! 49: (ClientData)NULL,(Tcl_CmdDeleteProc *)NULL);
! 50:
! 51: sprintf(buf,"%s.%s",MAJORVER,GRADERMINORVER);
! 52: Tcl_SetVar(interp,"gVer",buf,TCL_GLOBAL_ONLY);
! 53: sprintf(buf,"Compiled on %s",COMPILE_DATE);
! 54: Tcl_SetVar(interp,"gCompileDate",buf,TCL_GLOBAL_ONLY);
! 55:
! 56: argv=Tcl_GetVar(interp,"argv", TCL_GLOBAL_ONLY);
! 57: if (argv!=NULL && strlen(argv) > 9 &&
! 58: argv[0]=='-' &&
! 59: argv[1]=='c' &&
! 60: argv[2]=='o' &&
! 61: argv[3]=='p' &&
! 62: argv[4]=='y' &&
! 63: argv[5]=='r' &&
! 64: argv[6]=='i' &&
! 65: argv[7]=='g' &&
! 66: argv[8]=='h' &&
! 67: argv[9]=='t' ) message();
! 68:
! 69: return TCL_OK;
! 70: }
! 71:
! 72: int Grader_InitStandAlone(Tcl_Interp *interp)
! 73: {
! 74: return Grader_Init(interp);
! 75: }
! 76:
! 77: int Grader_SafeInit(Tcl_Interp *interp)
! 78: {
! 79: return Grader_Init(interp);
! 80: }
! 81:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>