📄 about.c
字号:
" April 26, 2006\n""<tr>\n"" <td bgcolor='#FFFFFF'>\n"" <table border='0' cellspacing='0' cellpadding='5'>\n"" <tr>\n"" <td>\n""<p>\n""This release is hopefully the last from the GTK1 series. The port to\n""<a href='http://www.fltk.org/'>FLTK2</a> is almost finished now!\n""<p>\n""This release comes with extensive work on the plugins side. A new dpip\n""library, a new FLTK2-based GUI for downloads!, a \"<code>data:</code>\"\n""URI handler, a important bug fix in the FTP plugin, and a cookies server\n""dpi that enables all Dillo instances to use cookies at the same time!\n""<p>\n""There's also the \"<code>./configure --disable-threaded-dns</code>\"\n""option (mainly for some non reentrant BSDs), among many other improvements.\n""<p>\n""Remember that dillo project uses a release model where every new\n""browser shall be better than the former.\n""<EM>Keep up with the latest one!</EM>\n"" </table>\n""</table>\n""</table>\n""\n""<br>\n""\n""<table border='0' cellpadding='0' cellspacing='0' align='center' bgcolor='#000000' width='100%'><tr><td>\n""<table border='0' cellpadding='5' cellspacing='1' width='100%'>\n""<tr>\n"" <td bgcolor='#CCCCCC'>\n"" <h4>ChangeLog highlights</h4>\n"" (Extracted from the\n"" <a href='http://www.dillo.org/ChangeLog.html'>full\n"" ChangeLog</a>)\n""<tr>\n"" <td bgcolor='#FFFFFF'>\n"" <table border='0' cellspacing='0' cellpadding='5'>\n"" <tr>\n"" <td>\n""<ul>\n""<li> Designed and implemented a dpi protocol library (libDpip.a in /dpip).\n""<li> Ported the bookmarks, download, file, https, ftp and hello plugins,\n"" plus the dpid daemon and the rest of the source tree to use it.\n""<li> Improved the dpi buffer reception to handle split buffers (This was\n"" required for handling arbitrary data streams with dpip).\n""<li> Fixed a serious bug with the FTP plugin that led to two downloads\n"" of the same file when left-clicking a non-viewable file.\n""<li> Improved the accuracy of the illegal-character error reporting\n"" for URLs.\n""<li> Added dpi/downloads.cc (Default FLTK2-based GUI for downloads dpi).\n""<li> Added \"./configure --disable-dlgui\" to build without FLTK2-GUI\n"" downloads.\n""<li> Fixed dpip's tag syntax and its parsing to accept any value string.\n""<li> Added DOCTYPE parsing (for better bug-meter error messages).\n""<li> Fixed bookmarks dpi to escape ' in URLs and &<>\"' in titles\n"" (BUG#655).\n""<li> Added a check for malicious image sizes in IMG tags.\n""\n""<li> Added a datauri dpi to handle \"data:\" URIs (RFC-2397).\n""<li> Moved the cookies management into a dpi server: cookies.dpi.\n""<li> Removed the restriction of only one dillo with cookies enabled!\n""<li> Added \"./configure --disable-threaded-dns\" (for some non\n"" reentrant BSDs).\n""</ul>\n"" </table>\n""</table>\n""</table>\n""\n""<br>\n""\n""<table border='0' cellpadding='0' cellspacing='0' align='center' bgcolor='#000000' width='100%'><tr><td>\n""<table border='0' cellpadding='5' cellspacing='1' width='100%'>\n""<tr>\n"" <td bgcolor='#CCCCCC'>\n"" <h4>Notes</h4>\n""<tr>\n"" <td bgcolor='#FFFFFF'>\n"" <table border='0' cellspacing='0' cellpadding='5'>\n"" <tr>\n"" <td>\n""<ul>\n"" <li> There's a\n"" <a href='http://www.dillo.org/dillorc'>dillorc</a>\n"" (readable config) file within the tarball; It is well commented\n"" and has plenty of options to customize dillo, so <STRONG>copy\n"" it</STRONG> to your <STRONG>~/.dillo/</STRONG> directory, and\n"" modify to your taste.\n"" <li> There's documentation for developers in the <CODE>/doc</CODE>\n"" dir within the tarball; you can find directions on everything\n"" else at the home page.\n"" <li> Dillo has context sensitive menus using the\n"" right mouse button (available on pages, links, images,\n"" the Back and Forward buttons, and bug meter).\n"" <li> Dillo behaves very nicely when browsing local files, images, and HTML.\n"" It's also very good for Internet searching (try Google!).\n"" <li> This release is mainly intended <strong>for developers</strong>\n"" and <em>advanced users</em>.\n"" <li> Frames, Java and Javascript are not supported.\n""</ul>\n""<br>\n"" </table>\n""</table>\n""</table>\n""\n""<table border='0' width='100%' cellpadding='0' cellspacing='0'><tr><td height='10'></table>\n""\n""\n""<!-- the main layout table, a small vertical spacer -->\n""\n""<td width='20'>\n""\n""\n""\n""<!-- The right column (info) -->\n""<td valign='top' align='center'>\n""\n""\n""\n""<!-- end of the main layout table -->\n""\n""\n""</table>\n""\n""<!-- footnotes -->\n""\n""<br><br><center>\n""<hr size='2'>\n""<hr size='2'>\n""</center>\n""</body>\n""</html>\n";/* * Send the splash screen through the IO using a pipe. */static gint About_send_splash(ChainLink *Info, DilloUrl *Url){ gint SplashPipe[2]; IOData_t *io1; SplashInfo_t *SpInfo; if (pipe(SplashPipe)) return -1; SpInfo = g_new(SplashInfo_t, 1); SpInfo->FD_Read = SplashPipe[0]; SpInfo->FD_Write = SplashPipe[1]; Info->LocalKey = SpInfo; /* send splash */ io1 = a_IO_new(IOWrite, SpInfo->FD_Write); a_IO_set_buf(io1, Splash, strlen(Splash)); io1->Flags |= (IOFlag_ForceClose + IOFlag_SingleWrite); a_Chain_link_new(Info, a_About_ccc, BCK, a_IO_ccc, 1, 1); a_Chain_bcb(OpStart, Info, io1, NULL); a_Chain_bcb(OpSend, Info, io1, NULL); /* Tell the cache to receive answer */ a_Chain_fcb(OpSend, Info, &SpInfo->FD_Read, NULL); return SpInfo->FD_Read;}/* * Push the right URL for each supported "about" * ( Data1 = Requested URL; Data2 = Web structure ) */static gint About_get(ChainLink *Info, void *Data1, void *Data2){ char *loc; const char *tail; DilloUrl *Url = Data1; DilloWeb *web = Data2; DilloUrl *LocUrl; /* Don't allow the "about:" method for non-root URLs */ if (!(web->flags & WEB_RootUrl)) return -1; tail = URL_PATH(Url); if (!strcmp(tail, "splash")) { return About_send_splash(Info, Url); } if (!strcmp(tail, "jwz")) loc = "http://www.jwz.org/"; else if (!strcmp(tail, "raph")) loc = "http://www.levien.com/"; else if (!strcmp(tail, "yosh")) loc = "http://yosh.gimp.org/"; else if (!strcmp(tail, "snorfle")) loc = "http://www.snorfle.net/"; else if (!strcmp(tail, "dillo")) loc = "http://www.dillo.org/"; else if (!strcmp(tail, "help")) loc = "http://www.dillo.org/dillo-help.html"; else loc = "http://www.google.com/"; LocUrl = a_Url_new(loc, NULL, 0, 0, 0); a_Nav_push(web->bw, LocUrl); a_Url_free(LocUrl); return -1;}/* * CCC function for the ABOUT module */void a_About_ccc(int Op, int Branch, int Dir, ChainLink *Info, void *Data1, void *Data2){ int FD; a_Chain_debug_msg("a_About_ccc", Op, Branch, Dir); if ( Branch == 1 ) { /* Start about method */ if (Dir == BCK) { switch (Op) { case OpStart: /* (Data1 = Url; Data2 = Web) */ // Info->LocalKey gets set in About_get if ((FD = About_get(Info, Data1, Data2)) == -1) a_Chain_fcb(OpAbort, Info, NULL, NULL); break; case OpAbort: a_Chain_bcb(OpAbort, Info, NULL, NULL); g_free(Info->LocalKey); g_free(Info); break; } } else { /* FWD */ switch (Op) { case OpSend: /* This means the sending framework was set OK */ FD = ((SplashInfo_t *)Info->LocalKey)->FD_Read; a_Chain_fcb(OpSend, Info, &FD, NULL); break; case OpEnd: /* Everything sent! */ a_Chain_del_link(Info, BCK); g_free(Info->LocalKey); a_Chain_fcb(OpEnd, Info, NULL, NULL); break; case OpAbort: g_free(Info->LocalKey); a_Chain_fcb(OpAbort, Info, NULL, NULL); break; } } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -