diff options
author | partain <unknown> | 1996-06-30 16:39:50 +0000 |
---|---|---|
committer | partain <unknown> | 1996-06-30 16:39:50 +0000 |
commit | 063eda14b18aadc138bc27eb460e1af93b09ca9b (patch) | |
tree | f2f53e1be6d245f7e1475762bcab5da8bb0c7957 /ghc/runtime/regex/test/malloc-test.c | |
parent | 9d4c03805bafb6b1e1d47306b6a6c591c998e517 (diff) | |
download | haskell-063eda14b18aadc138bc27eb460e1af93b09ca9b.tar.gz |
[project @ 1996-06-30 16:31:21 by partain]
partain changes through 960629
Diffstat (limited to 'ghc/runtime/regex/test/malloc-test.c')
-rw-r--r-- | ghc/runtime/regex/test/malloc-test.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/ghc/runtime/regex/test/malloc-test.c b/ghc/runtime/regex/test/malloc-test.c deleted file mode 100644 index 7e27a15a89..0000000000 --- a/ghc/runtime/regex/test/malloc-test.c +++ /dev/null @@ -1,47 +0,0 @@ - - -typedef struct { - unsigned *bits; - unsigned size; -} bits_list_type; - -#define BYTEWIDTH 8 -#define NULL 0 - -#define BITS_BLOCK_SIZE (sizeof (unsigned) * BYTEWIDTH) -#define BITS_BLOCK(position) ((position) / BITS_BLOCK_SIZE) -#define BITS_MASK(position) (1 << ((position) % BITS_BLOCK_SIZE)) - -static unsigned -init_bits_list (bits_list_ptr) - bits_list_type *bits_list_ptr; -{ - bits_list_ptr->bits = NULL; - bits_list_ptr->bits = (unsigned *) malloc (sizeof (unsigned)); - - if (bits_list_ptr->bits == NULL) - return 0; - - bits_list_ptr->bits[0] = (unsigned)0; - bits_list_ptr->size = BITS_BLOCK_SIZE; - - return 1; -} - - -main() -{ - bits_list_type dummy; - bits_list_type dummy_1; - bits_list_type dummy_2; - bits_list_type dummy_3; - - init_bits_list (&dummy); -printf("init 1\n"); - init_bits_list (&dummy_1); -printf("init 2\n"); - init_bits_list (&dummy_2); -printf("init 3\n"); - init_bits_list (&dummy_3); -printf("init 4\n"); -} |