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

Indicate compile date/time, compiler used, and debug-compile in banner message.

Display thread stack limit (if not unlimited).
parent 819f3bb5
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,7 @@ FILE* errfp;
FILE* nulfp;
FILE* statfp;
char revision[16];
char compiler[32];
char* host_name=NULL;
char host_name_buf[128];
BOOL pause_on_exit=FALSE;
......@@ -75,12 +76,20 @@ BOOL daemonize=FALSE;
void banner(FILE* fp)
{
fprintf(fp,"\nJSexec v%s%c-%s (rev %s) - "
fprintf(fp,"\nJSexec v%s%c-%s (rev %s)%s - "
"Execute Synchronet JavaScript Module\n"
,VERSION,REVISION
,PLATFORM_DESC
,revision
#ifdef _DEBUG
," Debug"
#else
,""
#endif
);
fprintf(fp, "Compiled %s %s with %s\n"
,__DATE__, __TIME__, compiler);
}
void usage(FILE* fp)
......@@ -564,6 +573,10 @@ static BOOL js_init(char** environ)
if((js_cx = JS_NewContext(js_runtime, js_cx_stack))==NULL)
return(FALSE);
if(stack_limit)
fprintf(statfp,"JavaScript: Thread stack limit: %lu bytes\n"
,stack_limit);
JS_SetErrorReporter(js_cx, js_ErrorReporter);
/* Global Object */
......@@ -596,7 +609,6 @@ long js_exec(const char *fname, char** args)
uint line_no;
char path[MAX_PATH+1];
char line[1024];
char compiler[32];
char rev_detail[256];
size_t len;
char* js_buf=NULL;
......@@ -657,8 +669,6 @@ long js_exec(const char *fname, char** args)
,STRING_TO_JSVAL(JS_NewStringCopyZ(js_cx,revision))
,NULL,NULL,JSPROP_READONLY|JSPROP_ENUMERATE);
DESCRIBE_COMPILER(compiler);
sprintf(rev_detail,"JSexec %s%s "
"Compiled %s %s with %s"
,revision
......@@ -780,6 +790,7 @@ int main(int argc, char **argv, char** environ)
branch.auto_terminate=TRUE;
sscanf("$Revision$", "%*s %s", revision);
DESCRIBE_COMPILER(compiler);
memset(&scfg,0,sizeof(scfg));
scfg.size=sizeof(scfg);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment