Subversion Repositories DevTools

Rev

Rev 287 | Rev 311 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 287 Rev 289
Line 67... Line 67...
67
        } elsif ( /--Type=(.*)/ ) {
67
        } elsif ( /--Type=(.*)/ ) {
68
            $self->{'TYPE'} = $1;
68
            $self->{'TYPE'} = $1;
69
            $self->{'CMT'} = 'REM' if ( $1 eq 'bat' );
69
            $self->{'CMT'} = 'REM' if ( $1 eq 'bat' );
70
            $self->{'CMT'} = '//'  if ( $1 eq 'CSharp' );
70
            $self->{'CMT'} = '//'  if ( $1 eq 'CSharp' );
71
            $self->{'CMT'} = '//'  if ( $1 eq 'C++' );
71
            $self->{'CMT'} = '//'  if ( $1 eq 'C++' );
-
 
72
            $self->{'CMT'} = '//'  if ( $1 eq 'Delphi' );
72
 
73
 
73
        } elsif ( /^--NoTime/ ) {
74
        } elsif ( /^--NoTime/ ) {
74
            $self->{'DO_TIME'} = 0;
75
            $self->{'DO_TIME'} = 0;
75
            
76
            
76
        } else {
77
        } else {
Line 97... Line 98...
97
    return bless $self, __PACKAGE__;
98
    return bless $self, __PACKAGE__;
98
}
99
}
99
 
100
 
100
#-------------------------------------------------------------------------------
101
#-------------------------------------------------------------------------------
101
# Function        : Write
102
# Function        : Write
-
 
103
#                   WriteLn
102
#                   Comment
104
#                   Comment
103
#
105
#
104
# Description     : print a line to the file
106
# Description     : print a line to the file
105
#                   Called write to avoid massivce confusion with print
107
#                   Called write to avoid massivce confusion with print
106
#
108
#
107
# Inputs          : $self   - package handle
109
# Inputs          : $self   - package handle
108
#                   $*      - print arguments
110
#                   $*      - print arguments
-
 
111
#                             WriteLn will write each one with a newline
-
 
112
#                             Arrays are allowed
109
#
113
#
110
# Returns         :
114
# Returns         :
111
#
115
#
112
sub Write
116
sub Write
113
{
117
{
114
    my $self = shift;
118
    my $self = shift;
115
    print {$self->{FH}} ( @_ );
119
    print {$self->{FH}} ( @_ );
116
}
120
}
117
 
121
 
-
 
122
sub WriteLn
-
 
123
{
-
 
124
    my $self = shift;
-
 
125
 
-
 
126
    foreach my $entry ( @_ ) {
-
 
127
        if ( ref ($entry ) eq 'ARRAY'  ) {
-
 
128
            print {$self->{FH}}  $_ . "\n" foreach  ( @$entry );
-
 
129
        } else {
-
 
130
            print {$self->{FH}}  $entry . "\n"
-
 
131
        }
-
 
132
    }
-
 
133
}
-
 
134
 
118
sub Comment
135
sub Comment
119
{
136
{
120
    my $self = shift;
137
    my $self = shift;
121
    print {$self->{FH}} ( $self->{'CMT'}, ' ', @_ );
138
    print {$self->{FH}} ( $self->{'CMT'}, ' ', @_ );
122
}
139
}
Line 138... Line 155...
138
    my( $self, $varref, $name ) = @_;
155
    my( $self, $varref, $name ) = @_;
139
 
156
 
140
    $Data::Dumper::Indent  = 1;         # Use 2 for readability, 1 or 0 for production
157
    $Data::Dumper::Indent  = 1;         # Use 2 for readability, 1 or 0 for production
141
    $Data::Dumper::Sortkeys = 1;        # Sort the output for readability
158
    $Data::Dumper::Sortkeys = 1;        # Sort the output for readability
142
#    $Data::Dumper::Purity  = 1;
159
#    $Data::Dumper::Purity  = 1;
-
 
160
    $Data::Dumper::Deepcopy = 1;        # Need to get @LIBS, @MLIBS into .cfg
143
 
161
 
144
    $self->Write (Data::Dumper->Dump ($varref, $name));
162
    $self->Write (Data::Dumper->Dump ($varref, $name));
145
}
163
}
146
 
164
 
147
#-------------------------------------------------------------------------------
165
#-------------------------------------------------------------------------------