Roxen.git / server / etc / modules / Variable.pmod / module.pmod

version» Context lines:

Roxen.git/server/etc/modules/Variable.pmod/module.pmod:1: - // $Id: module.pmod,v 1.22 2000/09/28 02:22:10 per Exp $ + // $Id: module.pmod,v 1.23 2000/09/28 03:33:57 mast Exp $      #include <module.h>   #include <roxen.h>      // Locale macros   static inline string getloclang() {    return roxenp()->locale->get();   }      //<locale-token project="roxen_config"> LOCALE </locale-token>    - #define LOCALE(X,Y) \ + #if constant(Locale.DeferredLocale) + #define LOCALE(X,Y) \    ([string](mixed)Locale.DeferredLocale("roxen_config",getloclang,X,Y)) -  + #else /* !Locale.DeferredLocale */ + #define LOCALE(X,Y) \ +  ([string](mixed)RoxenLocale.DeferredLocale("roxen_config",getloclang,X,Y)) + #endif /* Locale.DeferredLocale */      // Increased for each variable, used to index the mappings below.   static int unique_vid;      // The theory is that most variables (or at least a sizable percentage   // of all variables) does not have these members. Thus this saves   // quite a respectable amount of memory, the cost is speed. But   // hopefully not all that great a percentage of speed.   static mapping(int:mixed) changed_values = ([]);   static mapping(int:function(object:void)) changed_callbacks = ([]);
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:331:    mixed q = catch( b = verify_set_from_form( val ) );    if( q || sizeof( b ) != 2 )    {    if( q )    add_warning( q );    else    add_warning( "Internal error: Illegal sized array "    "from verify_set_from_form\n" );    return;    } -  if( q[0] ) set_warning( q[0] ); -  set( q[1] ); +  if( b ) { +  if ( b[0] ) set_warning( b[0] ); +  set( b[1] );    }    } -  +  }       string path()    //! A unique identifier for this variable.    //! Should be used to prefix form variable names.    //!    //! Unless this variable was created by defvar(), the path is set    //! by the configuration interface the first time the variable is    //! to be shown in a form. This function can thus return 0. If it    //! does, and you still have to show the form, call set_path( )    //! with a unique string.