Subversion Repositories wimsdev

Rev

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

Rev 3718 Rev 3840
Line 164... Line 164...
164
    FILE *f;
164
    FILE *f;
165
    long l;
165
    long l;
166
    char *fbuf, *p1, *p2, *p3;
166
    char *fbuf, *p1, *p2, *p3;
167
    l=filelength(fname); if(l<=0) return;
167
    l=filelength(fname); if(l<=0) return;
168
    f=fopen(fname,"r"); if(f==NULL) return;
168
    f=fopen(fname,"r"); if(f==NULL) return;
169
    fbuf=xmalloc(l+16); fread(fbuf,1,l,f); fclose(f); fbuf[l]=0;
169
    fbuf=xmalloc(l+16); (void)fread(fbuf,1,l,f); fclose(f); fbuf[l]=0;
170
    for(p1=fbuf; *p1; p1=p2) {
170
    for(p1=fbuf; *p1; p1=p2) {
171
        p2=strchr(p1,'\n'); if(p2==NULL) p2=p1+strlen(p1); else *p2++=0;
171
        p2=strchr(p1,'\n'); if(p2==NULL) p2=p1+strlen(p1); else *p2++=0;
172
        p3=strchr(p1,','); if(p3==NULL) continue;
172
        p3=strchr(p1,','); if(p3==NULL) continue;
173
        if(strncmp(p1,datestr,8)!=0) continue;
173
        if(strncmp(p1,datestr,8)!=0) continue;
174
        oneline(p1);
174
        oneline(p1);