printInfo

This commit is contained in:
elvis
2022-04-21 20:08:22 +02:00
parent fdb98cec53
commit cf93e53ade
3 changed files with 12 additions and 5 deletions

View File

@ -134,7 +134,7 @@ int main(int argc, char* argv[]) {
}
break;
case 'p': // print to stdout
printInfo(1);
printInfo(1, stdout);
++print;
break;
case 'w': // send files from folder (n is specified after)
@ -656,13 +656,13 @@ int cmd_r(char *filelist, char *dir, int print) {
void *buf = NULL;
size_t size = -1;
printInfo(0);
printInfo(0, stdout);
// read the content of the file
if (ok && readFile(token, &buf, &size) == -1) {
ok = 0;
}
if (print) {
printInfo(1);
printInfo(1, stdout);
}
if (ok && print) {
printf("Dimensione: %zu B\t", size);