Roxen.git
/
server
/
base_server
/
module.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/base_server/module.pike:1:
-
/* $Id: module.pike,v 1.
34
1998/
07
/
24
05
:
44
:
43
mast
Exp $ */
+
/* $Id: module.pike,v 1.
35
1998/
10
/
12
22
:
13
:
10
per
Exp $ */
#include <module.h> #define TRACE_ENTER(A,B) do{if(id->misc->trace_enter)id->misc->trace_enter((A),(B));}while(0) #define TRACE_LEAVE(A) do{if(id->misc->trace_leave)id->misc->trace_leave((A));}while(0) mapping (string:mixed *) variables=([]); object this = this_object(); int module_type;
Roxen.git/server/base_server/module.pike:245:
case TYPE_FONT: // FIXME: Add checks for these. break; default: report_error(sprintf("%s:\nIllegal type (%s) in defvar.\n", roxen->filename(this), type)); break; }
+
+
// Locale stuff!
+
// Här blir vi farliga...
+
Locale.Roxen.standard
+
->register_module_doc( this_object(), var, name, doc_str );
+
+
variables[var]=allocate( VAR_SIZE ); if(!variables[var]) error("Out of memory in defvar.\n"); variables[var][ VAR_VALUE ]=value; variables[var][ VAR_TYPE ]=type&VAR_TYPE_MASK; variables[var][ VAR_DOC_STR ]=doc_str; variables[var][ VAR_NAME ]=name; type &= ~VAR_TYPE_MASK; // Probably not needed, but... type &= (VAR_EXPERT | VAR_MORE);
Roxen.git/server/base_server/module.pike:271:
} else if (type) { variables[var][ VAR_CONFIGURABLE ] = type; } else if(intp(not_in_config)) { variables[var][ VAR_CONFIGURABLE ] = !not_in_config; } variables[var][ VAR_MISC ]=misc; variables[var][ VAR_SHORTNAME ]= var; }
+
void deflocaledoc( string locale, string variable,
+
string name, string doc )
+
{
+
// Locale stuff!
+
// Här blir vi farliga...
+
if(!Locale.Roxen[locale])
+
report_debug("Invalid locale: "+locale+". Ignoring.\n");
+
else
+
Locale.Roxen[locale]
+
->register_module_doc( this_object(), variable, name, doc );
+
}
// Convenience function, define an invissible variable, this variable // will be saved, but it won't be vissible in the configuration interface. void definvisvar(string name, int value, int type, array|void misc) { defvar(name, value, "", type, "", misc, 1); } string check_variable( string s, mixed value ) {