Subversion Repositories wimsdev

Rev

Rev 7609 | Rev 7621 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7609 Rev 7620
Line 76... Line 76...
76
      tab=shdata; if(sh>MAX_SHEET) return;
76
      tab=shdata; if(sh>MAX_SHEET) return;
77
    }
77
    }
78
    tab+=(sh-1)*MAX_EXO+(ex-1);
78
    tab+=(sh-1)*MAX_EXO+(ex-1);
79
    t=str2time(data[0]); if(t==-1) return;
79
    t=str2time(data[0]); if(t==-1) return;
80
    if(strstr(data[4],"new")!=NULL) {
80
    if(strstr(data[4],"new")!=NULL) {
81
      if(strcmp(typ,"score")==0){
81
      if(strcmp(typ,"score")==0 && (
82
        if ((i > 7 && strcmp(data[7],"noscore")==0)
82
        (strcmp(data[6],"noscore")==0 || (i > 7 && strcmp(data[7],"noscore")==0)
83
            || (i > 8 && strcmp(data[8],"noscore")==0)) { return; }
83
            || (i > 8 && strcmp(data[8],"noscore")==0))) { return; }
84
      }
-
 
85
      if(strcmp(typ,"noscore")==0){
84
      if(strcmp(typ,"noscore")==0 && (
86
        if (i < 7 || ( i>7 && strcmp(data[7],typ)!=0)
85
        (i < 7 || ( i>7 && strcmp(data[7],typ)!=0)
87
            || (i > 8 && strcmp(data[8], typ)!=0)) { return; }
86
            || (i > 8 && strcmp(data[8], typ)!=0))
-
 
87
        ) { return; }
88
      }
88
      }
89
      snprintf(tab->lastnew,12,"%s",data[1]);
89
      snprintf(tab->lastnew,12,"%s",data[1]);
90
      tab->newcnt++; tab->lasttime=t;
90
      tab->newcnt++; tab->lasttime=t;
91
      fcind++;
91
      fcind++;
92
      return;
92
      return;
93
    }
93
    }
94
    if(strcmp(data[4],"score")==0) {
94
    if(strcmp(data[4],"score")==0) {
95
      if(strcmp(tab->lastnew,data[1])!=0) return;
95
      if(strcmp(tab->lastnew,data[1])!=0) return;
96
      if(sccnt>=MAX_SCORE) return;
96
      if(sccnt>=MAX_SCORE) return;
97
      if(tab->lasttime==-1) return;
97
      if(tab->lasttime==-1) return;
-
 
98
      if(strcmp(typ,"score")==0 && (
-
 
99
         (i > 7 && strcmp(data[7],"noscore")==0)
-
 
100
            || (i > 8 && strcmp(data[8],"noscore")==0))
-
 
101
        ) { return; }
-
 
102
      if(strcmp(typ,"noscore")==0 && (
-
 
103
        ( i < 7 || ( i > 7 && strcmp(data[7],"noscore")!=0)
-
 
104
            || (i > 8 && strcmp(data[8], typ)!=0))
-
 
105
        ) { return; }
-
 
106
      }
98
      t-=tab->lasttime; tab->lasttime=-1; if(t<0) t+=24*3600;
107
      t-=tab->lasttime; tab->lasttime=-1; if(t<0) t+=24*3600;
99
      if(t<0) t=0; if(t>5*3600) t=5*3600;
108
      if(t<0) t=0; if(t>5*3600) t=5*3600;
100
      scores[sccnt].dure=t; scores[sccnt].next=-1;
109
      scores[sccnt].dure=t; scores[sccnt].next=-1;
101
      scores[sccnt].score=(double) atof(data[5])*100+0.5;
110
      scores[sccnt].score=(double) atof(data[5])*100+0.5;
102
      if(tab->scorecnt>0) scores[tab->lastscore].next=sccnt;
111
      if(tab->scorecnt>0) scores[tab->lastscore].next=sccnt;