Modified report procedure

Here is the modified version of Elements_with_Labels.prl.

$start_dir = $0; $start_dir =~ s/\\scripts\\.*/\\scripts/;
$common_dir = $start_dir;
$common_dir =~ s/(.*)\\scripts/$1\\script_tools/;

$cc = ""; if ($cc) {;};
$ct = ""; if ($ct) {;};
$debug = ""; if ($debug) {;};
$skip_path_checks = ""; if ($skip_path_checks) {;};
$CLEARCASE_XN_SFX = ""; if ($CLEARCASE_XN_SFX) {;};
$ctfind_paths = ""; if ($ctfind_paths) {;};
$skip_path_checks = "yes"; if ($skip_path_checks) {;};
$debug = "no"; if ($debug) {;};

sub do_exit {
   $err = join(" ", @_);
   if ("$err" != "") {
      print STDERR "$err\n";
   }
   sleep(2);
   if ("$err" != "") {
      exit(1);
      } else {
      exit(0);
   }
}
open(INCLUDE, "<$common_dir\\common_script.prl") or do_exit("error 
opening include file '$common_dir\\common.prl'"); 
$buf = "";
while(<INCLUDE>) {
   $buf = $buf . $_;
}
close(INCLUDE);
eval $buf || do_exit("error on eval of include file 
'$common_dir\\common.prl'"); 

my $args = $ARGV[0];
$args =~ s/
@args = split(";", $args);
my $cclabel = "";
$required_args = 0;
foreach(@args) {
   s/^[    ]+//;
   s/[    ]+$//;
   validate_arg_length($_);
   if (/^-i/) {
      print "description : ";
         print "'Elements with Labels'";
      print "\n";
      print "id : 2003\n";
      print "helpfile :\n";
      print "parameters : ";
         print "LOOKIN ";
         print "LABEL ";
      print "\n";
### customization change *** deleted following line
   #print_element_rightclick();
### customization change *** added following 7 lines
      print "rightclick : ";
         print "Properties_of_Element(single) ";
         print "sep ";
         print "Compare_with_Previous_Version(single) ";
         print "Version_Tree(single) ";
         print "History(single) ";
      print "\n";
      print "fields : ";
         print "\"Element Path\"(element_pn, rightclick, sort 1)";
      print "\n";
   exit(0);
}
if (/^LOOKIN[    ]*=[    ]*('.*')/) {
   #print "paths are $1\n";
   check_lookin($1);
   $required_args++;
   next;
}
if (/^LABEL[    ]*=[    ]*'*([^']*)'*/)  {
   $cclabel = $1;
   #print "label is $cclabel\n";
   $required_args++;
   next;
}
print STDERR "unrecognized argument: $_\n";
print STDERR "  ccperl $0 -i\n";
print STDERR "    for script's interface.\n";
do_exit("\n");
}
if ($required_args != 2) {
   print STDERR "usage: not all required arguments specified.\n";
   print STDERR "  ccperl $0 -i\n";
   print STDERR "    for script's interface.\n";
   do_exit("\n");

}
open(CTFIND, "cleartool find $ctfind_paths -element 
'lbtype_sub($cclabel)' -print |");
while(<CTFIND>) {
   chomp;
   ($path, $rest) = split $CLEARCASE_XN_SFX, $_, 2;
   if ($rest) {;}
   print "$path;\n";
}
do_exit();