Diff of /src/parser/testparser.c [6295f8] .. [f87edd]  Maximize  Restore

  Switch to side-by-side view

--- a/src/parser/testparser.c
+++ b/src/parser/testparser.c
@@ -38,48 +38,27 @@
 {
     int i;
 
-    pt_script_image *output;
     pt_script *script = NULL;
 
-    script = panoParseScript(argv[1]);
+    printf("Testing parser for panotools and hugin files\n");
 
+
+    script = panoScriptParse(argv[1], FALSE);
     if (script == NULL) {
 	printf("Parsing error\n");
-	return 1;
+    } else {
+      panoScriptDump(script);
+
+      if (!panoScriptDeReferenceVariables(script)) {
+	printf("Unable to de-reference all variable\n");
+      }
+      
+      printf("Printing after variables are dereferrenced\n");
+
+      panoScriptDump(script);
+
+      panoParserDispose(&script);
     }
-
-    
-    printf("Values\n");
-    printf("Pano .................");
-    printf(" width,height %dx%d ", script->pano.width, script->pano.height);
-    printf(" projection %d ", script->pano.projection);
-    printf(" name %s ", script->pano.projectionName);
-    printf(" fHorFOV %f ", script->pano.fHorFOV);
-    printf(" format %s ", script->pano.outputFormat);
-    printf(" proj parms %s\n", script->pano.projectionParms);
-    
-    printf("Optimize ..................");
-    printf("  gamma %f", script->optimize.fGamma);
-    printf("  interpolator %d", script->optimize.interpolator);
-    printf("  fastFT %d ", script->optimize.fastFT);
-    printf("  humber %d \n", script->optimize.humberEstimator);
-    
-    printf("Output  [%d] images ..................\n", script->iOutputImagesCount);
-    
-    for (i=0;i<script->iOutputImagesCount;i++) {
-	output = &script->outputImageSpec[i];
-	printf(" image %d\n", i);
-	panoParserDumpImage(output);
-    }
-    printf("Input  [%d] images ..................\n", script->iInputImagesCount);
-
-    for (i=0;i<script->iInputImagesCount;i++) {
-	output = &script->inputImageSpec[i];
-	printf(" image %d\n", i);
-	panoParserDumpImage(output);
-    }
-
-    panoParseDispose(&script);
 
     return 0;
 }