1 /*------------------------------------------------------------\
2 | |
3 | Tool : RDS |
4 | |
5 | File : rdsview.c |
6 | |
7 | Authors : Jacomme Ludovic |
8 | |
9 | Date : 27.06.95 |
10 | |
11 \------------------------------------------------------------*/
12 /*------------------------------------------------------------\
13 | |
14 | Include Files |
15 | |
16 \------------------------------------------------------------*/
17
18 # include <stdio.h>
19 # include <string.h>
20
21 # include <mut.h>
22 # include <mph.h>
23 # include "rds.h"
24
25 # include "rdsview.h"
26 # include "rdserror.h"
27
28 /*------------------------------------------------------------\
29 | |
30 | Constants |
31 | |
32 \------------------------------------------------------------*/
33 /*------------------------------------------------------------\
34 | |
35 | Types |
36 | |
37 \------------------------------------------------------------*/
38 /*------------------------------------------------------------\
39 | |
40 | Variables |
41 | |
42 \------------------------------------------------------------*/
43 /*------------------------------------------------------------\
44 | |
45 | Functions |
46 | |
47 \------------------------------------------------------------*/
48 /*------------------------------------------------------------\
49 | |
50 | View Functions |
51 | |
52 \------------------------------------------------------------*/
53 /*------------------------------------------------------------\
54 | |
55 | View Rds Rectangle |
56 | |
57 \------------------------------------------------------------*/
58
viewrdsrec(Rectangle)59 void viewrdsrec( Rectangle )
60
61 rdsrec_list *Rectangle;
62 {
63 char *LayerName;
64
65 LayerName = RDS_LAYER_NAME[ GetRdsLayer( Rectangle ) ];
66
67 fprintf( stdout, "\n\t--> Rectangle" );
68
69 if ( Rectangle->NAME != (char *)NULL )
70 {
71 fprintf( stdout, "\n\t\tNAME : %s" , Rectangle->NAME );
72 }
73 else
74 {
75 fprintf( stdout, "\n\t\tNAME : NO NAME" );
76 }
77
78 fprintf( stdout, "\n\t\tX : %ld" , Rectangle->X );
79 fprintf( stdout, "\n\t\tY : %ld" , Rectangle->Y );
80 fprintf( stdout, "\n\t\tDX : %ld" , Rectangle->DX );
81 fprintf( stdout, "\n\t\tDY : %ld" , Rectangle->DY );
82 fprintf( stdout, "\n\t\tFLAGS : %0lX", Rectangle->FLAGS );
83 fprintf( stdout, "\n\t\tLAYER : %s" , LayerName );
84 }
85
86 /*------------------------------------------------------------\
87 | |
88 | View Rds Instance |
89 | |
90 \------------------------------------------------------------*/
91
viewrdsins(Instance)92 void viewrdsins( Instance )
93
94 rdsins_list *Instance;
95 {
96 int Layer;
97 rdsrec_list *Rectangle;
98 char *TransfName;
99
100 TransfName = RDS_TRANSF_NAME[ (int)Instance->TRANSF ];
101
102 fprintf( stdout, "\n--> Instance" );
103
104 fprintf( stdout, "\n\tINSNAME : %s" , Instance->INSNAME );
105 fprintf( stdout, "\n\tFIGNAME : %s" , Instance->FIGNAME );
106 fprintf( stdout, "\n\tX : %ld", Instance->X );
107 fprintf( stdout, "\n\tY : %ld", Instance->Y );
108 fprintf( stdout, "\n\tTRANSF : %s" , TransfName );
109 fprintf( stdout, "\n\tSIZE : %d" , Instance->SIZE );
110 fprintf( stdout, "\n\tFLAGS : %x" , Instance->FLAGS );
111
112 for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ )
113 {
114 for ( Rectangle = Instance->LAYERTAB[ Layer ];
115 Rectangle != (rdsrec_list *)NULL;
116 Rectangle = Rectangle->NEXT )
117 {
118 viewrdsrec( Rectangle );
119 }
120 }
121 }
122
123 /*------------------------------------------------------------\
124 | |
125 | View Rds Figure |
126 | |
127 \------------------------------------------------------------*/
128
viewrdsfig(Figure)129 void viewrdsfig( Figure )
130
131 rdsfig_list *Figure;
132 {
133 int Layer;
134 rdsins_list *Instance;
135 rdsrec_list *Rectangle;
136
137 fprintf( stdout, "\n--> Figure" );
138
139 fprintf( stdout, "\n\tNAME : %s", Figure->NAME );
140 fprintf( stdout, "\n\tMODE : %c", Figure->MODE );
141 fprintf( stdout, "\n\tSIZE : %d", Figure->SIZE );
142 fprintf( stdout, "\n\tFLAGS : %x", Figure->FLAGS );
143
144 for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ )
145 {
146 for ( Rectangle = Figure->LAYERTAB[ Layer ];
147 Rectangle != (rdsrec_list *)NULL;
148 Rectangle = Rectangle->NEXT )
149 {
150 viewrdsrec( Rectangle );
151 }
152 }
153
154 for ( Instance = Figure->INSTANCE;
155 Instance != (rdsins_list *)NULL;
156 Instance = Instance->NEXT )
157 {
158 viewrdsins( Instance );
159 }
160 }
161