|
From: Jonathan L. <le...@us...> - 2006-12-05 19:23:41
|
Update of /cvsroot/pyxida/Pyxida/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19708/bin Modified Files: proxy.pl Log Message: more headway with proxy coords Index: proxy.pl =================================================================== RCS file: /cvsroot/pyxida/Pyxida/bin/proxy.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** proxy.pl 5 Dec 2006 03:59:26 -0000 1.1 --- proxy.pl 5 Dec 2006 19:23:39 -0000 1.2 *************** *** 36,61 **** if (defined($para{'c'})) { my $res = $server->call("pyxida.createProxyCoord",$para{'c'},$lease); ! #print Dumper($hash); ! #&Aux::printHash($hash); ! print "$res\n"; } else { die ("Missing arguments\n$usage"); } ! # TODO put in shared file ! sub parse_coord { ! my ($coord) = @_; ! my $out = '['; ! for (my $i = 0; $i <= $#$coord; $i++) { ! my $element = sprintf ("%.3f", $coord->[$i]); ! # if ($i == $#$coord && $USE_HEIGHT) { ! # $out .= 'h'; ! # } ! $out .= $element; ! if ($i != $#$coord) { ! $out .= ' '; ! } } - $out .= ']'; - return $out; } --- 36,61 ---- if (defined($para{'c'})) { my $res = $server->call("pyxida.createProxyCoord",$para{'c'},$lease); ! &outputBoolean($res); ! } elsif (defined($para{'d'})) { ! my $res = $server->call("pyxida.destroyProxyCoord",$para{'d'}); ! &outputBoolean($res); ! } elsif (defined($para{'r'})) { ! my $res = $server->call("pyxida.renewProxyCoord",$para{'r'},$lease); ! &outputBoolean($res); } else { die ("Missing arguments\n$usage"); } ! ############################################################ ! ! sub outputBoolean { ! my ($res) = @_; ! #print Dumper($res); ! #&Aux::printHash($hash); ! my $success = $res->value; ! if ($success == 1) { ! print "Success\n"; ! } else { ! print "Failure\n"; } } |