/* Generated from "/Users/hww3/devel/pike/src/builtin.cmod" by precompile.pike running Pike v8.0 release 1019
 *
 * Do NOT edit this file.
 */

#undef PRECOMPILE_API_VERSION
#define PRECOMPILE_API_VERSION 6

#undef PRECOMPILE_SUB_PIKEVARS
#define PRECOMPILE_SUB_PIKEVARS 1

#undef PRECOMPILE_DYNAMIC_TYPES
#define PRECOMPILE_DYNAMIC_TYPES 1



#undef cmod___CMOD__
#define cmod___CMOD__ 1
#line 1 "/Users/hww3/devel/pike/src/builtin.cmod"
#line 1 "/Users/hww3/devel/pike/src/builtin.cmod"
#line 1 "/Users/hww3/devel/pike/src/builtin.cmod"
#line 3003 "/Users/hww3/devel/pike/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike"







#line 3010 "/Users/hww3/devel/pike/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike"
#line 1 "/Users/hww3/devel/pike/src/builtin.cmod"
#line 1 "/Users/hww3/devel/pike/src/builtin.cmod"
/* -*- mode: c; encoding: utf-8; -*-
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
*/

#include "global.h"
#include "interpret.h"
#include "svalue.h"
#include "pike_macros.h"
#include "object.h"
#include "program.h"
#include "array.h"
#include "pike_error.h"
#include "constants.h"
#include "mapping.h"
#include "stralloc.h"
#include "multiset.h"
#include "pike_types.h"
#include "pike_memory.h"
#include "threads.h"
#include "module_support.h"
#include "cyclic.h"
#include "bignum.h"
#include "main.h"
#include "operators.h"
#include "builtin_functions.h"
#include "fsort.h"
#include "port.h"
#include "gc.h"
#include "block_allocator.h"
#include "pikecode.h"
#include "opcodes.h"
#include "whitespace.h"

#include <ctype.h>
#include <errno.h>
#include <math.h>

#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif /* HAVE_ARPA_INET_H */

#define DEFAULT_CMOD_STORAGE

#ifdef STRUCT_TM_HAS___TM_GMTOFF
 struct tm_extra { };
#define tm_zone			__tm_zone
#define tm_gmtoff		__tm_gmtoff
#define GET_GMTOFF(TM)		((TM)->tm_gmtoff)
#define GET_ZONE(this)		((this)->t.tm_zone)
#define SET_GMTOFF(TM, VAL)	(((TM)->tm_gmtoff) = (VAL))
#define SET_ZONE(this, VAL)	((this)->t.tm_zone = (VAL))
#elif defined(STRUCT_TM_HAS_GMTOFF)
 struct tm_extra { };
#define GET_GMTOFF(TM)		((TM)->tm_gmtoff)
#define GET_ZONE(this)		((this)->t.tm_zone)
#define SET_GMTOFF(TM, VAL)	(((TM)->tm_gmtoff) = (VAL))
#define SET_ZONE(this, VAL)	((this)->t.tm_zone = (VAL))
#else
 struct tm_extra { const char *tm_zone; };
#define GET_GMTOFF(TM)		0
#define GET_ZONE(this)		((this)->extra.tm_zone)
#define SET_GMTOFF(TM, VAL)	(VAL)
#define SET_ZONE(this, VAL)	((this)->extra.tm_zone = (VAL))
#endif



#ifndef PIKE_UNUSED_ATTRIBUTE
#define PIKE_UNUSED_ATTRIBUTE
#endif
#define CMOD_MAP_PROGRAM_IDS_DEFINED 1
static int ___cmod_map_program_ids(int id) PIKE_UNUSED_ATTRIBUTE;
#ifndef TYPEOF
/* Compat with older Pikes. */
#define TYPEOF(SVAL)	((SVAL).type)
#define SUBTYPEOF(SVAL)	((SVAL).subtype)
#define SET_SVAL_TYPE(SVAL, TYPE)	(TYPEOF(SVAL) = TYPE)
#define SET_SVAL_SUBTYPE(SVAL, TYPE)	(SUBTYPEOF(SVAL) = TYPE)
#define SET_SVAL(SVAL, TYPE, SUBTYPE, FIELD, EXPR) do {	\
    /* Set the type afterwards to avoid a clobbered	\
     * svalue in case EXPR throws. */			\
    (SVAL).u.FIELD = (EXPR);				\
    SET_SVAL_TYPE((SVAL), (TYPE));			\
    SET_SVAL_SUBTYPE((SVAL), (SUBTYPE));		\
  } while(0)
#endif /* !TYPEOF */
#ifndef PIKE_UNUSED
/* Compat with Pike 7.8 and earlier. */
/* NB: Not strictly correct; PIKE_UNUSED was added the
 *     day after set_program_id_to_id(), but good enough.
 */
#ifndef UNUSED
#define UNUSED(X)	X
#endif
#ifndef set_program_id_to_id
/* NB: Recent Pike 7.8 has a #define that conflicts with
 *     the following declaration.
 */
static void set_program_id_to_id(void*UNUSED(id)){}
#endif
#else /* */
PMOD_EXPORT void set_program_id_to_id( int (*to)(int) );
#endif /* !PIKE_UNUSED */


#ifndef DEFAULT_CMOD_STORAGE
#define CMOD_COND_USED
#define DEFAULT_CMOD_STORAGE static
#endif
#define module_strings_declared
static struct pike_string *module_strings[1] = {
  NULL,
};
static struct { INT32 from;INT32 to; } ___cmod_ext_used[1];
#ifndef CMOD_COND_USED
# define f_List_cq__values_fun_num_used 1
#else
#define f_List_cq__values_fun_num_used 1
#endif
#ifndef CMOD_COND_USED
# define f_List_flush_fun_num_used 1
#else
#define f_List_flush_fun_num_used 1
#endif
#ifndef CMOD_COND_USED
# define f_List_append_fun_num_used 1
#else
#define f_List_append_fun_num_used 1
#endif
#ifndef CMOD_COND_USED
# define f_TM_unix_time_fun_num_used 1
#else
#undef f_TM_unix_time_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_strptime_fun_num_used 1
#else
#undef f_TM_strptime_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_strftime_fun_num_used 1
#else
#undef f_TM_strftime_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backticksec_fun_num_used 1
#else
#undef f_TM_cq__backticksec_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickmin_fun_num_used 1
#else
#undef f_TM_cq__backtickmin_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickhour_fun_num_used 1
#else
#undef f_TM_cq__backtickhour_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickmday_fun_num_used 1
#else
#undef f_TM_cq__backtickmday_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickmon_fun_num_used 1
#else
#undef f_TM_cq__backtickmon_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickyear_fun_num_used 1
#else
#undef f_TM_cq__backtickyear_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backticksec_eq_fun_num_used 1
#else
#undef f_TM_cq__backticksec_eq_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickmin_eq_fun_num_used 1
#else
#undef f_TM_cq__backtickmin_eq_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickmon_eq_fun_num_used 1
#else
#undef f_TM_cq__backtickmon_eq_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickisdst_fun_num_used 1
#else
#undef f_TM_cq__backtickisdst_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickwday_fun_num_used 1
#else
#undef f_TM_cq__backtickwday_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickyday_fun_num_used 1
#else
#undef f_TM_cq__backtickyday_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_asctime_fun_num_used 1
#else
#undef f_TM_asctime_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__sprintf_fun_num_used 1
#else
#undef f_TM_cq__sprintf_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cast_fun_num_used 1
#else
#undef f_TM_cast_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickzone_fun_num_used 1
#else
#undef f_TM_cq__backtickzone_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickgmtoff_fun_num_used 1
#else
#undef f_TM_cq__backtickgmtoff_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_localtime_fun_num_used 1
#else
#undef f_TM_localtime_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_gmtime_fun_num_used 1
#else
#undef f_TM_gmtime_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define TM_program_fun_num_used 1
#else
#undef TM_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_create_1_fun_num_used 1
#else
#undef f_TM_create_1_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_create_2_fun_num_used 1
#else
#undef f_TM_create_2_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_create_3_fun_num_used 1
#else
#undef f_TM_create_3_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define TM_f_TM_create_fun_num_used 1
#else
#undef TM_f_TM_create_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define FakeObject_program_fun_num_used 1
#else
#undef FakeObject_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_FakeObject_create_fun_num_used 1
#else
#undef f_FakeObject_create_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define backtrace_frame_program_fun_num_used 1
#else
#undef backtrace_frame_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Buffer_create_fun_num_used 1
#else
#undef f_Buffer_create_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Buffer_cq__sprintf_fun_num_used 1
#else
#undef f_Buffer_cq__sprintf_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Buffer_cast_fun_num_used 1
#else
#undef f_Buffer_cast_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Buffer_add_fun_num_used 1
#else
#undef f_Buffer_add_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Buffer_putchar_fun_num_used 1
#else
#undef f_Buffer_putchar_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Buffer_sprintf_fun_num_used 1
#else
#undef f_Buffer_sprintf_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Buffer_get_copy_fun_num_used 1
#else
#undef f_Buffer_get_copy_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Buffer_get_fun_num_used 1
#else
#undef f_Buffer_get_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Buffer_clear_fun_num_used 1
#else
#undef f_Buffer_clear_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Buffer_cq__sizeof_fun_num_used 1
#else
#undef f_Buffer_cq__sizeof_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Buffer_program_fun_num_used 1
#else
#undef Buffer_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_bootstring_decode_fun_num_used 1
#else
#undef f_bootstring_decode_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_bootstring_encode_fun_num_used 1
#else
#undef f_bootstring_encode_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_bootstring_create_fun_num_used 1
#else
#undef f_bootstring_create_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define bootstring_program_fun_num_used 1
#else
#undef bootstring_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Time_cq__backticksec_fun_num_used 1
#else
#undef f_Time_cq__backticksec_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Time_cq__backtickusec_fun_num_used 1
#else
#undef f_Time_cq__backtickusec_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Time_create_fun_num_used 1
#else
#undef f_Time_create_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Time_program_fun_num_used 1
#else
#undef Time_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Timer_peek_fun_num_used 1
#else
#undef f_Timer_peek_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Timer_get_fun_num_used 1
#else
#undef f_Timer_get_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Timer_create_fun_num_used 1
#else
#undef f_Timer_create_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define automap_marker_program_fun_num_used 1
#else
#undef automap_marker_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Timer_program_fun_num_used 1
#else
#undef Timer_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_automap_marker_create_fun_num_used 1
#else
#undef f_automap_marker_create_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Setter_cq__sprintf_fun_num_used 1
#else
#undef f_Setter_cq__sprintf_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Setter_program_fun_num_used 1
#else
#undef Setter_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Null_cq__backtick_21_fun_num_used 1
#else
#undef f_Null_cq__backtick_21_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Null_cq__sprintf_fun_num_used 1
#else
#undef f_Null_cq__sprintf_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Null_cq___hash_fun_num_used 1
#else
#undef f_Null_cq___hash_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Null_encode_json_fun_num_used 1
#else
#undef f_Null_encode_json_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Null_program_fun_num_used 1
#else
#undef Null_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Serializable_program_fun_num_used 1
#else
#undef Serializable_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_head_fun_num_used 1
#else
#undef f_List_head_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__size_object_fun_num_used 1
#else
#undef f_List_cq__size_object_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_is_empty_fun_num_used 1
#else
#undef f_List_is_empty_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__sizeof_fun_num_used 1
#else
#undef f_List_cq__sizeof_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__sprintf_fun_num_used 1
#else
#undef f_List_cq__sprintf_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_tail_fun_num_used 1
#else
#undef f_List_tail_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_pop_fun_num_used 1
#else
#undef f_List_pop_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_pop_back_fun_num_used 1
#else
#undef f_List_pop_back_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_cast_fun_num_used 1
#else
#undef f_List_cast_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_insert_fun_num_used 1
#else
#undef f_List_insert_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_create_fun_num_used 1
#else
#undef f_List_create_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define List_program_fun_num_used 1
#else
#undef List_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_MasterCodec_objectof_fun_num_used 1
#else
#undef f_MasterCodec_objectof_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_MasterCodec_programof_fun_num_used 1
#else
#undef f_MasterCodec_programof_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define MasterCodec_program_fun_num_used 1
#else
#undef MasterCodec_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_string2hex_fun_num_used 1
#else
#undef f_string2hex_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_hex2string_fun_num_used 1
#else
#undef f_hex2string_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_string_range_fun_num_used 1
#else
#undef f_string_range_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_gc_parameters_fun_num_used 1
#else
#undef f_gc_parameters_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_string_secure_fun_num_used 1
#else
#undef f_string_secure_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_object_secure_fun_num_used 1
#else
#undef f_object_secure_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_string_count_fun_num_used 1
#else
#undef f_string_count_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_string_trim_whites_fun_num_used 1
#else
#undef f_string_trim_whites_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_string_status_fun_num_used 1
#else
#undef f_string_status_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_program_implements_fun_num_used 1
#else
#undef f_program_implements_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_program_inherits_fun_num_used 1
#else
#undef f_program_inherits_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_program_defined_fun_num_used 1
#else
#undef f_program_defined_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_string_width_fun_num_used 1
#else
#undef f_string_width_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_get_weak_flag_2_fun_num_used 1
#else
#undef f_get_weak_flag_2_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_get_weak_flag_fun_num_used 1
#else
#undef f_get_weak_flag_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_get_weak_flag_3_fun_num_used 1
#else
#undef f_get_weak_flag_3_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_random_2_fun_num_used 1
#else
#undef f_random_2_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_random_3_fun_num_used 1
#else
#undef f_random_3_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_random_4_fun_num_used 1
#else
#undef f_random_4_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_random_5_fun_num_used 1
#else
#undef f_random_5_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_random_6_fun_num_used 1
#else
#undef f_random_6_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_random_fun_num_used 1
#else
#undef f_random_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_cq__getenv_fun_num_used 1
#else
#undef f_cq__getenv_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_cq__putenv_fun_num_used 1
#else
#undef f_cq__putenv_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_cq__disassemble_fun_num_used 1
#else
#undef f_cq__disassemble_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_cq__get_setter_fun_num_used 1
#else
#undef f_cq__get_setter_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_get_runtime_info_fun_num_used 1
#else
#undef f_get_runtime_info_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_levenshtein_distance_fun_num_used 1
#else
#undef f_levenshtein_distance_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_serialize_fun_num_used 1
#else
#undef f_serialize_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_deserialize_fun_num_used 1
#else
#undef f_deserialize_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Setter_cq__backtick_28_29_fun_num_used 1
#else
#define f_Setter_cq__backtick_28_29_fun_num_used 1
#endif
#ifndef CMOD_COND_USED
# define f_Serializable_cq__serialize_variable_fun_num_used 1
#else
#define f_Serializable_cq__serialize_variable_fun_num_used 1
#endif
#ifndef CMOD_COND_USED
# define f_Serializable_cq__deserialize_variable_fun_num_used 1
#else
#define f_Serializable_cq__deserialize_variable_fun_num_used 1
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__get_iterator_next_fun_num_used 1
#else
#define f_List_cq__get_iterator_next_fun_num_used 1
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__get_iterator_prev_fun_num_used 1
#else
#define f_List_cq__get_iterator_prev_fun_num_used 1
#endif
#ifndef CMOD_COND_USED
# define f_string_normalize_space_fun_num_used 1
#else
#undef f_string_normalize_space_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_string_trim_all_whites_fun_num_used 1
#else
#undef f_string_trim_all_whites_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickmday_eq_fun_num_used 1
#else
#undef f_TM_cq__backtickmday_eq_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickyear_eq_fun_num_used 1
#else
#undef f_TM_cq__backtickyear_eq_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_TM_cq__backtickhour_eq_fun_num_used 1
#else
#undef f_TM_cq__backtickhour_eq_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__get_iterator_index_fun_num_used 1
#else
#undef f_List_cq__get_iterator_index_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__get_iterator_value_fun_num_used 1
#else
#undef f_List_cq__get_iterator_value_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__get_iterator_first_fun_num_used 1
#else
#undef f_List_cq__get_iterator_first_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__get_iterator_cq__backtick_21_fun_num_used 1
#else
#undef f_List_cq__get_iterator_cq__backtick_21_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_automap_marker_cq__sprintf_fun_num_used 1
#else
#undef f_automap_marker_cq__sprintf_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__get_iterator_append_fun_num_used 1
#else
#undef f_List_cq__get_iterator_append_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Null_cq__backtick_eq_eq_fun_num_used 1
#else
#undef f_Null_cq__backtick_eq_eq_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Serializable_cq__deserialize_fun_num_used 1
#else
#undef f_Serializable_cq__deserialize_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Serializable_cq__serialize_fun_num_used 1
#else
#undef f_Serializable_cq__serialize_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__get_iterator_insert_fun_num_used 1
#else
#undef f_List_cq__get_iterator_insert_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__get_iterator_delete_fun_num_used 1
#else
#undef f_List_cq__get_iterator_delete_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__get_iterator_cq__backtick_add_eq_fun_num_used 1
#else
#undef f_List_cq__get_iterator_cq__backtick_add_eq_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__get_iterator_set_fun_num_used 1
#else
#undef f_List_cq__get_iterator_set_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define List_cq__get_iterator_program_fun_num_used 1
#else
#undef List_cq__get_iterator_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Time_cq__backtickusec_full_fun_num_used 1
#else
#undef f_Time_cq__backtickusec_full_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_multi_string_replace_cq__size_object_fun_num_used 1
#else
#undef f_multi_string_replace_cq__size_object_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_multi_string_replace_cq__backtick_28_29_fun_num_used 1
#else
#undef f_multi_string_replace_cq__backtick_28_29_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_multi_string_replace_cq__decode_fun_num_used 1
#else
#undef f_multi_string_replace_cq__decode_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_single_string_replace_create_fun_num_used 1
#else
#undef f_single_string_replace_create_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_single_string_replace_cq__decode_fun_num_used 1
#else
#undef f_single_string_replace_cq__decode_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define multi_string_replace_program_fun_num_used 1
#else
#undef multi_string_replace_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_multi_string_replace_create_fun_num_used 1
#else
#undef f_multi_string_replace_create_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_multi_string_replace_cq__encode_fun_num_used 1
#else
#undef f_multi_string_replace_cq__encode_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_FakeObject_cq__sprintf_fun_num_used 1
#else
#undef f_FakeObject_cq__sprintf_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_backtrace_frame_cq__sizeof_fun_num_used 1
#else
#undef f_backtrace_frame_cq__sizeof_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_backtrace_frame_cq__backtick_5B_5D_fun_num_used 1
#else
#undef f_backtrace_frame_cq__backtick_5B_5D_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define single_string_replace_program_fun_num_used 1
#else
#undef single_string_replace_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_backtrace_frame_cq__sprintf_fun_num_used 1
#else
#undef f_backtrace_frame_cq__sprintf_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_backtrace_frame_cq__backtick_5B_5D_eq_fun_num_used 1
#else
#undef f_backtrace_frame_cq__backtick_5B_5D_eq_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_single_string_replace_cq__backtick_28_29_fun_num_used 1
#else
#undef f_single_string_replace_cq__backtick_28_29_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Buffer_cq__size_object_fun_num_used 1
#else
#undef f_Buffer_cq__size_object_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_single_string_replace_cq__encode_fun_num_used 1
#else
#undef f_single_string_replace_cq__encode_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Buffer_cq__backtick_add_eq_fun_num_used 1
#else
#undef f_Buffer_cq__backtick_add_eq_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define DestructImmediate_program_fun_num_used 1
#else
#undef DestructImmediate_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_backtrace_frame_cq__backtick_2D_3Efun_fun_num_used 1
#else
#undef f_backtrace_frame_cq__backtick_2D_3Efun_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_backtrace_frame_cq__is_type_fun_num_used 1
#else
#undef f_backtrace_frame_cq__is_type_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_backtrace_frame_cq__backtick_2D_3Efun_eq_fun_num_used 1
#else
#undef f_backtrace_frame_cq__backtick_2D_3Efun_eq_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Buffer_cq__backtick_add_fun_num_used 1
#else
#undef f_Buffer_cq__backtick_add_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define cq___Backtrace_Tester___program_fun_num_used 1
#else
#undef cq___Backtrace_Tester___program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_List_cq__backtick_5B_5D_fun_num_used 1
#else
#undef f_List_cq__backtick_5B_5D_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_MasterCodec_functionof_fun_num_used 1
#else
#undef f_MasterCodec_functionof_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_MasterCodec_decode_object_fun_num_used 1
#else
#undef f_MasterCodec_decode_object_fun_num_used
#endif
/*! @module System
 */

/*! @class TM
 *! A wrapper for the system struct tm time keeping structure.
 *! This can be used as a (very) lightweight alternative to Calendar.
 */

#undef class_TM_defined
#define class_TM_defined
DEFAULT_CMOD_STORAGE struct program *TM_program=NULL;

#ifdef TM_program_fun_num_used
DEFAULT_CMOD_STORAGE int TM_program_fun_num=-1;
#endif /* TM_program_fun_num_used */

#undef var_t_TM_defined
#define var_t_TM_defined

#undef var_unix_time_TM_defined
#define var_unix_time_TM_defined

#undef var_modified_TM_defined
#define var_modified_TM_defined

#undef var_extra_TM_defined
#define var_extra_TM_defined

#undef THIS
#define THIS ((struct TM_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_TM
#define THIS_TM ((struct TM_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_TM
#define OBJ2_TM(o) ((struct TM_struct *)(o->storage+TM_storage_offset))

#undef GET_TM_STORAGE
#define GET_TM_STORAGE(o) ((struct TM_struct *)(o->storage+TM_storage_offset)
static ptrdiff_t TM_storage_offset;
struct TM_struct {

#ifdef var_t_TM_defined
#line 79 "/Users/hww3/devel/pike/src/builtin.cmod"
struct tm t;
#endif /* var_t_TM_defined */

#ifdef var_unix_time_TM_defined
#line 80 "/Users/hww3/devel/pike/src/builtin.cmod"
time_t unix_time;
#endif /* var_unix_time_TM_defined */

#ifdef var_modified_TM_defined
#line 81 "/Users/hww3/devel/pike/src/builtin.cmod"
int modified;
#endif /* var_modified_TM_defined */

#ifdef var_extra_TM_defined
#line 82 "/Users/hww3/devel/pike/src/builtin.cmod"
struct tm_extra extra;
#endif /* var_extra_TM_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct TM_struct *TM_gdb_dummy_ptr;
#endif
#line 84 "/Users/hww3/devel/pike/src/builtin.cmod"
#define strftime_zone strftime
#define strptime_zone strptime
#define asctime_zone asctime
#define localtime_zone(X,Y) localtime(X)
#ifndef HAVE_EXTERNAL_TIMEZONE
#undef timezone
#endif

#define MODIFY(X) do{ THIS->modified = 1;THIS->t.X; }while(0)
#define FIX_THIS() do {                                               \
        if(THIS->modified)                                            \
          fix_tm(THIS);                                               \
    }  while(0)

static void fix_tm(struct TM_struct *this)
{
const char *tm_zone = GET_ZONE(this);
int is_utc_zone = tm_zone && !strcmp(tm_zone, "UTC");
if (is_utc_zone)
this->t.tm_isdst = 0;
this->unix_time = mktime_zone(&this->t, is_utc_zone, 0);
this->modified = 0;
}

#ifdef HAVE_STRPTIME
 /*! @decl int(0..1) strptime( string(1..255) format, string(1..255) data )
     *!
     *! Parse the given @[data] using the format in @[format] as a date.
     *!
     *! @dl
     *!   @item %%
     *!     The % character.
     *!
     *!   @item %a or %A
     *!     The weekday name according to the C locale, in abbreviated
     *!     form or the full name.
     *!
     *!   @item %b or %B or %h
     *!     The month name according to the C locale, in abbreviated form
     *!     or the full name.
     *!
     *!   @item %c
     *!     The date and time representation for the C locale.
     *!
     *!   @item %C
     *!     The century number (0-99).
     *!
     *!   @item %d or %e
     *!     The day of month (1-31).
     *!
     *!   @item %D
     *!     Equivalent to %m/%d/%y.
     *!
     *!   @item %H
     *!     The hour (0-23).
     *!
     *!   @item %I
     *!     The hour on a 12-hour clock (1-12).
     *!
     *!   @item %j
     *!     The day number in the year (1-366).
     *!
     *!   @item %m
     *!     The month number (1-12).
     *!
     *!   @item %M
     *!     The minute (0-59).
     *!
     *!   @item %n
     *!     Arbitrary whitespace.
     *!
     *!   @item %p
     *!     The C locale's equivalent of AM or PM.
     *!
     *!   @item %R
     *!     Equivalent to %H:%M.
     *!
     *!   @item %S
     *!     The second (0-60; 60 may occur for leap seconds;
     *!     earlier also 61 was allowed).
     *!
     *!   @item %t
     *!     Arbitrary whitespace.
     *!
     *!   @item %T
     *!     Equivalent to %H:%M:%S.
     *!
     *!   @item %U
     *!     The week number with Sunday the first day of the week (0-53).
     *!
     *!   @item %w
     *!     The weekday number (0-6) with Sunday = 0.
     *!
     *!   @item %W
     *!     The week number with Monday the first day of the week (0-53).
     *!
     *!   @item %x
     *!     The date, using the C locale's date format.
     *!
     *!   @item %X
     *!     The time, using the C locale's time format.
     *!
     *!   @item %y
     *!     The year within century (0-99).  When a century is not
     *!     otherwise specified, values in the range 69-99 refer to years
     *!     in the twentieth century (1969-1999); values in the range
     *!     00-68 refer to years in the twenty-first century (2000-2068).
     *!
     *!   @item %Y
     *!     The year, including century (for example, 1991).
     *! @enddl
     *!
     */
#define f_TM_strptime_defined

#ifdef f_TM_strptime_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_strptime_fun_num = 0;

#endif /* f_TM_strptime_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_strptime(INT32 args) {
#line 197 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * format;
#line 197 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * data;
#line 197 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("strptime",args,2);
#line 197 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("strptime",1,"string(1..255)");
#line 197 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(format=Pike_sp[0-2].u.string);
#line 197 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-2]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("strptime",2,"string(1..255)");
#line 197 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(data=Pike_sp[1-2].u.string);
{
if( format->size_shift || data->size_shift )
Pike_error("Only 8bit strings are supported\n");
THIS->modified = 1;
if( strptime_zone( data->str, format->str, &THIS->t ) == NULL )
do { INT_TYPE ret_=(0); pop_n_elems(2); push_int(ret_); return; }while(0);do { INT_TYPE ret_=(
#line 204 "/Users/hww3/devel/pike/src/builtin.cmod"
1); pop_n_elems(2); push_int(ret_); return; }while(0);
#line 205 "/Users/hww3/devel/pike/src/builtin.cmod"
}
}
#line 206 "/Users/hww3/devel/pike/src/builtin.cmod"
#endif /* HAVE_STRPTIME */
 /*! @decl string(1..255) strftime( string(1..255) format )
     *! See also @[Gettext.setlocale]
     *!
     *! Convert the structure to a string.
     *!
     *! @dl
     *!   @item %a
     *!     The abbreviated weekday name according to the current locale
     *!
     *!   @item %A
     *!     The full weekday name according to the current locale.
     *!
     *!   @item %b
     *!     The abbreviated month name according to the current locale.
     *!
     *!   @item %B
     *!     The full month name according to the current locale.
     *!
     *!   @item %c
     *!     The preferred date and time representation for the current locale.
     *!
     *!   @item %C
     *!     The century number (year/100) as a 2-digit integer.
     *!
     *!   @item %d
     *!     The day of the month as a decimal number (range 01 to 31).
     *!
     *!   @item %D
     *!     Equivalent to @expr{%m/%d/%y@}. (for Americans only.
     *!     Americans should note that in other countries @expr{%d/%m/%y@}
     *!     is rather common. This means that in international context
     *!     this format is ambiguous and should not be used.)
     *!
     *!   @item %e
     *!     Like @expr{%d@}, the day of the month as a decimal number,
     *!     but a leading zero is replaced by a space.
     *!
     *!   @item %E
     *!     Modifier: use alternative format, see below.
     *!
     *!   @item %F
     *!     Equivalent to %Y-%m-%d (the ISO 8601 date format). (C99)
     *!
     *!   @item %G
     *!     The ISO 8601 week-based year (see NOTES) with century as a
     *!     decimal number. The 4-digit year corresponding to the ISO
     *!     week number (see @expr{%V@}). This has the same format and
     *!     value as @expr{%Y@}, except that if the ISO week number
     *!     belongs to the previous or next year, that year is used instead.
     *!
     *!   @item %g
     *!     Like @expr{%G@}, but without century, that is,
     *!     with a 2-digit year (00-99). (TZ)
     *!
     *!   @item %h
     *!     Equivalent to %b.
     *!
     *!   @item %H
     *!     The hour as a decimal number using a 24-hour clock (range 00 to 23).
     *!
     *!   @item %I
     *!     The hour as a decimal number using a 12-hour clock (range 01 to 12).
     *!
     *!   @item %j
     *!     The day of the year as a decimal number (range 001 to 366).
     *!
     *!   @item %m
     *!     The month as a decimal number (range 01 to 12).
     *!
     *!   @item %M
     *!     The minute as a decimal number (range 00 to 59).
     *!
     *!   @item %n
     *!     A newline character. (SU)
     *!
     *!   @item %O
     *!     Modifier: use alternative format, see below. (SU)
     *!
     *!   @item %p
     *!     Either @expr{"AM"@} or @expr{"PM"@} according to the given time
     *!     value, or the corresponding strings for the current locale.
     *!     Noon is treated as @expr{"PM"@} and midnight as @expr{"AM"@}.
     *!
     *!   @item %P
     *!     Like @expr{%p@} but in lowercase: @expr{"am"@} or @expr{"pm"@}
     *!     or a corresponding string for the current locale.
     *!
     *!   @item %r
     *!     The time in a.m. or p.m. notation. In the POSIX locale this is
     *!     equivalent to @expr{%I:%M:%S %p@}.
     *!
     *!   @item %R
     *!     The time in 24-hour notation (@expr{%H:%M@}). (SU)
     *!     For a version including the seconds, see @expr{%T@} below.
     *!
     *!   @item %s
     *!     The number of seconds since the Epoch,
     *!     1970-01-01 00:00:00 +0000 (UTC). (TZ)
     *!
     *!   @item %S
     *!     The second as a decimal number (range 00 to 60).
     *!     (The range is up to 60 to allow for occasional leap seconds.)
     *!
     *!   @item %t
     *!     A tab character. (SU)
     *!
     *!   @item %T
     *!     The time in 24-hour notation (@expr{%H:%M:%S@}). (SU)
     *!
     *!   @item %u
     *!     The day of the week as a decimal, range 1 to 7, Monday being 1.
     *!     See also @expr{%w@}. (SU)
     *!
     *!   @item %U
     *!     The week number of the current year as a decimal number,
     *!     range 00 to 53, starting with the first Sunday as the first
     *!     day of week 01. See also @expr{%V@} and @expr{%W@}.
     *!
     *!   @item %V
     *!     The ISO 8601 week number of the current year as a decimal number,
     *!     range 01 to 53, where week 1 is the first week that has at least
     *!     4 days in the new year. See also @expr{%U@} and @expr{%W@}.
     *!
     *!   @item %w
     *!     The day of the week as a decimal, range 0 to 6, Sunday being 0.
     *!     See also @expr{%u@}.
     *! @enddl
     */
#define f_TM_strftime_defined

#ifdef f_TM_strftime_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_strftime_fun_num = 0;

#endif /* f_TM_strftime_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_strftime(INT32 args) {
#line 335 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * format;
#line 335 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("strftime",args,1);
#line 335 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("strftime",1,"string(1..255)");
#line 335 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(format=Pike_sp[0-1].u.string);
{
char *buffer = xalloc( 8192 );
buffer[0] = 0;
strftime_zone( buffer, 8192, format->str, &THIS->t );
push_text( buffer );
free(buffer);
}

}
/*! @decl int(0..60) sec;
     *! @decl int(0..59) min;
     *! @decl int(0..59) hour;
     *! @decl int(1..31) mday;
     *! @decl int(0..11) mon;
     *! @decl int year;
     *!
     *! The various fields in the structure. Note that setting these
     *! might cause other fields to be recalculated, as an example,
     *! adding 1000 to the hour field would advance the 'mday', 'mon'
     *! and possibly 'year' fields.
     *!
     *! When read the fields are always normalized.
     *!
     *! Unlike the system struct tm the 'year' field is not year-1900,
     *! instead it is the actual year.
     */
#define f_TM_cq__backticksec_defined

#ifdef f_TM_cq__backticksec_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backticksec_fun_num = 0;

#endif /* f_TM_cq__backticksec_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backticksec(INT32 args) {
#line 361 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`sec",args,0);
#line 361 "/Users/hww3/devel/pike/src/builtin.cmod"
{ FIX_THIS();do { INT_TYPE ret_=(THIS->t.tm_sec);  push_int(ret_); return; }while(0);}
}
#define f_TM_cq__backtickmin_defined

#ifdef f_TM_cq__backtickmin_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickmin_fun_num = 0;

#endif /* f_TM_cq__backtickmin_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickmin(INT32 args) {
#line 362 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`min",args,0);
#line 362 "/Users/hww3/devel/pike/src/builtin.cmod"
{ FIX_THIS();do { INT_TYPE ret_=(THIS->t.tm_min);  push_int(ret_); return; }while(0);}
}
#define f_TM_cq__backtickhour_defined

#ifdef f_TM_cq__backtickhour_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickhour_fun_num = 0;

#endif /* f_TM_cq__backtickhour_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickhour(INT32 args) {
#line 363 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`hour",args,0);
#line 363 "/Users/hww3/devel/pike/src/builtin.cmod"
{ FIX_THIS();do { INT_TYPE ret_=(THIS->t.tm_hour);  push_int(ret_); return; }while(0);}
}
#define f_TM_cq__backtickmday_defined

#ifdef f_TM_cq__backtickmday_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickmday_fun_num = 0;

#endif /* f_TM_cq__backtickmday_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickmday(INT32 args) {
#line 364 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`mday",args,0);
#line 364 "/Users/hww3/devel/pike/src/builtin.cmod"
{ FIX_THIS();do { INT_TYPE ret_=(THIS->t.tm_mday);  push_int(ret_); return; }while(0);}
}
#define f_TM_cq__backtickmon_defined

#ifdef f_TM_cq__backtickmon_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickmon_fun_num = 0;

#endif /* f_TM_cq__backtickmon_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickmon(INT32 args) {
#line 365 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`mon",args,0);
#line 365 "/Users/hww3/devel/pike/src/builtin.cmod"
{ FIX_THIS();do { INT_TYPE ret_=(THIS->t.tm_mon);  push_int(ret_); return; }while(0);}

}
#define f_TM_cq__backtickyear_defined

#ifdef f_TM_cq__backtickyear_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickyear_fun_num = 0;

#endif /* f_TM_cq__backtickyear_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickyear(INT32 args) {
#line 367 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`year",args,0);
#line 367 "/Users/hww3/devel/pike/src/builtin.cmod"
{ FIX_THIS();do { INT_TYPE ret_=(THIS->t.tm_year+1900);  push_int(ret_); return; }while(0);}
}
#define f_TM_cq__backticksec_eq_defined

#ifdef f_TM_cq__backticksec_eq_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backticksec_eq_fun_num = 0;

#endif /* f_TM_cq__backticksec_eq_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backticksec_eq(INT32 args) {
#line 368 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE a;
#line 368 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`sec=",args,1);
#line 368 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("`sec=",1,"int");
#line 368 "/Users/hww3/devel/pike/src/builtin.cmod"
a=Pike_sp[0-1].u.integer;
#line 368 "/Users/hww3/devel/pike/src/builtin.cmod"
{ MODIFY(tm_sec=a); }
}
#define f_TM_cq__backtickmin_eq_defined

#ifdef f_TM_cq__backtickmin_eq_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickmin_eq_fun_num = 0;

#endif /* f_TM_cq__backtickmin_eq_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickmin_eq(INT32 args) {
#line 369 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE a;
#line 369 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`min=",args,1);
#line 369 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("`min=",1,"int");
#line 369 "/Users/hww3/devel/pike/src/builtin.cmod"
a=Pike_sp[0-1].u.integer;
#line 369 "/Users/hww3/devel/pike/src/builtin.cmod"
{ MODIFY(tm_min=a); }
}
#define f_TM_cq__backtickhour_eq_defined

#ifdef f_TM_cq__backtickhour_eq_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickhour_eq_fun_num = 0;

#endif /* f_TM_cq__backtickhour_eq_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickhour_eq(INT32 args) {
#line 370 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE a;
#line 370 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`hour=",args,1);
#line 370 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("`hour=",1,"int");
#line 370 "/Users/hww3/devel/pike/src/builtin.cmod"
a=Pike_sp[0-1].u.integer;
#line 370 "/Users/hww3/devel/pike/src/builtin.cmod"
{ MODIFY(tm_hour=a); }
}
#define f_TM_cq__backtickmday_eq_defined

#ifdef f_TM_cq__backtickmday_eq_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickmday_eq_fun_num = 0;

#endif /* f_TM_cq__backtickmday_eq_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickmday_eq(INT32 args) {
#line 371 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE a;
#line 371 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`mday=",args,1);
#line 371 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("`mday=",1,"int");
#line 371 "/Users/hww3/devel/pike/src/builtin.cmod"
a=Pike_sp[0-1].u.integer;
#line 371 "/Users/hww3/devel/pike/src/builtin.cmod"
{ MODIFY(tm_mday=a); }
}
#define f_TM_cq__backtickyear_eq_defined

#ifdef f_TM_cq__backtickyear_eq_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickyear_eq_fun_num = 0;

#endif /* f_TM_cq__backtickyear_eq_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickyear_eq(INT32 args) {
#line 372 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE a;
#line 372 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`year=",args,1);
#line 372 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("`year=",1,"int");
#line 372 "/Users/hww3/devel/pike/src/builtin.cmod"
a=Pike_sp[0-1].u.integer;
#line 372 "/Users/hww3/devel/pike/src/builtin.cmod"
{ MODIFY(tm_year=a-1900); }
}
#define f_TM_cq__backtickmon_eq_defined

#ifdef f_TM_cq__backtickmon_eq_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickmon_eq_fun_num = 0;

#endif /* f_TM_cq__backtickmon_eq_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickmon_eq(INT32 args) {
#line 373 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE a;
#line 373 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`mon=",args,1);
#line 373 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("`mon=",1,"int");
#line 373 "/Users/hww3/devel/pike/src/builtin.cmod"
a=Pike_sp[0-1].u.integer;
#line 373 "/Users/hww3/devel/pike/src/builtin.cmod"
{ MODIFY(tm_mon=a); }

}
/*! @decl int isdst
     *!
     *! True if daylight-saving is in effect.  If this field is -1
     *! (the default) it (and the timezone info) will be updated
     *! automatically using the timezone rules.
     */
#define f_TM_cq__backtickisdst_defined

#ifdef f_TM_cq__backtickisdst_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickisdst_fun_num = 0;

#endif /* f_TM_cq__backtickisdst_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickisdst(INT32 args) {
#line 381 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`isdst",args,0);
#line 381 "/Users/hww3/devel/pike/src/builtin.cmod"
{
FIX_THIS();
do { INT_TYPE ret_=(THIS->t.tm_isdst);  push_int(ret_); return; }while(0);
#line 384 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl int wday
     *! The day of the week, sunday is 0, saturday is 6.
     *! This is calculated from the other fields and can not be changed directly.
     */
#define f_TM_cq__backtickwday_defined

#ifdef f_TM_cq__backtickwday_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickwday_fun_num = 0;

#endif /* f_TM_cq__backtickwday_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickwday(INT32 args) {
#line 390 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`wday",args,0);
#line 390 "/Users/hww3/devel/pike/src/builtin.cmod"
{ FIX_THIS(); do { INT_TYPE ret_=(THIS->t.tm_wday);  push_int(ret_); return; }while(0);}

}
/*! @decl int yday
     *! The day of the year, from 0 (the first day) to 365
     *! This is calculated from the other fields and can not be changed directly.
     */
#define f_TM_cq__backtickyday_defined

#ifdef f_TM_cq__backtickyday_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickyday_fun_num = 0;

#endif /* f_TM_cq__backtickyday_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickyday(INT32 args) {
#line 396 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`yday",args,0);
#line 396 "/Users/hww3/devel/pike/src/builtin.cmod"
{ FIX_THIS(); do { INT_TYPE ret_=(THIS->t.tm_yday);  push_int(ret_); return; }while(0);}

}
/*! @decl int unix_time()
     *! Return the unix time corresponding to this time_t. If no time
     *! can be parsed from the structure -1 is returned.
     */
#define f_TM_unix_time_defined

#ifdef f_TM_unix_time_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_unix_time_fun_num = 0;

#endif /* f_TM_unix_time_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_unix_time(INT32 args) {
#line 402 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("unix_time",args,0);
{
FIX_THIS();
do { INT_TYPE ret_=(THIS->unix_time);  push_int(ret_); return; }while(0);
#line 406 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl string asctime()
     *! Return a string representing the time. Mostly useful for debug
     *! purposes, the exact format is very locale (see
     *! @[Gettext.setlocale]) and OS dependent.
     */
#define f_TM_asctime_defined

#ifdef f_TM_asctime_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_asctime_fun_num = 0;

#endif /* f_TM_asctime_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_asctime(INT32 args) {
#line 413 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("asctime",args,0);
{
FIX_THIS();
{
#define STRFTIME_MAXSIZE 26
 char s[STRFTIME_MAXSIZE];
if( !strftime(s, STRFTIME_MAXSIZE, "%c\n", &THIS->t) )
push_undefined();
else
push_text(s);
}
}

}
#define f_TM_cq__sprintf_defined

#ifdef f_TM_cq__sprintf_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__sprintf_fun_num = 0;

#endif /* f_TM_cq__sprintf_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__sprintf(INT32 args) {
#line 426 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE flag;
#line 426 "/Users/hww3/devel/pike/src/builtin.cmod"
struct mapping * options;
#line 426 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("_sprintf",args,2);
#line 426 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("_sprintf",1,"int");
#line 426 "/Users/hww3/devel/pike/src/builtin.cmod"
flag=Pike_sp[0-2].u.integer;
#line 426 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-2]) != PIKE_T_MAPPING) SIMPLE_ARG_TYPE_ERROR("_sprintf",2,"mapping(mixed:mixed)");
#line 426 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(options=Pike_sp[1-2].u.mapping);
{
int post_sum = 0;
switch( flag )
{
case 'O':
push_text("System.TM(");
post_sum = 1;
/* fallthrough */
case 's':
f_TM_asctime(0);
push_text("\n");
if( GET_ZONE(THIS) )
{
push_text(" ");
push_text( GET_ZONE(THIS) );
f_add( 2 );
}
else
push_text("");
f_replace( 3 );
break;
case 'd':
f_TM_unix_time(0);
break;
default:
Pike_error("Can not format as %c", flag );
}
if( post_sum )
{
push_text(")");
f_add(3);
}

}

}
/*! @decl int|string cast(string to)
     *!
     *! Casted to an integer @[unix_time] will be returned.
     *!
     *! Casting to a string will call @[asctime].
     */
#define f_TM_cast_defined

#ifdef f_TM_cast_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cast_fun_num = 0;

#endif /* f_TM_cast_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cast(INT32 args) {
#line 468 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * to;
#line 468 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("cast",args,1);
#line 468 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("cast",1,"string");
#line 468 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(to=Pike_sp[0-1].u.string);
#line 470 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if( to == literal_int_string )
{
f_TM_unix_time(0);
return;
}
if( to == literal_string_string )
{
f_TM_asctime(0);
return;
}
pop_stack();
push_undefined();
}

}
/*! @decl string zone
     *!
     *! The timezone of this structure
     */
#define f_TM_cq__backtickzone_defined

#ifdef f_TM_cq__backtickzone_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickzone_fun_num = 0;

#endif /* f_TM_cq__backtickzone_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickzone(INT32 args) {
#line 489 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`zone",args,0);
#line 489 "/Users/hww3/devel/pike/src/builtin.cmod"
{
FIX_THIS();
if( GET_ZONE(THIS) )
push_text( GET_ZONE(THIS) );
else
push_undefined();
}

}
/*! @decl int gmtoff
     *! The offset from GMT for the time in this tm-struct
     */
#define f_TM_cq__backtickgmtoff_defined

#ifdef f_TM_cq__backtickgmtoff_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_cq__backtickgmtoff_fun_num = 0;

#endif /* f_TM_cq__backtickgmtoff_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_cq__backtickgmtoff(INT32 args) {
#line 500 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`gmtoff",args,0);
#line 500 "/Users/hww3/devel/pike/src/builtin.cmod"
{
FIX_THIS();
push_int( GET_GMTOFF(&(THIS->t)) );
}

}
/*! @decl int(0..1) localtime( int time )
     *! Initialize the struct tm to the local time for the specified
     *! unix time_t.
     */
#define f_TM_localtime_defined

#ifdef f_TM_localtime_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_localtime_fun_num = 0;

#endif /* f_TM_localtime_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_localtime(INT32 args) {
#line 509 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE _t;
#line 509 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("localtime",args,1);
#line 509 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("localtime",1,"int");
#line 509 "/Users/hww3/devel/pike/src/builtin.cmod"
_t=Pike_sp[0-1].u.integer;
{
time_t t = _t;
struct tm *res = localtime_zone( &t, &THIS->t );
if( !res )
do { INT_TYPE ret_=(0); pop_stack(); push_int(ret_); return; }while(0);
#line 516 "/Users/hww3/devel/pike/src/builtin.cmod"
THIS->t = *res;
THIS->modified = 1;
do { INT_TYPE ret_=(1); pop_stack(); push_int(ret_); return; }while(0);
#line 519 "/Users/hww3/devel/pike/src/builtin.cmod"
}


}
/*! @decl int(0..1) gmtime( int time )
     *! Initialize the struct tm to the UTC time for the specified
     *! unix time_t.
     */
#define f_TM_gmtime_defined

#ifdef f_TM_gmtime_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_gmtime_fun_num = 0;

#endif /* f_TM_gmtime_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_gmtime(INT32 args) {
#line 526 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE _t;
#line 526 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("gmtime",args,1);
#line 526 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("gmtime",1,"int");
#line 526 "/Users/hww3/devel/pike/src/builtin.cmod"
_t=Pike_sp[0-1].u.integer;
{
time_t t = _t;
struct tm *res = gmtime( &t );

if( !res )
do { INT_TYPE ret_=(0); pop_stack(); push_int(ret_); return; }while(0);
#line 534 "/Users/hww3/devel/pike/src/builtin.cmod"
THIS->t = *res;
SET_ZONE(THIS, "UTC"); /* Override timezone */
THIS->modified = 1;
do { INT_TYPE ret_=(1); pop_stack(); push_int(ret_); return; }while(0);
#line 538 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl void create(int t)
     *! Create a new @[TM] initialized from a unix time_t.
     *! The timezone will always be UTC when using this function.
     */
#define f_TM_create_1_defined

#ifdef f_TM_create_1_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_create_1_fun_num = 0;

#endif /* f_TM_create_1_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_create_1(INT32 args) {
#line 544 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE _t;
#line 544 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("create",args,1);
#line 544 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",1,"int");
#line 544 "/Users/hww3/devel/pike/src/builtin.cmod"
_t=Pike_sp[0-1].u.integer;
{
f_TM_gmtime( 1 );
if( Pike_sp[-1].u.integer == 0 )
Pike_error("time out of range\n");
}

}
/*! @decl void create()
     *! Construct a new TM, all fields will be set to 0.
     */
#define f_TM_create_2_defined

#ifdef f_TM_create_2_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_create_2_fun_num = 0;

#endif /* f_TM_create_2_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_create_2(INT32 args) {
#line 554 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("create",args,0);
{
memset( &THIS->t, 0, sizeof( struct tm ) );
THIS->t.tm_isdst = -1;
THIS->t.tm_mday = 1;
THIS->unix_time = 0;
THIS->modified = 1;
}

}
/*! @decl void create( int year, int(0..11) mon, int(1..31) mday, @
     *!                    int(0..24) hour, int(0..59) min, int(0..59) sec, @
     *!                    string|void timezone )
     *! Construct a new time using the given values.
     *! Slightly faster than setting them individually.
     */
#define f_TM_create_3_defined

#ifdef f_TM_create_3_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_TM_create_3_fun_num = 0;

#endif /* f_TM_create_3_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_create_3(INT32 args) {
#line 569 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE year;
#line 569 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE mon;
#line 569 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE mday;
INT_TYPE hour;
#line 570 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE min;
#line 570 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE sec;
struct pike_string * timezone;
#line 569 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args < 6) wrong_number_of_args_error("create_3",args,6);
#line 569 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 7) wrong_number_of_args_error("create_3",args,7);
#line 569 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",1,"int");
#line 569 "/Users/hww3/devel/pike/src/builtin.cmod"
year=Pike_sp[0-args].u.integer;
#line 569 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",2,"int(0..11)");
#line 569 "/Users/hww3/devel/pike/src/builtin.cmod"
mon=Pike_sp[1-args].u.integer;
#line 569 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[2-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",3,"int(1..31)");
#line 569 "/Users/hww3/devel/pike/src/builtin.cmod"
mday=Pike_sp[2-args].u.integer;
if(TYPEOF(Pike_sp[3-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",4,"int(0..24)");
#line 570 "/Users/hww3/devel/pike/src/builtin.cmod"
hour=Pike_sp[3-args].u.integer;
#line 570 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[4-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",5,"int(0..59)");
#line 570 "/Users/hww3/devel/pike/src/builtin.cmod"
min=Pike_sp[4-args].u.integer;
#line 570 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[5-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",6,"int(0..59)");
#line 570 "/Users/hww3/devel/pike/src/builtin.cmod"
sec=Pike_sp[5-args].u.integer;
if (args > 6 &&
    (TYPEOF(Pike_sp[6-args]) != PIKE_T_INT ||
     Pike_sp[6-args].u.integer)) {
#line 571 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[6-args]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("create",7,"string|void");
#line 571 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(timezone=Pike_sp[6-args].u.string);
#line 571 "/Users/hww3/devel/pike/src/builtin.cmod"
} else timezone = NULL;
{
struct tm *t = &THIS->t;
int use_utc = 0;
t->tm_isdst = -1;
t->tm_year = year - 1900;
t->tm_mon = mon;
t->tm_mday = mday;
t->tm_hour = hour;
t->tm_min = min;
t->tm_sec = sec;
if (timezone) {
if (strcmp(timezone->str, "UTC"))
Pike_error("Timezone must either be UTC or omitted.\n");
use_utc = 1;
}
if (use_utc)
t->tm_isdst = 0;
THIS->unix_time = mktime_zone(&THIS->t, use_utc, 0);
/* Setting it to other timezones than UTC is not supported (yet) */
if (use_utc)
SET_ZONE(THIS, "UTC");
}

}

#if defined(f_TM_create_1_defined) || defined(f_TM_create_2_defined) || defined(f_TM_create_3_defined)
#define f_TM_create_defined

#ifdef TM_f_TM_create_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t TM_f_TM_create_fun_num = 0;

#endif /* TM_f_TM_create_fun_num_used */
DEFAULT_CMOD_STORAGE void f_TM_create(INT32 args) {
  switch(args) {
   case 0:

#ifdef f_TM_create_2_defined
    f_TM_create_2(args);
    return;

#endif /* f_TM_create_2_defined */
    break;
   case 1:

#ifdef f_TM_create_1_defined
    f_TM_create_1(args);
    return;

#endif /* f_TM_create_1_defined */
    break;
   case 6:
   case 7:

#ifdef f_TM_create_3_defined
    f_TM_create_3(args);
    return;

#endif /* f_TM_create_3_defined */
    break;
   default:
    wrong_number_of_args_error("create",args,0);
  }
}

#endif /* f_TM_create_1_defined, f_TM_create_2_defined, f_TM_create_3_defined */

#undef internal_init_TM_defined
#define internal_init_TM_defined

#undef TM_event_handler_defined
#define TM_event_handler_defined
static void init_TM_struct(void)
#line 595 "/Users/hww3/devel/pike/src/builtin.cmod"
{
THIS->modified = 0;
}

#ifdef TM_event_handler_defined
static void TM_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_TM_defined
  case PROG_EVENT_INIT: init_TM_struct(); break;

#endif /* internal_init_TM_defined */
  default: break; 
  }
}

#endif /* TM_event_handler_defined */
/*! @endclass
 */
#line 601 "/Users/hww3/devel/pike/src/builtin.cmod"
#undef FIX_THIS
#ifdef STRUCT_TM_HAS___TM_GMTOFF
#undef tm_zone
#undef tm_gmtoff
#endif

/*! @endmodule
 */

/*! @decl array(array(int|string|type)) describe_program(program p)
 *! @belongs Debug
 *!
 *! Debug function for showing the symbol table of a program.
 *!
 *! @returns
 *!   Returns an array of arrays with the following information
 *!   for each symbol in @[p]:
 *!   @array
 *!     @elem int modifiers
 *!       Bitfield with the modifiers for the symbol.
 *!     @elem string symbol_name
 *!       Name of the symbol.
 *!     @elem type value_type
 *!       Value type for the symbol.
 *!     @elem int symbol_type
 *!       Type of symbol.
 *!     @elem int symbol_offset
 *!       Offset into the code or data area for the symbol.
 *!     @elem int inherit_offset
 *!       Offset in the inherit table to the inherit containing
 *!       the symbol.
 *!     @elem int inherit_level
 *!       Depth in the inherit tree for the inherit containing
 *!       the symbol.
 *!   @endarray
 *!
 *! @note
 *!   The API for this function is not fixed, and has changed
 *!   since Pike 7.6. In particular it would make sense to return
 *!   an array of objects instead, and more information about the
 *!   symbols might be added.
 */
PMOD_EXPORT
#define f_cq__describe_program_defined
DEFAULT_CMOD_STORAGE void f_cq__describe_program(INT32 args) {
#line 644 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * x;
#line 644 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("_describe_program",args,1);
#line 644 "/Users/hww3/devel/pike/src/builtin.cmod"
x=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
#line 646 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct program *p;
struct array *res;
int i;

if (!(p = program_from_svalue(Pike_sp - args)))
SIMPLE_BAD_ARG_ERROR("_describe_program", 1, "program");

for (i=0; i < (int)p->num_identifier_references;i++) {
struct reference *ref = p->identifier_references + i;
struct identifier *id = ID_FROM_PTR(p, ref);
struct inherit *inh = INHERIT_FROM_PTR(p, ref);
push_int(ref->id_flags);
ref_push_string(id->name);
ref_push_type_value(id->type);
push_int(id->identifier_flags);
if (IDENTIFIER_IS_C_FUNCTION(id->identifier_flags)) {
push_int(-2);
} else {
push_int(id->func.offset);
}
push_int(ref->inherit_offset);
push_int(inh->inherit_level);
f_aggregate(7);
}
f_aggregate(p->num_identifier_references);
dmalloc_touch_svalue(Pike_sp-1);
res = Pike_sp[-1].u.array;
Pike_sp--;
pop_n_elems(args);
push_array(res);
}

}
/*! @decl string basetype(mixed x)
 *!
 *! Same as sprintf("%t",x);
 *!
 *! @seealso
 *! @[sprintf()]
 */
#line 686 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_basetype_defined
DEFAULT_CMOD_STORAGE void f_basetype(INT32 args) {
#line 687 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * x;
#line 687 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("basetype",args,1);
#line 687 "/Users/hww3/devel/pike/src/builtin.cmod"
x=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
#line 690 "/Users/hww3/devel/pike/src/builtin.cmod"
{
int t = TYPEOF(*x);
struct program *p;
if(t == T_OBJECT && (p = x->u.object->prog))
{
ptrdiff_t fun = FIND_LFUN(p->inherits[SUBTYPEOF(*x)].prog, LFUN__SPRINTF);
if(fun != -1)
{
push_int('t');
f_aggregate_mapping(0);
apply_low(x->u.object,
fun + p->inherits[SUBTYPEOF(*x)].identifier_level, 2);
if(TYPEOF(Pike_sp[-1]) == T_STRING)
{
stack_swap();
pop_stack();
return;
} else if (UNSAFE_IS_ZERO(Pike_sp-1)) {
pop_n_elems(2);
ref_push_string(literal_object_string);
return;
} else {
Pike_error("Non-string returned from _sprintf()\n");
}
}
}
pop_stack();
switch(t)
{
case T_ARRAY: ref_push_string(literal_array_string); break;
case T_FLOAT: ref_push_string(literal_float_string); break;
case T_FUNCTION: ref_push_string(literal_function_string); break;
case T_INT: ref_push_string(literal_int_string); break;
case T_MAPPING: ref_push_string(literal_mapping_string); break;
case T_MULTISET: ref_push_string(literal_multiset_string); break;
case T_OBJECT: ref_push_string(literal_object_string); break;
case T_PROGRAM: ref_push_string(literal_program_string); break;
case T_STRING: ref_push_string(literal_string_string); break;
case T_TYPE: ref_push_string(literal_type_string); break;
case T_ZERO: push_constant_text("zero"); break;
case T_VOID: push_constant_text("void"); break;
/* The following are internal and shouldn't be applicable in normal use. */
case T_SVALUE_PTR: push_text("svalue_ptr"); break;
case T_OBJ_INDEX: push_text("obj_index"); break;
case T_MAPPING_DATA: push_text("mapping_data"); break;
case T_PIKE_FRAME: push_text("pike_frame"); break;
case T_MULTISET_DATA: push_text("multiset_data"); break;
default: push_text("unknown"); break;
}
}


}
/*! @decl string int2char(int x)
 *! @appears String.int2char
 *!
 *! Same as sprintf("%c",x);
 *!
 *! @seealso
 *! @[sprintf()]
 */
#line 750 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_int2char_defined
DEFAULT_CMOD_STORAGE void f_int2char(INT32 args) {
#line 751 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * x;
#line 751 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("int2char",args,1);
#line 751 "/Users/hww3/devel/pike/src/builtin.cmod"
x=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
#line 755 "/Users/hww3/devel/pike/src/builtin.cmod"
{
int c;
struct program *p;
if(TYPEOF(*x) == T_OBJECT && (p = x->u.object->prog))
{
ptrdiff_t fun = FIND_LFUN(p->inherits[SUBTYPEOF(*x)].prog, LFUN__SPRINTF);
if(fun != -1)
{
push_int('c');
f_aggregate_mapping(0);
apply_low(x->u.object,
fun + p->inherits[SUBTYPEOF(*x)].identifier_level, 2);
if(TYPEOF(Pike_sp[-1]) == T_STRING)
{
stack_swap();
pop_stack();
return;
}
Pike_error("Non-string returned from _sprintf()\n");
}
}
if(TYPEOF(*x) != T_INT)
SIMPLE_BAD_ARG_ERROR("int2char", 1, "int");

c=x->u.integer;

if(c>=0 && c<256)
{
struct pike_string *s;
s=begin_shared_string(1);
s->str[0]=c;
do { struct pike_string * ret_=(end_shared_string(s)); pop_stack(); push_string(ret_); return; }while(0);
#line 787 "/Users/hww3/devel/pike/src/builtin.cmod"
}else{
struct string_builder tmp;
init_string_builder(&tmp,0);
string_builder_putchar(&tmp, c);
do { struct pike_string * ret_=(finish_string_builder(&tmp)); pop_stack(); push_string(ret_); return; }while(0);
#line 792 "/Users/hww3/devel/pike/src/builtin.cmod"
}
}

}
/*! @decl string int2hex(int x)
 *! @appears String.int2hex
 *!
 *! Same as @expr{sprintf("%x",x);@}, i.e. returns the integer @[x] in
 *! hexadecimal base using lower cased symbols.
 *!
 *! @seealso
 *! @[sprintf()]
 */
#line 804 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_int2hex_defined
DEFAULT_CMOD_STORAGE void f_int2hex(INT32 args) {
#line 805 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * x;
#line 805 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("int2hex",args,1);
#line 805 "/Users/hww3/devel/pike/src/builtin.cmod"
x=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
#line 808 "/Users/hww3/devel/pike/src/builtin.cmod"
{
INT_TYPE c;
unsigned INT_TYPE n;
int len;
struct pike_string *s;
struct program *p;

if(TYPEOF(*x) == T_OBJECT && (p = x->u.object->prog))
{
ptrdiff_t fun = FIND_LFUN(p->inherits[SUBTYPEOF(*x)].prog, LFUN__SPRINTF);
if(fun != -1)
{
push_int('x');
f_aggregate_mapping(0);
apply_low(x->u.object,
fun + p->inherits[SUBTYPEOF(*x)].identifier_level, 2);
if(TYPEOF(Pike_sp[-1]) == T_STRING)
{
stack_swap();
pop_stack();
return;
}
Pike_error("Non-string returned from _sprintf()\n");
}
}
if(TYPEOF(*x) != T_INT)
SIMPLE_BAD_ARG_ERROR("int2hex", 1, "int");

c=x->u.integer;

len=1;
if(c<0) {
len++;
n=(-c)&((unsigned INT_TYPE)(-1));
}else{
n=c;
}
while(n>65535) { n>>=16; len+=4; }
while(n>15) { n>>=4; len++; }

s=begin_shared_string(len);
if(!c)
{
s->str[0]='0';
}else{
if(c<0)
{
s->str[0]='-';
n=(-c)&((unsigned INT_TYPE)(-1));
}else{
n=c;
}
while(len && n)
{
s->str[--len]="0123456789abcdef"[n&0xf];
n>>=4;
}
}
do { struct pike_string * ret_=(end_shared_string(s)); pop_stack(); push_string(ret_); return; }while(0);
#line 867 "/Users/hww3/devel/pike/src/builtin.cmod"
}


}
/*! @decl string string2hex(string data)
 *! @appears String.string2hex
 *!
 *! Convert a string of binary data to a hexadecimal string.
 *!
 *! @seealso
 *!   @[hex2string()]
 */

#line 879 "/Users/hww3/devel/pike/src/builtin.cmod"
static const char hexchar[] = {
'0','1','2','3','4','5','6','7','8','9',
'a','b','c','d','e','f'
};

static const unsigned char hexdecode[256] =
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

/* '0' - '9' */
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,

0,0,0,0,0,0,0,

/* 'A' - 'F' */
10, 11, 12, 13, 14, 15,

0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
/* 'a' - 'f' */
10, 11, 12, 13, 14, 15,
};

PMOD_EXPORT
#define f_string2hex_defined

#ifdef f_string2hex_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_string2hex_fun_num = 0;

#endif /* f_string2hex_fun_num_used */
DEFAULT_CMOD_STORAGE void f_string2hex(INT32 args) {
#line 903 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * s;
#line 903 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("string2hex",args,1);
#line 903 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("string2hex",1,"string");
#line 903 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(s=Pike_sp[0-1].u.string);
#line 905 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct pike_string *hex;
unsigned char *p,*st = (unsigned char *)s->str;
int i, l;

if (s->size_shift)
Pike_error("Bad argument 1 to string2hex(), expected 8-bit string.\n");

hex = begin_shared_string(2 * s->len);
p = (unsigned char *)hex->str;
l = s->len;

for (i=0; i<l; i++) {
*p++ = hexchar[*st>>4];
*p++ = hexchar[*st&15];
st++;
}

do { struct pike_string * ret_=(end_shared_string(hex)); pop_stack(); push_string(ret_); return; }while(0);
#line 924 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl string hex2string(string hex)
 *! @appears String.hex2string
 *!
 *! Convert a string of hexadecimal digits to binary data.
 *!
 *! @seealso
 *!   @[string2hex()]
 */
#line 934 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_hex2string_defined

#ifdef f_hex2string_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_hex2string_fun_num = 0;

#endif /* f_hex2string_fun_num_used */
DEFAULT_CMOD_STORAGE void f_hex2string(INT32 args) {
#line 935 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * hex;
#line 935 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("hex2string",args,1);
#line 935 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("hex2string",1,"string");
#line 935 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(hex=Pike_sp[0-1].u.string);
#line 937 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct pike_string *s;
int tmp, i;
unsigned char *p, *q = (unsigned char *)hex->str;
int l = hex->len>>1;
if(hex->size_shift) Pike_error("Only hex digits allowed.\n");
if(hex->len&1) Pike_error("Can't have odd number of digits.\n");

s = begin_shared_string(l);
p = (unsigned char *)s->str;
for (i=0; i<l; i++)
{
tmp = hexdecode[*q++];
*p++ = (tmp<<4) | hexdecode[*q++];
}
do { struct pike_string * ret_=(end_shared_string(s)); pop_stack(); push_string(ret_); return; }while(0);
#line 953 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl array(int) range(string s)
 *! @appears String.range
 *!
 *! Returns the character range of a string in an array of two
 *! elements. The first element contains the lower bound and the
 *! second the upper. The precision is only 8 bits, so for wide
 *! strings only character blocks are known.
 */
#define f_string_range_defined

#ifdef f_string_range_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_string_range_fun_num = 0;

#endif /* f_string_range_fun_num_used */
DEFAULT_CMOD_STORAGE void f_string_range(INT32 args) {
#line 963 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * s;
#line 963 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("range",args,1);
#line 963 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("range",1,"string");
#line 963 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(s=Pike_sp[0-1].u.string);
#line 966 "/Users/hww3/devel/pike/src/builtin.cmod"
{
int min, max;
check_string_range(s, 0, &min, &max);
pop_n_elems(args);
push_int(min);
push_int(max);
f_aggregate(2);
}

}
/*! @decl array column(array data, mixed index)
 *!
 *! Extract a column from a two-dimensional array.
 *!
 *! This function is exactly equivalent to:
 *! @code
 *! map(@[data], lambda(mixed x,mixed y) { return x[y]; }, @[index])
 *! @endcode
 *!
 *! Except of course it is a lot shorter and faster.
 *! That is, it indices every index in the array data on the value of
 *! the argument index and returns an array with the results.
 *!
 *! @seealso
 *! @[rows()]
 */
#line 991 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_column_defined
DEFAULT_CMOD_STORAGE void f_column(INT32 args) {
#line 992 "/Users/hww3/devel/pike/src/builtin.cmod"
struct array * data;
#line 992 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * index;
#line 992 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("column",args,2);
#line 992 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_ARRAY) SIMPLE_ARG_TYPE_ERROR("column",1,"array");
#line 992 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(data=Pike_sp[0-2].u.array);
#line 992 "/Users/hww3/devel/pike/src/builtin.cmod"
index=Pike_sp+1-2; dmalloc_touch_svalue(Pike_sp+1-2);
#line 995 "/Users/hww3/devel/pike/src/builtin.cmod"
{
do { struct array * ret_=(array_column (data, index, 1)); pop_n_elems(2); push_array(ret_); return; }while(0);
#line 997 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl multiset mkmultiset(array a)
 *!
 *! This function creates a multiset from an array.
 *!
 *! @seealso
 *! @[aggregate_multiset()]
 *!
 */
#line 1007 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_mkmultiset_defined
DEFAULT_CMOD_STORAGE void f_mkmultiset(INT32 args) {
#line 1008 "/Users/hww3/devel/pike/src/builtin.cmod"
struct array * a;
#line 1008 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("mkmultiset",args,1);
#line 1008 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_ARRAY) SIMPLE_ARG_TYPE_ERROR("mkmultiset",1,"array");
#line 1008 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(a=Pike_sp[0-1].u.array);
#line 1011 "/Users/hww3/devel/pike/src/builtin.cmod"
{
do { struct multiset * ret_=(mkmultiset(a)); pop_stack(); push_multiset(ret_); return; }while(0);
#line 1013 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl int trace(int level, void|string facility, void|int all_threads)
 *!
 *! This function changes the trace level for the subsystem identified
 *! by @[facility] to @[level]. If @[facility] is zero or left out, it
 *! changes the global trace level which affects all subsystems.
 *!
 *! Enabling tracing causes messages to be printed to stderr. A higher
 *! trace level includes the output from all lower levels. The lowest
 *! level is zero which disables all trace messages.
 *!
 *! See the @tt{-t@} command-line option for more information.
 *!
 *! @param level
 *!   If @[facility] is specified then there is typically only one
 *!   trace level for it, i.e. it's an on-or-off toggle. The global
 *!   trace levels, when @[facility] isn't specified, are:
 *!
 *!   @int
 *!   @value 1
 *!  	Trace calls to Pike functions and garbage collector runs.
 *!   @value 2
 *!  	Trace calls to builtin functions.
 *!   @value 3
 *!  	Trace every interpreted opcode.
 *!   @value 4
 *!  	Also trace the opcode arguments.
 *!   @endint
 *!
 *! @param facility
 *!   Valid facilities are:
 *!
 *!   @string
 *!   @value "gc"
 *!     Trace the doings of the garbage collector. The setting is
 *!     never thread local. @[level] has two different meanings:
 *!     @dl
 *!     @item 1..2
 *!       Trace the start and end of each gc run.
 *!     @item 3..
 *!       Additionally show info about the collected garbage, to aid
 *!       hunting down garbage problems. This currently shows gc'd
 *!       trampolines. Note that the output can be very bulky and is
 *!       somewhat low-level technical. Also note that pike currently
 *!       has to be configured with @expr{--with-rtldebug@} to enable
 *!       this.
 *!     @enddl
 *!   @endstring
 *!
 *! @param all_threads
 *!   Trace levels are normally thread local, so changes affect only
 *!   the current thread. To change the level in all threads, pass a
 *!   nonzero value in this argument.
 *!
 *! @returns
 *!   The old trace level in the current thread is returned.
 */
#line 1071 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_trace_defined
DEFAULT_CMOD_STORAGE void f_trace(INT32 args) {
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE level;
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * facility;
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE all_threads;
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args < 1) wrong_number_of_args_error("trace",args,1);
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 3) wrong_number_of_args_error("trace",args,3);
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("trace",1,"int");
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
level=Pike_sp[0-args].u.integer;
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 1 &&
    (TYPEOF(Pike_sp[1-args]) != PIKE_T_INT ||
     Pike_sp[1-args].u.integer)) {
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-args]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("trace",2,"void|string");
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(facility=Pike_sp[1-args].u.string);
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
} else facility = NULL;
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
if ((args > 2) &&
    ((TYPEOF(Pike_sp[2-args]) != PIKE_T_INT) ||
     (SUBTYPEOF(Pike_sp[2-args]) != NUMBER_UNDEFINED))) {
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[2-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("trace",3,"void|int");
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
all_threads=Pike_sp[2-args].u.integer;
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
} else all_threads = 0;
#line 1075 "/Users/hww3/devel/pike/src/builtin.cmod"
{
INT32 old_level;
if (facility) {
struct pike_string *gc_str;
MAKE_CONST_STRING(gc_str, "gc");
if (facility == gc_str) {
old_level = gc_trace;
gc_trace = level;
}
else {
bad_arg_error("trace", Pike_sp-args, args, 2,
"trace facility identifier", Pike_sp-args+1,
"Bad argument 2 to trace(). Unknown trace facility.");
}
}
else {
old_level = Pike_interpreter.trace_level;
#ifdef PIKE_THREADS
 if (!all_threads)
Pike_interpreter.trace_level = level;
else {
struct thread_state *s;
FOR_EACH_THREAD(s, s->state.trace_level = level);
}
#else
 Pike_interpreter.trace_level = level;
#endif
 }
do { INT_TYPE ret_=(old_level); pop_n_elems(args); push_int(ret_); return; }while(0);
#line 1104 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl mapping(string:float) gc_parameters (void|mapping(string:mixed) params)
 *! @belongs Pike
 *!
 *! Set and get various parameters that control the operation of the
 *! garbage collector. The passed mapping contains the parameters to
 *! set. If a parameter is missing from the mapping, the current value
 *! will be filled in instead. The same mapping is returned. Thus an
 *! empty mapping, or no argument at all, causes a mapping with all
 *! current settings to be returned.
 *!
 *! The following parameters are recognized:
 *!
 *! @mapping
 *! @member int "enabled"
 *!   If this is 1 then the gc is enabled as usual. If it's 0 then all
 *!   automatically scheduled gc runs are disabled and the parameters
 *!   below have no effect, but explicit runs through the @[gc]
 *!   function still works as usual. If it's -1 then the gc is
 *!   completely disabled so that even explicit @[gc] calls won't do
 *!   anything.
 *! @member float "garbage_ratio_low"
 *!   As long as the gc time is less than time_ratio below, aim to run
 *!   the gc approximately every time the ratio between the garbage
 *!   and the total amount of allocated things is this.
 *! @member float "time_ratio"
 *!   When more than this fraction of the time is spent in the gc, aim
 *!   for garbage_ratio_high instead of garbage_ratio_low.
 *! @member float "garbage_ratio_high"
 *!   Upper limit for the garbage ratio - run the gc as often as it
 *!   takes to keep it below this.
 *! @member float "min_gc_time_ratio"
 *!   This puts an upper limit on the gc interval, in addition to the
 *!   factors above. It is specified as the minimum amount of time
 *!   spent doing gc, as a factor of the total time. The reason for
 *!   this limit is that the current amount of garbage can only be
 *!   measured in a gc run, and if the gc starts to run very seldom
 *!   due to very little garbage, it might get too slow to react to an
 *!   increase in garbage generation. Set to 0.0 to turn this limit
 *!   off.
 *! @member float "average_slowness"
 *!   When predicting the next gc interval, use a decaying average
 *!   with this slowness factor. It should be a value between 0.0 and
 *!   1.0 that specifies the weight to give to the old average value.
 *!   The remaining weight up to 1.0 is given to the last reading.
 *! @member function(:void) "pre_cb"
 *!   This function is called when the gc starts.
 *! @member function(:void) "post_cb"
 *!   This function is called when the mark and sweep pass of the gc
 *!   is done.
 *! @member function(object,int,int:void) "destruct_cb"
 *!   This function is called once for each object that is part of
 *!   a cycle just before the gc will destruct it.
 *!   The arguments are:
 *!   @dl
 *!     @item
 *!       The object to be destructed.
 *!     @item
 *!       The reason for it being destructed. One of:
 *!       @int
 *!         @value Object.DESTRUCT_CLEANUP
 *!           Destructed during exit.
 *!         @value Object.DESTRUCT_GC
 *!           Destructed during normal implicit or explicit @[gc()].
 *!       @endint
 *!     @item
 *!       The number of references it had.
 *!   @enddl
 *! @member function(int:void) "done_cb"
 *!   This function is called when the gc is done and about to exit.
 *!   The argument is the same value as will be returned by gc().
 *! @endmapping
 *!
 *! @seealso
 *!   @[gc], @[Debug.gc_status]
 */
#line 1181 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_gc_parameters_defined

#ifdef f_gc_parameters_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_gc_parameters_fun_num = 0;

#endif /* f_gc_parameters_fun_num_used */
DEFAULT_CMOD_STORAGE void f_gc_parameters(INT32 args) {
#line 1182 "/Users/hww3/devel/pike/src/builtin.cmod"
struct mapping * params;
#line 1182 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 1) wrong_number_of_args_error("gc_parameters",args,1);
#line 1182 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 0 &&
    (TYPEOF(Pike_sp[0-args]) != PIKE_T_INT ||
     Pike_sp[0-args].u.integer)) {
#line 1182 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_MAPPING) SIMPLE_ARG_TYPE_ERROR("gc_parameters",1,"void|mapping(string:mixed)");
#line 1182 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(params=Pike_sp[0-args].u.mapping);
#line 1182 "/Users/hww3/devel/pike/src/builtin.cmod"
} else params = NULL;
#line 1184 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct pike_string *str;
struct svalue *set;
struct svalue get;

if (!params) {
push_mapping (allocate_mapping (6));
params = Pike_sp[-1].u.mapping;
}

#define HANDLE_PARAM(NAME, CHECK_AND_SET, GET) do {			\
    MAKE_CONST_STRING (str, NAME);					\
    if ((set = low_mapping_string_lookup (params, str))) {		\
      CHECK_AND_SET;							\
    }									\
    else {								\
      GET;								\
      mapping_string_insert (params, str, &get);			\
    }									\
  } while (0)

#define HANDLE_FLOAT_FACTOR(NAME, VAR)					\
  HANDLE_PARAM (NAME, {							\
      if (TYPEOF(*set) != T_FLOAT ||					\
	  set->u.float_number < 0.0 || set->u.float_number > 1.0)	\
	SIMPLE_BAD_ARG_ERROR ("gc_parameters", 1,			\
			      "float between 0.0 and 1.0 for " NAME);	\
      VAR = DO_NOT_WARN ((double) set->u.float_number);			\
    }, {								\
      SET_SVAL(get, T_FLOAT, 0, float_number,				\
	       DO_NOT_WARN ((FLOAT_TYPE) VAR));				\
    });

HANDLE_PARAM ("enabled", {
if (TYPEOF(*set) != T_INT || set->u.integer < -1 || set->u.integer > 1)
SIMPLE_BAD_ARG_ERROR ("gc_parameters", 1,
"integer in the range -1..1 for 'enabled'");
if (gc_enabled != set->u.integer) {
if (gc_enabled > 0) {
/* Disabling automatic gc - save the old alloc_threshold and set it to
	   * the maximum value to avoid getting gc_evaluator_callback added. */
saved_alloc_threshold = alloc_threshold;
alloc_threshold = GC_MAX_ALLOC_THRESHOLD;
}
else if (set->u.integer > 0) {
/* Enabling automatic gc - restore the old alloc_threshold. If the
	   * gc interval has gotten longer than it should be then the
	   * multiplier calculation in do_gc should compensate. */
alloc_threshold = saved_alloc_threshold;
}
gc_enabled = set->u.integer;
}
}, {
SET_SVAL(get, T_INT, NUMBER_NUMBER, integer, gc_enabled);
});
HANDLE_FLOAT_FACTOR ("garbage_ratio_low", gc_garbage_ratio_low);
HANDLE_FLOAT_FACTOR ("time_ratio", gc_time_ratio);
HANDLE_FLOAT_FACTOR ("garbage_ratio_high", gc_garbage_ratio_high);
HANDLE_FLOAT_FACTOR ("min_gc_time_ratio", gc_min_time_ratio);
HANDLE_FLOAT_FACTOR ("average_slowness", gc_average_slowness);

HANDLE_PARAM("pre_cb", {
assign_svalue(&gc_pre_cb, set);
}, {
assign_svalue(&get, &gc_pre_cb);
});
HANDLE_PARAM("post_cb", {
assign_svalue(&gc_post_cb, set);
}, {
assign_svalue(&get, &gc_post_cb);
});
HANDLE_PARAM("destruct_cb", {
assign_svalue(&gc_destruct_cb, set);
}, {
assign_svalue(&get, &gc_destruct_cb);
});
HANDLE_PARAM("done_cb", {
assign_svalue(&gc_done_cb, set);
}, {
assign_svalue(&get, &gc_done_cb);
});

#undef HANDLE_PARAM
#undef HANDLE_FLOAT_FACTOR

do { struct mapping * ret_=(params); add_ref(ret_); pop_n_elems(args); push_mapping(ret_); return; }while(0);
#line 1270 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl string ctime(int timestamp)
 *!
 *! Convert the output from a previous call to @[time()] into a readable
 *! string containing the current year, month, day and time.
 *!
 *! Like @[localtime], this function might throw an error if the
 *! ctime(2) call failed on the system. It's platform dependent what
 *! time ranges that function can handle, e.g. Windows doesn't handle
 *! a negative @[timestamp].
 *!
 *! @seealso
 *! @[time()], @[localtime()], @[mktime()], @[gmtime()]
 */
#line 1285 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_ctime_defined
DEFAULT_CMOD_STORAGE void f_ctime(INT32 args) {
#line 1286 "/Users/hww3/devel/pike/src/builtin.cmod"
LONGEST timestamp;
#line 1286 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("ctime",args,1);
#line 1286 "/Users/hww3/devel/pike/src/builtin.cmod"
if (TYPEOF(Pike_sp[0-1]) != PIKE_T_INT  && !is_bignum_object_in_svalue (Pike_sp+0-1)) SIMPLE_ARG_TYPE_ERROR("ctime",1,"int");
#line 1286 "/Users/hww3/devel/pike/src/builtin.cmod"
if (TYPEOF(Pike_sp[0-1]) == PIKE_T_INT)
#line 1286 "/Users/hww3/devel/pike/src/builtin.cmod"
 timestamp = Pike_sp[0-1].u.integer;
#line 1286 "/Users/hww3/devel/pike/src/builtin.cmod"
else
#if SIZEOF_LONGEST > SIZEOF_INT_TYPE
#line 1286 "/Users/hww3/devel/pike/src/builtin.cmod"
if (!int64_from_bignum (&(timestamp), Pike_sp[0-1].u.object))

#endif
#line 1286 "/Users/hww3/devel/pike/src/builtin.cmod"
 SIMPLE_ARG_ERROR ("ctime", 1, "Integer too large.");
#line 1289 "/Users/hww3/devel/pike/src/builtin.cmod"
{
time_t i;
char *s;

#if SIZEOF_TIME_T < SIZEOF_LONGEST
 if (timestamp > MAX_TIME_T || timestamp < MIN_TIME_T)
SIMPLE_ARG_ERROR ("ctime", 1, "Timestamp outside valid range.");
#endif

i = (time_t) timestamp;
s = ctime (&i);
if (!s) Pike_error ("ctime() on this system cannot handle "
"the timestamp %ld.\n", (long) i);
do { struct pike_string * ret_=(make_shared_string(s)); pop_stack(); push_string(ret_); return; }while(0);
#line 1303 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl mapping mkmapping(array ind, array val)
 *!
 *! Make a mapping from two arrays.
 *!
 *! Makes a mapping @[ind[x]]:@[val[x]], @tt{0 <= x < sizeof(ind)@}.
 *!
 *! @[ind] and @[val] must have the same size.
 *!
 *! This is the inverse operation of @[indices()] and @[values()].
 *!
 *! @seealso
 *! @[indices()], @[values()]
 */
#line 1318 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_mkmapping_defined
DEFAULT_CMOD_STORAGE void f_mkmapping(INT32 args) {
#line 1319 "/Users/hww3/devel/pike/src/builtin.cmod"
struct array * ind;
#line 1319 "/Users/hww3/devel/pike/src/builtin.cmod"
struct array * val;
#line 1319 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("mkmapping",args,2);
#line 1319 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_ARRAY) SIMPLE_ARG_TYPE_ERROR("mkmapping",1,"array");
#line 1319 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(ind=Pike_sp[0-2].u.array);
#line 1319 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-2]) != PIKE_T_ARRAY) SIMPLE_ARG_TYPE_ERROR("mkmapping",2,"array");
#line 1319 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(val=Pike_sp[1-2].u.array);
#line 1322 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if(ind->size != val->size)
bad_arg_error("mkmapping", Pike_sp-args, args, 2, "array", Pike_sp+1-args,
"mkmapping called on arrays of different sizes (%d != %d)\n",
ind->size, val->size);

do { struct mapping * ret_=(mkmapping(ind, val)); pop_n_elems(2); push_mapping(ret_); return; }while(0);
#line 1329 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl string secure(string str)
 *! @belongs String
 *!
 *! Marks the string as secure, which will clear the memory area
 *! before freeing the string.
 *!
 *! @seealso
 *!   @[Object.secure()]
 */
#define f_string_secure_defined

#ifdef f_string_secure_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_string_secure_fun_num = 0;

#endif /* f_string_secure_fun_num_used */
DEFAULT_CMOD_STORAGE void f_string_secure(INT32 args) {
#line 1340 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * str;
#line 1340 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("string_secure",args,1);
#line 1340 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("string_secure",1,"string");
#line 1340 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(str=Pike_sp[0-1].u.string);
#line 1343 "/Users/hww3/devel/pike/src/builtin.cmod"
{
str->flags |= STRING_CLEAR_ON_EXIT;
do { struct pike_string * ret_=(str); add_ref(ret_); pop_stack(); push_string(ret_); return; }while(0);
#line 1346 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl object secure(object str)
 *! @belongs Object
 *!
 *! Marks the object as secure, which will clear the memory area
 *! before freeing the object.
 *!
 *! @seealso
 *!   @[String.secure()]
 */
#define f_object_secure_defined

#ifdef f_object_secure_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_object_secure_fun_num = 0;

#endif /* f_object_secure_fun_num_used */
DEFAULT_CMOD_STORAGE void f_object_secure(INT32 args) {
#line 1357 "/Users/hww3/devel/pike/src/builtin.cmod"
struct object * obj;
#line 1357 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("object_secure",args,1);
#line 1357 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_OBJECT) SIMPLE_ARG_TYPE_ERROR("object_secure",1,"object");
#line 1357 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(obj=Pike_sp[0-1].u.object);
#line 1360 "/Users/hww3/devel/pike/src/builtin.cmod"
{
obj->flags |= OBJECT_CLEAR_ON_EXIT;
do { struct object * ret_=(obj); add_ref(ret_); pop_stack(); push_object(ret_); return; }while(0);
#line 1363 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl int count(string haystack, string needle)
 *! @belongs String
 *!
 *! Count the number of non-overlapping times the string @[needle]
 *! occurs in the string @[haystack]. The special cases for the needle
 *! @expr{""@} is that it occurs one time in the empty string, zero
 *! times in a one character string and between every character
 *! (length-1) in any other string.
 *!
 *! @seealso
 *! @[search()], @[`/()]
 */
#line 1377 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_string_count_defined

#ifdef f_string_count_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_string_count_fun_num = 0;

#endif /* f_string_count_fun_num_used */
DEFAULT_CMOD_STORAGE void f_string_count(INT32 args) {
#line 1378 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * haystack;
#line 1378 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * needle;
#line 1378 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("count",args,2);
#line 1378 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("count",1,"string");
#line 1378 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(haystack=Pike_sp[0-2].u.string);
#line 1378 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-2]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("count",2,"string");
#line 1378 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(needle=Pike_sp[1-2].u.string);
#line 1381 "/Users/hww3/devel/pike/src/builtin.cmod"
{
ptrdiff_t c = 0;
ptrdiff_t i, j;

switch (needle->len)
{
case 0:
switch (haystack->len)
{
case 0: c=1; break; /* "" appears one time in "" */
case 1: c=0; break; /* "" doesn't appear in "x" */
default: c=haystack->len-1; /* one time between each character */
}
break;
case 1:
/* maybe optimize? */
/* It is already fairly optimized in pike_search_engine. */
default:
for (i=0; i<haystack->len; i++)
{
j=string_search(haystack,needle,i);
if (j==-1) break;
i=j+needle->len-1;
c++;
}
break;
}
do { INT_TYPE ret_=(DO_NOT_WARN((INT_TYPE)c)); pop_n_elems(2); push_int(ret_); return; }while(0);
#line 1409 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl string trim_whites (string s)
 *! @belongs String
 *!
 *! Trim leading and trailing spaces and tabs from the string @[s].
 */
#line 1416 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_string_trim_whites_defined

#ifdef f_string_trim_whites_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_string_trim_whites_fun_num = 0;

#endif /* f_string_trim_whites_fun_num_used */
DEFAULT_CMOD_STORAGE void f_string_trim_whites(INT32 args) {
#line 1417 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * s;
#line 1417 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("trim_whites",args,1);
#line 1417 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("trim_whites",1,"string");
#line 1417 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(s=Pike_sp[0-1].u.string);
#line 1420 "/Users/hww3/devel/pike/src/builtin.cmod"
{
ptrdiff_t start = 0, end = s->len;
int chr;
switch (s->size_shift) {
#define DO_IT(TYPE)							\
    {									\
      for (; start < s->len; start++) {					\
	chr = ((TYPE *) s->str)[start];					\
	if (chr != ' ' && chr != '\t') break;				\
      }									\
      while (--end > start) {						\
	chr = ((TYPE *) s->str)[end];					\
	if (chr != ' ' && chr != '\t') break;				\
      }									\
    }
 case 0: DO_IT (p_wchar0); break;
case 1: DO_IT (p_wchar1); break;
case 2: DO_IT (p_wchar2); break;
#undef DO_IT
 }
do { struct pike_string * ret_=(string_slice (s, start, end + 1 - start)); pop_stack(); push_string(ret_); return; }while(0);
#line 1441 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl string normalize_space (string s, string|void whitespace)
 *! @belongs String
 *!
 *! @param s
 *! Is returned after white space in it has been normalised.
 *! White space is normalised by stripping leading and trailing white space
 *! and replacing sequences of white space characters with a single space.
 *!
 *! @param whitespace
 *! Defines what is considered to be white space eligible for normalisation.
 *! It has a default value that starts with @expr{" \t\r\n\v\f"@} and in
 *! addition to that contains all whitespace characters part of Unicode.
 *! The first character denotes the character for replacing whitespace
 *! sequences.
 *!
 *! @note
 *! Trailing and leading whitespace around \r and \n characters
 *! is stripped as well (only useful if they're not in the @[whitespace] set).
 *!
 *! @note
 *! This function is a lot faster with just one argument (i.e. the builtin
 *! whitespace set has an optimised code path).
 */
#line 1466 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_string_normalize_space_defined

#ifdef f_string_normalize_space_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_string_normalize_space_fun_num = 0;

#endif /* f_string_normalize_space_fun_num_used */
DEFAULT_CMOD_STORAGE void f_string_normalize_space(INT32 args) {
#line 1467 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * s;
#line 1467 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * whitespace;
#line 1467 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args < 1) wrong_number_of_args_error("string_normalize_space",args,1);
#line 1467 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 2) wrong_number_of_args_error("string_normalize_space",args,2);
#line 1467 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("normalize_space",1,"string");
#line 1467 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(s=Pike_sp[0-args].u.string);
#line 1467 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 1 &&
    (TYPEOF(Pike_sp[1-args]) != PIKE_T_INT ||
     Pike_sp[1-args].u.integer)) {
#line 1467 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-args]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("normalize_space",2,"string|void");
#line 1467 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(whitespace=Pike_sp[1-args].u.string);
#line 1467 "/Users/hww3/devel/pike/src/builtin.cmod"
} else whitespace = NULL;
#line 1470 "/Users/hww3/devel/pike/src/builtin.cmod"
{
size_t len = s->len, wlen;
const void *src = s->str;
unsigned shift = s->size_shift, replspace;
const void *ws;
void *wstemp = 0;
struct string_builder sb;
unsigned foundspace = 0;

wlen = replspace = 0; /* useless, but suppresses silly compiler warning */

{
unsigned bshift = shift, wshift;
if(whitespace)
if(!(wlen = whitespace->len))
do { struct pike_string * ret_=(s); add_ref(ret_); pop_n_elems(args); push_string(ret_); return; }while(0);
#line 1486 "/Users/hww3/devel/pike/src/builtin.cmod"
else {
ws = whitespace->str; wshift = whitespace->size_shift;
replspace = index_shared_string(whitespace, 0);
if(replspace > 0xffff)
bshift = 2;
else if(replspace > 0xff && !bshift)
bshift = 1;
if(wshift!=shift) { /* convert whitespace to shift of input */
PCHARP pcnws;
wstemp = xalloc(wlen<<shift);
pcnws = MKPCHARP(wstemp, shift);
if(wshift>shift) {
PCHARP pcows = MKPCHARP_STR(whitespace);
size_t clen = wlen, i;
i = wlen = 0;
do {
unsigned chr = INDEX_PCHARP(pcows, i++);
if (chr<=0xff || (chr<=0xffff && shift)) /* shift is 0 or 1 */
SET_INDEX_PCHARP(pcnws, wlen++, chr);
} while(--clen);
} else
pike_string_cpy(pcnws, whitespace);
ws = wstemp;
}
}
else
ws = 0;

init_string_builder_alloc (&sb, len, bshift);
if(bshift == shift)
sb.known_shift = bshift;
}

switch (shift) {
#define NORMALISE_TIGHT_LOOP(TYPE,CASE)					\
    {									\
      const TYPE *start = src, *end = start+len;			\
      if (!ws) {							\
        TYPE *dst = (void*)sb.s->str;					\
        for (; start < end; start++) {					\
	  switch(*start) {						\
	    CASE							\
	      continue;							\
          }								\
          break;							\
        }								\
        for (; start < end; start++) {					\
	  if(*start<=' ' || *start>=0x85)  /* optimise common case */	\
	    switch(*start) {						\
	      CASE							\
	        if (!foundspace)					\
	          *dst++ = ' ', foundspace=1;				\
	        continue;						\
	      default:goto found##TYPE;					\
	    }								\
	  else								\
found##TYPE:								\
	    foundspace=0;						\
	  *dst++ = *start;						\
	}								\
	sb.s->len = dst - (TYPE*)sb.s->str;				\
      } else {								\
	const TYPE*ps = (const TYPE*)ws+wlen;				\
        for (; start < end; start++) {					\
	  size_t clen = wlen;						\
          do {								\
            if (ps[0-clen] == *start)					\
              goto lead##TYPE;						\
          } while(--clen);						\
          break;							\
lead##TYPE:;								\
        }								\
        for (; start < end; start++) {					\
	  TYPE chr = *start;						\
	  size_t clen = wlen;						\
          do								\
            if (ps[0-clen] == chr) {					\
	      if (!foundspace)						\
	        string_builder_putchar(&sb, replspace), foundspace=1;	\
              goto skip##TYPE;						\
            }								\
          while(--clen);						\
	  if (foundspace && (chr=='\n' || chr=='\r')) {			\
	    sb.s->len--; string_builder_putchar(&sb, chr);		\
	    foundspace=0;						\
            goto lead##TYPE;						\
	  }								\
	  string_builder_putchar(&sb, chr); foundspace=0;		\
skip##TYPE:;								\
        }								\
      }									\
    }
 case 0: NORMALISE_TIGHT_LOOP (p_wchar0,SPACECASE8); break;
case 1: NORMALISE_TIGHT_LOOP (p_wchar1,SPACECASE16); break;
case 2: NORMALISE_TIGHT_LOOP (p_wchar2,SPACECASE16); break;
#undef NORMALISE_TIGHT_LOOP
 }
if (wstemp)
free(wstemp);
if (foundspace)
sb.s->len--;
do { struct pike_string * ret_=(finish_string_builder (&sb)); pop_n_elems(args); push_string(ret_); return; }while(0);
#line 1588 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl string trim_all_whites (string s)
 *! @belongs String
 *!
 *! Trim leading and trailing white spaces characters (space, tab,
 *! newline, carriage return, form feed, vertical tab and all the
 *! white spaces defined in Unicode) from the string @[s].
 */
#line 1597 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_string_trim_all_whites_defined

#ifdef f_string_trim_all_whites_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_string_trim_all_whites_fun_num = 0;

#endif /* f_string_trim_all_whites_fun_num_used */
DEFAULT_CMOD_STORAGE void f_string_trim_all_whites(INT32 args) {
#line 1598 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * s;
#line 1598 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("trim_all_whites",args,1);
#line 1598 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("trim_all_whites",1,"string");
#line 1598 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(s=Pike_sp[0-1].u.string);
#line 1601 "/Users/hww3/devel/pike/src/builtin.cmod"
{
ptrdiff_t start = 0, end = s->len;
int chr;
switch (s->size_shift) {

#define DO_IT(TYPE,CASE)						\
    {									\
      for (; start < end; start++) {					\
	chr = ((TYPE *) s->str)[start];					\
	switch(chr) {							\
	  CASE								\
	    continue;							\
	}								\
	break;								\
      }									\
      while (--end > start) {						\
	chr = ((TYPE *) s->str)[end];					\
	switch(chr) {							\
	  CASE								\
	    continue;							\
	}								\
	break;								\
      }									\
    }
 case 0: DO_IT (p_wchar0,SPACECASE8); break;
case 1: DO_IT (p_wchar1,SPACECASE16); break;
case 2: DO_IT (p_wchar2,SPACECASE16); break;
#undef DO_IT
 }
do { struct pike_string * ret_=(string_slice (s, start, end + 1 - start)); pop_stack(); push_string(ret_); return; }while(0);
#line 1631 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl string status(int verbose)
 *! @belongs String
 *!
 *!   Get string table statistics.
 *!
 *! @returns
 *!   Returns a string with an ASCII table containing
 *!   the current string table statistics.
 *!
 *! @note
 *!   Currently returns the empty string (@expr{""@})
 *!   if @[verbose] is zero.
 *!
 *! @note
 *!   The formatting and contents of the result
 *!   may vary between different versions of Pike.
 */
#define f_string_status_defined

#ifdef f_string_status_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_string_status_fun_num = 0;

#endif /* f_string_status_fun_num_used */
DEFAULT_CMOD_STORAGE void f_string_status(INT32 args) {
#line 1650 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE verbose;
#line 1650 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("status",args,1);
#line 1650 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("status",1,"int");
#line 1650 "/Users/hww3/devel/pike/src/builtin.cmod"
verbose=Pike_sp[0-1].u.integer;
#line 1652 "/Users/hww3/devel/pike/src/builtin.cmod"
{
do { struct pike_string * ret_=(add_string_status(verbose)); pop_stack(); push_string(ret_); return; }while(0);
#line 1654 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl int implements(program prog, program api)
 *! @belongs Program
 *!
 *! Returns 1 if @[prog] implements @[api].
 */
#line 1661 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_program_implements_defined

#ifdef f_program_implements_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_program_implements_fun_num = 0;

#endif /* f_program_implements_fun_num_used */
DEFAULT_CMOD_STORAGE void f_program_implements(INT32 args) {
#line 1662 "/Users/hww3/devel/pike/src/builtin.cmod"
struct program * prog;
#line 1662 "/Users/hww3/devel/pike/src/builtin.cmod"
struct program * api;
#line 1662 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("implements",args,2);
#line 1662 "/Users/hww3/devel/pike/src/builtin.cmod"
if(!(prog=program_from_svalue(Pike_sp+0-2))) SIMPLE_ARG_TYPE_ERROR("implements",1,"program");
#line 1662 "/Users/hww3/devel/pike/src/builtin.cmod"
if(!(api=program_from_svalue(Pike_sp+1-2))) SIMPLE_ARG_TYPE_ERROR("implements",2,"program");
#line 1665 "/Users/hww3/devel/pike/src/builtin.cmod"
{
do { INT_TYPE ret_=(implements(prog, api)); pop_n_elems(2); push_int(ret_); return; }while(0);
#line 1667 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl int inherits(program|object child, program parent)
 *! @belongs Program
 *!
 *! Returns 1 if @[child] has inherited @[parent].
 */
#line 1674 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_program_inherits_defined

#ifdef f_program_inherits_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_program_inherits_fun_num = 0;

#endif /* f_program_inherits_fun_num_used */
DEFAULT_CMOD_STORAGE void f_program_inherits(INT32 args) {
#line 1675 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * child;
#line 1675 "/Users/hww3/devel/pike/src/builtin.cmod"
struct program * parent;
#line 1675 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("inherits",args,2);
#line 1675 "/Users/hww3/devel/pike/src/builtin.cmod"
child=Pike_sp+0-2; dmalloc_touch_svalue(Pike_sp+0-2);
#line 1675 "/Users/hww3/devel/pike/src/builtin.cmod"
if(!(parent=program_from_svalue(Pike_sp+1-2))) SIMPLE_ARG_TYPE_ERROR("inherits",2,"program");
#line 1678 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct program *p = program_from_svalue(child);

if (!p)
SIMPLE_ARG_TYPE_ERROR("inherits", 1, "program|object");
do { INT_TYPE ret_=(low_get_storage(p, parent) != -1); pop_n_elems(2); push_int(ret_); return; }while(0);
#line 1684 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl string defined(program p)
 *! @belongs Program
 *!
 *! Returns a string with filename and linenumber describing where
 *! the program @[p] was defined.
 *!
 *! The returned string is of the format @expr{"filename:linenumber"@}.
 *!
 *! If it cannot be determined where the program was defined, @expr{0@}
 *! (zero) will be returned.
 */
#line 1697 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_program_defined_defined

#ifdef f_program_defined_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_program_defined_fun_num = 0;

#endif /* f_program_defined_fun_num_used */
DEFAULT_CMOD_STORAGE void f_program_defined(INT32 args) {
#line 1698 "/Users/hww3/devel/pike/src/builtin.cmod"
struct program * p;
#line 1698 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("defined",args,1);
#line 1698 "/Users/hww3/devel/pike/src/builtin.cmod"
if(!(p=program_from_svalue(Pike_sp+0-1))) SIMPLE_ARG_TYPE_ERROR("defined",1,"program");
#line 1701 "/Users/hww3/devel/pike/src/builtin.cmod"
{
INT_TYPE line;
struct pike_string *tmp = low_get_program_line(p, &line);

pop_n_elems(args);

if (tmp) {
push_string(tmp);
if(line >= 1)
{
push_text(":");
push_int(line);
f_add(3);
}
}
else
push_int(0);
}

}
/*! @decl int(8..8)|int(16..16)|int(32..32) width(string s)
 *! @belongs String
 *!
 *! Returns the width of a string.
 *!
 *! @returns
 *!   Three return values are currently possible:
 *!   @int
 *!     @value 8
 *!       The string @[s] only contains characters <= 255.
 *!     @value 16
 *!       The string @[s] only contains characters <= 65535.
 *!     @value 32
 *!       The string @[s] contains characters >= 65536.
 *!   @endint
 *!
 *! @note
 *!   It is possible that a future version of Pike may return
 *!   further values. In particular the width @expr{7@} seems
 *!   like it could be useful.
 */
#line 1741 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_string_width_defined

#ifdef f_string_width_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_string_width_fun_num = 0;

#endif /* f_string_width_fun_num_used */
DEFAULT_CMOD_STORAGE void f_string_width(INT32 args) {
#line 1742 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * s;
#line 1742 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("width",args,1);
#line 1742 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("width",1,"string");
#line 1742 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(s=Pike_sp[0-1].u.string);
#line 1745 "/Users/hww3/devel/pike/src/builtin.cmod"
{
do { INT_TYPE ret_=(8 * (1 << s->size_shift)); pop_stack(); push_int(ret_); return; }while(0);
#line 1747 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl mixed m_delete(object|mapping map, mixed index)
 *!
 *! If @[map] is an object that implements @[lfun::_m_delete()],
 *! that function will be called with @[index] as its single argument.
 *!
 *! Otherwise if @[map] is a mapping the entry with index @[index]
 *! will be removed from @[map] destructively.
 *!
 *! If the mapping does not have an entry with index @[index], nothing is done.
 *!
 *! @returns
 *!   The value that was removed will be returned.
 *!
 *! @note
 *!   Note that @[m_delete()] changes @[map] destructively.
 *!
 *! @seealso
 *!   @[mappingp()]
 */
#line 1768 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_m_delete_defined
DEFAULT_CMOD_STORAGE void f_m_delete(INT32 args) {
#line 1769 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * map;
#line 1769 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * index;
#line 1769 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("m_delete",args,2);
#line 1769 "/Users/hww3/devel/pike/src/builtin.cmod"
map=Pike_sp+0-2; dmalloc_touch_svalue(Pike_sp+0-2);
#line 1769 "/Users/hww3/devel/pike/src/builtin.cmod"
index=Pike_sp+1-2; dmalloc_touch_svalue(Pike_sp+1-2);
#line 1773 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct program *p;
if( TYPEOF(*map) == T_MAPPING )
{
struct svalue s;
map_delete_no_free(map->u.mapping, index, &s);
pop_n_elems(args);
*Pike_sp=s;
Pike_sp++;
dmalloc_touch_svalue(Pike_sp-1);
}
else if (TYPEOF(*map) == T_OBJECT && (p = map->u.object->prog))
{
int id = FIND_LFUN(p->inherits[SUBTYPEOF(*map)].prog, LFUN__M_DELETE);

if( id == -1 )
SIMPLE_BAD_ARG_ERROR("m_delete", 1, "object containing the _m_delete method");

apply_low(map->u.object,
id + p->inherits[SUBTYPEOF(*map)].identifier_level, 1);
stack_swap();
pop_stack();
} else {
SIMPLE_BAD_ARG_ERROR("m_delete", 1, "object|mapping");
}
}

}
/*! @decl int get_weak_flag(array|mapping|multiset m)
 *!
 *! Returns the weak flag settings for @[m]. It's a combination of
 *! @[Pike.WEAK_INDICES] and @[Pike.WEAK_VALUES].
 */
#line 1805 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_get_weak_flag_1_defined
DEFAULT_CMOD_STORAGE void f_get_weak_flag_1(INT32 args) {
#line 1806 "/Users/hww3/devel/pike/src/builtin.cmod"
struct array * m;
#line 1806 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("get_weak_flag",args,1);
#line 1806 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_ARRAY) SIMPLE_ARG_TYPE_ERROR("get_weak_flag",1,"array");
#line 1806 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(m=Pike_sp[0-1].u.array);
#line 1809 "/Users/hww3/devel/pike/src/builtin.cmod"
{
do { INT_TYPE ret_=((m->flags & ARRAY_WEAK_FLAG) ? PIKE_WEAK_VALUES : 0); pop_stack(); push_int(ret_); return; }while(0);
#line 1811 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
#line 1813 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_get_weak_flag_2_defined

#ifdef f_get_weak_flag_2_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_get_weak_flag_2_fun_num = 0;

#endif /* f_get_weak_flag_2_fun_num_used */
DEFAULT_CMOD_STORAGE void f_get_weak_flag_2(INT32 args) {
#line 1814 "/Users/hww3/devel/pike/src/builtin.cmod"
struct mapping * m;
#line 1814 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("get_weak_flag",args,1);
#line 1814 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_MAPPING) SIMPLE_ARG_TYPE_ERROR("get_weak_flag",1,"mapping(mixed:mixed)");
#line 1814 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(m=Pike_sp[0-1].u.mapping);
{
do { INT_TYPE ret_=(mapping_get_flags(m) & MAPPING_WEAK); pop_stack(); push_int(ret_); return; }while(0);
#line 1817 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
#line 1819 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_get_weak_flag_3_defined

#ifdef f_get_weak_flag_3_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_get_weak_flag_3_fun_num = 0;

#endif /* f_get_weak_flag_3_fun_num_used */
DEFAULT_CMOD_STORAGE void f_get_weak_flag_3(INT32 args) {
#line 1820 "/Users/hww3/devel/pike/src/builtin.cmod"
struct multiset * m;
#line 1820 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("get_weak_flag",args,1);
#line 1820 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_MULTISET) SIMPLE_ARG_TYPE_ERROR("get_weak_flag",1,"multiset");
#line 1820 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(m=Pike_sp[0-1].u.multiset);
{
do { INT_TYPE ret_=(multiset_get_flags(m) & MULTISET_WEAK); pop_stack(); push_int(ret_); return; }while(0);
#line 1823 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}

#if defined(f_get_weak_flag_1_defined) || defined(f_get_weak_flag_2_defined) || defined(f_get_weak_flag_3_defined)
#define f_get_weak_flag_defined

#ifdef f_get_weak_flag_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_get_weak_flag_fun_num = 0;

#endif /* f_get_weak_flag_fun_num_used */
DEFAULT_CMOD_STORAGE void f_get_weak_flag(INT32 args) {
  if(args < 1) wrong_number_of_args_error("get_weak_flag",args,1);
  switch(TYPEOF(Pike_sp[0-args])) {
   case PIKE_T_MULTISET:

#ifdef f_get_weak_flag_3_defined
    f_get_weak_flag_3(args);
    return;

#endif /* f_get_weak_flag_3_defined */
    break;
   case PIKE_T_ARRAY:

#ifdef f_get_weak_flag_1_defined
    f_get_weak_flag_1(args);
    return;

#endif /* f_get_weak_flag_1_defined */
    break;
   case PIKE_T_MAPPING:

#ifdef f_get_weak_flag_2_defined
    f_get_weak_flag_2(args);
    return;

#endif /* f_get_weak_flag_2_defined */
    break;
   default:
    SIMPLE_BAD_ARG_ERROR("get_weak_flag",1,"multiset|array|mapping");
  }
}

#endif /* f_get_weak_flag_1_defined, f_get_weak_flag_2_defined, f_get_weak_flag_3_defined */
/*! @decl program __empty_program(int|void line, string|void file)
 */
#define f_cq___empty_program_defined
DEFAULT_CMOD_STORAGE void f_cq___empty_program(INT32 args) {
#line 1827 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE line;
#line 1827 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * file;
#line 1827 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 2) wrong_number_of_args_error("__empty_program",args,2);
#line 1827 "/Users/hww3/devel/pike/src/builtin.cmod"
if ((args > 0) &&
    ((TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) ||
     (SUBTYPEOF(Pike_sp[0-args]) != NUMBER_UNDEFINED))) {
#line 1827 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("__empty_program",1,"int|void");
#line 1827 "/Users/hww3/devel/pike/src/builtin.cmod"
line=Pike_sp[0-args].u.integer;
#line 1827 "/Users/hww3/devel/pike/src/builtin.cmod"
} else line = 0;
#line 1827 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 1 &&
    (TYPEOF(Pike_sp[1-args]) != PIKE_T_INT ||
     Pike_sp[1-args].u.integer)) {
#line 1827 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-args]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("__empty_program",2,"string|void");
#line 1827 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(file=Pike_sp[1-args].u.string);
#line 1827 "/Users/hww3/devel/pike/src/builtin.cmod"
} else file = NULL;
#line 1830 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct program *prog = low_allocate_program();
if (file) ext_store_program_line (prog, line, file);
do { struct program * ret_=(prog); pop_n_elems(args); push_program(ret_); return; }while(0);
#line 1834 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
#line 1836 "/Users/hww3/devel/pike/src/builtin.cmod"
/* Cut the string at the first NUL. */
static struct pike_string *delambda(struct pike_string *str)
{
PCHARP pcharp = MKPCHARP_STR(str);
ptrdiff_t len = pcharp_strlen(pcharp);
if (len == str->len) {
/* Common case. */
add_ref(str);
return str;
}
return make_shared_binary_pcharp(pcharp, len);
}

/*! @decl string function_name(function|program f)
 *!
 *! Return the name of the function or program @[f].
 *!
 *! If @[f] is a global function defined in the runtime @expr{0@}
 *! (zero) will be returned.
 *!
 *! @seealso
 *! @[function_object()]
 */
PMOD_EXPORT
#define f_function_name_defined
DEFAULT_CMOD_STORAGE void f_function_name(INT32 args) {
#line 1860 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * func;
#line 1860 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("function_name",args,1);
#line 1860 "/Users/hww3/devel/pike/src/builtin.cmod"
func=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
#line 1863 "/Users/hww3/devel/pike/src/builtin.cmod"
{
int f = -1;
struct program *p = NULL;

switch(TYPEOF(*func))
{
default:
SIMPLE_BAD_ARG_ERROR("function_name", 1, "function|program");
return; /* NOTREACHED */

case PIKE_T_PROGRAM:
{
p = func->u.program;

if(p->parent)
{
int e;
p=p->parent;
/* search constants in parent for this
	 * program...
	 */

for(e = p->num_identifier_references; e--; )
{
struct identifier *id;
if (p->identifier_references[e].id_flags & ID_HIDDEN)
continue;

id = ID_FROM_INT(p, e);
if (IDENTIFIER_IS_CONSTANT(id->identifier_flags) &&
(id->func.const_info.offset >= 0) &&
is_eq( & PROG_FROM_INT(p, e)->constants[id->func.const_info.offset].sval,
func))
do { struct pike_string * ret_=(id->name); add_ref(ret_); pop_stack(); push_string(ret_); return; }while(0);
#line 1897 "/Users/hww3/devel/pike/src/builtin.cmod"
}
#ifdef PIKE_DEBUG
 if (d_flag>5) {
fprintf(stderr,
"Failed to find symbol for program %p\n"
"Parent program info:\n",
func->u.program);
dump_program_tables(func->u.program->parent, 0);
}
#endif
 }
break;
}

case PIKE_T_FUNCTION:
if((f = SUBTYPEOF(*func)) == FUNCTION_BUILTIN) break;
if(!(p = func->u.object->prog))
bad_arg_error("function_name", Pike_sp-args, args, 1,
"function", Pike_sp-args,
"Destructed object.\n");
if(p == pike_trampoline_program)
{
struct pike_trampoline *t;
t=((struct pike_trampoline *)func->u.object->storage);

if(t->frame->current_object->prog) {
p = t->frame->current_object->prog;
f = t->func;
}
}

#ifdef PIKE_DEBUG
 if(f >= p->num_identifier_references)
Pike_fatal("Function without reference.\n");
#endif
 do { struct pike_string * ret_=(delambda(ID_FROM_INT(p, f)->name)); pop_stack(); push_string(ret_); return; }while(0);
#line 1933 "/Users/hww3/devel/pike/src/builtin.cmod"
}
pop_n_elems(args);
push_int(0);
}

}
/*! @decl object function_object(function f)
 *!
 *!   Return the object the function @[f] is in.
 *!
 *!   If @[f] is a global function defined in the runtime @expr{0@}
 *!   (zero) will be returned.
 *!
 *!   Zero will also be returned if @[f] is a constant in the
 *!   parent class. In that case @[function_program()] can be
 *!   used to get the parent program.
 *!
 *! @seealso
 *!   @[function_name()], @[function_program()]
 */
#line 1952 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_function_object_defined
DEFAULT_CMOD_STORAGE void f_function_object(INT32 args) {
#line 1953 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * func;
#line 1953 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("function_object",args,1);
#line 1953 "/Users/hww3/devel/pike/src/builtin.cmod"
func=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
#line 1957 "/Users/hww3/devel/pike/src/builtin.cmod"
{
switch(TYPEOF(*func))
{
case PIKE_T_PROGRAM:
break;

case PIKE_T_FUNCTION:
if(SUBTYPEOF(*func) == FUNCTION_BUILTIN) break;
if(func->u.object->prog == pike_trampoline_program)
{
struct object *o;
o=((struct pike_trampoline *)func->u.object->storage)->frame->current_object;
add_ref(o);
pop_n_elems(args);
push_object(o);
return;
}
SET_SVAL(*func, T_OBJECT, 0, object, func->u.object);
return;


default:
SIMPLE_BAD_ARG_ERROR("function_object",1,"function");
}
pop_n_elems(args);
push_int(0);
}

}
/*! @decl program function_program(function|program f)
 *!
 *!   Return the program the function @[f] is in.
 *!
 *!   If @[f] is a global function defined in the runtime @expr{0@}
 *!   (zero) will be returned.
 *!
 *! @seealso
 *!   @[function_name()], @[function_object()]
 */
#line 1995 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_function_program_defined
DEFAULT_CMOD_STORAGE void f_function_program(INT32 args) {
#line 1996 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * func;
#line 1996 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("function_program",args,1);
#line 1996 "/Users/hww3/devel/pike/src/builtin.cmod"
func=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
#line 1999 "/Users/hww3/devel/pike/src/builtin.cmod"
{
switch(TYPEOF(*func))
{
case PIKE_T_PROGRAM:
{
struct program *p;
if(!(p=func->u.program->parent)) break;
add_ref(p);
free_program(func->u.program);
func->u.program=p;
return;
}

case PIKE_T_FUNCTION:
{
struct program *p;
if(SUBTYPEOF(*func) == FUNCTION_BUILTIN)
p = func->u.efun->prog;
else
p = func->u.object->prog;
if(p == pike_trampoline_program)
{
p = ((struct pike_trampoline *)func->u.object->storage)->
frame->current_object->prog;
}
if (p) {
ref_push_program(p);
stack_pop_n_elems_keep_top(args);
return;
}
}
break;

default:
SIMPLE_BAD_ARG_ERROR("function_program", 1, "function");
}
pop_n_elems(args);
push_int(0);
}


}
/*! @decl mixed random(object o)
 *!   If random is called with an object, @[lfun::random] will be
 *!   called in the object.
 *!
 *! @seealso
 *!  @[lfun::_random()]
 */

#line 2048 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_random_1_defined
DEFAULT_CMOD_STORAGE void f_random_1(INT32 args) {
#line 2049 "/Users/hww3/devel/pike/src/builtin.cmod"
struct object * o;
#line 2049 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("random",args,1);
#line 2049 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_OBJECT) SIMPLE_ARG_TYPE_ERROR("random",1,"object");
#line 2049 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(o=Pike_sp[0-1].u.object);
#line 2052 "/Users/hww3/devel/pike/src/builtin.cmod"
{
int f = low_find_lfun(o->prog, LFUN__RANDOM);
if (f < 0) {
Pike_error("Calling undefined lfun::%s.\n", lfun_names[LFUN__RANDOM]);
}
apply_low(o, f, 0);
stack_swap();
pop_stack();
}

}
/*! @decl int random(int max)
 *!
 *!   This function returns a random number in the range @expr{0 .. @[max]-1@}.
 *!
 *! @seealso
 *!   @[random_seed()]
 */

/*! @decl float random(float max)
 *!
 *!   This function returns a random number in the range @expr{0 .. @[max]-ɛ@}.
 *!
 *! @seealso
 *!   @[random_seed()]
 */

#line 2078 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_random_2_defined

#ifdef f_random_2_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_random_2_fun_num = 0;

#endif /* f_random_2_fun_num_used */
DEFAULT_CMOD_STORAGE void f_random_2(INT32 args) {
#line 2079 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE i;
#line 2079 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("random",args,1);
#line 2079 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("random",1,"int");
#line 2079 "/Users/hww3/devel/pike/src/builtin.cmod"
i=Pike_sp[0-1].u.integer;
{
if(i <= 0) do { INT_TYPE ret_=(0); pop_stack(); push_int(ret_); return; }while(0);
#line 2082 "/Users/hww3/devel/pike/src/builtin.cmod"
#if SIZEOF_INT_TYPE > 4
 if(i >> 31) {
unsigned INT_TYPE a = my_rand();
unsigned INT_TYPE b = my_rand();
do { INT_TYPE ret_=((INT_TYPE)(((a<<32)|b) % i)); pop_stack(); push_int(ret_); return; }while(0);
#line 2087 "/Users/hww3/devel/pike/src/builtin.cmod"
}
#endif
 do { INT_TYPE ret_=(my_rand() % i); pop_stack(); push_int(ret_); return; }while(0);
#line 2090 "/Users/hww3/devel/pike/src/builtin.cmod"
} 

}
#line 2092 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_random_3_defined

#ifdef f_random_3_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_random_3_fun_num = 0;

#endif /* f_random_3_fun_num_used */
DEFAULT_CMOD_STORAGE void f_random_3(INT32 args) {
#line 2093 "/Users/hww3/devel/pike/src/builtin.cmod"
FLOAT_TYPE f;
#line 2093 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("random",args,1);
#line 2093 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_FLOAT) SIMPLE_ARG_TYPE_ERROR("random",1,"float");
#line 2093 "/Users/hww3/devel/pike/src/builtin.cmod"
f=Pike_sp[0-1].u.float_number;
{
if(f<=0.0) do { FLOAT_TYPE ret_=(0.0); pop_stack(); push_float(ret_); return; }while(0);
#line 2096 "/Users/hww3/devel/pike/src/builtin.cmod"
#define N 1048576
 do { FLOAT_TYPE ret_=(f * (my_rand()%N/((float)N)) +
f * (my_rand()%N/( ((float)N) * ((float)N) ))); pop_stack(); push_float(ret_); return; }while(0);
#line 2100 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl mixed random(array|multiset x)
 *!   Returns a random element from @[x].
 */

#line 2106 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_random_4_defined

#ifdef f_random_4_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_random_4_fun_num = 0;

#endif /* f_random_4_fun_num_used */
DEFAULT_CMOD_STORAGE void f_random_4(INT32 args) {
#line 2107 "/Users/hww3/devel/pike/src/builtin.cmod"
struct array * a;
#line 2107 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("random",args,1);
#line 2107 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_ARRAY) SIMPLE_ARG_TYPE_ERROR("random",1,"array");
#line 2107 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(a=Pike_sp[0-1].u.array);
#line 2109 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if(!a->size)
SIMPLE_BAD_ARG_ERROR("random", 1, "array with elements in it");
push_svalue(a->item + (my_rand() % a->size));
stack_swap();
pop_stack();
}

}
#line 2117 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_random_5_defined

#ifdef f_random_5_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_random_5_fun_num = 0;

#endif /* f_random_5_fun_num_used */
DEFAULT_CMOD_STORAGE void f_random_5(INT32 args) {
#line 2118 "/Users/hww3/devel/pike/src/builtin.cmod"
struct multiset * m;
#line 2118 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("random",args,1);
#line 2118 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_MULTISET) SIMPLE_ARG_TYPE_ERROR("random",1,"multiset");
#line 2118 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(m=Pike_sp[0-1].u.multiset);
#line 2120 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if(multiset_is_empty (m))
SIMPLE_BAD_ARG_ERROR("random", 1, "multiset with elements in it");
if (multiset_indval (m)) {
ptrdiff_t nodepos = multiset_get_nth (m, my_rand() % multiset_sizeof (m));
push_multiset_index (m, nodepos);
push_multiset_value (m, nodepos);
sub_msnode_ref (m);
f_aggregate (2);
}
else {
push_multiset_index (m, multiset_get_nth (m, my_rand() %
multiset_sizeof (m)));
sub_msnode_ref (m);
}
stack_swap();
pop_stack();
}

}
/*! @decl array random(mapping m)
 *!   Returns a random index-value pair from the mapping.
 */

#line 2143 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_random_6_defined

#ifdef f_random_6_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_random_6_fun_num = 0;

#endif /* f_random_6_fun_num_used */
DEFAULT_CMOD_STORAGE void f_random_6(INT32 args) {
#line 2144 "/Users/hww3/devel/pike/src/builtin.cmod"
struct mapping * m;
#line 2144 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("random",args,1);
#line 2144 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_MAPPING) SIMPLE_ARG_TYPE_ERROR("random",1,"mapping(mixed:mixed)");
#line 2144 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(m=Pike_sp[0-1].u.mapping);
{
struct mapping_data *md=m->data;
size_t bucket, count;
struct keypair *k;

if(!m_sizeof(m))
SIMPLE_BAD_ARG_ERROR("random", 1, "mapping with elements in it");

/* Find a random, nonempty bucket */
bucket=my_rand() % md->hashsize;
while(! md->hash[bucket] )
if(++bucket >= (size_t)md->hashsize)
bucket=0;

/* Count entries in bucket */
count=0;
for(k=md->hash[bucket];k;k=k->next) count++;

/* Select a random entry in this bucket */
count = my_rand() % count;
k=md->hash[bucket];
while(count-- > 0) k=k->next;

/* Push result and return */
push_svalue(&k->ind);
push_svalue(&k->val);
f_aggregate(2);
stack_swap();
pop_stack();
}

}

#if defined(f_random_1_defined) || defined(f_random_2_defined) || defined(f_random_3_defined) || defined(f_random_4_defined) || defined(f_random_5_defined) || defined(f_random_6_defined)
#define f_random_defined

#ifdef f_random_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_random_fun_num = 0;

#endif /* f_random_fun_num_used */
DEFAULT_CMOD_STORAGE void f_random(INT32 args) {
  if(args < 1) wrong_number_of_args_error("random",args,1);
  switch(TYPEOF(Pike_sp[0-args])) {
   case PIKE_T_MULTISET:

#ifdef f_random_5_defined
    f_random_5(args);
    return;

#endif /* f_random_5_defined */
    break;
   case PIKE_T_INT:

#ifdef f_random_2_defined
    f_random_2(args);
    return;

#endif /* f_random_2_defined */
    break;
   case PIKE_T_ARRAY:

#ifdef f_random_4_defined
    f_random_4(args);
    return;

#endif /* f_random_4_defined */
    break;
   case PIKE_T_MAPPING:

#ifdef f_random_6_defined
    f_random_6(args);
    return;

#endif /* f_random_6_defined */
    break;
   case PIKE_T_FLOAT:

#ifdef f_random_3_defined
    f_random_3(args);
    return;

#endif /* f_random_3_defined */
    break;
   case PIKE_T_OBJECT:

#ifdef f_random_1_defined
    f_random_1(args);
    return;

#endif /* f_random_1_defined */
    break;
   default:
    SIMPLE_BAD_ARG_ERROR("random",1,"multiset|int|array|mapping|float|object");
  }
}

#endif /* f_random_1_defined, f_random_2_defined, f_random_3_defined, f_random_4_defined, f_random_5_defined, f_random_6_defined */
#line 2176 "/Users/hww3/devel/pike/src/builtin.cmod"
#if defined(HAVE_SETENV) && defined(HAVE_UNSETENV)
#define USE_SETENV
#else
/* Used to hold refs to the strings that we feed to putenv. Indexed on
 * variable names, values are the "name=value" strings.
 *
 * This is not needed when using {,un}setenv(), since they maintain
 * their own corresponding table. */
static struct mapping *env_allocs = NULL;
#endif

/* Works exactly like the getenv efun defined in the master, but only
 * accesses the real environment. Everyone should use the caching
 * version in the master instead. */
#define f_cq__getenv_defined

#ifdef f_cq__getenv_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_cq__getenv_fun_num = 0;

#endif /* f_cq__getenv_fun_num_used */
DEFAULT_CMOD_STORAGE void f_cq__getenv(INT32 args) {
#line 2190 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * var;
#line 2190 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 1) wrong_number_of_args_error("_getenv",args,1);
#line 2190 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 0 &&
    (TYPEOF(Pike_sp[0-args]) != PIKE_T_INT ||
     Pike_sp[0-args].u.integer)) {
#line 2190 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("_getenv",1,"void|string");
#line 2190 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(var=Pike_sp[0-args].u.string);
#line 2190 "/Users/hww3/devel/pike/src/builtin.cmod"
} else var = NULL;
#line 2192 "/Users/hww3/devel/pike/src/builtin.cmod"
{
/* FIXME: Perhaps add the amigaos4 stuff from pike_push_env here too. */

if (var) {
if (var->size_shift)
SIMPLE_ARG_TYPE_ERROR ("getenv", 1, "void|string(0..255)");

if (string_has_null (var)) {
/* Won't find a variable name like this. */
pop_stack();
push_int (0);
}

else {
char *entry = getenv (var->str);
pop_stack();
if (!entry)
push_int (0);
else {
char *eq = strchr (entry, '=');
/* There should always be a '=' in the entry, but you never know.. */
push_string (make_shared_string (eq ? eq + 1 : entry));
}
}
}

else {
#ifdef DECLARE_ENVIRON
 extern char **environ;
#endif
 struct mapping *m, *new_env_allocs;
int n;

/* Iterate the environment backwards below so that earlier
     * variables will override later ones in case the same variable
     * occur multiple times (which it shouldn't). That makes the
     * result similar to what getenv(3) commonly returns (at least the
     * one in gnu libc). */
for (n = 0; environ[n]; n++) {}

m = allocate_mapping (n);
#ifndef USE_SETENV
 if (env_allocs)
new_env_allocs = allocate_mapping (m_sizeof (env_allocs));
#endif /* !USE_SETENV */

while (--n >= 0) {
char *entry = environ[n], *eq = strchr (entry, '=');
if (eq) { /* gnu libc getenv ignores variables without '='. */
struct pike_string *var = make_shared_binary_string (entry, eq - entry);
struct pike_string *val = make_shared_string (eq + 1);
mapping_string_insert_string (m, var, val);

#ifndef USE_SETENV
 /* Populate new_env_allocs with the env_allocs entries that
	 * are still in use. */
if (env_allocs) {
struct svalue *ea_val = low_mapping_string_lookup (env_allocs, var);
if (ea_val && ea_val->u.string->str == entry)
mapping_string_insert (new_env_allocs, var, ea_val);
}
#endif /* !USE_SETENV */

free_string (var);
free_string (val);
}
}

#ifndef USE_SETENV
 if (env_allocs) {
free_mapping (env_allocs);
env_allocs = new_env_allocs;
}
#endif /* !USE_SETENV */

push_mapping (m);
}
}

}
#line 2271 "/Users/hww3/devel/pike/src/builtin.cmod"
/* Works exactly like the putenv efun defined in the master, but only
 * updates the real environment. Everyone should use the version in
 * the master instead so that the cache doesn't get stale. */
#define f_cq__putenv_defined

#ifdef f_cq__putenv_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_cq__putenv_fun_num = 0;

#endif /* f_cq__putenv_fun_num_used */
DEFAULT_CMOD_STORAGE void f_cq__putenv(INT32 args) {
#line 2274 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * var;
#line 2274 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * val;
#line 2274 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args < 1) wrong_number_of_args_error("_putenv",args,1);
#line 2274 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 2) wrong_number_of_args_error("_putenv",args,2);
#line 2274 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("_putenv",1,"string");
#line 2274 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(var=Pike_sp[0-args].u.string);
#line 2274 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 1 &&
    (TYPEOF(Pike_sp[1-args]) != PIKE_T_INT ||
     Pike_sp[1-args].u.integer)) {
#line 2274 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-args]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("_putenv",2,"void|string");
#line 2274 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(val=Pike_sp[1-args].u.string);
#line 2274 "/Users/hww3/devel/pike/src/builtin.cmod"
} else val = NULL;
{
#ifndef USE_SETENV
 struct pike_string *putenv_str, *env_alloc_var;
#endif

if (var->size_shift)
SIMPLE_ARG_TYPE_ERROR ("putenv", 1, "string(0..255)");
if (string_has_null (var) || strchr (var->str, '='))
SIMPLE_ARG_ERROR ("putenv", 1, "Variable name cannot contain '=' or NUL.");

if (val) {
#ifndef USE_SETENV
 struct string_builder sb;
#endif

if (val->size_shift)
SIMPLE_ARG_TYPE_ERROR ("putenv", 2, "void|string(0..255)");
if (string_has_null (val))
SIMPLE_ARG_ERROR ("putenv", 2, "Variable value cannot contain NUL.");

#ifdef USE_SETENV
 if (setenv(var->str, val->str, 1)) {
if (errno == ENOMEM)
SIMPLE_OUT_OF_MEMORY_ERROR ("putenv", 0);
else
Pike_error ("Error from setenv(3): %s\n", strerror (errno));
}
#else /* !USE_SETENV */
 init_string_builder (&sb, 0);
string_builder_shared_strcat (&sb, var);
string_builder_putchar (&sb, '=');
string_builder_shared_strcat (&sb, val);
putenv_str = finish_string_builder (&sb);
push_string (putenv_str); /* Let mega_apply pop. */
#endif /* USE_SETENV */
 }
else {
#ifdef USE_SETENV
 /* Note: Some versions of glibc have a unsetenv(3) that returns void,
     *       thus no checking of the return value here.
     */
unsetenv(var->str);
#else /* !USE_SETENV */
#ifdef PUTENV_ALWAYS_REQUIRES_EQUAL
 /* Windows can never get things quite right.. :P */
struct string_builder sb;
init_string_builder (&sb, 0);
string_builder_shared_strcat (&sb, var);
string_builder_putchar (&sb, '=');
putenv_str = finish_string_builder (&sb);
push_string (putenv_str); /* Let mega_apply pop. */
#else
 putenv_str = var;
#endif
#endif  /* USE_SETENV */
 }

#ifndef USE_SETENV
 if (putenv (putenv_str->str)) {
if (errno == ENOMEM)
SIMPLE_OUT_OF_MEMORY_ERROR ("putenv", 0);
else
Pike_error ("Error from putenv(3): %s\n", strerror (errno));
}

#ifdef __NT__
 ref_push_string (var);
f_lower_case (1);
assert (TYPEOF(Pike_sp[-1]) == T_STRING);
env_alloc_var = Pike_sp[-1].u.string;
/* Let mega_apply pop. */
#else
 env_alloc_var = var;
#endif

if (!env_allocs) env_allocs = allocate_mapping (4);

if (val)
/* Must keep the string passed to putenv allocated (and we
     * assume no other entities are naughty enough to modify it). */
mapping_string_insert_string (env_allocs, env_alloc_var, putenv_str);
else {
struct svalue key;
SET_SVAL(key, T_STRING, 0, string, env_alloc_var);
map_delete (env_allocs, &key);
}
#endif /* !USE_SETENV */
}

}
#line 2364 "/Users/hww3/devel/pike/src/builtin.cmod"
#if defined(PIKE_DEBUG) && defined(PIKE_PORTABLE_BYTECODE)

/*! @decl void disassemble(function fun)
 *! @belongs Debug
 *!
 *!   Disassemble a Pike function to @[Stdio.stderr].
 *!
 *! @note
 *!   This function is only available if the Pike runtime
 *!   has been compiled with debug enabled.
 */
#define f_cq__disassemble_defined

#ifdef f_cq__disassemble_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_cq__disassemble_fun_num = 0;

#endif /* f_cq__disassemble_fun_num_used */
DEFAULT_CMOD_STORAGE void f_cq__disassemble(INT32 args) {
#line 2375 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * fun;
#line 2375 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("_disassemble",args,1);
#line 2375 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_FUNCTION) SIMPLE_ARG_TYPE_ERROR("_disassemble",1,"function");
#line 2375 "/Users/hww3/devel/pike/src/builtin.cmod"
fun=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
{
if ((TYPEOF(*fun) != T_FUNCTION) ||
(SUBTYPEOF(*fun) == FUNCTION_BUILTIN)) {
fprintf(stderr,
"Disassembly only supported for functions implemented in Pike.\n");
} else if (!fun->u.object->prog) {
fprintf(stderr, "Function in destructed object.\n");
} else {
int f = SUBTYPEOF(*fun);
struct reference *ptr = PTR_FROM_INT(fun->u.object->prog, f);
struct program *p = PROG_FROM_PTR(fun->u.object->prog, ptr);
struct identifier *id = p->identifiers + ptr->identifier_offset;
if (id->func.offset >= 0) {
struct pike_string *tripples =
p->strings[read_program_data(p->program + id->func.offset, -1)];
switch(tripples->size_shift) {
#define CASE(SHIFT)					\
	case SHIFT:					\
	  {						\
	    PIKE_CONCAT(p_wchar, SHIFT) *str =		\
	      PIKE_CONCAT(STR, SHIFT)(tripples);	\
	    int i=0;					\
	    while(i < tripples->len) {			\
	      fprintf(stderr, "@@@ %d: %s, %d, %d\n",	\
		      i/3,				\
		      instrs[*str - F_OFFSET].		\
		      name,				\
		      str[1], str[2]);			\
	      str += 3;					\
	      i += 3;					\
	    }						\
	  }						\
	  break
 CASE(0);
CASE(1);
CASE(2);
#undef CASE
 }
} else {
fprintf(stderr, "Prototype.\n");
}
}
pop_n_elems(args);
push_int(0);
}

}
#line 2422 "/Users/hww3/devel/pike/src/builtin.cmod"
#endif /* PIKE_DEBUG && PIKE_PORTABLE_BYTECODE */

/*
 * Backtrace handling.
 */

/*! @module Pike
 */

/*! @class DestructImmediate
 *!
 *! An empty class that can be inherited to get the
 *! @tt{PROGRAM_DESTRUCT_IMMEDIATE@} flag set.
 */


#undef class_DestructImmediate_defined
#define class_DestructImmediate_defined
DEFAULT_CMOD_STORAGE struct program *DestructImmediate_program=NULL;

#ifdef DestructImmediate_program_fun_num_used
DEFAULT_CMOD_STORAGE int DestructImmediate_program_fun_num=-1;
#endif /* DestructImmediate_program_fun_num_used */
/*! @endclass
 */

/*! @class FakeObject
 *!
 *! Used as a place holder in eg backtraces for objects that
 *! are unsuitable to have references to in backtraces.
 *!
 *! Examples of such objects are instances of @[Thread.MutexKey],
 *! and @[Nettle.Cipher.State].
 *!
 *! @seealso
 *!   @[backtrace()]
 */

#undef class_FakeObject_defined
#define class_FakeObject_defined
DEFAULT_CMOD_STORAGE struct program *FakeObject_program=NULL;

#ifdef FakeObject_program_fun_num_used
DEFAULT_CMOD_STORAGE int FakeObject_program_fun_num=-1;
#endif /* FakeObject_program_fun_num_used */

#undef var_prog_FakeObject_defined
#define var_prog_FakeObject_defined

#undef var_description_FakeObject_defined
#define var_description_FakeObject_defined

#undef THIS
#define THIS ((struct FakeObject_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_FAKEOBJECT
#define THIS_FAKEOBJECT ((struct FakeObject_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_FAKEOBJECT
#define OBJ2_FAKEOBJECT(o) ((struct FakeObject_struct *)(o->storage+FakeObject_storage_offset))

#undef GET_FAKEOBJECT_STORAGE
#define GET_FAKEOBJECT_STORAGE(o) ((struct FakeObject_struct *)(o->storage+FakeObject_storage_offset)
static ptrdiff_t FakeObject_storage_offset;
struct FakeObject_struct {

#ifdef var_prog_FakeObject_defined
  struct program * prog;

#endif /* var_prog_FakeObject_defined */

#ifdef var_description_FakeObject_defined
  struct pike_string * description;

#endif /* var_description_FakeObject_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct FakeObject_struct *FakeObject_gdb_dummy_ptr;
#endif
#define f_FakeObject_create_defined

#ifdef f_FakeObject_create_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_FakeObject_create_fun_num = 0;

#endif /* f_FakeObject_create_fun_num_used */
DEFAULT_CMOD_STORAGE void f_FakeObject_create(INT32 args) {
#line 2462 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * prog;
struct pike_string * description;
#line 2462 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 2) wrong_number_of_args_error("create",args,2);
#line 2462 "/Users/hww3/devel/pike/src/builtin.cmod"
if ((args > 0) &&
    ((TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) ||
     (SUBTYPEOF(Pike_sp[0-args]) != NUMBER_UNDEFINED))) {
#line 2462 "/Users/hww3/devel/pike/src/builtin.cmod"
prog=Pike_sp+0-args; dmalloc_touch_svalue(Pike_sp+0-args);
#line 2462 "/Users/hww3/devel/pike/src/builtin.cmod"
} else prog = NULL;
if (args > 1 &&
    (TYPEOF(Pike_sp[1-args]) != PIKE_T_INT ||
     Pike_sp[1-args].u.integer)) {
#line 2463 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-args]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("create",2,"string|void");
#line 2463 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(description=Pike_sp[1-args].u.string);
#line 2463 "/Users/hww3/devel/pike/src/builtin.cmod"
} else description = NULL;
#line 2465 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct program *p = prog ? program_from_svalue(prog):NULL;
do_free_program(THIS->prog);
THIS->prog = p;
if (p) add_ref(p);
if (THIS->description) free_string(THIS->description);
if ((THIS->description = description)) {
add_ref(THIS->description);
}
}

}
#define f_FakeObject_cq__sprintf_defined

#ifdef f_FakeObject_cq__sprintf_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_FakeObject_cq__sprintf_fun_num = 0;

#endif /* f_FakeObject_cq__sprintf_fun_num_used */
DEFAULT_CMOD_STORAGE void f_FakeObject_cq__sprintf(INT32 args) {
#line 2476 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE c;
#line 2476 "/Users/hww3/devel/pike/src/builtin.cmod"
struct mapping * ignored;
#line 2476 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args < 1) wrong_number_of_args_error("_sprintf",args,1);
#line 2476 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 2) wrong_number_of_args_error("_sprintf",args,2);
#line 2476 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("_sprintf",1,"int");
#line 2476 "/Users/hww3/devel/pike/src/builtin.cmod"
c=Pike_sp[0-args].u.integer;
#line 2476 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 1 &&
    (TYPEOF(Pike_sp[1-args]) != PIKE_T_INT ||
     Pike_sp[1-args].u.integer)) {
#line 2476 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-args]) != PIKE_T_MAPPING) SIMPLE_ARG_TYPE_ERROR("_sprintf",2,"mapping(mixed:mixed)|void");
#line 2476 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(ignored=Pike_sp[1-args].u.mapping);
#line 2476 "/Users/hww3/devel/pike/src/builtin.cmod"
} else ignored = NULL;
#line 2478 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if ((c == 'O') && THIS->description) {
ref_push_string(THIS->description);
return;
}
push_text("%O()");
if (THIS->prog) {
ref_push_program(THIS->prog);
} else {
ref_push_program(Pike_fp->current_program);
}
f_sprintf(2);
}
}
/*! @endclass
 */

#line 2496 "/Users/hww3/devel/pike/src/builtin.cmod"
static struct object *clone_fake_object(struct object *o)
{
struct program *p = o?o->prog:NULL;
if (p) {
ref_push_program(p);
if (FIND_LFUN(p, LFUN__SPRINTF) != -1) {
push_int('O');
apply_lfun(o, LFUN__SPRINTF, 1);
return clone_object(FakeObject_program, 2);
}
} else {
push_undefined();
}
return clone_object(FakeObject_program, 1);
}

/*! @class BacktraceFrame
 */


#undef class_backtrace_frame_defined
#define class_backtrace_frame_defined
DEFAULT_CMOD_STORAGE struct program *backtrace_frame_program=NULL;

#ifdef backtrace_frame_program_fun_num_used
DEFAULT_CMOD_STORAGE int backtrace_frame_program_fun_num=-1;
#endif /* backtrace_frame_program_fun_num_used */

#undef var_cq__fun_backtrace_frame_defined
#define var_cq__fun_backtrace_frame_defined
#line 2518 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef PIKE_DEBUG
 
#undef var_oprog_backtrace_frame_defined
#define var_oprog_backtrace_frame_defined
#line 2520 "/Users/hww3/devel/pike/src/builtin.cmod"
#endif
 
#undef var_args_backtrace_frame_defined
#define var_args_backtrace_frame_defined
#line 2523 "/Users/hww3/devel/pike/src/builtin.cmod"
/* These are cleared when filename and lineno have been initialized
   * from them. */

#undef var_prog_backtrace_frame_defined
#define var_prog_backtrace_frame_defined

#undef var_pc_backtrace_frame_defined
#define var_pc_backtrace_frame_defined
#line 2528 "/Users/hww3/devel/pike/src/builtin.cmod"
/* These two are considered to be uninitialized from prog, pc and
   * fun as long as lineno == -1. */

#undef var_filename_backtrace_frame_defined
#define var_filename_backtrace_frame_defined

#undef var_lineno_backtrace_frame_defined
#define var_lineno_backtrace_frame_defined

#undef THIS
#define THIS ((struct backtrace_frame_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_BACKTRACE_FRAME
#define THIS_BACKTRACE_FRAME ((struct backtrace_frame_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_BACKTRACE_FRAME
#define OBJ2_BACKTRACE_FRAME(o) ((struct backtrace_frame_struct *)(o->storage+backtrace_frame_storage_offset))

#undef GET_BACKTRACE_FRAME_STORAGE
#define GET_BACKTRACE_FRAME_STORAGE(o) ((struct backtrace_frame_struct *)(o->storage+backtrace_frame_storage_offset)
static ptrdiff_t backtrace_frame_storage_offset;
struct backtrace_frame_struct {

#ifdef var_cq__fun_backtrace_frame_defined
  struct svalue _fun;

#endif /* var_cq__fun_backtrace_frame_defined */

#ifdef var_oprog_backtrace_frame_defined
  struct program * oprog;

#endif /* var_oprog_backtrace_frame_defined */

#ifdef var_args_backtrace_frame_defined
  struct array * args;

#endif /* var_args_backtrace_frame_defined */

#ifdef var_prog_backtrace_frame_defined
  struct program * prog;

#endif /* var_prog_backtrace_frame_defined */

#ifdef var_pc_backtrace_frame_defined
#line 2526 "/Users/hww3/devel/pike/src/builtin.cmod"
PIKE_OPCODE_T *pc;
#endif /* var_pc_backtrace_frame_defined */

#ifdef var_filename_backtrace_frame_defined
struct pike_string *filename;
#endif /* var_filename_backtrace_frame_defined */

#ifdef var_lineno_backtrace_frame_defined
#line 2531 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE lineno;
#endif /* var_lineno_backtrace_frame_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct backtrace_frame_struct *backtrace_frame_gdb_dummy_ptr;
#endif

#undef internal_init_backtrace_frame_defined
#define internal_init_backtrace_frame_defined

#undef backtrace_frame_event_handler_defined
#define backtrace_frame_event_handler_defined
static void init_backtrace_frame_struct(void)
#line 2534 "/Users/hww3/devel/pike/src/builtin.cmod"
{
THIS->pc = NULL;
THIS->lineno = -1;
THIS->filename = NULL;
}


#undef internal_exit_backtrace_frame_defined
#define internal_exit_backtrace_frame_defined

#undef backtrace_frame_event_handler_defined
#define backtrace_frame_event_handler_defined
static void exit_backtrace_frame_struct(void)
#line 2542 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if (THIS->filename) {
free_string(THIS->filename);
THIS->filename = NULL;
}
THIS->pc = NULL;
THIS->lineno = -1;
}

/* NOTE: Use old-style getter/setter syntax for compatibility with
   *       old Parser.Pike.split() used by precompile.pike.
   */

#define f_backtrace_frame_cq__backtick_2D_3Efun_defined

#ifdef f_backtrace_frame_cq__backtick_2D_3Efun_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_backtrace_frame_cq__backtick_2D_3Efun_fun_num = 0;

#endif /* f_backtrace_frame_cq__backtick_2D_3Efun_fun_num_used */
DEFAULT_CMOD_STORAGE void f_backtrace_frame_cq__backtick_2D_3Efun(INT32 args) {
#line 2555 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`->fun",args,0);
{
push_svalue(&THIS->_fun);
}

}
#define f_backtrace_frame_cq__backtick_2D_3Efun_eq_defined

#ifdef f_backtrace_frame_cq__backtick_2D_3Efun_eq_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_backtrace_frame_cq__backtick_2D_3Efun_eq_fun_num = 0;

#endif /* f_backtrace_frame_cq__backtick_2D_3Efun_eq_fun_num_used */
DEFAULT_CMOD_STORAGE void f_backtrace_frame_cq__backtick_2D_3Efun_eq(INT32 args) {
#line 2560 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * val;
#line 2560 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`->fun=",args,1);
#line 2560 "/Users/hww3/devel/pike/src/builtin.cmod"
val=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
{
/* FIXME: Should we allow this at all?
     *        Linenumber info etc won't match.
     */
#ifdef PIKE_DEBUG
 if ((TYPEOF(*val) == T_FUNCTION) && (SUBTYPEOF(*val) != FUNCTION_BUILTIN)) {
assign_short_svalue((union anything *)&THIS->oprog,
(union anything *)&val->u.object->prog, T_PROGRAM);
}
#endif
 assign_svalue(&THIS->_fun, val);
}

}
/*! @decl int(0..1) _is_type(string t)
   *! This object claims to be an array for backward compatibility.
   */
#define f_backtrace_frame_cq__is_type_defined

#ifdef f_backtrace_frame_cq__is_type_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_backtrace_frame_cq__is_type_fun_num = 0;

#endif /* f_backtrace_frame_cq__is_type_fun_num_used */
DEFAULT_CMOD_STORAGE void f_backtrace_frame_cq__is_type(INT32 args) {
#line 2577 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * t;
#line 2577 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("_is_type",args,1);
#line 2577 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("_is_type",1,"string");
#line 2577 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(t=Pike_sp[0-1].u.string);
{
INT_TYPE res = (t == findstring("array"));
pop_n_elems(args);
push_int(res);
}

}
#line 2584 "/Users/hww3/devel/pike/src/builtin.cmod"
static void fill_in_file_and_line()
{
struct pike_string *file = NULL;
assert (THIS->lineno == -1);

if (THIS->pc && THIS->prog) {
file = low_get_line(THIS->pc, THIS->prog, &THIS->lineno);
THIS->pc = NULL;
}
else if (TYPEOF(THIS->_fun) == PIKE_T_FUNCTION) {
#ifdef PIKE_DEBUG
 if (THIS->_fun.u.object->prog &&
THIS->_fun.u.object->prog != THIS->oprog) {
struct identifier *id = ID_FROM_INT(THIS->oprog, SUBTYPEOF(THIS->_fun));
/* FIXME: Dump dmalloc info for the object? */
Pike_fatal("Lost track of function pointer! Function name was %s.\n",
id->name?id->name->str:"<no name>");
}
#endif
 file = low_get_function_line (THIS->_fun.u.object, SUBTYPEOF(THIS->_fun),
&THIS->lineno);
}
else if (THIS->prog) {
file = low_get_program_line (THIS->prog, &THIS->lineno);
}

if (file) {
if (!THIS->filename) THIS->filename = file;
else free_string (file);
}

if (THIS->prog) {
free_program(THIS->prog);
THIS->prog = NULL;
}
}

/*! @decl string _sprintf(int c, mapping|void opts)
   */
#define f_backtrace_frame_cq__sprintf_defined

#ifdef f_backtrace_frame_cq__sprintf_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_backtrace_frame_cq__sprintf_fun_num = 0;

#endif /* f_backtrace_frame_cq__sprintf_fun_num_used */
DEFAULT_CMOD_STORAGE void f_backtrace_frame_cq__sprintf(INT32 args) {
#line 2623 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE c;
#line 2623 "/Users/hww3/devel/pike/src/builtin.cmod"
struct mapping * opts;
#line 2623 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args < 1) wrong_number_of_args_error("_sprintf",args,1);
#line 2623 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 2) wrong_number_of_args_error("_sprintf",args,2);
#line 2623 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("_sprintf",1,"int");
#line 2623 "/Users/hww3/devel/pike/src/builtin.cmod"
c=Pike_sp[0-args].u.integer;
#line 2623 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 1 &&
    (TYPEOF(Pike_sp[1-args]) != PIKE_T_INT ||
     Pike_sp[1-args].u.integer)) {
#line 2623 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-args]) != PIKE_T_MAPPING) SIMPLE_ARG_TYPE_ERROR("_sprintf",2,"mapping(mixed:mixed)|void");
#line 2623 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(opts=Pike_sp[1-args].u.mapping);
#line 2623 "/Users/hww3/devel/pike/src/builtin.cmod"
} else opts = NULL;
{
pop_n_elems(args);

if (c != 'O') {
push_undefined ();
return;
}

push_text("backtrace_frame(");

if (THIS->lineno == -1) fill_in_file_and_line();

if (THIS->filename) {
ref_push_string(THIS->filename);
push_text(":");
push_int(THIS->lineno);
push_text(", ");
f_add(4);
} else {
push_text("Unknown file, ");
}
if (TYPEOF(THIS->_fun) == PIKE_T_FUNCTION) {
if (THIS->_fun.u.object->prog) {
#ifdef PIKE_DEBUG
 if (THIS->_fun.u.object->prog != THIS->oprog) {
struct identifier *id =
ID_FROM_INT(THIS->oprog, SUBTYPEOF(THIS->_fun));
/* FIXME: Dump dmalloc info for the object? */
Pike_fatal("Lost track of function pointer! Function name was %s.\n",
id->name?id->name->str:"<no name>");
}
#endif
 push_svalue(&THIS->_fun);
f_function_name(1);
push_text("(), ");
f_add(2);
} else {
free_svalue(&THIS->_fun);
SET_SVAL(THIS->_fun, PIKE_T_INT, NUMBER_DESTRUCTED, integer, 0);
push_text("destructed_function(), "); 
}
} else if (TYPEOF(THIS->_fun) == PIKE_T_PROGRAM) {
/* FIXME: Use the master? */
push_text("program(), ");
} else if (TYPEOF(THIS->_fun) == PIKE_T_STRING) {
push_svalue(&THIS->_fun);
push_text("(), ");
f_add(2);
} else {
push_text("destructed_function(), ");
}

if (THIS->args) {
push_text("Args: ");
push_int(THIS->args->size);
f_add(2);
} else {
push_text("No args");
}
push_text(")");
f_add(5);
}

}
/*! @decl int(3..) _sizeof()
   */
#define f_backtrace_frame_cq__sizeof_defined

#ifdef f_backtrace_frame_cq__sizeof_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_backtrace_frame_cq__sizeof_fun_num = 0;

#endif /* f_backtrace_frame_cq__sizeof_fun_num_used */
DEFAULT_CMOD_STORAGE void f_backtrace_frame_cq__sizeof(INT32 args) {
#line 2689 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("_sizeof",args,0);
{
if (THIS->args) {
push_int(THIS->args->size + 3);
} else {
push_int(3);
}
}

}
/*! @decl mixed `[](int index, int|void end_or_none)
   *! The BacktraceFrame object can be indexed as an array.
   */
#define f_backtrace_frame_cq__backtick_5B_5D_defined

#ifdef f_backtrace_frame_cq__backtick_5B_5D_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_backtrace_frame_cq__backtick_5B_5D_fun_num = 0;

#endif /* f_backtrace_frame_cq__backtick_5B_5D_fun_num_used */
DEFAULT_CMOD_STORAGE void f_backtrace_frame_cq__backtick_5B_5D(INT32 args) {
#line 2701 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE index;
#line 2701 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * end_or_none;
#line 2701 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args < 1) wrong_number_of_args_error("`[]",args,1);
#line 2701 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 2) wrong_number_of_args_error("`[]",args,2);
#line 2701 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("`[]",1,"int");
#line 2701 "/Users/hww3/devel/pike/src/builtin.cmod"
index=Pike_sp[0-args].u.integer;
#line 2701 "/Users/hww3/devel/pike/src/builtin.cmod"
if ((args > 1) &&
    ((TYPEOF(Pike_sp[1-args]) != PIKE_T_INT) ||
     (SUBTYPEOF(Pike_sp[1-args]) != NUMBER_UNDEFINED))) {
#line 2701 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("`[]",2,"int|void");
#line 2701 "/Users/hww3/devel/pike/src/builtin.cmod"
end_or_none=Pike_sp+1-args; dmalloc_touch_svalue(Pike_sp+1-args);
#line 2701 "/Users/hww3/devel/pike/src/builtin.cmod"
} else end_or_none = NULL;
{
INT_TYPE end = index;
INT32 numargs = 3;
INT32 i;

if (THIS->args)
numargs += THIS->args->size;

if (!end_or_none) {
if (index < 0)
index_error("pike_frame->`[]", Pike_sp-args, args, NULL, Pike_sp-args,
"Indexing with negative index (%"PRINTPIKEINT"d)\n", index);
else if (index >= numargs)
index_error("pike_frame->`[]", Pike_sp-args, args, NULL, Pike_sp-args,
"Indexing with too large index (%"PRINTPIKEINT"d)\n", index);
} else
end = end_or_none->u.integer;

pop_n_elems(args);

if (end_or_none) {
if ((end < 0) || (end < index) || (index >= numargs)) {
f_aggregate(0);
return;
}

if (end >= numargs)
end = numargs-1;
}

for (i = index; i <= end; i++) {
switch(i) {
case 0: /* Filename */
if (THIS->lineno == -1) fill_in_file_and_line();
if (THIS->filename)
ref_push_string(THIS->filename);
else
push_int(0);
break;
case 1: /* Linenumber */
if (THIS->lineno == -1) fill_in_file_and_line();
push_int(THIS->lineno);
break;
case 2: /* Function */
push_svalue(&THIS->_fun);
break;
default: /* Arguments */
{
if ((i > 2) && (THIS->args) && (i-3 < THIS->args->size)) {
push_svalue(THIS->args->item + (i - 3));
break;
}
bad_arg_error("`[]", Pike_sp-args, args, 1,
"int(0..)", Pike_sp-args,
"Bad argument 1 to backtrace_frame->`[](): "
"Expected int(0..%d)\n",
numargs + 2);
}
/* NOT_REACHED */
break;
}
}
if (end_or_none)
f_aggregate(1 + end - index);
}

}
/*! @decl mixed `[]=(int index, mixed value)
   */
#define f_backtrace_frame_cq__backtick_5B_5D_eq_defined

#ifdef f_backtrace_frame_cq__backtick_5B_5D_eq_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_backtrace_frame_cq__backtick_5B_5D_eq_fun_num = 0;

#endif /* f_backtrace_frame_cq__backtick_5B_5D_eq_fun_num_used */
DEFAULT_CMOD_STORAGE void f_backtrace_frame_cq__backtick_5B_5D_eq(INT32 args) {
#line 2770 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE index;
#line 2770 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * value;
#line 2770 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("`[]=",args,2);
#line 2770 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("`[]=",1,"int");
#line 2770 "/Users/hww3/devel/pike/src/builtin.cmod"
index=Pike_sp[0-2].u.integer;
#line 2770 "/Users/hww3/devel/pike/src/builtin.cmod"
value=Pike_sp+1-2; dmalloc_touch_svalue(Pike_sp+1-2);
{
INT32 numargs = 3;

if (THIS->args)
numargs += THIS->args->size;

if ((index < -numargs) || (index >= numargs))
index_error("pike_frame->`[]=", Pike_sp-args, args, NULL, Pike_sp-args,
"Index %"PRINTPIKEINT"d is out of array range 0..%d,\n",
index, numargs-1);
else if (index < 0)
index += numargs;

if (args > 2) {
pop_n_elems(args - 2);
args = 2;
}

switch(index) {
case 0: /* Filename */
if (THIS->lineno == -1) fill_in_file_and_line();
if (TYPEOF(*value) != PIKE_T_STRING) {
if ((TYPEOF(*value) != PIKE_T_INT) ||
(value->u.integer)) {
SIMPLE_BAD_ARG_ERROR("`[]=", 2, "string|int(0..0)");
}
if (THIS->filename) {
free_string(THIS->filename);
THIS->filename = NULL;
}
} else {
if (THIS->filename) {
free_string(THIS->filename);
THIS->filename = NULL;
}
copy_shared_string(THIS->filename, value->u.string);
}
break;

case 1: /* Linenumber */
if (THIS->lineno == -1) fill_in_file_and_line();
if (TYPEOF(*value) != PIKE_T_INT)
SIMPLE_BAD_ARG_ERROR("`[]=", 2, "int(1..)");
THIS->lineno = value->u.integer;
break;

case 2: /* Function */
if (THIS->lineno == -1) fill_in_file_and_line();
assign_svalue(&THIS->_fun, value);
break;
default: /* Arguments */
assign_svalue(THIS->args->item + index - 3, value);
break;
}
stack_swap();
pop_stack();
}

}

#ifdef backtrace_frame_event_handler_defined
static void backtrace_frame_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_backtrace_frame_defined
  case PROG_EVENT_INIT: init_backtrace_frame_struct(); break;

#endif /* internal_init_backtrace_frame_defined */

#ifdef internal_exit_backtrace_frame_defined
  case PROG_EVENT_EXIT: exit_backtrace_frame_struct(); break;

#endif /* internal_exit_backtrace_frame_defined */
  default: break; 
  }
}

#endif /* backtrace_frame_event_handler_defined */
#line 2829 "/Users/hww3/devel/pike/src/builtin.cmod"
;

/*! @endclass
 */

/*! @decl mapping(string:int|string) get_runtime_info()
 *!
 *! Get information about the Pike runtime.
 *!
 *! @returns
 *!   Returns a mapping with the following content:
 *!   @mapping
 *!     @member string "bytecode_method"
 *!       A string describing the bytecode method used by
 *!       the Pike interpreter.
 *!     @member int "abi"
 *!       The number of bits in the ABI. Usually @expr{32@} or @expr{64@}.
 *!     @member int "native_byteorder"
 *!       The byte order used by the native cpu.
 *!       Usually @expr{1234@} (aka little endian) or
 *!       @expr{4321@} (aka bigendian).
 *!     @member int "int_size"
 *!       The number of bits in the native integer type.
 *!       Usually @expr{32@} or @expr{64@}.
 *!     @member int "float_size"
 *!       The number of bits in the native floating point type.
 *!       Usually @expr{32@} or @expr{64@}.
 *!     @member int(0..1) "auto_bignum"
 *!       Present if integers larger than the native size are automatically
 *!       converted into bignums.
 *!   @endmapping
 */
#define f_get_runtime_info_defined

#ifdef f_get_runtime_info_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_get_runtime_info_fun_num = 0;

#endif /* f_get_runtime_info_fun_num_used */
DEFAULT_CMOD_STORAGE void f_get_runtime_info(INT32 args) {
#line 2861 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("get_runtime_info",args,0);
#line 2863 "/Users/hww3/devel/pike/src/builtin.cmod"
{
pop_n_elems(args);
push_text("bytecode_method");
push_text(PIKE_BYTECODE_METHOD_NAME);
push_text("abi");
push_int(sizeof(void *) * 8);
push_text("native_byteorder");
push_int(PIKE_BYTEORDER);
push_text("int_size");
push_int(sizeof(INT_TYPE) * 8);
push_text("float_size");
push_int(sizeof(FLOAT_TYPE) * 8);
push_text("auto_bignum");
push_int(1);
f_aggregate_mapping(6*2);
}

}
/*! @endmodule
 */

#line 2883 "/Users/hww3/devel/pike/src/builtin.cmod"
void low_backtrace(struct Pike_interpreter_struct *i)
{
struct svalue *stack_top = i->stack_pointer;
struct pike_frame *f, *of = 0;
int size = 0;
struct array *res = NULL;

for (f = i->frame_pointer; f; f = f->next) {
size++;
}

res = allocate_array_no_init(size, 0);
push_array(res);

for (f = i->frame_pointer; f && size; f = (of = f)->next) {
struct object *o = low_clone(backtrace_frame_program);
struct backtrace_frame_struct *bf;
struct identifier *function = NULL;

call_c_initializers(o);

size--;

SET_SVAL(res->item[size], PIKE_T_OBJECT, 0, object, o);

bf = OBJ2_BACKTRACE_FRAME(o);

if ((bf->prog = f->context->prog)) {
add_ref(bf->prog);
bf->pc = f->pc;
}

SET_SVAL(bf->_fun, PIKE_T_INT, NUMBER_DESTRUCTED, integer, 0);

if (f->current_object && f->current_object->prog) {
if (f->fun == FUNCTION_BUILTIN) {
/* Unusual case. The frame is from call_c_initializers(), gc()
	 * or similar. cf [bug 6156].	/grubba
	 *
	 * Masquerade as the program.
	 *
	 * FIXME: Ought to keep parent-pointers.
	 */
SET_SVAL(bf->_fun, PIKE_T_PROGRAM, 0,
program, f->current_object->prog);
add_ref(f->current_object->prog);
} else {
SET_SVAL(bf->_fun, PIKE_T_FUNCTION,
CHECK_IDREF_RANGE(f->fun, f->current_object->prog),
object, f->current_object);
add_ref(f->current_object);
function = ID_FROM_INT(f->current_object->prog, f->fun);
#ifdef PIKE_DEBUG
 add_ref(bf->oprog = bf->_fun.u.object->prog);
#endif
 }
}

if (f->locals) {
INT32 numargs = DO_NOT_WARN((INT32) MINIMUM(f->num_args,
stack_top - f->locals));
INT32 varargs = 0;

if(of && of->locals) {
/* f->num_args can be too large, so this is necessary for some
	 * reason. I don't know why. /mast
	 *
	 * possibly because f->num_args was uninitialized for c_initializers
	 *  /arne
	 * */

numargs = DO_NOT_WARN((INT32)MINIMUM(f->num_args,of->locals - f->locals));
}

numargs = MAXIMUM(numargs, 0);

/* Handle varargs... */
if (function && (function->identifier_flags & IDENTIFIER_VARARGS) &&
(f->locals + numargs < stack_top) &&
(TYPEOF(f->locals[numargs]) == T_ARRAY)) {
varargs = f->locals[numargs].u.array->size;
}

if (numargs + varargs) {
bf->args = allocate_array_no_init(numargs + varargs, 0);
bf->args->type_field =
assign_svalues_no_free(bf->args->item, f->locals, numargs, BIT_MIXED);
if (varargs) {
bf->args->type_field |=
assign_svalues_no_free(bf->args->item + numargs,
f->locals[numargs].u.array->item,
varargs, BIT_MIXED);
}
if (bf->args->type_field & BIT_OBJECT) {
ptrdiff_t i;
for (i = 0; i < bf->args->size; i++) {
struct svalue *s = ITEM(bf->args) + i;
if ((TYPEOF(*s) == T_OBJECT) &&
s->u.object->prog &&
(s->u.object->prog->flags &
(PROGRAM_DESTRUCT_IMMEDIATE|PROGRAM_CLEAR_STORAGE))) {
/* It is typically a bad idea to have extra references
	       * to objects with these flags. The flags are usually
	       * used by stuff like mutex keys and encryption keys
	       * respectively.
	       */
struct object *o = clone_fake_object(s->u.object);
free_object(s->u.object);
SET_SVAL(*s, T_OBJECT, 0, object, o);
}
}
}
}
}
}
res->type_field = BIT_OBJECT;
/* NOTE: res has already been pushed on the stack. */
}

/*! @decl array(Pike.BacktraceFrame) backtrace()
 *!
 *!   FIXME: This documentation is not up to date!
 *!
 *!   Get a description of the current call stack.
 *!
 *!   The description is returned as an array with one entry for each call
 *!   frame on the stack.
 *!
 *!   Each entry has this format:
 *!   @array
 *!     @elem string file
 *!       A string with the filename if known, else zero.
 *!     @elem int line
 *!       An integer containing the linenumber if known, else zero.
 *!     @elem function fun
 *!       The function that was called at this level.
 *!     @elem mixed|void ... args
 *!       The arguments that the function was called with.
 *!   @endarray
 *!
 *!   The current call frame will be last in the array.
 *!
 *! @note
 *!   Please note that the frame order may be reversed in a later version
 *!   (than 7.1) of Pike to accommodate for deferred backtraces.
 *!
 *!   Note that the arguments reported in the backtrace are the current
 *!   values of the variables, and not the ones that were at call-time.
 *!   This can be used to hide sensitive information from backtraces
 *!   (eg passwords).
 *!
 *! @seealso
 *!   @[catch()], @[throw()]
 */
PMOD_EXPORT
#define f_backtrace_defined
DEFAULT_CMOD_STORAGE void f_backtrace(INT32 args) {
#line 3038 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("backtrace",args,0);
#line 3041 "/Users/hww3/devel/pike/src/builtin.cmod"
{
low_backtrace(& Pike_interpreter);
}

}
/*! @module String
 */

#line 3048 "/Users/hww3/devel/pike/src/builtin.cmod"
#define PROG_BUFFER_ID	PROG_STRING_BUFFER_ID

/*! @class Buffer
 *!    A buffer, used for building strings. It's
 *!    conceptually similar to a string, but you can only @[add]
 *!    strings to it, and you can only @[get] the value from it once.
 *!
 *!    There is a reason for those seemingly rather odd limitations,
 *!    it makes it possible to do some optimizations that really speed
 *!    things up.
 *!
 *!    You do not need to use this class unless you add very many
 *!    strings together, or very large strings.
 *!
 *! @example
 *!    For the fastest possible operation, write your code like this:
 *!
 *! @code
 *! String.Buffer b = String.Buffer( );
 *!
 *! function add = b->add;
 *!
 *! .. call add several times in code ...
 *!
 *! string result = b->get(); // also clears the buffer
 *! @endcode
 */

#undef class_Buffer_defined
#define class_Buffer_defined
DEFAULT_CMOD_STORAGE struct program *Buffer_program=NULL;

#ifdef Buffer_program_fun_num_used
DEFAULT_CMOD_STORAGE int Buffer_program_fun_num=-1;
#endif /* Buffer_program_fun_num_used */

#undef var_str_Buffer_defined
#define var_str_Buffer_defined

#undef var_initial_Buffer_defined
#define var_initial_Buffer_defined

#undef THIS
#define THIS ((struct Buffer_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_BUFFER
#define THIS_BUFFER ((struct Buffer_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_BUFFER
#define OBJ2_BUFFER(o) ((struct Buffer_struct *)(o->storage+Buffer_storage_offset))

#undef GET_BUFFER_STORAGE
#define GET_BUFFER_STORAGE(o) ((struct Buffer_struct *)(o->storage+Buffer_storage_offset)
static ptrdiff_t Buffer_storage_offset;
struct Buffer_struct {

#ifdef var_str_Buffer_defined
#line 3077 "/Users/hww3/devel/pike/src/builtin.cmod"
struct string_builder str;
#endif /* var_str_Buffer_defined */

#ifdef var_initial_Buffer_defined
#line 3078 "/Users/hww3/devel/pike/src/builtin.cmod"
int initial;
#endif /* var_initial_Buffer_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Buffer_struct *Buffer_gdb_dummy_ptr;
#endif
#define f_Buffer_cq__size_object_defined

#ifdef f_Buffer_cq__size_object_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Buffer_cq__size_object_fun_num = 0;

#endif /* f_Buffer_cq__size_object_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Buffer_cq__size_object(INT32 args) {
#line 3080 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("_size_object",args,0);
{
if( THIS->str.s )
do { INT_TYPE ret_=(THIS->str.malloced);  push_int(ret_); return; }while(0);do { INT_TYPE ret_=(
#line 3084 "/Users/hww3/devel/pike/src/builtin.cmod"
0);  push_int(ret_); return; }while(0);
#line 3085 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
#line 3087 "/Users/hww3/devel/pike/src/builtin.cmod"
void f_Buffer_get_copy( INT32 args );
void f_Buffer_get( INT32 args );
void f_Buffer_add( INT32 args );

/*! @decl void create(int initial_size)
   *!
   *!   Initializes a new buffer.
   *!
   *!   If no @[initial_size] is specified, 256 is used. If you
   *!   know approximately how big the buffer will be, you can optimize
   *!   the operation of @[add()] (slightly) by passing the size to this
   *!   function.
   */
#define f_Buffer_create_defined

#ifdef f_Buffer_create_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Buffer_create_fun_num = 0;

#endif /* f_Buffer_create_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Buffer_create(INT32 args) {
#line 3100 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * size;
#line 3100 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 1) wrong_number_of_args_error("create",args,1);
#line 3100 "/Users/hww3/devel/pike/src/builtin.cmod"
if ((args > 0) &&
    ((TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) ||
     (SUBTYPEOF(Pike_sp[0-args]) != NUMBER_UNDEFINED))) {
#line 3100 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",1,"int|void");
#line 3100 "/Users/hww3/devel/pike/src/builtin.cmod"
size=Pike_sp+0-args; dmalloc_touch_svalue(Pike_sp+0-args);
#line 3100 "/Users/hww3/devel/pike/src/builtin.cmod"
} else size = NULL;
{
struct Buffer_struct *str = THIS;
if( size )
str->initial = MAXIMUM( size->u.integer, 512 );
else
str->initial = 256;
}

}
/*! @decl string _sprintf( int flag, mapping flags )
   *! It is possible to @[sprintf] a String.Buffer object
   *! as @tt{%s@} just as if it was a string.
   */
#define f_Buffer_cq__sprintf_defined

#ifdef f_Buffer_cq__sprintf_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Buffer_cq__sprintf_fun_num = 0;

#endif /* f_Buffer_cq__sprintf_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Buffer_cq__sprintf(INT32 args) {
#line 3113 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE flag;
#line 3113 "/Users/hww3/devel/pike/src/builtin.cmod"
struct mapping * flags;
#line 3113 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("_sprintf",args,2);
#line 3113 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("_sprintf",1,"int");
#line 3113 "/Users/hww3/devel/pike/src/builtin.cmod"
flag=Pike_sp[0-2].u.integer;
#line 3113 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-2]) != PIKE_T_MAPPING) SIMPLE_ARG_TYPE_ERROR("_sprintf",2,"mapping(mixed:mixed)");
#line 3113 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(flags=Pike_sp[1-2].u.mapping);
{
switch( flag )
{
case 'O':
{
struct pike_string *res;
struct Buffer_struct *str = THIS;
push_text( "Buffer(%d /* %d */)" );
if( str->str.s )
{
push_int(str->str.s->len);
push_int(str->str.malloced);
}
else
{
push_int( 0 );
push_int( 0 );
}
f_sprintf( 3 );
dmalloc_touch_svalue(Pike_sp-1);
res = Pike_sp[-1].u.string;
Pike_sp--;
do { struct pike_string * ret_=(res); pop_n_elems(2); push_string(ret_); return; }while(0);
#line 3137 "/Users/hww3/devel/pike/src/builtin.cmod"
}

case 's':
{
pop_n_elems( args );
if( Pike_fp->current_object->refs != 1 )
f_Buffer_get_copy( 0 );
else
f_Buffer_get( 0 );
}
return;

case 't':
do { struct pike_string * ret_=(make_shared_binary_string("Buffer",6)); pop_n_elems(2); push_string(ret_); return; }while(0);
#line 3151 "/Users/hww3/devel/pike/src/builtin.cmod"
}
pop_n_elems( args );
push_undefined();
}

}
/*! @decl mixed cast( string type )
   *! It is possible to cast a String.Buffer object to
   *! a @expr{string@} and an @expr{int@}.
   */
#define f_Buffer_cast_defined

#ifdef f_Buffer_cast_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Buffer_cast_fun_num = 0;

#endif /* f_Buffer_cast_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Buffer_cast(INT32 args) {
#line 3160 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * type;
#line 3160 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("cast",args,1);
#line 3160 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("cast",1,"string");
#line 3160 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(type=Pike_sp[0-1].u.string);
#line 3162 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if( type == literal_string_string )
{
pop_stack();
if( Pike_fp->current_object->refs != 1 )
f_Buffer_get_copy( 0 );
else
f_Buffer_get( 0 );
return;
}

if( type == literal_int_string )
{
struct Buffer_struct *str = THIS;
pop_stack();
if( Pike_fp->current_object->refs != 1 )
f_Buffer_get_copy( 0 );
else
f_Buffer_get( 0 );
o_cast_to_int( );
return;
}

pop_stack();
push_undefined();
}

}
/*! @decl String.Buffer `+( string|String.Buffer what )
   */
#define f_Buffer_cq__backtick_add_defined

#ifdef f_Buffer_cq__backtick_add_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Buffer_cq__backtick_add_fun_num = 0;

#endif /* f_Buffer_cq__backtick_add_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Buffer_cq__backtick_add(INT32 args) {
#line 3191 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * what;
#line 3191 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`+",args,1);
#line 3191 "/Users/hww3/devel/pike/src/builtin.cmod"
what=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
#line 3193 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct Buffer_struct *str = THIS, *str2;
struct object *res = fast_clone_object( Buffer_program );
str2 = OBJ2_BUFFER( res );
str2->initial = str->initial;
if( str->str.s )
init_string_builder_copy (&str2->str, &str->str);
if( (Pike_fp->current_object->flags & OBJECT_CLEAR_ON_EXIT) )
res->flags |= OBJECT_CLEAR_ON_EXIT;
apply( res, "add", 1 );
do { struct object * ret_=(res); pop_stack(); push_object(ret_); return; }while(0);
#line 3204 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl String.Buffer `+=( string|String.Buffer what )
   */
#define f_Buffer_cq__backtick_add_eq_defined

#ifdef f_Buffer_cq__backtick_add_eq_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Buffer_cq__backtick_add_eq_fun_num = 0;

#endif /* f_Buffer_cq__backtick_add_eq_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Buffer_cq__backtick_add_eq(INT32 args) {
#line 3208 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * what;
#line 3208 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`+=",args,1);
#line 3208 "/Users/hww3/devel/pike/src/builtin.cmod"
what=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
#line 3210 "/Users/hww3/devel/pike/src/builtin.cmod"
{
f_Buffer_add( 1 );
do { struct object * ret_=(Pike_fp->current_object); add_ref(ret_); pop_stack(); push_object(ret_); return; }while(0);
#line 3213 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl int add(string|String.Buffer ... data)
   *!
   *!   Adds @[data] to the buffer.
   *!
   *! @returns
   *!   Returns the size of the buffer.
   *!
   *! @note
   *!   Pike 7.8 and earlier did not support adding @[String.Buffer]s
   *!   directly.
   */
#define f_Buffer_add_defined

#ifdef f_Buffer_add_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Buffer_add_fun_num = 0;

#endif /* f_Buffer_add_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Buffer_add(INT32 args) {
#line 3226 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * arg1;
#line 3226 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 0) {
  INT32 argcnt = 0;
  do {
    dmalloc_touch_svalue(Pike_sp+0+argcnt-args);
#line 3226 "/Users/hww3/devel/pike/src/builtin.cmod"
  } while (++argcnt < args-0);
  arg1=Pike_sp+0-args;
} else arg1 = NULL;
#line 3228 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct Buffer_struct *str = THIS;

if (args) {
int init_from_arg0 = 0, j;
ptrdiff_t sum = 0;
int shift = 0;
for (j=0; j < args; j++) {
struct pike_string *a;
if (TYPEOF(Pike_sp[j-args]) == PIKE_T_STRING)
a = Pike_sp[j-args].u.string;
else if ((TYPEOF(Pike_sp[j-args]) != PIKE_T_OBJECT) ||
(Pike_sp[j-args].u.object->prog != Buffer_program))
SIMPLE_BAD_ARG_ERROR("add", j+1, "string|String.Buffer");
else {
a = OBJ2_BUFFER(Pike_sp[j-args].u.object)->str.s;
if (!a) continue;
}
sum += a->len;
shift |= a->size_shift;
}
shift |= str->str.known_shift;
shift = shift & ~(shift >> 1);
/* We know it will be a string that really is this wide. */
str->str.known_shift = shift;

if (!str->str.s) {
if (sum <= str->initial)
sum = str->initial;
else
sum <<= 1;

init_string_builder_alloc(&str->str, sum, shift);
} else
string_build_mkspace(&str->str, sum, shift);

for(sum = str->str.s->len, j = 0; j<args; j++) {
struct pike_string *a;
if (TYPEOF(Pike_sp[j-args]) == PIKE_T_STRING)
a = Pike_sp[j-args].u.string;
else {
a = OBJ2_BUFFER(Pike_sp[j-args].u.object)->str.s;
if (!a) continue;
}
pike_string_cpy(MKPCHARP_STR_OFF(str->str.s, sum), a);
sum += a->len;
}

str->str.s->len = sum;
}

do { INT_TYPE ret_=(str->str.s ? str->str.s->len : 0); pop_n_elems(args); push_int(ret_); return; }while(0);
#line 3280 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl void putchar(int c)
   *! Appends the character @[c] at the end of the string.
   */
#define f_Buffer_putchar_defined

#ifdef f_Buffer_putchar_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Buffer_putchar_fun_num = 0;

#endif /* f_Buffer_putchar_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Buffer_putchar(INT32 args) {
#line 3285 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE c;
#line 3285 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("putchar",args,1);
#line 3285 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("putchar",1,"int");
#line 3285 "/Users/hww3/devel/pike/src/builtin.cmod"
c=Pike_sp[0-1].u.integer;
#line 3285 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct Buffer_struct *str = THIS;
if(!str->str.s)
init_string_builder_alloc(&str->str, str->initial, 0);
string_builder_putchar(&str->str, c);
}

}
/*! @decl int sprintf(strict_sprintf_format format, sprintf_args ... args)
   *! Appends the output from @[sprintf] at the end of the string.
   *! Returns the resulting size of the String.Buffer.
   */
#define f_Buffer_sprintf_defined

#ifdef f_Buffer_sprintf_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Buffer_sprintf_fun_num = 0;

#endif /* f_Buffer_sprintf_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Buffer_sprintf(INT32 args) {
#line 3296 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * arguments;
#line 3296 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 0) {
  INT32 argcnt = 0;
  do {
    dmalloc_touch_svalue(Pike_sp+0+argcnt-args);
#line 3296 "/Users/hww3/devel/pike/src/builtin.cmod"
  } while (++argcnt < args-0);
  arguments=Pike_sp+0-args;
} else arguments = NULL;
#line 3300 "/Users/hww3/devel/pike/src/builtin.cmod"
{
/* FIXME: Reset length on exception? */
struct Buffer_struct *str = THIS;
if(!str->str.s)
init_string_builder_alloc(&str->str, str->initial, 0);
low_f_sprintf(args, 0, &str->str);
do { INT_TYPE ret_=(str->str.s->len); pop_n_elems(args); push_int(ret_); return; }while(0);
#line 3307 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl string get_copy()
   *!
   *!   Get the data from the buffer. Significantly slower than @[get],
   *!   but does not clear the buffer.
   *!
   *! @seealso
   *!   @[get()]
   */
#define f_Buffer_get_copy_defined

#ifdef f_Buffer_get_copy_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Buffer_get_copy_fun_num = 0;

#endif /* f_Buffer_get_copy_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Buffer_get_copy(INT32 args) {
#line 3317 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("get_copy",args,0);
{
struct pike_string *str = THIS->str.s;
ptrdiff_t len;
if( str && (len = str->len) > 0 )
{
char *d = (char *)str->str;
switch( str->size_shift )
{
case 0:
str=make_shared_binary_string0((p_wchar0 *)d,len);
break;
case 1:
str=make_shared_binary_string1((p_wchar1 *)d,len);
break;
default:
str=make_shared_binary_string2((p_wchar2 *)d,len);
break;
}
if( Pike_fp->current_object->flags & OBJECT_CLEAR_ON_EXIT )
str->flags |= STRING_CLEAR_ON_EXIT;
do { struct pike_string * ret_=(str);  push_string(ret_); return; }while(0);
#line 3339 "/Users/hww3/devel/pike/src/builtin.cmod"
}
push_empty_string();
return;
}

}
/*! @decl string get()
   *!
   *!   Get the data from the buffer.
   *!
   *! @note
   *!   This will clear the data in the buffer
   *!
   *! @seealso
   *!   @[get_copy()], @[clear()]
   */
#define f_Buffer_get_defined

#ifdef f_Buffer_get_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Buffer_get_fun_num = 0;

#endif /* f_Buffer_get_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Buffer_get(INT32 args) {
#line 3354 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("get",args,0);
{
struct Buffer_struct *str = THIS;
pop_n_elems(args);
if( str->str.s )
{
struct pike_string *s = finish_string_builder( &str->str );
str->str.malloced = 0;
str->str.s = NULL;
if( Pike_fp->current_object->flags & OBJECT_CLEAR_ON_EXIT )
s->flags |= STRING_CLEAR_ON_EXIT;
push_string(s);
}
else
push_empty_string();
}

}
/*! @decl void clear()
   *!
   *!   Empty the buffer, and don't care about the old content.
   *!
   *! @note
   *!   This function was not available in Pike 7.8 and earlier.
   *!
   *! @seealso
   *!   @[get()]
   */
#define f_Buffer_clear_defined

#ifdef f_Buffer_clear_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Buffer_clear_fun_num = 0;

#endif /* f_Buffer_clear_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Buffer_clear(INT32 args) {
#line 3381 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("clear",args,0);
{
/* FIXME: Support resetting the initial size? */
struct Buffer_struct *str = THIS;
if (str->str.s) {
/* FIXME: There's also the alternative of using
       *        reset_string_builder() here.
       */
free_string_builder(&str->str);
str->str.s = NULL;
}
}

}
/*! @decl int _sizeof()
   *!
   *!   Returns the size of the buffer.
   */
#define f_Buffer_cq__sizeof_defined

#ifdef f_Buffer_cq__sizeof_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Buffer_cq__sizeof_fun_num = 0;

#endif /* f_Buffer_cq__sizeof_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Buffer_cq__sizeof(INT32 args) {
#line 3398 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("_sizeof",args,0);
{
struct Buffer_struct *str = THIS;
do { INT_TYPE ret_=(str->str.s ? str->str.s->len : 0);  push_int(ret_); return; }while(0);
#line 3402 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}

#undef internal_init_Buffer_defined
#define internal_init_Buffer_defined

#undef Buffer_event_handler_defined
#define Buffer_event_handler_defined
static void init_Buffer_struct(void)
#line 3405 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct Buffer_struct *str = THIS;
MEMSET( str, 0, sizeof( *str ) );
}


#undef internal_exit_Buffer_defined
#define internal_exit_Buffer_defined

#undef Buffer_event_handler_defined
#define Buffer_event_handler_defined
static void exit_Buffer_struct(void)
#line 3412 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct Buffer_struct *str = THIS;
if( str->str.s )
{
if( Pike_fp->flags & OBJECT_CLEAR_ON_EXIT )
guaranteed_memset( str->str.s->str, 0, str->str.s->len );
free_string_builder( &str->str );
}
}


#undef internal_gc_recurse_Buffer_defined
#define internal_gc_recurse_Buffer_defined

#undef Buffer_event_handler_defined
#define Buffer_event_handler_defined
static void gc_recurse_Buffer_struct(void)
#line 3423 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if (mc_count_bytes (Pike_fp->current_object) && THIS->str.s)
mc_counted_bytes += THIS->str.malloced;
}

#ifdef Buffer_event_handler_defined
static void Buffer_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Buffer_defined
  case PROG_EVENT_INIT: init_Buffer_struct(); break;

#endif /* internal_init_Buffer_defined */

#ifdef internal_exit_Buffer_defined
  case PROG_EVENT_EXIT: exit_Buffer_struct(); break;

#endif /* internal_exit_Buffer_defined */

#ifdef internal_gc_recurse_Buffer_defined
  case PROG_EVENT_GC_RECURSE: gc_recurse_Buffer_struct(); break;

#endif /* internal_gc_recurse_Buffer_defined */
  default: break; 
  }
}

#endif /* Buffer_event_handler_defined */
/*! @endclass
 */

/*! @class Replace
 *!
 *! This is a "compiled" version of the @[replace] function applied on
 *! a string, with more than one replace string. The replace strings
 *! are given to the create method as a @i{from@} and @i{to@} array
 *! and are then analyzed. The @expr{`()@} is then called with a
 *! string and the replace rules in the Replace object will be
 *! applied. The Replace object is used internally by the Pike
 *! optimizer and need not be used manually.
 */

#undef class_multi_string_replace_defined
#define class_multi_string_replace_defined
DEFAULT_CMOD_STORAGE struct program *multi_string_replace_program=NULL;

#ifdef multi_string_replace_program_fun_num_used
DEFAULT_CMOD_STORAGE int multi_string_replace_program_fun_num=-1;
#endif /* multi_string_replace_program_fun_num_used */

#undef var_ctx_multi_string_replace_defined
#define var_ctx_multi_string_replace_defined
#line 3445 "/Users/hww3/devel/pike/src/builtin.cmod"
/* NOTE: from and to are only kept for _encode()'s use. */

#undef var_from_multi_string_replace_defined
#define var_from_multi_string_replace_defined

#undef var_to_multi_string_replace_defined
#define var_to_multi_string_replace_defined

#undef THIS
#define THIS ((struct multi_string_replace_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_MULTI_STRING_REPLACE
#define THIS_MULTI_STRING_REPLACE ((struct multi_string_replace_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_MULTI_STRING_REPLACE
#define OBJ2_MULTI_STRING_REPLACE(o) ((struct multi_string_replace_struct *)(o->storage+multi_string_replace_storage_offset))

#undef GET_MULTI_STRING_REPLACE_STORAGE
#define GET_MULTI_STRING_REPLACE_STORAGE(o) ((struct multi_string_replace_struct *)(o->storage+multi_string_replace_storage_offset)
static ptrdiff_t multi_string_replace_storage_offset;
struct multi_string_replace_struct {

#ifdef var_ctx_multi_string_replace_defined
#line 3444 "/Users/hww3/devel/pike/src/builtin.cmod"
struct replace_many_context ctx;
#endif /* var_ctx_multi_string_replace_defined */

#ifdef var_from_multi_string_replace_defined
  struct array * from;

#endif /* var_from_multi_string_replace_defined */

#ifdef var_to_multi_string_replace_defined
  struct array * to;

#endif /* var_to_multi_string_replace_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct multi_string_replace_struct *multi_string_replace_gdb_dummy_ptr;
#endif
#define f_multi_string_replace_cq__size_object_defined

#ifdef f_multi_string_replace_cq__size_object_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_multi_string_replace_cq__size_object_fun_num = 0;

#endif /* f_multi_string_replace_cq__size_object_fun_num_used */
DEFAULT_CMOD_STORAGE void f_multi_string_replace_cq__size_object(INT32 args) {
#line 3449 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("_size_object",args,0);
{
int res = 0, i;
if( THIS->ctx.v )
{
struct svalue tmp;
SET_SVAL_TYPE(tmp, PIKE_T_STRING);
for( i=0; i<THIS->ctx.num; i++ )
{
res += sizeof(struct replace_many_tupel);
tmp.u.string = THIS->ctx.v[i].ind;
res += rec_size_svalue( &tmp, NULL );
tmp.u.string = THIS->ctx.v[i].val;
res += rec_size_svalue( &tmp, NULL );
}
}

do { INT_TYPE ret_=(res);  push_int(ret_); return; }while(0);
#line 3467 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl void create(array(string)|mapping(string:string)|void from, @
   *!                   array(string)|string|void to)
   */
#define f_multi_string_replace_create_defined

#ifdef f_multi_string_replace_create_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_multi_string_replace_create_fun_num = 0;

#endif /* f_multi_string_replace_create_fun_num_used */
DEFAULT_CMOD_STORAGE void f_multi_string_replace_create(INT32 args) {
#line 3472 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * from_arg;
struct svalue * to_arg;
#line 3472 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 2) wrong_number_of_args_error("create",args,2);
#line 3472 "/Users/hww3/devel/pike/src/builtin.cmod"
if ((args > 0) &&
    ((TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) ||
     (SUBTYPEOF(Pike_sp[0-args]) != NUMBER_UNDEFINED))) {
#line 3472 "/Users/hww3/devel/pike/src/builtin.cmod"
from_arg=Pike_sp+0-args; dmalloc_touch_svalue(Pike_sp+0-args);
#line 3472 "/Users/hww3/devel/pike/src/builtin.cmod"
} else from_arg = NULL;
if ((args > 1) &&
    ((TYPEOF(Pike_sp[1-args]) != PIKE_T_INT) ||
     (SUBTYPEOF(Pike_sp[1-args]) != NUMBER_UNDEFINED))) {
#line 3473 "/Users/hww3/devel/pike/src/builtin.cmod"
to_arg=Pike_sp+1-args; dmalloc_touch_svalue(Pike_sp+1-args);
#line 3473 "/Users/hww3/devel/pike/src/builtin.cmod"
} else to_arg = NULL;
{
if (THIS->from) {
free_array(THIS->from);
THIS->from = NULL;
}
if (THIS->to) {
free_array(THIS->to);
THIS->to = NULL;
}
if (THIS->ctx.v)
free_replace_many_context(&THIS->ctx);

if (!args) {
push_int(0);
return;
}
if (from_arg && TYPEOF(*from_arg) == T_MAPPING) {
if (to_arg) {
Pike_error("Bad number of arguments to create().\n");
}
THIS->from = mapping_indices(from_arg->u.mapping);
THIS->to = mapping_values(from_arg->u.mapping);
pop_n_elems(args);
args = 0;
} else {
/* FIXME: Why is from declared |void, when it isn't allowed
       *        to be void?
       *        /grubba 2004-09-02
       *
       * It probably has to do with the "if (!args)" above: It should
       * be possible to create an empty instance. /mast
       */
if (!from_arg || !to_arg) {
Pike_error("Bad number of arguments to create().\n");
}
pop_n_elems(args-2);
args = 2;
if (TYPEOF(*from_arg) != T_ARRAY) {
SIMPLE_BAD_ARG_ERROR("replace", 1,
"array(string)|mapping(string:string)");
}
if (TYPEOF(*to_arg) == T_STRING) {
push_int(from_arg->u.array->size);
stack_swap();
f_allocate(2);
}
if (TYPEOF(*to_arg) != T_ARRAY) {
SIMPLE_BAD_ARG_ERROR("replace", 2, "array(string)|string");
}
if (from_arg->u.array->size != to_arg->u.array->size) {
Pike_error("Replace must have equal-sized from and to arrays.\n");
}
add_ref(THIS->from = from_arg->u.array);
add_ref(THIS->to = to_arg->u.array);
}

if (!THIS->from->size) {
/* Enter no-op mode. */
pop_n_elems(args);
push_int(0);
return;
}

if( (THIS->from->type_field & ~BIT_STRING) &&
(array_fix_type_field(THIS->from) & ~BIT_STRING) )
SIMPLE_BAD_ARG_ERROR("replace", 1,
"array(string)|mapping(string:string)");

if( (THIS->to->type_field & ~BIT_STRING) &&
(array_fix_type_field(THIS->to) & ~BIT_STRING) )
SIMPLE_BAD_ARG_ERROR("replace", 2, "array(string)|string");

compile_replace_many(&THIS->ctx, THIS->from, THIS->to, 1);

pop_n_elems(args);
push_int(0);
}

}
/*! @decl string `()(string str)
   */
#define f_multi_string_replace_cq__backtick_28_29_defined

#ifdef f_multi_string_replace_cq__backtick_28_29_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_multi_string_replace_cq__backtick_28_29_fun_num = 0;

#endif /* f_multi_string_replace_cq__backtick_28_29_fun_num_used */
DEFAULT_CMOD_STORAGE void f_multi_string_replace_cq__backtick_28_29(INT32 args) {
#line 3554 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * str;
#line 3554 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`()",args,1);
#line 3554 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("`()",1,"string");
#line 3554 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(str=Pike_sp[0-1].u.string);
{
if (!THIS->ctx.v) {
/* The result is already on the stack in the correct place... */
return;
}

do { struct pike_string * ret_=(execute_replace_many(&THIS->ctx, str)); pop_stack(); push_string(ret_); return; }while(0);
#line 3562 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl array(array(string)) _encode()
   */
#define f_multi_string_replace_cq__encode_defined

#ifdef f_multi_string_replace_cq__encode_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_multi_string_replace_cq__encode_fun_num = 0;

#endif /* f_multi_string_replace_cq__encode_fun_num_used */
DEFAULT_CMOD_STORAGE void f_multi_string_replace_cq__encode(INT32 args) {
#line 3566 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("_encode",args,0);
{
if (THIS->from) {
ref_push_array(THIS->from);
} else {
push_undefined();
}
if (THIS->to) {
ref_push_array(THIS->to);
} else {
push_undefined();
}
f_aggregate(2);
}

}
/*! @decl void _decode(array(array(string)) encoded)
   */
#define f_multi_string_replace_cq__decode_defined

#ifdef f_multi_string_replace_cq__decode_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_multi_string_replace_cq__decode_fun_num = 0;

#endif /* f_multi_string_replace_cq__decode_fun_num_used */
DEFAULT_CMOD_STORAGE void f_multi_string_replace_cq__decode(INT32 args) {
#line 3583 "/Users/hww3/devel/pike/src/builtin.cmod"
struct array * encoded;
#line 3583 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("_decode",args,1);
#line 3583 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_ARRAY) SIMPLE_ARG_TYPE_ERROR("_decode",1,"array(array(string))");
#line 3583 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(encoded=Pike_sp[0-1].u.array);
{
INT32 i;
for (i=0; i < encoded->size; i++) {
push_svalue(encoded->item + i);
stack_swap();
}
pop_stack();

f_multi_string_replace_create(i);
}

}

#undef internal_init_multi_string_replace_defined
#define internal_init_multi_string_replace_defined

#undef multi_string_replace_event_handler_defined
#define multi_string_replace_event_handler_defined
static void init_multi_string_replace_struct(void)
#line 3596 "/Users/hww3/devel/pike/src/builtin.cmod"
{
MEMSET(&THIS->ctx, 0, sizeof(struct replace_many_context));
}


#undef internal_exit_multi_string_replace_defined
#define internal_exit_multi_string_replace_defined

#undef multi_string_replace_event_handler_defined
#define multi_string_replace_event_handler_defined
static void exit_multi_string_replace_struct(void)
#line 3602 "/Users/hww3/devel/pike/src/builtin.cmod"
{
free_replace_many_context(&THIS->ctx);
}

#ifdef multi_string_replace_event_handler_defined
static void multi_string_replace_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_multi_string_replace_defined
  case PROG_EVENT_INIT: init_multi_string_replace_struct(); break;

#endif /* internal_init_multi_string_replace_defined */

#ifdef internal_exit_multi_string_replace_defined
  case PROG_EVENT_EXIT: exit_multi_string_replace_struct(); break;

#endif /* internal_exit_multi_string_replace_defined */
  default: break; 
  }
}

#endif /* multi_string_replace_event_handler_defined */
/*! @endclass
 */

/*! @class SingleReplace
 *!
 *! This is a "compiled" version of the @[replace] function applied on
 *! a string, with just one replace string. The replace strings are
 *! given to the create method as a @i{from@} and @i{tom@} string and
 *! are then analyzed. The @expr{`()@} is then called with a string
 *! and the replace rule in the Replace object will be applied. The
 *! Replace object is used internally by the Pike optimizer and need
 *! not be used manually.
 */

#undef class_single_string_replace_defined
#define class_single_string_replace_defined
DEFAULT_CMOD_STORAGE struct program *single_string_replace_program=NULL;

#ifdef single_string_replace_program_fun_num_used
DEFAULT_CMOD_STORAGE int single_string_replace_program_fun_num=-1;
#endif /* single_string_replace_program_fun_num_used */

#undef var_mojt_single_string_replace_defined
#define var_mojt_single_string_replace_defined

#undef var_del_single_string_replace_defined
#define var_del_single_string_replace_defined

#undef var_to_single_string_replace_defined
#define var_to_single_string_replace_defined

#undef THIS
#define THIS ((struct single_string_replace_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_SINGLE_STRING_REPLACE
#define THIS_SINGLE_STRING_REPLACE ((struct single_string_replace_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_SINGLE_STRING_REPLACE
#define OBJ2_SINGLE_STRING_REPLACE(o) ((struct single_string_replace_struct *)(o->storage+single_string_replace_storage_offset))

#undef GET_SINGLE_STRING_REPLACE_STORAGE
#define GET_SINGLE_STRING_REPLACE_STORAGE(o) ((struct single_string_replace_struct *)(o->storage+single_string_replace_storage_offset)
static ptrdiff_t single_string_replace_storage_offset;
struct single_string_replace_struct {

#ifdef var_mojt_single_string_replace_defined
#line 3622 "/Users/hww3/devel/pike/src/builtin.cmod"
SearchMojt mojt;
#endif /* var_mojt_single_string_replace_defined */

#ifdef var_del_single_string_replace_defined
  struct pike_string * del;

#endif /* var_del_single_string_replace_defined */

#ifdef var_to_single_string_replace_defined
  struct pike_string * to;

#endif /* var_to_single_string_replace_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct single_string_replace_struct *single_string_replace_gdb_dummy_ptr;
#endif

#undef extra_single_string_replace_defined
#define extra_single_string_replace_defined
/*! @decl void create(string|void from, string|void to)
   *!
   *! @note
   *!   May be called with either zero or two arguments.
   */
#define f_single_string_replace_create_defined

#ifdef f_single_string_replace_create_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_single_string_replace_create_fun_num = 0;

#endif /* f_single_string_replace_create_fun_num_used */
DEFAULT_CMOD_STORAGE void f_single_string_replace_create(INT32 args) {
#line 3639 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * del;
#line 3639 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * to;
#line 3639 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 2) wrong_number_of_args_error("create",args,2);
#line 3639 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 0 &&
    (TYPEOF(Pike_sp[0-args]) != PIKE_T_INT ||
     Pike_sp[0-args].u.integer)) {
#line 3639 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("create",1,"string|void");
#line 3639 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(del=Pike_sp[0-args].u.string);
#line 3639 "/Users/hww3/devel/pike/src/builtin.cmod"
} else del = NULL;
#line 3639 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 1 &&
    (TYPEOF(Pike_sp[1-args]) != PIKE_T_INT ||
     Pike_sp[1-args].u.integer)) {
#line 3639 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-args]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("create",2,"string|void");
#line 3639 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(to=Pike_sp[1-args].u.string);
#line 3639 "/Users/hww3/devel/pike/src/builtin.cmod"
} else to = NULL;
{
if (THIS->del) {
free_string(THIS->del);
THIS->del = NULL;
}
if (THIS->to) {
free_string(THIS->to);
THIS->to = NULL;
}

if (!del) return;

if (!to) {
SIMPLE_BAD_ARG_ERROR("replace", 2, "string");
}

if (del == to) {
/* No-op... */
return;
}

copy_shared_string(THIS->del, del);
copy_shared_string(THIS->to, to);

if (del->len) {
THIS->mojt = simple_compile_memsearcher(del);
}
}

}
#line 3669 "/Users/hww3/devel/pike/src/builtin.cmod"
/*** replace function ***/
typedef char *(* replace_searchfunc)(void *,void *,size_t);

/*! @decl string `()(string str)
   */
#define f_single_string_replace_cq__backtick_28_29_defined

#ifdef f_single_string_replace_cq__backtick_28_29_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_single_string_replace_cq__backtick_28_29_fun_num = 0;

#endif /* f_single_string_replace_cq__backtick_28_29_fun_num_used */
DEFAULT_CMOD_STORAGE void f_single_string_replace_cq__backtick_28_29(INT32 args) {
#line 3674 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * str;
#line 3674 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`()",args,1);
#line 3674 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("`()",1,"string");
#line 3674 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(str=Pike_sp[0-1].u.string);
{
int shift;
struct pike_string *del = THIS->del;
struct pike_string *to = THIS->to;
struct pike_string *ret = NULL;

if (!str->len || !del || !to) {
/* The result is already on the stack in the correct place... */
return;
}

shift = MAXIMUM(str->size_shift, to->size_shift);

if (!del->len) {
int e, pos;
ret = begin_wide_shared_string(str->len + to->len * (str->len-1),
shift);
low_set_index(ret, 0, index_shared_string(str, 0));
for(pos=e=1;e<str->len;e++)
{
pike_string_cpy(MKPCHARP_STR_OFF(ret,pos), to);
pos+=to->len;
low_set_index(ret,pos++,index_shared_string(str,e));
}
} else {
char *s, *end, *tmp;
replace_searchfunc f = (replace_searchfunc)0;
void *mojt_data = THIS->mojt.data;
PCHARP r;

end = str->str+(str->len<<str->size_shift);

switch(str->size_shift)
{
case 0: f = (replace_searchfunc)THIS->mojt.vtab->func0; break;
case 1: f = (replace_searchfunc)THIS->mojt.vtab->func1; break;
case 2: f = (replace_searchfunc)THIS->mojt.vtab->func2; break;
#ifdef PIKE_DEBUG
 default: Pike_fatal("Illegal shift.\n");
#endif
 }

if(del->len == to->len)
{
ret = begin_wide_shared_string(str->len, shift);
} else {
INT32 delimiters = 0;

s = str->str;

while((s = f(mojt_data, s, (end-s)>>str->size_shift)))
{
delimiters++;
s += del->len << str->size_shift;
}

if (!delimiters) {
/* The result is already on the stack in the correct place... */
return;
}

ret = begin_wide_shared_string(str->len +
(to->len-del->len)*delimiters, shift);
}

s = str->str;
r = MKPCHARP_STR(ret);

while((tmp = f(mojt_data, s, (end-s)>>str->size_shift)))
{
#ifdef PIKE_DEBUG
 if(tmp + (del->len << str->size_shift) > end)
Pike_fatal("SearchMojt found a match beyond end of string!\n");
#endif
 generic_memcpy(r,MKPCHARP(s,str->size_shift),(tmp-s)>>str->size_shift);
INC_PCHARP(r,(tmp-s)>>str->size_shift);
pike_string_cpy(r,to);
INC_PCHARP(r,to->len);
s=tmp+(del->len << str->size_shift);
}
generic_memcpy(r,MKPCHARP(s,str->size_shift),(end-s)>>str->size_shift);
}
do { struct pike_string * ret_=(end_shared_string(ret)); pop_stack(); push_string(ret_); return; }while(0);
#line 3758 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl array(string) _encode()
   */
#define f_single_string_replace_cq__encode_defined

#ifdef f_single_string_replace_cq__encode_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_single_string_replace_cq__encode_fun_num = 0;

#endif /* f_single_string_replace_cq__encode_fun_num_used */
DEFAULT_CMOD_STORAGE void f_single_string_replace_cq__encode(INT32 args) {
#line 3762 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("_encode",args,0);
{
if (THIS->del) {
ref_push_string(THIS->del);
ref_push_string(THIS->to);
f_aggregate(2);
} else {
push_int(0);
}
}

}
/*! @decl void _decode(array(string)|int(0..0) encoded)
   */
#define f_single_string_replace_cq__decode_defined

#ifdef f_single_string_replace_cq__decode_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_single_string_replace_cq__decode_fun_num = 0;

#endif /* f_single_string_replace_cq__decode_fun_num_used */
DEFAULT_CMOD_STORAGE void f_single_string_replace_cq__decode(INT32 args) {
#line 3775 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * encoded_;
#line 3775 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("_decode",args,1);
#line 3775 "/Users/hww3/devel/pike/src/builtin.cmod"
encoded_=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
{ 
INT32 i = 0;
if (TYPEOF(*encoded_) == PIKE_T_ARRAY) {
struct array *encoded = encoded_->u.array;

for (i=0; i < encoded->size; i++) {
push_svalue(encoded->item + i);
stack_swap();
}
}
pop_stack();

f_single_string_replace_create(i);
}
}
/*! @endclass
 */

/*! @class Bootstring
 *!
 *! This class implements the "Bootstring" string transcoder described in
 *! @url{ftp://ftp.rfc-editor.org/in-notes/rfc3492.txt@}.
 */

#undef class_bootstring_defined
#define class_bootstring_defined
DEFAULT_CMOD_STORAGE struct program *bootstring_program=NULL;

#ifdef bootstring_program_fun_num_used
DEFAULT_CMOD_STORAGE int bootstring_program_fun_num=-1;
#endif /* bootstring_program_fun_num_used */

#undef var_damp_bootstring_defined
#define var_damp_bootstring_defined

#undef var_initial_n_bootstring_defined
#define var_initial_n_bootstring_defined

#undef var_delim_bootstring_defined
#define var_delim_bootstring_defined

#undef var_digits_bootstring_defined
#define var_digits_bootstring_defined

#undef THIS
#define THIS ((struct bootstring_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_BOOTSTRING
#define THIS_BOOTSTRING ((struct bootstring_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_BOOTSTRING
#define OBJ2_BOOTSTRING(o) ((struct bootstring_struct *)(o->storage+bootstring_storage_offset))

#undef GET_BOOTSTRING_STORAGE
#define GET_BOOTSTRING_STORAGE(o) ((struct bootstring_struct *)(o->storage+bootstring_storage_offset)
static ptrdiff_t bootstring_storage_offset;
struct bootstring_struct {

#ifdef var_damp_bootstring_defined
#line 3802 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE base, tmin, tmax, skew, damp;
#endif /* var_damp_bootstring_defined */

#ifdef var_initial_n_bootstring_defined
#line 3803 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE initial_bias, initial_n;
#endif /* var_initial_n_bootstring_defined */

#ifdef var_delim_bootstring_defined
#line 3804 "/Users/hww3/devel/pike/src/builtin.cmod"
p_wchar2 delim;
#endif /* var_delim_bootstring_defined */

#ifdef var_digits_bootstring_defined
  struct pike_string * digits;

#endif /* var_digits_bootstring_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct bootstring_struct *bootstring_gdb_dummy_ptr;
#endif
#line 3807 "/Users/hww3/devel/pike/src/builtin.cmod"
static INT_TYPE bootstring_cp_to_digit(p_wchar2 ch)
{
ptrdiff_t digit = THIS->digits->len;
PCHARP digits = MKPCHARP_STR( THIS->digits );
while (digit>=0)
if (INDEX_PCHARP( digits, digit ) == ch)
return digit;
else
--digit;
return -1;
}

static INT_TYPE bootstring_adapt(INT_TYPE delta, INT_TYPE numpoints,
int firsttime)
{
struct bootstring_struct *bs = THIS;
INT_TYPE k = 0, b = bs->base;
INT_TYPE a = b - bs->tmin;
INT_TYPE limit = (a * bs->tmax) >> 1;
if (firsttime)
delta /= bs->damp;
else
delta >>= 1;
delta += delta / numpoints;
while (delta > limit) {
delta /= a;
k += b;
}
return k + (a + 1)*delta / (delta + bs->skew);
}

/*! @decl string decode(string s)
   *!
   *! Decodes a Bootstring encoded string of "basic" code points back
   *! to the original string space.
   */
#define f_bootstring_decode_defined

#ifdef f_bootstring_decode_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_bootstring_decode_fun_num = 0;

#endif /* f_bootstring_decode_fun_num_used */
DEFAULT_CMOD_STORAGE void f_bootstring_decode(INT32 args) {
#line 3843 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * s;
#line 3843 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("decode",args,1);
#line 3843 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("decode",1,"string");
#line 3843 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(s=Pike_sp[0-1].u.string);
{
struct bootstring_struct *bs = THIS;
INT_TYPE n = bs->initial_n;
INT_TYPE i = 0;
INT_TYPE bias = bs->initial_bias;
ptrdiff_t pos, input_left;
PCHARP input;
struct string_builder output;
init_string_builder( &output,0 );
input = MKPCHARP_STR( s );
input_left = s->len;
for (pos = input_left-1; pos > 0; --pos)
if (INDEX_PCHARP( input, pos ) == bs->delim) {
string_builder_append( &output, input, pos );
INC_PCHARP( input, pos+1 );
input_left -= pos+1;
break;
}

while (input_left > 0) {
INT_TYPE oldi = i;
INT_TYPE w = 1;
INT_TYPE k;
for (k=bs->base; ; k+=bs->base) {
INT_TYPE digit, t;
if (input_left < 1 ||
(digit = bootstring_cp_to_digit( EXTRACT_PCHARP( input ) )) < 0) {
free_string_builder( &output );
Pike_error( "Invalid variable-length integer.\n" );
}
INC_PCHARP( input, 1 );
--input_left;
i += digit * w; /* fail on overflow... */
if (k <= bias + bs->tmin)
t = bs->tmin;
else if (k >= bias + bs->tmax)
t = bs->tmax;
else
t = k - bias;
if (digit < t) break;
w *= (bs->base - t);
}
bias = bootstring_adapt( i - oldi, output.s->len+1, !oldi );
n += i / (output.s->len+1);
i %= output.s->len+1;
string_builder_putchar( &output, n );
if (i != output.s->len-1)
switch (output.s->size_shift) {
case 0:
{
p_wchar0 *s = STR0(output.s);
INT_TYPE p = output.s->len;
while (--p>i)
s[p] = s[p-1];
s[p] = DO_NOT_WARN ((p_wchar0) n);
}
break;
case 1:
{
p_wchar1 *s = STR1(output.s);
INT_TYPE p = output.s->len;
while (--p>i)
s[p] = s[p-1];
s[p] = DO_NOT_WARN ((p_wchar1) n);
}
break;
case 2:
{
p_wchar2 *s = STR2(output.s);
INT_TYPE p = output.s->len;
while (--p>i)
s[p] = s[p-1];
s[p] = DO_NOT_WARN ((p_wchar2) n);
}
break;
#ifdef PIKE_DEBUG
 default:
Pike_fatal("Illegal shift size!\n");
#endif
 }
i++;
}

do { struct pike_string * ret_=(finish_string_builder( &output )); pop_stack(); push_string(ret_); return; }while(0);
#line 3928 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl string encode(string s)
   *!
   *! Encodes a string using Bootstring encoding into a string constisting
   *! only of "basic" code points (< initial_n).
   */
#define f_bootstring_encode_defined

#ifdef f_bootstring_encode_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_bootstring_encode_fun_num = 0;

#endif /* f_bootstring_encode_fun_num_used */
DEFAULT_CMOD_STORAGE void f_bootstring_encode(INT32 args) {
#line 3935 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * s;
#line 3935 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("encode",args,1);
#line 3935 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("encode",1,"string");
#line 3935 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(s=Pike_sp[0-1].u.string);
{
struct bootstring_struct *bs = THIS;
INT_TYPE n = bs->initial_n;
INT_TYPE delta = 0;
INT_TYPE bias = bs->initial_bias;
INT_TYPE c, h, b = 0;
ptrdiff_t pos, input_left;
PCHARP input;
struct string_builder output;
init_string_builder( &output,0 );
input = MKPCHARP_STR( s );
input_left = s->len;
for (pos=0; pos<input_left; pos++)
if ((c = INDEX_PCHARP( input, pos )) < n) {
string_builder_putchar( &output, c );
b++;
}
if ((h = b))
string_builder_putchar( &output, bs->delim );
while (h < input_left) {
INT_TYPE m = -1;
for (pos=0; pos<input_left; pos++)
if ((c = INDEX_PCHARP( input, pos )) >= n &&
(m < 0 || c < m))
m = c;
delta = delta + (m - n) * (h + 1); /* fail on overflow... */
n = m;
for (pos=0; pos<input_left; pos++)
if ((c = INDEX_PCHARP( input, pos )) < n)
delta++;
else if (c == n) {
INT_TYPE k, q = delta;
for (k=bs->base; ; k+=bs->base) {
INT_TYPE t, bt;
if (k <= bias + bs->tmin)
t = bs->tmin;
else if(k >= bias + bs->tmax)
t = bs->tmax;
else
t = k-bias;
if (q < t)
break;
bt = bs->base - t;
string_builder_putchar( &output,
index_shared_string( bs->digits,
t + (q-t)%bt ) );
q = (q-t) / bt;
}
string_builder_putchar( &output,
index_shared_string( bs->digits, q ) );
bias = bootstring_adapt( delta, h+1, h==b );
delta = 0;
h++;
}
delta++;
n++;
}

do { struct pike_string * ret_=(finish_string_builder( &output )); pop_stack(); push_string(ret_); return; }while(0);
#line 3995 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl void create(int base, int tmin, int tmax, int skew,		@
   *!                   int damp, int initial_bias, int initial_n,	@
   *!			int delim, string digits)
   *!
   *! Creates a Bootstring transcoder instance using the specified parameters.
   *!
   *! @param base
   *!   The base used by the variable-length integers.
   *! @param tmin
   *!   The minimum threshold digit value for the variable-length integers.
   *!   Must be >=0 and <= tmax.
   *! @param tmax
   *!   The maximum threshold digit value for the variable-length integers.
   *!   Must be <= base-1.
   *! @param skew
   *!   The skew term for the bias adapation.  Must be >= 1.
   *! @param damp
   *!   The damping factor for the bias adaption.  Must be >= 2.
   *! @param initial_bias
   *!   The initial bias for the variable-length integer thresholding.
   *!   initial_bias % base must be <= base - tmin.
   *! @param initial_n
   *!   The first code point outside the "basic" set of code points.
   *! @param delim
   *!   The "basic" code point used as the delimiter.
   *! @param digits
   *!   The "basic" code points used as digits.  The length of the string
   *!   should be the same as the base parameter.
   */
#define f_bootstring_create_defined

#ifdef f_bootstring_create_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_bootstring_create_fun_num = 0;

#endif /* f_bootstring_create_fun_num_used */
DEFAULT_CMOD_STORAGE void f_bootstring_create(INT32 args) {
#line 4026 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE base;
#line 4026 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE tmin;
#line 4026 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE tmax;
INT_TYPE skew;
#line 4027 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE damp;
INT_TYPE initial_bias;
#line 4028 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE initial_n;
INT_TYPE delim;
#line 4029 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * digits;
#line 4026 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 9) wrong_number_of_args_error("create",args,9);
#line 4026 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-9]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",1,"int");
#line 4026 "/Users/hww3/devel/pike/src/builtin.cmod"
base=Pike_sp[0-9].u.integer;
#line 4026 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-9]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",2,"int");
#line 4026 "/Users/hww3/devel/pike/src/builtin.cmod"
tmin=Pike_sp[1-9].u.integer;
#line 4026 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[2-9]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",3,"int");
#line 4026 "/Users/hww3/devel/pike/src/builtin.cmod"
tmax=Pike_sp[2-9].u.integer;
if(TYPEOF(Pike_sp[3-9]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",4,"int");
#line 4027 "/Users/hww3/devel/pike/src/builtin.cmod"
skew=Pike_sp[3-9].u.integer;
#line 4027 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[4-9]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",5,"int");
#line 4027 "/Users/hww3/devel/pike/src/builtin.cmod"
damp=Pike_sp[4-9].u.integer;
if(TYPEOF(Pike_sp[5-9]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",6,"int");
#line 4028 "/Users/hww3/devel/pike/src/builtin.cmod"
initial_bias=Pike_sp[5-9].u.integer;
#line 4028 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[6-9]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",7,"int");
#line 4028 "/Users/hww3/devel/pike/src/builtin.cmod"
initial_n=Pike_sp[6-9].u.integer;
if(TYPEOF(Pike_sp[7-9]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",8,"int");
#line 4029 "/Users/hww3/devel/pike/src/builtin.cmod"
delim=Pike_sp[7-9].u.integer;
#line 4029 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[8-9]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("create",9,"string");
#line 4029 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(digits=Pike_sp[8-9].u.string);
#line 4031 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct bootstring_struct *bs = THIS;
if (base<2)
Pike_error("Bogus base\n");
if (tmin<0 || tmax<tmin || base-1<tmax)
Pike_error("Parameters violate 0 <= tmin <= tmax <= base-1\n");
if (skew < 1)
Pike_error("Parameters violate skew >= 1\n");
if (damp < 2)
Pike_error("Parameters violate damp >= 2\n");
if (initial_bias%base > base-tmin)
Pike_error("Parameters violate initial_bias%%base <= base-tmin\n");
if (digits->len != base)
Pike_error("Length of digits string does not match base.\n");
bs->base = base; bs->tmin = tmin; bs->tmax = tmax;
bs->skew = skew; bs->damp = damp;
bs->initial_bias = initial_bias; bs->initial_n = initial_n;
bs->delim = delim;
if (bs->digits) {
free_string( bs->digits );
bs->digits = NULL;
}
copy_shared_string( bs->digits, digits );
}

}
/*! @endclass
 */

/*! @endmodule
 */

/*! @module System
 */

/*! @class Time
 *!
 *! The current time as a structure containing a sec and a usec
 *! member.
 */

#undef class_Time_defined
#define class_Time_defined
DEFAULT_CMOD_STORAGE struct program *Time_program=NULL;

#ifdef Time_program_fun_num_used
DEFAULT_CMOD_STORAGE int Time_program_fun_num=-1;
#endif /* Time_program_fun_num_used */

#undef var_hard_update_Time_defined
#define var_hard_update_Time_defined

#undef THIS
#define THIS ((struct Time_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_TIME
#define THIS_TIME ((struct Time_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_TIME
#define OBJ2_TIME(o) ((struct Time_struct *)(o->storage+Time_storage_offset))

#undef GET_TIME_STORAGE
#define GET_TIME_STORAGE(o) ((struct Time_struct *)(o->storage+Time_storage_offset)
static ptrdiff_t Time_storage_offset;
struct Time_struct {

#ifdef var_hard_update_Time_defined
#line 4074 "/Users/hww3/devel/pike/src/builtin.cmod"
int hard_update;
#endif /* var_hard_update_Time_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Time_struct *Time_gdb_dummy_ptr;
#endif
/*! @decl int sec
   *! @decl int usec
   *!
   *!   The number of seconds and microseconds since the epoch and the
   *!   last whole second, respectively. (See also @[predef::time()])
   *!
   *! @note
   *!   Please note that these variables will continually update when
   *!   they are requested, there is no need to create new Time()
   *!   objects.
   */

#define f_Time_cq__backticksec_defined

#ifdef f_Time_cq__backticksec_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Time_cq__backticksec_fun_num = 0;

#endif /* f_Time_cq__backticksec_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Time_cq__backticksec(INT32 args) {
#line 4088 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`sec",args,0);
{
struct timeval now;

if( THIS->hard_update )
ACCURATE_GETTIMEOFDAY( &now );
else
INACCURATE_GETTIMEOFDAY( &now );

do { INT_TYPE ret_=(now.tv_sec);  push_int(ret_); return; }while(0);
#line 4098 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
#define f_Time_cq__backtickusec_defined

#ifdef f_Time_cq__backtickusec_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Time_cq__backtickusec_fun_num = 0;

#endif /* f_Time_cq__backtickusec_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Time_cq__backtickusec(INT32 args) {
#line 4100 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`usec",args,0);
{
struct timeval now;

if( THIS->hard_update )
ACCURATE_GETTIMEOFDAY( &now );
else
INACCURATE_GETTIMEOFDAY( &now );

do { INT_TYPE ret_=(now.tv_usec);  push_int(ret_); return; }while(0);
#line 4110 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl int usec_full
   *!
   *!   The number of microseconds since the epoch. Please note that
   *!   pike needs to have been compiled with bignum support for this
   *!   variable to contain sensible values.
   */

#define f_Time_cq__backtickusec_full_defined

#ifdef f_Time_cq__backtickusec_full_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Time_cq__backtickusec_full_fun_num = 0;

#endif /* f_Time_cq__backtickusec_full_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Time_cq__backtickusec_full(INT32 args) {
#line 4119 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`usec_full",args,0);
{
struct timeval now;

if( THIS->hard_update )
ACCURATE_GETTIMEOFDAY( &now );
else
INACCURATE_GETTIMEOFDAY( &now );

push_int( now.tv_sec );
push_int( 1000000 );
f_multiply( 2 );
push_int( now.tv_usec );
f_add( 2 );
return;
}

}
/*! @decl protected void create( int fast );
   *!
   *! If @[fast] is true, do not request a new time from the system,
   *! instead use the global current time variable.
   *!
   *! This will only work in callbacks, but can save significant amounts
   *! of CPU.
   */
#define f_Time_create_defined

#ifdef f_Time_create_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Time_create_fun_num = 0;

#endif /* f_Time_create_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Time_create(INT32 args) {
#line 4144 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE fast;
#line 4144 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 1) wrong_number_of_args_error("create",args,1);
#line 4144 "/Users/hww3/devel/pike/src/builtin.cmod"
if ((args > 0) &&
    ((TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) ||
     (SUBTYPEOF(Pike_sp[0-args]) != NUMBER_UNDEFINED))) {
#line 4144 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",1,"int|void");
#line 4144 "/Users/hww3/devel/pike/src/builtin.cmod"
fast=Pike_sp[0-args].u.integer;
#line 4144 "/Users/hww3/devel/pike/src/builtin.cmod"
} else fast = 0;
#line 4146 "/Users/hww3/devel/pike/src/builtin.cmod"
{
THIS->hard_update = !fast;
}
}
/*! @endclass
 */

/*! @class Timer
 */

#undef class_Timer_defined
#define class_Timer_defined
DEFAULT_CMOD_STORAGE struct program *Timer_program=NULL;

#ifdef Timer_program_fun_num_used
DEFAULT_CMOD_STORAGE int Timer_program_fun_num=-1;
#endif /* Timer_program_fun_num_used */

#undef var_last_time_Timer_defined
#define var_last_time_Timer_defined

#undef var_hard_update_Timer_defined
#define var_hard_update_Timer_defined

#undef THIS
#define THIS ((struct Timer_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_TIMER
#define THIS_TIMER ((struct Timer_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_TIMER
#define OBJ2_TIMER(o) ((struct Timer_struct *)(o->storage+Timer_storage_offset))

#undef GET_TIMER_STORAGE
#define GET_TIMER_STORAGE(o) ((struct Timer_struct *)(o->storage+Timer_storage_offset)
static ptrdiff_t Timer_storage_offset;
struct Timer_struct {

#ifdef var_last_time_Timer_defined
#line 4158 "/Users/hww3/devel/pike/src/builtin.cmod"
struct timeval last_time;
#endif /* var_last_time_Timer_defined */

#ifdef var_hard_update_Timer_defined
#line 4159 "/Users/hww3/devel/pike/src/builtin.cmod"
int hard_update;
#endif /* var_hard_update_Timer_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Timer_struct *Timer_gdb_dummy_ptr;
#endif
/*! @decl float peek()
   *!   Return the time in seconds since the last time @[get] was called.
   */
#define f_Timer_peek_defined

#ifdef f_Timer_peek_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Timer_peek_fun_num = 0;

#endif /* f_Timer_peek_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Timer_peek(INT32 args) {
#line 4164 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("peek",args,0);
{
struct timeval now;
FLOAT_TYPE res;
if( THIS->hard_update )
ACCURATE_GETTIMEOFDAY( &now );
else
INACCURATE_GETTIMEOFDAY( &now );
res = now.tv_sec-THIS->last_time.tv_sec +
(now.tv_usec-THIS->last_time.tv_usec)/(FLOAT_TYPE) 1000000.0;
do { FLOAT_TYPE ret_=(res);  push_float(ret_); return; }while(0);
#line 4175 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @decl float get()
   *!   Return the time in seconds since the last time get was called.
   *!   The first time this method is called the time since the object
   *!   was created is returned instead.
   */
#define f_Timer_get_defined

#ifdef f_Timer_get_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Timer_get_fun_num = 0;

#endif /* f_Timer_get_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Timer_get(INT32 args) {
#line 4182 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("get",args,0);
{
f_Timer_peek( 0 );
INACCURATE_GETTIMEOFDAY(&THIS->last_time);
return;
}

}
/*! @decl protected void create( int|void fast )
   *!   Create a new timer object. The timer keeps track of relative time
   *!   with sub-second precision.
   *!   
   *!   If @[fast] is specified, the timer will not do system calls to get
   *!   the current time but instead use the one maintained by pike. This
   *!   will result in faster but more or less inexact timekeeping.
   *!   The pike maintained time is only updated when a @[Pike.Backend]
   *!   object stops waiting and starts executing code.
   */
#define f_Timer_create_defined

#ifdef f_Timer_create_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Timer_create_fun_num = 0;

#endif /* f_Timer_create_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Timer_create(INT32 args) {
#line 4199 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE fast;
#line 4199 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 1) wrong_number_of_args_error("create",args,1);
#line 4199 "/Users/hww3/devel/pike/src/builtin.cmod"
if ((args > 0) &&
    ((TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) ||
     (SUBTYPEOF(Pike_sp[0-args]) != NUMBER_UNDEFINED))) {
#line 4199 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",1,"int|void");
#line 4199 "/Users/hww3/devel/pike/src/builtin.cmod"
fast=Pike_sp[0-args].u.integer;
#line 4199 "/Users/hww3/devel/pike/src/builtin.cmod"
} else fast = 0;
#line 4201 "/Users/hww3/devel/pike/src/builtin.cmod"
{
THIS->hard_update = !fast;
if( THIS->hard_update )
ACCURATE_GETTIMEOFDAY( &THIS->last_time );
else
INACCURATE_GETTIMEOFDAY( &THIS->last_time );
}
}
/*! @endclass
 */

/*! @endmodule
 */


/*! @module Builtin
 */

/*! @class automap_marker
 *!
 *! This is an internal class used by @[__automap__()].
 *!
 *! It may show up during module dumping or in backtraces
 *! and the like.
 *!
 *! It should in normal circumstances never be used directly.
 *!
 *! @seealso
 *!   @[__automap__()], @[map()]
 */

#undef class_automap_marker_defined
#define class_automap_marker_defined
DEFAULT_CMOD_STORAGE struct program *automap_marker_program=NULL;

#ifdef automap_marker_program_fun_num_used
DEFAULT_CMOD_STORAGE int automap_marker_program_fun_num=-1;
#endif /* automap_marker_program_fun_num_used */

#undef var_arg_automap_marker_defined
#define var_arg_automap_marker_defined

#undef var_depth_automap_marker_defined
#define var_depth_automap_marker_defined

#undef THIS
#define THIS ((struct automap_marker_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_AUTOMAP_MARKER
#define THIS_AUTOMAP_MARKER ((struct automap_marker_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_AUTOMAP_MARKER
#define OBJ2_AUTOMAP_MARKER(o) ((struct automap_marker_struct *)(o->storage+automap_marker_storage_offset))

#undef GET_AUTOMAP_MARKER_STORAGE
#define GET_AUTOMAP_MARKER_STORAGE(o) ((struct automap_marker_struct *)(o->storage+automap_marker_storage_offset)
static ptrdiff_t automap_marker_storage_offset;
struct automap_marker_struct {

#ifdef var_arg_automap_marker_defined
  struct array * arg;

#endif /* var_arg_automap_marker_defined */

#ifdef var_depth_automap_marker_defined
  INT_TYPE depth;

#endif /* var_depth_automap_marker_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct automap_marker_struct *automap_marker_gdb_dummy_ptr;
#endif
/*! @decl void create(array arr, int depth)
   *!
   *! @param arr
   *!   Array that @[__automap__()] is to loop over.
   *!
   *! @param depth
   *!   Recursion depth of @[arr] where the loop will be.
   */
#define f_automap_marker_create_defined

#ifdef f_automap_marker_create_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_automap_marker_create_fun_num = 0;

#endif /* f_automap_marker_create_fun_num_used */
DEFAULT_CMOD_STORAGE void f_automap_marker_create(INT32 args) {
#line 4245 "/Users/hww3/devel/pike/src/builtin.cmod"
struct array * a;
#line 4245 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE d;
#line 4245 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("create",args,2);
#line 4245 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_ARRAY) SIMPLE_ARG_TYPE_ERROR("create",1,"array");
#line 4245 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(a=Pike_sp[0-2].u.array);
#line 4245 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-2]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("create",2,"int");
#line 4245 "/Users/hww3/devel/pike/src/builtin.cmod"
d=Pike_sp[1-2].u.integer;
{
if(THIS->arg) free_array(THIS->arg);
add_ref(THIS->arg=a);
THIS->depth=d;
}

}
#define f_automap_marker_cq__sprintf_defined

#ifdef f_automap_marker_cq__sprintf_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_automap_marker_cq__sprintf_fun_num = 0;

#endif /* f_automap_marker_cq__sprintf_fun_num_used */
DEFAULT_CMOD_STORAGE void f_automap_marker_cq__sprintf(INT32 args) {
#line 4252 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE mode;
#line 4252 "/Users/hww3/devel/pike/src/builtin.cmod"
struct mapping * flags;
#line 4252 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("_sprintf",args,2);
#line 4252 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("_sprintf",1,"int");
#line 4252 "/Users/hww3/devel/pike/src/builtin.cmod"
mode=Pike_sp[0-2].u.integer;
#line 4252 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-2]) != PIKE_T_MAPPING) SIMPLE_ARG_TYPE_ERROR("_sprintf",2,"mapping(mixed:mixed)");
#line 4252 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(flags=Pike_sp[1-2].u.mapping);
{
pop_n_elems(args);
if (mode != 'O') {
push_undefined ();
return;
}
push_text("%O%*'[*]'n");
if(THIS->arg)
ref_push_array(THIS->arg);
else
push_int(0);
push_int(THIS->depth*3);
f_sprintf(3);
}
}
/*! @endclass
 */

/*! @endmodule
 */

#line 4275 "/Users/hww3/devel/pike/src/builtin.cmod"
static void low_automap(int d,
int depth,
struct svalue *fun,
struct svalue *real_args,
INT32 args)
{
INT32 x,e,tmp,size=0x7fffffff;
struct svalue *tmpargs=Pike_sp - args;
struct array *ret;
TYPE_FIELD types;

for(e=0;e<args;e++)
{
if(TYPEOF(real_args[e]) == T_OBJECT &&
real_args[e].u.object->prog == automap_marker_program &&
OBJ2_AUTOMAP_MARKER(real_args[e].u.object)->depth >= d)
{
if(TYPEOF(tmpargs[e]) != T_ARRAY)
index_error("__automap__",
Pike_sp-args,
args,
tmpargs,
NULL,
"Automap on non-array.\n");
tmp=tmpargs[e].u.array->size;
if(tmp < size)
size=tmp;
}
}

if(size == 0x7fffffff)
Pike_error("No automap markers found in __automap__\n");

push_array(ret=allocate_array(size));
types = 0;

for(x=0;x<size;x++)
{
for(e=0;e<args;e++)
{
if(TYPEOF(real_args[e]) == T_OBJECT &&
real_args[e].u.object->prog == automap_marker_program &&
OBJ2_AUTOMAP_MARKER(real_args[e].u.object)->depth >= d)
{
#ifdef PIKE_DEBUG
 if(x >= tmpargs[e].u.array->size)
Pike_fatal("low_automap failed to determine size!\n");
#endif
 push_svalue(ITEM(tmpargs[e].u.array)+x);
}else{
push_svalue(tmpargs+e);
}
}

if(d == depth)
apply_svalue(fun,args);
else
low_automap(d+1,depth,fun,real_args,args);
stack_pop_to_no_free (ITEM(ret) + x);
types |= 1 << TYPEOF(ITEM(ret)[x]);
}
ret->type_field = types;
stack_unlink(args);
}

/*! @decl array __automap__(function fun, mixed ... args)
 *!
 *! Automap execution function.
 *!
 *! @param fun
 *!   Function to call for each of the mapped arguments.
 *!
 *! @param args
 *!   Arguments for @[fun]. Either
 *!   @mixed
 *!     @type Builtin.automap_marker
 *!       Wrapper for an array to loop over. All of the
 *!       arrays will be looped over in parallel.
 *!     @type mixed
 *!       All other arguments will be held constant during
 *!       the automap, and sent as is to @[fun].
 *!   @endmixed
 *!
 *! @note
 *!   This function is used by the compiler to implement the
 *!   automap syntax, and should in normal circumstances never
 *!   be used directly.
 *!
 *!   It may however show up during module dumping and in
 *!   backtraces.
 *!
 *! @note
 *!   It is an error not to have any @[Builtin.automap_marker]s
 *!   in @[args].
 *!
 *! @seealso
 *!   @[Builtin.automap_marker], @[map()]
 */
#define f_cq___automap___defined
DEFAULT_CMOD_STORAGE void f_cq___automap__(INT32 args) {
#line 4373 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * fun;
#line 4373 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * tmpargs;
#line 4373 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args < 1) wrong_number_of_args_error("__automap__",args,1);
#line 4373 "/Users/hww3/devel/pike/src/builtin.cmod"
fun=Pike_sp+0-args; dmalloc_touch_svalue(Pike_sp+0-args);
#line 4373 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 1) {
  INT32 argcnt = 0;
  do {
    dmalloc_touch_svalue(Pike_sp+1+argcnt-args);
#line 4373 "/Users/hww3/devel/pike/src/builtin.cmod"
  } while (++argcnt < args-1);
  tmpargs=Pike_sp+1-args;
} else tmpargs = NULL;
#line 4375 "/Users/hww3/devel/pike/src/builtin.cmod"
{
int e,depth=-1;
check_stack(args);

for(e=0;e<args-1;e++)
{
if(TYPEOF(tmpargs[e]) == T_OBJECT &&
tmpargs[e].u.object->prog == automap_marker_program)
{
int tmp=OBJ2_AUTOMAP_MARKER(tmpargs[e].u.object)->depth;
if(tmp > depth) depth=tmp;
ref_push_array(OBJ2_AUTOMAP_MARKER(tmpargs[e].u.object)->arg);
}else{
push_svalue(tmpargs+e);
}
}
check_stack(depth * (args+1));
low_automap(1,depth,fun,tmpargs,args-1);
stack_unlink(args);
}

}
/*! @module Builtin
 */

/*! @class Setter
 *!
 *! Internal class for implementing setters.
 *!
 *! This class is used by @[_get_setter()].
 *!
 *! @seealso
 *!   @[_get_setter()]
 */

#undef class_Setter_defined
#define class_Setter_defined
DEFAULT_CMOD_STORAGE struct program *Setter_program=NULL;

#ifdef Setter_program_fun_num_used
DEFAULT_CMOD_STORAGE int Setter_program_fun_num=-1;
#endif /* Setter_program_fun_num_used */

#undef var_o_Setter_defined
#define var_o_Setter_defined

#undef var_f_Setter_defined
#define var_f_Setter_defined

#undef THIS
#define THIS ((struct Setter_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_SETTER
#define THIS_SETTER ((struct Setter_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_SETTER
#define OBJ2_SETTER(o) ((struct Setter_struct *)(o->storage+Setter_storage_offset))

#undef GET_SETTER_STORAGE
#define GET_SETTER_STORAGE(o) ((struct Setter_struct *)(o->storage+Setter_storage_offset)
static ptrdiff_t Setter_storage_offset;
struct Setter_struct {

#ifdef var_o_Setter_defined
  struct object * o;

#endif /* var_o_Setter_defined */

#ifdef var_f_Setter_defined
#line 4412 "/Users/hww3/devel/pike/src/builtin.cmod"
int f;
#endif /* var_f_Setter_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Setter_struct *Setter_gdb_dummy_ptr;
#endif
/*! @decl void `()(mixed val)
   *!
   *! Set the variable for the setter to @[val].
   *!
   *! This is the function returned by @[_get_setter()].
   */
#define f_Setter_cq__backtick_28_29_defined

#ifdef f_Setter_cq__backtick_28_29_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Setter_cq__backtick_28_29_fun_num = 0;

#endif /* f_Setter_cq__backtick_28_29_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Setter_cq__backtick_28_29(INT32 args) {
#line 4420 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * val;
#line 4420 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`()",args,1);
#line 4420 "/Users/hww3/devel/pike/src/builtin.cmod"
val=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
#line 4422 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if (!THIS->o) {
Pike_error("Uninitialized Setter!\n");
}
object_low_set_index(THIS->o, THIS->f, Pike_sp-1);
pop_n_elems(args);
push_int(0);
}
}
#define f_Setter_cq__sprintf_defined

#ifdef f_Setter_cq__sprintf_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Setter_cq__sprintf_fun_num = 0;

#endif /* f_Setter_cq__sprintf_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Setter_cq__sprintf(INT32 args) {
#line 4430 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE c;
#line 4430 "/Users/hww3/devel/pike/src/builtin.cmod"
struct mapping * opts;
#line 4430 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args < 1) wrong_number_of_args_error("_sprintf",args,1);
#line 4430 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 2) wrong_number_of_args_error("_sprintf",args,2);
#line 4430 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("_sprintf",1,"int");
#line 4430 "/Users/hww3/devel/pike/src/builtin.cmod"
c=Pike_sp[0-args].u.integer;
#line 4430 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 1 &&
    (TYPEOF(Pike_sp[1-args]) != PIKE_T_INT ||
     Pike_sp[1-args].u.integer)) {
#line 4430 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-args]) != PIKE_T_MAPPING) SIMPLE_ARG_TYPE_ERROR("_sprintf",2,"mapping(mixed:mixed)|void");
#line 4430 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(opts=Pike_sp[1-args].u.mapping);
#line 4430 "/Users/hww3/devel/pike/src/builtin.cmod"
} else opts = NULL;
#line 4432 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct program *prog;
if (!THIS->o) {
push_text("Setter()");
} else if ((prog = THIS->o->prog)) {
push_text("%O->`%s=");
ref_push_object(THIS->o);
ref_push_string(ID_FROM_INT(prog, THIS->f)->name);
f_sprintf(3);
} else {
push_text("Setter(destructed object)");
}
stack_pop_n_elems_keep_top(args);
}
}
/*! @endclass
 */

#line 4451 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT struct object *get_setter(struct object *o, int f)
{
struct object *res = clone_object(Setter_program, 0);
struct Setter_struct *setter = OBJ2_SETTER(res);
add_ref(setter->o = o);
setter->f = f;
return res;
}

/*! @decl function(mixed_void) _get_setter(object o, string varname)
 *!
 *! Get a setter for the variable named @[varname] in object @[o].
 *!
 *! @returns
 *!   Returns a @[Setter()->`()()] for the variable if it exists,
 *!   and @expr{UNDEFINED@} otherwise.
 *!
 *! @seealso
 *!   @[object_variablep()]
 */
#define f_cq__get_setter_defined

#ifdef f_cq__get_setter_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_cq__get_setter_fun_num = 0;

#endif /* f_cq__get_setter_fun_num_used */
DEFAULT_CMOD_STORAGE void f_cq__get_setter(INT32 args) {
#line 4471 "/Users/hww3/devel/pike/src/builtin.cmod"
struct object * o;
#line 4471 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * s;
#line 4471 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("_get_setter",args,2);
#line 4471 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_OBJECT) SIMPLE_ARG_TYPE_ERROR("_get_setter",1,"object");
#line 4471 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(o=Pike_sp[0-2].u.object);
#line 4471 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-2]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("_get_setter",2,"string");
#line 4471 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(s=Pike_sp[1-2].u.string);
{
struct program *p;
struct inherit *inh;
int f;
if (!(p = o->prog)) {
Pike_error("Indexing a destructed object.\n");
}
inh = p->inherits + SUBTYPEOF(Pike_sp[-args]);
p = inh->prog;
f = find_shared_string_identifier(s, p);
if ((f >= 0) &&
IDENTIFIER_IS_VARIABLE(ID_FROM_INT(p, f)->identifier_flags)) {
f += inh->identifier_level;
push_function(get_setter(o, f), f_Setter_cq__backtick_28_29_fun_num);
} else {
push_undefined();
}
stack_pop_n_elems_keep_top(args);
}

}
/*! @class Null
 *!
 *! This class is used to implement the low-level aspects of @[Val.Null].
 *!
 *! @note
 *!   This class should typically not be used directly. Use
 *!   @[Val.Null] instead.
 *!
 *! @note
 *!   This class was previously available as @[Sql.Null]. Any such use
 *!   should be replaced with @[Val.Null].
 *!
 *! @deprecated Val.Null
 *!
 *! @seealso
 *!   @[Val.Null], @[Val.null]
 */

#undef class_Null_defined
#define class_Null_defined
DEFAULT_CMOD_STORAGE struct program *Null_program=NULL;

#ifdef Null_program_fun_num_used
DEFAULT_CMOD_STORAGE int Null_program_fun_num=-1;
#endif /* Null_program_fun_num_used */

#undef extra_Null_defined
#define extra_Null_defined
#define f_Null_cq__backtick_21_defined

#ifdef f_Null_cq__backtick_21_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Null_cq__backtick_21_fun_num = 0;

#endif /* f_Null_cq__backtick_21_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Null_cq__backtick_21(INT32 args) {
#line 4527 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`!",args,0);
#line 4529 "/Users/hww3/devel/pike/src/builtin.cmod"
{
do { INT_TYPE ret_=(1);  push_int(ret_); return; }while(0);
#line 4531 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
#define f_Null_cq__sprintf_defined

#ifdef f_Null_cq__sprintf_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Null_cq__sprintf_fun_num = 0;

#endif /* f_Null_cq__sprintf_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Null_cq__sprintf(INT32 args) {
#line 4533 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE fmt;
#line 4533 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * extras;
#line 4533 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args < 1) wrong_number_of_args_error("_sprintf",args,1);
#line 4533 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("_sprintf",1,"int");
#line 4533 "/Users/hww3/devel/pike/src/builtin.cmod"
fmt=Pike_sp[0-args].u.integer;
#line 4533 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 1) {
  INT32 argcnt = 0;
  do {
    dmalloc_touch_svalue(Pike_sp+1+argcnt-args);
#line 4533 "/Users/hww3/devel/pike/src/builtin.cmod"
  } while (++argcnt < args-1);
  extras=Pike_sp+1-args;
} else extras = NULL;
#line 4535 "/Users/hww3/devel/pike/src/builtin.cmod"
{
pop_n_elems(args);
if (fmt == 'O') {
push_text("Val.null");
} else {
push_undefined();
}
}

}
#define f_Null_cq___hash_defined

#ifdef f_Null_cq___hash_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Null_cq___hash_fun_num = 0;

#endif /* f_Null_cq___hash_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Null_cq___hash(INT32 args) {
#line 4544 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("__hash",args,0);
#line 4546 "/Users/hww3/devel/pike/src/builtin.cmod"
{
pop_n_elems(args);
push_int(17);
}

}
#define f_Null_cq__backtick_eq_eq_defined

#ifdef f_Null_cq__backtick_eq_eq_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Null_cq__backtick_eq_eq_fun_num = 0;

#endif /* f_Null_cq__backtick_eq_eq_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Null_cq__backtick_eq_eq(INT32 args) {
#line 4551 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * other;
#line 4551 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`==",args,1);
#line 4551 "/Users/hww3/devel/pike/src/builtin.cmod"
other=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
#line 4553 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if (TYPEOF(*other) != T_OBJECT) {
pop_stack();
push_int(0);
return;
}

/* Look for the is_val_null constant directly in the program of
     * other, without going through its `[]. When this is called in a
     * codec, other can be a completely arbitrary object which may not
     * have a `[] that works in that context. */
push_int (0);
ref_push_program (other->u.object->prog);
push_constant_text("is_val_null");
if (program_index_no_free (Pike_sp - 3, Pike_sp - 2, Pike_sp - 1) &&
TYPEOF(Pike_sp[-3]) == T_INT && Pike_sp[-3].u.integer) {
pop_n_elems (4);
push_int (1);
}
else {
pop_n_elems (4);
push_int (0);
}
}

}
/*! @decl string encode_json()
   *!
   *! Defined for use with @[Standards.JSON.encode], so that it
   *! formats NULL as @expr{null@}.
   */
#define f_Null_encode_json_defined

#ifdef f_Null_encode_json_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Null_encode_json_fun_num = 0;

#endif /* f_Null_encode_json_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Null_encode_json(INT32 args) {
#line 4584 "/Users/hww3/devel/pike/src/builtin.cmod"
{
pop_n_elems(args);
push_constant_text ("null");
}
}
/*! @endclass
 */

#line 4593 "/Users/hww3/devel/pike/src/builtin.cmod"
PMOD_EXPORT
#define f_levenshtein_distance_defined

#ifdef f_levenshtein_distance_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_levenshtein_distance_fun_num = 0;

#endif /* f_levenshtein_distance_fun_num_used */
DEFAULT_CMOD_STORAGE void f_levenshtein_distance(INT32 args) {
#line 4594 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * a;
#line 4594 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * b;
#line 4594 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("levenshtein_distance",args,2);
#line 4594 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("levenshtein_distance",1,"string");
#line 4594 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(a=Pike_sp[0-2].u.string);
#line 4594 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-2]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("levenshtein_distance",2,"string");
#line 4594 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(b=Pike_sp[1-2].u.string);
{
int i, j, n, *lev_i, *lev_p;

/* Simple cases: strings are equal or one of them is empty: */
if (a == b) do { INT_TYPE ret_=(0); pop_n_elems(2); push_int(ret_); return; }while(0);
#line 4600 "/Users/hww3/devel/pike/src/builtin.cmod"
if (a->len == 0) do { INT_TYPE ret_=(b->len); pop_n_elems(2); push_int(ret_); return; }while(0);
#line 4601 "/Users/hww3/devel/pike/src/builtin.cmod"
if (b->len == 0) do { INT_TYPE ret_=(a->len); pop_n_elems(2); push_int(ret_); return; }while(0);
#line 4603 "/Users/hww3/devel/pike/src/builtin.cmod"
/* Return -1 if any of the strings is wider than 8 bits: */
if (a->size_shift || b->size_shift) do { INT_TYPE ret_=(-1); pop_n_elems(2); push_int(ret_); return; }while(0);
#line 4606 "/Users/hww3/devel/pike/src/builtin.cmod"
/* Allocate two rows on the stack: */
n = b->len+1;
lev_i = alloca(n*sizeof(int));
lev_p = alloca(n*sizeof(int));
if (!lev_i || !lev_p) do { INT_TYPE ret_=(-1); pop_n_elems(2); push_int(ret_); return; }while(0);
#line 4612 "/Users/hww3/devel/pike/src/builtin.cmod"
/* Initialise the first row */
for (j = 0; j < n; j++) lev_i[j] = j;

for (i = 0; i < a->len; i++)
{
/* lev_p = row for i, lev_i = row for i+1: */
memcpy(lev_p, lev_i, n*sizeof(int));
lev_i[0] = i + 1;
for (j = 0; j < b->len; j++)
{
int cost = (a->str[i] == b->str[j]) ? 0 : 1;
int test, min_val = lev_i[j]+1;
if ((test = lev_p[j+1]+1) < min_val) min_val = test;
if ((test = lev_p[j]+cost) < min_val) min_val = test;
lev_i[j+1] = min_val;
}
}
do { INT_TYPE ret_=(lev_i[b->len]); pop_n_elems(2); push_int(ret_); return; }while(0);
#line 4630 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}
/*! @endmodule
 */

/*! @module Serializer
 */

/*! @class Serializable
 *!
 *!   The base class for serializable objects.
 *!
 *!   Inherit this class in classes that need to be serializable.
 *!
 *! @seealso
 *!   @[Serializer.serialize()], @[Serializer.deserialize()]
 */

#undef class_Serializable_defined
#define class_Serializable_defined
DEFAULT_CMOD_STORAGE struct program *Serializable_program=NULL;

#ifdef Serializable_program_fun_num_used
DEFAULT_CMOD_STORAGE int Serializable_program_fun_num=-1;
#endif /* Serializable_program_fun_num_used */
#line 4649 "/Users/hww3/devel/pike/src/builtin.cmod"
/* Loop over all true variables, and call fun_num in the current object. */
static void low_serialize(int i, struct svalue *fun,
int use_setter, int fun_num)
{
struct inherit *inh;
struct program *p = Pike_fp->current_object->prog;
struct svalue *save_sp = Pike_sp;

inh = p->inherits + i;
p = inh->prog;

for (i = 0; i < p->num_identifier_references; i++) {
struct reference *ref = PTR_FROM_INT(p, i);
struct identifier *id;
if ((ref->id_flags & ID_HIDDEN) ||
((ref->id_flags & (ID_PRIVATE|ID_INHERITED)) ==
(ID_PRIVATE|ID_INHERITED))) {
continue;
}
id = ID_FROM_PTR(p, ref);
if (!IDENTIFIER_IS_VARIABLE(id->identifier_flags) ||
(id->run_time_type == PIKE_T_GET_SET)) {
continue;
}
push_svalue(fun);
if (use_setter) {
push_function(get_setter(Pike_fp->current_object,
i + inh->identifier_level),
f_Setter_cq__backtick_28_29_fun_num);
} else {
low_object_index_no_free(Pike_sp, Pike_fp->current_object,
i + inh->identifier_level);
Pike_sp++;
}
ref_push_string(id->name);
ref_push_type_value(id->type);
apply_current(fun_num, 4);
pop_stack();
}
if (Pike_sp != save_sp) {
/* Not likely, but... */
pop_n_elems(Pike_sp - save_sp);
}
}

/*! @decl protected void _serialize_variable( @
   *!			function(mixed, string, type:void) serializer, @
   *!			mixed value, @
   *!			string symbol, @
   *!			type symbol_type)
   *!
   *!   Default serialization function for variables.
   *!
   *! @param serializer
   *!   Function to be called in turn.
   *!
   *! @param value
   *!   Value of the variable.
   *!
   *! @param symbol
   *!   Variable name.
   *!
   *! @param symbol_type
   *!   Type of the variable.
   *!
   *! This function is typically called from @[_serialize()], and just does
   *!   @code
   *!     serializer(value, symbol, symbol_type);
   *!   @endcode
   *!
   *! It is provided for overloading for eg filtering or validation purposes.
   *!
   *! @seealso
   *!   @[_serialize()], @[_deserialize_variable()]
   */
#define f_Serializable_cq__serialize_variable_defined

#ifdef f_Serializable_cq__serialize_variable_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Serializable_cq__serialize_variable_fun_num = 0;

#endif /* f_Serializable_cq__serialize_variable_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Serializable_cq__serialize_variable(INT32 args) {
#line 4725 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * serializer;
#line 4725 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * value;
struct pike_string * symbol;
#line 4726 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_type * symbol_type;
#line 4724 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 4) wrong_number_of_args_error("_serialize_variable",args,4);
if(TYPEOF(Pike_sp[0-4]) != PIKE_T_FUNCTION) SIMPLE_ARG_TYPE_ERROR("_serialize_variable",1,"function(mixed,string,type:void)");
#line 4725 "/Users/hww3/devel/pike/src/builtin.cmod"
serializer=Pike_sp+0-4; dmalloc_touch_svalue(Pike_sp+0-4);
#line 4725 "/Users/hww3/devel/pike/src/builtin.cmod"
value=Pike_sp+1-4; dmalloc_touch_svalue(Pike_sp+1-4);
if(TYPEOF(Pike_sp[2-4]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("_serialize_variable",3,"string");
#line 4726 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(symbol=Pike_sp[2-4].u.string);
#line 4726 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[3-4]) != PIKE_T_TYPE) SIMPLE_ARG_TYPE_ERROR("_serialize_variable",4,"type");
#line 4726 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(symbol_type=Pike_sp[3-4].u.type);
#line 4730 "/Users/hww3/devel/pike/src/builtin.cmod"
{
f_call_function(args);
pop_stack();
push_int(0);
}

}
/*! @decl protected void _serialize(object o, @
   *!			function(mixed, string, type:void) serializer)
   *!
   *!   Dispatch function for serialization.
   *!
   *! @param o
   *!   Object to serialize. Always a context of the current object.
   *!
   *! @param serializer
   *!   Function to typically be called once for every variable
   *!   in the inheriting class.
   *!
   *! This function calls @[_serialize_variable()] once
   *! for every variable in the inheriting class, which
   *! in turn will call @[serializer] with the arguments:
   *! @dl
   *!   @item Argument 1
   *!     The value of the variable.
   *!   @item Argument 2
   *!     The name of the variable.
   *!   @item Argument 3
   *!     The declared type of the variable.
   *! @enddl
   *!
   *! @note
   *!   The symbols will be listed in the order they were defined
   *!   in the class.
   *!
   *! @note
   *!   This function is typically called via @[Serializer.serialize()].
   *!
   *! @seealso
   *!   @[Serializer.serialize()], @[_serialize_variable()],
   *!   @[_deserialize()]
   */
#define f_Serializable_cq__serialize_defined

#ifdef f_Serializable_cq__serialize_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Serializable_cq__serialize_fun_num = 0;

#endif /* f_Serializable_cq__serialize_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Serializable_cq__serialize(INT32 args) {
#line 4771 "/Users/hww3/devel/pike/src/builtin.cmod"
struct object * o;
struct svalue * serializer;
#line 4771 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("_serialize",args,2);
#line 4771 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_OBJECT) SIMPLE_ARG_TYPE_ERROR("_serialize",1,"object");
#line 4771 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(o=Pike_sp[0-2].u.object);
if(TYPEOF(Pike_sp[1-2]) != PIKE_T_FUNCTION) SIMPLE_ARG_TYPE_ERROR("_serialize",2,"function(mixed,string,type:void)");
#line 4772 "/Users/hww3/devel/pike/src/builtin.cmod"
serializer=Pike_sp+1-2; dmalloc_touch_svalue(Pike_sp+1-2);
#line 4775 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if (o != Pike_fp->current_object) {
SIMPLE_BAD_ARG_ERROR("_serialize", 1, "this");
}
low_serialize(SUBTYPEOF(Pike_sp[-args]), serializer, 0,
f_Serializable_cq__serialize_variable_fun_num);
pop_n_elems(args);
push_int(0);
}

}
#line 4785 "/Users/hww3/devel/pike/src/builtin.cmod"
static void *find_program_from_object_type_cb(struct pike_type *t)
{
struct program *p;
if ((t->type != PIKE_T_OBJECT) || !t->cdr) return NULL;
p = id_to_program(CDR_TO_INT(t));
if (!p || (p->flags & PROGRAM_NEEDS_PARENT) ||
(low_find_lfun(p, LFUN__DESERIALIZE) == -1)) return NULL;
return p;
}

DEFAULT_CMOD_STORAGE void f_deserialize(INT32 args);

/*! @decl protected void _deserialize_variable( @
   *!			function(function(mixed:void), @
   *!			         string, type: void) deserializer, @
   *!			function(mixed:void) setter, @
   *!			string symbol, @
   *!			type symbol_type)
   *!
   *!   Default deserialization function for variables.
   *!
   *! @param deserializer
   *!   Function to be called in turn.
   *!
   *! @param setter
   *!   Function that sets the value of the variable.
   *!
   *! @param symbol
   *!   Variable name.
   *!
   *! @param symbol_type
   *!   Type of the variable.
   *!
   *! This function is typically called from @[_deserialize()], and does
   *! something like:
   *!   @code
   *!     if (object_typep(symbol_type)) {
   *!       program p = program_from_type(symbol_type);
   *!       if (p && !needs_parent(p) && is_deserializable(p)) {
   *!         object value = p();
   *!         setter(value);
   *!         Serializer.deserialize(value, deserializer);
   *!         return;
   *!       }
   *!     }
   *!     deserializer(setter, symbol, symbol_type);
   *!   @endcode
   *!
   *! @note
   *!   The above takes care of the most common cases, but
   *!   @ul
   *!     @item
   *!       Does not support anonymous object types.
   *!     @item
   *!       Does not support objects needing a parent.
   *!     @item
   *!       Does not support non-serializable objects.
   *!     @item
   *!       Selects one of the object types in case of a complex
   *!       @[symbol_type]. The selected type is NOT deterministic
   *!       in case there are multiple choices that satisfy the above.
   *!     @item
   *!       Is likely to throw errors if @tt{p()@} requires arguments.
   *!   @endul
   *!
   *!   These issues can all be solved by overloading this function.
   *!
   *! @seealso
   *!   @[_deserialize()], @[_serialize_variable()], @[Builtin.Setter]
   */
#define f_Serializable_cq__deserialize_variable_defined

#ifdef f_Serializable_cq__deserialize_variable_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Serializable_cq__deserialize_variable_fun_num = 0;

#endif /* f_Serializable_cq__deserialize_variable_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Serializable_cq__deserialize_variable(INT32 args) {
#line 4857 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * deserializer;
#line 4857 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * setter;
struct pike_string * symbol;
struct pike_type * symbol_type;
#line 4855 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 4) wrong_number_of_args_error("_deserialize_variable",args,4);
#line 4857 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-4]) != PIKE_T_FUNCTION) SIMPLE_ARG_TYPE_ERROR("_deserialize_variable",1,"function(function(mixed:void),string,type:void)");
#line 4857 "/Users/hww3/devel/pike/src/builtin.cmod"
deserializer=Pike_sp+0-4; dmalloc_touch_svalue(Pike_sp+0-4);
#line 4857 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-4]) != PIKE_T_FUNCTION) SIMPLE_ARG_TYPE_ERROR("_deserialize_variable",2,"function(mixed:void)");
#line 4857 "/Users/hww3/devel/pike/src/builtin.cmod"
setter=Pike_sp+1-4; dmalloc_touch_svalue(Pike_sp+1-4);
if(TYPEOF(Pike_sp[2-4]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("_deserialize_variable",3,"string");
#line 4858 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(symbol=Pike_sp[2-4].u.string);
if(TYPEOF(Pike_sp[3-4]) != PIKE_T_TYPE) SIMPLE_ARG_TYPE_ERROR("_deserialize_variable",4,"type");
#line 4859 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(symbol_type=Pike_sp[3-4].u.type);
#line 4863 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct program *p = find_type(symbol_type,
find_program_from_object_type_cb);
if (p) {
struct object *o = clone_object(p, 0);
push_object(o); /* Protection against errors and arg to deserialize. */
ref_push_object(o);
apply_svalue(setter, 1);
pop_stack();
push_svalue(deserializer);
f_deserialize(2);
return;
}
f_call_function(args);
pop_stack();
push_int(0);
}

}
/*! @decl protected void _deserialize(object o, @
   *!			function(function(mixed:void), @
   *!			         string, type: void) deserializer)
   *!
   *!   Dispatch function for deserialization.
   *!
   *! @param o
   *!   Object to serialize. Always a context of the current object.
   *!
   *! @param deserializer
   *!   Function to typically be called once for every variable
   *!   in the inheriting class.
   *!
   *! This function calls @[_deserialize_variable()] once
   *! for every variable in the inheriting class, which
   *! in turn will call @[deserializer] with the arguments:
   *! @dl
   *!   @item Argument 1
   *!     The setter for the variable.
   *!   @item Argument 2
   *!     The name of the variable.
   *!   @item Argument 3
   *!     The declared type of the variable.
   *! @enddl
   *!
   *! @note
   *!   The symbols will be listed in the order they were defined
   *!   in the class.
   *!
   *! @note
   *!   This function is typically called via @[Serializer.deserialize()].
   *!
   *! @seealso
   *!   @[Serializer.deserialize()], @[_deserialize_variable()],
   *!   @[_serialize()], @[Builtin.Setter]
   */
#define f_Serializable_cq__deserialize_defined

#ifdef f_Serializable_cq__deserialize_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Serializable_cq__deserialize_fun_num = 0;

#endif /* f_Serializable_cq__deserialize_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Serializable_cq__deserialize(INT32 args) {
#line 4917 "/Users/hww3/devel/pike/src/builtin.cmod"
struct object * o;
#line 4919 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * deserializer;
#line 4917 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("_deserialize",args,2);
#line 4917 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_OBJECT) SIMPLE_ARG_TYPE_ERROR("_deserialize",1,"object");
#line 4917 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(o=Pike_sp[0-2].u.object);
#line 4919 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-2]) != PIKE_T_FUNCTION) SIMPLE_ARG_TYPE_ERROR("_deserialize",2,"function(function(mixed:void),string,type:void)");
#line 4919 "/Users/hww3/devel/pike/src/builtin.cmod"
deserializer=Pike_sp+1-2; dmalloc_touch_svalue(Pike_sp+1-2);
#line 4922 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if (o != Pike_fp->current_object) {
SIMPLE_BAD_ARG_ERROR("_serialize", 1, "this");
}
low_serialize(SUBTYPEOF(Pike_sp[-args]), deserializer, 1,
f_Serializable_cq__deserialize_variable_fun_num);
pop_n_elems(args);
push_int(0);
}
}
/*! @endclass
 */

/*! @decl void serialize(object o, @
 *!                      function(mixed, string, type:void) serializer)
 *!
 *!   Call @[lfun::_serialize()] in @[o].
 *!
 *! @seealso
 *!   @[deserialize()], @[lfun::_serialize()],
 *!   @[Serializable()->_serialize()]
 */
#define f_serialize_defined

#ifdef f_serialize_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_serialize_fun_num = 0;

#endif /* f_serialize_fun_num_used */
DEFAULT_CMOD_STORAGE void f_serialize(INT32 args) {
#line 4944 "/Users/hww3/devel/pike/src/builtin.cmod"
struct object * o;
struct svalue * serializer;
#line 4944 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("serialize",args,2);
#line 4944 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_OBJECT) SIMPLE_ARG_TYPE_ERROR("serialize",1,"object");
#line 4944 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(o=Pike_sp[0-2].u.object);
if(TYPEOF(Pike_sp[1-2]) != PIKE_T_FUNCTION) SIMPLE_ARG_TYPE_ERROR("serialize",2,"function(mixed,string,type:void)");
#line 4945 "/Users/hww3/devel/pike/src/builtin.cmod"
serializer=Pike_sp+1-2; dmalloc_touch_svalue(Pike_sp+1-2);
#line 4947 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct inherit *inh;
struct program *p;
ptrdiff_t fun;
if (!(p = o->prog)) {
Pike_error("Indexing a destructed object.\n");
}
inh = p->inherits + SUBTYPEOF(Pike_sp[-args]);
p = inh->prog;
if ((fun = low_find_lfun(p, LFUN__SERIALIZE)) == -1) {
Pike_error("Serialization not supported by object.\n");
}
apply_low(o, fun + inh->identifier_level, args);
}

}
/*! @decl void deserialize(object o, @
 *!                        function(function(mixed:void), @
 *!                                 string, type: void) deserializer)
 *!
 *!   Call @[lfun::_deserialize()] in @[o].
 *!
 *! @seealso
 *!   @[serialize()], @[lfun::_deserialize()],
 *!   @[Serializable()->_deserialize()]
 */
#define f_deserialize_defined

#ifdef f_deserialize_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_deserialize_fun_num = 0;

#endif /* f_deserialize_fun_num_used */
DEFAULT_CMOD_STORAGE void f_deserialize(INT32 args) {
#line 4972 "/Users/hww3/devel/pike/src/builtin.cmod"
struct object * o;
#line 4974 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * deserializer;
#line 4972 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("deserialize",args,2);
#line 4972 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_OBJECT) SIMPLE_ARG_TYPE_ERROR("deserialize",1,"object");
#line 4972 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(o=Pike_sp[0-2].u.object);
#line 4974 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-2]) != PIKE_T_FUNCTION) SIMPLE_ARG_TYPE_ERROR("deserialize",2,"function(function(mixed:void),string,type:void)");
#line 4974 "/Users/hww3/devel/pike/src/builtin.cmod"
deserializer=Pike_sp+1-2; dmalloc_touch_svalue(Pike_sp+1-2);
#line 4976 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct inherit *inh;
struct program *p;
ptrdiff_t fun;
if (!(p = o->prog)) {
Pike_error("Indexing a destructed object.\n");
}
inh = p->inherits + SUBTYPEOF(Pike_sp[-args]);
p = inh->prog;
if ((fun = low_find_lfun(p, LFUN__DESERIALIZE)) == -1) {
Pike_error("Deserialization not supported by object.\n");
}
apply_low(o, fun + inh->identifier_level, args);
}

}
/*! @endmodule
 */

/*! @module ADT
 */

#line 4997 "/Users/hww3/devel/pike/src/builtin.cmod"
/* Linked list stuff.
 */
static struct block_allocator pike_list_node_allocator = BA_INIT_PAGES(sizeof(struct pike_list_node), 4);

ATTRIBUTE((malloc))
static struct pike_list_node * alloc_pike_list_node() {
struct pike_list_node * node = ba_alloc(&pike_list_node_allocator);
node->next = node->prev = NULL;
node->refs = 1;
SET_SVAL(node->val, T_INT, NUMBER_UNDEFINED, integer, 0);
return node;
}

void count_memory_in_pike_list_nodes(size_t * n, size_t * s) {
ba_count_all(&pike_list_node_allocator, n, s);
}

void free_all_pike_list_node_blocks(void) {
ba_destroy(&pike_list_node_allocator);
}

PMOD_EXPORT void free_list_node(struct pike_list_node *node)
{
if (!sub_ref(node)) {
if (node->prev) {
free_list_node(node->prev);
}
if (node->next) {
free_list_node(node->next);
}
free_svalue(&node->val);
ba_free(&pike_list_node_allocator, node);
}
}

PMOD_EXPORT void unlink_list_node(struct pike_list_node *n)
{
#ifdef PIKE_DEBUG
 if (!n) {
Pike_fatal("Unlinking NULL node.\n");
}
if (!n->next || !n->prev) {
Pike_fatal("Unlinking unlinked node.\n");
}
#endif /* PIKE_DEBUG */
 if (n->prev->next == n) {
#ifdef PIKE_DEBUG
 if (n->next->prev != n) {
Pike_fatal("Partially detached node.\n");
}
#endif /* PIKE_DEBUG */
 n->prev->next = n->next;
n->next->prev = n->prev;
n->next = n->prev = NULL;

/* We've lost two references. */
free_list_node(n);
free_list_node(n);
} else {
#ifdef PIKE_DEBUG
 if (n->next->prev == n) {
Pike_fatal("Partially detached node.\n");
}
#endif /* PIKE_DEBUG */
 /* The node is already detached. */
n->next = n->prev = NULL;
}
}

PMOD_EXPORT void detach_list_node(struct pike_list_node *n)
{
#ifdef PIKE_DEBUG
 if (!n) {
Pike_fatal("Detaching NULL node.\n");
}
if (!n->next || !n->prev) {
Pike_fatal("Detaching unlinked node.\n");
}
#endif /* PIKE_DEBUG */
 if (n->prev->next == n) {
#ifdef PIKE_DEBUG
 if (n->next->prev != n) {
Pike_fatal("Partially detached node.\n");
}
#endif /* PIKE_DEBUG */
 n->prev->next = n->next;
n->next->prev = n->prev;
add_ref(n->next);
add_ref(n->prev);

/* We've lost two references. */
free_list_node(n);
free_list_node(n);
#ifdef PIKE_DEBUG
 } else if (n->next->prev == n) {
Pike_fatal("Partially detached node.\n");
#endif /* PIKE_DEBUG */
 }
}

PMOD_EXPORT void prepend_list_node(struct pike_list_node *node,
struct pike_list_node *new_node)
{
#ifdef PIKE_DEBUG
 if (!node) {
Pike_fatal("No node to prepend.\n");
}
if (!node->prev) {
Pike_fatal("Prepending unhooked node.\n");
}
if (!new_node) {
Pike_fatal("Prepending NULL node.\n");
}
if (new_node->next || new_node->prev) {
Pike_fatal("Prepending hooked node.\n");
}
#endif /* PIKE_DEBUG */
 new_node->next = node;
new_node->prev = node->prev;
new_node->prev->next = node->prev = new_node;
add_ref(new_node);
add_ref(new_node);
}

PMOD_EXPORT void append_list_node(struct pike_list_node *node,
struct pike_list_node *new_node)
{
#ifdef PIKE_DEBUG
 if (!node) {
Pike_fatal("No node to append.\n");
}
if (!node->next) {
Pike_fatal("Appending unhooked node.\n");
}
if (!new_node) {
Pike_fatal("Appending NULL node.\n");
}
if (new_node->next || new_node->prev) {
Pike_fatal("Appending hooked node.\n");
}
#endif /* PIKE_DEBUG */
 new_node->next = node->next;
new_node->prev = node;
new_node->next->prev = node->next = new_node;
add_ref(new_node);
add_ref(new_node);
}

/*! @class List
 *!
 *!   Linked list of values.
 */

#undef class_List_defined
#define class_List_defined
DEFAULT_CMOD_STORAGE struct program *List_program=NULL;

#ifdef List_program_fun_num_used
DEFAULT_CMOD_STORAGE int List_program_fun_num=-1;
#endif /* List_program_fun_num_used */

#undef var_head_List_defined
#define var_head_List_defined

#undef var_head_sentinel_refs_List_defined
#define var_head_sentinel_refs_List_defined

#undef var_tail_List_defined
#define var_tail_List_defined
#line 5153 "/Users/hww3/devel/pike/src/builtin.cmod"
/* Always NULL. */

#undef var_tail_sentinel_refs_List_defined
#define var_tail_sentinel_refs_List_defined

#undef var_tail_pred_List_defined
#define var_tail_pred_List_defined

#undef var_num_elems_List_defined
#define var_num_elems_List_defined

#undef THIS
#define THIS ((struct List_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_LIST
#define THIS_LIST ((struct List_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_LIST
#define OBJ2_LIST(o) ((struct List_struct *)(o->storage+List_storage_offset))

#undef GET_LIST_STORAGE
#define GET_LIST_STORAGE(o) ((struct List_struct *)(o->storage+List_storage_offset)
static ptrdiff_t List_storage_offset;
struct List_struct {

#ifdef var_head_List_defined
#line 5151 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_list_node *head;
#endif /* var_head_List_defined */

#ifdef var_head_sentinel_refs_List_defined
#line 5152 "/Users/hww3/devel/pike/src/builtin.cmod"
INT32 head_sentinel_refs;
#endif /* var_head_sentinel_refs_List_defined */

#ifdef var_tail_List_defined
#line 5153 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_list_node *tail;
#endif /* var_tail_List_defined */

#ifdef var_tail_sentinel_refs_List_defined
#line 5154 "/Users/hww3/devel/pike/src/builtin.cmod"
INT32 tail_sentinel_refs;
#endif /* var_tail_sentinel_refs_List_defined */

#ifdef var_tail_pred_List_defined
#line 5155 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_list_node *tail_pred;
#endif /* var_tail_pred_List_defined */

#ifdef var_num_elems_List_defined
#line 5156 "/Users/hww3/devel/pike/src/builtin.cmod"
INT32 num_elems;
#endif /* var_num_elems_List_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct List_struct *List_gdb_dummy_ptr;
#endif
#line 5158 "/Users/hww3/devel/pike/src/builtin.cmod"
#define HEAD_SENTINEL(this)	((struct pike_list_node *)(&this->head))
#define TAIL_SENTINEL(this)	((struct pike_list_node *)(&this->tail))

/* Sentinel overlap description:
   *
   * List			Head sentinel		Tail sentinel
   *   head			  next
   *   head_sentinel_refs	  refs
   *   tail			  prev			  next
   *   tail_sentinel_refs				  refs
   *   tail_pred					  prev
   */

/* Suggestions for future functionality:
   *
   *   o Pop tail
   *   o Join
   *   o Copy segment
   *   o Detach segment (requires new iterator implementation)
   *   o Iterator copy
   *   o _equal() for iterators and lists.
   *   o _values(), _search(), cast()
   *   o _sizeof()?, _indices()??
   *   o Support for reverse(), filter() and map().
   *   o Initialization from array.
   *   o Support for Pike.count_memory.
   */


#define f_List_cq__size_object_defined

#ifdef f_List_cq__size_object_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__size_object_fun_num = 0;

#endif /* f_List_cq__size_object_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__size_object(INT32 args) {
#line 5187 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("_size_object",args,0);
{
int q = THIS->num_elems;
int res = q * sizeof(struct pike_list_node);
struct mapping *m = NULL;
struct pike_list_node *n = THIS->head;
while( q-- )
{
res += rec_size_svalue( &n->val, &m );
n = n->next;
}
if( m ) free_mapping( m );
do { INT_TYPE ret_=(res);  push_int(ret_); return; }while(0);
#line 5200 "/Users/hww3/devel/pike/src/builtin.cmod"
}

}

#undef internal_init_List_defined
#define internal_init_List_defined

#undef List_event_handler_defined
#define List_event_handler_defined
static void init_List_struct(void)
#line 5203 "/Users/hww3/devel/pike/src/builtin.cmod"
{
THIS->tail = NULL;
THIS->head = TAIL_SENTINEL(THIS);
THIS->tail_pred = HEAD_SENTINEL(THIS);
THIS->head_sentinel_refs = THIS->tail_sentinel_refs = 2;
THIS->num_elems = 0;
}


#undef internal_exit_List_defined
#define internal_exit_List_defined

#undef List_event_handler_defined
#define List_event_handler_defined
static void exit_List_struct(void)
#line 5213 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct pike_list_node *node = THIS->head;
struct pike_list_node *next;
while ((next = node->next)) {
#ifdef PIKE_DEBUG
 if (node->refs != 2) {
Pike_fatal("Unexpected number of references for node: %d\n",
node->refs);
}
#endif /* PIKE_DEBUG */
 unlink_list_node(node);
node = next;
}
}

/* Called at gc_check time. */

#undef internal_gc_check_List_defined
#define internal_gc_check_List_defined

#undef List_event_handler_defined
#define List_event_handler_defined
static void gc_check_List_struct(void)
#line 5230 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct pike_list_node *node = THIS->head;
struct pike_list_node *next;

while ((next = node->next)) {
debug_gc_check_svalues(&node->val, 1, "as a list node value");
node = next;
}
}

/* Called at gc_mark time */

#undef internal_gc_recurse_List_defined
#define internal_gc_recurse_List_defined

#undef List_event_handler_defined
#define List_event_handler_defined
static void gc_recurse_List_struct(void)
#line 5242 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct pike_list_node *node = THIS->head;
struct pike_list_node *next;
while ((next = node->next)) {
gc_recurse_svalues(&node->val, 1);
node = next;
}
/* FIXME: mc_count_bytes */
}

/*! @decl int(0..1) is_empty()
   *!
   *!   Check if the list is empty.
   *!
   *! @returns
   *!   Returns @expr{1@} if the list is empty,
   *!   and @expr{0@} (zero) if there are elements in the list.
   */
#define f_List_is_empty_defined

#ifdef f_List_is_empty_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_is_empty_fun_num = 0;

#endif /* f_List_is_empty_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_is_empty(INT32 args) {
#line 5260 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("is_empty",args,0);
{
push_int(!THIS->head->next);
}

}
/*! @decl protected int(0..) _sizeof()
   *!
   *!   Returns the number of elements in the list.
   */
#define f_List_cq__sizeof_defined

#ifdef f_List_cq__sizeof_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__sizeof_fun_num = 0;

#endif /* f_List_cq__sizeof_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__sizeof(INT32 args) {
#line 5269 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("_sizeof",args,0);
#line 5271 "/Users/hww3/devel/pike/src/builtin.cmod"
{
push_int(THIS->num_elems);
}

}
/*! @decl protected string _sprintf(int c, mapping(string:mixed)|void attr)
   *!
   *!   Describe the list.
   *!
   *! @seealso
   *!   @[sprintf()], @[lfun::_sprintf()]
   */
#define f_List_cq__sprintf_defined

#ifdef f_List_cq__sprintf_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__sprintf_fun_num = 0;

#endif /* f_List_cq__sprintf_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__sprintf(INT32 args) {
#line 5282 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE c;
#line 5282 "/Users/hww3/devel/pike/src/builtin.cmod"
struct mapping * attr;
#line 5282 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args < 1) wrong_number_of_args_error("_sprintf",args,1);
#line 5282 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args > 2) wrong_number_of_args_error("_sprintf",args,2);
#line 5282 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("_sprintf",1,"int");
#line 5282 "/Users/hww3/devel/pike/src/builtin.cmod"
c=Pike_sp[0-args].u.integer;
#line 5282 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 1 &&
    (TYPEOF(Pike_sp[1-args]) != PIKE_T_INT ||
     Pike_sp[1-args].u.integer)) {
#line 5282 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[1-args]) != PIKE_T_MAPPING) SIMPLE_ARG_TYPE_ERROR("_sprintf",2,"mapping(string:mixed)|void");
#line 5282 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(attr=Pike_sp[1-args].u.mapping);
#line 5282 "/Users/hww3/devel/pike/src/builtin.cmod"
} else attr = NULL;
#line 5284 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if (!THIS->num_elems) {
push_text("ADT.List(/* empty */)");
} else if (c == 'O') {
struct pike_list_node *node = THIS->head;
if (THIS->num_elems == 1) {
push_text("ADT.List(/* 1 element */\n");
} else {
push_text("ADT.List(/* %d elements */\n");
push_int(THIS->num_elems);
f_sprintf(2);
}
while (node->next) {
if (node->next->next) {
push_text("    %O,\n");
} else {
push_text("    %O\n");
}
push_svalue(&node->val);
f_sprintf(2);
node = node->next;
}
push_text(")");
f_add(THIS->num_elems + 2);
} else {
if (THIS->num_elems == 1) {
push_text("ADT.List(/* 1 element */)");
} else {
push_text("ADT.List(/* %d elements */)");
push_int(THIS->num_elems);
f_sprintf(2);
}
}
stack_pop_n_elems_keep_top(args);
}

}
/*! @decl mixed head()
   *!
   *!   Get the element at the head of the list.
   *!
   *! @throws
   *!   Throws an error if the list is empty.
   *!
   *! @seealso
   *!   @[is_empty()], @[tail()], @[pop()]
   */
#define f_List_head_defined

#ifdef f_List_head_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_head_fun_num = 0;

#endif /* f_List_head_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_head(INT32 args) {
#line 5330 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("head",args,0);
{
if (THIS->head->next) {
push_svalue(&THIS->head->val);
} else {
Pike_error("Empty list.\n");
}
}

}
/*! @decl mixed tail()
   *!
   *!   Get the element at the tail of the list.
   *!
   *! @throws
   *!   Throws an error if the list is empty.
   *!
   *! @seealso
   *!   @[is_empty()], @[head()], @[pop_back()]
   */
#define f_List_tail_defined

#ifdef f_List_tail_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_tail_fun_num = 0;

#endif /* f_List_tail_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_tail(INT32 args) {
#line 5349 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("tail",args,0);
{
struct pike_list_node * node = TAIL_SENTINEL(THIS);
if (THIS->head->next) {
push_svalue(&node->prev->val);
} else {
Pike_error("Empty list.\n");
}
}

}
#line 5359 "/Users/hww3/devel/pike/src/builtin.cmod"
static inline void pop_node(struct pike_list_node * node) {
push_svalue(&node->val);
if (node->refs == 2) {
unlink_list_node(node);
} else {
detach_list_node(node);
}
THIS->num_elems--;
}

/*! @decl mixed pop()
   *!
   *!   Pop the element at the head of the list from the list.
   *!
   *! @throws
   *!   Throws an error if the list is empty.
   *!
   *! @seealso
   *!   @[is_empty()], @[head()], @[tail()], @[pop_back()]
   */
#define f_List_pop_defined

#ifdef f_List_pop_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_pop_fun_num = 0;

#endif /* f_List_pop_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_pop(INT32 args) {
#line 5379 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("pop",args,0);
{
if (THIS->head->next) {
pop_node(THIS->head);
} else {
Pike_error("Empty list.\n");
}
}

}
/*! @decl mixed pop_back()
   *!
   *!   Pop the element at the tail of the list from the list.
   *!
   *! @throws
   *!   Throws an error if the list is empty.
   *!
   *! @seealso
   *!   @[is_empty()], @[head()], @[tail()], @[pop()]
   */
#define f_List_pop_back_defined

#ifdef f_List_pop_back_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_pop_back_fun_num = 0;

#endif /* f_List_pop_back_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_pop_back(INT32 args) {
#line 5398 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("pop_back",args,0);
{
const struct pike_list_node * node = TAIL_SENTINEL(THIS);
if (THIS->head->next) {
pop_node(node->prev);
} else {
Pike_error("Empty list.\n");
}
}

}
/*! @decl array _values()
   *!
   *! 	Returns an array of elements in the list.
   */
#define f_List_cq__values_defined

#ifdef f_List_cq__values_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__values_fun_num = 0;

#endif /* f_List_cq__values_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__values(INT32 args) {
#line 5412 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("_values",args,0);
#line 5414 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct array * a;
push_int(THIS->num_elems);
f_allocate(1);

a = Pike_sp[-1].u.array;
if (THIS->num_elems) {
struct pike_list_node *node = THIS->head;
int i;
for (i = 0; i < THIS->num_elems; i++) {
assign_svalue_no_free(ITEM(a) + i, &node->val);
node = node->next;
}
}
}

}
/*! @decl array cast(string type)
   *!
   *! 	Cast the lists. @expr{array@} is the only
   *! 	supported type.
   */
#define f_List_cast_defined

#ifdef f_List_cast_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cast_fun_num = 0;

#endif /* f_List_cast_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cast(INT32 args) {
#line 5435 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_string * type;
#line 5435 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("cast",args,1);
#line 5435 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("cast",1,"string");
#line 5435 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(type=Pike_sp[0-1].u.string);
#line 5437 "/Users/hww3/devel/pike/src/builtin.cmod"
{
pop_stack(); /* type as at least one more reference. */
if (type == literal_array_string)
apply_current(f_List_cq__values_fun_num, 0);
else
push_undefined();
}


}
/*! @decl mixed `[](mixed key) */
#define f_List_cq__backtick_5B_5D_defined

#ifdef f_List_cq__backtick_5B_5D_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__backtick_5B_5D_fun_num = 0;

#endif /* f_List_cq__backtick_5B_5D_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__backtick_5B_5D(INT32 args) {
#line 5447 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * key;
#line 5447 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`[]",args,1);
#line 5447 "/Users/hww3/devel/pike/src/builtin.cmod"
key=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
#line 5449 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct pike_list_node *node;
INT_TYPE n;
if (TYPEOF(*key) != PIKE_T_INT) SIMPLE_BAD_ARG_ERROR("`[]", 1, "int");

n = key->u.integer;
if (n < 0) n = -(n+1);

if (n >= THIS->num_elems) Pike_error("out of bounds");

if (n >= THIS->num_elems >> 1) { /* use shorter direction */
n = THIS->num_elems - n - 1;
key->u.integer = - key->u.integer - 1;
}

if (key->u.integer < 0) {
node = TAIL_SENTINEL(THIS)->prev;
while (n--) node = node->prev;
} else {
node = THIS->head;
while (n--) node = node->next;
}

pop_n_elems(args);
push_svalue(&node->val);
}

}
/*! @decl void append(mixed ... values)
   *!
   *!   Append @[values] to the end of the list.
   *!
   *! @seealso
   *!   @[insert()]
   */
#define f_List_append_defined

#ifdef f_List_append_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_append_fun_num = 0;

#endif /* f_List_append_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_append(INT32 args) {
#line 5483 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * values;
#line 5483 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 0) {
  INT32 argcnt = 0;
  do {
    dmalloc_touch_svalue(Pike_sp+0+argcnt-args);
#line 5483 "/Users/hww3/devel/pike/src/builtin.cmod"
  } while (++argcnt < args-0);
  values=Pike_sp+0-args;
} else values = NULL;
#line 5484 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct pike_list_node *node = TAIL_SENTINEL(THIS);
while (args--) {
struct pike_list_node *new_node = alloc_pike_list_node();
new_node->val = *(--Pike_sp);
prepend_list_node(node, new_node);
free_list_node(node = new_node);
THIS->num_elems++;
}
push_int(0);
}

}
/*! @decl void insert(mixed ... values)
   *!
   *!   Insert @[values] at the front of the list.
   *!
   *! @seealso
   *!   @[append()]
   */
#define f_List_insert_defined

#ifdef f_List_insert_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_insert_fun_num = 0;

#endif /* f_List_insert_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_insert(INT32 args) {
#line 5503 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * values;
#line 5503 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 0) {
  INT32 argcnt = 0;
  do {
    dmalloc_touch_svalue(Pike_sp+0+argcnt-args);
#line 5503 "/Users/hww3/devel/pike/src/builtin.cmod"
  } while (++argcnt < args-0);
  values=Pike_sp+0-args;
} else values = NULL;
#line 5504 "/Users/hww3/devel/pike/src/builtin.cmod"
{
struct pike_list_node *node = THIS->head;
while (args--) {
struct pike_list_node *new_node = alloc_pike_list_node();
new_node->val = *(--Pike_sp);
prepend_list_node(node, new_node);
free_list_node(node = new_node);
THIS->num_elems++;
}
push_int(0);
}

}
/*! @decl void flush()
   *!
   *! 	Empties the List.
   */
#define f_List_flush_defined

#ifdef f_List_flush_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_flush_fun_num = 0;

#endif /* f_List_flush_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_flush(INT32 args) {
#line 5520 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("flush",args,0);
#line 5520 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if (THIS->num_elems) {
while (THIS->head->next) {
if (THIS->head->refs == 2)
unlink_list_node(THIS->head);
else
detach_list_node(THIS->head);
}
THIS->num_elems = 0;
}
}

}
/*! @decl protected void create(mixed ... values)
   *!
   *!   Create a new @[List], and initialize it with @[values].
   */
#define f_List_create_defined

#ifdef f_List_create_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_create_fun_num = 0;

#endif /* f_List_create_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_create(INT32 args) {
#line 5536 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * values;
#line 5536 "/Users/hww3/devel/pike/src/builtin.cmod"
if (args > 0) {
  INT32 argcnt = 0;
  do {
    dmalloc_touch_svalue(Pike_sp+0+argcnt-args);
#line 5536 "/Users/hww3/devel/pike/src/builtin.cmod"
  } while (++argcnt < args-0);
  values=Pike_sp+0-args;
} else values = NULL;
#line 5538 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if (THIS->num_elems)
apply_current(f_List_flush_fun_num, 0);
apply_current(f_List_append_fun_num, args);
}

}
/*! @class _get_iterator
   *!
   *!   @[Iterator] that loops over the @[List].
   */

#undef class_List_cq__get_iterator_defined
#define class_List_cq__get_iterator_defined
DEFAULT_CMOD_STORAGE struct program *List_cq__get_iterator_program=NULL;

#ifdef List_cq__get_iterator_program_fun_num_used
DEFAULT_CMOD_STORAGE int List_cq__get_iterator_program_fun_num=-1;
#endif /* List_cq__get_iterator_program_fun_num_used */

#undef var_cur_List_cq__get_iterator_defined
#define var_cur_List_cq__get_iterator_defined

#undef var_ind_List_cq__get_iterator_defined
#define var_ind_List_cq__get_iterator_defined

#undef THIS
#define THIS ((struct List_cq__get_iterator_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_LIST_CQ__GET_ITERATOR
#define THIS_LIST_CQ__GET_ITERATOR ((struct List_cq__get_iterator_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_LIST_CQ__GET_ITERATOR
#define OBJ2_LIST_CQ__GET_ITERATOR(o) ((struct List_cq__get_iterator_struct *)(o->storage+List_cq__get_iterator_storage_offset))

#undef GET_LIST_CQ__GET_ITERATOR_STORAGE
#define GET_LIST_CQ__GET_ITERATOR_STORAGE(o) ((struct List_cq__get_iterator_struct *)(o->storage+List_cq__get_iterator_storage_offset)
static ptrdiff_t List_cq__get_iterator_storage_offset;
struct List_cq__get_iterator_struct {

#ifdef var_cur_List_cq__get_iterator_defined
#line 5552 "/Users/hww3/devel/pike/src/builtin.cmod"
struct pike_list_node *cur;
#endif /* var_cur_List_cq__get_iterator_defined */

#ifdef var_ind_List_cq__get_iterator_defined
#line 5553 "/Users/hww3/devel/pike/src/builtin.cmod"
INT32 ind;
#endif /* var_ind_List_cq__get_iterator_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct List_cq__get_iterator_struct *List_cq__get_iterator_gdb_dummy_ptr;
#endif
#line 5553 "/Users/hww3/devel/pike/src/builtin.cmod"
/* Not meaningful, but requred by the API. */

/* NOTE: cur may never refer to an unlinked node.
     *       cur may however refer to a detached node, or to sentinels.
     */

static struct List_struct *List__get_iterator_find_parent()
{
struct external_variable_context loc;

loc.o = Pike_fp->current_object;
loc.parent_identifier = Pike_fp->fun;
loc.inherit = Pike_fp->context;
find_external_context(&loc, 1);
return (struct List_struct *)(loc.o->storage +
loc.inherit->storage_offset);
}


#undef internal_init_List_cq__get_iterator_defined
#define internal_init_List_cq__get_iterator_defined

#undef List_cq__get_iterator_event_handler_defined
#define List_cq__get_iterator_event_handler_defined
static void init_List_cq__get_iterator_struct(void)
#line 5572 "/Users/hww3/devel/pike/src/builtin.cmod"
{
add_ref(THIS->cur = List__get_iterator_find_parent()->head);
THIS->ind = 0;
}


#undef internal_exit_List_cq__get_iterator_defined
#define internal_exit_List_cq__get_iterator_defined

#undef List_cq__get_iterator_event_handler_defined
#define List_cq__get_iterator_event_handler_defined
static void exit_List_cq__get_iterator_struct(void)
#line 5579 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if (THIS->cur) {
free_list_node(THIS->cur);
THIS->cur = NULL;
}
}

/* These two functions perform the same thing,
     * but are optimized to minimize recursion.
     */
static void gc_recurse_list_node_tree_backward(struct pike_list_node *node,
struct pike_list_node *back);
static void gc_recurse_list_node_tree_forward(struct pike_list_node *node,
struct pike_list_node *back)
{
if (!node || !node->next) return;
if (node->next->prev == node) {
/* List member. Recursed from the list recurse code. */
#ifdef PIKE_DEBUG
 if (node->prev->next != node) {
Pike_fatal("Partially detached node.\n");
}
#endif /* PIKE_DEBUG */
 return;
}
#ifdef PIKE_DEBUG
 if (node->prev->next == node) {
Pike_fatal("Partially detached node.\n");
}
#endif /* PIKE_DEBUG */
 while (1) {
gc_recurse_svalues(&node->val, 1);
if (node->prev != back)
gc_recurse_list_node_tree_backward(node->prev, node->next);
back = node->prev;
node = node->next;
if (!node->next || (node->next->prev == node)) {
/* List member. Recursed from the list recurse code. */
#ifdef PIKE_DEBUG
 if (node->prev->next != node) {
Pike_fatal("Partially detached node.\n");
}
#endif /* PIKE_DEBUG */
 break;
}
#ifdef PIKE_DEBUG
 if (node->prev->next == node) {
Pike_fatal("Partially detached node.\n");
}
#endif /* PIKE_DEBUG */
 }
}

static void gc_recurse_list_node_tree_backward(struct pike_list_node *node,
struct pike_list_node *next)
{
if (!node || !node->prev) return;
if (node->prev->next == node) {
/* List member. Checked from the list check code. */
#ifdef PIKE_DEBUG
 if (node->next->prev != node) {
Pike_fatal("Partially detached node.\n");
}
#endif /* PIKE_DEBUG */
 return;
}
#ifdef PIKE_DEBUG
 if (node->next->prev == node) {
Pike_fatal("Partially detached node.\n");
}
#endif /* PIKE_DEBUG */
 while (1) {
gc_recurse_svalues(&node->val, 1);
if (node->next != next)
gc_recurse_list_node_tree_forward(node->next, node->prev);
next = node->next;
node = node->prev;
if (!node->prev || (node->prev->next == node)) {
/* List member. Recursed from the list recurse code. */
#ifdef PIKE_DEBUG
 if (node->next->prev != node) {
Pike_fatal("Partially detached node.\n");
}
#endif /* PIKE_DEBUG */
 break;
}
#ifdef PIKE_DEBUG
 if (node->next->prev == node) {
Pike_fatal("Partially detached node.\n");
}
#endif /* PIKE_DEBUG */
 }
}

/* Called at gc_mark time */

#undef internal_gc_recurse_List_cq__get_iterator_defined
#define internal_gc_recurse_List_cq__get_iterator_defined

#undef List_cq__get_iterator_event_handler_defined
#define List_cq__get_iterator_event_handler_defined
static void gc_recurse_List_cq__get_iterator_struct(void)
#line 5675 "/Users/hww3/devel/pike/src/builtin.cmod"
{
if (!THIS->cur->next || !THIS->cur->prev) return;
if (THIS->cur->next->prev == THIS->cur) {
#ifdef PIKE_DEBUG
 if (THIS->cur->prev->next != THIS->cur) {
Pike_fatal("Partially detached node.\n");
}
#endif /* PIKE_DEBUG */
 return;
}
#ifdef PIKE_DEBUG
 if (THIS->cur->prev->next == THIS->cur) {
Pike_fatal("Partially detached node.\n");
}
#endif /* PIKE_DEBUG */
 /* Detached node. */
gc_recurse_svalues(&THIS->cur->val, 1);
gc_recurse_list_node_tree_forward(THIS->cur->next, THIS->cur->prev);
gc_recurse_list_node_tree_backward(THIS->cur->next, THIS->cur->prev);
}

#define f_List_cq__get_iterator_cq__backtick_21_defined

#ifdef f_List_cq__get_iterator_cq__backtick_21_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__get_iterator_cq__backtick_21_fun_num = 0;

#endif /* f_List_cq__get_iterator_cq__backtick_21_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__get_iterator_cq__backtick_21(INT32 args) {
#line 5696 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("`!",args,0);
#line 5698 "/Users/hww3/devel/pike/src/builtin.cmod"
{
pop_n_elems(args);
push_int(!THIS->cur->next || !THIS->cur->prev);
}

}
#define f_List_cq__get_iterator_index_defined

#ifdef f_List_cq__get_iterator_index_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__get_iterator_index_fun_num = 0;

#endif /* f_List_cq__get_iterator_index_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__get_iterator_index(INT32 args) {
#line 5703 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("index",args,0);
{
pop_n_elems(args);
if (THIS->cur->next && THIS->cur->prev) {
push_int(THIS->ind);
} else {
push_undefined();
}
}

}
/*! @decl mixed value()
     *!
     *! @returns
     *!   Returns the value at the current position.
     */
#define f_List_cq__get_iterator_value_defined

#ifdef f_List_cq__get_iterator_value_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__get_iterator_value_fun_num = 0;

#endif /* f_List_cq__get_iterator_value_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__get_iterator_value(INT32 args) {
#line 5718 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("value",args,0);
{
pop_n_elems(args);
if (THIS->cur->next && THIS->cur->prev) {
push_svalue(&THIS->cur->val);
} else {
push_undefined();
}
}

}
/*! @decl int(0..1) first()
     *!
     *!   Reset the iterator to point to the first element in
     *!   the list.
     *!
     *! @returns
     *!   Returns @expr{1@} if there are elements in the list,
     *!   and @expr{0@} (zero) if the list is empty.
     */
#define f_List_cq__get_iterator_first_defined

#ifdef f_List_cq__get_iterator_first_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__get_iterator_first_fun_num = 0;

#endif /* f_List_cq__get_iterator_first_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__get_iterator_first(INT32 args) {
#line 5737 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("first",args,0);
{
struct external_variable_context loc;
struct List_struct *parent;
pop_n_elems(args);

/* Find our parent. */
loc.o = Pike_fp->current_object;
loc.parent_identifier = Pike_fp->fun;
loc.inherit = INHERIT_FROM_INT(loc.o->prog, loc.parent_identifier);
find_external_context(&loc, 1);
parent = (struct List_struct *)(loc.o->storage +
loc.inherit->storage_offset);
free_list_node(THIS->cur);
add_ref(THIS->cur = parent->head);
THIS->ind = 0;
pop_n_elems(args);
if (THIS->cur->next) {
push_int(1);
} else {
push_undefined();
}
}

}
/*! @decl int(0..1) next()
     *!
     *!   Advance to the next element in the list.
     *!
     *! @returns
     *!   Returns @expr{1@} on success, and @expr{0@} (zero)
     *!   at the end of the list.
     *!
     *! @seealso
     *!   @[prev()]
     */
#define f_List_cq__get_iterator_next_defined

#ifdef f_List_cq__get_iterator_next_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__get_iterator_next_fun_num = 0;

#endif /* f_List_cq__get_iterator_next_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__get_iterator_next(INT32 args) {
#line 5772 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("next",args,0);
{
struct pike_list_node *next;
if ((next = THIS->cur->next)) {
free_list_node(THIS->cur);
add_ref(THIS->cur = next);
THIS->ind++;
if (next->next) {
pop_n_elems(args);
push_int(1);
return;
}
}
pop_n_elems(args);
push_int(0);
}

}
/*! @decl int(0..1) prev()
     *!
     *!   Retrace to the previous element in the list.
     *!
     *! @returns
     *!   Returns @expr{1@} on success, and @expr{0@} (zero)
     *!   at the beginning of the list.
     *!
     *! @seealso
     *!   @[next()]
     */
#define f_List_cq__get_iterator_prev_defined

#ifdef f_List_cq__get_iterator_prev_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__get_iterator_prev_fun_num = 0;

#endif /* f_List_cq__get_iterator_prev_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__get_iterator_prev(INT32 args) {
#line 5800 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("prev",args,0);
{
struct pike_list_node *prev;
if ((prev = THIS->cur->prev)) {
free_list_node(THIS->cur);
add_ref(THIS->cur = prev);
THIS->ind--;
if (prev->prev) {
pop_n_elems(args);
push_int(1);
return;
}
}
pop_n_elems(args);
push_int(0);
}

}
/*! @decl Iterator `+=(int steps)
     *!
     *!   Advance or retrace the specified number of @[steps].
     *!
     *! @seealso
     *!   @[next()], @[prev]
     */
#define f_List_cq__get_iterator_cq__backtick_add_eq_defined

#ifdef f_List_cq__get_iterator_cq__backtick_add_eq_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__get_iterator_cq__backtick_add_eq_fun_num = 0;

#endif /* f_List_cq__get_iterator_cq__backtick_add_eq_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__get_iterator_cq__backtick_add_eq(INT32 args) {
#line 5824 "/Users/hww3/devel/pike/src/builtin.cmod"
INT_TYPE steps;
#line 5824 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("`+=",args,1);
#line 5824 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("`+=",1,"int");
#line 5824 "/Users/hww3/devel/pike/src/builtin.cmod"
steps=Pike_sp[0-1].u.integer;
{
if (!steps) return;
if (steps > 0) {
while (steps--) {
apply_current(f_List_cq__get_iterator_next_fun_num, 0);
pop_stack();
}
} else {
while (steps++) {
apply_current(f_List_cq__get_iterator_prev_fun_num, 0);
pop_stack();
}
}
pop_n_elems(args);
ref_push_object(Pike_fp->current_object);
}

}
/*! @decl void insert(mixed val)
     *!
     *!   Insert @[val] at the current position.
     *!
     *! @seealso
     *!   @[append()], @[delete()], @[set()]
     */
#define f_List_cq__get_iterator_insert_defined

#ifdef f_List_cq__get_iterator_insert_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__get_iterator_insert_fun_num = 0;

#endif /* f_List_cq__get_iterator_insert_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__get_iterator_insert(INT32 args) {
#line 5849 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * val;
#line 5849 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("insert",args,1);
#line 5849 "/Users/hww3/devel/pike/src/builtin.cmod"
val=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
{
struct pike_list_node *new_node;
if (!THIS->cur->prev) {
Pike_error("Attempt to insert before the start sentinel.\n");
}
new_node = alloc_pike_list_node();
assign_svalue_no_free(&new_node->val, val);
prepend_list_node(THIS->cur, new_node);
free_list_node(THIS->cur);
THIS->cur = new_node;
List__get_iterator_find_parent()->num_elems++;
pop_n_elems(args);
push_int(0);
}

}
/*! @decl void append(mixed val)
     *!
     *!   Append @[val] after the current position.
     *!
     *! @seealso
     *!   @[insert()], @[delete()], @[set()]
     */
#define f_List_cq__get_iterator_append_defined

#ifdef f_List_cq__get_iterator_append_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__get_iterator_append_fun_num = 0;

#endif /* f_List_cq__get_iterator_append_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__get_iterator_append(INT32 args) {
#line 5872 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * val;
#line 5872 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("append",args,1);
#line 5872 "/Users/hww3/devel/pike/src/builtin.cmod"
val=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
{
struct pike_list_node *new_node;
if (!THIS->cur->next) {
Pike_error("Attempt to append after the end sentinel.\n");
}
new_node = alloc_pike_list_node();
assign_svalue_no_free(&new_node->val, val);
append_list_node(THIS->cur, new_node);
free_list_node(new_node);
List__get_iterator_find_parent()->num_elems++;
pop_n_elems(args);
push_int(0);
}

}
/*! @decl void delete()
     *!
     *!   Delete the current node.
     *!
     *!   The current position will advance to the next node.
     *!   This function thus performes the reverse operation
     *!   of @[insert()].
     *!
     *! @seealso
     *!   @[insert()], @[append()], @[set()]
     */
#define f_List_cq__get_iterator_delete_defined

#ifdef f_List_cq__get_iterator_delete_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__get_iterator_delete_fun_num = 0;

#endif /* f_List_cq__get_iterator_delete_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__get_iterator_delete(INT32 args) {
#line 5898 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 0) wrong_number_of_args_error("delete",args,0);
{
struct pike_list_node *next;
if (!(next = THIS->cur->next) || !THIS->cur->prev) {
Pike_error("Attempt to delete a sentinel.\n");
}
add_ref(next);
if (next->prev == THIS->cur) {
if (THIS->cur->refs == 3) {
unlink_list_node(THIS->cur);
} else {
/* There's some other iterator holding references to this node. */
detach_list_node(THIS->cur);
}
List__get_iterator_find_parent()->num_elems--;
}
free_list_node(THIS->cur);
THIS->cur = next;
pop_n_elems(args);
push_int(0);
}

}
/*! @decl void set(mixed val)
     *!
     *!   Set the value of the current position to @[val].
     *!
     *! @seealso
     *!   @[insert()], @[append()], @[delete()]
     */
#define f_List_cq__get_iterator_set_defined

#ifdef f_List_cq__get_iterator_set_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_List_cq__get_iterator_set_fun_num = 0;

#endif /* f_List_cq__get_iterator_set_fun_num_used */
DEFAULT_CMOD_STORAGE void f_List_cq__get_iterator_set(INT32 args) {
#line 5927 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * val;
#line 5927 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("set",args,1);
#line 5927 "/Users/hww3/devel/pike/src/builtin.cmod"
val=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
{
if (!THIS->cur->next || !THIS->cur->prev) {
Pike_error("Attempt to set a sentinel.\n");
}
assign_svalue(&THIS->cur->val, val);
pop_n_elems(args);
push_int(0);
}
}

#ifdef List_cq__get_iterator_event_handler_defined
static void List_cq__get_iterator_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_List_cq__get_iterator_defined
  case PROG_EVENT_INIT: init_List_cq__get_iterator_struct(); break;

#endif /* internal_init_List_cq__get_iterator_defined */

#ifdef internal_exit_List_cq__get_iterator_defined
  case PROG_EVENT_EXIT: exit_List_cq__get_iterator_struct(); break;

#endif /* internal_exit_List_cq__get_iterator_defined */

#ifdef internal_gc_recurse_List_cq__get_iterator_defined
  case PROG_EVENT_GC_RECURSE: gc_recurse_List_cq__get_iterator_struct(); break;

#endif /* internal_gc_recurse_List_cq__get_iterator_defined */
  default: break; 
  }
}

#endif /* List_cq__get_iterator_event_handler_defined */
/*! @endclass
   */

#ifdef List_event_handler_defined
static void List_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_List_defined
  case PROG_EVENT_INIT: init_List_struct(); break;

#endif /* internal_init_List_defined */

#ifdef internal_exit_List_defined
  case PROG_EVENT_EXIT: exit_List_struct(); break;

#endif /* internal_exit_List_defined */

#ifdef internal_gc_check_List_defined
  case PROG_EVENT_GC_CHECK: gc_check_List_struct(); break;

#endif /* internal_gc_check_List_defined */

#ifdef internal_gc_recurse_List_defined
  case PROG_EVENT_GC_RECURSE: gc_recurse_List_struct(); break;

#endif /* internal_gc_recurse_List_defined */
  default: break; 
  }
}

#endif /* List_event_handler_defined */
/*! @endclass
 */

/*! @endmodule
 */

/*! @module Pike
 */

/*! @class MasterCodec
 *!
 *! This is a bare-bones codec that is used when loading a dumped master.
 *!
 *! @seealso
 *!   @[Codec]
 */

#undef class_MasterCodec_defined
#define class_MasterCodec_defined
DEFAULT_CMOD_STORAGE struct program *MasterCodec_program=NULL;

#ifdef MasterCodec_program_fun_num_used
DEFAULT_CMOD_STORAGE int MasterCodec_program_fun_num=-1;
#endif /* MasterCodec_program_fun_num_used */
/*! @decl mixed functionof(mixed symbol)
   *! Look up a function in @[all_constants()].
   */
#define f_MasterCodec_functionof_defined

#ifdef f_MasterCodec_functionof_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_MasterCodec_functionof_fun_num = 0;

#endif /* f_MasterCodec_functionof_fun_num_used */
DEFAULT_CMOD_STORAGE void f_MasterCodec_functionof(INT32 args) {
#line 5962 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * symbol;
#line 5962 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("functionof",args,1);
#line 5962 "/Users/hww3/devel/pike/src/builtin.cmod"
symbol=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
{
mapping_index_no_free(Pike_sp, get_builtin_constants(), symbol);
Pike_sp++;
stack_pop_keep_top();
}
}
/*! @decl mixed objectof(mixed symbol)
   *! Look up an object in @[all_constants()].
   */
#define f_MasterCodec_objectof_defined

#ifdef f_MasterCodec_objectof_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_MasterCodec_objectof_fun_num = 0;

#endif /* f_MasterCodec_objectof_fun_num_used */
DEFAULT_CMOD_STORAGE void f_MasterCodec_objectof(INT32 args) {
#line 5971 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * symbol;
#line 5971 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("objectof",args,1);
#line 5971 "/Users/hww3/devel/pike/src/builtin.cmod"
symbol=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
{
mapping_index_no_free(Pike_sp, get_builtin_constants(), symbol);
Pike_sp++;
stack_pop_keep_top();
}
}
/*! @decl mixed programof(mixed symbol)
   *! Look up a program in @[all_constants()].
   */
#define f_MasterCodec_programof_defined

#ifdef f_MasterCodec_programof_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_MasterCodec_programof_fun_num = 0;

#endif /* f_MasterCodec_programof_fun_num_used */
DEFAULT_CMOD_STORAGE void f_MasterCodec_programof(INT32 args) {
#line 5980 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * symbol;
#line 5980 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 1) wrong_number_of_args_error("programof",args,1);
#line 5980 "/Users/hww3/devel/pike/src/builtin.cmod"
symbol=Pike_sp+0-1; dmalloc_touch_svalue(Pike_sp+0-1);
{
mapping_index_no_free(Pike_sp, get_builtin_constants(), symbol);
Pike_sp++;
stack_pop_keep_top();
}
}
/*! @decl object decode_object(object obj, mixed data)
   *! Calls @expr{obj->_decode(@[data])@}.
   */
#define f_MasterCodec_decode_object_defined

#ifdef f_MasterCodec_decode_object_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_MasterCodec_decode_object_fun_num = 0;

#endif /* f_MasterCodec_decode_object_fun_num_used */
DEFAULT_CMOD_STORAGE void f_MasterCodec_decode_object(INT32 args) {
#line 5989 "/Users/hww3/devel/pike/src/builtin.cmod"
struct object * obj;
#line 5989 "/Users/hww3/devel/pike/src/builtin.cmod"
struct svalue * data;
#line 5989 "/Users/hww3/devel/pike/src/builtin.cmod"
if(args != 2) wrong_number_of_args_error("decode_object",args,2);
#line 5989 "/Users/hww3/devel/pike/src/builtin.cmod"
if(TYPEOF(Pike_sp[0-2]) != PIKE_T_OBJECT) SIMPLE_ARG_TYPE_ERROR("decode_object",1,"object");
#line 5989 "/Users/hww3/devel/pike/src/builtin.cmod"
debug_malloc_pass(obj=Pike_sp[0-2].u.object);
#line 5989 "/Users/hww3/devel/pike/src/builtin.cmod"
data=Pike_sp+1-2; dmalloc_touch_svalue(Pike_sp+1-2);
{
apply(obj, "_decode", 1);
pop_stack();
}
}
/*! @endclass
 */

/*! @endmodule
 */

#line 6002 "/Users/hww3/devel/pike/src/builtin.cmod"
static struct object *val_module;

static void get_val_module(void)
{
assert (!val_module);
push_text ("Val");
APPLY_MASTER ("resolv", 1);
if (TYPEOF(Pike_sp[-1]) != T_OBJECT)
Pike_error ("\"Val\" didn't resolve to a module object.\n");
val_module = (--Pike_sp)->u.object;
}

/* Always do the lookup in the Val module dynamically to allow the
 * values to be replaced. */
#define GET_VAL(NAME)							\
  PMOD_EXPORT struct object *PIKE_CONCAT (get_val_, NAME) (void)	\
  {									\
    struct svalue index, res;						\
    if (!val_module) get_val_module();					\
    SET_SVAL(index, T_STRING, 0, string, NULL);				\
    MAKE_CONST_STRING (index.u.string, TOSTR (NAME));			\
    object_index_no_free (&res, val_module, 0, &index);			\
    if (TYPEOF(res) != T_OBJECT)					\
      Pike_error ("\"Val." TOSTR (NAME) "\" didn't resolve to an object.\n"); \
    return res.u.object;						\
  }

GET_VAL (true)
GET_VAL (false)
GET_VAL (null)

/* Kludge needed for the static null objects in the oracle module. It
 * ought to be fixed to use dynamic lookup of them instead. */
PMOD_EXPORT struct program *get_sql_null_prog(void)
{
return Null_program;
}


#undef class_cq___Backtrace_Tester___defined
#define class_cq___Backtrace_Tester___defined
DEFAULT_CMOD_STORAGE struct program *cq___Backtrace_Tester___program=NULL;

#ifdef cq___Backtrace_Tester___program_fun_num_used
DEFAULT_CMOD_STORAGE int cq___Backtrace_Tester___program_fun_num=-1;
#endif /* cq___Backtrace_Tester___program_fun_num_used */

#undef internal_init_cq___Backtrace_Tester___defined
#define internal_init_cq___Backtrace_Tester___defined

#undef cq___Backtrace_Tester___event_handler_defined
#define cq___Backtrace_Tester___event_handler_defined
static void init_cq___Backtrace_Tester___struct(void)
#line 6042 "/Users/hww3/devel/pike/src/builtin.cmod"
{
Pike_error("__Backtrace_Tester__\n");
}

#ifdef cq___Backtrace_Tester___event_handler_defined
static void cq___Backtrace_Tester___event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_cq___Backtrace_Tester___defined
  case PROG_EVENT_INIT: init_cq___Backtrace_Tester___struct(); break;

#endif /* internal_init_cq___Backtrace_Tester___defined */
  default: break; 
  }
}

#endif /* cq___Backtrace_Tester___event_handler_defined */
#line 6047 "/Users/hww3/devel/pike/src/builtin.cmod"
void init_builtin(void)
{
SET_SVAL(gc_pre_cb, PIKE_T_INT, NUMBER_NUMBER, integer, 0);
SET_SVAL(gc_post_cb, PIKE_T_INT, NUMBER_NUMBER, integer, 0);
SET_SVAL(gc_destruct_cb, PIKE_T_INT, NUMBER_NUMBER, integer, 0);
SET_SVAL(gc_done_cb, PIKE_T_INT, NUMBER_NUMBER, integer, 0);

#ifdef module_strings_declared
module_strings[0] = 
  make_shared_binary_string("Iterator",
                            CONSTANT_STRLEN("Iterator"));
#endif

#ifdef CMOD_MAP_PROGRAM_IDS_DEFINED
{ int i=0;
#ifndef tObjImpl_ITERATOR
# define tObjImpl_ITERATOR "\3\0\177\0\0\24"
{
   struct program *tmp = resolve_program(module_strings[0] /* "Iterator" */);
   if( tmp ) {
      ___cmod_ext_used[i].from = 20;
      ___cmod_ext_used[i].to = tmp->id;
      i++;
   }
}
#endif /* tObjImpl_ITERATOR */
}
set_program_id_to_id( ___cmod_map_program_ids );

#endif /* CMOD_MAP_PROGRAM_IDS_DEFINED */

#ifdef class_TM_defined

#ifdef PROG_TM_ID
#line 77 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(TM);
#else
#line 77 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_TM_ID */
#line 77 "/Users/hww3/devel/pike/src/builtin.cmod"
  TM_program = Pike_compiler->new_program;

#ifndef tObjImpl_TM

#undef tObjIs_TM
#define tObjIs_TM "\3\1\177\0\0\2"

#undef tObjImpl_TM
#define tObjImpl_TM "\3\0\177\0\0\2"

#endif /* tObjImpl_TM */

#ifdef THIS_TM
  TM_storage_offset = ADD_STORAGE(struct TM_struct);
#endif /* THIS_TM */

#ifdef TM_event_handler_defined
  pike_set_prog_event_callback(TM_event_handler);

#ifndef TM_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* TM_gc_live_obj */

#endif /* TM_event_handler_defined */

#ifdef f_TM_strptime_defined

#ifdef f_TM_strptime_fun_num_used
  f_TM_strptime_fun_num =
#endif /* f_TM_strptime_fun_num_used */
#line 197 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("strptime", f_TM_strptime, tFunc(tNStr("\10\0\0\0\1\0\0\0\377") tNStr("\10\0\0\0\1\0\0\0\377"),"\10\0\0\0\0\0\0\0\1"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_strptime_defined */

#ifdef f_TM_strftime_defined

#ifdef f_TM_strftime_fun_num_used
  f_TM_strftime_fun_num =
#endif /* f_TM_strftime_fun_num_used */
#line 335 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("strftime", f_TM_strftime, tFunc(tNStr("\10\0\0\0\1\0\0\0\377"),tNStr("\10\0\0\0\1\0\0\0\377")), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_strftime_defined */

#ifdef f_TM_cq__backticksec_defined

#ifdef f_TM_cq__backticksec_fun_num_used
  f_TM_cq__backticksec_fun_num =
#endif /* f_TM_cq__backticksec_fun_num_used */
#line 361 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`sec", f_TM_cq__backticksec, tFunc(tNone,"\10\0\0\0\0\0\0\0\74"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backticksec_defined */

#ifdef f_TM_cq__backtickmin_defined

#ifdef f_TM_cq__backtickmin_fun_num_used
  f_TM_cq__backtickmin_fun_num =
#endif /* f_TM_cq__backtickmin_fun_num_used */
#line 362 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`min", f_TM_cq__backtickmin, tFunc(tNone,"\10\0\0\0\0\0\0\0\73"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickmin_defined */

#ifdef f_TM_cq__backtickhour_defined

#ifdef f_TM_cq__backtickhour_fun_num_used
  f_TM_cq__backtickhour_fun_num =
#endif /* f_TM_cq__backtickhour_fun_num_used */
#line 363 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`hour", f_TM_cq__backtickhour, tFunc(tNone,"\10\0\0\0\0\0\0\0\27"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickhour_defined */

#ifdef f_TM_cq__backtickmday_defined

#ifdef f_TM_cq__backtickmday_fun_num_used
  f_TM_cq__backtickmday_fun_num =
#endif /* f_TM_cq__backtickmday_fun_num_used */
#line 364 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`mday", f_TM_cq__backtickmday, tFunc(tNone,"\10\0\0\0\1\0\0\0\37"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickmday_defined */

#ifdef f_TM_cq__backtickmon_defined

#ifdef f_TM_cq__backtickmon_fun_num_used
  f_TM_cq__backtickmon_fun_num =
#endif /* f_TM_cq__backtickmon_fun_num_used */
#line 365 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`mon", f_TM_cq__backtickmon, tFunc(tNone,"\10\0\0\0\0\0\0\0\13"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickmon_defined */

#ifdef f_TM_cq__backtickyear_defined

#ifdef f_TM_cq__backtickyear_fun_num_used
  f_TM_cq__backtickyear_fun_num =
#endif /* f_TM_cq__backtickyear_fun_num_used */
#line 367 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`year", f_TM_cq__backtickyear, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickyear_defined */

#ifdef f_TM_cq__backticksec_eq_defined

#ifdef f_TM_cq__backticksec_eq_fun_num_used
  f_TM_cq__backticksec_eq_fun_num =
#endif /* f_TM_cq__backticksec_eq_fun_num_used */
#line 368 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`sec=", f_TM_cq__backticksec_eq, tFunc("\10\200\0\0\0\177\377\377\377","\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backticksec_eq_defined */

#ifdef f_TM_cq__backtickmin_eq_defined

#ifdef f_TM_cq__backtickmin_eq_fun_num_used
  f_TM_cq__backtickmin_eq_fun_num =
#endif /* f_TM_cq__backtickmin_eq_fun_num_used */
#line 369 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`min=", f_TM_cq__backtickmin_eq, tFunc("\10\200\0\0\0\177\377\377\377","\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickmin_eq_defined */

#ifdef f_TM_cq__backtickhour_eq_defined

#ifdef f_TM_cq__backtickhour_eq_fun_num_used
  f_TM_cq__backtickhour_eq_fun_num =
#endif /* f_TM_cq__backtickhour_eq_fun_num_used */
#line 370 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`hour=", f_TM_cq__backtickhour_eq, tFunc("\10\200\0\0\0\177\377\377\377","\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickhour_eq_defined */

#ifdef f_TM_cq__backtickmday_eq_defined

#ifdef f_TM_cq__backtickmday_eq_fun_num_used
  f_TM_cq__backtickmday_eq_fun_num =
#endif /* f_TM_cq__backtickmday_eq_fun_num_used */
#line 371 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`mday=", f_TM_cq__backtickmday_eq, tFunc("\10\200\0\0\0\177\377\377\377","\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickmday_eq_defined */

#ifdef f_TM_cq__backtickyear_eq_defined

#ifdef f_TM_cq__backtickyear_eq_fun_num_used
  f_TM_cq__backtickyear_eq_fun_num =
#endif /* f_TM_cq__backtickyear_eq_fun_num_used */
#line 372 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`year=", f_TM_cq__backtickyear_eq, tFunc("\10\200\0\0\0\177\377\377\377","\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickyear_eq_defined */

#ifdef f_TM_cq__backtickmon_eq_defined

#ifdef f_TM_cq__backtickmon_eq_fun_num_used
  f_TM_cq__backtickmon_eq_fun_num =
#endif /* f_TM_cq__backtickmon_eq_fun_num_used */
#line 373 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`mon=", f_TM_cq__backtickmon_eq, tFunc("\10\200\0\0\0\177\377\377\377","\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickmon_eq_defined */

#ifdef f_TM_cq__backtickisdst_defined

#ifdef f_TM_cq__backtickisdst_fun_num_used
  f_TM_cq__backtickisdst_fun_num =
#endif /* f_TM_cq__backtickisdst_fun_num_used */
#line 381 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`isdst", f_TM_cq__backtickisdst, tFunc(tNone,"\10\377\377\377\377\0\0\0\1"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickisdst_defined */

#ifdef f_TM_cq__backtickwday_defined

#ifdef f_TM_cq__backtickwday_fun_num_used
  f_TM_cq__backtickwday_fun_num =
#endif /* f_TM_cq__backtickwday_fun_num_used */
    ADD_FUNCTION2("`wday", f_TM_cq__backtickwday, tFunc(tNone,"\10\0\0\0\0\0\0\0\6"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickwday_defined */

#ifdef f_TM_cq__backtickyday_defined

#ifdef f_TM_cq__backtickyday_fun_num_used
  f_TM_cq__backtickyday_fun_num =
#endif /* f_TM_cq__backtickyday_fun_num_used */
#line 396 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`yday", f_TM_cq__backtickyday, tFunc(tNone,"\10\0\0\0\0\0\0\1\155"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickyday_defined */

#ifdef f_TM_unix_time_defined

#ifdef f_TM_unix_time_fun_num_used
  f_TM_unix_time_fun_num =
#endif /* f_TM_unix_time_fun_num_used */
#line 402 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("unix_time", f_TM_unix_time, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_unix_time_defined */

#ifdef f_TM_asctime_defined

#ifdef f_TM_asctime_fun_num_used
  f_TM_asctime_fun_num =
#endif /* f_TM_asctime_fun_num_used */
#line 413 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("asctime", f_TM_asctime, tFunc(tNone,tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_asctime_defined */

#ifdef f_TM_cq__sprintf_defined

#ifdef f_TM_cq__sprintf_fun_num_used
  f_TM_cq__sprintf_fun_num =
#endif /* f_TM_cq__sprintf_fun_num_used */
#line 426 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_sprintf", f_TM_cq__sprintf, tFunc("\10\200\0\0\0\177\377\377\377" tMapping,tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__sprintf_defined */

#ifdef f_TM_cast_defined

#ifdef f_TM_cast_fun_num_used
  f_TM_cast_fun_num =
#endif /* f_TM_cast_fun_num_used */
#line 468 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("cast", f_TM_cast, tFunc(tStr,tOr("\10\200\0\0\0\177\377\377\377",tStr)), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cast_defined */

#ifdef f_TM_cq__backtickzone_defined

#ifdef f_TM_cq__backtickzone_fun_num_used
  f_TM_cq__backtickzone_fun_num =
#endif /* f_TM_cq__backtickzone_fun_num_used */
#line 489 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`zone", f_TM_cq__backtickzone, tFunc(tNone,tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickzone_defined */

#ifdef f_TM_cq__backtickgmtoff_defined

#ifdef f_TM_cq__backtickgmtoff_fun_num_used
  f_TM_cq__backtickgmtoff_fun_num =
#endif /* f_TM_cq__backtickgmtoff_fun_num_used */
#line 500 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`gmtoff", f_TM_cq__backtickgmtoff, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_cq__backtickgmtoff_defined */

#ifdef f_TM_localtime_defined

#ifdef f_TM_localtime_fun_num_used
  f_TM_localtime_fun_num =
#endif /* f_TM_localtime_fun_num_used */
    ADD_FUNCTION2("localtime", f_TM_localtime, tFunc("\10\200\0\0\0\177\377\377\377","\10\0\0\0\0\0\0\0\1"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_localtime_defined */

#ifdef f_TM_gmtime_defined

#ifdef f_TM_gmtime_fun_num_used
  f_TM_gmtime_fun_num =
#endif /* f_TM_gmtime_fun_num_used */
#line 526 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("gmtime", f_TM_gmtime, tFunc("\10\200\0\0\0\177\377\377\377","\10\0\0\0\0\0\0\0\1"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_gmtime_defined */

#ifdef f_TM_create_defined

#ifdef TM_f_TM_create_fun_num_used
  TM_f_TM_create_fun_num =
#endif /* TM_f_TM_create_fun_num_used */
#line 569 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("create", f_TM_create, tOr3(tFunc("\10\200\0\0\0\177\377\377\377",tVoid),tFunc(tNone,tVoid),tFunc("\10\200\0\0\0\177\377\377\377" "\10\0\0\0\0\0\0\0\13" "\10\0\0\0\1\0\0\0\37" "\10\0\0\0\0\0\0\0\30" "\10\0\0\0\0\0\0\0\73" "\10\0\0\0\0\0\0\0\73" tOr(tStr,tVoid),tVoid)), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_TM_create_defined */
#line 77 "/Users/hww3/devel/pike/src/builtin.cmod"
  TM_program=end_program();
#line 77 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef TM_program_fun_num_used
TM_program_fun_num=
#endif
 add_program_constant("TM",TM_program,0);

#endif /* class_TM_defined */

#ifdef class_DestructImmediate_defined

#ifdef PROG_DESTRUCTIMMEDIATE_ID
#line 2437 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(DESTRUCTIMMEDIATE);
#else
#line 2437 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_DESTRUCTIMMEDIATE_ID */
#line 2437 "/Users/hww3/devel/pike/src/builtin.cmod"
  DestructImmediate_program = Pike_compiler->new_program;

#ifndef tObjImpl_DESTRUCTIMMEDIATE

#undef tObjIs_DESTRUCTIMMEDIATE
#define tObjIs_DESTRUCTIMMEDIATE "\3\1\177\0\0\3"

#undef tObjImpl_DESTRUCTIMMEDIATE
#define tObjImpl_DESTRUCTIMMEDIATE "\3\0\177\0\0\3"

#endif /* tObjImpl_DESTRUCTIMMEDIATE */
#line 2438 "/Users/hww3/devel/pike/src/builtin.cmod"
  Pike_compiler->new_program->flags |= PROGRAM_DESTRUCT_IMMEDIATE;
#line 2437 "/Users/hww3/devel/pike/src/builtin.cmod"
  DestructImmediate_program=end_program();
#line 2437 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef DestructImmediate_program_fun_num_used
DestructImmediate_program_fun_num=
#endif
 add_program_constant("DestructImmediate",DestructImmediate_program,0);

#endif /* class_DestructImmediate_defined */

#ifdef class_FakeObject_defined

#ifdef PROG_FAKEOBJECT_ID
#line 2456 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(FAKEOBJECT);
#else
#line 2456 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_FAKEOBJECT_ID */
#line 2456 "/Users/hww3/devel/pike/src/builtin.cmod"
  FakeObject_program = Pike_compiler->new_program;

#ifndef tObjImpl_FAKEOBJECT

#undef tObjIs_FAKEOBJECT
#define tObjIs_FAKEOBJECT "\3\1\177\0\0\4"

#undef tObjImpl_FAKEOBJECT
#define tObjImpl_FAKEOBJECT "\3\0\177\0\0\4"

#endif /* tObjImpl_FAKEOBJECT */

#ifdef THIS_FAKEOBJECT
  FakeObject_storage_offset = ADD_STORAGE(struct FakeObject_struct);
#endif /* THIS_FAKEOBJECT */

#ifdef var_prog_FakeObject_defined
  PIKE_MAP_VARIABLE("prog", FakeObject_storage_offset + OFFSETOF(FakeObject_struct, prog),
                    tPrg(tObj), PIKE_T_PROGRAM, ID_PRIVATE|ID_PROTECTED|ID_HIDDEN);
#endif /* var_prog_FakeObject_defined */

#ifdef var_description_FakeObject_defined
  PIKE_MAP_VARIABLE("description", FakeObject_storage_offset + OFFSETOF(FakeObject_struct, description),
                    tStr, PIKE_T_STRING, ID_PROTECTED);
#endif /* var_description_FakeObject_defined */

#ifdef f_FakeObject_create_defined

#ifdef f_FakeObject_create_fun_num_used
  f_FakeObject_create_fun_num =
#endif /* f_FakeObject_create_fun_num_used */
#line 2462 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("create", f_FakeObject_create, tFunc(tOr3(tPrg(tObj),tFuncV(tNone,tMix,tAny),tVoid) tOr(tStr,tVoid),tVoid), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_FakeObject_create_defined */

#ifdef f_FakeObject_cq__sprintf_defined

#ifdef f_FakeObject_cq__sprintf_fun_num_used
  f_FakeObject_cq__sprintf_fun_num =
#endif /* f_FakeObject_cq__sprintf_fun_num_used */
#line 2476 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_sprintf", f_FakeObject_cq__sprintf, tFunc("\10\200\0\0\0\177\377\377\377" tOr(tMapping,tVoid),tStr), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_FakeObject_cq__sprintf_defined */
#line 2457 "/Users/hww3/devel/pike/src/builtin.cmod"
  Pike_compiler->new_program->flags |= PROGRAM_CONSTANT;
#line 2456 "/Users/hww3/devel/pike/src/builtin.cmod"
  FakeObject_program=end_program();
#line 2456 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef FakeObject_program_fun_num_used
FakeObject_program_fun_num=
#endif
 add_program_constant("FakeObject",FakeObject_program,0);

#endif /* class_FakeObject_defined */

#ifdef class_backtrace_frame_defined

#ifdef PROG_BACKTRACE_FRAME_ID
#line 2515 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(BACKTRACE_FRAME);
#else
#line 2515 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_BACKTRACE_FRAME_ID */
#line 2515 "/Users/hww3/devel/pike/src/builtin.cmod"
  backtrace_frame_program = Pike_compiler->new_program;

#ifndef tObjImpl_BACKTRACE_FRAME

#undef tObjIs_BACKTRACE_FRAME
#define tObjIs_BACKTRACE_FRAME "\3\1\177\0\0\5"

#undef tObjImpl_BACKTRACE_FRAME
#define tObjImpl_BACKTRACE_FRAME "\3\0\177\0\0\5"

#endif /* tObjImpl_BACKTRACE_FRAME */

#ifdef THIS_BACKTRACE_FRAME
  backtrace_frame_storage_offset = ADD_STORAGE(struct backtrace_frame_struct);
#endif /* THIS_BACKTRACE_FRAME */

#ifdef var_cq__fun_backtrace_frame_defined
  PIKE_MAP_VARIABLE("_fun", backtrace_frame_storage_offset + OFFSETOF(backtrace_frame_struct, _fun),
                    tMix, PIKE_T_MIXED, ID_PROTECTED|ID_PRIVATE);
#endif /* var_cq__fun_backtrace_frame_defined */

#ifdef var_oprog_backtrace_frame_defined
  PIKE_MAP_VARIABLE("oprog", backtrace_frame_storage_offset + OFFSETOF(backtrace_frame_struct, oprog),
                    tPrg(tObj), PIKE_T_PROGRAM, ID_PROTECTED|ID_PRIVATE);
#endif /* var_oprog_backtrace_frame_defined */

#ifdef var_args_backtrace_frame_defined
  PIKE_MAP_VARIABLE("args", backtrace_frame_storage_offset + OFFSETOF(backtrace_frame_struct, args),
                    tArray, PIKE_T_ARRAY, 0);
#endif /* var_args_backtrace_frame_defined */

#ifdef var_prog_backtrace_frame_defined
  PIKE_MAP_VARIABLE("prog", backtrace_frame_storage_offset + OFFSETOF(backtrace_frame_struct, prog),
                    tPrg(tObj), PIKE_T_PROGRAM, ID_PROTECTED|ID_PRIVATE);
#endif /* var_prog_backtrace_frame_defined */

#ifdef backtrace_frame_event_handler_defined
  pike_set_prog_event_callback(backtrace_frame_event_handler);

#ifndef backtrace_frame_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* backtrace_frame_gc_live_obj */

#endif /* backtrace_frame_event_handler_defined */

#ifdef f_backtrace_frame_cq__backtick_2D_3Efun_defined

#ifdef f_backtrace_frame_cq__backtick_2D_3Efun_fun_num_used
  f_backtrace_frame_cq__backtick_2D_3Efun_fun_num =
#endif /* f_backtrace_frame_cq__backtick_2D_3Efun_fun_num_used */
#line 2555 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`->fun", f_backtrace_frame_cq__backtick_2D_3Efun, tFunc(tNone,tMix), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_backtrace_frame_cq__backtick_2D_3Efun_defined */

#ifdef f_backtrace_frame_cq__backtick_2D_3Efun_eq_defined

#ifdef f_backtrace_frame_cq__backtick_2D_3Efun_eq_fun_num_used
  f_backtrace_frame_cq__backtick_2D_3Efun_eq_fun_num =
#endif /* f_backtrace_frame_cq__backtick_2D_3Efun_eq_fun_num_used */
#line 2560 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`->fun=", f_backtrace_frame_cq__backtick_2D_3Efun_eq, tFunc(tMix,tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_backtrace_frame_cq__backtick_2D_3Efun_eq_defined */

#ifdef f_backtrace_frame_cq__is_type_defined

#ifdef f_backtrace_frame_cq__is_type_fun_num_used
  f_backtrace_frame_cq__is_type_fun_num =
#endif /* f_backtrace_frame_cq__is_type_fun_num_used */
#line 2577 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_is_type", f_backtrace_frame_cq__is_type, tFunc(tStr,"\10\0\0\0\0\0\0\0\1"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_backtrace_frame_cq__is_type_defined */

#ifdef f_backtrace_frame_cq__sprintf_defined

#ifdef f_backtrace_frame_cq__sprintf_fun_num_used
  f_backtrace_frame_cq__sprintf_fun_num =
#endif /* f_backtrace_frame_cq__sprintf_fun_num_used */
#line 2623 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_sprintf", f_backtrace_frame_cq__sprintf, tFunc("\10\200\0\0\0\177\377\377\377" tOr(tMapping,tVoid),tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_backtrace_frame_cq__sprintf_defined */

#ifdef f_backtrace_frame_cq__sizeof_defined

#ifdef f_backtrace_frame_cq__sizeof_fun_num_used
  f_backtrace_frame_cq__sizeof_fun_num =
#endif /* f_backtrace_frame_cq__sizeof_fun_num_used */
#line 2689 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_sizeof", f_backtrace_frame_cq__sizeof, tFunc(tNone,"\10\0\0\0\3\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_backtrace_frame_cq__sizeof_defined */

#ifdef f_backtrace_frame_cq__backtick_5B_5D_defined

#ifdef f_backtrace_frame_cq__backtick_5B_5D_fun_num_used
  f_backtrace_frame_cq__backtick_5B_5D_fun_num =
#endif /* f_backtrace_frame_cq__backtick_5B_5D_fun_num_used */
#line 2701 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`[]", f_backtrace_frame_cq__backtick_5B_5D, tFunc("\10\200\0\0\0\177\377\377\377" tOr("\10\200\0\0\0\177\377\377\377",tVoid),tMix), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_backtrace_frame_cq__backtick_5B_5D_defined */

#ifdef f_backtrace_frame_cq__backtick_5B_5D_eq_defined

#ifdef f_backtrace_frame_cq__backtick_5B_5D_eq_fun_num_used
  f_backtrace_frame_cq__backtick_5B_5D_eq_fun_num =
#endif /* f_backtrace_frame_cq__backtick_5B_5D_eq_fun_num_used */
#line 2770 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`[]=", f_backtrace_frame_cq__backtick_5B_5D_eq, tFunc("\10\200\0\0\0\177\377\377\377" tMix,tMix), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_backtrace_frame_cq__backtick_5B_5D_eq_defined */
#line 2515 "/Users/hww3/devel/pike/src/builtin.cmod"
  backtrace_frame_program=end_program();
#line 2515 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef backtrace_frame_program_fun_num_used
backtrace_frame_program_fun_num=
#endif
 add_program_constant("backtrace_frame",backtrace_frame_program,0);

#endif /* class_backtrace_frame_defined */

#ifdef class_Buffer_defined

#ifdef PROG_BUFFER_ID
#line 3075 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(BUFFER);
#else
#line 3075 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_BUFFER_ID */
#line 3075 "/Users/hww3/devel/pike/src/builtin.cmod"
  Buffer_program = Pike_compiler->new_program;

#ifndef tObjImpl_BUFFER

#undef tObjIs_BUFFER
#define tObjIs_BUFFER "\3\1\177\0\0\6"

#undef tObjImpl_BUFFER
#define tObjImpl_BUFFER "\3\0\177\0\0\6"

#endif /* tObjImpl_BUFFER */

#ifdef THIS_BUFFER
  Buffer_storage_offset = ADD_STORAGE(struct Buffer_struct);
#endif /* THIS_BUFFER */

#ifdef Buffer_event_handler_defined
  pike_set_prog_event_callback(Buffer_event_handler);

#ifndef Buffer_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Buffer_gc_live_obj */

#endif /* Buffer_event_handler_defined */

#ifdef f_Buffer_cq__size_object_defined

#ifdef f_Buffer_cq__size_object_fun_num_used
  f_Buffer_cq__size_object_fun_num =
#endif /* f_Buffer_cq__size_object_fun_num_used */
#line 3080 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_size_object", f_Buffer_cq__size_object, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Buffer_cq__size_object_defined */

#ifdef f_Buffer_create_defined

#ifdef f_Buffer_create_fun_num_used
  f_Buffer_create_fun_num =
#endif /* f_Buffer_create_fun_num_used */
#line 3100 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("create", f_Buffer_create, tFunc(tOr("\10\200\0\0\0\177\377\377\377",tVoid),tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Buffer_create_defined */

#ifdef f_Buffer_cq__sprintf_defined

#ifdef f_Buffer_cq__sprintf_fun_num_used
  f_Buffer_cq__sprintf_fun_num =
#endif /* f_Buffer_cq__sprintf_fun_num_used */
#line 3113 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_sprintf", f_Buffer_cq__sprintf, tFunc("\10\200\0\0\0\177\377\377\377" tMapping,tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Buffer_cq__sprintf_defined */

#ifdef f_Buffer_cast_defined

#ifdef f_Buffer_cast_fun_num_used
  f_Buffer_cast_fun_num =
#endif /* f_Buffer_cast_fun_num_used */
#line 3160 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("cast", f_Buffer_cast, tFunc(tStr,tMix), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Buffer_cast_defined */

#ifdef f_Buffer_cq__backtick_add_defined

#ifdef f_Buffer_cq__backtick_add_fun_num_used
  f_Buffer_cq__backtick_add_fun_num =
#endif /* f_Buffer_cq__backtick_add_fun_num_used */
#line 3191 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`+", f_Buffer_cq__backtick_add, tFunc(tOr(tString, tObjIs_BUFFER), tObjIs_BUFFER), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Buffer_cq__backtick_add_defined */

#ifdef f_Buffer_cq__backtick_add_eq_defined

#ifdef f_Buffer_cq__backtick_add_eq_fun_num_used
  f_Buffer_cq__backtick_add_eq_fun_num =
#endif /* f_Buffer_cq__backtick_add_eq_fun_num_used */
#line 3208 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`+=", f_Buffer_cq__backtick_add_eq, tFunc(tOr(tString, tObjIs_BUFFER), tObjIs_BUFFER), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Buffer_cq__backtick_add_eq_defined */

#ifdef f_Buffer_add_defined

#ifdef f_Buffer_add_fun_num_used
  f_Buffer_add_fun_num =
#endif /* f_Buffer_add_fun_num_used */
#line 3226 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("add", f_Buffer_add, tFuncV(tNone, tOr(tString, tObjIs_BUFFER), tIntPos), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Buffer_add_defined */

#ifdef f_Buffer_putchar_defined

#ifdef f_Buffer_putchar_fun_num_used
  f_Buffer_putchar_fun_num =
#endif /* f_Buffer_putchar_fun_num_used */
#line 3285 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("putchar", f_Buffer_putchar, tFunc("\10\200\0\0\0\177\377\377\377",tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Buffer_putchar_defined */

#ifdef f_Buffer_sprintf_defined

#ifdef f_Buffer_sprintf_fun_num_used
  f_Buffer_sprintf_fun_num =
#endif /* f_Buffer_sprintf_fun_num_used */
#line 3296 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("sprintf", f_Buffer_sprintf, tFuncV(tAttr("strict_sprintf_format", tOr(tStr, tObj)),
tAttr("sprintf_args", tMix), tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Buffer_sprintf_defined */

#ifdef f_Buffer_get_copy_defined

#ifdef f_Buffer_get_copy_fun_num_used
  f_Buffer_get_copy_fun_num =
#endif /* f_Buffer_get_copy_fun_num_used */
#line 3317 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("get_copy", f_Buffer_get_copy, tFunc(tNone,tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Buffer_get_copy_defined */

#ifdef f_Buffer_get_defined

#ifdef f_Buffer_get_fun_num_used
  f_Buffer_get_fun_num =
#endif /* f_Buffer_get_fun_num_used */
#line 3354 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("get", f_Buffer_get, tFunc(tNone,tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Buffer_get_defined */

#ifdef f_Buffer_clear_defined

#ifdef f_Buffer_clear_fun_num_used
  f_Buffer_clear_fun_num =
#endif /* f_Buffer_clear_fun_num_used */
#line 3381 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("clear", f_Buffer_clear, tFunc(tNone,tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Buffer_clear_defined */

#ifdef f_Buffer_cq__sizeof_defined

#ifdef f_Buffer_cq__sizeof_fun_num_used
  f_Buffer_cq__sizeof_fun_num =
#endif /* f_Buffer_cq__sizeof_fun_num_used */
#line 3398 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_sizeof", f_Buffer_cq__sizeof, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Buffer_cq__sizeof_defined */
#line 3075 "/Users/hww3/devel/pike/src/builtin.cmod"
  Buffer_program=end_program();
#line 3075 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef Buffer_program_fun_num_used
Buffer_program_fun_num=
#endif
 add_program_constant("Buffer",Buffer_program,0);

#endif /* class_Buffer_defined */

#ifdef class_multi_string_replace_defined

#ifdef PROG_MULTI_STRING_REPLACE_ID
#line 3442 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(MULTI_STRING_REPLACE);
#else
#line 3442 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_MULTI_STRING_REPLACE_ID */
#line 3442 "/Users/hww3/devel/pike/src/builtin.cmod"
  multi_string_replace_program = Pike_compiler->new_program;

#ifndef tObjImpl_MULTI_STRING_REPLACE

#undef tObjIs_MULTI_STRING_REPLACE
#define tObjIs_MULTI_STRING_REPLACE "\3\1\177\0\0\a"

#undef tObjImpl_MULTI_STRING_REPLACE
#define tObjImpl_MULTI_STRING_REPLACE "\3\0\177\0\0\a"

#endif /* tObjImpl_MULTI_STRING_REPLACE */

#ifdef THIS_MULTI_STRING_REPLACE
  multi_string_replace_storage_offset = ADD_STORAGE(struct multi_string_replace_struct);
#endif /* THIS_MULTI_STRING_REPLACE */

#ifdef var_from_multi_string_replace_defined
  PIKE_MAP_VARIABLE("from", multi_string_replace_storage_offset + OFFSETOF(multi_string_replace_struct, from),
                    tArray, PIKE_T_ARRAY, ID_PROTECTED);
#endif /* var_from_multi_string_replace_defined */

#ifdef var_to_multi_string_replace_defined
  PIKE_MAP_VARIABLE("to", multi_string_replace_storage_offset + OFFSETOF(multi_string_replace_struct, to),
                    tArray, PIKE_T_ARRAY, ID_PROTECTED);
#endif /* var_to_multi_string_replace_defined */

#ifdef multi_string_replace_event_handler_defined
  pike_set_prog_event_callback(multi_string_replace_event_handler);

#ifndef multi_string_replace_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* multi_string_replace_gc_live_obj */

#endif /* multi_string_replace_event_handler_defined */

#ifdef f_multi_string_replace_cq__size_object_defined

#ifdef f_multi_string_replace_cq__size_object_fun_num_used
  f_multi_string_replace_cq__size_object_fun_num =
#endif /* f_multi_string_replace_cq__size_object_fun_num_used */
#line 3449 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_size_object", f_multi_string_replace_cq__size_object, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_multi_string_replace_cq__size_object_defined */

#ifdef f_multi_string_replace_create_defined

#ifdef f_multi_string_replace_create_fun_num_used
  f_multi_string_replace_create_fun_num =
#endif /* f_multi_string_replace_create_fun_num_used */
#line 3472 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("create", f_multi_string_replace_create, tFunc(tOr3(tArr(tStr),tMap(tStr,tStr),tVoid) tOr3(tArr(tStr),tStr,tVoid),tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_multi_string_replace_create_defined */

#ifdef f_multi_string_replace_cq__backtick_28_29_defined

#ifdef f_multi_string_replace_cq__backtick_28_29_fun_num_used
  f_multi_string_replace_cq__backtick_28_29_fun_num =
#endif /* f_multi_string_replace_cq__backtick_28_29_fun_num_used */
#line 3554 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`()", f_multi_string_replace_cq__backtick_28_29, tFunc(tStr,tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_multi_string_replace_cq__backtick_28_29_defined */

#ifdef f_multi_string_replace_cq__encode_defined

#ifdef f_multi_string_replace_cq__encode_fun_num_used
  f_multi_string_replace_cq__encode_fun_num =
#endif /* f_multi_string_replace_cq__encode_fun_num_used */
#line 3566 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_encode", f_multi_string_replace_cq__encode, tFunc(tNone,tArr(tArr(tStr))), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_multi_string_replace_cq__encode_defined */

#ifdef f_multi_string_replace_cq__decode_defined

#ifdef f_multi_string_replace_cq__decode_fun_num_used
  f_multi_string_replace_cq__decode_fun_num =
#endif /* f_multi_string_replace_cq__decode_fun_num_used */
#line 3583 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_decode", f_multi_string_replace_cq__decode, tFunc(tArr(tArr(tStr)),tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_multi_string_replace_cq__decode_defined */
#line 3442 "/Users/hww3/devel/pike/src/builtin.cmod"
  multi_string_replace_program=end_program();
#line 3442 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef multi_string_replace_program_fun_num_used
multi_string_replace_program_fun_num=
#endif
 add_program_constant("multi_string_replace",multi_string_replace_program,0);

#endif /* class_multi_string_replace_defined */

#ifdef class_single_string_replace_defined

#ifdef PROG_SINGLE_STRING_REPLACE_ID
#line 3620 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(SINGLE_STRING_REPLACE);
#else
#line 3620 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_SINGLE_STRING_REPLACE_ID */
#line 3620 "/Users/hww3/devel/pike/src/builtin.cmod"
  single_string_replace_program = Pike_compiler->new_program;

#ifndef tObjImpl_SINGLE_STRING_REPLACE

#undef tObjIs_SINGLE_STRING_REPLACE
#define tObjIs_SINGLE_STRING_REPLACE "\3\1\177\0\0\b"

#undef tObjImpl_SINGLE_STRING_REPLACE
#define tObjImpl_SINGLE_STRING_REPLACE "\3\0\177\0\0\b"

#endif /* tObjImpl_SINGLE_STRING_REPLACE */

#ifdef THIS_SINGLE_STRING_REPLACE
  single_string_replace_storage_offset = ADD_STORAGE(struct single_string_replace_struct);
#endif /* THIS_SINGLE_STRING_REPLACE */

#ifdef var_del_single_string_replace_defined
  PIKE_MAP_VARIABLE("del", single_string_replace_storage_offset + OFFSETOF(single_string_replace_struct, del),
                    tStr, PIKE_T_STRING, ID_PROTECTED|ID_PRIVATE);
#endif /* var_del_single_string_replace_defined */

#ifdef var_to_single_string_replace_defined
  PIKE_MAP_VARIABLE("to", single_string_replace_storage_offset + OFFSETOF(single_string_replace_struct, to),
                    tStr, PIKE_T_STRING, ID_PROTECTED|ID_PRIVATE);
#endif /* var_to_single_string_replace_defined */

#ifdef extra_single_string_replace_defined
#line 3627 "/Users/hww3/devel/pike/src/builtin.cmod"
{
MAP_VARIABLE ("o", tObj, ID_PROTECTED|ID_PRIVATE,
single_string_replace_storage_offset +
OFFSETOF (single_string_replace_struct, mojt.container),
T_OBJECT);
}


#endif /* extra_single_string_replace_defined */

#ifdef f_single_string_replace_create_defined

#ifdef f_single_string_replace_create_fun_num_used
  f_single_string_replace_create_fun_num =
#endif /* f_single_string_replace_create_fun_num_used */
#line 3639 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("create", f_single_string_replace_create, tFunc(tOr(tStr,tVoid) tOr(tStr,tVoid),tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_single_string_replace_create_defined */

#ifdef f_single_string_replace_cq__backtick_28_29_defined

#ifdef f_single_string_replace_cq__backtick_28_29_fun_num_used
  f_single_string_replace_cq__backtick_28_29_fun_num =
#endif /* f_single_string_replace_cq__backtick_28_29_fun_num_used */
#line 3674 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`()", f_single_string_replace_cq__backtick_28_29, tFunc(tStr,tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_single_string_replace_cq__backtick_28_29_defined */

#ifdef f_single_string_replace_cq__encode_defined

#ifdef f_single_string_replace_cq__encode_fun_num_used
  f_single_string_replace_cq__encode_fun_num =
#endif /* f_single_string_replace_cq__encode_fun_num_used */
#line 3762 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_encode", f_single_string_replace_cq__encode, tFunc(tNone,tArr(tStr)), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_single_string_replace_cq__encode_defined */

#ifdef f_single_string_replace_cq__decode_defined

#ifdef f_single_string_replace_cq__decode_fun_num_used
  f_single_string_replace_cq__decode_fun_num =
#endif /* f_single_string_replace_cq__decode_fun_num_used */
#line 3775 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_decode", f_single_string_replace_cq__decode, tFunc(tOr(tArr(tStr),"\10\0\0\0\0\0\0\0\0"),tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_single_string_replace_cq__decode_defined */
#line 3620 "/Users/hww3/devel/pike/src/builtin.cmod"
  single_string_replace_program=end_program();
#line 3620 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef single_string_replace_program_fun_num_used
single_string_replace_program_fun_num=
#endif
 add_program_constant("single_string_replace",single_string_replace_program,0);

#endif /* class_single_string_replace_defined */

#ifdef class_bootstring_defined

#ifdef PROG_BOOTSTRING_ID
#line 3800 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(BOOTSTRING);
#else
#line 3800 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_BOOTSTRING_ID */
#line 3800 "/Users/hww3/devel/pike/src/builtin.cmod"
  bootstring_program = Pike_compiler->new_program;

#ifndef tObjImpl_BOOTSTRING

#undef tObjIs_BOOTSTRING
#define tObjIs_BOOTSTRING "\3\1\177\0\0\t"

#undef tObjImpl_BOOTSTRING
#define tObjImpl_BOOTSTRING "\3\0\177\0\0\t"

#endif /* tObjImpl_BOOTSTRING */

#ifdef THIS_BOOTSTRING
  bootstring_storage_offset = ADD_STORAGE(struct bootstring_struct);
#endif /* THIS_BOOTSTRING */

#ifdef var_digits_bootstring_defined
  PIKE_MAP_VARIABLE("digits", bootstring_storage_offset + OFFSETOF(bootstring_struct, digits),
                    tStr, PIKE_T_STRING, ID_PROTECTED|ID_PRIVATE);
#endif /* var_digits_bootstring_defined */

#ifdef f_bootstring_decode_defined

#ifdef f_bootstring_decode_fun_num_used
  f_bootstring_decode_fun_num =
#endif /* f_bootstring_decode_fun_num_used */
#line 3843 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("decode", f_bootstring_decode, tFunc(tStr,tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_bootstring_decode_defined */

#ifdef f_bootstring_encode_defined

#ifdef f_bootstring_encode_fun_num_used
  f_bootstring_encode_fun_num =
#endif /* f_bootstring_encode_fun_num_used */
#line 3935 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("encode", f_bootstring_encode, tFunc(tStr,tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_bootstring_encode_defined */

#ifdef f_bootstring_create_defined

#ifdef f_bootstring_create_fun_num_used
  f_bootstring_create_fun_num =
#endif /* f_bootstring_create_fun_num_used */
#line 4026 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("create", f_bootstring_create, tFunc("\10\200\0\0\0\177\377\377\377" "\10\200\0\0\0\177\377\377\377" "\10\200\0\0\0\177\377\377\377" "\10\200\0\0\0\177\377\377\377" "\10\200\0\0\0\177\377\377\377" "\10\200\0\0\0\177\377\377\377" "\10\200\0\0\0\177\377\377\377" "\10\200\0\0\0\177\377\377\377" tStr,tVoid), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_bootstring_create_defined */
#line 3800 "/Users/hww3/devel/pike/src/builtin.cmod"
  bootstring_program=end_program();
#line 3800 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef bootstring_program_fun_num_used
bootstring_program_fun_num=
#endif
 add_program_constant("bootstring",bootstring_program,0);

#endif /* class_bootstring_defined */

#ifdef class_Time_defined

#ifdef PROG_TIME_ID
#line 4072 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(TIME);
#else
#line 4072 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_TIME_ID */
#line 4072 "/Users/hww3/devel/pike/src/builtin.cmod"
  Time_program = Pike_compiler->new_program;

#ifndef tObjImpl_TIME

#undef tObjIs_TIME
#define tObjIs_TIME "\3\1\177\0\0\n"

#undef tObjImpl_TIME
#define tObjImpl_TIME "\3\0\177\0\0\n"

#endif /* tObjImpl_TIME */

#ifdef THIS_TIME
  Time_storage_offset = ADD_STORAGE(struct Time_struct);
#endif /* THIS_TIME */

#ifdef f_Time_cq__backticksec_defined

#ifdef f_Time_cq__backticksec_fun_num_used
  f_Time_cq__backticksec_fun_num =
#endif /* f_Time_cq__backticksec_fun_num_used */
#line 4088 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`sec", f_Time_cq__backticksec, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Time_cq__backticksec_defined */

#ifdef f_Time_cq__backtickusec_defined

#ifdef f_Time_cq__backtickusec_fun_num_used
  f_Time_cq__backtickusec_fun_num =
#endif /* f_Time_cq__backtickusec_fun_num_used */
#line 4100 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`usec", f_Time_cq__backtickusec, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Time_cq__backtickusec_defined */

#ifdef f_Time_cq__backtickusec_full_defined

#ifdef f_Time_cq__backtickusec_full_fun_num_used
  f_Time_cq__backtickusec_full_fun_num =
#endif /* f_Time_cq__backtickusec_full_fun_num_used */
#line 4119 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`usec_full", f_Time_cq__backtickusec_full, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Time_cq__backtickusec_full_defined */

#ifdef f_Time_create_defined

#ifdef f_Time_create_fun_num_used
  f_Time_create_fun_num =
#endif /* f_Time_create_fun_num_used */
#line 4144 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("create", f_Time_create, tFunc(tOr("\10\200\0\0\0\177\377\377\377",tVoid),tVoid), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Time_create_defined */
#line 4072 "/Users/hww3/devel/pike/src/builtin.cmod"
  Time_program=end_program();
#line 4072 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef Time_program_fun_num_used
Time_program_fun_num=
#endif
 add_program_constant("Time",Time_program,0);

#endif /* class_Time_defined */

#ifdef class_Timer_defined

#ifdef PROG_TIMER_ID
#line 4156 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(TIMER);
#else
#line 4156 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_TIMER_ID */
#line 4156 "/Users/hww3/devel/pike/src/builtin.cmod"
  Timer_program = Pike_compiler->new_program;

#ifndef tObjImpl_TIMER

#undef tObjIs_TIMER
#define tObjIs_TIMER "\3\1\177\0\0\v"

#undef tObjImpl_TIMER
#define tObjImpl_TIMER "\3\0\177\0\0\v"

#endif /* tObjImpl_TIMER */

#ifdef THIS_TIMER
  Timer_storage_offset = ADD_STORAGE(struct Timer_struct);
#endif /* THIS_TIMER */

#ifdef f_Timer_peek_defined

#ifdef f_Timer_peek_fun_num_used
  f_Timer_peek_fun_num =
#endif /* f_Timer_peek_fun_num_used */
#line 4164 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("peek", f_Timer_peek, tFunc(tNone,tFloat), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Timer_peek_defined */

#ifdef f_Timer_get_defined

#ifdef f_Timer_get_fun_num_used
  f_Timer_get_fun_num =
#endif /* f_Timer_get_fun_num_used */
#line 4182 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("get", f_Timer_get, tFunc(tNone,tFloat), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Timer_get_defined */

#ifdef f_Timer_create_defined

#ifdef f_Timer_create_fun_num_used
  f_Timer_create_fun_num =
#endif /* f_Timer_create_fun_num_used */
#line 4199 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("create", f_Timer_create, tFunc(tOr("\10\200\0\0\0\177\377\377\377",tVoid),tVoid), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Timer_create_defined */
#line 4156 "/Users/hww3/devel/pike/src/builtin.cmod"
  Timer_program=end_program();
#line 4156 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef Timer_program_fun_num_used
Timer_program_fun_num=
#endif
 add_program_constant("Timer",Timer_program,0);

#endif /* class_Timer_defined */

#ifdef class_automap_marker_defined

#ifdef PROG_AUTOMAP_MARKER_ID
#line 4232 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(AUTOMAP_MARKER);
#else
#line 4232 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_AUTOMAP_MARKER_ID */
#line 4232 "/Users/hww3/devel/pike/src/builtin.cmod"
  automap_marker_program = Pike_compiler->new_program;

#ifndef tObjImpl_AUTOMAP_MARKER

#undef tObjIs_AUTOMAP_MARKER
#define tObjIs_AUTOMAP_MARKER "\3\1\177\0\0\f"

#undef tObjImpl_AUTOMAP_MARKER
#define tObjImpl_AUTOMAP_MARKER "\3\0\177\0\0\f"

#endif /* tObjImpl_AUTOMAP_MARKER */

#ifdef THIS_AUTOMAP_MARKER
  automap_marker_storage_offset = ADD_STORAGE(struct automap_marker_struct);
#endif /* THIS_AUTOMAP_MARKER */

#ifdef var_arg_automap_marker_defined
  PIKE_MAP_VARIABLE("arg", automap_marker_storage_offset + OFFSETOF(automap_marker_struct, arg),
                    tArray, PIKE_T_ARRAY, 0);
#endif /* var_arg_automap_marker_defined */

#ifdef var_depth_automap_marker_defined
  PIKE_MAP_VARIABLE("depth", automap_marker_storage_offset + OFFSETOF(automap_marker_struct, depth),
                    "\10\200\0\0\0\177\377\377\377", PIKE_T_INT, 0);
#endif /* var_depth_automap_marker_defined */

#ifdef f_automap_marker_create_defined

#ifdef f_automap_marker_create_fun_num_used
  f_automap_marker_create_fun_num =
#endif /* f_automap_marker_create_fun_num_used */
#line 4245 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("create", f_automap_marker_create, tFunc(tArray "\10\200\0\0\0\177\377\377\377",tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_automap_marker_create_defined */

#ifdef f_automap_marker_cq__sprintf_defined

#ifdef f_automap_marker_cq__sprintf_fun_num_used
  f_automap_marker_cq__sprintf_fun_num =
#endif /* f_automap_marker_cq__sprintf_fun_num_used */
#line 4252 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_sprintf", f_automap_marker_cq__sprintf, tFunc("\10\200\0\0\0\177\377\377\377" tMapping,tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_automap_marker_cq__sprintf_defined */
#line 4232 "/Users/hww3/devel/pike/src/builtin.cmod"
  automap_marker_program=end_program();
#line 4232 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef automap_marker_program_fun_num_used
automap_marker_program_fun_num=
#endif
 add_program_constant("automap_marker",automap_marker_program,0);

#endif /* class_automap_marker_defined */

#ifdef class_Setter_defined

#ifdef PROG_SETTER_ID
#line 4408 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(SETTER);
#else
#line 4408 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_SETTER_ID */
#line 4408 "/Users/hww3/devel/pike/src/builtin.cmod"
  Setter_program = Pike_compiler->new_program;

#ifndef tObjImpl_SETTER

#undef tObjIs_SETTER
#define tObjIs_SETTER "\3\1\177\0\0\r"

#undef tObjImpl_SETTER
#define tObjImpl_SETTER "\3\0\177\0\0\r"

#endif /* tObjImpl_SETTER */

#ifdef THIS_SETTER
  Setter_storage_offset = ADD_STORAGE(struct Setter_struct);
#endif /* THIS_SETTER */

#ifdef var_o_Setter_defined
  PIKE_MAP_VARIABLE("o", Setter_storage_offset + OFFSETOF(Setter_struct, o),
                    tObj, PIKE_T_OBJECT, ID_PROTECTED|ID_PRIVATE|ID_LOCAL);
#endif /* var_o_Setter_defined */

#ifdef f_Setter_cq__backtick_28_29_defined

#ifdef f_Setter_cq__backtick_28_29_fun_num_used
  f_Setter_cq__backtick_28_29_fun_num =
#endif /* f_Setter_cq__backtick_28_29_fun_num_used */
#line 4420 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`()", f_Setter_cq__backtick_28_29, tFunc(tMix,tVoid), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Setter_cq__backtick_28_29_defined */

#ifdef f_Setter_cq__sprintf_defined

#ifdef f_Setter_cq__sprintf_fun_num_used
  f_Setter_cq__sprintf_fun_num =
#endif /* f_Setter_cq__sprintf_fun_num_used */
#line 4430 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_sprintf", f_Setter_cq__sprintf, tFunc("\10\200\0\0\0\177\377\377\377" tOr(tMapping,tVoid),tStr), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Setter_cq__sprintf_defined */
#line 4408 "/Users/hww3/devel/pike/src/builtin.cmod"
  Setter_program=end_program();
#line 4408 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef Setter_program_fun_num_used
Setter_program_fun_num=
#endif
 add_program_constant("Setter",Setter_program,0);

#endif /* class_Setter_defined */

#ifdef class_Null_defined

#ifdef PROG_NULL_ID
#line 4509 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(NULL);
#else
#line 4509 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_NULL_ID */
#line 4509 "/Users/hww3/devel/pike/src/builtin.cmod"
  Null_program = Pike_compiler->new_program;

#ifndef tObjImpl_NULL

#undef tObjIs_NULL
#define tObjIs_NULL "\3\1\177\0\0\16"

#undef tObjImpl_NULL
#define tObjImpl_NULL "\3\0\177\0\0\16"

#endif /* tObjImpl_NULL */

#ifdef extra_Null_defined
#line 4511 "/Users/hww3/devel/pike/src/builtin.cmod"
{
/*! @decl constant is_val_null = 1
     *!
     *! Nonzero recognition constant.
     */
add_integer_constant("is_val_null", 1, 0);

/*! @decl constant is_sql_null = 1
     *!
     *! SQL Null marker.
     *!
     *! @deprecated is_val_null
     */
add_integer_constant("is_sql_null", 1, 0);
}


#endif /* extra_Null_defined */

#ifdef f_Null_cq__backtick_21_defined

#ifdef f_Null_cq__backtick_21_fun_num_used
  f_Null_cq__backtick_21_fun_num =
#endif /* f_Null_cq__backtick_21_fun_num_used */
#line 4527 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`!", f_Null_cq__backtick_21, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Null_cq__backtick_21_defined */

#ifdef f_Null_cq__sprintf_defined

#ifdef f_Null_cq__sprintf_fun_num_used
  f_Null_cq__sprintf_fun_num =
#endif /* f_Null_cq__sprintf_fun_num_used */
#line 4533 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_sprintf", f_Null_cq__sprintf, tFuncV("\10\200\0\0\0\177\377\377\377",tMix,tStr), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Null_cq__sprintf_defined */

#ifdef f_Null_cq___hash_defined

#ifdef f_Null_cq___hash_fun_num_used
  f_Null_cq___hash_fun_num =
#endif /* f_Null_cq___hash_fun_num_used */
#line 4544 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("__hash", f_Null_cq___hash, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Null_cq___hash_defined */

#ifdef f_Null_cq__backtick_eq_eq_defined

#ifdef f_Null_cq__backtick_eq_eq_fun_num_used
  f_Null_cq__backtick_eq_eq_fun_num =
#endif /* f_Null_cq__backtick_eq_eq_fun_num_used */
#line 4551 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`==", f_Null_cq__backtick_eq_eq, tFunc(tMix,"\10\200\0\0\0\177\377\377\377"), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Null_cq__backtick_eq_eq_defined */

#ifdef f_Null_encode_json_defined

#ifdef f_Null_encode_json_fun_num_used
  f_Null_encode_json_fun_num =
#endif /* f_Null_encode_json_fun_num_used */
#line 4583 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("encode_json", f_Null_encode_json, tFunc(tNone,tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Null_encode_json_defined */
#line 4509 "/Users/hww3/devel/pike/src/builtin.cmod"
  Null_program=end_program();
#line 4509 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef Null_program_fun_num_used
Null_program_fun_num=
#endif
 add_program_constant("Null",Null_program,0);

#endif /* class_Null_defined */

#ifdef class_Serializable_defined

#ifdef PROG_SERIALIZABLE_ID
#line 4647 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(SERIALIZABLE);
#else
#line 4647 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_SERIALIZABLE_ID */
#line 4647 "/Users/hww3/devel/pike/src/builtin.cmod"
  Serializable_program = Pike_compiler->new_program;

#ifndef tObjImpl_SERIALIZABLE

#undef tObjIs_SERIALIZABLE
#define tObjIs_SERIALIZABLE "\3\1\177\0\0\17"

#undef tObjImpl_SERIALIZABLE
#define tObjImpl_SERIALIZABLE "\3\0\177\0\0\17"

#endif /* tObjImpl_SERIALIZABLE */

#ifdef f_Serializable_cq__serialize_variable_defined

#ifdef f_Serializable_cq__serialize_variable_fun_num_used
  f_Serializable_cq__serialize_variable_fun_num =
#endif /* f_Serializable_cq__serialize_variable_fun_num_used */
#line 4724 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_serialize_variable", f_Serializable_cq__serialize_variable, tFunc(tFunc(tMix tStr tType(tMix), tVoid)
tMix tStr tType(tMix), tVoid), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Serializable_cq__serialize_variable_defined */

#ifdef f_Serializable_cq__serialize_defined

#ifdef f_Serializable_cq__serialize_fun_num_used
  f_Serializable_cq__serialize_fun_num =
#endif /* f_Serializable_cq__serialize_fun_num_used */
#line 4771 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_serialize", f_Serializable_cq__serialize, tFunc(tObj tFunc(tMix tStr tType(tMix), tVoid), tVoid), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Serializable_cq__serialize_defined */

#ifdef f_Serializable_cq__deserialize_variable_defined

#ifdef f_Serializable_cq__deserialize_variable_fun_num_used
  f_Serializable_cq__deserialize_variable_fun_num =
#endif /* f_Serializable_cq__deserialize_variable_fun_num_used */
#line 4855 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_deserialize_variable", f_Serializable_cq__deserialize_variable, tFunc(tFunc(tFunc(tMix, tVoid) tStr tType(tMix), tVoid)
tFunc(tMix, tVoid) tStr tType(tMix), tVoid), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Serializable_cq__deserialize_variable_defined */

#ifdef f_Serializable_cq__deserialize_defined

#ifdef f_Serializable_cq__deserialize_fun_num_used
  f_Serializable_cq__deserialize_fun_num =
#endif /* f_Serializable_cq__deserialize_fun_num_used */
#line 4917 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_deserialize", f_Serializable_cq__deserialize, tFunc(tObj tFunc(tFunc(tMix, tVoid) tStr tType(tMix), tVoid), tVoid), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Serializable_cq__deserialize_defined */
#line 4647 "/Users/hww3/devel/pike/src/builtin.cmod"
  Serializable_program=end_program();
#line 4647 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef Serializable_program_fun_num_used
Serializable_program_fun_num=
#endif
 add_program_constant("Serializable",Serializable_program,0);

#endif /* class_Serializable_defined */

#ifdef class_List_defined

#ifdef PROG_LIST_ID
#line 5149 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(LIST);
#else
#line 5149 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_LIST_ID */
#line 5149 "/Users/hww3/devel/pike/src/builtin.cmod"
  List_program = Pike_compiler->new_program;

#ifndef tObjImpl_LIST

#undef tObjIs_LIST
#define tObjIs_LIST "\3\1\177\0\0\20"

#undef tObjImpl_LIST
#define tObjImpl_LIST "\3\0\177\0\0\20"

#endif /* tObjImpl_LIST */

#ifdef THIS_LIST
  List_storage_offset = ADD_STORAGE(struct List_struct);
#endif /* THIS_LIST */

#ifdef class_List_cq__get_iterator_defined

#ifdef PROG_LIST_CQ__GET_ITERATOR_ID
#line 5548 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(LIST_CQ__GET_ITERATOR);
#else
#line 5548 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_LIST_CQ__GET_ITERATOR_ID */
#line 5548 "/Users/hww3/devel/pike/src/builtin.cmod"
  List_cq__get_iterator_program = Pike_compiler->new_program;

#ifndef tObjImpl_LIST_CQ__GET_ITERATOR

#undef tObjIs_LIST_CQ__GET_ITERATOR
#define tObjIs_LIST_CQ__GET_ITERATOR "\3\1\177\0\0\21"

#undef tObjImpl_LIST_CQ__GET_ITERATOR
#define tObjImpl_LIST_CQ__GET_ITERATOR "\3\0\177\0\0\21"

#endif /* tObjImpl_LIST_CQ__GET_ITERATOR */

#ifdef THIS_LIST_CQ__GET_ITERATOR
  List_cq__get_iterator_storage_offset = ADD_STORAGE(struct List_cq__get_iterator_struct);
#endif /* THIS_LIST_CQ__GET_ITERATOR */

#ifdef List_cq__get_iterator_event_handler_defined
  pike_set_prog_event_callback(List_cq__get_iterator_event_handler);

#ifndef List_cq__get_iterator_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* List_cq__get_iterator_gc_live_obj */

#endif /* List_cq__get_iterator_event_handler_defined */

#ifdef f_List_cq__get_iterator_cq__backtick_21_defined

#ifdef f_List_cq__get_iterator_cq__backtick_21_fun_num_used
  f_List_cq__get_iterator_cq__backtick_21_fun_num =
#endif /* f_List_cq__get_iterator_cq__backtick_21_fun_num_used */
#line 5696 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`!", f_List_cq__get_iterator_cq__backtick_21, tFunc(tNone,"\10\0\0\0\0\0\0\0\1"), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__get_iterator_cq__backtick_21_defined */

#ifdef f_List_cq__get_iterator_index_defined

#ifdef f_List_cq__get_iterator_index_fun_num_used
  f_List_cq__get_iterator_index_fun_num =
#endif /* f_List_cq__get_iterator_index_fun_num_used */
#line 5703 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("index", f_List_cq__get_iterator_index, tFunc(tNone,"\10\0\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__get_iterator_index_defined */

#ifdef f_List_cq__get_iterator_value_defined

#ifdef f_List_cq__get_iterator_value_fun_num_used
  f_List_cq__get_iterator_value_fun_num =
#endif /* f_List_cq__get_iterator_value_fun_num_used */
#line 5718 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("value", f_List_cq__get_iterator_value, tFunc(tNone,tMix), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__get_iterator_value_defined */

#ifdef f_List_cq__get_iterator_first_defined

#ifdef f_List_cq__get_iterator_first_fun_num_used
  f_List_cq__get_iterator_first_fun_num =
#endif /* f_List_cq__get_iterator_first_fun_num_used */
#line 5737 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("first", f_List_cq__get_iterator_first, tFunc(tNone,"\10\0\0\0\0\0\0\0\1"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__get_iterator_first_defined */

#ifdef f_List_cq__get_iterator_next_defined

#ifdef f_List_cq__get_iterator_next_fun_num_used
  f_List_cq__get_iterator_next_fun_num =
#endif /* f_List_cq__get_iterator_next_fun_num_used */
#line 5772 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("next", f_List_cq__get_iterator_next, tFunc(tNone,"\10\0\0\0\0\0\0\0\1"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__get_iterator_next_defined */

#ifdef f_List_cq__get_iterator_prev_defined

#ifdef f_List_cq__get_iterator_prev_fun_num_used
  f_List_cq__get_iterator_prev_fun_num =
#endif /* f_List_cq__get_iterator_prev_fun_num_used */
#line 5800 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("prev", f_List_cq__get_iterator_prev, tFunc(tNone,"\10\0\0\0\0\0\0\0\1"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__get_iterator_prev_defined */

#ifdef f_List_cq__get_iterator_cq__backtick_add_eq_defined

#ifdef f_List_cq__get_iterator_cq__backtick_add_eq_fun_num_used
  f_List_cq__get_iterator_cq__backtick_add_eq_fun_num =
#endif /* f_List_cq__get_iterator_cq__backtick_add_eq_fun_num_used */
#line 5824 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`+=", f_List_cq__get_iterator_cq__backtick_add_eq, tFunc("\10\200\0\0\0\177\377\377\377",tName("Iterator", tObjImpl_ITERATOR)), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__get_iterator_cq__backtick_add_eq_defined */

#ifdef f_List_cq__get_iterator_insert_defined

#ifdef f_List_cq__get_iterator_insert_fun_num_used
  f_List_cq__get_iterator_insert_fun_num =
#endif /* f_List_cq__get_iterator_insert_fun_num_used */
#line 5849 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("insert", f_List_cq__get_iterator_insert, tFunc(tMix,tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__get_iterator_insert_defined */

#ifdef f_List_cq__get_iterator_append_defined

#ifdef f_List_cq__get_iterator_append_fun_num_used
  f_List_cq__get_iterator_append_fun_num =
#endif /* f_List_cq__get_iterator_append_fun_num_used */
#line 5872 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("append", f_List_cq__get_iterator_append, tFunc(tMix,tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__get_iterator_append_defined */

#ifdef f_List_cq__get_iterator_delete_defined

#ifdef f_List_cq__get_iterator_delete_fun_num_used
  f_List_cq__get_iterator_delete_fun_num =
#endif /* f_List_cq__get_iterator_delete_fun_num_used */
#line 5898 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("delete", f_List_cq__get_iterator_delete, tFunc(tNone,tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__get_iterator_delete_defined */

#ifdef f_List_cq__get_iterator_set_defined

#ifdef f_List_cq__get_iterator_set_fun_num_used
  f_List_cq__get_iterator_set_fun_num =
#endif /* f_List_cq__get_iterator_set_fun_num_used */
#line 5927 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("set", f_List_cq__get_iterator_set, tFunc(tMix,tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__get_iterator_set_defined */
#line 5549 "/Users/hww3/devel/pike/src/builtin.cmod"
  Pike_compiler->new_program->flags |= PROGRAM_USES_PARENT;
#line 5548 "/Users/hww3/devel/pike/src/builtin.cmod"
  List_cq__get_iterator_program=end_program();
#line 5548 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef List_cq__get_iterator_program_fun_num_used
List_cq__get_iterator_program_fun_num=
#endif
 add_program_constant("_get_iterator",List_cq__get_iterator_program,ID_PROTECTED);

#endif /* class_List_cq__get_iterator_defined */

#ifdef List_event_handler_defined
  pike_set_prog_event_callback(List_event_handler);

#ifndef List_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* List_gc_live_obj */

#endif /* List_event_handler_defined */

#ifdef f_List_cq__size_object_defined

#ifdef f_List_cq__size_object_fun_num_used
  f_List_cq__size_object_fun_num =
#endif /* f_List_cq__size_object_fun_num_used */
#line 5187 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_size_object", f_List_cq__size_object, tFunc(tNone,"\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__size_object_defined */

#ifdef f_List_is_empty_defined

#ifdef f_List_is_empty_fun_num_used
  f_List_is_empty_fun_num =
#endif /* f_List_is_empty_fun_num_used */
#line 5260 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("is_empty", f_List_is_empty, tFunc(tNone,"\10\0\0\0\0\0\0\0\1"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_is_empty_defined */

#ifdef f_List_cq__sizeof_defined

#ifdef f_List_cq__sizeof_fun_num_used
  f_List_cq__sizeof_fun_num =
#endif /* f_List_cq__sizeof_fun_num_used */
    ADD_FUNCTION2("_sizeof", f_List_cq__sizeof, tFunc(tNone,"\10\0\0\0\0\177\377\377\377"), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__sizeof_defined */

#ifdef f_List_cq__sprintf_defined

#ifdef f_List_cq__sprintf_fun_num_used
  f_List_cq__sprintf_fun_num =
#endif /* f_List_cq__sprintf_fun_num_used */
#line 5282 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_sprintf", f_List_cq__sprintf, tFunc("\10\200\0\0\0\177\377\377\377" tOr(tMap(tStr,tMix),tVoid),tStr), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__sprintf_defined */

#ifdef f_List_head_defined

#ifdef f_List_head_fun_num_used
  f_List_head_fun_num =
#endif /* f_List_head_fun_num_used */
#line 5330 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("head", f_List_head, tFunc(tNone,tMix), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_head_defined */

#ifdef f_List_tail_defined

#ifdef f_List_tail_fun_num_used
  f_List_tail_fun_num =
#endif /* f_List_tail_fun_num_used */
#line 5349 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("tail", f_List_tail, tFunc(tNone,tMix), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_tail_defined */

#ifdef f_List_pop_defined

#ifdef f_List_pop_fun_num_used
  f_List_pop_fun_num =
#endif /* f_List_pop_fun_num_used */
#line 5379 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("pop", f_List_pop, tFunc(tNone,tMix), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_pop_defined */

#ifdef f_List_pop_back_defined

#ifdef f_List_pop_back_fun_num_used
  f_List_pop_back_fun_num =
#endif /* f_List_pop_back_fun_num_used */
#line 5398 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("pop_back", f_List_pop_back, tFunc(tNone,tMix), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_pop_back_defined */

#ifdef f_List_cq__values_defined

#ifdef f_List_cq__values_fun_num_used
  f_List_cq__values_fun_num =
#endif /* f_List_cq__values_fun_num_used */
#line 5412 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_values", f_List_cq__values, tFunc(tNone,tArray), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__values_defined */

#ifdef f_List_cast_defined

#ifdef f_List_cast_fun_num_used
  f_List_cast_fun_num =
#endif /* f_List_cast_fun_num_used */
#line 5435 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("cast", f_List_cast, tFunc(tStr,tArray), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cast_defined */

#ifdef f_List_cq__backtick_5B_5D_defined

#ifdef f_List_cq__backtick_5B_5D_fun_num_used
  f_List_cq__backtick_5B_5D_fun_num =
#endif /* f_List_cq__backtick_5B_5D_fun_num_used */
#line 5447 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("`[]", f_List_cq__backtick_5B_5D, tFunc(tMix,tMix), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_cq__backtick_5B_5D_defined */

#ifdef f_List_append_defined

#ifdef f_List_append_fun_num_used
  f_List_append_fun_num =
#endif /* f_List_append_fun_num_used */
#line 5483 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("append", f_List_append, tFuncV(tNone,tMix,tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_append_defined */

#ifdef f_List_insert_defined

#ifdef f_List_insert_fun_num_used
  f_List_insert_fun_num =
#endif /* f_List_insert_fun_num_used */
#line 5503 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("insert", f_List_insert, tFuncV(tNone,tMix,tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_insert_defined */

#ifdef f_List_flush_defined

#ifdef f_List_flush_fun_num_used
  f_List_flush_fun_num =
#endif /* f_List_flush_fun_num_used */
#line 5520 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("flush", f_List_flush, tFunc(tNone,tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_flush_defined */

#ifdef f_List_create_defined

#ifdef f_List_create_fun_num_used
  f_List_create_fun_num =
#endif /* f_List_create_fun_num_used */
#line 5536 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("create", f_List_create, tFuncV(tNone,tMix,tVoid), ID_PROTECTED, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_List_create_defined */
#line 5149 "/Users/hww3/devel/pike/src/builtin.cmod"
  List_program=end_program();
#line 5149 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef List_program_fun_num_used
List_program_fun_num=
#endif
 add_program_constant("List",List_program,0);

#endif /* class_List_defined */

#ifdef class_MasterCodec_defined

#ifdef PROG_MASTERCODEC_ID
#line 5956 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(MASTERCODEC);
#else
#line 5956 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_MASTERCODEC_ID */
#line 5956 "/Users/hww3/devel/pike/src/builtin.cmod"
  MasterCodec_program = Pike_compiler->new_program;

#ifndef tObjImpl_MASTERCODEC

#undef tObjIs_MASTERCODEC
#define tObjIs_MASTERCODEC "\3\1\177\0\0\22"

#undef tObjImpl_MASTERCODEC
#define tObjImpl_MASTERCODEC "\3\0\177\0\0\22"

#endif /* tObjImpl_MASTERCODEC */

#ifdef f_MasterCodec_functionof_defined

#ifdef f_MasterCodec_functionof_fun_num_used
  f_MasterCodec_functionof_fun_num =
#endif /* f_MasterCodec_functionof_fun_num_used */
#line 5962 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("functionof", f_MasterCodec_functionof, tFunc(tMix,tMix), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_MasterCodec_functionof_defined */

#ifdef f_MasterCodec_objectof_defined

#ifdef f_MasterCodec_objectof_fun_num_used
  f_MasterCodec_objectof_fun_num =
#endif /* f_MasterCodec_objectof_fun_num_used */
    ADD_FUNCTION2("objectof", f_MasterCodec_objectof, tFunc(tMix,tMix), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_MasterCodec_objectof_defined */

#ifdef f_MasterCodec_programof_defined

#ifdef f_MasterCodec_programof_fun_num_used
  f_MasterCodec_programof_fun_num =
#endif /* f_MasterCodec_programof_fun_num_used */
    ADD_FUNCTION2("programof", f_MasterCodec_programof, tFunc(tMix,tMix), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_MasterCodec_programof_defined */

#ifdef f_MasterCodec_decode_object_defined

#ifdef f_MasterCodec_decode_object_fun_num_used
  f_MasterCodec_decode_object_fun_num =
#endif /* f_MasterCodec_decode_object_fun_num_used */
    ADD_FUNCTION2("decode_object", f_MasterCodec_decode_object, tFunc(tObj tMix,tObj), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_MasterCodec_decode_object_defined */
#line 5956 "/Users/hww3/devel/pike/src/builtin.cmod"
  MasterCodec_program=end_program();
#line 5956 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef MasterCodec_program_fun_num_used
MasterCodec_program_fun_num=
#endif
 add_program_constant("MasterCodec",MasterCodec_program,ID_PROTECTED);

#endif /* class_MasterCodec_defined */

#ifdef class_cq___Backtrace_Tester___defined

#ifdef PROG_CQ___BACKTRACE_TESTER___ID
#line 6040 "/Users/hww3/devel/pike/src/builtin.cmod"
  START_NEW_PROGRAM_ID(CQ___BACKTRACE_TESTER__);
#else
#line 6040 "/Users/hww3/devel/pike/src/builtin.cmod"
  start_new_program();

#endif /* PROG_CQ___BACKTRACE_TESTER___ID */
#line 6040 "/Users/hww3/devel/pike/src/builtin.cmod"
  cq___Backtrace_Tester___program = Pike_compiler->new_program;

#ifndef tObjImpl_CQ___BACKTRACE_TESTER__

#undef tObjIs_CQ___BACKTRACE_TESTER__
#define tObjIs_CQ___BACKTRACE_TESTER__ "\3\1\177\0\0\23"

#undef tObjImpl_CQ___BACKTRACE_TESTER__
#define tObjImpl_CQ___BACKTRACE_TESTER__ "\3\0\177\0\0\23"

#endif /* tObjImpl_CQ___BACKTRACE_TESTER__ */

#ifdef cq___Backtrace_Tester___event_handler_defined
  pike_set_prog_event_callback(cq___Backtrace_Tester___event_handler);

#ifndef cq___Backtrace_Tester___gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* cq___Backtrace_Tester___gc_live_obj */

#endif /* cq___Backtrace_Tester___event_handler_defined */
#line 6040 "/Users/hww3/devel/pike/src/builtin.cmod"
  cq___Backtrace_Tester___program=end_program();
#line 6040 "/Users/hww3/devel/pike/src/builtin.cmod"
#ifdef cq___Backtrace_Tester___program_fun_num_used
cq___Backtrace_Tester___program_fun_num=
#endif
 add_program_constant("__Backtrace_Tester__",cq___Backtrace_Tester___program,0);

#endif /* class_cq___Backtrace_Tester___defined */

#ifdef f_cq__describe_program_defined
#line 644 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("_describe_program", f_cq__describe_program, tFunc(tMix,tArr(tArr(tOr("\10\200\0\0\0\177\377\377\377",tStr)))), 0);

#endif /* f_cq__describe_program_defined */

#ifdef f_basetype_defined
#line 687 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("basetype", f_basetype, tFunc(tMix,tStr), OPT_TRY_OPTIMIZE);

#endif /* f_basetype_defined */

#ifdef f_int2char_defined
#line 751 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("int2char", f_int2char, tFunc(tSetvar(0, tOr(tInt,tObj)), tNStr(tVar(0))), OPT_TRY_OPTIMIZE);

#endif /* f_int2char_defined */

#ifdef f_int2hex_defined
#line 805 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("int2hex", f_int2hex, tFunc(tOr("\10\200\0\0\0\177\377\377\377",tObj),tStr), OPT_TRY_OPTIMIZE);

#endif /* f_int2hex_defined */

#ifdef f_string2hex_defined

#ifdef f_string2hex_fun_num_used
  f_string2hex_fun_num =
#endif /* f_string2hex_fun_num_used */
#line 903 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("string2hex", f_string2hex, tFunc(tStr,tStr8), 0, OPT_TRY_OPTIMIZE);

#endif /* f_string2hex_defined */

#ifdef f_hex2string_defined

#ifdef f_hex2string_fun_num_used
  f_hex2string_fun_num =
#endif /* f_hex2string_fun_num_used */
#line 935 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("hex2string", f_hex2string, tFunc(tStr,tStr8), 0, OPT_TRY_OPTIMIZE);

#endif /* f_hex2string_defined */

#ifdef f_string_range_defined

#ifdef f_string_range_fun_num_used
  f_string_range_fun_num =
#endif /* f_string_range_fun_num_used */
#line 963 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("string_range", f_string_range, tFunc(tStr,tArr("\10\200\0\0\0\177\377\377\377")), 0, OPT_TRY_OPTIMIZE);

#endif /* f_string_range_defined */

#ifdef f_column_defined
#line 992 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("column", f_column, tFunc(tArray tMix,tArray), OPT_TRY_OPTIMIZE);

#endif /* f_column_defined */

#ifdef f_mkmultiset_defined
#line 1008 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("mkmultiset", f_mkmultiset, tFunc(tArr(tSetvar(1,tMix)),tSet(tVar(1))), OPT_TRY_OPTIMIZE|OPT_EXTERNAL_DEPEND);

#endif /* f_mkmultiset_defined */

#ifdef f_trace_defined
#line 1072 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("trace", f_trace, tFunc("\10\200\0\0\0\177\377\377\377" tOr(tVoid,tStr) tOr(tVoid,"\10\200\0\0\0\177\377\377\377"),"\10\200\0\0\0\177\377\377\377"), OPT_SIDE_EFFECT);

#endif /* f_trace_defined */

#ifdef f_gc_parameters_defined

#ifdef f_gc_parameters_fun_num_used
  f_gc_parameters_fun_num =
#endif /* f_gc_parameters_fun_num_used */
#line 1182 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("gc_parameters", f_gc_parameters, tFunc(tOr(tVoid,tMap(tStr,tMix)),tMap(tStr,tMix)), 0, OPT_SIDE_EFFECT);

#endif /* f_gc_parameters_defined */

#ifdef f_ctime_defined
#line 1286 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("ctime", f_ctime, tFunc(tInt,tStr), OPT_TRY_OPTIMIZE);

#endif /* f_ctime_defined */

#ifdef f_mkmapping_defined
#line 1319 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("mkmapping", f_mkmapping, tFunc(tArr(tSetvar(1,tMix)) tArr(tSetvar(2,tMix)),tMap(tVar(1),tVar(2))), OPT_TRY_OPTIMIZE|OPT_EXTERNAL_DEPEND);

#endif /* f_mkmapping_defined */

#ifdef f_string_secure_defined

#ifdef f_string_secure_fun_num_used
  f_string_secure_fun_num =
#endif /* f_string_secure_fun_num_used */
#line 1340 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("string_secure", f_string_secure, tFunc(tSetvar(0, tStr), tVar(0)), 0, OPT_SIDE_EFFECT);

#endif /* f_string_secure_defined */

#ifdef f_object_secure_defined

#ifdef f_object_secure_fun_num_used
  f_object_secure_fun_num =
#endif /* f_object_secure_fun_num_used */
#line 1357 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("object_secure", f_object_secure, tFunc(tSetvar(0, tObj), tVar(0)), 0, OPT_SIDE_EFFECT);

#endif /* f_object_secure_defined */

#ifdef f_string_count_defined

#ifdef f_string_count_fun_num_used
  f_string_count_fun_num =
#endif /* f_string_count_fun_num_used */
#line 1378 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("string_count", f_string_count, tFunc(tStr tStr,"\10\200\0\0\0\177\377\377\377"), 0, OPT_TRY_OPTIMIZE);

#endif /* f_string_count_defined */

#ifdef f_string_trim_whites_defined

#ifdef f_string_trim_whites_fun_num_used
  f_string_trim_whites_fun_num =
#endif /* f_string_trim_whites_fun_num_used */
#line 1417 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("string_trim_whites", f_string_trim_whites, tFunc(tStr,tStr), 0, OPT_TRY_OPTIMIZE);

#endif /* f_string_trim_whites_defined */

#ifdef f_string_normalize_space_defined

#ifdef f_string_normalize_space_fun_num_used
  f_string_normalize_space_fun_num =
#endif /* f_string_normalize_space_fun_num_used */
#line 1467 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("string_normalize_space", f_string_normalize_space, tFunc(tStr tOr(tStr,tVoid),tStr), 0, OPT_TRY_OPTIMIZE);

#endif /* f_string_normalize_space_defined */

#ifdef f_string_trim_all_whites_defined

#ifdef f_string_trim_all_whites_fun_num_used
  f_string_trim_all_whites_fun_num =
#endif /* f_string_trim_all_whites_fun_num_used */
#line 1598 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("string_trim_all_whites", f_string_trim_all_whites, tFunc(tStr,tStr), 0, OPT_TRY_OPTIMIZE);

#endif /* f_string_trim_all_whites_defined */

#ifdef f_string_status_defined

#ifdef f_string_status_fun_num_used
  f_string_status_fun_num =
#endif /* f_string_status_fun_num_used */
#line 1650 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("string_status", f_string_status, tFunc("\10\200\0\0\0\177\377\377\377",tStr), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_string_status_defined */

#ifdef f_program_implements_defined

#ifdef f_program_implements_fun_num_used
  f_program_implements_fun_num =
#endif /* f_program_implements_fun_num_used */
#line 1662 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("program_implements", f_program_implements, tFunc(tPrg(tObj) tPrg(tObj),"\10\200\0\0\0\177\377\377\377"), 0, OPT_TRY_OPTIMIZE);

#endif /* f_program_implements_defined */

#ifdef f_program_inherits_defined

#ifdef f_program_inherits_fun_num_used
  f_program_inherits_fun_num =
#endif /* f_program_inherits_fun_num_used */
#line 1675 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("program_inherits", f_program_inherits, tFunc(tOr(tPrg(tObj),tObj) tPrg(tObj),"\10\200\0\0\0\177\377\377\377"), 0, OPT_TRY_OPTIMIZE);

#endif /* f_program_inherits_defined */

#ifdef f_program_defined_defined

#ifdef f_program_defined_fun_num_used
  f_program_defined_fun_num =
#endif /* f_program_defined_fun_num_used */
#line 1698 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("program_defined", f_program_defined, tFunc(tPrg(tObj),tStr), 0, OPT_TRY_OPTIMIZE);

#endif /* f_program_defined_defined */

#ifdef f_string_width_defined

#ifdef f_string_width_fun_num_used
  f_string_width_fun_num =
#endif /* f_string_width_fun_num_used */
#line 1742 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("string_width", f_string_width, tFunc(tStr,tOr3("\10\0\0\0\10\0\0\0\10","\10\0\0\0\20\0\0\0\20","\10\0\0\0\40\0\0\0\40")), 0, OPT_TRY_OPTIMIZE);

#endif /* f_string_width_defined */

#ifdef f_m_delete_defined
#line 1769 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("m_delete", f_m_delete, tOr(tFunc(tMap(tSetvar(0,tMix),tSetvar(1,tMix)) tVar(0),tVar(1)),tFunc(tObj tMix,tMix))
, OPT_SIDE_EFFECT);

#endif /* f_m_delete_defined */

#ifdef f_get_weak_flag_defined
#line 1820 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("get_weak_flag", f_get_weak_flag, tOr3(tFunc(tArray,"\10\200\0\0\0\177\377\377\377"),tFunc(tMapping,"\10\200\0\0\0\177\377\377\377"),tFunc(tMultiset,"\10\200\0\0\0\177\377\377\377")), OPT_EXTERNAL_DEPEND);

#endif /* f_get_weak_flag_defined */

#ifdef f_cq___empty_program_defined
#line 1827 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("__empty_program", f_cq___empty_program, tFunc(tOr("\10\200\0\0\0\177\377\377\377",tVoid) tOr(tStr,tVoid),tPrg(tObj)), OPT_EXTERNAL_DEPEND);

#endif /* f_cq___empty_program_defined */

#ifdef f_function_name_defined
#line 1860 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("function_name", f_function_name, tFunc(tOr(tPrg(tObj),tFuncV(tNone,tMix,tAny)),tStr), OPT_TRY_OPTIMIZE);

#endif /* f_function_name_defined */

#ifdef f_function_object_defined
#line 1953 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("function_object", f_function_object, tFunc(tFuncV(tNone,tMix,tAny),tObj), OPT_TRY_OPTIMIZE);

#endif /* f_function_object_defined */

#ifdef f_function_program_defined
#line 1996 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("function_program", f_function_program, tFunc(tOr(tPrg(tObj),tFuncV(tNone,tMix,tAny)),tPrg(tObj)), OPT_TRY_OPTIMIZE);

#endif /* f_function_program_defined */

#ifdef f_random_defined
#line 2144 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("random", f_random, tOr6(tFunc(tObj,tMix),tFunc("\10\200\0\0\0\177\377\377\377","\10\200\0\0\0\177\377\377\377"),tFunc(tFloat,tFloat),tFunc(tArr(tSetvar(0,tMix)),tVar(0)),tFunc(tSet(tSetvar(1,tMix)),tVar(1)),tFunc(tMapping,tArray)), OPT_TRY_OPTIMIZE|OPT_EXTERNAL_DEPEND);

#endif /* f_random_defined */

#ifdef f_cq__getenv_defined

#ifdef f_cq__getenv_fun_num_used
  f_cq__getenv_fun_num =
#endif /* f_cq__getenv_fun_num_used */
#line 2190 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_getenv", f_cq__getenv, tOr(tFunc(tStr, tString), tFunc(tVoid, tMap (tStr, tStr))), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_cq__getenv_defined */

#ifdef f_cq__putenv_defined

#ifdef f_cq__putenv_fun_num_used
  f_cq__putenv_fun_num =
#endif /* f_cq__putenv_fun_num_used */
#line 2274 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_putenv", f_cq__putenv, tFunc(tStr tOr(tVoid,tStr),tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_cq__putenv_defined */

#ifdef f_cq__disassemble_defined

#ifdef f_cq__disassemble_fun_num_used
  f_cq__disassemble_fun_num =
#endif /* f_cq__disassemble_fun_num_used */
#line 2375 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_disassemble", f_cq__disassemble, tFunc(tFuncV(tNone,tMix,tAny),tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_cq__disassemble_defined */

#ifdef f_get_runtime_info_defined

#ifdef f_get_runtime_info_fun_num_used
  f_get_runtime_info_fun_num =
#endif /* f_get_runtime_info_fun_num_used */
#line 2861 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("get_runtime_info", f_get_runtime_info, tFunc(tNone,tMap(tStr,tOr("\10\200\0\0\0\177\377\377\377",tStr))), 0, OPT_TRY_OPTIMIZE);

#endif /* f_get_runtime_info_defined */

#ifdef f_backtrace_defined
#line 3038 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("backtrace", f_backtrace, tFunc(tNone,tArray), OPT_EXTERNAL_DEPEND);

#endif /* f_backtrace_defined */

#ifdef f_cq___automap___defined
#line 4373 "/Users/hww3/devel/pike/src/builtin.cmod"
  ADD_EFUN("__automap__", f_cq___automap__, tFuncV(tMix,tMix,tArray), 0);

#endif /* f_cq___automap___defined */

#ifdef f_cq__get_setter_defined

#ifdef f_cq__get_setter_fun_num_used
  f_cq__get_setter_fun_num =
#endif /* f_cq__get_setter_fun_num_used */
#line 4471 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("_get_setter", f_cq__get_setter, tFunc(tObj tStr,tFunc(tMix,tVoid)), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_cq__get_setter_defined */

#ifdef f_levenshtein_distance_defined

#ifdef f_levenshtein_distance_fun_num_used
  f_levenshtein_distance_fun_num =
#endif /* f_levenshtein_distance_fun_num_used */
#line 4594 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("levenshtein_distance", f_levenshtein_distance, tFunc(tStr tStr,"\10\200\0\0\0\177\377\377\377"), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_levenshtein_distance_defined */

#ifdef f_serialize_defined

#ifdef f_serialize_fun_num_used
  f_serialize_fun_num =
#endif /* f_serialize_fun_num_used */
#line 4944 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("serialize", f_serialize, tFunc(tObj tFunc(tMix tStr tType(tMix), tVoid), tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_serialize_defined */

#ifdef f_deserialize_defined

#ifdef f_deserialize_fun_num_used
  f_deserialize_fun_num =
#endif /* f_deserialize_fun_num_used */
#line 4972 "/Users/hww3/devel/pike/src/builtin.cmod"
    ADD_FUNCTION2("deserialize", f_deserialize, tFunc(tObj tFunc(tFunc(tMix, tVoid) tStr tType(tMix), tVoid), tVoid), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_deserialize_defined */

#ifdef CMOD_MAP_PROGRAM_IDS_DEFINED
set_program_id_to_id( 0 );
#endif /* CMOD_MAP_PROGRAM_IDS_DEFINED */
#line 6053 "/Users/hww3/devel/pike/src/builtin.cmod"
;
}

void exit_builtin(void)
{
struct svalue zero;
if (val_module) free_object (val_module);

#ifdef class_TM_defined
  if(TM_program) {
#line 77 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(TM_program);
    TM_program=0;
  }

#endif /* class_TM_defined */

#ifdef class_DestructImmediate_defined
  if(DestructImmediate_program) {
#line 2437 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(DestructImmediate_program);
    DestructImmediate_program=0;
  }

#endif /* class_DestructImmediate_defined */

#ifdef class_FakeObject_defined
  if(FakeObject_program) {
#line 2456 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(FakeObject_program);
    FakeObject_program=0;
  }

#endif /* class_FakeObject_defined */

#ifdef class_backtrace_frame_defined
  if(backtrace_frame_program) {
#line 2515 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(backtrace_frame_program);
    backtrace_frame_program=0;
  }

#endif /* class_backtrace_frame_defined */

#ifdef class_Buffer_defined
  if(Buffer_program) {
#line 3075 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(Buffer_program);
    Buffer_program=0;
  }

#endif /* class_Buffer_defined */

#ifdef class_multi_string_replace_defined
  if(multi_string_replace_program) {
#line 3442 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(multi_string_replace_program);
    multi_string_replace_program=0;
  }

#endif /* class_multi_string_replace_defined */

#ifdef class_single_string_replace_defined
  if(single_string_replace_program) {
#line 3620 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(single_string_replace_program);
    single_string_replace_program=0;
  }

#endif /* class_single_string_replace_defined */

#ifdef class_bootstring_defined
  if(bootstring_program) {
#line 3800 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(bootstring_program);
    bootstring_program=0;
  }

#endif /* class_bootstring_defined */

#ifdef class_Time_defined
  if(Time_program) {
#line 4072 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(Time_program);
    Time_program=0;
  }

#endif /* class_Time_defined */

#ifdef class_Timer_defined
  if(Timer_program) {
#line 4156 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(Timer_program);
    Timer_program=0;
  }

#endif /* class_Timer_defined */

#ifdef class_automap_marker_defined
  if(automap_marker_program) {
#line 4232 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(automap_marker_program);
    automap_marker_program=0;
  }

#endif /* class_automap_marker_defined */

#ifdef class_Setter_defined
  if(Setter_program) {
#line 4408 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(Setter_program);
    Setter_program=0;
  }

#endif /* class_Setter_defined */

#ifdef class_Null_defined
  if(Null_program) {
#line 4509 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(Null_program);
    Null_program=0;
  }

#endif /* class_Null_defined */

#ifdef class_Serializable_defined
  if(Serializable_program) {
#line 4647 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(Serializable_program);
    Serializable_program=0;
  }

#endif /* class_Serializable_defined */

#ifdef class_List_defined

#ifdef class_List_cq__get_iterator_defined
  if(List_cq__get_iterator_program) {
#line 5548 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(List_cq__get_iterator_program);
    List_cq__get_iterator_program=0;
  }

#endif /* class_List_cq__get_iterator_defined */
  if(List_program) {
#line 5149 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(List_program);
    List_program=0;
  }

#endif /* class_List_defined */

#ifdef class_MasterCodec_defined
  if(MasterCodec_program) {
#line 5956 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(MasterCodec_program);
    MasterCodec_program=0;
  }

#endif /* class_MasterCodec_defined */

#ifdef class_cq___Backtrace_Tester___defined
  if(cq___Backtrace_Tester___program) {
#line 6040 "/Users/hww3/devel/pike/src/builtin.cmod"
    free_program(cq___Backtrace_Tester___program);
    cq___Backtrace_Tester___program=0;
  }

#endif /* class_cq___Backtrace_Tester___defined */

#ifdef module_strings_declared
{
  int i;
  for(i=0; i < 1; i++) {
    if (module_strings[i]) free_string(module_strings[i]);
    module_strings[i] = NULL;
  }
}
#endif
#line 6060 "/Users/hww3/devel/pike/src/builtin.cmod"
;
SET_SVAL(zero, PIKE_T_INT, NUMBER_NUMBER, integer, 0);
assign_svalue(&gc_pre_cb, &zero);
assign_svalue(&gc_post_cb, &zero);
assign_svalue(&gc_destruct_cb, &zero);
assign_svalue(&gc_done_cb, &zero);
#ifndef DO_PIKE_CLEANUP
 /* This is performed by exit_builtin_modules() at a later point
   * in this case, so that the pike_list_node's are valid at cleanup
   * time, thus avoiding "got invalid pointer" fatals at exit.
   */
ba_destroy(&pike_list_node_allocator);
#endif
#ifndef USE_SETENV
 if (env_allocs) free_mapping (env_allocs);
#endif
}


#ifdef CMOD_MAP_PROGRAM_IDS_DEFINED
static int ___cmod_map_program_ids(int id)
{
  int i = 0;
  if( (id&0x7f000000) != 0x7f000000 ) return id;
  id = id&0x00ffffff;
#ifdef class_List_cq__get_iterator_defined
if(id==17) return List_cq__get_iterator_program->id;
#endif
#ifdef class_List_defined
if(id==16) return List_program->id;
#endif
#ifdef class_cq___Backtrace_Tester___defined
if(id==19) return cq___Backtrace_Tester___program->id;
#endif
#ifdef class_TM_defined
if(id==2) return TM_program->id;
#endif
#ifdef class_MasterCodec_defined
if(id==18) return MasterCodec_program->id;
#endif
#ifdef class_DestructImmediate_defined
if(id==3) return DestructImmediate_program->id;
#endif
#ifdef class_FakeObject_defined
if(id==4) return FakeObject_program->id;
#endif
#ifdef class_backtrace_frame_defined
if(id==5) return backtrace_frame_program->id;
#endif
#ifdef class_Buffer_defined
if(id==6) return Buffer_program->id;
#endif
#ifdef class_multi_string_replace_defined
if(id==7) return multi_string_replace_program->id;
#endif
#ifdef class_single_string_replace_defined
if(id==8) return single_string_replace_program->id;
#endif
#ifdef class_bootstring_defined
if(id==9) return bootstring_program->id;
#endif
#ifdef class_Time_defined
if(id==10) return Time_program->id;
#endif
#ifdef class_Timer_defined
if(id==11) return Timer_program->id;
#endif
#ifdef class_automap_marker_defined
if(id==12) return automap_marker_program->id;
#endif
#ifdef class_Setter_defined
if(id==13) return Setter_program->id;
#endif
#ifdef class_Null_defined
if(id==14) return Null_program->id;
#endif
#ifdef class_Serializable_defined
if(id==15) return Serializable_program->id;
#endif
  while(___cmod_ext_used[i].from ) {
   if( ___cmod_ext_used[i].from == id ) return ___cmod_ext_used[i].to;
   i++;
  }
  return 0;
}
#endif /* CMOD_MAP_PROGRAM_IDS_DEFINED */
