Tester to compare custom Real to IEEE float
[ipdf/code.git] / src / main.cpp
index 701e163..1b2073e 100644 (file)
@@ -1,18 +1,23 @@
-#include "common.h"
-
-#include "document.h"
-#include "view.h"
-
-using namespace std;
-using namespace IPDF;
-
+#include "main.h"
+#include <unistd.h> // Because we can.
 int main(int argc, char ** argv)
 int main(int argc, char ** argv)
-{
+{      
        Document doc;
        Document doc;
-       doc.Add(0.5, 0.5, 0.5, 0.5);
-
-       View view(doc);
-       view.Render();
-
+       srand(time(NULL));
+       if (argc > 1)
+       {
+               for (int i = 2; i < argc; ++i)
+               {
+                       if (fork() == 0) doc.Load(argv[i]);
+               }
+               doc.Load(argv[1]);
+       }
+       else
+       {
+               Debug("Add random object");
+               //doc.Add(RECT_FILLED, Rect(Random()*0.5, Random()*0.5, Random()*0.5, Random()*0.5));
+               doc.Add(RECT_FILLED, Rect(0.25,0.25, 0.5, 0.5));
+       }
+       MainLoop(doc);
        return 0;
 }
        return 0;
 }

UCC git Repository :: git.ucc.asn.au