From 9fdd6347c4166cb2166b5628f8d5259a4398ff59 Mon Sep 17 00:00:00 2001
From: picomeg <megordon5@gmail.com>
Date: Mon, 25 Apr 2022 17:11:50 +0100
Subject: [PATCH] cleanup

---
 pdf.c | 53 +++++++++++++++++++++++++++--------------------------
 1 file changed, 27 insertions(+), 26 deletions(-)

diff --git a/pdf.c b/pdf.c
index f3fdb24..cda753d 100644
--- a/pdf.c
+++ b/pdf.c
@@ -5025,18 +5025,19 @@ void parse_pagenode (
         if (item->token_type == TT_SEQUENCE) {
             double llx, lly, urx, ury; // typical but can be any diagonal
             HParsedToken * token;
-            token = H_INDEX_TOKEN(item, 0);
-            if (token->token_type == TT_SINT)  llx = (double)token->sint;
-            else                               llx =         token->dbl;
-            token = H_INDEX_TOKEN(item, 1);
-            if (token->token_type == TT_SINT)  lly = (double)token->sint;
-            else                               lly =         token->dbl;
-            token = H_INDEX_TOKEN(item, 2);
-            if (token->token_type == TT_SINT)  urx = (double)token->sint;
-            else                               urx =         token->dbl;
-            token = H_INDEX_TOKEN(item, 3);
-            if (token->token_type == TT_SINT)  ury = (double)token->sint;
-            else                               ury =         token->dbl;
+                    token = H_INDEX_TOKEN(item, 0);
+                    if (token->token_type == TT_SINT)  llx = (double)token->sint;
+                    else                               llx =         token->dbl;
+                    token = H_INDEX_TOKEN(item, 1);
+                    if (token->token_type == TT_SINT)  lly = (double)token->sint;
+                    else                               lly =         token->dbl;
+                    token = H_INDEX_TOKEN(item, 2);
+                    if (token->token_type == TT_SINT)  urx = (double)token->sint;
+                    else                               urx =         token->dbl;
+                    token = H_INDEX_TOKEN(item, 3);
+                    if (token->token_type == TT_SINT)  ury = (double)token->sint;
+                    else                               ury =         token->dbl;
+
             myNode->mediaBox.tx = fabs(llx - urx);
             myNode->mediaBox.ty = fabs(lly - ury);;
         }
@@ -5264,20 +5265,20 @@ parse_pagetree(
 	    if (item->token_type == TT_SEQUENCE) {
 	        double llx, lly, urx, ury; // typical but can be any diagonal
 	        HParsedToken * token;
-	        token = H_INDEX_TOKEN(item, 0);
-	        if (token->token_type == TT_SINT)  llx = (double)token->sint;
-	        else                               llx =         token->dbl;
-                token = H_INDEX_TOKEN(item, 1);
-                if (token->token_type == TT_SINT)  lly = (double)token->sint;
-                else                               lly =         token->dbl;
-                token = H_INDEX_TOKEN(item, 2);
-                if (token->token_type == TT_SINT)  urx = (double)token->sint;
-                else                               urx =         token->dbl;
-                token = H_INDEX_TOKEN(item, 3);
-                if (token->token_type == TT_SINT)  ury = (double)token->sint;
-                else                               ury =         token->dbl;
-                myNode->mediaBox.tx = fabs(llx - urx);
-                myNode->mediaBox.ty = fabs(lly - ury);;
+	    token = H_INDEX_TOKEN(item, 0);
+	    if (token->token_type == TT_SINT)  llx = (double)token->sint;
+	    else                               llx =         token->dbl;
+            token = H_INDEX_TOKEN(item, 1);
+            if (token->token_type == TT_SINT)  lly = (double)token->sint;
+            else                               lly =         token->dbl;
+            token = H_INDEX_TOKEN(item, 2);
+            if (token->token_type == TT_SINT)  urx = (double)token->sint;
+            else                               urx =         token->dbl;
+            token = H_INDEX_TOKEN(item, 3);
+            if (token->token_type == TT_SINT)  ury = (double)token->sint;
+            else                               ury =         token->dbl;
+            myNode->mediaBox.tx = fabs(llx - urx);
+            myNode->mediaBox.ty = fabs(lly - ury);;
 	    }
 	}
 
-- 
GitLab