diff --git a/.gitattributes b/.gitattributes index ce7c49296371879d6a40244452af12080149ec34..8c1f83a12c22d31aac2c891d580959a1495bb722 100644 --- a/.gitattributes +++ b/.gitattributes @@ -150,6 +150,7 @@ testfont binary /lib/modules/Yabu.pmod/module.pmod foreign_ident /lib/modules/_Image.pmod/module.pmod foreign_ident /lib/modules/error.pmod foreign_ident +/lib/modules/system.pmod foreign_ident /lib/tools/pike.el foreign_ident /man/hilfe.1 foreign_ident /man/pike.1 foreign_ident diff --git a/lib/master.pike.in b/lib/master.pike.in index 051f428b466c72a16d8c4404e88e2d9e7f8c6af6..ef086fb68eb02e4e6736c10b59d76c2085fc7f33 100644 --- a/lib/master.pike.in +++ b/lib/master.pike.in @@ -1,6 +1,6 @@ /* -*- Pike -*- * - * $Id: master.pike.in,v 1.154 2001/05/24 18:14:28 grubba Exp $ + * $Id: master.pike.in,v 1.155 2001/05/31 22:50:30 hubbe Exp $ * * Master-file for Pike. * @@ -181,36 +181,6 @@ string master_read_file(string file) return 0; } -//! @global -//! Compile the Pike code contained in the file @[filename] into a program. -//! -//! This function will compile the file @[filename] to a Pike program that can -//! later be instantiated. It is the same as doing -//! @code{@[compile_string](@[Stdio.read_file](@[filename]), @[filename])@}. -//! -//! @seealso -//! @[compile()], @[compile_string()], @[cpp()] -//! -program compile_file(string filename, - object|void handler, - void|program p, - void|object o) -{ - AUTORELOAD_CHECK_FILE(filename); - return compile(cpp(master_read_file(filename), - filename, - 1, - handler, - compat_major, - compat_minor), - handler, - compat_major, - compat_minor, - p, - o); -} - - #ifdef GETCWD_CACHE string current_path; int cd(string s) @@ -230,6 +200,7 @@ string combine_path_with_cwd(string path) return combine_path(IS_ABSOLUTE_PATH(path)?"/":getcwd(),path); } +#define Stat _static_modules.files.Stat #ifdef FILE_STAT_CACHE #define FILE_STAT_CACHE_TIME 20 @@ -237,7 +208,6 @@ string combine_path_with_cwd(string path) int invalidate_time; mapping(string:multiset(string)) dir_cache = ([]); -#define Stat _static_modules.files.Stat Stat master_file_stat(string x) { string file, dir=combine_path_with_cwd(x); @@ -255,12 +225,18 @@ Stat master_file_stat(string x) { if(array(string) tmp=get_dir(dir)) { +#ifdef __NT__ + tmp=map(tmp, lower_case); +#endif d=dir_cache[dir]=aggregate_multiset(@tmp); }else{ dir_cache[dir]=0; } } +#ifdef __NT__ + file=lower_case(file); +#endif if(d && !d[file]) return 0; return predef::file_stat(x); @@ -272,6 +248,7 @@ Stat master_file_stat(string x) mapping (string:string) environment=([]); + //! @global //! @decl string getenv(string varname) //! @decl mapping(string:string) getenv() @@ -289,6 +266,38 @@ string|mapping(string:string) getenv(string|void s) return environment[s]; } + +//! @global +//! Compile the Pike code contained in the file @[filename] into a program. +//! +//! This function will compile the file @[filename] to a Pike program that can +//! later be instantiated. It is the same as doing +//! @code{@[compile_string](@[Stdio.read_file](@[filename]), @[filename])@}. +//! +//! @seealso +//! @[compile()], @[compile_string()], @[cpp()] +//! +program compile_file(string filename, + object|void handler, + void|program p, + void|object o) +{ + AUTORELOAD_CHECK_FILE(filename); + return compile(cpp(master_read_file(filename), + filename, + 1, + handler, + compat_major, + compat_minor), + handler, + compat_major, + compat_minor, + p, + o); +} + + + #if 0 variant mapping(string:string) getenv() { diff --git a/lib/modules/System.pmod b/lib/modules/System.pmod index 8d11f03c8c614b6ea546443720cd931247e192e1..383ff7ab79f590903a5ea070d8a879ccd8822e55 100644 --- a/lib/modules/System.pmod +++ b/lib/modules/System.pmod @@ -1,4 +1,4 @@ -// $Id: System.pmod,v 1.1 2001/04/29 20:47:52 mirar Exp $ -// this module is to allow the system module to be called System. +// $Id: System.pmod,v 1.2 2001/05/31 22:50:31 hubbe Exp $ +// this module is to allow the system module to be called system. -inherit system; +inherit _system; diff --git a/lib/modules/system.pmod b/lib/modules/system.pmod new file mode 100644 index 0000000000000000000000000000000000000000..8a673986cdad0140d0d4a4752a6c712bbdf886be --- /dev/null +++ b/lib/modules/system.pmod @@ -0,0 +1,4 @@ +// $Id: system.pmod,v 1.1 2001/05/31 22:50:31 hubbe Exp $ +// this module is to allow the system module to be called system. + +inherit _system; diff --git a/src/modules/system/Makefile.in b/src/modules/system/Makefile.in index e9debd2edc39cb11d2db2e52fc1648b5d22d0ce9..a9f33e3a465977d2fe8c662005a55c54db8c2c2f 100644 --- a/src/modules/system/Makefile.in +++ b/src/modules/system/Makefile.in @@ -1,8 +1,9 @@ -# $Id: Makefile.in,v 1.10 2001/02/03 23:08:40 mirar Exp $ +# $Id: Makefile.in,v 1.11 2001/05/31 22:50:31 hubbe Exp $ @make_variables@ VPATH=@srcdir@:@srcdir@/../..:../..:. OBJS=system.o syslog.o passwords.o nt.o memory.o MODULE_LDFLAGS=@LIBS@ +INSTALL_NAME=_system CONFIG_HEADERS=@CONFIG_HEADERS@