1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00
cc65/libsrc/rp6502/gettimezone.c

17 lines
373 B
C
Raw Normal View History

2023-11-16 18:46:16 -08:00
#include <rp6502.h>
#include <time.h>
2023-11-17 11:08:51 -08:00
int clock_gettimezone (clockid_t clock_id, struct _timezone* tz)
2023-11-16 18:46:16 -08:00
{
int ax;
2023-11-17 11:08:51 -08:00
ria_set_ax (clock_id);
ax = ria_call_int_errno (RIA_OP_CLOCK_GETTIMEZONE);
if (ax >= 0) {
2023-11-16 18:46:16 -08:00
char i;
2023-11-26 15:12:20 -08:00
for (i = 0; i < sizeof (struct _timezone); i++) {
2023-11-17 11:08:51 -08:00
((char*)tz)[i] = ria_pop_char ();
2023-11-26 15:12:20 -08:00
}
2023-11-16 18:46:16 -08:00
}
return ax;
}