File: repeatfile

package info (click to toggle)
xfonts-mona 2.11-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 7,028 kB
  • ctags: 197
  • sloc: perl: 2,600; makefile: 329; lisp: 68
file content (25 lines) | stat: -rwxr-xr-x 346 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/perl
#
# usage: repeatfile n file
#
# repeat the given file n times
# (to forge phony cvt/glyf tables).
#
#	2002/2/6, by 1@2ch
#	* public domain *
#

require 'lib_util.pl';

($n, $f) = @ARGV;
ropen($f);
$s = '';
while(my $x = rstrn($BUFSIZ)) {
    $s .= $x;
}

wopen('&STDOUT');
for($i = 0; $i < $n; $i++) {
    wstrn($s);
}
wclose();