Printf related fixes.

This commit is contained in:
Rosen Penev
2017-06-27 22:29:51 +01:00
committed by Simon Kelley
parent 50a2841d34
commit cbd29e5da8
7 changed files with 16 additions and 14 deletions

View File

@@ -206,13 +206,13 @@ int main(int argc, char **argv)
{
unsigned int x;
if ((x = t/86400))
printf("%dd", x);
printf("%ud", x);
if ((x = (t/3600)%24))
printf("%dh", x);
printf("%uh", x);
if ((x = (t/60)%60))
printf("%dm", x);
printf("%um", x);
if ((x = t%60))
printf("%ds", x);
printf("%us", x);
}
return 0;
}