<commit_before>/* 
 * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
 *
 * $Id: timezone.c,v 1.4 1999/09/12 14:26:32 sof Exp $
 *
 * Timezone Runtime Support
 */

#include "Rts.h"
#include "stgio.h"
#include "timezone.h"

StgInt get_tm_sec   ( StgAddr x ) { return ((struct tm*)x)->tm_sec;   }
StgInt get_tm_min   ( StgAddr x ) { return ((struct tm*)x)->tm_min;   }
StgInt get_tm_hour  ( StgAddr x ) { return ((struct tm*)x)->tm_hour;  }
StgInt get_tm_mday  ( StgAddr x ) { return ((struct tm*)x)->tm_mday;  }
StgInt get_tm_mon   ( StgAddr x ) { return ((struct tm*)x)->tm_mon;   }
StgInt get_tm_year  ( StgAddr x ) { return ((struct tm*)x)->tm_year;  }
StgInt get_tm_wday  ( StgAddr x ) { return ((struct tm*)x)->tm_wday;  }
StgInt get_tm_yday  ( StgAddr x ) { return ((struct tm*)x)->tm_yday;  }
StgInt get_tm_isdst ( StgAddr x ) { return ((struct tm*)x)->tm_isdst; }
StgAddr prim_ZONE    ( StgAddr x ) { return ZONE(x);   }
StgInt prim_GMTOFF  ( StgAddr x ) { return GMTOFF(x); }

StgInt prim_SETZONE ( StgAddr x, StgAddr y )
{
  SETZONE(x,y);
}

StgInt sizeof_word      ( void ) { return (sizeof(unsigned int)); }
StgInt sizeof_struct_tm	( void ) { return (sizeof(struct tm)); }
StgInt sizeof_time_t    ( void ) { return (sizeof(time_t)); }

char*
get_ZONE (StgAddr x)
{
#ifdef cygwin32_TARGET_OS
  /* 
   * tzname[] isn't properly initialised under cygwin B20.1 
   * unless tzset() is called, so better do it here.
   */
  tzset();

#endif
  return (ZONE(x));
}
<commit_msg>[project @ 1999-09-19 19:22:14 by sof] Have sizeof_time_t report the size in *words*<commit_after>/* 
 * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
 *
 * $Id: timezone.c,v 1.5 1999/09/19 19:22:14 sof Exp $
 *
 * Timezone Runtime Support
 */

#include "Rts.h"
#include "stgio.h"
#include "timezone.h"

StgInt get_tm_sec   ( StgAddr x ) { return ((struct tm*)x)->tm_sec;   }
StgInt get_tm_min   ( StgAddr x ) { return ((struct tm*)x)->tm_min;   }
StgInt get_tm_hour  ( StgAddr x ) { return ((struct tm*)x)->tm_hour;  }
StgInt get_tm_mday  ( StgAddr x ) { return ((struct tm*)x)->tm_mday;  }
StgInt get_tm_mon   ( StgAddr x ) { return ((struct tm*)x)->tm_mon;   }
StgInt get_tm_year  ( StgAddr x ) { return ((struct tm*)x)->tm_year;  }
StgInt get_tm_wday  ( StgAddr x ) { return ((struct tm*)x)->tm_wday;  }
StgInt get_tm_yday  ( StgAddr x ) { return ((struct tm*)x)->tm_yday;  }
StgInt get_tm_isdst ( StgAddr x ) { return ((struct tm*)x)->tm_isdst; }
StgAddr prim_ZONE    ( StgAddr x ) { return ZONE(x);   }
StgInt prim_GMTOFF  ( StgAddr x ) { return GMTOFF(x); }

StgInt prim_SETZONE ( StgAddr x, StgAddr y )
{
  SETZONE(x,y);
}

StgInt sizeof_word      ( void ) { return (sizeof(unsigned int)); }
StgInt sizeof_struct_tm	( void ) { return (sizeof(struct tm)); }
StgInt sizeof_time_t    ( void ) { return (sizeof(time_t) / sizeof(int)); }

char*
get_ZONE (StgAddr x)
{
#ifdef cygwin32_TARGET_OS
  /* 
   * tzname[] isn't properly initialised under cygwin B20.1 
   * unless tzset() is called, so better do it here.
   */
  tzset();

#endif
  return (ZONE(x));
}

{'fraction_non_alphanumeric': 0.15194000652103032, 'fraction_numerical': 0.023475709162047602, 'mean_word_length': 3.7492260061919507, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5741371', 'n_tokens_mistral': 1329, 'n_tokens_neox': 1279, 'n_words': 310}