1ALLOCRDSRECWIN(3) RDS PHYSICAL FUNCTIONS ALLOCRDSRECWIN(3)
2
3
4
6 allocrdsrecwin - allocates a structure used to know windows which con‐
7 tains a rectangle.
8
10 #include "rwinnn.h"
11 rdsrecwin_list ∗allocrdsrecwin()
12
14 none
15
17 The allocrdsrecwin function allocates a rdsrecwin_list structure item.
18 This structure contains a pointer to a window structure so it permits
19 to chain all windows which contains a same rectangle (see librwi).
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 # define POINTER_WINDOW(R) \
34 \
35 (((UserStruct ∗)((char ∗)(R)+sizeof(rdsrec_list)))->WINDOW )
36 typedef struct UserStruct
37 {
38 rdsrecwin_list ∗WINDOW;
39 } UserStruct;
40 main()
41 {
42 rdsfig_list ∗Figure;
43 rdsrec_list ∗Rectangle;
44 rdswin_list ∗Window;
45 mbkenv();
46 rdsenv();
47 loadrdsparam();
48 Figure = addrdsfig( "core",sizeof ( UserStruct ) );
49 Rectangle =
50 addrdsfigrec(Figure,"Alu1",RDS_ALU1,2,4,5,1);
51 POINTER_WINDOW (Rectangle) = allocrdsrecwin();
52 . . . .
53 Window = ...
54 (POINTER_WINDOW (Rectangle))->WINDOW = Window;
55 . . . .
56 }
57
59 librwi
60
61
62
63
64
65
66ASIM/LIP6 October 1, 1997 ALLOCRDSRECWIN(3)