1 /*------------------------------------------------------------\
2 | |
3 | This file is part of the Alliance CAD System Copyright |
4 | (C) Laboratoire LIP6 - D�partement ASIM Universite P&M Curie|
5 | |
6 | Home page : http://www-asim.lip6.fr/alliance/ |
7 | E-mail : mailto:alliance-users@asim.lip6.fr |
8 | |
9 | This progam is free software; you can redistribute it |
10 | and/or modify it under the terms of the GNU General Public |
11 | License as published by the Free Software Foundation; |
12 | either version 2 of the License, or (at your option) any |
13 | later version. |
14 | |
15 | Alliance VLSI CAD System is distributed in the hope that |
16 | it will be useful, but WITHOUT ANY WARRANTY; |
17 | without even the implied warranty of MERCHANTABILITY or |
18 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
19 | Public License for more details. |
20 | |
21 | You should have received a copy of the GNU General Public |
22 | License along with the GNU C Library; see the file COPYING. |
23 | If not, write to the Free Software Foundation, Inc., |
24 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
25 | |
26 \------------------------------------------------------------*/
27
28 /*------------------------------------------------------------\
29 | |
30 | Tool : GRAAL |
31 | |
32 | File : graal.c |
33 | |
34 | Author : Jacomme Ludovic |
35 | |
36 | Date : 28.03.95 |
37 | |
38 \------------------------------------------------------------*/
39
40 # ident "@(#)GRAAL ver 1.10 January 1995"
41
42 /*------------------------------------------------------------\
43 | |
44 | Include Files |
45 | |
46 \------------------------------------------------------------*/
47
48 # include <stdio.h>
49 # include <string.h>
50 # include <Xm/Xm.h>
51 # include "mut.h"
52 # include "mph.h"
53 # include "rds.h"
54 # include "rpr.h"
55 # include "rwi.h"
56 # include "rut.h"
57 # include "rtl.h"
58 # include "GSB.h"
59 # include "GRM.h"
60 # include "GMX.h"
61 # include "GRM_window.h"
62 # include "GRM_error.h"
63
64 # include "graal.h"
65
66 /*------------------------------------------------------------\
67 | |
68 | Constants |
69 | |
70 \------------------------------------------------------------*/
71 /*------------------------------------------------------------\
72 | |
73 | Types |
74 | |
75 \------------------------------------------------------------*/
76 /*------------------------------------------------------------\
77 | |
78 | Variables |
79 | |
80 \------------------------------------------------------------*/
81 /*------------------------------------------------------------\
82 | |
83 | Functions |
84 | |
85 \------------------------------------------------------------*/
86 /*------------------------------------------------------------\
87 | |
88 | present |
89 | |
90 \------------------------------------------------------------*/
91
GraalPresent()92 void GraalPresent()
93 {
94 alliancebanner_with_authors( "Graal", VERSION,
95 "Graphic layout editor", "1999",
96 ALLIANCE_VERSION,
97 "Ludovic Jacomme and Frederic Venot" );
98 }
99
100 /*------------------------------------------------------------\
101 | |
102 | main |
103 | |
104 \------------------------------------------------------------*/
105
main(argc,argv)106 int main( argc, argv )
107
108 int argc;
109 char *argv[];
110 {
111 char *FileName = (char *)NULL;
112 char WindowInfo = 0;
113 char Debug = 0;
114 int Index;
115
116 GraalPresent();
117
118 mbkenv();
119 rdsenv();
120
121 for ( Index = 1;
122 Index < argc;
123 Index++ )
124 {
125 if ( ! strcmp( argv[ Index ], "-l" ) )
126 {
127 if ( ( Index + 1 ) < argc )
128 {
129 Index = Index + 1;
130 FileName = argv[ Index ];
131 }
132 }
133 else
134 if ( ! strcmp( argv[ Index ], "-w" ) )
135 {
136 WindowInfo = 1;
137 }
138 else
139 if ( ! strcmp( argv[ Index ], "-debug" ) )
140 {
141 Debug = 1;
142 }
143 else
144 if ( ! strcmp( argv[ Index ], "-scale" ) )
145 {
146 Index++;
147
148 if ( Index < argc )
149 {
150 GRAAL_SCALE = atol( argv[ Index ] );
151 if ( GRAAL_SCALE <= 0 ) GRAAL_SCALE = 1;
152 }
153 }
154 else
155 if ( ! strcmp( argv[ Index ], "-xor" ) )
156 {
157 GRAAL_XOR_CURSOR = GRAAL_TRUE;
158 }
159 else
160 if ( ! strcmp( argv[ Index ], "-force" ) )
161 {
162 GRAAL_FORCE_DISPLAY = GRAAL_TRUE;
163 }
164 else
165 if ( ! strcmp( argv[ Index ], "-install" ) )
166 {
167 GRAAL_SWITCH_COLOR_MAP = GRAAL_TRUE;
168 }
169 }
170
171 if ( Debug ) rdsdebug();
172
173 rdsbegin();
174
175 Graalenv();
176 loadrdsparam();
177 GraalLoadParameters();
178
179 GraalInitializeRessources( &argc, argv );
180 GraalInitializeWindow();
181
182 if ( WindowInfo )
183 {
184 fprintf( stdout, "\nGraal window\n" );
185 fprintf( stdout, "\n XMIN : %ld" , GraalWindowXmin / GRAAL_RDS_LAMBDA );
186 fprintf( stdout, "\n XMAX : %ld" , GraalWindowXmax / GRAAL_RDS_LAMBDA );
187 fprintf( stdout, "\n YMIN : %ld" , GraalWindowYmin / GRAAL_RDS_LAMBDA );
188 fprintf( stdout, "\n YMAX : %ld" , GraalWindowYmax / GRAAL_RDS_LAMBDA );
189 fprintf( stdout, "\n SIDE : %ld" , GraalWindowSide / GRAAL_RDS_LAMBDA );
190 fprintf( stdout, "\n DX : %ld" , GraalWindowDx );
191 fprintf( stdout, "\n DY : %ld" , GraalWindowDy );
192 fprintf( stdout, "\n SIZE : %ld\n", GraalWindowSize );
193 }
194
195 GraalInitializeCutCxTable();
196 GraalInitializeErrorMessage( Debug );
197
198 if ( FileName != (char *)NULL )
199 {
200 GraalFigureMbk = Graalgetphfig( FileName, 'A' );
201 }
202
203 XtAppMainLoop( GraalApplication );
204
205 rdsend();
206
207 return( 0 );
208 }
209