X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=includes%2Ftime.h;h=b707a31c1f1dff2cee56f4c933ee83a240b83a54;hb=refs%2Ftags%2FOLD;hp=db2eb7c7237a9b91bb55135f73177c36570445c1;hpb=ac3f809c3c10347c110fac3db93af0954eda98bb;p=pdclib diff --git a/includes/time.h b/includes/time.h index db2eb7c..b707a31 100644 --- a/includes/time.h +++ b/includes/time.h @@ -1,31 +1,46 @@ -// ---------------------------------------------------------------------------- -// $Id$ -// ---------------------------------------------------------------------------- -// Public Domain C Library - http://pdclib.sourceforge.net -// This code is Public Domain. Use, modify, and redistribute at will. -// ---------------------------------------------------------------------------- -// Date and time -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------------- + * Public Domain C Library - http://pdclib.sourceforge.net + * This code is Public Domain. Use, modify, and redistribute at will. + * ---------------------------------------------------------------------------- + * Date and time + * --------------------------------------------------------------------------*/ -#ifndef __TIME_H -#define __TIME_H __TIME_H +#ifndef _TIME_H +#define _TIME_H _TIME_H -// ---------------------------------------------------------------------------- -// MACROS +#ifndef _NULL +#include "__intern.h" +#endif -#define CLOCKS_PER_SEC // TODO -#define NULL 0 +/* TODO: Documentation. */ -// ---------------------------------------------------------------------------- -// TYPES +/* ---------------------------------------------------------------------------- + * MACROS + * --------------------------------------------------------------------------*/ -typedef clock_t; -typedef size_t; -typedef time_t; -struct tm; +#define NULL _NULL -// ---------------------------------------------------------------------------- -// FUNCTIONS +#define CLOCKS_PER_SEC /* TODO - to __intern.h / __personality.h? */ + +/* ---------------------------------------------------------------------------- + * TYPES + * --------------------------------------------------------------------------*/ + +/* TODO: Get struct tm into __intern.h */ + +#ifndef _SIZE_T +#define _SIZE_T _SIZE_T +typedef __size_t size_t; +#endif /* _SIZE_T */ + +typedef clock_t; /* TODO - to __intern.h / __personality.h? */ +typedef time_t; /* TODO - to __intern.h / __personality.h? */ + +/* ---------------------------------------------------------------------------- + * FUNCTIONS + * --------------------------------------------------------------------------*/ char * asctime( const struct tm * tptr ); clock_t clock( void ); @@ -38,4 +53,4 @@ size_t strftime( char * restrict s, size_t n, const char * restrict format, const struct tm * restrict tptr ); time_t time( time_t * tod ); -#endif // __TIME_H +#endif /* _TIME_H */