/* * 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" "
  \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" " InfoAnarchy\n" "
  \n" " \n" " Linux4Kids\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" " 15 June 2005\n" "
\n" " \n" " \n" "
\n" "

\n" "The new dillo-" VERSION " is a bugfix release that addresses a couple\n" "of security issues. Users are advised to upgrade ASAP.\n" "

\n" "This release is one of the last on the GTK1-based dillo series.\n" "Currently the main development is focused on a " "FLTK2-based dillo prototype.\n" "If everything goes as planned, this new branch will become our next release!" " (stay tuned).\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" "
  • Added a \"small\" dillorc option for panel size.\n" "
  • Set \"file:\" to work as URI for current directory.\n" "
  • Fixed the shell escaping code in the ftp plugin.\n" "
  • Added some checks for sane values in html.c.\n" "
  • Added URL filtering to the ftp and downloads dpis to avoid SMTP hacks.\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; } } } }