X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fljlatest;h=bca6387a4aee0264e9dfe5530255501804a96cf3;hp=c0856fda12bb98a93a2cab1b02820b95510dc183;hb=bc7b7a8eb122206d239ec0e693676bcce31be1aa;hpb=ffd8c0873576a9e3065696a624dce6b766b77062 diff --git a/hacks/ljlatest b/hacks/ljlatest index c0856fda..bca6387a 100755 --- a/hacks/ljlatest +++ b/hacks/ljlatest @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# Copyright © 2003 Jamie Zawinski +# Copyright © 2003, 2004 Jamie Zawinski # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that @@ -27,7 +27,7 @@ use Text::Wrap qw(wrap); use bytes; # Larry can take Unicode and shove it up his ass sideways. my $progname = $0; $progname =~ s@.*/@@g; -my $version = q{ $Revision: 1.9 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/; +my $version = q{ $Revision: 1.10 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/; my $verbose = 0; @@ -290,17 +290,23 @@ sub lj_latest { print STDOUT "\n\n" if ($verbose); -# $body = `cat /tmp/last`; -# if (1) { -# local *OUT; -# open OUT, ">/tmp/last"; -# print OUT "$http\n$head\n$body\n"; -# close OUT; -# } - $body =~ s/( 10) { + my $n = int (rand ($#items - 5)); + while ($n-- > 0) { + push @items, (shift @items); + } + } + my $i = 0; - foreach (split (/\001\001/, $body)) { + foreach (@items) { next unless m/^= $count);