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.40 2000/08/17 16:54:19 lange Exp $ + // $Id: global_variables.pike,v 1.41 2000/09/08 23:00:48 nilsson 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>
Roxen.git/server/base_server/global_variables.pike:205:    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 );    }   };    + class LanguageList { +  inherit Variable.MultipleChoice; +  +  static string _title( string lang ) { +  return roxenp()->language(roxenp()->locale->get(), "language")(lang); +  } + } +    void define_global_variables( )   {    int p;       defvar("port_options", PortOptions());       defvar("RestoreConnLogFull", 0,    LOCALE(90, "Logging: Log entire file length in restored connections"),    TYPE_FLAG,    LOCALE(91, "If this toggle is enabled log entries for restored connections "
Roxen.git/server/base_server/global_variables.pike:493: Inside #if undefined(__NT__)
   TYPE_INT_LIST|VAR_MORE,    LOCALE(157, "If the server is unable to accept connection for this many "    "minutes, it will be restarted. You need to find a balance: "    "if set too low, the server will be restarted even if it's doing "    "legal things (like generating many images), if set too high you might "    "get a long downtime if the server for some reason locks up."),    ({1,2,3,4,5,10,15}),    lambda() {return !QUERY(abs_engage);});   #endif    -  -  defvar("locale", "standard", LOCALE(158, "Default language"), -  TYPE_STRING_LIST, -  LOCALE(159, "Locale, used to localize all messages in Roxen.\n" -  "Standard means using the default locale, which varies " -  "according to the value of the 'LANG' environment variable."), +  object languagelist = +  LanguageList("eng",   #if constant(Locale.list_languages) - #define LANGLIST Locale.list_languages("roxen_config") +  Locale.list_languages("roxen_config"),   #else - #define LANGLIST RoxenLocale.list_languages("roxen_config") +  RoxenLocale.list_languages("roxen_config"),   #endif -  mkmapping(LANGLIST, map(LANGLIST, - #if constant(Standards.ISO639_2) -  Standards.ISO639_2.get_language, - #else -  RoxenLocale.ISO639_2.get_language, - #endif -  )) + (["standard":"Standard"]) - #undef LANGLIST -  ); +  0, LOCALE(158, "Default language"), +  LOCALE(159, "Locale, used to localize all messages in Roxen.\n" +  "Standard means using the default locale, which varies " +  "according to the value of the 'LANG' environment variable."));    -  +  languagelist->set_changed_callback( lambda(Variable.Variable s) { +  roxenp()->default_locale=roxenp()->verify_locale(QUERY(locale)); +  } );    -  +  defvar("locale", languagelist); +     defvar("suicide_engage", 0,    LOCALE(160, "Auto Restart: Enable Automatic Restart"),    TYPE_FLAG|VAR_MORE,    LOCALE(161, "If set, Roxen will automatically restart after a "    "configurable number of days. Since Roxen uses a monolith, "    "non-forking server model the process tends to grow in size "    "over time. This is mainly due to heap fragmentation but also "    "because of memory leaks.")    );