/* * File: about.c * * Copyright (C) 1997 Raph Levien * Copyright (C) 1999, 2001 Jorge Arellano Cid * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include "IO.h" #include "Url.h" #include "../nav.h" #include "../web.h" typedef struct _SplashInfo SplashInfo_t; struct _SplashInfo { gint FD_Read; gint FD_Write; }; /* * HTML text for startup screen */ static char *Splash= "Content-type: text/html\n" "\n" "\n" "\n" "\n" "Splash screen for dillo-" VERSION "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "
\n" " \n" " \n" "
\n" " \n" " \n" "
\n" "

 Welcome to Dillo " VERSION " 

\n" "
\n" "
\n" "
\n" "\n" "
\n" "\n" "\n" "\n" "\n" "\n" "
\n" "\n" "\n" "\n" "\n" "\n" "\n" "
\n" " \n" " \n" " \n" "
Dillo\n" "
\n" "
\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "
\n" " \n" " \n" " Help\n" "
  \n" " \n" " Home\n" "
  \n" " \n" " \n" " Objectives\n" "
  \n" " \n" " \n" " ChangeLog\n" "
  \n" " \n" " \n" " Interview\n" "
  \n" " \n" " \n" " Authors\n" "
  \n" " \n" " \n" " Donate\n" "
\n" "
\n" "
\n" "
\n" "\n" "
\n" "\n" "\n" "\n" "
\n" " \n" " \n" " \n" "
Magazines\n" "\n" "
\n" "
\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "
  \n" " \n" " LWN\n" "
  \n" " \n" " Slashdot\n" "
  \n" " \n" " KuroShin\n" "
  \n" " \n" " Nexus M.\n" "
  \n" " \n" " Monster News\n" "
  \n" " \n" " The Register\n" "
\n" "
\n" "
\n" "
\n" "\n" "
\n" "\n" "\n" "\n" "
\n" " \n" " \n" " \n" "
Additional Stuff\n" "\n" "
\n" "
\n" " \n" " \n" " \n" " \n" " \n" " \n" "
  \n" " Google\n" "
  \n" " Wikipedia\n" "
  \n" " P. Gutenberg\n" "
  \n" " FreshMeat\n" "
  \n" " GNU\n" " project\n" "
  \n" " LinuxFund\n" "
\n" "
\n" "
\n" "
\n" "\n" "
\n" "\n" "\n" "\n" "
\n" " \n" " \n" " \n" "
Essential Readings\n" "\n" "
\n" "
\n" " \n" "
  \n" " Peace&Violence\n" "
  \n" " " " Right to Read\n" "
\n" "
\n" "
\n" "
\n" "\n" "
\n" "\n" "\n" "\n" "\n" "
\n" "\n" "\n" "\n" "\n" "
\n" "\n" "\n" " \n" "
\n" "

Free Software

\n" "
\n" "
\n" "

\n" " Dillo is Free Software in the terms of the GPL.\n" " This means you have four basic freedoms:\n" "

    \n" "
  • Freedom to use the program any way you see fit.\n" "
  • Freedom to study and modify the source code.\n" "
  • Freedom to make backup copies.\n" "
  • Freedom to redistribute it.\n" "
\n" " The GPL\n" " is the legal mechanism that gives you these freedoms.\n" " It also protects them from being taken away: any derivative work\n" " based on the program must be under the GPL.
\n" "
\n" "
\n" "
\n" "\n" "
\n" "\n" "
\n" "\n" "\n" " \n" "
\n" "

Release overview

\n" " April 26, 2006\n" "
\n" " \n" " \n" "
\n" "

\n" "This release is hopefully the last from the GTK1 series. The port to\n" "FLTK2 is almost finished now!\n" "

\n" "This release comes with extensive work on the plugins side. A new dpip\n" "library, a new FLTK2-based GUI for downloads!, a \"data:\"\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" "

\n" "There's also the \"./configure --disable-threaded-dns\"\n" "option (mainly for some non reentrant BSDs), among many other improvements.\n" "

\n" "Remember that dillo project uses a release model where every new\n" "browser shall be better than the former.\n" "Keep up with the latest one!\n" "

\n" "
\n" "
\n" "\n" "
\n" "\n" "
\n" "\n" "\n" " \n" "
\n" "

ChangeLog highlights

\n" " (Extracted from the\n" " full\n" " ChangeLog)\n" "
\n" " \n" " \n" "
\n" "
    \n" "
  • Designed and implemented a dpi protocol library (libDpip.a in /dpip).\n" "
  • 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" "
  • Improved the dpi buffer reception to handle split buffers (This was\n" " required for handling arbitrary data streams with dpip).\n" "
  • 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" "
  • Improved the accuracy of the illegal-character error reporting\n" " for URLs.\n" "
  • Added dpi/downloads.cc (Default FLTK2-based GUI for downloads dpi).\n" "
  • Added \"./configure --disable-dlgui\" to build without FLTK2-GUI\n" " downloads.\n" "
  • Fixed dpip's tag syntax and its parsing to accept any value string.\n" "
  • Added DOCTYPE parsing (for better bug-meter error messages).\n" "
  • Fixed bookmarks dpi to escape ' in URLs and &<>\"' in titles\n" " (BUG#655).\n" "
  • Added a check for malicious image sizes in IMG tags.\n" "\n" "
  • Added a datauri dpi to handle \"data:\" URIs (RFC-2397).\n" "
  • Moved the cookies management into a dpi server: cookies.dpi.\n" "
  • Removed the restriction of only one dillo with cookies enabled!\n" "
  • Added \"./configure --disable-threaded-dns\" (for some non\n" " reentrant BSDs).\n" "
\n" "
\n" "
\n" "
\n" "\n" "
\n" "\n" "
\n" "\n" "\n" " \n" "
\n" "

Notes

\n" "
\n" " \n" " \n" "
\n" "
    \n" "
  • There's a\n" " dillorc\n" " (readable config) file within the tarball; It is well commented\n" " and has plenty of options to customize dillo, so copy\n" " it to your ~/.dillo/ directory, and\n" " modify to your taste.\n" "
  • There's documentation for developers in the /doc\n" " dir within the tarball; you can find directions on everything\n" " else at the home page.\n" "
  • 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" "
  • Dillo behaves very nicely when browsing local files, images, and HTML.\n" " It's also very good for Internet searching (try Google!).\n" "
  • This release is mainly intended for developers\n" " and advanced users.\n" "
  • Frames, Java and Javascript are not supported.\n" "
\n" "
\n" "
\n" "
\n" "
\n" "\n" "
\n" "\n" "\n" "\n" "\n" "
\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "
\n" "\n" "\n" "\n" "

\n" "
\n" "
\n" "
\n" "\n" "\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; } } } }