/usr/share/doc/libmrss0-dev/examples/time.c is in libmrss0-dev 0.19.2-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <errno.h>
#include "mrss.h"
int
main (int argc, char **argv)
{
time_t t;
mrss_error_t err;
char *buf;
struct tm *k;
if (argc != 2)
{
fprintf (stderr, "Usage: %s url\n\n", argv[0]);
return 1;
}
if ((err = mrss_get_last_modified (argv[1], &t)) != MRSS_OK)
{
fprintf (stderr, "ERROR: %s\n", mrss_strerror (err));
return 1;
}
if (!(k = localtime (&t)))
{
fprintf (stderr, "ERROR: %s\n", strerror (errno));
return 1;
}
if (!(buf = asctime (k)))
{
fprintf (stderr, "ERROR: %s\n", strerror (errno));
return 1;
}
fprintf (stdout, "Last Modified: %s\n", buf);
return 0;
}
|