pike.git/
lib/
master.pike.in
Branch:
Tag:
Non-build tags
All tags
No tags
2001-11-07
2001-11-07 21:51:19 by Martin Nilsson <mani@lysator.liu.se>
6df5a54dc54660a40d052a043f52429c0efc75d2 (
58
lines) (+
37
/-
21
)
[
Show
|
Annotate
]
Branch:
7.9
Autodoc fixes and experiments
Rev: lib/master.pike.in:1.174
1:
/* -*- Pike -*- *
-
* $Id: master.pike.in,v 1.
173
2001/
10
/
28
17
:
54
:
43
nilsson Exp $
+
* $Id: master.pike.in,v 1.
174
2001/
11
/
07
21
:
51
:
19
nilsson Exp $
* * Master-file for Pike. *
19:
#endif /* !defined(BT_MAX_STRING_LEN) || (BT_MAX_STRING_LEN <= 0) */ constant bt_max_string_len = BT_MAX_STRING_LEN;
-
//! @decl constant bt_max_string_len =
int
+
//! @decl constant bt_max_string_len =
200
+
//! This constant contains the maximum number of lines a backtrace may
+
//! contain. Defaults to 200 if no BT_MAX_STRING_LEN define has been
+
//! given.
// Enables the out of date warning in low_find_prog(). #ifndef OUT_OF_DATE_WARNING
27:
#endif /* OUT_OF_DATE_WARNING */ constant out_of_date_warning = OUT_OF_DATE_WARNING;
-
//! @decl constant out_of_date_warning =
int(
0..
1)
+
//! @decl constant out_of_date_warning =
1
+
//! Should Pike complain about out of date compiled files.
+
//! 1 means yes and
0
means no
.
Controlled by the OUT_OF_DATE_WARNING
+
//! define
.
#ifndef PIKE_WARNINGS #define PIKE_WARNINGS 0
39:
* Functions begin here. */
+
// FIXME: Should the pikeroot-things be private?
#ifdef PIKE_FAKEROOT object o; string fakeroot(string s)
1142:
int want_warnings = PIKE_WARNINGS; string ver;
-
void create(mixed
v
)
+
//! The ComparResolver is initialized with a value that can be
+
//! casted into a "%d.%d" string, e.g. a version object.
+
void create(mixed
version
)
{
-
ver=(string)
v
;
+
ver=(string)
version
;
}
-
//! @appears add_include_path
+
//! Add a directory to search for include files. //! //! This is the same as the command line option @tt{-I@}.
1166:
pike_include_path=({tmp})+pike_include_path; }
-
//! @appears remove_include_path
+
//! Remove a directory to search for include files. //! //! This function performs the reverse operation of @[add_include_path()].
1180:
pike_include_path-=({tmp}); }
-
//! @appears add_module_path
+
//! Add a directory to search for modules. //! //! This is the same as the command line option @tt{-M@}.
1195:
pike_module_path=({tmp})+pike_module_path; }
-
-
//! @appears remove_module_path
+
//! Remove a directory to search for modules. //! //! This function performs the reverse operation of @[add_module_path()].
1210:
pike_module_path-=({tmp}); }
-
-
//! @appears add_program_path
+
//! Add a directory to search for programs. //! //! This is the same as the command line option @tt{-P@}.
1226:
pike_program_path=({tmp})+pike_program_path; }
-
-
//! @appears remove_program_path
+
//! Remove a directory to search for programs. //! //! This function performs the reverse operation of @[add_program_path()].
1241:
pike_program_path-=({tmp}); }
+
//!
mapping get_default_module() { /* This is an ugly kluge to avoid an infinite recursion.
1265:
return x; }
+
//!
mixed resolv_base(string identifier, string|void current_file, object|void current_handler) {
1307:
} mapping resolv_cache = set_weak_flag( ([]), 1 );
+
+
//!
mixed resolv(string identifier, string|void current_file, object|void current_handler) {
1369:
return path; }
+
//!
string read_include(string f) { AUTORELOAD_CHECK_FILE(f) return master_read_file(f); }
-
+
string _sprintf() { return sprintf("CompatResolver(%s)",ver);
2554:
} }
-
+
//! Contains version information about a Pike version.
class Version {
-
+
+
//! The major and minor parts of the version.
int major; int minor;
-
+
+
//! @decl void create(int major, int minor)
+
//! Set the version in the object.
void create(int maj, int min) {
-
major=maj;
-
minor=min;
+
major
=
maj;
+
minor
=
min;
} #define CMP(X) ((major - (X)->major) || (minor - (X)->minor))
-
+
//! Methods define so that version objects
+
//! can be compared and ordered.
int `<(Version v) { return CMP(v) < 0; } int `>(Version v) { return CMP(v) > 0; } int `==(Version v) { return CMP(v)== 0; } int _hash() { return major * 4711 + minor ; } string _sprintf() { return sprintf("%d.%d",major,minor); }
-
+
+
//! The version object can be casted into a string.
mixed cast(string type) { switch(type)
2583:
} }
+
//! Version information about the current Pike version.
Version currentversion=Version(__MAJOR__,__MINOR__);
-
+
mapping(Version:CompatResolver) compat_handler_cache=set_weak_flag( ([]), 1); CompatResolver get_compilation_handler(int major, int minor)