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
|
#!NOMODULE
// utils.pike
// some module utils
// This code is (c) 1999 Martin Baehr, and can be used, modified and
// redistributed freely under the terms of the GNU General Public License,
// version 2.
// This code comes on a AS-IS basis, with NO WARRANTY OF ANY KIND, either
// implicit or explicit. Use at your own risk.
// You can modify this code as you wish, but in this case please
// - state that you changed the code in the modified version
// - do not remove my name from it
// - send me a copy of the modified version or a patch, so that
// I can include it in the 'official' release.
// If you find this code useful, please e-mail me. It would definitely
// boost my ego :)
//
// For risks and side-effects please read the code or ask your local
// unix or roxen-guru.
constant cvs_version = "$Id: utils.pike,v 1.3 1999/09/25 02:23:51 mbaehr Exp $";
void unload_program(string p)
{
m_delete(master()->programs,search(master()->programs,(program)p));
}
inline string do_replace(string s, mapping (string:string) m)
{
return replace(s, indices(m), values(m));
}
|