projects
/
OpenSPARC-T2-DV
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV]
/
tools
/
perl-5.8.0
/
lib
/
site_perl
/
5.8.0
/
Psh
/
Support
/
Functions.pm
package
Psh
::
Support
::
Functions
;
require
Psh
;
my
%functions
=();
sub
add_function
{
my
$name
=
shift
;
my
$text
=
shift
;
$functions
{
$name
}= [
map
{
$_
.
"
\n
"
}
split
/\n/
,
$text
];
}
sub
call_function
{
my
$name
=
shift
;
Psh
::
process_variable
(
$functions
{
$name
})
if
$functions
{
$name
};
}
sub
remove_function
{
my
$name
=
shift
;
delete
$functions
{
$name
};
}
sub
get_function
{
my
$name
=
shift
;
return
$functions
{
$name
};
}
sub
list
{
return
sort keys
%functions
;
}
1
;