Subversion Repositories DevTools

Rev

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

Rev 311 Rev 315
Line 1... Line 1...
1
#! perl
1
#! perl
2
########################################################################
2
########################################################################
3
# Copyright ( C ) 2004 ERG Limited, All rights reserved
3
# Copyright ( C ) 2004-2010 ERG Limited, All rights reserved
4
#
4
#
5
# Module name   : jats.sh
5
# Module name   : jats.sh
6
# Module type   : Makefile system
6
# Module type   : Jats Perl Module
7
# Compiler(s)   : n/a
-
 
8
# Environment(s): jats
7
# Environment(s): jats
9
#
8
#
-
 
9
# Description:  Class to simply the process of creating and writing
10
# Description:
10
#               a new configuration file
11
#
11
#
12
# Usage:
-
 
13
#
-
 
14
# Version   Who      Date        Description
12
#               Used to create files used by JATS in the build process
15
#
13
#
-
 
14
# Usage:       $fh = ConfigurationFile::New( 'SomeName' );
-
 
15
#              $fh->HeaderSimple();
-
 
16
#              $fh->Header();
-
 
17
#              $fh->Write();
-
 
18
#              $fh->WriteLn();
-
 
19
#              $fh->Comment()
-
 
20
#              $fh->Dump()
-
 
21
#              $fh->DumpData()
-
 
22
#              $fh->Close();
-
 
23
#               
16
#......................................................................#
24
#......................................................................#
17
 
25
 
18
require 5.006_001;
26
require 5.006_001;
19
use strict;
27
use strict;
20
use warnings;
28
use warnings;
Line 48... Line 56...
48
    #
56
    #
49
    my ($self) = {
57
    my ($self) = {
50
            FH          => *CONFIG,                 # File Handle
58
            FH          => *CONFIG,                 # File Handle
51
            NAME        => $name,                   # Name of the file
59
            NAME        => $name,                   # Name of the file
52
            EOF         => 1,                       # Print EOF on closure
60
            EOF         => 1,                       # Print EOF on closure
53
            FTYPE        => 'perl',                 # vi style file type
61
            FTYPE       => 'perl',                  # vi style file type
54
            CMT         => '#',                     # Line comments begin with
62
            CMT         => '#',                     # Line comments begin with
55
            TIME        => '',                      # Inserted timestamp
63
            TIME        => '',                      # Inserted timestamp
56
            DO_TIME     => 1,                       # Insert timestamp in header
64
            DO_TIME     => 1,                       # Insert timestamp in header
57
       };
65
       };
58
 
66
 
Line 68... Line 76...
68
            $self->{'FTYPE'} = $1;
76
            $self->{'FTYPE'} = $1;
69
            $self->{'CMT'} = 'REM' if ( $1 eq 'bat' );
77
            $self->{'CMT'} = 'REM' if ( $1 eq 'bat' );
70
            $self->{'CMT'} = '//'  if ( $1 eq 'CSharp' );
78
            $self->{'CMT'} = '//'  if ( $1 eq 'CSharp' );
71
            $self->{'CMT'} = '//'  if ( $1 eq 'C++' );
79
            $self->{'CMT'} = '//'  if ( $1 eq 'C++' );
72
            $self->{'CMT'} = '//'  if ( $1 eq 'Delphi' );
80
            $self->{'CMT'} = '//'  if ( $1 eq 'Delphi' );
-
 
81
            $self->{'CMT'} = '\''  if ( $1 eq 'Basic' );
73
 
82
 
74
        } elsif ( /^--NoTime/ ) {
83
        } elsif ( /^--NoTime/ ) {
75
            $self->{'DO_TIME'} = 0;
84
            $self->{'DO_TIME'} = 0;
76
            
85
            
77
        } else {
86
        } else {