07: C: Add target size parameters
This commit is contained in:
parent
3e5e62fe7b
commit
327cbf6d6b
|
@ -51,7 +51,7 @@ entry *addent(entry *parent, int isdir, const char *name) {
|
|||
return e;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
int main(int argc, char **argv) {
|
||||
char l[64];
|
||||
entry *root = calloc(1, sizeof(entry));
|
||||
root->isdir++;
|
||||
|
@ -84,7 +84,10 @@ int main(void) {
|
|||
}
|
||||
|
||||
current = root;
|
||||
required = 30000000UL - (70000000UL - root->size);
|
||||
if (argc == 3)
|
||||
required = strtoul(argv[2], NULL, 10) - (strtoul(argv[1], NULL, 10) - root->size);
|
||||
else
|
||||
required = 30000000UL - (70000000UL - root->size);
|
||||
do {
|
||||
if (current->n_entries) {
|
||||
current->n_entries--;
|
||||
|
|
Loading…
Reference in New Issue