ROMAN_CTIME
ROMAN_CTIME
NAME
roman_asctime,
roman_asctime_r, roman_ctime, roman_ctime_r −
transform date and time to ASCII using Roman Numerals
LIBRARY
Roman Numeral
Conversion API (libroman, -lroman)
SYNOPSIS
#include
<time.h>
#include <roman.h>
const char
*
roman_asctime(const struct tm * tm);
char *
roman_asctime_r(const struct tm * tm, char *
str, size_t len);
const char
*
roman_ctime(const time_t * clock);
char *
roman_ctime_r(const time_t * clock, char *
str, size_t len);
DESCRIPTION
The functions
roman_asctime and roman_ctime accept an
argument representing a specific time and return a string
representing the formatted data and time.
The functions
roman_asctime_r and roman_ctime_r provide the same
functionality as roman_asctime and roman_ctime
respectively, except that the caller must provide the out
buffer str to store the result. str must be at
least len characters long.
RETURN VALUES
If successfull,
these functions each return a string containing a formatted
date. If an error ocurrs, NULL is returned and
errno is set.
ERRORS
|
EFAULT |
|
bad address in
str. |
|
ENOBUFS
Insufficient storage space
available in str.
EXAMPLES
#include
<time.h>
#include <stdio.h>
#include <roman.h>
int
main(void);
int
main(void)
{
char str[512];
time_t t;
size_t len;
struct tm * tm;
const char * ptr;
t =
time(NULL);
ptr =
roman_ctime(&t);
printf("%s\n", ptr);
ptr =
roman_ctime_r(&t, str, 512);
printf("%s\n", ptr);
return(0);
}
REPORTING BUGS
Report bugs to
<syzdek@users.sourceforge.net>.
COPYRIGHT
Copyright (C)
2007 David M. Syzdek.
This is free software; see the source for copying
conditions. There is NO warranty; not even for
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SEE ALSO
roman(7),
romandate(1), romannum(1),
int2roman(3), roman2int(3),
roman_strftime(3)
|