IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 18, 2010, 12:49:05 PM (16 years ago)
Author:
eugene
Message:

merging changes from trunk into branches/pap

Location:
branches/pap
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/pap

  • branches/pap/PS-IPP-PStamp/lib/PS/IPP/PStamp/RequestFile.pm

    r27589 r28003  
    2929                    $PSTAMP_SELECT_UNCONV
    3030                    $PSTAMP_USE_IMFILE_ID
    31                     $PSTAMP_WAIT_FOR_UPDATE
     31                    $PSTAMP_NO_WAIT_FOR_UPDATE
    3232                    $PSTAMP_SUCCESS
    3333                    $PSTAMP_SYSTEM_ERROR
     
    6363our $PSTAMP_USE_IMFILE_ID    = 16384;
    6464
    65 our $PSTAMP_WAIT_FOR_UPDATE  = 32768;
     65our $PSTAMP_NO_WAIT_FOR_UPDATE  = 32768;
    6666
    6767# job and result codes
     
    145145        }
    146146        if (@$stdout_buf) {
    147             my $table =  $mdcParser->parse(join "", @$stdout_buf) or
    148                 die("Unable to parse metdata config doc");
    149 
    150             $rows = parse_md_list($table);
     147            $rows = parse_md_fast($mdcParser, join "", @$stdout_buf);
    151148        } else {
    152149            print STDERR "$request_file_name contains empty request table\n";
     
    180177    return (\%header, \%req_specs);
    181178}
     179
     180sub parse_md_fast {
     181    my $mdcParser = shift;
     182    my $input = shift;
     183    my $output = ();
     184
     185    my @whole = split /\n/, $input;
     186    my @single = ();
     187
     188    my $n;
     189    while ( ($n = @whole) > 0) {
     190        my $value = shift @whole;
     191        push @single, $value;
     192        if ($value =~ /^\s*END\s*$/) {
     193            push @single, "\n";
     194
     195            my $list = parse_md_list( $mdcParser->parse( join("\n", @single ) ) ) or
     196                print STDERR "Unable to parse metdata config doc" and return undef;
     197#            my $num = @$list;
     198#            print STDERR "list has $num elments\n";
     199            push @$output, $list->[0];
     200
     201            @single = ();
     202        }
     203    }
     204    return $output;
     205}
     206
    1822071;
Note: See TracChangeset for help on using the changeset viewer.