⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testupnpreplyparse.c

📁 很小的linux下的upnp客户端代码
💻 C
字号:
/* $Id: testupnpreplyparse.c,v 1.1 2007/05/15 16:33:53 nanard Exp $ *//* MiniUPnP project * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * (c) 2006-2007 Thomas Bernard * This software is subject to the conditions detailed * in the LICENCE file provided within the distribution */#include <stdio.h>#include <stdlib.h>#include "upnpreplyparse.h"voidtest_parsing(const char * buf, int len){	struct NameValueParserData pdata;	ParseNameValue(buf, len, &pdata);	ClearNameValueList(&pdata);}int main(int argc, char * * argv){	FILE * f;	char buffer[4096];	int l;	if(argc<2)	{		fprintf(stderr, "Usage: %s file.xml\n", argv[0]);		return 1;	}	f = fopen(argv[1], "r");	if(!f)	{		fprintf(stderr, "Error : can not open file %s\n", argv[1]);		return 2;	}	l = fread(buffer, 1, sizeof(buffer)-1, f);	fclose(f);	buffer[l] = '\0';	DisplayNameValueList(buffer, l);	test_parsing(buffer, l);	return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -