亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? synccompare.pl

?? funambol windows mobile plugin source code, the source code is taken from the funambol site
?? PL
字號(hào):
#! /usr/bin/perl -w
#
#
# Copyright (C) 2006-2007 Funambol, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY, TITLE, NONINFRINGEMENT or FITNESS FOR A PARTICULAR
# PURPOSE.  See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307  USA
#

use strict;
use encoding 'utf8';
use Algorithm::Diff;

# ignore differences caused by specific servers?
my $server = $ENV{CLIENT_TEST_SERVER} || "funambol";
my $scheduleworld = $server =~ /scheduleworld/;
my $synthesis = $server =~ /synthesis/;
my $egroupware = $server =~ /egroupware/;
my $funambol = $server =~ /funambol/;

sub Usage {
  print "$0 <vcards.vcf\n";
  print "   normalizes one file (stdin or single argument), prints to stdout\n";
  print "$0 vcards1.vcf vcards2.vcf\n";
  print "   compares the two files\n";
  print "Also works for iCalendar files.\n";
}

# parameters: file handle with input, width to use for reformatted lines
# returns list of lines without line breaks
sub Normalize {
  my $in = shift;
  my $width = shift;

  $_ = join( "", <$in> );
  s/\r//g;

  my @items = ();

  foreach $_ ( split( /(?:(?<=\nEND:VCARD)|(?<=\nEND:VCALENDAR))\n*/ ) ) {
    # undo line continuation
    s/\n\s//gs;
    # ignore charset specifications, assume UTF-8
    s/;CHARSET="?UTF-8"?//g;

    # UID may differ, but only in vCards and journal entries:
    # in calendar events the UID needs to be preserved to handle
    # meeting invitations/replies correctly
    s/((VCARD|VJOURNAL).*)^UID:[^\n]*\n/$1/msg;

    # expand <foo> shortcuts to TYPE=<foo>
    while (s/^(ADR|EMAIL|TEL)([^:\n]*);(HOME|OTHER|WORK|PARCEL|INTERNET|CAR|VOICE|CELL|PAGER)/$1;TYPE=$3/mg) {}

    # the distinction between an empty and a missing property
    # is vague and handled differently, so ignore empty properties
    s/^[^:\n]*:;*\n//mg;

    # use separate TYPE= fields
    while( s/^(\w*)([^:\n]*);TYPE=(\w*),(\w*)/$1$2;TYPE=$3;TYPE=$4/mg ) {}

    # replace parameters with a sorted parameter list
    s!^([^;:\n]*);(.*?):!$1 . ";" . join(';',sort(split(/;/, $2))) . ":"!meg;

    # Map non-standard ADR;TYPE=OTHER to PARCEL, just like SyncEvolution does
    s/^ADR;TYPE=OTHER/ADR;TYPE=PARCEL/mg;
    # Ignore remaining "other" email, address and telephone type - this is
    # an Evolution specific extension which might not be preserved.
    s/^(ADR|EMAIL|TEL)([^:\n]*);TYPE=OTHER/$1$2/mg;
    # TYPE=PREF on the other hand is not used by Evolution, but
    # might be sent back.
    s/^(ADR|EMAIL)([^:\n]*);TYPE=PREF/$1$2/mg;
    # Evolution does not need TYPE=INTERNET for email
    s/^(EMAIL)([^:\n]*);TYPE=INTERNET/$1$2/mg;
    # ignore TYPE=PREF in address, does not matter in Evolution
    s/^((ADR|LABEL)[^:\n]*);TYPE=PREF/$1/mg;
    # ignore extra separators in multi-value fields
    s/^((ORG|N|(ADR[^:\n]*?)):.*?);*$/$1/mg;
    # the type of certain fields is ignore by Evolution
    s/^X-(AIM|GROUPWISE|ICQ|YAHOO);TYPE=HOME/X-$1/gm;
    # Evolution ignores an additional pager type
    s/^TEL;TYPE=PAGER;TYPE=WORK/TEL;TYPE=PAGER/gm;
    # PAGER property is sent by Evolution, but otherwise ignored
    s/^LABEL[;:].*\n//mg;
    # TYPE=VOICE is the default in Evolution and may or may not appear in the vcard;
    # this simplification is a bit too agressive and hides the problematic
    # TYPE=PREF,VOICE combination which Evolution does not handle :-/
    s/^TEL([^:\n]*);TYPE=VOICE,([^:\n]*):/TEL$1;TYPE=$2:/mg;
    s/^TEL([^:\n]*);TYPE=([^;:\n]*),VOICE([^:\n]*):/TEL$1;TYPE=$2$3:/mg;
    s/^TEL([^:\n]*);TYPE=VOICE([^:\n]*):/TEL$1$2:/mg;
    # don't care about the TYPE property of PHOTOs
    s/^PHOTO;(.*)TYPE=[A-Z]*/PHOTO;$1/mg;
    # encoding is not case sensitive, skip white space in the middle of binary data
    if (s/^PHOTO;.*?ENCODING=(b|B|BASE64).*?:\s*/PHOTO;ENCODING=B: /mgi) {
      while (s/^PHOTO(.*?): (\S+)[\t ]+(\S+)/PHOTO$1: $2$3/mg) {}
    }
    # ignore extra day factor in front of weekday
    s/^RRULE:(.*)BYDAY=\+?1(\D)/RRULE:$1BYDAY=$2/mg;
    # remove default VALUE=DATE-TIME
    s/^(DTSTART|DTEND)([^:\n]*);VALUE=DATE-TIME/$1$2/mg;

    # remove fields which may differ
    s/^(PRODID|CREATED|DTSTAMP|LAST-MODIFIED|REV):.*\r?\n?//gm;
    # remove optional fields
    s/^(METHOD|X-WSS-[A-Z]*):.*\r?\n?//gm;

    if ($scheduleworld || $egroupware || $synthesis) {
      # does not preserve X-EVOLUTION-UI-SLOT=
      s/^(\w+)([^:\n]*);X-EVOLUTION-UI-SLOT=\d+/$1$2/mg;
    }

    if ($scheduleworld) {
      # cannot distinguish EMAIL types
      s/^EMAIL;TYPE=\w*/EMAIL/mg;
      # replaces certain TZIDs with more up-to-date ones
      s;TZID(=|:)/(scheduleworld.com|softwarestudio.org)/Olson_\d+_\d+/;TZID$1/foo.com/Olson_20000101_1/;mg;
    }

    if ($scheduleworld || $synthesis) {
      # only preserves ORG "Company", but loses "Department" and "Office"
      s/^ORG:([^;:\n]+)(;[^\n]*)/ORG:$1/mg;
    }

    if ($funambol) {
      # only preserves ORG "Company";"Department", but loses "Office"
      s/^ORG:([^;:\n]+)(;[^;:\n]*)(;[^\n]*)/ORG:$1$2/mg;
    }

    if ($synthesis) {
      # does not preserve certain properties
      s/^(FN|BDAY|X-MOZILLA-HTML|X-EVOLUTION-FILE-AS|X-AIM|NICKNAME|PHOTO|CALURI)(;[^:;\n]*)*:.*\r?\n?//gm;
      # default ADR is HOME
      s/^ADR;TYPE=HOME/ADR/gm;
      # only some parts of N are preserved
      s/^N\:(.*)/@_ = split(\/(?<!\\);\/, $1); "N:$_[0];" . ($_[1] || "") . ";;" . ($_[3] || "")/gme;
      # this vcard contains too many ADR and PHONE entries - ignore it
      if (/This is a test case which uses almost all Evolution fields/) {
        next;
      }
      # breaks lines at semicolons, which adds white space
      while( s/^ADR:(.*); +/ADR:$1;/gm ) {}
    }

    if ($egroupware) {
      # CLASS:PUBLIC is added if none exists (as in our test cases),
      # several properties not preserved
      s/^(BDAY|CATEGORIES|FBURL|PHOTO|FN|X-[A-Z-]*|CALURI|CLASS|NICKNAME|UID|TRANSP|PRIORITY|SEQUENCE)(;[^:;\n]*)*:.*\r?\n?//gm;
      # org gets truncated
      s/^ORG:([^;:\n]*);.*/ORG:$1/gm;
    }

    if ($funambol) {
      # several properties are not preserved
      s/^(FN|X-MOZILLA-HTML|PHOTO)(;[^:;\n]*)*:.*\r?\n?//gm;

      # quoted-printable line breaks are =0D=0A, not just single =0A
      s/(?<!=0D)=0A/=0D=0A/g;
    }

    if ($funambol || $egroupware) {
      # NOTE may be truncated due to length resistrictions
      s/^(NOTE(;[^:;\n]*)*:.{0,160}).*(\r?\n?)/$1$3/gm;
    }

    # treat X-MOZILLA-HTML=FALSE as if the property didn't exist
    s/^X-MOZILLA-HTML:FALSE\r?\n?//gm;

    my @formatted = ();

    # Modify lines to cover not more than
    # $width characters by folding lines (as done for the N or SUMMARY above),
    # but also indent each inner BEGIN/END block by 2 spaces
    # and finally sort the lines.
    # We need to keep a stack of open blocks in @formatted:
    # - BEGIN creates another open block
    # - END closes it, sorts it, and adds as single string to the parent block
    push @formatted, [];
    foreach $_ (split /\n/, $_) {
      if (/^BEGIN:/) {
        # start a new block
        push @formatted, [];
      }

      my $spaces = "  " x ($#formatted - 1);
      my $thiswidth = $width -1 - length($spaces);
      $thiswidth = 1 if $thiswidth <= 0;
      s/(.{$thiswidth})(?!$)/$1\n /g;
      s/^(.*)$/$spaces$1/mg;
      push @{$formatted[$#formatted]}, $_;

      if (/^\s*END:/) {
        my $block = pop @formatted;
        my $begin = shift @{$block};
        my $end = pop @{$block};

        # Keep begin/end as first/last line,
        # inbetween sort, but so that N or SUMMARY are
        # at the top. This ensures that the order of items
        # is the same, even if individual properties differ.
        # Also put indented blocks at the end, not the top.
        sub numspaces {
          my $str = shift;
          $str =~ /^(\s*)/;
          return length($1);
        }
        $_ = join("\n",
                  $begin,
                  sort( { $a =~ /^\s*(N|SUMMARY):/ ? -1 :
                          $b =~ /^\s*(N|SUMMARY):/ ? 1 :
                          ($a =~ /^\s/ && $b =~ /^\S/) ? 1 :
                          numspaces($a) == numspaces($b) ? $a cmp $b :
                          numspaces($a) - numspaces($b) }
                        @{$block} ),
                  $end);
        push @{$formatted[$#formatted]}, $_;
      }
    }

    push @items, ${$formatted[0]}[0];
  }

  return split( /\n/, join( "\n\n", sort @items ));
}

# number of columns available for output:
# try tput without printing the shells error if not found,
# default to 80
my $columns = `which tput >/dev/null 2>/dev/null && tput 2>/dev/null && tput cols`;
if ($? || !$columns) {
  $columns = 80;
}

if($#ARGV > 1) {
  # error
  Usage();
  exit 1;
} elsif($#ARGV == 1) {
  # comparison

  my ($file1, $file2) = ($ARGV[0], $ARGV[1]);

  open(IN1, "<:utf8", $file1) || die "$file1: $!";
  open(IN2, "<:utf8", $file2) || die "$file2: $!";
  my $singlewidth = int(($columns - 3) / 2);
  $columns = $singlewidth * 2 + 3;
  my @normal1 = Normalize(*IN1{IO}, $singlewidth);
  my @normal2 = Normalize(*IN2{IO}, $singlewidth);
  close(IN1);
  close(IN2);

  # Produce output where each line is marked as old (aka remove) with o,
  # as new (aka added) with n, and as unchanged with u at the beginning.
  # This allows simpler processing below.
  my $res = 0;
  if (0) {
    # $_ = `diff "--old-line-format=o %L" "--new-line-format=n %L" "--unchanged-line-format=u %L" "$normal1" "$normal2"`;
    # $res = $?;
  } else {
    # convert into same format as diff above - this allows reusing the
    # existing output formatting code
    my $diffs_ref = Algorithm::Diff::sdiff(\@normal1, \@normal2);
    @_ = ();
    my $hunk;
    foreach $hunk ( @{$diffs_ref} ) {
      my ($type, $left, $right) = @{$hunk};
      if ($type eq "-") {
        push @_, "o $left";
        $res = 1;
      } elsif ($type eq "+") {
        push @_, "n $right";
        $res = 1;
      } elsif ($type eq "c") {
        push @_, "o $left";
        push @_, "n $right";
        $res = 1;
      } else {
        push @_, "u $left";
      }
    }

    $_ = join("\n", @_);
  }

  if ($res) {
    printf "%*s | %s\n", $singlewidth, "before sync", "after sync";
    printf "%*s <\n", $singlewidth, "removed during sync";
    printf "%*s > %s\n", $singlewidth, "", "added during sync";
    print "-" x $columns, "\n";

    # fix confusing output like:
    # BEGIN:VCARD                             BEGIN:VCARD
    #                                      >  N:new;entry
    #                                      >  FN:new
    #                                      >  END:VCARD
    #                                      >
    #                                      >  BEGIN:VCARD
    # and replace it with:
    #                                      >  BEGIN:VCARD
    #                                      >  N:new;entry
    #                                      >  FN:new
    #                                      >  END:VCARD
    #
    # BEGIN:VCARD                             BEGIN:VCARD
    #
    # With the o/n/u markup this presents itself as:
    # u BEGIN:VCARD
    # n N:new;entry
    # n FN:new
    # n END:VCARD
    # n
    # n BEGIN:VCARD
    #
    # The alternative case is also possible:
    # o END:VCARD
    # o 
    # o BEGIN:VCARD
    # o N:old;entry
    # u END:VCARD

    # case one above
    while( s/^u BEGIN:(VCARD|VCALENDAR)\n((?:^n .*\n)+?)^n BEGIN:/n BEGIN:$1\n$2u BEGIN:/m) {}
    # same for the other direction
    while( s/^u BEGIN:(VCARD|VCALENDAR)\n((?:^o .*\n)+?)^o BEGIN:/o BEGIN:$1\n$2u BEGIN:/m) {}

    # case two
    while( s/^o END:(VCARD|VCALENDAR)\n((?:^o .*\n)+?)^u END:/u END:$1\n$2o END:/m) {}
    while( s/^n END:(VCARD|VCALENDAR)\n((?:^n .*\n)+?)^u END:/u END:$1\n$2n END:/m) {}

    # split at end of each record
    my $spaces = " " x $singlewidth;
    foreach $_ (split /(?:(?<=. END:VCARD\n)|(?<=. END:VCALENDAR\n))(?:^. \n)*/m, $_) {
      # ignore unchanged records
      if (!length($_) || /^((u [^\n]*\n)*(u [^\n]*?))$/s) {
        next;
      }

      # make all lines equally long in terms of printable characters
      s/^(.*)$/$1 . (" " x ($singlewidth + 2 - length($1)))/gme;

      # convert into side-by-side output
      my @buffer = ();
      foreach $_ (split /\n/, $_) {
        if (/^u (.*)/) {
          print join(" <\n", @buffer), " <\n" if $#buffer >= 0;
          @buffer = ();
          print $1, "   ", $1, "\n";
        } elsif (/^o (.*)/) {
          # preserve in buffer for potential merging with "n "
          push @buffer, $1;
        } else {
          /^n (.*)/;
          # have line to be merged with?
          if ($#buffer >= 0) {
            print shift @buffer, " | ", $1, "\n";
          } else {
            print join(" <\n", @buffer), " <\n" if $#buffer >= 0;
            print $spaces, " > ", $1, "\n";
          }
        }
      }
      print join(" <\n", @buffer), " <\n" if $#buffer >= 0;
      @buffer = ();

      print "-" x $columns, "\n";
    }
  }

  # unlink($normal1);
  # unlink($normal2);
  exit($res ? 1 : 0);
} else {
  # normalize
  my $in;
  if( $#ARGV >= 0 ) {
    open(IN, "<$ARGV[0]") || die "$ARGV[0]: $!";
    $in = *IN{IO};
  } else {
    $in = *STDIN{IO};
  }

  print STDOUT join("\n", Normalize($in, $columns)), "\n";
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
69久久99精品久久久久婷婷| 亚洲精品亚洲人成人网| 91精品国产综合久久久久| 91在线视频网址| 国产麻豆视频一区二区| 久久成人综合网| 亚洲超丰满肉感bbw| 一区二区三区日韩欧美| 欧美成人伊人久久综合网| 欧美日韩一区高清| 欧美伊人久久大香线蕉综合69| 福利一区二区在线观看| 国产精品综合二区| 国产综合色精品一区二区三区| 免费精品视频在线| 青青草一区二区三区| 午夜久久久久久久久久一区二区| 亚洲一区二区在线观看视频 | 中文字幕一区二区视频| 欧美国产乱子伦| 中文字幕av一区 二区| 日韩三级视频在线看| 欧美一区二区视频在线观看2020| 欧美精品18+| 欧美三级日韩在线| 777xxx欧美| 日韩三级精品电影久久久| 91精品国产综合久久精品| 欧美一级一区二区| 欧美成人午夜电影| 337p日本欧洲亚洲大胆色噜噜| 欧美一级日韩一级| 日韩欧美高清一区| 国产日韩欧美精品综合| 欧美激情中文字幕一区二区| 国产精品私人影院| 综合婷婷亚洲小说| 午夜精品免费在线观看| 久久草av在线| 高清shemale亚洲人妖| 91麻豆福利精品推荐| 欧美丝袜自拍制服另类| 日韩欧美自拍偷拍| 精品少妇一区二区三区免费观看 | 18成人在线视频| 中文字幕一区在线观看视频| 亚洲亚洲精品在线观看| 男女男精品网站| 狠狠v欧美v日韩v亚洲ⅴ| 成人午夜电影网站| 欧美日韩一区二区在线观看视频 | 亚洲精品乱码久久久久久黑人| 性久久久久久久| 国产精品色在线| 久久―日本道色综合久久| 亚洲三级在线免费观看| 久久66热偷产精品| 欧美在线不卡视频| 国产欧美日韩麻豆91| 日韩精品电影一区亚洲| 99国产精品国产精品毛片| 日韩一区国产二区欧美三区| 国产精品成人午夜| 久久99精品久久久久久国产越南 | 亚洲一区二区三区视频在线播放 | 欧美婷婷六月丁香综合色| 久久亚洲一级片| 日韩不卡免费视频| 91啦中文在线观看| 久久先锋资源网| 免费的成人av| 欧美妇女性影城| 一区二区三区不卡视频在线观看| 国产成a人无v码亚洲福利| 日韩色在线观看| 日韩有码一区二区三区| 欧美曰成人黄网| 综合激情成人伊人| 成人午夜激情在线| 国产亚洲va综合人人澡精品| 美女一区二区三区| 制服.丝袜.亚洲.另类.中文| 亚洲欧美日韩国产手机在线| 成人一区二区三区| www亚洲一区| 青青草原综合久久大伊人精品优势 | 91小视频在线| 亚洲国产精品av| 国产1区2区3区精品美女| 精品久久一区二区| 美女国产一区二区| 91精品久久久久久久99蜜桃 | 久久99国产精品麻豆| 欧美一区二区三区成人| 午夜电影一区二区三区| 欧美日韩视频不卡| 亚洲国产成人va在线观看天堂| 91国内精品野花午夜精品| 一区二区三区自拍| 91麻豆国产精品久久| 一区二区视频在线看| 色先锋aa成人| 亚洲一区在线观看免费| 欧美日高清视频| 水野朝阳av一区二区三区| 欧美精品日韩一本| 欧美色精品天天在线观看视频| 亚洲老司机在线| 欧美日韩日本视频| 日韩av电影一区| 精品免费国产二区三区 | 欧美裸体一区二区三区| 亚洲电影一级片| 欧美一区二区视频观看视频| 欧美aaaaa成人免费观看视频| 欧美成人欧美edvon| 国产资源在线一区| 欧美国产欧美综合| 日本精品一区二区三区高清| 亚洲一区在线观看免费观看电影高清| 欧美影院午夜播放| 男女男精品视频网| 国产日韩欧美高清在线| 99精品视频一区| 亚洲最色的网站| 欧美一区二区国产| 国产美女精品一区二区三区| 成人免费一区二区三区视频| 欧美色视频一区| 久久se这里有精品| 自拍偷自拍亚洲精品播放| 欧洲亚洲国产日韩| 看电视剧不卡顿的网站| 国产精品全国免费观看高清 | 成人app下载| 亚洲国产日韩a在线播放性色| 91麻豆精品国产自产在线| 狠狠色丁香久久婷婷综合_中| 亚洲欧美色综合| 欧美一区三区四区| 成人午夜大片免费观看| 亚洲电影你懂得| 国产日韩精品视频一区| 欧美日韩国产在线观看| 国产精品 日产精品 欧美精品| 亚洲精品老司机| 久久久久久97三级| 欧美日韩视频在线第一区 | 久久精品国产成人一区二区三区| 国产精品妹子av| 欧美精品视频www在线观看| 国产xxx精品视频大全| 亚洲午夜精品一区二区三区他趣| 2021国产精品久久精品| 日本韩国欧美在线| 国产美女精品一区二区三区| 亚洲国产精品久久人人爱| 国产日韩视频一区二区三区| 欧美军同video69gay| eeuss国产一区二区三区| 蜜臀99久久精品久久久久久软件| 综合av第一页| 国产亚洲精品精华液| 欧美美女一区二区| 99re热这里只有精品免费视频| 久久国产精品免费| 亚洲午夜在线电影| 国产精品色在线观看| 欧美一级片在线看| 欧美专区亚洲专区| 99综合影院在线| 国产在线精品免费av| 日韩国产精品久久久| 亚洲女人的天堂| 国产欧美久久久精品影院| 91麻豆精品国产91久久久使用方法| jizzjizzjizz欧美| 国产成人日日夜夜| 看国产成人h片视频| 午夜视频一区在线观看| 亚洲伦理在线精品| 国产精品久久网站| 国产欧美日韩三区| 精品久久久久久久久久久久包黑料 | 欧美精品在线观看一区二区| 91偷拍与自偷拍精品| 高清不卡一二三区| 国产一区二区三区国产| 美女视频免费一区| 日韩国产在线观看| 亚洲丰满少妇videoshd| 一区二区三区精品在线| 亚洲精品大片www| 亚洲猫色日本管| 国产精品久久福利| 国产欧美精品区一区二区三区| 日韩欧美第一区| 日韩欧美国产不卡| 欧美成人伊人久久综合网| 日韩免费看的电影|