implementing messaging.

ToDo: remove pprint.
mscp should use mpr_* functions, and main.c should use
just fprintf(stdout, "\r\033[K" fmt, ...) for printing progress bar.
This commit is contained in:
Ryo Nakamura
2023-03-03 22:14:54 +09:00
parent 1b9ae51974
commit 1e57e8fb2f
5 changed files with 105 additions and 34 deletions

View File

@@ -184,6 +184,7 @@ int main(int argc, char **argv)
memset(&s, 0, sizeof(s));
memset(&o, 0, sizeof(o));
o.severity = MSCP_SEVERITY_WARN;
while ((ch = getopt(argc, argv, "n:m:s:S:a:b:vqDrl:p:i:c:M:C:HdNh")) != -1) {
switch (ch) {
@@ -211,10 +212,10 @@ int main(int argc, char **argv)
o.buf_sz = atoi(optarg);
break;
case 'v':
o.verbose_level++;
o.severity++;
break;
case 'q':
o.verbose_level = -1;
o.severity = MSCP_SEVERITY_NONE;
break;
case 'D':
o.dryrun = true;