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;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(int argc, char **argv) {
|
||||||
char l[64];
|
char l[64];
|
||||||
entry *root = calloc(1, sizeof(entry));
|
entry *root = calloc(1, sizeof(entry));
|
||||||
root->isdir++;
|
root->isdir++;
|
||||||
|
@ -84,7 +84,10 @@ int main(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
current = root;
|
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 {
|
do {
|
||||||
if (current->n_entries) {
|
if (current->n_entries) {
|
||||||
current->n_entries--;
|
current->n_entries--;
|
||||||
|
|
Loading…
Reference in New Issue