posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
XSI_C_LANG_SUPPORT

XSI C Language Support option group (placeholder). More...

Functions

struct tm * getdate (const char *string)
 Convert a date-time string to broken-down time (XSI extension).
 
char * strptime (const char *ZRESTRICT s, const char *ZRESTRICT format, struct tm *ZRESTRICT tm)
 Parse a date/time string according to a format (XSI extension).
 
void swab (const void *ZRESTRICT src, void *ZRESTRICT dest, ssize_t nbytes)
 Swap bytes in a block of memory (XSI extension).
 

Variables

int daylight
 Non-zero if Daylight Saving Time is in effect.
 
long timezone
 Offset in seconds from UTC for the current timezone.
 

Detailed Description

XSI C Language Support option group (placeholder).

See also
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_subprofiles.html
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_subprofiles.html

Function Documentation

◆ getdate()

struct tm * getdate ( const char *  string)

Convert a date-time string to broken-down time (XSI extension).

Parameters
stringDate-time string; the format is determined by the DATEMSK environment variable.
Returns
Pointer to a broken-down time, or NULL on failure.

◆ strptime()

char * strptime ( const char *ZRESTRICT  s,
const char *ZRESTRICT  format,
struct tm *ZRESTRICT  tm 
)

Parse a date/time string according to a format (XSI extension).

Parameters
sInput string to parse.
formatFormat string describing the date/time fields to parse.
tmOutput: filled-in broken-down time structure.
Returns
Pointer to the first character in s not consumed by parsing, or NULL on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/strptime.html

◆ swab()

void swab ( const void *ZRESTRICT  src,
void *ZRESTRICT  dest,
ssize_t  nbytes 
)

Swap bytes in a block of memory (XSI extension).

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/swab.html

Variable Documentation

◆ daylight

int daylight
extern

Non-zero if Daylight Saving Time is in effect.

◆ timezone

long timezone
extern

Offset in seconds from UTC for the current timezone.