06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

asctime_r pREPC+ <strong>System</strong> <strong>Calls</strong><br />

asctime_r (Reentrant) Converts the broken-down time to a string.<br />

#include <br />

char *asctime_r (<br />

const struct tm *timeptr,/* pointer to broken-down time */<br />

char *buf, /* result buffer */<br />

int buflen /* result buffer length */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

asctime_r() is the reentrant version of the ANSI function asctime(), as defined<br />

by POSIX 1003.1c. It converts the broken-down time pointed to by timeptr to an<br />

equivalent string representation of the form:<br />

Sun Jan 1 12:30:13 1995\n\0<br />

and stores the string in the buffer pointed to by buf, which is assumed to have<br />

space for at most buflen characters. An error may be returned if the converted<br />

string contains more than buflen characters.<br />

timeptr Points to a structure of type tm that stores the broken-down time.<br />

The tm structure is defined in the mktime() description on page 3-<br />

111.<br />

buf Points to the buffer where asctime_r() stores the result.<br />

buflen Specifies the size of buf.<br />

Upon success, asctime_r() returns the value of buf. On failure, it returns NULL<br />

and sets errno.<br />

Refer to Appendix B.<br />

3-6 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!