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;
......
......@@ -1185,65 +1185,55 @@ public:
#ifdef DLLEXPORT
#undef DLLEXPORT
#endif
#ifdef DLLCALL
#undef DLLCALL
#endif
#ifdef _WIN32
#ifdef __MINGW32__
#define DLLEXPORT
#define DLLCALL
#else
#ifdef SBBS_EXPORTS
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT __declspec(dllimport)
#endif
#ifdef __BORLANDC__
#define DLLCALL
#else
#define DLLCALL
#endif
#endif
#else /* !_WIN32 */
#define DLLEXPORT
#define DLLCALL
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* ansiterm.cpp */
DLLEXPORT char* DLLCALL ansi_attr(int attr, int curattr, char* str, BOOL color);
DLLEXPORT char* ansi_attr(int attr, int curattr, char* str, BOOL color);
/* main.cpp */
extern const char* nulstr;
extern const char* crlf;
DLLEXPORT int DLLCALL sbbs_random(int);
DLLEXPORT void DLLCALL sbbs_srand(void);
DLLEXPORT int sbbs_random(int);
DLLEXPORT void sbbs_srand(void);
/* postmsg.cpp */
DLLEXPORT int DLLCALL savemsg(scfg_t*, smb_t*, smbmsg_t*, client_t*, const char* server, char* msgbuf, smbmsg_t* remsg);
DLLEXPORT int DLLCALL votemsg(scfg_t*, smb_t*, smbmsg_t*, const char* msgfmt, const char* votefmt);
DLLEXPORT int DLLCALL postpoll(scfg_t*, smb_t*, smbmsg_t*);
DLLEXPORT int DLLCALL closepoll(scfg_t*, smb_t*, uint32_t msgnum, const char* username);
DLLEXPORT void DLLCALL signal_sub_sem(scfg_t*, uint subnum);
DLLEXPORT int DLLCALL msg_client_hfields(smbmsg_t*, client_t*);
DLLEXPORT int DLLCALL notify(scfg_t*, uint usernumber, const char* subject, const char* msg);
DLLEXPORT int savemsg(scfg_t*, smb_t*, smbmsg_t*, client_t*, const char* server, char* msgbuf, smbmsg_t* remsg);
DLLEXPORT int votemsg(scfg_t*, smb_t*, smbmsg_t*, const char* msgfmt, const char* votefmt);
DLLEXPORT int postpoll(scfg_t*, smb_t*, smbmsg_t*);
DLLEXPORT int closepoll(scfg_t*, smb_t*, uint32_t msgnum, const char* username);
DLLEXPORT void signal_sub_sem(scfg_t*, uint subnum);
DLLEXPORT int msg_client_hfields(smbmsg_t*, client_t*);
DLLEXPORT int notify(scfg_t*, uint usernumber, const char* subject, const char* msg);
/* logfile.cpp */
DLLEXPORT int DLLCALL errorlog(scfg_t* cfg, int level, const char* host, const char* text);
DLLEXPORT int errorlog(scfg_t* cfg, int level, const char* host, const char* text);
DLLEXPORT BOOL DLLCALL hacklog(scfg_t* cfg, const char* prot, const char* user, const char* text
DLLEXPORT BOOL hacklog(scfg_t* cfg, const char* prot, const char* user, const char* text
,const char* host, union xp_sockaddr* addr);
DLLEXPORT BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* action, char* reason
DLLEXPORT BOOL spamlog(scfg_t* cfg, char* prot, char* action, char* reason
,char* host, char* ip_addr, char* to, char* from);
/* data.cpp */
DLLEXPORT time_t DLLCALL getnextevent(scfg_t* cfg, event_t* event);
DLLEXPORT time_t DLLCALL getnexteventtime(event_t* event);
DLLEXPORT time_t getnextevent(scfg_t* cfg, event_t* event);
DLLEXPORT time_t getnexteventtime(event_t* event);
/* sockopt.c */
DLLEXPORT int DLLCALL set_socket_options(scfg_t* cfg, SOCKET sock, const char* section
DLLEXPORT int set_socket_options(scfg_t* cfg, SOCKET sock, const char* section
,char* error, size_t errlen);
/* qwk.cpp */
......@@ -1303,17 +1293,17 @@ extern "C" {
#endif
/* main.cpp */
DLLEXPORT JSBool DLLCALL js_DescribeSyncObject(JSContext* cx, JSObject* obj, const char*, int ver);
DLLEXPORT JSBool DLLCALL js_DescribeSyncConstructor(JSContext* cx, JSObject* obj, const char*);
DLLEXPORT JSBool DLLCALL js_DefineSyncMethods(JSContext* cx, JSObject* obj, jsSyncMethodSpec*);
DLLEXPORT JSBool DLLCALL js_DefineSyncProperties(JSContext* cx, JSObject* obj, jsSyncPropertySpec*);
DLLEXPORT JSBool DLLCALL js_SyncResolve(JSContext* cx, JSObject* obj, char *name, jsSyncPropertySpec* props, jsSyncMethodSpec* funcs, jsConstIntSpec* consts, int flags);
DLLEXPORT JSBool DLLCALL js_DefineConstIntegers(JSContext* cx, JSObject* obj, jsConstIntSpec*, int flags);
DLLEXPORT JSBool DLLCALL js_CreateArrayOfStrings(JSContext* cx, JSObject* parent
DLLEXPORT JSBool js_DescribeSyncObject(JSContext* cx, JSObject* obj, const char*, int ver);
DLLEXPORT JSBool js_DescribeSyncConstructor(JSContext* cx, JSObject* obj, const char*);
DLLEXPORT JSBool js_DefineSyncMethods(JSContext* cx, JSObject* obj, jsSyncMethodSpec*);
DLLEXPORT JSBool js_DefineSyncProperties(JSContext* cx, JSObject* obj, jsSyncPropertySpec*);
DLLEXPORT JSBool js_SyncResolve(JSContext* cx, JSObject* obj, char *name, jsSyncPropertySpec* props, jsSyncMethodSpec* funcs, jsConstIntSpec* consts, int flags);
DLLEXPORT JSBool js_DefineConstIntegers(JSContext* cx, JSObject* obj, jsConstIntSpec*, int flags);
DLLEXPORT JSBool js_CreateArrayOfStrings(JSContext* cx, JSObject* parent
,const char* name, const char* str[], unsigned flags);
DLLEXPORT void* DLLCALL js_GetClassPrivate(JSContext*, JSObject*, JSClass*);
DLLEXPORT void* js_GetClassPrivate(JSContext*, JSObject*, JSClass*);
DLLEXPORT BOOL DLLCALL js_CreateCommonObjects(JSContext* cx
DLLEXPORT BOOL js_CreateCommonObjects(JSContext* cx
,scfg_t* cfg /* common */
,scfg_t* node_cfg /* node-specific */
,jsSyncMethodSpec* methods /* global */
......@@ -1334,7 +1324,7 @@ extern "C" {
);
/* js_server.c */
DLLEXPORT JSObject* DLLCALL js_CreateServerObject(JSContext* cx, JSObject* parent
DLLEXPORT JSObject* js_CreateServerObject(JSContext* cx, JSObject* parent
,js_server_props_t* props);
/* js_global.c */
......@@ -1353,94 +1343,94 @@ extern "C" {
str_list_t exit_func;
struct js_onexit_scope *onexit;
} global_private_t;
DLLEXPORT BOOL DLLCALL js_argc(JSContext *cx, unsigned argc, unsigned min);
DLLEXPORT BOOL DLLCALL js_CreateGlobalObject(JSContext* cx, scfg_t* cfg, jsSyncMethodSpec* methods, js_startup_t*, JSObject**);
DLLEXPORT BOOL js_argc(JSContext *cx, unsigned argc, unsigned min);
DLLEXPORT BOOL js_CreateGlobalObject(JSContext* cx, scfg_t* cfg, jsSyncMethodSpec* methods, js_startup_t*, JSObject**);
/* js_internal.c */
DLLEXPORT JSObject* DLLCALL js_CreateInternalJsObject(JSContext*, JSObject* parent, js_callback_t*, js_startup_t*);
DLLEXPORT JSBool DLLCALL js_CommonOperationCallback(JSContext*, js_callback_t*);
DLLEXPORT void DLLCALL js_EvalOnExit(JSContext*, JSObject*, js_callback_t*);
DLLEXPORT void DLLCALL js_PrepareToExecute(JSContext*, JSObject*, const char *filename, const char* startup_dir, JSObject *);
DLLEXPORT char* DLLCALL js_getstring(JSContext *cx, JSString *str);
DLLEXPORT JSObject* js_CreateInternalJsObject(JSContext*, JSObject* parent, js_callback_t*, js_startup_t*);
DLLEXPORT JSBool js_CommonOperationCallback(JSContext*, js_callback_t*);
DLLEXPORT void js_EvalOnExit(JSContext*, JSObject*, js_callback_t*);
DLLEXPORT void js_PrepareToExecute(JSContext*, JSObject*, const char *filename, const char* startup_dir, JSObject *);
DLLEXPORT char* js_getstring(JSContext *cx, JSString *str);
DLLEXPORT JSBool js_handle_events(JSContext *cx, js_callback_t *cb, volatile int *terminated);
DLLEXPORT JSBool js_clear_event(JSContext *cx, jsval *arglist, js_callback_t *cb, enum js_event_type et, int ididx);
/* js_system.c */
DLLEXPORT JSObject* DLLCALL js_CreateSystemObject(JSContext* cx, JSObject* parent
DLLEXPORT JSObject* js_CreateSystemObject(JSContext* cx, JSObject* parent
,scfg_t* cfg, time_t uptime
,char* host_name
,char* socklib_desc);
/* js_client.c */
#ifdef USE_CRYPTLIB
DLLEXPORT JSObject* DLLCALL js_CreateClientObject(JSContext* cx, JSObject* parent
DLLEXPORT JSObject* js_CreateClientObject(JSContext* cx, JSObject* parent
,const char* name, client_t* client, SOCKET sock, CRYPT_CONTEXT session);
#endif
/* js_user.c */
DLLEXPORT JSObject* DLLCALL js_CreateUserClass(JSContext* cx, JSObject* parent, scfg_t* cfg);
DLLEXPORT JSObject* DLLCALL js_CreateUserObject(JSContext* cx, JSObject* parent, scfg_t* cfg
DLLEXPORT JSObject* js_CreateUserClass(JSContext* cx, JSObject* parent, scfg_t* cfg);
DLLEXPORT JSObject* js_CreateUserObject(JSContext* cx, JSObject* parent, scfg_t* cfg
,char* name, user_t* user, client_t* client, BOOL global_user);
DLLEXPORT JSBool DLLCALL js_CreateUserObjects(JSContext* cx, JSObject* parent, scfg_t* cfg
DLLEXPORT JSBool js_CreateUserObjects(JSContext* cx, JSObject* parent, scfg_t* cfg
,user_t* user, client_t* client, char* html_index_file
,subscan_t* subscan);
/* js_file_area.c */
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);
/* js_msg_area.c */
DLLEXPORT JSObject* DLLCALL js_CreateMsgAreaObject(JSContext* cx, JSObject* parent, scfg_t* cfg
DLLEXPORT JSObject* js_CreateMsgAreaObject(JSContext* cx, JSObject* parent, scfg_t* cfg
,user_t* user, client_t* client, subscan_t* subscan);
DLLEXPORT BOOL DLLCALL js_CreateMsgAreaProperties(JSContext* cx, scfg_t* cfg
DLLEXPORT BOOL js_CreateMsgAreaProperties(JSContext* cx, scfg_t* cfg
,JSObject* subobj, uint subnum);
/* js_xtrn_area.c */
DLLEXPORT JSObject* DLLCALL js_CreateXtrnAreaObject(JSContext* cx, JSObject* parent, scfg_t* cfg
DLLEXPORT JSObject* js_CreateXtrnAreaObject(JSContext* cx, JSObject* parent, scfg_t* cfg
,user_t* user, client_t* client);
/* js_msgbase.c */
DLLEXPORT JSObject* DLLCALL js_CreateMsgBaseClass(JSContext* cx, JSObject* parent, scfg_t* cfg);
DLLEXPORT BOOL DLLCALL js_ParseMsgHeaderObject(JSContext* cx, JSObject* hdrobj, smbmsg_t*);
DLLEXPORT BOOL DLLCALL js_GetMsgHeaderObjectPrivates(JSContext* cx, JSObject* hdrobj, smb_t**, smbmsg_t**, post_t**);
DLLEXPORT JSObject* js_CreateMsgBaseClass(JSContext* cx, JSObject* parent, scfg_t* cfg);
DLLEXPORT BOOL js_ParseMsgHeaderObject(JSContext* cx, JSObject* hdrobj, smbmsg_t*);
DLLEXPORT BOOL js_GetMsgHeaderObjectPrivates(JSContext* cx, JSObject* hdrobj, smb_t**, smbmsg_t**, post_t**);
/* js_filebase.c */
DLLEXPORT JSObject* DLLCALL js_CreateFileBaseClass(JSContext*, JSObject* parent, scfg_t*);
DLLEXPORT JSObject* js_CreateFileBaseClass(JSContext*, JSObject* parent, scfg_t*);
/* js_socket.c */
DLLEXPORT JSObject* DLLCALL js_CreateSocketClass(JSContext* cx, JSObject* parent);
DLLEXPORT JSObject* js_CreateSocketClass(JSContext* cx, JSObject* parent);
#ifdef USE_CRYPTLIB
DLLEXPORT JSObject* DLLCALL js_CreateSocketObject(JSContext* cx, JSObject* parent
DLLEXPORT JSObject* js_CreateSocketObject(JSContext* cx, JSObject* parent
,char *name, SOCKET sock, CRYPT_CONTEXT session);
#endif
DLLEXPORT JSObject* DLLCALL js_CreateSocketObjectFromSet(JSContext* cx, JSObject* parent
DLLEXPORT JSObject* js_CreateSocketObjectFromSet(JSContext* cx, JSObject* parent
,char *name, struct xpms_set *set);
DLLEXPORT SOCKET DLLCALL js_socket(JSContext *cx, jsval val);
DLLEXPORT SOCKET js_socket(JSContext *cx, jsval val);
DLLEXPORT int js_polltimeout(JSContext* cx, jsval val);
#ifdef PREFER_POLL
DLLEXPORT size_t js_socket_numsocks(JSContext *cx, jsval val);
DLLEXPORT size_t js_socket_add(JSContext *cx, jsval val, struct pollfd *fds, short events);
#else
DLLEXPORT void DLLCALL js_timeval(JSContext* cx, jsval val, struct timeval* tv);
DLLEXPORT SOCKET DLLCALL js_socket_add(JSContext *cx, jsval val, fd_set *fds);
DLLEXPORT BOOL DLLCALL js_socket_isset(JSContext *cx, jsval val, fd_set *fds);
DLLEXPORT void js_timeval(JSContext* cx, jsval val, struct timeval* tv);
DLLEXPORT SOCKET js_socket_add(JSContext *cx, jsval val, fd_set *fds);
DLLEXPORT BOOL js_socket_isset(JSContext *cx, jsval val, fd_set *fds);
#endif
/* js_queue.c */
DLLEXPORT JSObject* DLLCALL js_CreateQueueClass(JSContext* cx, JSObject* parent);
DLLEXPORT JSObject* DLLCALL js_CreateQueueObject(JSContext* cx, JSObject* parent
DLLEXPORT JSObject* js_CreateQueueClass(JSContext* cx, JSObject* parent);
DLLEXPORT JSObject* js_CreateQueueObject(JSContext* cx, JSObject* parent
,char *name, msg_queue_t* q);
BOOL js_enqueue_value(JSContext *cx, msg_queue_t* q, jsval val, char* name);
/* js_file.c */
DLLEXPORT JSObject* DLLCALL js_CreateFileClass(JSContext* cx, JSObject* parent);
DLLEXPORT JSObject* DLLCALL js_CreateFileObject(JSContext* cx, JSObject* parent, char *name, int fd, const char* mode);
DLLEXPORT JSObject* js_CreateFileClass(JSContext* cx, JSObject* parent);
DLLEXPORT JSObject* js_CreateFileObject(JSContext* cx, JSObject* parent, char *name, int fd, const char* mode);
/* js_archive.c */
DLLEXPORT JSObject* DLLCALL js_CreateArchiveClass(JSContext* cx, JSObject* parent);
DLLEXPORT JSObject* js_CreateArchiveClass(JSContext* cx, JSObject* parent);
/* js_sprintf.c */
DLLEXPORT char* DLLCALL js_sprintf(JSContext* cx, uint argn, unsigned argc, jsval *argv);
DLLEXPORT void DLLCALL js_sprintf_free(char *);
DLLEXPORT char* js_sprintf(JSContext* cx, uint argn, unsigned argc, jsval *argv);
DLLEXPORT void js_sprintf_free(char *);
/* js_console.cpp */
JSObject* js_CreateConsoleObject(JSContext* cx, JSObject* parent);
......@@ -1457,17 +1447,17 @@ extern "C" {
JSObject* js_CreateConioObject(JSContext* cx, JSObject* parent);
/* js_com.c */
DLLEXPORT JSObject* DLLCALL js_CreateCOMClass(JSContext* cx, JSObject* parent);
DLLEXPORT JSObject* DLLCALL js_CreateCOMObject(JSContext* cx, JSObject* parent, const char *name, COM_HANDLE sock);
DLLEXPORT JSObject* js_CreateCOMClass(JSContext* cx, JSObject* parent);
DLLEXPORT JSObject* js_CreateCOMObject(JSContext* cx, JSObject* parent, const char *name, COM_HANDLE sock);
/* js_cryptcon.c */
DLLEXPORT JSObject* DLLCALL js_CreateCryptContextClass(JSContext* cx, JSObject* parent);
DLLEXPORT JSObject* js_CreateCryptContextClass(JSContext* cx, JSObject* parent);
/* js_cryptkeyset.c */
DLLEXPORT JSObject* DLLCALL js_CreateCryptKeysetClass(JSContext* cx, JSObject* parent);
DLLEXPORT JSObject* js_CreateCryptKeysetClass(JSContext* cx, JSObject* parent);
/* js_cryptcert.c */
DLLEXPORT JSObject* DLLCALL js_CreateCryptCertClass(JSContext* cx, JSObject* parent);
DLLEXPORT JSObject* js_CreateCryptCertClass(JSContext* cx, JSObject* parent);
#endif
......
......@@ -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)
/****************************************************************************/
<