From f5544ffb3a0703d6cbd0eacc42ab3be2e8ca45f3 Mon Sep 17 00:00:00 2001 From: piaip Date: Fri, 11 Apr 2008 18:16:46 +0000 Subject: - add Now(), m3 flavor time format API. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4134 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- common/bbs/Makefile | 2 +- common/bbs/log.c | 3 +++ common/bbs/time.c | 11 +++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 common/bbs/time.c diff --git a/common/bbs/Makefile b/common/bbs/Makefile index e3aae6e0..bb99c29f 100644 --- a/common/bbs/Makefile +++ b/common/bbs/Makefile @@ -4,7 +4,7 @@ SRCROOT= ../.. CFLAGS+= -I$(SRCROOT)/include -OBJS= log.o file.o money.o names.o path.o string.o +OBJS= log.o file.o money.o names.o path.o time.o string.o # record.o TARGET= libcmbbs.a diff --git a/common/bbs/log.c b/common/bbs/log.c index e69de29b..eef9d807 100644 --- a/common/bbs/log.c +++ b/common/bbs/log.c @@ -0,0 +1,3 @@ +#include "bbs.h" +#include "cmbbs.h" + diff --git a/common/bbs/time.c b/common/bbs/time.c new file mode 100644 index 00000000..6ea402b8 --- /dev/null +++ b/common/bbs/time.c @@ -0,0 +1,11 @@ +#include "bbs.h" +#include "cmsys.h" + +// Now() is a maple3 flavor API. +const char * +Now() +{ + syncnow(); + return Cdate(&now); +} + -- cgit v1.2.3