summaryrefslogtreecommitdiff
path: root/conformance/test_gen_rand.c
diff options
context:
space:
mode:
authorbehdad <behdad>2001-03-26 16:15:52 +0000
committerbehdad <behdad>2001-03-26 16:15:52 +0000
commit0ef1a61fc316161edcd15074dba480d52836258f (patch)
tree1773d026154cc12d5f143b3b01e18afee028de85 /conformance/test_gen_rand.c
parent736d073fe0fce8d677ee8179321e3ae443f52c7c (diff)
Final work for the next release
Diffstat (limited to 'conformance/test_gen_rand.c')
-rw-r--r--conformance/test_gen_rand.c49
1 files changed, 33 insertions, 16 deletions
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 <stdio.h>
#include <time.h>
-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");
}