Changeset 06133dc for gutenbach


Ignore:
Timestamp:
Oct 5, 2008, 7:55:59 PM (16 years ago)
Author:
quentin <quentin>
Branches:
master, debian, mac, no-cups, nodebathena, web
Children:
73cfabc
Parents:
4cc6b4d
git-author:
quentin <quentin> (10/05/08 19:55:59)
git-committer:
quentin <quentin> (10/05/08 19:55:59)
Message:

stop using getopt, since it's Wrong.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gutenbach/debian/lib/sipbmp3-filter

    r4cc6b4d r06133dc  
    22# Play the data on STDIN as an audio file
    33#
    4 # $Id: sipbmp3-filter,v 1.20 2008-10-04 07:51:29 root Exp $
     4# $Id: sipbmp3-filter,v 1.21 2008-10-05 23:55:59 quentin Exp $
    55# $Source: /tmp/tmp.UFBNno9997/RCS/sipbmp3-filter,v $
    66#
     
    1414# Jered Floyd <jered@mit.edu> takes very little credit for this code
    1515# apparently neither does Quentin Smith <quentin@mit.edu>
    16 
    17 use Getopt::Std;
    1816
    1917use Image::ExifTool qw(ImageInfo);
     
    6058# accounting file name
    6159
    62 # All the filter_options from lpd
    63 getopt('ACFHJLPQRZacdefhijklnprswxy', \%opts);
     60printf(STDERR "Got \@ARGV: %s\n", Dumper(\@ARGV));
     61
     62my %opts;
     63
     64my @NEWARGV;
     65
     66foreach my $arg (@ARGV) {
     67  if ($arg =~ m/^-([a-zA-Z])(.*)$/) {
     68    $opts{$1} = $2;
     69  } else {
     70    push @NEWARGV, @ARGV;
     71  }
     72}
     73
     74@ARGV = @NEWARGV;
    6475
    6576# Status messages at start of playback
     
    90101    exit 0;
    91102}
    92 #printf(STDERR Dumper(\%opts));
     103printf(STDERR Dumper(\%opts));
    93104#printf(STDERR "Job priority %s\n", $opts{'C'}) if $opts{'C'} eq 'Z';
    94105#printf(ZEPHYR "Job priority %s\n", $opts{'C'}) if ($opts{'C'} && ($opts{'C'} ne 'A'));
Note: See TracChangeset for help on using the changeset viewer.