comparison src/dynarr.c @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents c5d627a313b1
children 74fd4e045ea6
comparison
equal deleted inserted replaced
379:76b7d63099ad 380:8626e4521993
42 until the next operation that changes the length of the array. 42 until the next operation that changes the length of the array.
43 43
44 This is a container object. Declare a dynamic array of a specific type 44 This is a container object. Declare a dynamic array of a specific type
45 as follows: 45 as follows:
46 46
47 typdef struct 47 typedef struct
48 { 48 {
49 Dynarr_declare (mytype); 49 Dynarr_declare (mytype);
50 } mytype_dynarr; 50 } mytype_dynarr;
51 51
52 Use the following functions/macros: 52 Use the following functions/macros:
70 Dynarr_insert_many_at_start(d, base, len) 70 Dynarr_insert_many_at_start(d, base, len)
71 [MACRO] Append LEN elements to the beginning of the dynamic array. 71 [MACRO] Append LEN elements to the beginning of the dynamic array.
72 The elements should be contiguous in memory, starting at BASE. 72 The elements should be contiguous in memory, starting at BASE.
73 73
74 Dynarr_insert_many(d, base, len, start) 74 Dynarr_insert_many(d, base, len, start)
75 Insert LEN elements to the dynamic arrary starting at position 75 Insert LEN elements to the dynamic array starting at position
76 START. The elements should be contiguous in memory, starting at BASE. 76 START. The elements should be contiguous in memory, starting at BASE.
77 77
78 int Dynarr_length(d) 78 int Dynarr_length(d)
79 [MACRO] Return the number of elements currently in a dynamic array. 79 [MACRO] Return the number of elements currently in a dynamic array.
80 80