Changeset 246900a for app/src/kon/kon


Ignore:
Timestamp:
03/14/08 14:05:07 (16 years ago)
Author:
pawelk <pawelk@…>
Branches:
master, help
Children:
b2647de
Parents:
8d3e6ab
git-author:
pawelk <pawelk@…> (03/14/08 14:05:07)
git-committer:
pawelk <pawelk@…> (03/14/08 14:05:07)
Message:

Przejrzałem kody programów pod kątem korzystania z plików konfiguracyjnych.

git-svn-id: svn://atos.wmid.amu.edu.pl/utt@10 e293616e-ec6a-49c2-aa92-f4a8b91c5d16

File:
1 edited

Legend:

Unmodified
Added
Removed
  • app/src/kon/kon

    reedf648 r246900a  
    1818my $help=0; 
    1919 
    20 my $configfile1="../../conf/con.conf"; 
    21 my $configfile2="../conf/con.conf"; 
     20my $systemconfigfile='/usr/local/etc/utt/kon.conf'; 
     21my $userconfigfile="$ENV{'HOME'}/.utt/kon.conf"; 
    2222 
    2323#read configuration files########################### 
    2424my $file; 
    25 foreach $file ($configfile1, $configfile2){ 
     25foreach $file ($systemconfigfile, $userconfigfile){ 
    2626  if(open(CONFIG, $file)){ 
    2727        while (<CONFIG>) { 
    28                 chomp;                   
    29                 s/#.*//;                 
    30                 s/^\s+//;                
    31                 s/\s+$//;                
    32                 next unless length;      
     28                chomp; 
     29                s/#.*//; 
     30                s/^\s+//; 
     31                s/\s+$//; 
     32                next unless length; 
    3333                my ($name, $value) = split(/\s*=\s*/, $_, 2); 
    3434                if(($name eq "left")or($name eq "l")){ 
     
    6565                        $help=1; 
    6666                } 
    67          
    68         }  
     67 
     68        } 
    6969        close CONFIG; 
    7070  } 
     
    485485      white_into_symbols(\$right_string); 
    486486#ponizsza linijka dodana 18 listopada 
    487       white_into_symbols(\${$CENTER_REF}[$index]);       
     487      white_into_symbols(\${$CENTER_REF}[$index]); 
    488488    } 
    489489 
Note: See TracChangeset for help on using the changeset viewer.