mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-02-02 13:30:59 +00:00
2005-04-15 Mike Kestner <mkestner@novell.com>
* configure.in : remove unnecessary libxml check. * parser/gapi-parser.cs : use a System.Xml to kill gapi_format_xml. * parser/formatXml.c : kill. * parser/Makefile.am : kill gapi_format_xml * */*-api.raw : enormous whitespace diff. sorry dawgs on mono-patches. svn path=/trunk/gtk-sharp/; revision=43080
This commit is contained in:
parent
68ab921940
commit
8f9d1cb15d
|
@ -1,3 +1,11 @@
|
|||
2005-04-15 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* configure.in : remove unnecessary libxml check.
|
||||
* parser/gapi-parser.cs : use a System.Xml to kill gapi_format_xml.
|
||||
* parser/formatXml.c : kill.
|
||||
* parser/Makefile.am : kill gapi_format_xml
|
||||
* */*-api.raw : enormous whitespace diff. sorry dawgs on mono-patches.
|
||||
|
||||
2005-04-15 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* parser/gapi-parser.cs : C# rewrite of the old perl driver script.
|
||||
|
|
|
@ -134,10 +134,6 @@ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4)
|
|||
AC_SUBST(GTK_CFLAGS)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
|
||||
PKG_CHECK_MODULES(XML, libxml-2.0)
|
||||
AC_SUBST(XML_CFLAGS)
|
||||
AC_SUBST(XML_LIBS)
|
||||
|
||||
## Versions of dependencies
|
||||
GNOME_REQUIRED_VERSION=2.6.0
|
||||
GTK_REQUIRED_VERSION=2.4.0
|
||||
|
|
|
@ -4,7 +4,7 @@ assembly_DATA = gapi-fixup.exe gapi-parser.exe
|
|||
pkgconfig_DATA = gapi-2.0.pc
|
||||
bin_SCRIPTS = gapi2-fixup gapi2-parser
|
||||
assembly_SCRIPTS = gapi_pp.pl gapi2xml.pl
|
||||
CLEANFILES = gapi-fixup.exe
|
||||
CLEANFILES = gapi-fixup.exe gapi-parser.exe
|
||||
DISTCLEANFILES = gapi2-fixup gapi2-parser gapi-2.0.pc
|
||||
|
||||
sources = \
|
||||
|
@ -25,11 +25,3 @@ gapi-fixup.exe: $(srcdir)/gapi-fixup.cs
|
|||
gapi-parser.exe: $(srcdir)/gapi-parser.cs
|
||||
$(CSC) /out:gapi-parser.exe $(srcdir)/gapi-parser.cs
|
||||
|
||||
INCLUDES = $(GLIB_CFLAGS) $(XML_CFLAGS)
|
||||
|
||||
assembly_PROGRAMS = gapi_format_xml
|
||||
|
||||
gapi_format_xml_SOURCES = formatXml.c
|
||||
|
||||
gapi_format_xml_LDADD = $(GLIB_LIBS) $(XML_LIBS)
|
||||
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
#include <glib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <libxml/xmlmemory.h>
|
||||
#include <libxml/parser.h>
|
||||
|
||||
static int
|
||||
formatFile (const gchar *input, const gchar *output)
|
||||
{
|
||||
xmlDocPtr doc;
|
||||
|
||||
/*
|
||||
* build an XML tree from a the file;
|
||||
*/
|
||||
doc = xmlParseFile (input);
|
||||
if (doc == NULL){
|
||||
g_warning ("File %s empty or not well-formed.", input);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (xmlSaveFormatFile (output, doc, TRUE) == -1){
|
||||
g_warning ("Error saving config data to %s", input);
|
||||
}
|
||||
|
||||
xmlFreeDoc (doc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
if (argc != 3){
|
||||
g_print ("Usage: formatXml inputfile outputfile\n\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
xmlKeepBlanksDefault(0);
|
||||
formatFile (argv [1], argv [2]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -133,7 +133,9 @@ namespace GtkSharp.Parsing {
|
|||
}
|
||||
}
|
||||
|
||||
system ("gapi_format_xml " + prefile + " " + outfile);
|
||||
XmlDocument final = new XmlDocument ();
|
||||
final.Load (prefile);
|
||||
final.Save (outfile);
|
||||
File.Delete (prefile);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue