Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 73033b07 authored by rswindell's avatar rswindell

date_str.c functions (unixtodstr, etc) are now exported (for use in SBBSCTRL).

parent cd6c27bc
......@@ -40,7 +40,7 @@
/****************************************************************************/
/* Converts a date string in format MM/DD/YY into unix time format */
/****************************************************************************/
time_t dstrtounix(scfg_t* cfg, char *str)
time_t DLLCALL dstrtounix(scfg_t* cfg, char *str)
{
struct tm tm;
......@@ -64,7 +64,7 @@ time_t dstrtounix(scfg_t* cfg, char *str)
/****************************************************************************/
/* Converts unix time format (long - time_t) into a char str MM/DD/YY */
/****************************************************************************/
char * unixtodstr(scfg_t* cfg, time_t unix_time, char *str)
char* DLLCALL unixtodstr(scfg_t* cfg, time_t unix_time, char *str)
{
struct tm* tm;
......@@ -93,7 +93,7 @@ char * unixtodstr(scfg_t* cfg, time_t unix_time, char *str)
/****************************************************************************/
/* Takes the value 'sec' and makes a string the format HH:MM:SS */
/****************************************************************************/
char * sectostr(uint sec,char *str)
char* DLLCALL sectostr(uint sec,char *str)
{
uchar hour,min,sec2;
......
......@@ -713,6 +713,15 @@ extern "C" {
DLLEXPORT BOOL DLLCALL load_cfg(scfg_t* cfg, char* text[]);
/* date_str.c */
/* ASCII date (MM/DD/YY) to unix conversion */
DLLEXPORT time_t DLLCALL dstrtounix(scfg_t*, char *str);
/* Unix time to ASCII date */
DLLEXPORT char * DLLCALL unixtodstr(scfg_t*, time_t, char *str);
/* seconds to HH:MM:SS */
DLLEXPORT char * DLLCALL sectostr(uint sec, char *str);
#ifdef SBBS /* These aren't exported */
/* misc.c */
......@@ -739,12 +748,6 @@ extern "C" {
int lprintf(char *fmt, ...);
int lputs(char *);
/* date_str.c */
time_t dstrtounix(scfg_t*, char *str); /* ASCII date (MM/DD/YY) to unix conversion */
char * unixtodstr(scfg_t*, time_t, char *str); /* Unix time to ASCII date */
char * sectostr(uint sec, char *str); /* seconds to HH:MM:SS */
/* qwk.cpp */
void remove_re(char *str);
#ifdef __cplusplus
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment