Annotation of wpscripts/epickup/conv.pm, Revision 1.1
1.1 ! yason 1: #!/usr/bin/perl
! 2:
! 3: package conv;
! 4:
! 5: sub to_local($)
! 6: {
! 7: my $path = shift;
! 8: my $searchpath;
! 9:
! 10: # dirty hack to escape database' strange behaviors
! 11: if ($path eq '') { return(0); }
! 12:
! 13: # truncate spaces
! 14: while( index($path, ' ', 0) != -1 )
! 15: {
! 16: chop($path);
! 17: }
! 18:
! 19: $searchpath = substr($path, 23);
! 20:
! 21: # make local file path
! 22: $searchpath =~ tr/\\/\//; $searchpath = '/WIDEPRINT/' . $searchpath;
! 23:
! 24: return($searchpath);
! 25: }
! 26:
! 27:
! 28: sub basename($)
! 29: {
! 30: # extract file name
! 31: my $path = shift;
! 32:
! 33: my $path = `basename $path`;
! 34: chomp($path);
! 35:
! 36: return($path);
! 37: }
! 38:
! 39:
! 40: sub dirname($)
! 41: {
! 42: # extract file directory
! 43: my $path = shift;
! 44:
! 45: my $path = `dirname $path`;
! 46: chomp($path);
! 47:
! 48: return($path);
! 49: }
! 50:
! 51: return(1);
CVSweb