Rev 18421 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 18421 | Rev 18679 | ||
---|---|---|---|
Line 196... | Line 196... | ||
196 | char rbuf[MAX_FILELEN+1]; |
196 | char rbuf[MAX_FILELEN+1]; |
197 | char *wlist[8]; |
197 | char *wlist[8]; |
198 | char *p1, *p2; |
198 | char *p1, *p2; |
199 | int i, k, ecnt, num; |
199 | int i, k, ecnt, num; |
200 | double ss, sc[MAX_EXAMS], sc2[MAX_EXAMS], scb[MAX_EXAMS], scb2[MAX_EXAMS]; |
200 | double ss, sc[MAX_EXAMS], sc2[MAX_EXAMS], scb[MAX_EXAMS], scb2[MAX_EXAMS]; |
201 | int ind[MAX_EXAMS]; |
- | |
202 | unsigned int tr[MAX_EXAMS], all[MAX_EXAMS], ver[MAX_EXAMS], start[MAX_EXAMS], dure[MAX_EXAMS]; |
201 | unsigned int tr[MAX_EXAMS], all[MAX_EXAMS], ver[MAX_EXAMS], start[MAX_EXAMS], dure[MAX_EXAMS]; |
203 | char *ip[MAX_EXAMS], *ses[MAX_EXAMS]; |
202 | char *ip[MAX_EXAMS], *ses[MAX_EXAMS], *cut[MAX_EXAMS]; |
204 | unsigned int start1, endtime[MAX_EXAMS]; |
203 | unsigned int start1, endtime[MAX_EXAMS]; |
205 | signed int dure1; |
204 | signed int dure1; |
206 | 205 | ||
207 | ecnt=cd->examcnt; |
206 | ecnt=cd->examcnt; |
208 | if(ecnt<=0) return; |
207 | if(ecnt<=0) return; |
209 | if(ecnt>MAX_EXAMS) ecnt=MAX_EXAMS; |
208 | if(ecnt>MAX_EXAMS) ecnt=MAX_EXAMS; |
210 | memset(all,0,sizeof(all)), memset(ver,0,sizeof(ver)); |
209 | memset(all,0,sizeof(all)), memset(ver,0,sizeof(ver)); |
211 | for(i=0;i<ecnt;i++) { |
210 | for(i=0;i<ecnt;i++) { |
212 |
|
211 | k=cd->exam.indstart+i; |
213 | all[i]=cd->exos[ |
212 | all[i]=cd->exos[k].require; |
- | 213 | cut[i]=cd->ctbuf+cd->ctptr[i]; |
|
214 | } |
214 | } |
215 | memset(sc,0,sizeof(sc)); memset(sc2,0,sizeof(sc2)); |
215 | memset(sc,0,sizeof(sc)); memset(sc2,0,sizeof(sc2)); |
216 | memset(scb,0,sizeof(scb)); memset(scb2,0,sizeof(scb2)); |
216 | memset(scb,0,sizeof(scb)); memset(scb2,0,sizeof(scb2)); |
217 | memset(tr,0,sizeof(tr)); memset(cuttimes,0,sizeof(cuttimes)); |
217 | memset(tr,0,sizeof(tr)); memset(cuttimes,0,sizeof(cuttimes)); |
218 | memset(dure,0,sizeof(dure)); memset(start,0,sizeof(start)); |
218 | memset(dure,0,sizeof(dure)); memset(start,0,sizeof(start)); |
Line 236... | Line 236... | ||
236 | if(scb2[i]<scb[i]) scb2[i]=scb[i]; |
236 | if(scb2[i]<scb[i]) scb2[i]=scb[i]; |
237 | ver[i]=1; tr[i]++; start[i]=start1; dure[i]=dure1; sc[i]=0; scb[i]=0; |
237 | ver[i]=1; tr[i]++; start[i]=start1; dure[i]=dure1; sc[i]=0; scb[i]=0; |
238 | ip[i]=wlist[4]; ses[i]=wlist[5]; |
238 | ip[i]=wlist[4]; ses[i]=wlist[5]; |
239 | if(tr[i]==1 && wlist[6]!=NULL) { |
239 | if(tr[i]==1 && wlist[6]!=NULL) { |
240 | char *pp1, *pp2, lbuf[CTBUFLEN]; |
240 | char *pp1, *pp2, lbuf[CTBUFLEN]; |
241 | if(cd->ctptr[ind[i]]>=0) |
- | |
242 |
|
241 | mystrncpy(lbuf,cut[i],sizeof(lbuf)); |
243 | else lbuf[0]=0; |
- | |
244 | if(lbuf[0]) { |
242 | if(lbuf[0]) { |
245 | for(pp1=find_word_start(lbuf); *pp1; pp1=find_word_start(pp2)) { |
243 | for(pp1=find_word_start(lbuf); *pp1; pp1=find_word_start(pp2)) { |
246 | pp2=find_word_end(pp1); if(pp2-pp1!=14) continue; |
244 | pp2=find_word_end(pp1); if(pp2-pp1!=14) continue; |
247 | if(*pp2) *pp2++=0; |
245 | if(*pp2) *pp2++=0; |
248 | pp1[8]='.'; pp1[11]=':'; |
246 | pp1[8]='.'; pp1[11]=':'; |