Diff for /scaleomat/scaleomat.pl between versions 1.4 and 1.5

version 1.4, 2004/11/18 20:10:17 version 1.5, 2004/11/18 20:15:09
Line 130  sub findfile { Line 130  sub findfile {
     return;      return;
 }  }
   
   #
   # $p = cleanpath($path, $startslash).  
   #
   # returns a pathname with trailing and starting slash removed (if
   # $startslash is true the starting slash is not removed)
   #
 sub cleanpath {  sub cleanpath {
     my ($path, $startslash) = @_;      my ($path, $startslash) = @_;
   
     if ($path =~ /^(\/)*(.*?)\/*$/) {      if ($path =~ /^(\/)*(.*?)\/*$/) {
     if ($startslash) {      if ($startslash) {
         print "$path --> $1$2\n";  
         return $1 . $2;          return $1 . $2;
     } else {      } else {
         print "$path --> $2\n";  
         return $2;          return $2;
     }      }
     }      }
     print "hä? $path\n";  
     return $path;      return $path;
 }  }
   

Removed from v.1.4  
changed lines
  Added in v.1.5


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>