[Arsperl-devel] ARSperl/example ars_GetListGroup.pl,1.1,1.2
Brought to you by:
jeffmurphy
From: Thilo S. <ts...@us...> - 2008-05-15 18:30:57
|
Update of /cvsroot/arsperl/ARSperl/example In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv5631/example Modified Files: ars_GetListGroup.pl Log Message: arsystem 7.1 port completed, new functions Index: ars_GetListGroup.pl =================================================================== RCS file: /cvsroot/arsperl/ARSperl/example/ars_GetListGroup.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ars_GetListGroup.pl 23 Jul 1997 18:21:29 -0000 1.1 --- ars_GetListGroup.pl 15 May 2008 18:30:07 -0000 1.2 *************** *** 1,50 **** ! #!/usr/local/bin/perl ! # ! # $Header$ ! # ! # NAME ! # ars_GetListGroup.pl ! # ! # USAGE ! # ars_GetListGroup.pl [server] [username] [password] ! # ! # DESCRIPTION ! # Demo of said function. See web page for details or ARS Programmers ! # Manual. ! # ! # AUTHOR ! # Jeff Murphy ! # # $Log$ ! # Revision 1.1 1997/07/23 18:21:29 jcmurphy ! # Initial revision ! # ! # ! # ! ! use ARS; ! ! ($c = ars_Login(shift, shift, shift)) || die "login: $ars_errstr"; ! ! ! print "Calling GetListGroup..\n"; ! ! ($h = ars_GetListGroup($c)) || die "ERR: $ars_errstr\n"; ! print "errstr=$ars_errstr\n"; ! ! print "GetListGroup returned the following groups:\n"; ! ! $num = $#{$h->{groupId}}; ! printf("%4.4s %4.4s %s\n", "ID", "Type", "Names.."); ! for($i = 0; $i < $num; $i++) { ! printf("%4d %4d ", ! @{$h->{groupId}}[$i], ! @{$h->{groupType}}[$i]); ! printf("[%d] ", $#{@{$h->{groupName}}[$i]}); ! for($v=0; $v <= $#{@{$h->{groupName}}[$i]}; $v++) { ! printf("<%s> ", @{@{$h->{groupName}}[$i]}[$v]); ! } ! print "\n"; ! } ! ! ars_Logoff($c); --- 1,67 ---- ! #!/usr/local/bin/perl ! # ! # $Header$ ! # ! # NAME ! # ars_GetListGroup.pl ! # ! # USAGE ! # ars_GetListGroup.pl [server] [username] [password] ! # ! # DESCRIPTION ! # Demo of said function. See web page for details or ARS Programmers ! # Manual. ! # ! # AUTHOR ! # Jeff Murphy ! # # $Log$ ! # Revision 1.2 2008/05/15 18:30:07 tstapff ! # arsystem 7.1 port completed, new functions ! # ! # Revision 1.1 1997/07/23 18:21:29 jcmurphy ! # Initial revision ! # ! # ! # ! ! use ARS; ! ! ($c = ars_Login(shift, shift, shift)) || die "login: $ars_errstr"; ! ! ! print "Calling GetListGroup..\n"; ! ! (@groups = ars_GetListGroup($c)) || die "ERR: $ars_errstr\n"; ! print "errstr=$ars_errstr\n"; ! ! print "GetListGroup returned the following groups:\n"; ! ! $num = scalar(@groups); ! printf("%4.4s %4.4s %s\n", "ID", "Type", "Names.."); ! foreach my $h (@groups) { ! printf("%4d %4d [%d]", $h->{groupId}, $h->{groupType}, scalar(@{$h->{groupName}}) ); ! foreach my $name ( @{$h->{groupName}} ){ ! printf(" <%s>", $name); ! } ! print "\n"; ! } ! ! ! ! # use the following block if your ARSperl was compiled with GETLISTGROUP_OLD_STYLE ! ! #$num = $#{$h->{groupId}}; ! #printf("%4.4s %4.4s %s\n", "ID", "Type", "Names.."); ! #for($i = 0; $i < $num; $i++) { ! # printf("%4d %4d ", ! # @{$h->{groupId}}[$i], ! # @{$h->{groupType}}[$i]); ! # printf("[%d] ", $#{@{$h->{groupName}}[$i]}); ! # for($v=0; $v <= $#{@{$h->{groupName}}[$i]}; $v++) { ! # printf("<%s> ", @{@{$h->{groupName}}[$i]}[$v]); ! # } ! # print "\n"; ! #} ! ! ars_Logoff($c); |