Branch: Tag:

1998-10-12

1998-10-12 22:13:15 by Per Hedbor <ph@opera.com>

Added locale support for module variables

Rev: server/base_server/config/builders.pike:1.16
Rev: server/base_server/config/describers.pike:1.57
Rev: server/base_server/config/low_describers.pike:1.26
Rev: server/base_server/configuration.pike:1.161
Rev: server/base_server/mainconfig.pike:1.110
Rev: server/base_server/module.pike:1.35
Rev: server/base_server/module_support.pike:1.17

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>   
252:    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");
278:    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.