| 252 |
tmp->name=NULL; |
tmp->name=NULL; |
| 253 |
tnsize=strlen(node->d_name)+1; |
tnsize=strlen(node->d_name)+1; |
| 254 |
tname=(char *)xmalloc(tnsize); |
tname=(char *)xmalloc(tnsize); |
| 255 |
//strcpy(tname,node->d_name); |
/*strcpy(tname,node->d_name);*/ |
| 256 |
sprintf(tname,"%s",node->d_name); |
sprintf(tname,"%s",node->d_name); |
| 257 |
tmp->name=tname; |
tmp->name=tname; |
| 258 |
tmp->index=tindex++; |
tmp->index=tindex++; |
| 276 |
tmp->link=S_ISLNK(stbuf.st_mode); |
tmp->link=S_ISLNK(stbuf.st_mode); |
| 277 |
tmp->size=stbuf.st_size; |
tmp->size=stbuf.st_size; |
| 278 |
tmp->mode=stbuf.st_mode; |
tmp->mode=stbuf.st_mode; |
| 279 |
//if (tmp->corrupt) tmp->mode=stbuf.st_mode&S_IFMT; |
/*if (tmp->corrupt) tmp->mode=stbuf.st_mode&S_IFMT;*/ |
| 280 |
} |
} |
| 281 |
|
|
| 282 |
if (tmp->dir) dc++; |
if (tmp->dir) dc++; |
| 322 |
if (strcmp(name,tmp->name)==0) return tmp; |
if (strcmp(name,tmp->name)==0) return tmp; |
| 323 |
tmp=tmp->next; |
tmp=tmp->next; |
| 324 |
} |
} |
| 325 |
// fprintf(stderr,"DIRFIND: nie znaleziono %s. skonczono na %s\n",name,tmp->name); |
/* fprintf(stderr,"DIRFIND: nie znaleziono %s. skonczono na %s\n",name,tmp->name);*/ |
| 326 |
} |
} |
| 327 |
return NULL; |
return NULL; |
| 328 |
} |
} |
| 358 |
(*fptr)(ds,DP_DIRIN); |
(*fptr)(ds,DP_DIRIN); |
| 359 |
tmp=chdir(ds->name); |
tmp=chdir(ds->name); |
| 360 |
if (tmp==0) { |
if (tmp==0) { |
| 361 |
// fprintf(stderr,"DIRPROCESS: Entered to %s\n",ds->name); |
/* fprintf(stderr,"DIRPROCESS: Entered to %s\n",ds->name);*/ |
| 362 |
subdir=dirSuck("."); |
subdir=dirSuck("."); |
| 363 |
|
|
| 364 |
/* we changed the directory */ |
/* we changed the directory */ |
| 391 |
chdir(".."); |
chdir(".."); |
| 392 |
dirFree(ds); |
dirFree(ds); |
| 393 |
ds=dstab[last]; |
ds=dstab[last]; |
| 394 |
// fprintf(stderr,"DIRPROCESS: Back from %s\n",ds->name); |
/* fprintf(stderr,"DIRPROCESS: Back from %s\n",ds->name); */ |
| 395 |
(*fptr)(ds,DP_DIROUT); |
(*fptr)(ds,DP_DIROUT); |
| 396 |
} |
} |
| 397 |
} while ((ds->next!=NULL) && (! dp_break)); |
} while ((ds->next!=NULL) && (! dp_break)); |