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

...
 
Commits (1)
......@@ -73,7 +73,7 @@ char *faddrtoa(fidoaddr_t addr)
return(str);
}
char* DLLCALL strip_ctrl(char *str)
char* strip_ctrl(char *str)
{
char tmp[1024];
int i,j;
......
......@@ -100,7 +100,7 @@ uint sbbs_t::finduser(const char* instr, bool silent_failure)
/****************************************************************************/
/* Return date/time that the specified event should run next */
/****************************************************************************/
extern "C" time_t DLLCALL getnexteventtime(event_t* event)
extern "C" time_t getnexteventtime(event_t* event)
{
struct tm tm;
time_t t = time(NULL);
......@@ -143,7 +143,7 @@ extern "C" time_t DLLCALL getnexteventtime(event_t* event)
/* Return time of next forced timed event */
/* 'event' may be NULL */
/****************************************************************************/
extern "C" time_t DLLCALL getnextevent(scfg_t* cfg, event_t* event)
extern "C" time_t getnextevent(scfg_t* cfg, event_t* event)
{
int i;
time_t event_time=0;
......
......@@ -29,7 +29,7 @@ const char *mon[]={"Jan","Feb","Mar","Apr","May","Jun"
/****************************************************************************/
/* Converts a date string in format MM/DD/YY into unix time format */
/****************************************************************************/
time32_t DLLCALL dstrtounix(scfg_t* cfg, const char *instr)
time32_t dstrtounix(scfg_t* cfg, const char *instr)
{
const char* p;
const char* day;
......@@ -80,7 +80,7 @@ time32_t DLLCALL dstrtounix(scfg_t* cfg, const char *instr)
/****************************************************************************/
/* Converts unix time format (long - time_t) into a char str MM/DD/YY */
/****************************************************************************/
char* DLLCALL unixtodstr(scfg_t* cfg, time32_t t, char *str)
char* unixtodstr(scfg_t* cfg, time32_t t, char *str)
{
struct tm tm;
time_t unix_time=t;
......@@ -111,7 +111,7 @@ char* DLLCALL unixtodstr(scfg_t* cfg, time32_t t, char *str)
/****************************************************************************/
/* Takes the value 'sec' and makes a string the format HH:MM:SS */
/****************************************************************************/
char* DLLCALL sectostr(uint sec,char *str)
char* sectostr(uint sec,char *str)
{
uchar hour,min,sec2;
......@@ -123,7 +123,7 @@ char* DLLCALL sectostr(uint sec,char *str)
}
/* Returns a shortened version of "HH:MM:SS" formatted seconds value */
char* DLLCALL seconds_to_str(uint seconds, char* str)
char* seconds_to_str(uint seconds, char* str)
{
char* p = sectostr(seconds, str);
while(*p=='0' || *p==':')
......@@ -133,7 +133,7 @@ char* DLLCALL seconds_to_str(uint seconds, char* str)
/****************************************************************************/
/****************************************************************************/
char* DLLCALL hhmmtostr(scfg_t* cfg, struct tm* tm, char* str)
char* hhmmtostr(scfg_t* cfg, struct tm* tm, char* str)
{
if(cfg->sys_misc&SM_MILITARY)
sprintf(str,"%02d:%02d "
......@@ -149,7 +149,7 @@ char* DLLCALL hhmmtostr(scfg_t* cfg, struct tm* tm, char* str)
/* Generates a 24 character ASCII string that represents the time_t pointer */
/* Used as a replacement for ctime() */
/****************************************************************************/
char* DLLCALL timestr(scfg_t* cfg, time32_t t, char* str)
char* timestr(scfg_t* cfg, time32_t t, char* str)
{
char* mer;
uchar hour;
......
......@@ -559,7 +559,7 @@ int sockreadline(SOCKET socket, CRYPT_SESSION sess, char* buf, int len, time_t*
return(rd);
}
void DLLCALL ftp_terminate(void)
void ftp_terminate(void)
{
lprintf(LOG_INFO,"FTP Server terminate");
terminate_server=TRUE;
......@@ -4886,7 +4886,7 @@ static void cleanup(int code, int line)
startup->terminated(startup->cbdata,code);
}
const char* DLLCALL ftp_ver(void)
const char* ftp_ver(void)
{
static char ver[256];
char compiler[32];
......@@ -4908,7 +4908,7 @@ const char* DLLCALL ftp_ver(void)
return(ver);
}
void DLLCALL ftp_server(void* arg)
void ftp_server(void* arg)
{
char* p;
char path[MAX_PATH+1];
......
......@@ -26,7 +26,7 @@
/* If sent is non-zero, it returns the number of mail sent by usernumber */
/* If usernumber is 0, it returns all mail on the system */
/****************************************************************************/
int DLLCALL getmail(scfg_t* cfg, int usernumber, BOOL sent, int attr)
int getmail(scfg_t* cfg, int usernumber, BOOL sent, int attr)
{
char path[MAX_PATH+1];
int i=0;
......@@ -72,7 +72,7 @@ int DLLCALL getmail(scfg_t* cfg, int usernumber, BOOL sent, int attr)
/***************************/
/* Delete file attachments */
/***************************/
BOOL DLLCALL delfattach(scfg_t* cfg, smbmsg_t* msg)
BOOL delfattach(scfg_t* cfg, smbmsg_t* msg)
{
char dir[MAX_PATH+1];
char path[MAX_PATH+1];
......@@ -110,7 +110,7 @@ BOOL DLLCALL delfattach(scfg_t* cfg, smbmsg_t* msg)
/* of pointers to mail_t (message numbers and attributes) */
/* smb_open(&smb) must be called prior */
/****************************************************************************/
mail_t* DLLCALL loadmail(smb_t* smb, uint32_t* msgs, uint usernumber
mail_t* loadmail(smb_t* smb, uint32_t* msgs, uint usernumber
,int which, long mode)
{
ulong l=0;
......@@ -172,7 +172,7 @@ mail_t* DLLCALL loadmail(smb_t* smb, uint32_t* msgs, uint usernumber
return(mail);
}
void DLLCALL freemail(mail_t* mail)
void freemail(mail_t* mail)
{
if(mail!=NULL)
free(mail);
......
......@@ -27,7 +27,7 @@
/* Reads data from dsts.dab into stats structure */
/* If node is zero, reads from ctrl\dsts.dab, otherwise from each node */
/****************************************************************************/
BOOL DLLCALL getstats(scfg_t* cfg, char node, stats_t* stats)
BOOL getstats(scfg_t* cfg, char node, stats_t* stats)
{
char str[MAX_PATH+1];
int file;
......@@ -46,7 +46,7 @@ BOOL DLLCALL getstats(scfg_t* cfg, char node, stats_t* stats)
/****************************************************************************/
/* Returns the number of files in the directory 'dirnum' */
/****************************************************************************/
long DLLCALL getfiles(scfg_t* cfg, uint dirnum)
long getfiles(scfg_t* cfg, uint dirnum)
{
char path[MAX_PATH + 1];
off_t l;
......@@ -63,7 +63,7 @@ long DLLCALL getfiles(scfg_t* cfg, uint dirnum)
/****************************************************************************/
/* Returns total number of posts in a sub-board */
/****************************************************************************/
ulong DLLCALL getposts(scfg_t* cfg, uint subnum)
ulong getposts(scfg_t* cfg, uint subnum)
{
if(cfg->sub[subnum]->misc & SUB_NOVOTING) {
char path[MAX_PATH + 1];
......
......@@ -176,7 +176,7 @@ static JSClass js_client_class = {
,JS_FinalizeStub /* finalize */
};
JSObject* DLLCALL js_CreateClientObject(JSContext* cx, JSObject* parent
JSObject* js_CreateClientObject(JSContext* cx, JSObject* parent
,const char* name, client_t* client, SOCKET sock, CRYPT_CONTEXT session)
{
JSObject* obj;
......
......@@ -826,7 +826,7 @@ js_com_constructor(JSContext *cx, uintN argc, jsval *arglist)
return(JS_TRUE);
}
JSObject* DLLCALL js_CreateCOMClass(JSContext* cx, JSObject* parent)
JSObject* js_CreateCOMClass(JSContext* cx, JSObject* parent)
{
JSObject* comobj;
......@@ -841,7 +841,7 @@ JSObject* DLLCALL js_CreateCOMClass(JSContext* cx, JSObject* parent)
return(comobj);
}
JSObject* DLLCALL js_CreateCOMObject(JSContext* cx, JSObject* parent, const char *name, COM_HANDLE com)
JSObject* js_CreateCOMObject(JSContext* cx, JSObject* parent, const char *name, COM_HANDLE com)
{
JSObject* obj;
private_t* p;
......
......@@ -3046,7 +3046,7 @@ JSClass js_cryptcert_class = {
,js_finalize_cryptcert /* finalize */
};
JSObject* DLLCALL js_CreateCryptCertObject(JSContext* cx, CRYPT_CERTIFICATE cert)
JSObject* js_CreateCryptCertObject(JSContext* cx, CRYPT_CERTIFICATE cert)
{
JSObject *obj;
struct js_cryptcert_private_data *p;
......@@ -3180,7 +3180,7 @@ static char* cryptcert_format_prop_desc[] = {
};
#endif
JSObject* DLLCALL js_CreateCryptCertClass(JSContext* cx, JSObject* parent)
JSObject* js_CreateCryptCertClass(JSContext* cx, JSObject* parent)
{
JSObject* cksobj;
JSObject* constructor;
......
......@@ -934,7 +934,7 @@ JSClass js_cryptcon_class = {
,js_finalize_cryptcon /* finalize */
};
JSObject* DLLCALL js_CreateCryptconObject(JSContext* cx, CRYPT_CONTEXT ctx)
JSObject* js_CreateCryptconObject(JSContext* cx, CRYPT_CONTEXT ctx)
{
JSObject *obj;
struct js_cryptcon_private_data *p;
......@@ -1055,7 +1055,7 @@ static char* cryptcon_mode_prop_desc[] = {
};
#endif
JSObject* DLLCALL js_CreateCryptContextClass(JSContext* cx, JSObject* parent)
JSObject* js_CreateCryptContextClass(JSContext* cx, JSObject* parent)
{
JSObject* ccobj;
JSObject* constructor;
......
......@@ -518,7 +518,7 @@ static char* cryptkeyset_keyopt_prop_desc[] = {
};
#endif
JSObject* DLLCALL js_CreateCryptKeysetClass(JSContext* cx, JSObject* parent)
JSObject* js_CreateCryptKeysetClass(JSContext* cx, JSObject* parent)
{
JSObject* cksobj;
JSObject* constructor;
......
......@@ -3106,7 +3106,7 @@ js_file_constructor(JSContext *cx, uintN argc, jsval *arglist)
return(JS_TRUE);
}
JSObject* DLLCALL js_CreateFileClass(JSContext* cx, JSObject* parent)
JSObject* js_CreateFileClass(JSContext* cx, JSObject* parent)
{
JSObject* obj;
......@@ -3121,7 +3121,7 @@ JSObject* DLLCALL js_CreateFileClass(JSContext* cx, JSObject* parent)
return(obj);
}
JSObject* DLLCALL js_CreateFileObject(JSContext* cx, JSObject* parent, char *name, int fd, const char* mode)
JSObject* js_CreateFileObject(JSContext* cx, JSObject* parent, char *name, int fd, const char* mode)
{
JSObject* obj;
private_t* p;
......
......@@ -182,7 +182,7 @@ static JSClass js_dir_class = {
,js_file_area_finalize /* finalize */
};
JSBool DLLCALL js_file_area_resolve(JSContext* cx, JSObject* areaobj, jsid id)
JSBool js_file_area_resolve(JSContext* cx, JSObject* areaobj, jsid id)
{
char str[128];
char vpath[MAX_PATH+1];
......@@ -621,7 +621,7 @@ static JSClass js_file_area_class = {
,js_file_area_finalize /* finalize */
};
DLLEXPORT JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_t* cfg
DLLEXPORT JSObject* js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_t* cfg
,user_t* user, client_t* client, char* html_index_file) {
JSObject* obj;
struct js_file_area_priv *p;
......
......@@ -1565,7 +1565,7 @@ static char* filebase_sort_prop_desc[] = {
};
#endif
JSObject* DLLCALL js_CreateFileBaseClass(JSContext* cx, JSObject* parent, scfg_t* cfg)
JSObject* js_CreateFileBaseClass(JSContext* cx, JSObject* parent, scfg_t* cfg)
{
JSObject* obj;
JSObject* constructor;
......
......@@ -48,7 +48,7 @@ enum {
,GLOB_PROP_SOCKET_ERRNO_STR
};
BOOL DLLCALL js_argc(JSContext *cx, uintN argc, uintN min)
BOOL js_argc(JSContext *cx, uintN argc, uintN min)
{
if(argc < min) {
JS_ReportError(cx, "Insufficient Arguments");
......@@ -5277,7 +5277,7 @@ JSClass js_global_class = {
,js_global_finalize /* finalize */
};
BOOL DLLCALL js_CreateGlobalObject(JSContext* cx, scfg_t* cfg, jsSyncMethodSpec* methods, js_startup_t* startup, JSObject**glob)
BOOL js_CreateGlobalObject(JSContext* cx, scfg_t* cfg, jsSyncMethodSpec* methods, js_startup_t* startup, JSObject**glob)
{
global_private_t* p;
JSRuntime* rt;
......
......@@ -240,7 +240,7 @@ static char* prop_desc[] = {
};
#endif
JSBool DLLCALL
JSBool
js_CommonOperationCallback(JSContext *cx, js_callback_t* cb)
{
js_callback_t *top_cb;
......@@ -1480,7 +1480,7 @@ static JSClass js_internal_class = {
,JS_FinalizeStub /* finalize */
};
void DLLCALL js_EvalOnExit(JSContext *cx, JSObject *obj, js_callback_t* cb)
void js_EvalOnExit(JSContext *cx, JSObject *obj, js_callback_t* cb)
{
char* p;
jsval rval;
......@@ -1545,7 +1545,7 @@ void DLLCALL js_EvalOnExit(JSContext *cx, JSObject *obj, js_callback_t* cb)
cb->auto_terminate = TRUE;
}
JSObject* DLLCALL js_CreateInternalJsObject(JSContext* cx, JSObject* parent, js_callback_t* cb, js_startup_t* startup)
JSObject* js_CreateInternalJsObject(JSContext* cx, JSObject* parent, js_callback_t* cb, js_startup_t* startup)
{
JSObject* obj;
......@@ -1600,7 +1600,7 @@ void msvc_invalid_parameter_handler(const wchar_t* expression,
}
#endif
void DLLCALL js_PrepareToExecute(JSContext *cx, JSObject *obj, const char *filename, const char* startup_dir, JSObject *scope)
void js_PrepareToExecute(JSContext *cx, JSObject *obj, const char *filename, const char* startup_dir, JSObject *scope)
{
JSString* str;
jsval val;
......
......@@ -93,7 +93,7 @@ struct js_msg_area_priv {
uint subnum;
};
BOOL DLLCALL js_CreateMsgAreaProperties(JSContext* cx, scfg_t* cfg, JSObject* subobj, uint subnum)
BOOL js_CreateMsgAreaProperties(JSContext* cx, scfg_t* cfg, JSObject* subobj, uint subnum)
{
char str[128];
JSString* js_str;
......@@ -379,7 +379,7 @@ static JSClass js_sub_class = {
,js_msg_area_finalize /* finalize */
};
JSBool DLLCALL js_msg_area_resolve(JSContext* cx, JSObject* areaobj, jsid id)
JSBool js_msg_area_resolve(JSContext* cx, JSObject* areaobj, jsid id)
{
JSObject* allgrps;
JSObject* allsubs;
......@@ -638,7 +638,7 @@ static JSClass js_msg_area_class = {
,js_msg_area_finalize /* finalize */
};
JSObject* DLLCALL js_CreateMsgAreaObject(JSContext* cx, JSObject* parent, scfg_t* cfg
JSObject* js_CreateMsgAreaObject(JSContext* cx, JSObject* parent, scfg_t* cfg
,user_t* user, client_t* client, subscan_t* subscan)
{
JSObject* obj;
......
......@@ -1000,7 +1000,7 @@ err:
}
/* obj *may* have been previously returned from get_msg_header() */
BOOL DLLCALL js_ParseMsgHeaderObject(JSContext* cx, JSObject* obj, smbmsg_t* msg)
BOOL js_ParseMsgHeaderObject(JSContext* cx, JSObject* obj, smbmsg_t* msg)
{
privatemsg_t* p;
......@@ -1015,7 +1015,7 @@ BOOL DLLCALL js_ParseMsgHeaderObject(JSContext* cx, JSObject* obj, smbmsg_t* msg
}
/* obj must've been previously returned from get_msg_header() */
BOOL DLLCALL js_GetMsgHeaderObjectPrivates(JSContext* cx, JSObject* obj, smb_t** smb, smbmsg_t** msg, post_t** post)
BOOL js_GetMsgHeaderObjectPrivates(JSContext* cx, JSObject* obj, smb_t** smb, smbmsg_t** msg, post_t** post)
{
privatemsg_t* p;
......@@ -3434,7 +3434,7 @@ static struct JSPropertySpec js_msgbase_static_properties[] = {
{0}
};
JSObject* DLLCALL js_CreateMsgBaseClass(JSContext* cx, JSObject* parent, scfg_t* cfg)
JSObject* js_CreateMsgBaseClass(JSContext* cx, JSObject* parent, scfg_t* cfg)
{
JSObject* obj;
JSObject* constructor;
......
......@@ -483,7 +483,7 @@ js_queue_constructor(JSContext *cx, uintN argc, jsval *arglist)
return(JS_TRUE);
}
JSObject* DLLCALL js_CreateQueueClass(JSContext* cx, JSObject* parent)
JSObject* js_CreateQueueClass(JSContext* cx, JSObject* parent)
{
JSObject* obj;
......@@ -499,7 +499,7 @@ JSObject* DLLCALL js_CreateQueueClass(JSContext* cx, JSObject* parent)
return(obj);
}
JSObject* DLLCALL js_CreateQueueObject(JSContext* cx, JSObject* parent, char *name, msg_queue_t* q)
JSObject* js_CreateQueueObject(JSContext* cx, JSObject* parent, char *name, msg_queue_t* q)
{
JSObject* obj;
......
......@@ -25,7 +25,7 @@ static void trigger_thread(void *args)
}
}
JSRuntime * DLLCALL jsrt_GetNew(int maxbytes, unsigned long timeout, const char *filename, long line)
JSRuntime * jsrt_GetNew(int maxbytes, unsigned long timeout, const char *filename, long line)
{
JSRuntime *ret;
......@@ -42,7 +42,7 @@ JSRuntime * DLLCALL jsrt_GetNew(int maxbytes, unsigned long timeout, const char
return ret;
}
void DLLCALL jsrt_Release(JSRuntime *rt)
void jsrt_Release(JSRuntime *rt)
{
list_node_t *node;
......
......@@ -251,7 +251,7 @@ static JSClass js_server_class = {
,JS_FinalizeStub /* finalize */
};
JSObject* DLLCALL js_CreateServerObject(JSContext* cx, JSObject* parent
JSObject* js_CreateServerObject(JSContext* cx, JSObject* parent
,js_server_props_t* props)
{
JSObject* obj;
......
......@@ -38,7 +38,7 @@
#include "sbbs.h"
#include "xpprintf.h" /* Hurrah for Deuce! */
char* DLLCALL
char*
js_sprintf(JSContext *cx, uint argn, uintN argc, jsval *argv)
{
char* op;
......@@ -82,7 +82,7 @@ js_sprintf(JSContext *cx, uint argn, uintN argc, jsval *argv)
return p2;
}
void DLLCALL
void
js_sprintf_free(char* p)
{
xp_asprintf_free(p);
......
......@@ -2616,7 +2616,7 @@ JSClass js_system_class = {
,js_system_finalize /* finalize */
};
JSObject* DLLCALL js_CreateSystemObject(JSContext* cx, JSObject* parent
JSObject* js_CreateSystemObject(JSContext* cx, JSObject* parent
,scfg_t* cfg, time_t uptime, char* host_name, char* socklib_desc)
{
jsval val;
......
......@@ -1592,7 +1592,7 @@ js_user_constructor(JSContext *cx, uintN argc, jsval *arglist)
return(JS_TRUE);
}
JSObject* DLLCALL js_CreateUserClass(JSContext* cx, JSObject* parent, scfg_t* cfg)
JSObject* js_CreateUserClass(JSContext* cx, JSObject* parent, scfg_t* cfg)
{
JSObject* userclass;
......@@ -1607,7 +1607,7 @@ JSObject* DLLCALL js_CreateUserClass(JSContext* cx, JSObject* parent, scfg_t* cf
return(userclass);
}
JSObject* DLLCALL js_CreateUserObject(JSContext* cx, JSObject* parent, scfg_t* cfg, char* name
JSObject* js_CreateUserObject(JSContext* cx, JSObject* parent, scfg_t* cfg, char* name
,user_t* user, client_t* client, BOOL global_user)
{
JSObject* userobj;
......@@ -1658,7 +1658,7 @@ JSObject* DLLCALL js_CreateUserObject(JSContext* cx, JSObject* parent, scfg_t* c
/****************************************************************************/
/* Creates all the user-specific objects: user, msg_area, file_area */
/****************************************************************************/
JSBool DLLCALL
JSBool
js_CreateUserObjects(JSContext* cx, JSObject* parent, scfg_t* cfg, user_t* user, client_t* client
,char* html_index_file, subscan_t* subscan)
{
......
......@@ -125,7 +125,7 @@ static jsSyncPropertySpec js_event_properties[] = {
{ NULL }
};
BOOL DLLCALL js_CreateXtrnProgProperties(JSContext* cx, JSObject* obj, xtrn_t* xtrn)
BOOL js_CreateXtrnProgProperties(JSContext* cx, JSObject* obj, xtrn_t* xtrn)
{
JSString* js_str;
......@@ -282,7 +282,7 @@ struct js_xtrn_area_priv {
client_t *client;
};
JSBool DLLCALL js_xtrn_area_resolve(JSContext* cx, JSObject* areaobj, jsid id)
JSBool js_xtrn_area_resolve(JSContext* cx, JSObject* areaobj, jsid id)
{
JSObject* allsec;
JSObject* allprog;
......@@ -615,7 +615,7 @@ static JSClass js_xtrn_area_class = {
,js_xtrn_area_finalize /* finalize */
};
JSObject* DLLCALL js_CreateXtrnAreaObject(JSContext* cx, JSObject* parent, scfg_t* cfg
JSObject* js_CreateXtrnAreaObject(JSContext* cx, JSObject* parent, scfg_t* cfg
,user_t* user, client_t* client)
{
JSObject* obj;
......
......@@ -282,7 +282,7 @@ void prep_cfg(scfg_t* cfg)
cfg->prepped=TRUE; /* data prepared for run-time, DO NOT SAVE TO DISK! */
}
void DLLCALL free_cfg(scfg_t* cfg)
void free_cfg(scfg_t* cfg)
{
#ifdef USE_CRYPTLIB
if (cfg->tls_certificate != -1 && cfg->prepped)
......@@ -300,7 +300,7 @@ void DLLCALL free_cfg(scfg_t* cfg)
free_text(cfg->text);
}
void DLLCALL free_text(char* text[])
void free_text(char* text[])
{
int i;
......@@ -395,7 +395,7 @@ static void free_attr_cfg(scfg_t* cfg)
cfg->total_colors=0;
}
char* DLLCALL prep_dir(const char* base, char* path, size_t buflen)
char* prep_dir(const char* base, char* path, size_t buflen)
{
#ifdef __unix__
char *p;
......@@ -475,7 +475,7 @@ char* prep_code(char *str, const char* prefix)
/****************************************************************************/
/* Auto-toggle daylight savings time in US time-zones */
/****************************************************************************/
ushort DLLCALL sys_timezone(scfg_t* cfg)
ushort sys_timezone(scfg_t* cfg)
{
time_t now;
struct tm tm;
......@@ -494,7 +494,7 @@ ushort DLLCALL sys_timezone(scfg_t* cfg)
}
int DLLCALL smb_storage_mode(scfg_t* cfg, smb_t* smb)
int smb_storage_mode(scfg_t* cfg, smb_t* smb)
{
if(smb == NULL || smb->subnum == INVALID_SUB || (smb->status.attr&SMB_EMAIL))
return (cfg->sys_misc&SM_FASTMAIL) ? SMB_FASTALLOC : SMB_SELFPACK;
......@@ -511,7 +511,7 @@ int DLLCALL smb_storage_mode(scfg_t* cfg, smb_t* smb)
/* Open Synchronet Message Base and create, if necessary (e.g. first time opened) */
/* If return value is not SMB_SUCCESS, sub-board is not left open */
int DLLCALL smb_open_sub(scfg_t* cfg, smb_t* smb, unsigned int subnum)
int smb_open_sub(scfg_t* cfg, smb_t* smb, unsigned int subnum)
{
int retval;
smbstatus_t smb_status = {0};
......@@ -545,7 +545,7 @@ int DLLCALL smb_open_sub(scfg_t* cfg, smb_t* smb, unsigned int subnum)
return retval;
}
BOOL DLLCALL smb_init_dir(scfg_t* cfg, smb_t* smb, unsigned int dirnum)
BOOL smb_init_dir(scfg_t* cfg, smb_t* smb, unsigned int dirnum)
{
if(dirnum >= cfg->total_dirs)
return FALSE;
......@@ -555,7 +555,7 @@ BOOL DLLCALL smb_init_dir(scfg_t* cfg, smb_t* smb, unsigned int dirnum)
return TRUE;
}
int DLLCALL smb_open_dir(scfg_t* cfg, smb_t* smb, unsigned int dirnum)
int smb_open_dir(scfg_t* cfg, smb_t* smb, unsigned int dirnum)
{
int retval;
......
......@@ -23,7 +23,7 @@
const char* log_line_ending = "\r\n";
extern "C" BOOL DLLCALL hacklog(scfg_t* cfg, const char* prot, const char* user, const char* text, const char* host, union xp_sockaddr* addr)
extern "C" BOOL hacklog(scfg_t* cfg, const char* prot, const char* user, const char* text, const char* host, union xp_sockaddr* addr)
{
char tstr[64];
char fname[MAX_PATH+1];
......@@ -60,7 +60,7 @@ BOOL sbbs_t::hacklog(char* prot, char* text)
return ::hacklog(&cfg, prot, useron.alias, text, client_name, &client_addr);
}
extern "C" BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* action
extern "C" BOOL spamlog(scfg_t* cfg, char* prot, char* action
,char* reason, char* host, char* ip_addr
,char* to, char* from)
{
......@@ -103,7 +103,7 @@ extern "C" BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* action
return true;
}
extern "C" int DLLCALL errorlog(scfg_t* cfg, int level, const char* host, const char* text)
extern "C" int errorlog(scfg_t* cfg, int level, const char* host, const char* text)
{
FILE* fp;
char buf[128];
......
......@@ -5856,7 +5856,7 @@ static void sendmail_thread(void* arg)
sendmail_running=FALSE;
}
void DLLCALL mail_terminate(void)
void mail_terminate(void)
{
lprintf(LOG_INFO,"Mail Server terminate");
terminate_server=TRUE;
......@@ -5940,7 +5940,7 @@ static void cleanup(int code)
startup->terminated(startup->cbdata,code);
}
const char* DLLCALL mail_ver(void)
const char* mail_ver(void)
{
static char ver[256];
char compiler[32];
......@@ -5963,7 +5963,7 @@ const char* DLLCALL mail_ver(void)
return(ver);
}
void DLLCALL mail_server(void* arg)
void mail_server(void* arg)
{
char* p;
char path[MAX_PATH+1];
......
......@@ -402,7 +402,7 @@ static BOOL winsock_startup(void)
#endif
DLLEXPORT void DLLCALL sbbs_srand()
DLLEXPORT void sbbs_srand()
{
DWORD seed;
......@@ -422,7 +422,7 @@ DLLEXPORT void DLLCALL sbbs_srand()
sbbs_random(10); /* Throw away first number */
}
int DLLCALL sbbs_random(int n)
int sbbs_random(int n)
{
return(xp_random(n));
}
......@@ -431,7 +431,7 @@ int DLLCALL sbbs_random(int n)
static js_server_props_t js_server_props;
void* DLLCALL js_GetClassPrivate(JSContext *cx, JSObject *obj, JSClass* cls)
void* js_GetClassPrivate(JSContext *cx, JSObject *obj, JSClass* cls)
{
void *ret = JS_GetInstancePrivate(cx, obj, cls, NULL);
......@@ -446,7 +446,7 @@ void* DLLCALL js_GetClassPrivate(JSContext *cx, JSObject *obj, JSClass* cls)
}
JSBool
DLLCALL js_CreateArrayOfStrings(JSContext* cx, JSObject* parent, const char* name, const char* str[],uintN flags)
js_CreateArrayOfStrings(JSContext* cx, JSObject* parent, const char* name, const char* str[],uintN flags)
{
JSObject* array;
JSString* js_str;
......@@ -481,7 +481,7 @@ DLLCALL js_CreateArrayOfStrings(JSContext* cx, JSObject* parent, const char* nam
/* Convert from Synchronet-specific jsSyncMethodSpec to JSAPI's JSFunctionSpec */
JSBool
DLLCALL js_DescribeSyncObject(JSContext* cx, JSObject* obj, const char* str, int ver)
js_DescribeSyncObject(JSContext* cx, JSObject* obj, const char* str, int ver)
{
JSString* js_str = JS_NewStringCopyZ(cx, str);
......@@ -498,7 +498,7 @@ DLLCALL js_DescribeSyncObject(JSContext* cx, JSObject* obj, const char* str, int
}
JSBool
DLLCALL js_DescribeSyncConstructor(JSContext* cx, JSObject* obj, const char* str)
js_DescribeSyncConstructor(JSContext* cx, JSObject* obj, const char* str)
{
JSString* js_str = JS_NewStringCopyZ(cx, str);
......@@ -534,7 +534,7 @@ static const char *js_type_str[] = {
};
JSBool
DLLCALL js_DefineSyncProperties(JSContext *cx, JSObject *obj, jsSyncPropertySpec* props)
js_DefineSyncProperties(JSContext *cx, JSObject *obj, jsSyncPropertySpec* props)
{
uint i;
long ver;
......@@ -572,7 +572,7 @@ DLLCALL js_DefineSyncProperties(JSContext *cx, JSObject *obj, jsSyncPropertySpec
}
JSBool
DLLCALL js_DefineSyncMethods(JSContext* cx, JSObject* obj, jsSyncMethodSpec *funcs)
js_DefineSyncMethods(JSContext* cx, JSObject* obj, jsSyncMethodSpec *funcs)
{
int i;
jsuint len=0;
......@@ -673,7 +673,7 @@ DLLCALL js_DefineSyncMethods(JSContext* cx, JSObject* obj, jsSyncMethodSpec *fun
* 2) The speed penalty won't be seen in production code anyways
*/
JSBool
DLLCALL js_SyncResolve(JSContext* cx, JSObject* obj, char *name, jsSyncPropertySpec* props, jsSyncMethodSpec* funcs, jsConstIntSpec* consts, int flags)
js_SyncResolve(JSContext* cx, JSObject* obj, char *name, jsSyncPropertySpec* props, jsSyncMethodSpec* funcs, jsConstIntSpec* consts, int flags)
{
JSBool ret=JS_TRUE;
......@@ -698,7 +698,7 @@ DLLCALL js_SyncResolve(JSContext* cx, JSObject* obj, char *name, jsSyncPropertyS
#else // NON-JSDOCS
JSBool
DLLCALL js_DefineSyncProperties(JSContext *cx, JSObject *obj, jsSyncPropertySpec* props)
js_DefineSyncProperties(JSContext *cx, JSObject *obj, jsSyncPropertySpec* props)
{
uint i;
......@@ -723,7 +723,7 @@ DLLCALL js_DefineSyncProperties(JSContext *cx, JSObject *obj, jsSyncPropertySpec
JSBool
DLLCALL js_DefineSyncMethods(JSContext* cx, JSObject* obj, jsSyncMethodSpec *funcs)
js_DefineSyncMethods(JSContext* cx, JSObject* obj, jsSyncMethodSpec *funcs)
{
uint i;
......@@ -738,7 +738,7 @@ DLLCALL js_DefineSyncMethods(JSContext* cx, JSObject* obj, jsSyncMethodSpec *fun
}
JSBool
DLLCALL js_SyncResolve(JSContext* cx, JSObject* obj, char *name, jsSyncPropertySpec* props, jsSyncMethodSpec* funcs, jsConstIntSpec* consts, int flags)
js_SyncResolve(JSContext* cx, JSObject* obj, char *name, jsSyncPropertySpec* props, jsSyncMethodSpec* funcs, jsConstIntSpec* consts, int flags)
{
uint i;
jsval val;
......@@ -795,7 +795,7 @@ DLLCALL js_SyncResolve(JSContext* cx, JSObject* obj, char *name, jsSyncPropertyS
/* This is a stream-lined version of JS_DefineConstDoubles */
JSBool
DLLCALL js_DefineConstIntegers(JSContext* cx, JSObject* obj, jsConstIntSpec* ints, int flags)
js_DefineConstIntegers(JSContext* cx, JSObject* obj, jsConstIntSpec* ints, int flags)
{
uint i;
jsval val;
......@@ -1410,7 +1410,7 @@ bool sbbs_t::js_create_user_objects(JSContext* cx, JSObject* glob)
return result;
}
extern "C" BOOL DLLCALL js_CreateCommonObjects(JSContext* js_cx
extern "C" BOOL js_CreateCommonObjects(JSContext* js_cx
,scfg_t* cfg /* common */
,scfg_t* node_cfg /* node-specific */
,jsSyncMethodSpec* methods /* global */
......@@ -4712,7 +4712,7 @@ void sbbs_t::daily_maint(void)
sys_status&=~SS_DAILY;
}
const char* DLLCALL js_ver(void)
const char* js_ver(void)
{
#ifdef JAVASCRIPT
return(JS_GetImplementationVersion());
......@@ -4722,7 +4722,7 @@ const char* DLLCALL js_ver(void)
}
/* Returns char string of version and revision */
const char* DLLCALL bbs_ver(void)
const char* bbs_ver(void)
{
static char ver[256];
char compiler[32];
......@@ -4746,12 +4746,12 @@ const char* DLLCALL bbs_ver(void)
}
/* Returns binary-coded version and revision (e.g. 0x31000 == 3.10a) */
long DLLCALL bbs_ver_num(void)
long bbs_ver_num(void)
{
return(VERSION_HEX);
}
void DLLCALL bbs_terminate(void)
void bbs_terminate(void)
{
lprintf(LOG_INFO,"BBS Server terminate");
terminate_server=true;
......@@ -4796,7 +4796,7 @@ static void cleanup(int code)
startup->terminated(startup->cbdata,code);
}
void DLLCALL bbs_thread(void* arg)
void bbs_thread(void* arg)
{
char host_name[256];
char* identity;
......
......@@ -62,7 +62,7 @@ static ulong msgid_serialno(smbmsg_t* msg)
/* Returns NULL if the message is from FidoNet and doesn't have a MSGID */
/* Pass NULL for msgid if (single-threaded) caller wishes to use static buf */
/****************************************************************************/
char* DLLCALL ftn_msgid(sub_t *sub, smbmsg_t* msg, char* msgid, size_t maxlen)
char* ftn_msgid(sub_t *sub, smbmsg_t* msg, char* msgid, size_t maxlen)
{
static char msgidbuf[256];
......@@ -90,7 +90,7 @@ char* DLLCALL ftn_msgid(sub_t *sub, smbmsg_t* msg, char* msgid, size_t maxlen)
/****************************************************************************/
/* Return a general purpose (RFC-822) message-ID */
/****************************************************************************/
char* DLLCALL get_msgid(scfg_t* cfg, uint subnum, smbmsg_t* msg, char* msgid, size_t maxlen)
char* get_msgid(scfg_t* cfg, uint subnum, smbmsg_t* msg, char* msgid, size_t maxlen)
{
char* host;
......@@ -132,7 +132,7 @@ char* DLLCALL get_msgid(scfg_t* cfg, uint subnum, smbmsg_t* msg, char* msgid, si
/* Get (or generate) the original message-ID for a reply message */
/* Returns NULL if not a valid reply message */
/****************************************************************************/
char* DLLCALL get_replyid(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, char* msgid, size_t maxlen)
char* get_replyid(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, char* msgid, size_t maxlen)
{
smbmsg_t remsg;
......@@ -157,7 +157,7 @@ char* DLLCALL get_replyid(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, char* msgid, s
/* Add auto-generated message-IDs to a message, if doesn't already have */
/* The message base (smb) must be already opened */
/****************************************************************************/
BOOL DLLCALL add_msg_ids(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, smbmsg_t* remsg)
BOOL add_msg_ids(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, smbmsg_t* remsg)
{
char msg_id[256];
......@@ -210,7 +210,7 @@ BOOL DLLCALL add_msg_ids(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, smbmsg_t* remsg
/* Migrated from sbbs_t::postmsg() */
/* The message base (smb) must be already opened successfully */
/****************************************************************************/
BOOL DLLCALL add_reply_ids(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, smbmsg_t* remsg)
BOOL add_reply_ids(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, smbmsg_t* remsg)
{
char* p;
char replyid[256];
......@@ -238,7 +238,7 @@ BOOL DLLCALL add_reply_ids(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, smbmsg_t* rem
/****************************************************************************/
/* FTN-compliant "Program Identifier"/PID */
/****************************************************************************/
char* DLLCALL msg_program_id(char* pid, size_t maxlen)
char* msg_program_id(char* pid, size_t maxlen)
{
char compiler[64];
......
......@@ -27,7 +27,7 @@
/****************************************************************************/
/* Convert when_t structure to RFC822 date header field (string) */
/****************************************************************************/
char* DLLCALL msgdate(when_t when, char* buf)
char* msgdate(when_t when, char* buf)
{
struct tm tm;
char plus='+';
......@@ -61,7 +61,7 @@ char* DLLCALL msgdate(when_t when, char* buf)
/* Convert RFC822 date header field to when_t structure */
/* dd mon yyyy hh:mm:ss [zone] */
/****************************************************************************/
when_t DLLCALL rfc822date(char* date)
when_t rfc822date(char* date)
{
char* p=date;
char str[32];
......
......@@ -64,8 +64,8 @@ typedef struct {
DWORD* options;
BOOL* recycle_now;
int* log_level;
void DLLCALL (*thread)(void* arg);
void DLLCALL (*terminate)(void);
void (*thread)(void* arg);
void (*terminate)(void);
void (WINAPI *ctrl_handler)(DWORD);
HANDLE log_handle;
HANDLE event_handle;
......
......@@ -355,7 +355,7 @@ bool sbbs_t::postmsg(uint subnum, long wm_mode, smb_t* resmb, smbmsg_t* remsg)
return(true);
}
extern "C" void DLLCALL signal_sub_sem(scfg_t* cfg, uint subnum)
extern "C" void signal_sub_sem(scfg_t* cfg, uint subnum)
{
char str[MAX_PATH+1];
......@@ -369,7 +369,7 @@ extern "C" void DLLCALL signal_sub_sem(scfg_t* cfg, uint subnum)
ftouch(cmdstr(cfg,NULL,cfg->sub[subnum]->post_sem,nulstr,nulstr,str,sizeof(str)));
}
extern "C" int DLLCALL msg_client_hfields(smbmsg_t* msg, client_t* client)
extern "C" int msg_client_hfields(smbmsg_t* msg, client_t* client)
{
int i;
char port[16];
......@@ -404,7 +404,7 @@ extern "C" int DLLCALL msg_client_hfields(smbmsg_t* msg, client_t* client)
/* Adds/generates Message-IDs when needed */
/* Auto-sets the UTF-8 indicators for UTF-8 encoded header fields and body text */
/* If you want to save a message body with CP437 chars that also happen to be valid UTF-8 sequences, you'll need to preset the ftn_charset header */
extern "C" int DLLCALL savemsg(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, client_t* client, const char* server, char* msgbuf, smbmsg_t* remsg)
extern "C" int savemsg(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, client_t* client, const char* server, char* msgbuf, smbmsg_t* remsg)
{
ushort xlat=XLAT_NONE;
int i;
......@@ -531,7 +531,7 @@ extern "C" int DLLCALL savemsg(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, client_t*
return(i);
}
extern "C" int DLLCALL votemsg(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, const char* smsgfmt, const char* votefmt)
extern "C" int votemsg(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, const char* smsgfmt, const char* votefmt)
{
int result;
smbmsg_t remsg;
......@@ -604,7 +604,7 @@ extern "C" int DLLCALL votemsg(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, const cha
return result;
}
extern "C" int DLLCALL closepoll(scfg_t* cfg, smb_t* smb, uint32_t msgnum, const char* username)
extern "C" int closepoll(scfg_t* cfg, smb_t* smb, uint32_t msgnum, const char* username)
{
int result;
smbmsg_t msg;
......@@ -625,7 +625,7 @@ extern "C" int DLLCALL closepoll(scfg_t* cfg, smb_t* smb, uint32_t msgnum, const
return result;
}
extern "C" int DLLCALL postpoll(scfg_t* cfg, smb_t* smb, smbmsg_t* msg)
extern "C" int postpoll(scfg_t* cfg, smb_t* smb, smbmsg_t* msg)
{
if(msg->hdr.when_imported.time == 0) {
msg->hdr.when_imported.time = time32(NULL);
......@@ -640,7 +640,7 @@ extern "C" int DLLCALL postpoll(scfg_t* cfg, smb_t* smb, smbmsg_t* msg)
}
// Send an email and a short-message to a local user about something important (e.g. a system error)
extern "C" int DLLCALL notify(scfg_t* cfg, uint usernumber, const char* subject, const char* text)
extern "C" int notify(scfg_t* cfg, uint usernumber, const char* subject, const char* text)
{
int i;
smb_t smb = {0};
......
......@@ -66,7 +66,7 @@ bool route_circ(char *via, char *id)
return(false);
}
extern "C" int DLLCALL qwk_route(scfg_t* cfg, const char *inaddr, char *fulladdr, size_t maxlen)
extern "C" int qwk_route(scfg_t* cfg, const char *inaddr, char *fulladdr, size_t maxlen)
{
char node[64],str[256],path[MAX_PATH+1],*p;
int file,i;
......
This diff is collapsed.
......@@ -38,7 +38,7 @@ static int pslen;
/****************************************************************************/
/****************************************************************************/
BOOL DLLCALL save_cfg(scfg_t* cfg, int backup_level)
BOOL save_cfg(scfg_t* cfg, int backup_level)
{
int i;
......@@ -67,7 +67,7 @@ BOOL DLLCALL save_cfg(scfg_t* cfg, int backup_level)
/****************************************************************************/
/****************************************************************************/
BOOL DLLCALL write_node_cfg(scfg_t* cfg, int backup_level)
BOOL write_node_cfg(scfg_t* cfg, int backup_level)
{
char str[MAX_PATH+1];
int i,file;
......@@ -133,7 +133,7 @@ BOOL DLLCALL write_node_cfg(scfg_t* cfg, int backup_level)
/****************************************************************************/
/****************************************************************************/
BOOL DLLCALL write_main_cfg(scfg_t* cfg, int backup_level)
BOOL write_main_cfg(scfg_t* cfg, int backup_level)
{
char str[MAX_PATH+1],c=0;
int file;
......@@ -311,7 +311,7 @@ BOOL DLLCALL write_main_cfg(scfg_t* cfg, int backup_level)
/****************************************************************************/
/****************************************************************************/
BOOL DLLCALL write_msgs_cfg(scfg_t* cfg, int backup_level)
BOOL write_msgs_cfg(scfg_t* cfg, int backup_level)
{
char str[MAX_PATH+1],c;
char dir[LEN_DIR+1]="";
......@@ -623,7 +623,7 @@ BOOL DLLCALL write_msgs_cfg(scfg_t* cfg, int backup_level)
/****************************************************************************/
/****************************************************************************/
BOOL DLLCALL write_file_cfg(scfg_t* cfg, int backup_level)
BOOL write_file_cfg(scfg_t* cfg, int backup_level)
{
char str[MAX_PATH+1],cmd[LEN_CMD+1],c;
char path[MAX_PATH+1];
......@@ -873,7 +873,7 @@ BOOL DLLCALL write_file_cfg(scfg_t* cfg, int backup_level)
/****************************************************************************/
/****************************************************************************/
BOOL DLLCALL write_chat_cfg(scfg_t* cfg, int backup_level)
BOOL write_chat_cfg(scfg_t* cfg, int backup_level)
{
char str[MAX_PATH+1];
int i,j,file;
......@@ -948,7 +948,7 @@ BOOL DLLCALL write_chat_cfg(scfg_t* cfg, int backup_level)
/****************************************************************************/
/****************************************************************************/
BOOL DLLCALL write_xtrn_cfg(scfg_t* cfg, int backup_level)
BOOL write_xtrn_cfg(scfg_t* cfg, int backup_level)
{
char str[MAX_PATH+1];
uchar c;
......@@ -1073,7 +1073,7 @@ BOOL DLLCALL write_xtrn_cfg(scfg_t* cfg, int backup_level)
return(TRUE);
}
void DLLCALL refresh_cfg(scfg_t* cfg)
void refresh_cfg(scfg_t* cfg)
{
char str[MAX_PATH+1];
int i;
......
......@@ -1517,7 +1517,7 @@ static void native_service_thread(void* arg)
}
void DLLCALL services_terminate(void)
void services_terminate(void)
{
uint32_t i;
......@@ -1683,7 +1683,7 @@ static void cleanup(int code)
startup->terminated(startup->cbdata,code);
}
const char* DLLCALL services_ver(void)
const char* services_ver(void)
{
static char ver[256];
char compiler[32];
......@@ -1768,7 +1768,7 @@ static nfds_t setup_poll(struct pollfd **fds)
}
#endif
void DLLCALL services_thread(void* arg)
void services_thread(void* arg)
{
char* p;
char path[MAX_PATH+1];
......
......@@ -39,7 +39,7 @@
#include "sbbs.h"
#include "ini_file.h" /* ini file API */
int DLLCALL set_socket_options(scfg_t* cfg, SOCKET sock, const char* protocol, char* error, size_t errlen)
int set_socket_options(scfg_t* cfg, SOCKET sock, const char* protocol, char* error, size_t errlen)
{
char cfgfile[MAX_PATH+1];
FILE* fp;
......
......@@ -7,12 +7,12 @@
#include "ssl.h"
//#include "js_socket.h" // TODO... move this stuff in here?
void DLLCALL free_crypt_attrstr(char *attr)
void free_crypt_attrstr(char *attr)
{
free(attr);
}
char* DLLCALL get_crypt_attribute(CRYPT_HANDLE sess, C_IN CRYPT_ATTRIBUTE_TYPE attr)
char* get_crypt_attribute(CRYPT_HANDLE sess, C_IN CRYPT_ATTRIBUTE_TYPE attr)
{
int len = 0;
char *estr = NULL;
......@@ -31,12 +31,12 @@ char* DLLCALL get_crypt_attribute(CRYPT_HANDLE sess, C_IN CRYPT_ATTRIBUTE_TYPE a
return NULL;
}
char* DLLCALL get_crypt_error(CRYPT_HANDLE sess)
char* get_crypt_error(CRYPT_HANDLE sess)
{
return get_crypt_attribute(sess, CRYPT_ATTRIBUTE_ERRORMESSAGE);
}
static int DLLCALL crypt_ll(int error)
static int crypt_ll(int error)
{
switch(error) {
case CRYPT_ERROR_INCOMPLETE:
......@@ -81,7 +81,7 @@ static const char *crypt_lstr(int level)
return "!!!!!!!!";
}
bool DLLCALL get_crypt_error_string(int status, CRYPT_HANDLE sess, char **estr, const char *action, int *lvl)
bool get_crypt_error_string(int status, CRYPT_HANDLE sess, char **estr, const char *action, int *lvl)
{
char *emsg = NULL;
bool allocated = false;
......@@ -253,14 +253,14 @@ static void internal_do_cryptInit(void)
return;
}
int DLLCALL do_cryptInit(void)
int do_cryptInit(void)
{
if (pthread_once(&crypt_init_once, internal_do_cryptInit) != 0)
return 0;
return cryptlib_initialized;
}
bool DLLCALL is_crypt_initialized(void)
bool is_crypt_initialized(void)
{
return cryptlib_initialized;
}
......@@ -277,7 +277,7 @@ void unlock_ssl_cert(void)
#define DO(action, handle, x) get_crypt_error_string(x, handle, estr, action, level)
CRYPT_CONTEXT DLLCALL get_ssl_cert(scfg_t *cfg, char **estr, int *level)
CRYPT_CONTEXT get_ssl_cert(scfg_t *cfg, char **estr, int *level)
{
CRYPT_KEYSET ssl_keyset;
CRYPT_CONTEXT ssl_context = -1; // MSVC requires this to be initialized
......
......@@ -245,9 +245,6 @@ extern "C" {
#ifdef DLLEXPORT
#undef DLLEXPORT
#endif
#ifdef DLLCALL
#undef DLLCALL
#endif
#ifdef _WIN32
#ifdef SBBS_EXPORTS
......@@ -255,22 +252,16 @@ extern "C" {
#else
#define DLLEXPORT __declspec(dllimport)
#endif
#ifdef __BORLANDC__
#define DLLCALL
#else
#define DLLCALL
#endif
#else
#define DLLEXPORT
#define DLLCALL
#endif
/* arg is pointer to static bbs_startup_t* */
DLLEXPORT void DLLCALL bbs_thread(void* arg);
DLLEXPORT void DLLCALL bbs_terminate(void);
DLLEXPORT const char* DLLCALL js_ver(void);
DLLEXPORT const char* DLLCALL bbs_ver(void);
DLLEXPORT long DLLCALL bbs_ver_num(void);
DLLEXPORT void bbs_thread(void* arg);
DLLEXPORT void bbs_terminate(void);
DLLEXPORT const char* js_ver(void);
DLLEXPORT const char* bbs_ver(void);
DLLEXPORT long bbs_ver_num(void);
#ifdef __cplusplus
}
......
......@@ -138,7 +138,7 @@ int confirm(char *prompt)
/****************************************************************************/
/* Takes a string in the format HH:MM:SS and returns in seconds */
/****************************************************************************/
time_t DLLCALL strtosec(char *str)
time_t strtosec(char *str)
{
char *p1;
char *p2;
......
......@@ -5021,7 +5021,7 @@ static BOOL exec_cgi(http_session_t *session)
/* JavaScript stuff */
/********************/
JSObject* DLLCALL js_CreateHttpReplyObject(JSContext* cx
JSObject* js_CreateHttpReplyObject(JSContext* cx
,JSObject* parent, http_session_t *session)
{
JSObject* reply;
......@@ -5060,7 +5060,7 @@ JSObject* DLLCALL js_CreateHttpReplyObject(JSContext* cx
return(reply);
}
JSObject* DLLCALL js_CreateHttpRequestObject(JSContext* cx
JSObject* js_CreateHttpRequestObject(JSContext* cx
,JSObject* parent, http_session_t *session)
{
/* JSObject* cookie; */
......@@ -6635,7 +6635,7 @@ void http_session_thread(void* arg)
}
void DLLCALL web_terminate(void)
void web_terminate(void)
{
lprintf(LOG_INFO,"Web Server terminate");
terminate_server=TRUE;
......@@ -6692,7 +6692,7 @@ static void cleanup(int code)
startup->terminated(startup->cbdata,code);
}
const char* DLLCALL web_ver(void)
const char* web_ver(void)
{
static char ver[256];
char compiler[32];
......@@ -6818,7 +6818,7 @@ void http_logging_thread(void* arg)
http_logging_thread_running=FALSE;
}
void DLLCALL web_server(void* arg)
void web_server(void* arg)
{
time_t start;
WORD host_port;
......
......@@ -40,7 +40,7 @@
#include "datewrap.h"
/* Return difference (in seconds) in time() result from standard */
time_t DLLCALL checktime(void)
time_t checktime(void)
{
time_t t=0x2D24BD00L; /* Correct time_t value on Jan-1-1994 */
struct tm gmt;
......@@ -53,7 +53,7 @@ time_t DLLCALL checktime(void)
}
/* Compensates for struct tm "weirdness" */
time_t DLLCALL sane_mktime(struct tm* tm)
time_t sane_mktime(struct tm* tm)
{
if(tm->tm_year>=1900)
tm->tm_year-=1900;
......@@ -65,7 +65,7 @@ time_t DLLCALL sane_mktime(struct tm* tm)
}
/* Compensates for struct tm "weirdness" */
time_t DLLCALL sane_timegm(struct tm* tm)
time_t sane_timegm(struct tm* tm)
{
if(tm->tm_year>=1900)
tm->tm_year-=1900;
......@@ -76,7 +76,7 @@ time_t DLLCALL sane_timegm(struct tm* tm)
return timegm(tm);
}
time32_t DLLCALL time32(time32_t* tp)
time32_t time32(time32_t* tp)
{
time_t t;
......@@ -88,12 +88,12 @@ time32_t DLLCALL time32(time32_t* tp)
return (time32_t)t;
}
time32_t DLLCALL mktime32(struct tm* tm)
time32_t mktime32(struct tm* tm)
{
return (time32_t)mktime(tm); /* don't use sane_mktime since tm->tm_mon is assumed to be already zero-based */
}
struct tm* DLLCALL localtime32(const time32_t* t32, struct tm* tm)
struct tm* localtime32(const time32_t* t32, struct tm* tm)
{
time_t t=*t32;
struct tm* tmp;
......@@ -118,7 +118,7 @@ struct tm* DLLCALL localtime32(const time32_t* t32, struct tm* tm)
#include <sys/time.h> /* stuct timeval, gettimeofday() */
#endif
void DLLCALL xp_getdate(struct date* nyd)
void xp_getdate(struct date* nyd)
{
time_t tim;
struct tm dte;
......@@ -130,7 +130,7 @@ void DLLCALL xp_getdate(struct date* nyd)
nyd->da_mon=dte.tm_mon+1;
}
void DLLCALL gettime(struct time* nyt)
void gettime(struct time* nyt)
{
#if defined(_WIN32)
SYSTEMTIME systime;
......@@ -165,7 +165,7 @@ void DLLCALL gettime(struct time* nyt)
/* The native Win32 versions of these functions are already thread-safe. */
/****************************************************************************/
struct tm* DLLCALL gmtime_r(const time_t* t, struct tm* tm)
struct tm* gmtime_r(const time_t* t, struct tm* tm)
{
struct tm* tmp = gmtime(t);
......@@ -176,7 +176,7 @@ struct tm* DLLCALL gmtime_r(const time_t* t, struct tm* tm)
return(tm);
}
struct tm* DLLCALL localtime_r(const time_t* t, struct tm* tm)
struct tm* localtime_r(const time_t* t, struct tm* tm)
{
struct tm* tmp = localtime(t);
......@@ -187,7 +187,7 @@ struct tm* DLLCALL localtime_r(const time_t* t, struct tm* tm)
return(tm);
}
char* DLLCALL ctime_r(const time_t *t, char *buf)
char* ctime_r(const time_t *t, char *buf)
{
char* p = ctime(t);
......@@ -198,7 +198,7 @@ char* DLLCALL ctime_r(const time_t *t, char *buf)
return(buf);
}
char* DLLCALL asctime_r(const struct tm *tm, char *buf)
char* asctime_r(const struct tm *tm, char *buf)
{
char* p = asctime(tm);
......
This diff is collapsed.
This diff is collapsed.
......@@ -322,7 +322,7 @@ BOOL iniSectionExists(str_list_t list, const char* section)
return(list[i]!=NULL);
}
str_list_t DLLCALL iniGetSection(str_list_t list, const char *section)
str_list_t iniGetSection(str_list_t list, const char *section)
{
size_t i;
str_list_t retval;
......@@ -1246,7 +1246,7 @@ str_list_t iniGetKeyList(str_list_t list, const char* section)
}
named_string_t** DLLCALL
named_string_t**
iniReadNamedStringList(FILE* fp, const char* section)
{
char* name;
......@@ -1294,7 +1294,7 @@ iniReadNamedStringList(FILE* fp, const char* section)
return(lp);
}
named_string_t** DLLCALL
named_string_t**
iniGetNamedStringList(str_list_t list, const char* section)
{
char* name;
......
This diff is collapsed.
/* msg_queue.c */
/* Uni or Bi-directional FIFO message queue */
/* $Id: msg_queue.c,v 1.15 2019/08/22 01:40:21 rswindell Exp $ */
/****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
......@@ -17,21 +13,9 @@
* See the GNU Lesser General Public License for more details: lgpl.txt or *
* http://www.fsf.org/copyleft/lesser.html *
* *
* Anonymous FTP access to the most recent released source is available at *
* ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net *
* *
* Anonymous CVS access to the development source and modification history *
* is available at cvs.synchro.net:/cvsroot/sbbs, example: *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login *
* (just hit return, no password is necessary) *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src *
* *
* For Synchronet coding style and modification guidelines, see *
* http://www.synchro.net/source.html *
* *
* You are encouraged to submit any modifications (preferably in Unix diff *
* format) via e-mail to mods@synchro.net *
* *
* Note: If this box doesn't appear square, then you need to fix your tabs. *
****************************************************************************/
......@@ -42,7 +26,7 @@
#include "threadwrap.h" /* pthread_self */
#include "msg_queue.h"
msg_queue_t* DLLCALL msgQueueInit(msg_queue_t* q, long flags)
msg_queue_t* msgQueueInit(msg_queue_t* q, long flags)
{
if(q==NULL) {
if((q=(msg_queue_t*)malloc(sizeof(msg_queue_t)))==NULL)
......@@ -63,7 +47,7 @@ msg_queue_t* DLLCALL msgQueueInit(msg_queue_t* q, long flags)
return(q);
}
BOOL DLLCALL msgQueueOwner(msg_queue_t* q)
BOOL msgQueueOwner(msg_queue_t* q)
{
if(q==NULL)
return(FALSE);
......@@ -71,7 +55,7 @@ BOOL DLLCALL msgQueueOwner(msg_queue_t* q)
return q->owner_thread_id == pthread_self();
}
BOOL DLLCALL msgQueueFree(msg_queue_t* q)
BOOL msgQueueFree(msg_queue_t* q)
{
if(q==NULL)
return(FALSE);
......@@ -85,7 +69,7 @@ BOOL DLLCALL msgQueueFree(msg_queue_t* q)
return(TRUE);
}
long DLLCALL msgQueueAttach(msg_queue_t* q)