Roxen.git / server / base_server / global_variables.pike

version» Context lines:

Roxen.git/server/base_server/global_variables.pike:1:   // This file is part of Roxen Webserver.   // Copyright © 1996 - 2000, Roxen IS. - // $Id: global_variables.pike,v 1.30 2000/07/04 03:45:26 per Exp $ + // $Id: global_variables.pike,v 1.31 2000/07/09 14:11:42 per Exp $      /*   #pragma strict_types   */   #define DEFVAR string,int|string,string|mapping,int,string|mapping(string:string),void|array(string),void|function:void   #define BDEFVAR string,int|string,string|mapping,int,string|mapping(string:string),void|array(string),void|mapping(string:mapping(string:string)):void      #include <module.h>   #include <roxen.h>   #include <config.h>   inherit "read_config"; - inherit "module_support"; + inherit "basic_defvar";   #include <version.h>    -  + mixed save() + { +  store( "Variables", variables, 0, 0 ); + } +    // The following three functions are used to hide variables when they   // are not used. This makes the user-interface clearer and quite a lot   // less clobbered.      private int cache_disabled_p() { return !QUERY(cache); }   private int syslog_disabled() { return QUERY(LogA)!="syslog"; }   private int ident_disabled_p() { return [int(0..1)]QUERY(default_ident); }         // And why put these functions here, you might rightully ask.
Roxen.git/server/base_server/global_variables.pike:293:    constant type = "PortOptions";       int check_visibility(object id, int a, int b, int c, int d) { return 0; }    void set_from_form(object id ) { return; }    void create()    {    ::create( ([]), 0, 0, 0 );    }   };    - void define_global_variables( int argc, array (string) argv ) + void define_global_variables( )   {    int p;          defvar("port_options", PortOptions());       defvar("RestoreConnLogFull", 0,    "Logging: Log entire file length in restored connections",    TYPE_TOGGLE,    "If this toggle is enabled log entries for restored connections "
Roxen.git/server/base_server/global_variables.pike:1059:    "einer Garbage Collection im Speicher-Cache liegen? "    "Der Speicher-Cache enthält u.a. die Supports-Daten.");       defvar("config_file_comments", 0,    "Commented config files",    TYPE_FLAG, #"\   Save the variable documentation strings as comments in the   configuration files. Only useful if you read or edit the config files   directly.");    -  setvars(retrieve("Variables", 0)); +    }       -  + void restore_global_variables() + { +  setvars(retrieve("Variables", 0)); + } +    static mapping(string:mixed) __vars = ([ ]);      // These two should be documented somewhere. They are to be used to   // set global, but non-persistent, variables in Roxen.   mixed set_var(string var, mixed to)   {    return __vars[var] = to;   }      mixed query_var(string var)   {    return __vars[var];   }