]> git.mxchange.org Git - flightgear.git/blobdiff - scripts/atis/atis-lex.pl
Allow using the system version of flite and the HTS engine
[flightgear.git] / scripts / atis / atis-lex.pl
index 583080e1328c598f90530f30b173776957da4cbc..701f1c673bda2d469f4ed34d5ca7f0cd53c33f19 100755 (executable)
@@ -1,16 +1,14 @@
 #! /usr/bin/perl -w
 
 sub usage {
-  print <<\EoF;
+  print <<EoF;
 Read the atis_lexicon.hxx file and print
 the vocabulary words ... plus phonetic digits and letters.
 
 See also list-airports.pl
 
 Typical usage:
-  (echo "/"
-   FG_ROOT=/games/$whatever/fgd ATIS_ONLY=yes ./list-airports.pl
-   FG_ROOT=/games/$whatever/fgd ./atis-lex.pl) > $whatever.vlist
+   FG_ROOT=/home/whatever/fgdata FG_SRC=/home/whatever/flightgear ./atis-lex.pl > phraseology.vlist
 EoF
 }
 
@@ -24,13 +22,14 @@ main: {
     usage;
     exit;
   }
-  my $mapfn = "$fgroot/../fgs/src/ATCDCL/atis_lexicon.hxx";
+  my $mapfn = "$ENV{'FG_SRC'}/src/ATCDCL/atis_lexicon.hxx";
   my $mapch = Symbol::gensym;
   if (!open($mapch, '<', $mapfn)) {
     print STDERR "Could not open abbreviation file '$mapfn'\n";
     print STDERR "Maybe you need to set FG_ROOT\n";
     exit(1);
   }
+  print "/\n";
   while (my $line = <$mapch>) {
     chomp $line;
     if ($line =~ s/^[ \t]*Q[(]//) {
@@ -76,5 +75,6 @@ whiskey
 xray
 yankee
 zulu
+decimal
 EoF
 }