;By Adrenalin ;)
Alias Hadd {
if ((-* iswm $1) && (l isin $1)) {
var %level = $calc($mid($1,$calc($pos($1,l,1)+1),1))
if (%level !isnum) {
echo 4 -s the -l parameter is wrong !
return
}
var %first = $remove($1,-l $+ %level)
}
else {
!hadd $1-
}
var %sections = $gettok($1-,3- $+ $calc(%level + 2),32)
var %sections = $replace(%sections,$chr(32),.)
var %value = $gettok($1-,$calc(%level + 3) $+ - ,32)
!hadd %first $2 %sections %value
}
Alias Hgett {
var %level = $gettok($2-,0,32)
if ($prop != $null) var %prop = $+(.,$prop)
if (%level == 1) {
return $hget($1,$2) $+ %prop
}
var %sections = $replace($2-,$chr(32),.)
return $hget($1,%sections) $+ $+ %prop
}