Allow IPv6 address entry in tools>ping - Loosens valid character check
[tomato/davidwu.git] / release / src / router / lzo / util / shortf.pl
blob380d3ebe04d27e02cabca3cc90dcc78d12c358c8
1 #! /usr/bin/perl
2 ##
3 ## vi:ts=4
4 ##
5 ##---------------------------------------------------------------------------##
6 ##
7 ## Author:
8 ## Markus F.X.J. Oberhumer <markus@oberhumer.com>
9 ##
10 ## Description:
11 ## Create short files for compression test
13 ## Copyright (C) 1996-2011 Markus Franz Xaver Johannes Oberhumer
15 ##---------------------------------------------------------------------------##
17 $c = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
18 $c = "\x00\x01\x02";
19 $c = "\x00";
21 $x = $c x 1024;
23 for $i (0 .. 50) {
24 $name = sprintf("f%04d.dat",$i);
25 open(OUTFILE,">$name") || die "$0: cannot open '$name': $!";
26 binmode(OUTFILE);
27 print OUTFILE substr($x,0,$i);
28 close(OUTFILE);
31 exit(0);