.\" $Id: addrdsrecwindow.3,v 1.1 2002/03/13 13:37:37 fred Exp $ .\" @(#)addrdsrecwindow.1 1.11 93/08/18 ; Labo masi cao-vlsi .if t \{\ .XS \n% .ti 0.2i addrdsrecwindow .XE .XS0 \n% .ti 0.2i addrdsrecwindow .XE0 \} .TH ADDRDSRECWINDOW 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" .SH NAME addrdsrecwindow \- adds a rectangle in the windowing of rds structure. .so buster/alliance/alc_origin.1.en.gz .SH SYNOPSYS .nf .if n \{\ .ft B \} .if t \{\ .ft CR \} #include "rwinnn.h" void addrdsrecwindow( Rectangle, RdsWindow ) rdsrec_list \(**Rectangle; rdswindow \(**RdsWindow; .ft R .fi .SH PARAMETER .TP 20 \fIRectangle\fP The rectangle to add to the windowing. .TP \fIRdsWindow\fP The head of the windowing which has to contain the rectangle. .SH DESCRIPTION The \fIaddrdsrecwindow\fP function inserts a rdsrec_list rectangle structure in the windowing of the rds structure. The rectangle is added in one or many windows of the table (it depends on his dimensions). The field \'USER\' of the rectangle is used to point to the list of windows which contains the rectangle. So, the field \'USER\' has to be saved in an added structure to the rdsrec_list structure if librfm functions are used because somes use the field \'USER\' to link rectangles (see librds about field \'USER\'). .TP \fINote\fP If the rectangle is contained in only one window, then the field \'USER\' points to a "rdswin_list" window structure. .br If the rectangle is contained in many windows, the field \'USER\' points to a "rdsrecwin_list" structure which is a list which contains windows. .PP To know if a rectangle belongs to one or many windows, use the macro \fIIsRdsOneWindow\fP defined in librwi. .SH RETURN VALUE none .SH ERRORS .if n \{\ .ft B \} .if t \{\ .ft CR \} "Rds202: rdsalloc error, can't continue !" .ft R .RS it's impossible to allocate the memory size desired .SH EXAMPLE .ta 3n 6n 9n 12n 15n 18n 21n .nf .if n \{\ .ft B \} .if t \{\ .ft CR \} #include "mutnnn.h" #include "rdsnnn.h" #include "rwinnn.h" #include "rtlnnn.h" # define POINTER_LINKREC(R) \\ \\ (((UserStruct \(**)((char \(**)(R)+sizeof(rdsrec_list)))->LINKREC ) typedef struct UserStruct { void \(**LINKREC; } UserStruct; main() { rdsfig_list \(**Figure; rdsrec_list \(**Rectangle; rdswindow \(**RdsWindow; rdswin_list \(**ScanWin; rdsrecwin_list \(**ScanRecWin; mbkenv(); rdsenv(); loadrdsparam(); Figure = addrdsfig( "core",sizeof ( UserStruct ) ); Rectangle = addrdsfigrec(Figure,"Alu1",RDS_ALU1,2,4,5,1); /\(** Using the field \'USER\' \(**/ Rectangle->USER = Rectangle; . . . . RdsWindow = allocrdswindow(); RdsWindow->XMIN = -200; RdsWindow->YMIN = -200; RdsWindow->XMAX = 200; RdsWindow->YMAX = 200; RdsWindow->DX = 4; RdsWindow->DY = 4; RdsWindow->SIDE = 100; RdsWindow->SIZE = RdsWindow->DX \(** RdsWindow->DY ; RdsWindow->WINTAB = allocrdswin( RdsWindow->SIZE ); /\(** Save the field \'USER\' of the rectangle \(**/ POINTER_LINKREC(Rectangle) = Rectangle->USER; /\(** \(**/ \fBaddrdsrecwindow\fP( Rectangle, RdsWindow ); /\(** windows associated to a rectangle are pointed by the field \'USER\' of the rectangle \(**/ /\(** getting windows (pointer \(**ScanWin) of a rectangle \(**/ if ( IsRdsOneWindow(Rectangle) ) { ScanWin = (rdswin_list \(**) Rectangle->USER; } else { ScanRecWin = Rectangle->USER; while ( ScanRecWin != NULL ) { ScanWin = (rdswin_list \(**) (ScanRecWin)->WINDOW; ScanRecWin = ScanRecWin->NEXT; } } . . . } .ft R .fi .SH SEE ALSO .BR librwi, .BR delrdsrecwindow .so buster/alliance/alc_bug_report.1.en.gz