init.c

来自「www工具包」· C语言 代码 · 共 58 行

C
58
字号
#include "WWWLib.h"#include "WWWHTTP.h"#include "WWWInit.h"int main(){    HTList * converters = HTList_new();		/* List of converters */    HTList * encodings = HTList_new();		/* List of encoders */    /* Set up the application's event loop. We use the        example event loop that comes with the Library.  */    HTEventInit();    /* Initialize libwww core */    HTLibInit("TestApp", "1.0");    /* Turn on TRACE so we can see what is going on */    HTSetTraceMessageMask("sop");    /* Register the default set of transport protocols */    HTTransportInit();    /* Register the default set of protocol modules */    HTProtocolInit();    /* Register the default set of BEFORE and AFTER filters */    HTNetInit();    /* Register the default set of converters */    HTConverterInit(converters);    HTFormat_setConversion(converters);    /* Register the default HTML Parser */    /* We don't do this here as we then must provide the HTExt interface as       described in the libwww Users's Guide */    /* HTMLInit(); */    /* Register the default set of transfer encoders and decoders */    HTTransferEncoderInit(encodings);    HTFormat_setTransferCoding(encodings);    /* Register the default set of file suffix bindings */    HTFileInit();    /* Register the default set of MIME header parsers */    HTMIMEInit();    /* Register the default set of Icons for directory listings */    HTIconInit(NULL);    /* Register the default set of messages and dialog functions */    HTAlertInit();    /* Terminate the Library */    HTLibTerminate();    return 0;}

⌨️ 快捷键说明

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