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
This commit is contained in:
parent
8d3e6ab33b
commit
246900abc9
@ -629,13 +629,13 @@ may be set in configuration files. The default location of the
|
||||
configuration files for a component named @command{@var{program}} are
|
||||
|
||||
@example
|
||||
@file{/etc/utt/conf/@var{program}.conf}
|
||||
@file{/usr/local/etc/utt/@var{program}.conf}
|
||||
@end example
|
||||
|
||||
for system-wide configuration file and
|
||||
|
||||
@example
|
||||
@file{~/.utt/conf/@var{program}.conf}
|
||||
@file{~/.utt/@var{program}.conf}
|
||||
@end example
|
||||
|
||||
for user configuration file.
|
||||
|
@ -5,6 +5,7 @@ all: compiledic aut2fsa
|
||||
|
||||
compiledic:
|
||||
|
||||
|
||||
aut2fsa: aut2fsa.cc
|
||||
#g++ -m32 -Wno-deprecated -O3 -fpermissive -static -o aut2fsa aut2fsa.cc
|
||||
g++ $(CFLAG1) -o aut2fsa aut2fsa.cc
|
||||
|
@ -17,12 +17,12 @@ my $column=0;
|
||||
my $ignore=0;
|
||||
my $help=0;
|
||||
|
||||
my $configfile1="../../conf/con.conf";
|
||||
my $configfile2="../conf/con.conf";
|
||||
my $systemconfigfile='/usr/local/etc/utt/kon.conf';
|
||||
my $userconfigfile="$ENV{'HOME'}/.utt/kon.conf";
|
||||
|
||||
#read configuration files###########################
|
||||
my $file;
|
||||
foreach $file ($configfile1, $configfile2){
|
||||
foreach $file ($systemconfigfile, $userconfigfile){
|
||||
if(open(CONFIG, $file)){
|
||||
while (<CONFIG>) {
|
||||
chomp;
|
||||
|
@ -7,12 +7,12 @@ my $help=0;
|
||||
my $gap_fill="\n-----\n";
|
||||
my $spaces=0;
|
||||
|
||||
my $configfile1="../../conf/kot.conf";
|
||||
my $configfile2="../conf/kot.conf";
|
||||
my $systemconfigfile='/usr/local/etc/utt/kot.conf';
|
||||
my $userconfigfile="$ENV{'HOME'}/.utt/kot.conf";
|
||||
|
||||
#read configuration files###########################
|
||||
my $file;
|
||||
foreach $file ($configfile1, $configfile2){
|
||||
foreach $file ($systemconfigfile, $userconfigfile){
|
||||
if(open(CONFIG, $file)){
|
||||
while (<CONFIG>) {
|
||||
chomp;
|
||||
@ -93,7 +93,3 @@ while(<>)
|
||||
|
||||
print $form;
|
||||
}
|
||||
|
||||
#print $gap_fill;
|
||||
|
||||
# print "\n";
|
||||
|
@ -6,12 +6,12 @@ use Getopt::Long;
|
||||
my $interactive=0;
|
||||
my $help;
|
||||
|
||||
my $configfile1=".../../conf/tok.conf";
|
||||
my $configfile2="../conf/tok.conf";
|
||||
my $systemconfigfile='/usr/local/etc/utt/tok.conf';
|
||||
my $userconfigfile="$ENV{'HOME'}/.utt/tok.conf";
|
||||
|
||||
#read configuration files###########################
|
||||
my $file;
|
||||
foreach $file ($configfile1, $configfile2){
|
||||
foreach $file ($systemconfigfile, $userconfigfile){
|
||||
if(open(CONFIG, $configfile1)){
|
||||
while (<CONFIG>) {
|
||||
chomp;
|
||||
@ -95,4 +95,3 @@ sub seg
|
||||
print "\n";
|
||||
$offset += $len;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user