1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
69
  
70
  
71
  
72
  
73
  
74
  
75
  
76
  
77
  
78
  
79
  
80
  
81
  
82
  
83
  
84
  
85
  
86
  
87
  
88
  
89
  
90
  
91
  
92
  
93
  
94
  
95
  
96
  
97
  
98
  
99
  
100
  
101
  
102
  
103
  
104
  
105
  
106
  
107
  
108
  
109
  
110
  
111
  
112
  
113
  
114
  
115
  
116
  
117
  
118
  
119
  
120
  
121
  
// Compatibility namespace 
 
#pike 8.1 
 
//! Pike 8.0 compatibility. 
//! 
//! The symbols in this namespace will appear in 
//! programs that use @tt{#pike 8.0@} or lower. 
 
//! @decl inherit predef:: 
 
object master() 
{ 
  return __REAL_VERSION__::master()->get_compat_master(8, 0); 
} 
 
//! @decl void _assembler_debug() 
//! 
//! @deprecated Debug.assembler_debug 
 
//! @decl int _debug(int d) 
//! 
//! @deprecated Debug.debug 
 
//! @decl void _dump_program_tables(program p, int|void i) 
//! 
//! @deprecated Debug.dump_program_tables 
 
//! @decl int _optimizer_debug(int d) 
//! 
//! @deprecated Debug.optimizer_debug 
 
//! @decl int _map_all_objects(function f) 
//! 
//! @deprecated Debug.map_all_objects 
 
//! @decl int _refs(mixed x) 
//! 
//! @deprecated Debug.refs 
 
//! @decl mixed _next(mixed x) 
//! 
//! @deprecated Debug.next 
 
//! @decl mixed _prev(mixed x) 
//! 
//! @deprecated Debug.prev 
 
//! @decl object next_object(object o) 
//! 
//! @deprecated Debug.next_object 
 
protected int|array(string) _glob(string|array(string) a, string|array(string) b) 
{ 
  mapping r = ([ 
    "[" : "\\[", 
    "\\" : "\\\\" 
  ]); 
  if( stringp(a) ) 
    a = replace(a, r); 
  else 
    a = replace(a[*], r); 
  return 8.1::glob(a,b); 
} 
 
protected int(0..1) glob(string a, string b) 
{ 
  return _glob(a,b); 
} 
variant protected int(0..1) glob(array(string) a, string b) 
{ 
  return !!_glob(a,b); 
} 
variant protected array(string) glob(array(string)|string a, array(string) b) 
{ 
  return _glob(a,b); 
} 
 
protected Mapping.ShadowedMapping compat_all_constants = 
  Mapping.ShadowedMapping(predef::all_constants(), 
                          ([ 
#if constant(Debug.HAVE_DEBUG) 
                          "_assembler_debug": Debug.assembler_debug, 
                            "_debug": Debug.debug, 
                            "_describe": Debug.describe, 
                            "_dump_backlog": Debug.dump_backlog, 
                            "_dump_program_tables": Debug.dump_program_tables, 
                            "_gc_set_watch": Debug.gc_set_watch, 
                            "_leak": Debug.leak, 
                            "_locate_references": Debug.locate_references, 
                            "_optimizer_debug": Debug.optimizer_debug, 
#endif /* Debug.HAVE_DEBUG */ 
                          "_map_all_objects": Debug.map_all_objects, 
                            "_refs": Debug.refs, 
                            "_next": Debug.next, 
                            "_prev": Debug.prev, 
                            "hash": hash_8_0, 
                            "next_object": Debug.next_object, 
                            "all_constants": all_constants, 
                            "master": master, 
                            "glob" : glob, 
#ifdef constant(System.RegGetValue) 
                            "RegGetValue" : System.RegGetValue, 
                            "RegGetKeyNames" : System.RegGetKeyNames, 
                            "RegGetValues" : System.RegGetValues, 
#endif 
#ifdef constant(System.openlog) 
                            "openlog" : System.openlog, 
                            "syslog" : System.syslog, 
                            "closelog" : System.closelog, 
#endif 
                        ]), 1); 
 
mapping(string:mixed) all_constants() 
{ 
  // Intentional lie in the return type. 
  mixed x = compat_all_constants; 
  return x; 
}