version 1.1.1.1, 2012/02/21 23:16:22
|
version 1.1.1.2, 2013/07/22 00:36:10
|
Line 1
|
Line 1
|
/* $Id$ |
/* $Id$ |
|
* MiniUPnP project |
|
* Website : http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ |
|
* Author : Thomas Bernard. |
|
* Copyright (c) 2005-2012 Thomas Bernard |
|
* |
* testminixml.c |
* testminixml.c |
* test program for the "minixml" functions. |
* test program for the "minixml" functions. |
* Author : Thomas Bernard. |
|
*/ |
*/ |
#include <stdlib.h> |
#include <stdlib.h> |
#include <stdio.h> |
#include <stdio.h> |
Line 9
|
Line 13
|
#include "minixml.h" |
#include "minixml.h" |
#include "igd_desc_parse.h" |
#include "igd_desc_parse.h" |
|
|
#ifdef WIN32 |
|
#define NO_BZERO |
|
#endif |
|
|
|
#ifdef NO_BZERO |
|
#define bzero(p, n) memset(p, 0, n) |
|
#endif |
|
|
|
/* ---------------------------------------------------------------------- */ |
/* ---------------------------------------------------------------------- */ |
void printeltname1(void * d, const char * name, int l) |
void printeltname1(void * d, const char * name, int l) |
{ |
{ |
Line 47 void burptest(const char * buffer, int bufsize)
|
Line 43 void burptest(const char * buffer, int bufsize)
|
struct IGDdatas data; |
struct IGDdatas data; |
struct xmlparser parser; |
struct xmlparser parser; |
/*objet IGDdatas */ |
/*objet IGDdatas */ |
bzero(&data, sizeof(struct IGDdatas)); | memset(&data, 0, sizeof(struct IGDdatas)); |
/* objet xmlparser */ |
/* objet xmlparser */ |
parser.xmlstart = buffer; |
parser.xmlstart = buffer; |
parser.xmlsize = bufsize; |
parser.xmlsize = bufsize; |
Line 57 void burptest(const char * buffer, int bufsize)
|
Line 53 void burptest(const char * buffer, int bufsize)
|
parser.datafunc = printdata; */ |
parser.datafunc = printdata; */ |
parser.starteltfunc = IGDstartelt; |
parser.starteltfunc = IGDstartelt; |
parser.endeltfunc = IGDendelt; |
parser.endeltfunc = IGDendelt; |
parser.datafunc = IGDdata; | parser.datafunc = IGDdata; |
parsexml(&parser); |
parsexml(&parser); |
printIGD(&data); |
printIGD(&data); |
} |
} |