Skip to content

Commit

Permalink
Fix old testxml program
Browse files Browse the repository at this point in the history
  • Loading branch information
megastep committed Feb 10, 2006
1 parent 77d16e7 commit b7067c2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions testxml.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#include <gnome-xml/parser.h>

#include "config.h"
#include <stdio.h>
#include <ctype.h>

#include "setup-xml.h"

int copy_line(const char **srcpp, char *buf, int maxlen)
{
Expand Down Expand Up @@ -46,7 +51,6 @@ void ParseNode(xmlDocPtr doc, xmlNodePtr cur, int level)
{
const char *data;
char buf[BUFSIZ];
int i;

while ( cur ) {
if ( strcmp(cur->name, "option") != 0 ) {
Expand Down Expand Up @@ -106,7 +110,7 @@ const char *GetNodeText(xmlDocPtr doc, xmlNodePtr node, const char *name)
return(text);
}

main()
int main(void)
{
xmlDocPtr doc;
xmlNodePtr cur;
Expand All @@ -121,4 +125,5 @@ main()
}
}
xmlSaveFile("foo.xml", doc);
return 0;
}

0 comments on commit b7067c2

Please sign in to comment.