Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
 
4
static char x[1024];
5
static char s[64] = "  ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
6
 
7
static void
8
fill(void)
9
{
10
	int i;
11
 
12
	for(i = 0; i < sizeof(x); i += sizeof(s)){
13
		memmove(&x[i], s, sizeof(s));
14
		x[i] = i>>8;
15
		x[i+1] = i;
16
	}
17
}
18
 
19
void
20
main(int argc, char *argv[])
21
{
22
	int i = 2560;
23
 
24
	if(argc > 1){
25
		argc--; argv++;
26
		i = atoi(*argv);
27
	}
28
	USED(argc);
29
 
30
	fill();
31
 
32
	while(i--)
33
		write(1, x, sizeof(x));
34
	exits(0);
35
}