]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 5 Oct 2011 18:54:47 +0000 (13:54 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 5 Oct 2011 18:55:20 +0000 (13:55 -0500)
scripts/perl/tonegen/rtttl2tgml.pl

index 820e36cc4e43e8a9bdfc43c3f0367982c598dc10..a8a3ed0632fc092c7799a09a041b64c6404e5a45 100644 (file)
@@ -18,8 +18,19 @@ our $NOTES = {
 
 
 my $file = shift or die "no file\n";
+my $rtttl;
+my $cr = "\n";
 
-my $rtttl = `cat $file`;
+if ($file eq "-nocr") {
+  $cr = "";
+  $file = shift;
+}
+
+if ($file eq "-") {
+  $rtttl = <STDIN>;
+} else {
+  $rtttl = `cat $file`;
+}
 
 $rtttl =~ s/\n//g;
 
@@ -53,7 +64,7 @@ foreach (@{$all}) {
 
   #print STDERR "$_->[0] $_->[1] $_->[2] $_->[3]\n";
   
-  print "%($ms, 0, $NOTES->{$_->[1]}->[$_->[2]]);\n";
+  print "%($ms,0,$NOTES->{$_->[1]}->[$_->[2]]);" . $cr;
 
 }