Subversion Repositories wimsdev

Rev

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

Rev 8343 Rev 10051
Line 270... Line 270...
270
    int i,j,k,laststart,lc[LINE_LIMIT];
270
    int i,j,k,laststart,lc[LINE_LIMIT];
271
 
271
 
272
    f->linecnt=f->linepointer=0;
272
    f->linecnt=f->linepointer=0;
273
    f->for_idx=f->nocache=0;
273
    f->for_idx=f->nocache=0;
274
    f->l=-1; f->lines=NULL;
274
    f->l=-1; f->lines=NULL;
-
 
275
    strncpy(f->filepath,fname,MAX_FNAME+1);
275
    f->textbuf=readfile(fname,NULL,WORKFILE_LIMIT);
276
    f->textbuf=readfile(fname,NULL,WORKFILE_LIMIT);
276
    if(f->textbuf==NULL) return -1;
277
    if(f->textbuf==NULL) return -1;
277
    p=f->textbuf; if(*p) {
278
    p=f->textbuf; if(*p) {
278
      for(i=0,p--; i<LINE_LIMIT-1 && p!=NULL;p=strchr(p,'\n')) {
279
      for(i=0,p--; i<LINE_LIMIT-1 && p!=NULL;p=strchr(p,'\n')) {
279
          if(i>0) *p=0;
280
          if(i>0) *p=0;