From f309790abe901c16b0a4dc9e4ec5c29a4a196bd2 Mon Sep 17 00:00:00 2001
From: "Sven M. Hallberg" <pesco@khjk.org>
Date: Sun, 9 Feb 2020 02:40:44 +0100
Subject: [PATCH] replace 'xrnat' with 'nat'

because the latter no longer includes whitespace
---
 pdf.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/pdf.c b/pdf.c
index 091e8dd..ae6ead3 100644
--- a/pdf.c
+++ b/pdf.c
@@ -233,7 +233,6 @@ act_nat(const HParseResult *p, void *u)
 
 	return H_MAKE_UINT(x);
 }
-#define act_xrnat act_nat
 #define act_xroff act_nat
 #define act_xrgen act_nat
 
@@ -637,8 +636,7 @@ init_parser(struct Env *aux)
 	H_ARULE(xroff,	REP(digit, 10));
 	H_ARULE(xrgen,	REP(digit, 5));
 	H_ARULE(xrent,	SEQ(xroff, IGN(sp), xrgen, IGN(sp), xrtyp, IGN(xreol)));
-	H_ARULE(xrnat,	h_many1(digit));
-	H_RULE(xrhead,	SEQ(xrnat, IGN(sp), xrnat, nl));
+	H_RULE(xrhead,	SEQ(nat, IGN(sp), nat, nl));
 	H_RULE(xrsub,	SEQ(xrhead, h_many(xrent)));
 	H_ARULE(xrefs,	SEQ(KW("xref"), nl, h_many(xrsub)));
 
@@ -649,7 +647,7 @@ init_parser(struct Env *aux)
 
 	/* trailer */
 	H_RULE(startxr,	SEQ(nl, KW("startxref"), nl,
-			    lws, xrnat, nl,
+			    lws, nat, nl,
 			    LIT("%%EOF"), CHX(nl, end)));
 		// XXX should lws be allowed before EOF marker?
 		// NB: lws before xref offset is allowed, cf. p.48 (example 4)
-- 
GitLab