view gaim2blt.pl @ 5344:fda2d94b9434

[gaim-migrate @ 5720] Tim Mooney (enchanter) writes: "configure.ac calls AC_PATH_XTRA and then assumes $x_libraries will be set. You can't rely on this, because on platforms where the libraries and headers are in places that the development toolchain searches by default, configure will *NOT* set $x_libraries or $x_includes. This incorrect assumption causes configure to miss several X-related tests, and it causes the final link to fail on platforms like Tru64 UNIX or Solaris (and likely others)." as this did not break my compile, i'm going ahead and committing this. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 10 May 2003 12:47:17 +0000
parents 66bf7ecefedd
children
line wrap: on
line source

#!/usr/bin/perl -w
# Original by Andy Harrison,
# Rewrite by Decklin Foster,
# Available under the GPL.

package Gaim2Blt;
use strict;
use Getopt::Std;
use vars qw(%opts $in_group);

getopts('s:', \%opts);
die "usage: $0 -s 'screen name' gaim.buddy\n" unless $opts{s};

print <<"EOF";
Config {
  version 1
}
User {
  screenname "$opts{s}"
}
Buddy {
  list {
EOF

while (<>) {
    chomp;
    my ($type, $args) = split ' ', $_, 2;
    next unless $type;

    if ($type eq 'g') {
        print "    }\n" if ($in_group);
        print qq(    "$args" {\n);
        $in_group = 1;
    } elsif ($type eq 'b') {
        my ($buddy, $alias) = split /:/, $args;
        print qq(      "$buddy"\n);
    }
}

print <<"EOF";
    }
  }
}
EOF