summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
444c684)
since it's mostly there for people who like reading standard du
output. Also, add a configurable recursion depth option.
git-svn-id: svn://svn.tartarus.org/sgt/agedu@8248
cda61777-01e9-0310-a592-
d414129be87e
if (s1 == s2)
return; /* no space taken up => no display */
if (s1 == s2)
return; /* no space taken up => no display */
- /* Display in units of 1Kb */
- printf("%-11llu %s\n", (s2 - s1) / 1024, querydir);
-
if (depth > 0) {
/*
* Now scan for first-level subdirectories and report
if (depth > 0) {
/*
* Now scan for first-level subdirectories and report
xi1 = trie_before(mappedfile, pathbuf);
}
}
xi1 = trie_before(mappedfile, pathbuf);
}
}
+
+ /* Display in units of 1Kb */
+ printf("%-11llu %s\n", (s2 - s1) / 1024, querydir);
HELPARG("wildcard") HELPOPT("[--scan] prune files matching pattern") \
VAL(PRUNEPATH) LONG(prune_path) \
HELPARG("wildcard") HELPOPT("[--scan] prune pathnames matching pattern") \
HELPARG("wildcard") HELPOPT("[--scan] prune files matching pattern") \
VAL(PRUNEPATH) LONG(prune_path) \
HELPARG("wildcard") HELPOPT("[--scan] prune pathnames matching pattern") \
+ VAL(TQDEPTH) LONG(depth) LONG(max_depth) LONG(maximum_depth) \
+ HELPARG("levels") HELPOPT("[--text] recurse to this many levels") \
VAL(MINAGE) SHORT(a) LONG(age) LONG(min_age) LONG(minimum_age) \
HELPARG("age") HELPOPT("[--text] include only files older than this") \
VAL(AGERANGE) SHORT(r) LONG(age_range) LONG(range) LONG(ages) \
VAL(MINAGE) SHORT(a) LONG(age) LONG(min_age) LONG(minimum_age) \
HELPARG("age") HELPOPT("[--text] include only files older than this") \
VAL(AGERANGE) SHORT(r) LONG(age_range) LONG(range) LONG(ages) \
struct inclusion_exclusion *inex = NULL;
int ninex = 0, inexsize = 0;
int crossfs = 0;
struct inclusion_exclusion *inex = NULL;
int ninex = 0, inexsize = 0;
int crossfs = 0;
#ifdef DEBUG_MAD_OPTION_PARSING_MACROS
{
#ifdef DEBUG_MAD_OPTION_PARSING_MACROS
{
case OPT_DATAFILE:
filename = optval;
break;
case OPT_DATAFILE:
filename = optval;
break;
+ case OPT_TQDEPTH:
+ tqdepth = atoi(optval);
+ break;
case OPT_MINAGE:
textcutoff = parse_age(now, optval);
break;
case OPT_MINAGE:
textcutoff = parse_age(now, optval);
break;
if (pathlen > 0 && querydir[pathlen-1] == pathsep)
querydir[--pathlen] = '\0';
if (pathlen > 0 && querydir[pathlen-1] == pathsep)
querydir[--pathlen] = '\0';
- text_query(mappedfile, querydir, textcutoff, 1);
+ text_query(mappedfile, querydir, textcutoff, tqdepth);
} else if (mode == HTML) {
char *querydir = actions[action].arg;
size_t pathlen;
} else if (mode == HTML) {
char *querydir = actions[action].arg;
size_t pathlen;