Changeset cc8ee5a in subsurface


Ignore:
Timestamp:
Jan 14, 2017, 7:23:04 PM (4 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
59e10d1
Parents:
1ab6e7f
git-author:
Dirk Hohndel <dirk@…> (01/14/17 19:22:21)
git-committer:
Dirk Hohndel <dirk@…> (01/14/17 19:23:04)
Message:

Avoid duplicate entries when parsing libdivecomputer descriptors

This just fixes the tool used for the next commit.

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/parse-descriptor.pl

    rf80c3d8 rcc8ee5a  
    2323
    2424my $lastVend = "";
     25my $lastMod = "";
    2526my @descriptors = ();
    2627while (<$fh>) {
     
    3233foreach (@sortedDescriptors) {
    3334        ($vend, $mod) = split(',', $_);
     35        next if ($vend eq $lastVend && $mod eq $lastMod);
    3436        if ($type eq "html") {
    3537                if ($vend eq $lastVend) {
     
    6062        }
    6163        $lastVend = $vend;
     64        $lastMod = $mod;
    6265}
    6366if ($type eq "html") {
Note: See TracChangeset for help on using the changeset viewer.