Subversion Repositories gelsvn

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
107 bj 1
package WinProjectBase;
2
 
3
# ************************************************************
4
# Description   : A Windows base module for Project Creators
5
# Author        : Chad Elliott
6
# Create Date   : 1/4/2005
7
# ************************************************************
8
 
9
# ************************************************************
10
# Pragmas
11
# ************************************************************
12
 
13
use strict;
14
 
15
# ************************************************************
16
# Subroutine Section
17
# ************************************************************
18
 
19
sub validated_directory {
20
  my($self) = shift;
21
  my($dir)  = shift;
22
 
23
  ## $(...) could contain a drive letter and Windows can not
24
  ## make a directory that resembles a drive letter.  So, we have
25
  ## to exclude those directories with $(...).
26
  if ($dir =~ /\$\([^\)]+\)/ || $dir =~ /\.\.\\/ || $dir =~ /^[A-Z]:/i) {
27
    return '.';
28
  }
29
  else {
30
    return $dir;
31
  }
32
}
33
 
34
 
35
sub crlf {
36
  my($self) = shift;
37
  return $self->windows_crlf();
38
}
39
 
40
 
41
sub file_sorter {
42
  my($self)  = shift;
43
  my($left)  = shift;
44
  my($right) = shift;
45
  return lc($left) cmp lc($right);
46
}
47
 
48
 
49
1;