-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
43 lines (41 loc) · 1.27 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <stdio.h>
#include "common.h"
#include "grids.h"
/*
* Ž¯¨á ¨ï ¬®¨â®à®¢
*/
TMonitor* Monitors=NULL;
/*
* ƒ« ¢ ï ¯à®£à ¬¬
*/
int main(int argc, char** argv)
{
if(argc!=3)
{
printf("Use: GridStack input.stack output.grid\n");
}//THEN
else
{
int Token=0;
InitParse(argv[1]);
if(!yyparse())
{
TMonitor* Monitor=Monitors;
for(;Monitor;Monitor=Monitor->Next)
{
TLinear LeftDelta, Width, TopDelta, Height;
LeftDelta.A=IntToTValue(0); LeftDelta.B=IntToTValue(0);
TopDelta.A=IntToTValue(0); TopDelta.B=IntToTValue(0);
Width.A=IntToTValue(1); Width.B=IntToTValue(0);
Height.A=IntToTValue(1); Height.B=IntToTValue(0);
SetBorders(Monitor->Monitor,Monitor->Region, LeftDelta, Width, TopDelta, Height);
//printf("Monitor %d\n",Monitor->Monitor);
//BrowseTree(Monitor->Region,2);
}
}//THEN
FinishParse();
SaveGridToFile(argv[2]);
DeleteTree(Monitors);
}//ELSE
}//main
////////////////////////////////////////////////////////////////////////////////