mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 07:14:17 +01:00
905067c30c
git-svn-id: file:///svn/tokudb@42 c7de825b-a66e-492c-adef-691d508d4ae1
26 lines
553 B
C
26 lines
553 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <assert.h>
|
|
#include <errno.h>
|
|
|
|
long long parsell (char *s) {
|
|
char *end;
|
|
errno=0;
|
|
long long r = strtoll(s, &end, 10);
|
|
assert(*end==0 && end!=s && errno==0);
|
|
return r;
|
|
}
|
|
|
|
int main (int argc, char *argv[]) {
|
|
long long i;
|
|
assert(argc==4);
|
|
long long count=parsell(argv[1]);
|
|
long long range=100*parsell(argv[2]);
|
|
long long seed =parsell(argv[3]);
|
|
srandom(seed);
|
|
for (i=0; i<count; i++) {
|
|
printf("%lld\t%ld\n", (random()%range), random());
|
|
}
|
|
return 0;
|
|
}
|
|
|