From 445d436d2bf5128e8fbad58fd690714af9b7b937 Mon Sep 17 00:00:00 2001 From: megazig Date: Tue, 5 May 2009 03:31:36 -0500 Subject: more formatting --- brlyt.c | 2 +- xml.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/brlyt.c b/brlyt.c index 6c68bc1..2867488 100644 --- a/brlyt.c +++ b/brlyt.c @@ -582,7 +582,7 @@ void PrintBRLYTEntry_mat1(brlyt_entry entry, u8* brlyt_file, mxml_node_t *tag) tev_k = mxmlNewElement(colors, "tev_k"); mxmlNewTextf(tev_k, 0, "%#08x", be32(data3.tev_kcolor[i])); } - flags = mxmlNewElement(tag, "flags"); mxmlNewTextf(flags, 0, "%08x", be32(data3.flags)); + flags = mxmlNewElement(entries, "flags"); mxmlNewTextf(flags, 0, "%08x", be32(data3.flags)); int oldsize = 1+strlen(data3.name); int newSize = lengthOfMaterials+strlen(data3.name)+1; diff --git a/xml.c b/xml.c index 7556937..41d3edf 100644 --- a/xml.c +++ b/xml.c @@ -130,12 +130,16 @@ const char *whitespace_cb(mxml_node_t *node, int where) if ((where == MXML_WS_BEFORE_OPEN) || (where == MXML_WS_BEFORE_CLOSE)) return ("\n\t\t"); } - else if (!strcmp(name, "data") || - !strcmp(name, "name")) + else if (!strcmp(name, "name")) { if ((where == MXML_WS_BEFORE_OPEN)) return ("\n\t\t\t"); } + else if (!strcmp(name, "data")) + { + if ((where == MXML_WS_BEFORE_OPEN)) + return ("\n\t\t\t\t"); + } else if (!strcmp(name, "colors") || !strcmp(name, "wrap_t") || !strcmp(name, "wrap_s") || -- cgit v1.3.1