From 0ef1a61fc316161edcd15074dba480d52836258f Mon Sep 17 00:00:00 2001 From: behdad Date: Mon, 26 Mar 2001 16:15:52 +0000 Subject: Final work for the next release --- conformance/test_gen_rand.c | 49 ++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 16 deletions(-) (limited to 'conformance/test_gen_rand.c') diff --git a/conformance/test_gen_rand.c b/conformance/test_gen_rand.c index 7094387..0e6c8e8 100644 --- a/conformance/test_gen_rand.c +++ b/conformance/test_gen_rand.c @@ -4,30 +4,47 @@ #include #include -int main (int argc, char **argv) { +int +main (int argc, char **argv) +{ int i, j, len; char c; if (argv[1]) - len = atoi(argv[1]); + len = atoi (argv[1]); else len = 10; - srand((int)(time)(NULL)); + srand ((int) (time) (NULL)); - for (i = 0; i < len; i++) { - c = rand() % (0x80 - 0x0E) + 0x0E; - switch (c) { - case 0x60: // rule p3 is not implemented in fribidi yet - case 0x3C: case 0x3E: // not mirrored in bidiref implementation - case 0x5F: // used as a escape char - case 0x13: // bidiref doesn't work proper with this - case 0x14: case 0x15: case 0x16: case 0x17: case 0x18: case 0x19: - case 0x1A: case 0x1B: case 0x1C: case 0x1D: case 0x1E: case 0x1F: - case 0x00: i--; break; - default: putchar(c); + for (i = 0; i < len; i++) + { + c = rand () % (0x80 - 0x0E) + 0x0E; + switch (c) + { + case 0x60: // rule L3 is not implemented in fribidi yet + case 0x3C: + case 0x5F: // used as a escape char + case 0x13: // bidiref doesn't work proper with this + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + case 0x00: + i--; + break; + default: + putchar (c); + } } - } - printf("\n"); + printf ("\n"); } -- cgit v1.2.3