summaryrefslogtreecommitdiff
path: root/src/uptime.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-07-13 03:13:09 +0000
committerJim Meyering <jim@meyering.net>1997-07-13 03:13:09 +0000
commit6e1340462e8f15bb2d5dcdf8f3b0432d33369575 (patch)
tree9599dca119f7ae03835d5575c4506e02c2760e9c /src/uptime.c
parentaeea923e997ecee7dc6a3b5a0400674f689d0298 (diff)
downloadcoreutils-6e1340462e8f15bb2d5dcdf8f3b0432d33369575.tar.xz
Add FIXME.
indent
Diffstat (limited to 'src/uptime.c')
-rw-r--r--src/uptime.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/uptime.c b/src/uptime.c
index 506da1126..ec7c3886d 100644
--- a/src/uptime.c
+++ b/src/uptime.c
@@ -63,7 +63,7 @@ print_uptime (int n)
{
char buf[BUFSIZ];
int res;
- fgets(buf, BUFSIZ, fp);
+ fgets (buf, BUFSIZ, fp);
res = sscanf (buf, "%lf", &upsecs);
if (res == 1)
uptime = (time_t) upsecs;
@@ -92,7 +92,7 @@ print_uptime (int n)
boot_time = UT_TIME_MEMBER (this);
#endif /* BOOT_MSG */
++this;
- }
+ }
time_now = time (0);
#if defined HAVE_PROC_UPTIME
if (uptime == 0)
@@ -107,7 +107,9 @@ print_uptime (int n)
upmins = (uptime - (updays * 86400) - (uphours * 3600)) / 60;
tmn = localtime (&time_now);
printf (_(" %2d:%02d%s up "), ((tmn->tm_hour % 12) == 0
- ? 12 : tmn->tm_hour % 12),
+ ? 12 : tmn->tm_hour % 12),
+ /* FIXME: use strftime, not am, pm. Uli reports that
+ the german translation is meaningless. */
tmn->tm_min, (tmn->tm_hour < 12 ? _("am") : _("pm")));
if (updays > 0)
printf ("%d %s,", updays, (updays == 1 ? _("day") : _("days")));