Introduction
Introduction Statistics Contact Development Disclaimer Help
tFix time format in help text - filmtools - various tools for photographic film…
git clone git://src.adamsgaard.dk/filmtools
Log
Files
Refs
---
commit 3e5d5e3b1968d4e4fabc24578adfa551d4331766
parent e6b42a4b0787ef30e4da02a496b2ef6813868d75
Author: Anders Damsgaard <[email protected]>
Date: Thu, 16 Jul 2020 21:57:14 +0200
Fix time format in help text
Diffstat:
M timeadj.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/timeadj.c b/timeadj.c
t@@ -5,15 +5,15 @@
char *argv0;
-void
+static void
usage()
{
printf("usage: %s factor time\n", argv0);
- puts("where time is in format HH:MM or MM:SS");
+ puts("where time is in format MM:SS");
}
int
-main(int argc, char** argv)
+main(int argc, char **argv)
{
double factor;
int min, sec, sec_equiv;
t@@ -32,9 +32,9 @@ main(int argc, char** argv)
if (sscanf(argv[1], "%lg", &factor) != 1)
errx(2, "could not parse FACTOR");
if (sscanf(argv[2], "%d:%d", &min, &sec) != 2)
- errx(2, "could not parse TIME in HH:MM or MM:SS format");
+ errx(2, "could not parse TIME in MM:SS format");
- sec_equiv = min*60 + sec;
+ sec_equiv = min * 60 + sec;
printf("%d:%02d\n",
(int)(sec_equiv*factor/60.0),
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.