1ALLOCRDSWINREC(3) RDS PHYSICAL FUNCTIONS ALLOCRDSWINREC(3)
2
3
4
6 allocrdswinrec - allocates a structure used to create a list of tables
7 of rectangles.
8
10 #include "rwinnn.h"
11 rdswinrec_list ∗allocrdswinrec()
12
14 none
15
17 The allocrdswinrec function allocates a data structure named "rdswin‐
18 rec_list" used to contain rectangles. This structure contains a list of
19 tables of rdsrec_list structures (see librwi and librds).
20
22 The pointer to the newly allocated structure is returned.
23
25 "Rds202: rdsalloc error, can't continue !"
26 it's impossible to allocate the memory size desired
27
29 #include "mutnnn.h"
30 #include "rdsnnn.h"
31 #include "rwinnn.h"
32 #include "rtlnnn.h"
33 main()
34 {
35 rdsrec_list ∗Rectangle;
36 rdswinrec_list ∗WinRec, ∗HeadWinRec;
37 mbkenv();
38 rdsenv();
39 loadrdsparam();
40 WinRec = HeadWinRec = allocrdswinrec();
41 /∗ Fill the table with rectangles ∗/
42 for ( Counter = 0 ; Counter < RWI_MAX_REC ; Counter ++ )
43 {
44 if ( Rectangle == (rdsrec_list ∗) NULL ) break;
45 WinRec->RECTAB[Counter] = Rectangle;
46 Rectangle = Rectangle->NEXT;
47 }
48 if ( Counter == RWI_MAX_REC )
49 {
50 /∗ the table is full : allocation of a new table ∗/
51 WinRec->NEXT = allocrdswinrec();
52 WinRec = WinRec->NEXT;
53 }
54 . . . .
55 }
56
58 librwi
59
60
61
62
63
64
65ASIM/LIP6 October 1, 1997 ALLOCRDSWINREC(3)