1
0
Fork 0

07: C: Add target size parameters

This commit is contained in:
Mia Herkt 2022-12-07 22:31:12 +01:00
parent 3e5e62fe7b
commit 327cbf6d6b
Signed by: mia
GPG Key ID: 72E154B8622EC191
1 changed files with 5 additions and 2 deletions

View File

@ -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--;