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

Commit 280a53cd authored by rswindell's avatar rswindell

Only include JSDOC code and static data if BUILD_JSDOCS is defined

(rather than _DEBUG) - improving performance and memory usage in the 99% of
debug builds that don't need the JSDOC stuff.
parent b07d7375
......@@ -138,7 +138,7 @@ enum {
,BBS_PROP_COMMAND_STR
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* bbs_prop_desc[] = {
"system status bitfield (see <tt>SS_*</tt> in <tt>sbbsdefs.js</tt> for bit definitions)"
,"startup options bitfield (see <tt>BBS_OPT_*</tt> in <tt>sbbsdefs.js</tt> for bit definitions)"
......@@ -2859,7 +2859,7 @@ JSObject* js_CreateBbsObject(JSContext* cx, JSObject* parent)
if((mods=JS_DefineObject(cx, obj, "mods", NULL, NULL ,JSPROP_ENUMERATE))==NULL)
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,mods,"Global repository for 3rd party modifications",312);
js_DescribeSyncObject(cx,obj,"Controls the Telnet/RLogin BBS experience",310);
js_CreateArrayOfStrings(cx, obj, "_property_desc_list", bbs_prop_desc, JSPROP_READONLY);
......
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -49,7 +49,7 @@ enum {
,CLIENT_PROP_USER /* user name */
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* client_prop_desc[] = {
"client's IP address (in dotted-decimal format)"
,"client's host name (up to 64 characters)"
......@@ -157,7 +157,7 @@ JSObject* DLLCALL js_CreateClientObject(JSContext* cx, JSObject* parent
js_CreateSocketObject(cx, obj, "socket", sock);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,obj,"Represents a TCP/IP client session",310);
js_CreateArrayOfStrings(cx, obj, "_property_desc_list", client_prop_desc, JSPROP_READONLY);
#endif
......
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -271,7 +271,7 @@ static jsSyncPropertySpec js_console_properties[] = {
{0}
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* con_prop_desc[] = {
"status bitfield (see <tt>CON_*</tt> in <tt>sbbsdefs.js</tt> for bit definitions)"
,"current line counter (used for automatic screen pause)"
......@@ -1355,7 +1355,7 @@ JSObject* js_CreateConsoleObject(JSContext* cx, JSObject* parent)
return(NULL);
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,obj,"Controls the user's Telnet/RLogin terminal",310);
js_CreateArrayOfStrings(cx, obj, "_property_desc_list", con_prop_desc, JSPROP_READONLY);
#endif
......
......@@ -1569,7 +1569,7 @@ static jsSyncPropertySpec js_file_properties[] = {
{0}
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* file_prop_desc[] = {
"filename specified in constructor - <small>READ ONLY</small>"
,"mode string specified in <i>open</i> call - <small>READ ONLY</small>"
......@@ -1811,7 +1811,7 @@ js_file_constructor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval
return(JS_FALSE);
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,obj,"Class used for opening, creating, reading, or writing files on the local file system<p>"
"Special features include:</h2><ol type=disc>"
"<li>Exclusive-access files (default) or shared files<ol type=circle>"
......
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -39,7 +39,7 @@
#ifdef JAVASCRIPT
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* lib_prop_desc[] = {
"index into lib_list array (or -1 if not in array) <i>(introduced in v3.12)</i>"
......@@ -143,7 +143,7 @@ JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_
if(html_index_file==NULL)
html_index_file="";
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,areaobj,"File Transfer Areas",310);
#endif
......@@ -209,7 +209,7 @@ JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_
if(!JS_SetProperty(cx, libobj, "link", &val))
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,libobj,"File Transfer Libraries (current user has access to)",310);
#endif
......@@ -408,23 +408,23 @@ JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_
if(!JS_SetProperty(cx, dirobj, "is_operator", &val))
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_CreateArrayOfStrings(cx, dirobj, "_property_desc_list", dir_prop_desc, JSPROP_READONLY);
js_DescribeSyncObject(cx,dirobj,"File Transfer Directories (current user has access to)",310);
#endif
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_CreateArrayOfStrings(cx, libobj, "_property_desc_list", lib_prop_desc, JSPROP_READONLY);
#endif
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,alllibs,"Associative array of all libraries (use name as index)",312);
JS_DefineProperty(cx,alllibs,"_dont_document",JSVAL_TRUE,NULL,NULL,JSPROP_READONLY);
#endif
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,alldirs,"Associative array of all directories (use internal code as index)",311);
JS_DefineProperty(cx,alldirs,"_dont_document",JSVAL_TRUE,NULL,NULL,JSPROP_READONLY);
#endif
......
......@@ -2930,7 +2930,7 @@ JSObject* DLLCALL js_CreateGlobalObject(JSContext* cx, scfg_t* cfg, jsSyncMethod
if(!JS_SetPrivate(cx, glob, cfg)) /* Store a pointer to scfg_t */
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,glob
,"Top-level functions and properties (common to all servers and services)",310);
#endif
......
......@@ -184,7 +184,7 @@ static jsSyncPropertySpec js_properties[] = {
{0}
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* prop_desc[] = {
"JavaScript engine version information (AKA system.js_version)"
,"set to <i>false</i> to disable the automatic termination of the script upon external request"
......@@ -431,7 +431,7 @@ JSObject* DLLCALL js_CreateInternalJsObject(JSContext* cx, JSObject* parent, js_
if(!js_DefineSyncMethods(cx, obj, js_functions, /* append? */ FALSE))
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,obj,"JavaScript execution and garbage collection control object",311);
js_CreateArrayOfStrings(cx, obj, "_property_desc_list", prop_desc, JSPROP_READONLY);
#endif
......
......@@ -43,7 +43,7 @@ enum { /* msg_area Object Properties */
PROP_MAX_QWK_MSGS
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* msg_grp_prop_desc[] = {
"index into grp_list array (or -1 if not in array) <i>(introduced in v3.12)</i>"
......@@ -231,7 +231,7 @@ BOOL DLLCALL js_CreateMsgAreaProperties(JSContext* cx, scfg_t* cfg, JSObject* su
,NULL,NULL,JSPROP_ENUMERATE|JSPROP_READONLY))
return(FALSE);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_CreateArrayOfStrings(cx, subobj, "_property_desc_list", msg_area_prop_desc, JSPROP_READONLY);
#endif
......@@ -349,7 +349,7 @@ JSObject* DLLCALL js_CreateMsgAreaObject(JSContext* cx, JSObject* parent, scfg_t
if(areaobj==NULL)
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,areaobj,"Message Areas",310);
#endif
......@@ -424,7 +424,7 @@ JSObject* DLLCALL js_CreateMsgAreaObject(JSContext* cx, JSObject* parent, scfg_t
,NULL,NULL,JSPROP_ENUMERATE|JSPROP_READONLY))
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,grpobj,"Message Groups (current user has access to)",310);
#endif
......@@ -514,7 +514,7 @@ JSObject* DLLCALL js_CreateMsgAreaObject(JSContext* cx, JSObject* parent, scfg_t
if(!JS_DefineProperties(cx, subobj, js_sub_properties))
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,subobj,"Message Sub-boards (current user has access to)</h2>"
"(all properties are <small>READ ONLY</small> except for "
"<i>scan_ptr</i>, <i>scan_cfg</i>, and <i>last_read</i>)"
......@@ -523,17 +523,17 @@ JSObject* DLLCALL js_CreateMsgAreaObject(JSContext* cx, JSObject* parent, scfg_t
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_CreateArrayOfStrings(cx, grpobj, "_property_desc_list", msg_grp_prop_desc, JSPROP_READONLY);
#endif
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,allgrps,"Associative array of all groups (use name as index)",312);
JS_DefineProperty(cx,allgrps,"_dont_document",JSVAL_TRUE,NULL,NULL,JSPROP_READONLY);
#endif
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,allsubs,"Associative array of all sub-boards (use internal code as index)",311);
JS_DefineProperty(cx,allsubs,"_dont_document",JSVAL_TRUE,NULL,NULL,JSPROP_READONLY);
#endif
......
......@@ -1638,7 +1638,7 @@ static jsSyncPropertySpec js_msgbase_properties[] = {
{0}
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* msgbase_prop_desc[] = {
"last occurred message base error - <small>READ ONLY</small>"
......@@ -1821,7 +1821,7 @@ js_msgbase_constructor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, js
return(JS_FALSE);
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,obj,"Class used for accessing message bases",310);
js_DescribeSyncConstructor(cx,obj,"To create a new MsgBase object: "
"<tt>var msgbase = new MsgBase('<i>code</i>')</tt><br>"
......@@ -1842,7 +1842,7 @@ js_msgbase_constructor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, js
JS_DefineProperty(cx,cfgobj,"index",JSVAL_VOID
,NULL,NULL,JSPROP_ENUMERATE|JSPROP_READONLY);
js_CreateMsgAreaProperties(cx, scfg, cfgobj, p->smb.subnum);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,cfgobj
,"Configuration parameters for this message area (<i>sub-boards only</i>) "
"- <small>READ ONLY</small>"
......
......@@ -322,7 +322,7 @@ enum {
,QUEUE_PROP_WRITE_LEVEL
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* queue_prop_desc[] = {
"name of the queue (if it has one)"
,"<i>true</i> if data is waiting to be read from queue"
......@@ -470,7 +470,7 @@ js_queue_constructor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsva
return(JS_FALSE);
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,obj,"Class for bi-directional message queues. "
"Used for inter-thread/module communications.", 312);
js_DescribeSyncConstructor(cx,obj,"To create a new (named) Queue object: "
......
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -122,7 +122,7 @@ static jsSyncPropertySpec js_server_properties[] = {
{0}
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* server_prop_desc[] = {
"server name and version number"
......@@ -163,7 +163,7 @@ JSObject* DLLCALL js_CreateServerObject(JSContext* cx, JSObject* parent
if(!js_DefineSyncProperties(cx, obj, js_server_properties))
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,obj,"Server-specifc properties",310);
js_CreateArrayOfStrings(cx,obj,"_property_desc_list", server_prop_desc, JSPROP_READONLY);
#endif
......
......@@ -1013,7 +1013,7 @@ enum {
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* socket_prop_desc[] = {
"error status for the last socket operation that failed - <small>READ ONLY</small>"
,"<i>true</i> if socket is in a connected state - <small>READ ONLY</small>"
......@@ -1376,7 +1376,7 @@ js_socket_constructor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsv
return(JS_FALSE);
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,obj,"Class used for TCP/IP socket communications",310);
js_DescribeSyncConstructor(cx,obj,"To create a new Socket object: "
"<tt>load('sockdefs.js'); var s = new Socket(<i>type</i>)</tt><br>"
......
......@@ -407,7 +407,7 @@ static jsSyncPropertySpec js_system_properties[] = {
{0}
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* sys_prop_desc[] = {
"BBS name"
,"operator name"
......@@ -640,7 +640,7 @@ static jsSyncPropertySpec js_sysstats_properties[] = {
{0}
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* sysstat_prop_desc[] = {
"total logons"
,"logons today"
......@@ -1436,7 +1436,7 @@ enum {
,NODE_PROP_EXTAUX
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* node_prop_desc[] = {
"status (see <tt>nodedefs.js</tt> for valid values)"
,"error counter"
......@@ -1624,7 +1624,7 @@ JSObject* DLLCALL js_CreateSystemObject(JSContext* cx, JSObject* parent
if (!js_DefineSyncMethods(cx, sysobj, js_system_functions, FALSE))
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,sysobj,"Global system-related properties and methods",310);
js_CreateArrayOfStrings(cx, sysobj, "_property_desc_list", sys_prop_desc, JSPROP_READONLY);
#endif
......@@ -1759,7 +1759,7 @@ JSObject* DLLCALL js_CreateSystemObject(JSContext* cx, JSObject* parent
if(!js_DefineSyncProperties(cx, statsobj, js_sysstats_properties))
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,statsobj,"System statistics",310);
js_CreateArrayOfStrings(cx, statsobj, "_property_desc_list", sysstat_prop_desc, JSPROP_READONLY);
#endif
......@@ -1788,7 +1788,7 @@ JSObject* DLLCALL js_CreateSystemObject(JSContext* cx, JSObject* parent
if(!js_DefineSyncProperties(cx, nodeobj, js_node_properties))
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
if(i==0) {
js_DescribeSyncObject(cx,nodeobj,"BBS node listing",310);
js_CreateArrayOfStrings(cx, nodeobj, "_property_desc_list", node_prop_desc, JSPROP_READONLY);
......
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -597,7 +597,7 @@ static jsSyncPropertySpec js_user_properties[] = {
{0}
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* user_prop_desc[] = {
"record number (1-based)"
......@@ -659,7 +659,7 @@ static jsSyncPropertySpec js_user_security_properties[] = {
{0}
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* user_security_prop_desc[] = {
"password"
......@@ -698,7 +698,7 @@ static jsSyncPropertySpec js_user_limits_properties[] = {
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* user_limits_prop_desc[] = {
"time (in minutes) per logon"
......@@ -742,7 +742,7 @@ static jsSyncPropertySpec js_user_stats_properties[] = {
{0}
};
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* user_stats_prop_desc[] = {
"date of previous logon"
......@@ -988,7 +988,7 @@ JSObject* DLLCALL js_CreateUserObject(JSContext* cx, JSObject* parent, scfg_t* c
return(NULL);
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,userobj
,"Instance of <i>User</i> class, representing current user online"
,310);
......@@ -1016,7 +1016,7 @@ JSObject* DLLCALL js_CreateUserObject(JSContext* cx, JSObject* parent, scfg_t* c
return(NULL);
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,statsobj,"User statistics (all <small>READ ONLY</small>)",310);
js_CreateArrayOfStrings(cx, statsobj, "_property_desc_list", user_stats_prop_desc, JSPROP_READONLY);
#endif
......@@ -1037,7 +1037,7 @@ JSObject* DLLCALL js_CreateUserObject(JSContext* cx, JSObject* parent, scfg_t* c
return(NULL);
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,limitsobj,"User limitations based on security level (all <small>READ ONLY</small>)",311);
js_CreateArrayOfStrings(cx, limitsobj, "_property_desc_list", user_limits_prop_desc, JSPROP_READONLY);
#endif
......@@ -1059,7 +1059,7 @@ JSObject* DLLCALL js_CreateUserObject(JSContext* cx, JSObject* parent, scfg_t* c
return(NULL);
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,securityobj,"User security settings",310);
js_CreateArrayOfStrings(cx, securityobj, "_property_desc_list", user_security_prop_desc, JSPROP_READONLY);
#endif
......
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -39,7 +39,7 @@
#ifdef JAVASCRIPT
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
static char* xtrn_sec_prop_desc[] = {
......@@ -172,7 +172,7 @@ BOOL DLLCALL js_CreateXtrnProgProperties(JSContext* cx, JSObject* obj, xtrn_t* x
,NULL,NULL,JSPROP_ENUMERATE|JSPROP_READONLY))
return(FALSE);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_CreateArrayOfStrings(cx, obj, "_property_desc_list", xtrn_prog_prop_desc, JSPROP_READONLY);
#endif
......@@ -210,7 +210,7 @@ JSObject* DLLCALL js_CreateXtrnAreaObject(JSContext* cx, JSObject* parent, scfg_
if(areaobj==NULL)
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,areaobj,"External Program Areas",310);
#endif
......@@ -293,7 +293,7 @@ JSObject* DLLCALL js_CreateXtrnAreaObject(JSContext* cx, JSObject* parent, scfg_
if(!JS_SetProperty(cx, secobj, "prog_list", &val))
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,secobj,"Online Program (door) Sections (current user has access to)",310);
#endif
......@@ -351,18 +351,18 @@ JSObject* DLLCALL js_CreateXtrnAreaObject(JSContext* cx, JSObject* parent, scfg_
if(!JS_SetProperty(cx, progobj, "can_run", &val))
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,progobj,"Online External Programs (doors) (current user has access to)",310);
#endif
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_CreateArrayOfStrings(cx, secobj, "_property_desc_list", xtrn_sec_prop_desc, JSPROP_READONLY);
#endif
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,allsec,"Associative array of all external program sections (use internal code as index)",312);
JS_DefineProperty(cx,allsec,"_dont_document",JSVAL_TRUE,NULL,NULL,JSPROP_READONLY);
......@@ -428,12 +428,12 @@ JSObject* DLLCALL js_CreateXtrnAreaObject(JSContext* cx, JSObject* parent, scfg_
,NULL,NULL,JSPROP_ENUMERATE|JSPROP_READONLY))
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_CreateArrayOfStrings(cx, eventobj, "_property_desc_list", event_prop_desc, JSPROP_READONLY);
#endif
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,event_array,"Associative array of all timed events (use internal code as index)",311);
JS_DefineProperty(cx,event_array,"_assoc_array",JSVAL_TRUE,NULL,NULL,JSPROP_READONLY);
#endif
......@@ -484,12 +484,12 @@ JSObject* DLLCALL js_CreateXtrnAreaObject(JSContext* cx, JSObject* parent, scfg_
,NULL,NULL,JSPROP_ENUMERATE|JSPROP_READONLY))
return(NULL);
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_CreateArrayOfStrings(cx, xeditobj, "_property_desc_list", xedit_prop_desc, JSPROP_READONLY);
#endif
}
#ifdef _DEBUG
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,xedit_array,"Associative array of all external editors (use internal code as index)",311);
JS_DefineProperty(cx,xedit_array,"_assoc_array",JSVAL_TRUE,NULL,NULL,JSPROP_READONLY);
#endif
......
......@@ -358,7 +358,7 @@ js_printf(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
for (i = 1; i < argc && i<sizeof(arglist)/sizeof(arglist[0]); i++) {
if(JSVAL_IS_DOUBLE(argv[i]))
arglist[i-1]=(char*)(unsigned long)*JSVAL_TO_DOUBLE(argv[i]);
arglist[i-1]=(char*)(unsigned long)-1;//*JSVAL_TO_DOUBLE(argv[i]);
else if(JSVAL_IS_INT(argv[i]))
arglist[i-1]=(char *)JSVAL_TO_INT(argv[i]);
else {
......
......@@ -346,17 +346,7 @@ DLLCALL js_DescribeSyncConstructor(JSContext* cx, JSObject* obj, const char* str
,STRING_TO_JSVAL(js_str),NULL,NULL,JSPROP_READONLY));
}
#ifdef _DEBUG
#if 0
static char* server_prop_desc[] = {
"server name and version number"
,"detailed version/build information"
,NULL
};
#endif
#ifdef BUILD_JSDOCS
static const char* method_array_name = "_method_list";
static const char* propver_array_name = "_property_ver_list";
......@@ -490,7 +480,7 @@ DLLCALL js_DefineSyncMethods(JSContext* cx, JSObject* obj, jsSyncMethodSpec *fun
return(JS_TRUE);
}
#else // NON-DEBUG
#else // NON-JSDOCS
JSBool
DLLCALL js_DefineSyncProperties(JSContext *cx, JSObject *obj, jsSyncPropertySpec* props)
......
......@@ -931,10 +931,10 @@ extern "C" {
,JSTYPE_UNDEF
};
#ifdef _DEBUG /* String compiled into debug build only, for JS documentation generation */
#ifdef BUILD_JSDOCS /* String compiled into debug build only, for JS documentation generation */
#define JSDOCSTR(s) s
#else
#define JSDOCSTR(s) ""
#define JSDOCSTR(s) NULL
#endif
/* main.cpp */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment