[libxml2] Update genChRanges.py



commit 78d7a5ca3c7ab3939d24cc86622e7ba702bdd678
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Wed Mar 2 03:27:53 2022 +0100

    Update genChRanges.py
    
    Remove trailing whitespace. The output now matches the generated files
    in version control.

 genChRanges.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/genChRanges.py b/genChRanges.py
index 200fb20b..827560ab 100755
--- a/genChRanges.py
+++ b/genChRanges.py
@@ -440,13 +440,15 @@ for f in fkeys:
        for rg in rangeTable:
            if rg[1] < 0x10000: # if short value
                if numShort == 0:       # first occurrence
-                   pline = "static const xmlChSRange %s_srng[] = { " % f
+                   pline = "static const xmlChSRange %s_srng[] = {" % f
                else:
-                   pline += ", "
+                   pline += ","
                numShort += 1
                if len(pline) > 60:
                    output.write(pline + "\n")
                    pline = "    "
+                else:
+                    pline += " "
                pline += "{0x%x, 0x%x}" % (rg[0], rg[1])
            else:               # if long value
                if numLong == 0:        # first occurrence


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]