ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
init.c File Reference

Go to the source code of this file.

Functions

void _ps2sdk_time_init ()
 
void _ps2sdk_time_deinit ()
 
void _ps2sdk_timezone_update ()
 
int chdir (const char *path)
 

Detailed Description

The global init/deinit code for our crt0.

Definition in file init.c.

Function Documentation

◆ _ps2sdk_time_deinit()

void _ps2sdk_time_deinit ( )

◆ _ps2sdk_time_init()

void _ps2sdk_time_init ( )

◆ _ps2sdk_timezone_update()

void _ps2sdk_timezone_update ( )

Definition at line 26 of file timezone.c.

27 {
28  // Set TZ and call tzset to ensure that timezone information won't get overwritten when tszet is called multiple times
29  setenv("TZ", "", 0);
30  tzset();
31 
32  __tzinfo_type *tz = __gettzinfo();
33 
34  // _timezone is in seconds, while the return value of configGetTimezone is in minutes
35  // Add one hour if configIsDaylightSavingEnabled is 1
36  _timezone = (configGetTimezone() + (configIsDaylightSavingEnabled() * 60)) * 60;
37  tz->__tzrule[0].offset = _timezone;
38  snprintf(_ps2sdk_tzname, sizeof(_ps2sdk_tzname), "Etc/GMT%+ld", _timezone / 3600);
39  _tzname[0] = _ps2sdk_tzname;
40  _tzname[1] = _ps2sdk_tzname;
41 
42  // Don't perform DST conversion
43  _daylight = 0;
44 }
int configGetTimezone(void)
int configIsDaylightSavingEnabled(void)
static char _ps2sdk_tzname[15]
Definition: timezone.c:23

◆ chdir()

int chdir ( const char *  path)

Definition at line 461 of file ps2sdkapi.c.

461  {
462  strcpy(__direct_pwd, path);
463  return 0;
464 }
char __direct_pwd[256]
Definition: ps2sdkapi.c:45

References __direct_pwd.