X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=includes%2Ftime.h;h=b707a31c1f1dff2cee56f4c933ee83a240b83a54;hp=bc5742c8a5ced53370e20d76829b7e8c785e8904;hb=1d9d92ba957a0b8307c9a65c35867fde68e6533b;hpb=70f1c6f7c9d515ef426da68973511f46de57005a diff --git a/includes/time.h b/includes/time.h index bc5742c..b707a31 100644 --- a/includes/time.h +++ b/includes/time.h @@ -1,33 +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 -// TODO: Documentation. +#ifndef _NULL +#include "__intern.h" +#endif -// ---------------------------------------------------------------------------- -// MACROS +/* TODO: Documentation. */ -#define CLOCKS_PER_SEC // TODO - personality? -#define NULL 0 +/* ---------------------------------------------------------------------------- + * MACROS + * --------------------------------------------------------------------------*/ -// ---------------------------------------------------------------------------- -// TYPES +#define NULL _NULL -typedef clock_t; // TODO - personality? -typedef size_t; // TODO - personality? -typedef time_t; // TODO - personality? -struct tm; // TODO - personality? +#define CLOCKS_PER_SEC /* TODO - to __intern.h / __personality.h? */ -// ---------------------------------------------------------------------------- -// FUNCTIONS +/* ---------------------------------------------------------------------------- + * 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 ); @@ -40,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 */