Subversion Repositories gelsvn

Rev

Rev 107 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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