Deleted Added
sdiff udiff text old ( 19813 ) new ( 19816 )
full compact
1/* Still missing:
2 *
3 * mkctm
4 * -B regex Bogus
5 * -I regex Ignore
6 * -D int Damage
7 * -q decrease verbosity
8 * -v increase verbosity

--- 358 unchanged lines hidden (view full) ---

367 s_del_bytes += StatFile(buf1)->st_size;
368 }
369}
370
371void
372GetNext(int *i, int *n, struct dirent **nl, const char *dir, const char *name, u_long *ignored, u_long *bogus, u_long *wrong)
373{
374 char buf[BUFSIZ];
375
376 for (;;) {
377 for (;;) {
378 (*i)++;
379 if (*i >= *n)
380 return;
381 *buf = 0;
382 if (*dir != '/')
383 strcat(buf, "/");
384 strcat(buf, dir);
385 if (buf[strlen(buf)-1] != '/')
386 strcat(buf, "/");
387 strcat(buf, name);
388 if (buf[strlen(buf)-1] != '/')
389 strcat(buf, "/");
390 strcat(buf, nl[*i]->d_name);
391 if (flag_ignore &&
392 !regexec(®_ignore, buf, 0, 0, 0)) {
393 (*ignored)++;
394 fprintf(logf, "Ignore %s\n", buf);
395 if (verbose > 2) {
396 fprintf(stderr, "Ignore %s\n", buf);
397 }
398 } else if (flag_bogus &&
399 !regexec(®_bogus, buf, 0, 0, 0)) {
400 (*bogus)++;
401 fprintf(logf, "Bogus %s\n", buf);
402 fprintf(stderr, "Bogus %s\n", buf);
403 damage++;
404 } else {
405 break;
406 }
407 free(nl[*i]); nl[*i] = 0;
408 }
409 /* If the filesystem didn't tell us, find type */
410 if (nl[*i]->d_type == DT_UNKNOWN)
411 nl[*i]->d_type = IFTODT(StatFile(buf)->st_mode);
412 if (nl[*i]->d_type == DT_REG || nl[*i]->d_type == DT_DIR)

--- 180 unchanged lines hidden ---