--- capa/capa51/GUITools/scorertoset.c 2000/07/07 18:25:13 1.2 +++ capa/capa51/GUITools/scorertoset.c 2000/09/11 14:51:25 1.5 @@ -2,16 +2,16 @@ Copyright (C) 1992-2000 Michigan State University The CAPA system is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as + modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The CAPA system is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + General Public License for more details. - You should have received a copy of the GNU Library General Public + You should have received a copy of the GNU General Public License along with the CAPA system; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -30,7 +30,7 @@ #include #include #include -#include "Capa/capaCommon.h" +#include "pProj/capaCommon.h" #include "scorer.h" /**************************************************Set Database Entry */ @@ -68,7 +68,7 @@ int scorer_set_entry(ClientData notused, Tcl_SetResult(interp,errorline,TCL_VOLATILE); return TCL_ERROR; } - a_line=capa_malloc(strlen(tries)*5,1); + a_line=capa_malloc(strlen(tries)*5+MAX_STUDENT_NUMBER,1); sprintf(a_line,"%s %s,%s\n",student_number,answers,tries); new_len = strlen(a_line); sprintf(fmtbuf, "%%%dc",MAX_STUDENT_NUMBER); @@ -210,7 +210,7 @@ int scorer_get_entry(ClientData notused, entry->tries = tries_p; entry->e_probs = nq; } - sprintf(buf,"%d;%d;%s;%s",offset,entry->e_probs,entry->answers,entry->tries); + sprintf(buf,"%ld;%d;%s;%s",offset,entry->e_probs,entry->answers,entry->tries); Tcl_SetResult(interp,buf,TCL_VOLATILE); return TCL_OK; } @@ -220,7 +220,7 @@ void processFile(FILE *inputFile,Questio { T_entry grade; char studentNumber[MAX_STUDENT_NUMBER+1],name[MAX_NAME_CHAR+1]; - int offset,score,section,buf,i,numRight,points=0,leafs,processed=0,unit; + int score,section,buf,i,numRight,points=0,leafs,processed=0,unit; printf("Processing"); while(fscanf(inputFile,"%s",studentNumber)!=EOF)