From 77e8402dd68079c0e245fc8826daf2c6ad334766 Mon Sep 17 00:00:00 2001 From: Derrell Lipman Date: Tue, 26 Sep 2006 16:58:27 +0000 Subject: r18925: Add current snapshot of the ejs-2.0 code. Tridge, will you be incorporating this? (This used to be commit 917af234a8d517f82bd42256a940608a16b988f4) --- .../lib/appweb/ejs-2.0/ejs/system/ejsSystemDebug.c | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 source4/lib/appweb/ejs-2.0/ejs/system/ejsSystemDebug.c (limited to 'source4/lib/appweb/ejs-2.0/ejs/system/ejsSystemDebug.c') diff --git a/source4/lib/appweb/ejs-2.0/ejs/system/ejsSystemDebug.c b/source4/lib/appweb/ejs-2.0/ejs/system/ejsSystemDebug.c new file mode 100644 index 0000000000..5a011e2a2d --- /dev/null +++ b/source4/lib/appweb/ejs-2.0/ejs/system/ejsSystemDebug.c @@ -0,0 +1,60 @@ +/* + * @file ejsSystemDebug.c + * @brief System.Debug class + */ +/********************************** Copyright *********************************/ +/* + * Copyright (c) Mbedthis Software LLC, 2005-2006. All Rights Reserved. + */ +/********************************** Includes **********************************/ + +#include "ejs.h" + +/******************************************************************************/ +/************************************ Methods *********************************/ +/******************************************************************************/ +/* + * function bool isDebugMode() + * MOB -- convert to accessor + */ + +static int isDebugMode(Ejs *ejs, EjsVar *thisObj, int argc, EjsVar **argv) +{ + ejsTrace(ejs, "isDebugMode()\n"); + ejsSetReturnValueToInteger(ejs, mprGetDebugMode(ejs)); + return 0; +} + +/******************************************************************************/ +/******************************** Initialization ******************************/ +/******************************************************************************/ + +int ejsDefineDebugClass(Ejs *ejs) +{ + EjsVar *systemDebugClass; + + systemDebugClass = ejsDefineClass(ejs, "System.Debug", "Object", 0); + if (systemDebugClass == 0) { + return MPR_ERR_CANT_INITIALIZE; + } + + /* + * Define the class methods + */ + ejsDefineCMethod(ejs, systemDebugClass, "isDebugMode", isDebugMode, + EJS_NO_LOCAL); + + return ejsObjHasErrors(systemDebugClass) ? MPR_ERR_CANT_INITIALIZE : 0; +} + +/******************************************************************************/ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim:tw=78 + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ -- cgit