new function puttime. Use it.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2735 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-08-07 20:25:42 +00:00
parent 03c4120244
commit 0c24fd12ee

View File

@@ -61,3 +61,13 @@ gettime(const char *prompt, const char *def)
printf("Unrecognised time.\n");
}
}
size_t
puttime (time_t t, char *s, size_t len)
{
if (t == 0) {
strncpy (s, "infinite", len);
return strlen(s);
} else
return unparse_time (t, s, len);
}