version 1.1.1.1, 1999/09/28 21:25:41
|
version 1.3, 2000/02/22 18:10:27
|
Line 126 int capaGetExistingSections(ClientData c
|
Line 126 int capaGetExistingSections(ClientData c
|
return TCL_OK; |
return TCL_OK; |
} |
} |
|
|
|
/* finds how many set.db files there are */ |
|
int howManySetDBFile() |
|
{ |
|
char filename[BUFFER_SIZE], *pathName; |
|
int ii; |
|
|
|
pathName=getcwd(NULL,BUFFER_SIZE); |
|
ii=1; |
|
sprintf(filename,"%s/records/set%d.db",pathName,ii); |
|
while(!access(filename, F_OK)) { |
|
ii++; |
|
sprintf(filename,"%s/records/set%d.db",pathName,ii); |
|
} |
|
free(pathName); |
|
return (ii-1); |
|
} |
|
|
|
/* argv[1] is student number argv[2] is setnumber */ |
|
int capaGetSpecifiCapaId(ClientData clientdata, Tcl_Interp *interp, int argc, |
|
char *argv[]) |
|
{ |
|
char buf[MAX_BUFFER_SIZE]; |
|
if (argc==3) { |
|
sprintf(buf,"%d",capa_PIN(argv[1],atoi(argv[2]),0)); |
|
Tcl_AppendElement(interp,buf); |
|
} else { |
|
sprintf(buf,"Usage: %s StudentNumber SetNumber",argv[0]); |
|
Tcl_AppendElement(interp,buf); |
|
} |
|
return TCL_OK; |
|
} |
|
|
|
/* argv[1] is student number argv[2] is section number argv[3] is setnumber */ |
|
int capaIsSetOpen(ClientData clientdata, Tcl_Interp *interp, int argc, |
|
char *argv[]) |
|
{ |
|
char buf[MAX_BUFFER_SIZE]; |
|
if (argc==4) { |
|
sprintf(buf,"%d",capa_check_date(CHECK_OPEN_DATE,argv[1],atoi(argv[2]),atoi(argv[3]))); |
|
Tcl_AppendElement(interp,buf); |
|
} else { |
|
sprintf(buf,"Usage: %s StudentNumber SectionNumber SetNumber",argv[0]); |
|
Tcl_AppendElement(interp,buf); |
|
} |
|
return TCL_OK; |
|
} |
|
|
void message() |
void message() |
{ |
{ |
unsigned char *message= |
signed char *message= |
"***** ***** ************ ***** *****\n" |
"***** ***** ************ ***** *****\n" |
"****** ****** ****************** ***** *****\n" |
"****** ****** ****************** ***** *****\n" |
" ****** ****** **** **** **** **** \n" |
" ****** ****** **** **** **** **** \n" |