Skip to content
Snippets Groups Projects
Commit 73033b07 authored by rswindell's avatar rswindell
Browse files

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

parent cd6c27bc
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
/****************************************************************************/ /****************************************************************************/
/* Converts a date string in format MM/DD/YY into unix time format */ /* 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; struct tm tm;
...@@ -64,7 +64,7 @@ time_t dstrtounix(scfg_t* cfg, char *str) ...@@ -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 */ /* 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; struct tm* tm;
...@@ -93,7 +93,7 @@ char * unixtodstr(scfg_t* cfg, time_t unix_time, char *str) ...@@ -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 */ /* 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; uchar hour,min,sec2;
......
...@@ -713,6 +713,15 @@ extern "C" { ...@@ -713,6 +713,15 @@ extern "C" {
DLLEXPORT BOOL DLLCALL load_cfg(scfg_t* cfg, char* text[]); 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 */ #ifdef SBBS /* These aren't exported */
/* misc.c */ /* misc.c */
...@@ -739,12 +748,6 @@ extern "C" { ...@@ -739,12 +748,6 @@ extern "C" {
int lprintf(char *fmt, ...); int lprintf(char *fmt, ...);
int lputs(char *); 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 */ /* qwk.cpp */
void remove_re(char *str); void remove_re(char *str);
#ifdef __cplusplus #ifdef __cplusplus
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment