improved LinkTable_fill() status message
This commit is contained in:
parent
656edbf578
commit
cf49bf86b8
16
src/link.c
16
src/link.c
|
@ -223,28 +223,26 @@ static void LinkTable_fill(LinkTable *linktbl)
|
|||
Link_get_stat(this_link);
|
||||
}
|
||||
/* Block until the LinkTable is filled up */
|
||||
fprintf(stderr, "LinkTable_fill(): ");
|
||||
fprintf(stderr, "LinkTable_fill(): ... ");
|
||||
int n = curl_multi_perform_once();
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
char s[STATUS_LEN];
|
||||
while ( (i = curl_multi_perform_once()) ) {
|
||||
if (1) {
|
||||
if (j) {
|
||||
for (size_t k = 0; k < strnlen(s, STATUS_LEN); k++) {
|
||||
fprintf(stderr, "\b");
|
||||
}
|
||||
if (j) {
|
||||
for (size_t k = 0; k < strnlen(s, STATUS_LEN); k++) {
|
||||
fprintf(stderr, "\b");
|
||||
}
|
||||
snprintf(s, STATUS_LEN, "... %d / %d", i, n);
|
||||
fprintf(stderr, "%s", s);
|
||||
}
|
||||
snprintf(s, STATUS_LEN, "%d / %d", i, n);
|
||||
fprintf(stderr, "%s", s);
|
||||
j++;
|
||||
}
|
||||
|
||||
for (size_t k = 0; k < strnlen(s, MAX_FILENAME_LEN); k++) {
|
||||
fprintf(stderr, "\b");
|
||||
}
|
||||
fprintf(stderr, "... Done!\n");
|
||||
fprintf(stderr, "Done!\n");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue