forked from enlightenment/efl
* src/lib/Makefile.am:
* src/lib/Evil.h: * src/lib/evil_time.c: * src/lib/evil_time.h: add locatime_r() for calendar in Elementary. SVN revision: 52263
This commit is contained in:
parent
2216c53641
commit
70622ee748
|
@ -1,3 +1,11 @@
|
||||||
|
2010-09-14 Vincent Torri <doursse at users dot sf dot net>
|
||||||
|
|
||||||
|
* src/lib/Makefile.am:
|
||||||
|
* src/lib/Evil.h:
|
||||||
|
* src/lib/evil_time.c:
|
||||||
|
* src/lib/evil_time.h:
|
||||||
|
add locatime_r() for calendar in Elementary.
|
||||||
|
|
||||||
2010-05-29 Vincent Torri <doursse at users dot sf dot net>
|
2010-05-29 Vincent Torri <doursse at users dot sf dot net>
|
||||||
|
|
||||||
* doc/Doxyfile:
|
* doc/Doxyfile:
|
||||||
|
|
|
@ -65,6 +65,7 @@ extern "C" {
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#include <time.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -117,6 +118,7 @@ typedef unsigned long gid_t;
|
||||||
#include "evil_stdlib.h"
|
#include "evil_stdlib.h"
|
||||||
#include "evil_stdio.h"
|
#include "evil_stdio.h"
|
||||||
#include "evil_string.h"
|
#include "evil_string.h"
|
||||||
|
#include "evil_time.h"
|
||||||
#include "evil_unistd.h"
|
#include "evil_unistd.h"
|
||||||
#include "evil_util.h"
|
#include "evil_util.h"
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ evil_main.h \
|
||||||
evil_stdlib.h \
|
evil_stdlib.h \
|
||||||
evil_stdio.h \
|
evil_stdio.h \
|
||||||
evil_string.h \
|
evil_string.h \
|
||||||
|
evil_time.h \
|
||||||
evil_unistd.h \
|
evil_unistd.h \
|
||||||
evil_util.h
|
evil_util.h
|
||||||
|
|
||||||
|
@ -38,6 +39,7 @@ evil_pwd.c \
|
||||||
evil_stdlib.c \
|
evil_stdlib.c \
|
||||||
evil_stdio.c \
|
evil_stdio.c \
|
||||||
evil_string.c \
|
evil_string.c \
|
||||||
|
evil_time.c \
|
||||||
evil_unistd.c \
|
evil_unistd.c \
|
||||||
evil_util.c \
|
evil_util.c \
|
||||||
evil_uuid.c
|
evil_uuid.c
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "config.h"
|
||||||
|
#endif /* HAVE_CONFIG_H */
|
||||||
|
|
||||||
|
#include "Evil.h"
|
||||||
|
#include "evil_private.h"
|
||||||
|
|
||||||
|
|
||||||
|
struct tm *
|
||||||
|
localtime_r(const time_t *timep, struct tm *result)
|
||||||
|
{
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
struct tm *tmp;
|
||||||
|
#endif /* ! _MSC_VER */
|
||||||
|
|
||||||
|
if (!timep || !result)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
if (localtime_s(result, timep) != 0)
|
||||||
|
return NULL;
|
||||||
|
#else
|
||||||
|
tmp = localtime(timep);
|
||||||
|
if (!tmp)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
memcpy(result, tmp, sizeof(struct tm));
|
||||||
|
|
||||||
|
#endif /* ! _MSC_VER */
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
#ifndef __EVIL_TIME_H__
|
||||||
|
#define __EVIL_TIME_H__
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file evil_time.h
|
||||||
|
* @brief The file that provides functions ported from Unix in time.h.
|
||||||
|
* @defgroup Evil_Time_Group Time.h functions
|
||||||
|
*
|
||||||
|
* This header provides functions ported from Unix in time.h.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Convert the calendar time to broken-time representation in a
|
||||||
|
* user supplied data.
|
||||||
|
*
|
||||||
|
* @param timep The calender time.
|
||||||
|
* @param result The broken-down time representation.
|
||||||
|
* @return The broken-down time representation.
|
||||||
|
*
|
||||||
|
* This function converts the calendar time @p timep to a broken-time
|
||||||
|
* representation. The result is stored in the buffer @p result
|
||||||
|
* supplied by the user. If @p timep or @p result are @c NULL, or if
|
||||||
|
* an error occurred, this function returns @c NULL and the values in
|
||||||
|
* @p result might be undefined. Otherwise it returns @p result.
|
||||||
|
*
|
||||||
|
* Conformity: Non applicable.
|
||||||
|
*
|
||||||
|
* Supported OS: Windows XP.
|
||||||
|
*/
|
||||||
|
EAPI struct tm *localtime_r(const time_t *timep, struct tm *result);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __EVIL_TIME_H__ */
|
Loading…
Reference in New Issue