changeset 1:2846a03bda67

[gaim-migrate @ 10] The other missing files :) committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Thu, 23 Mar 2000 03:13:54 +0000
parents a5ace2e037bc
children 68b230f8da5f
files doc/CREDITS doc/FAQ doc/Makefile.am doc/PROTOCOL doc/gaims_funniest_home_convos.txt doc/the_penguin.txt pixmaps/Makefile.am pixmaps/admin_icon.xpm pixmaps/aimicon.xpm pixmaps/aimicon2.xpm pixmaps/aol_icon.xpm pixmaps/away.xpm pixmaps/away_icon.xpm pixmaps/big.xpm pixmaps/bold.xpm pixmaps/buddyadd.xpm pixmaps/buddychat.xpm pixmaps/buddydel.xpm pixmaps/dt_icon.xpm pixmaps/free_icon.xpm pixmaps/gnome/devil-connect.png pixmaps/gnome/devil-offline.png pixmaps/gnome/devil-online.png pixmaps/gnome/penguin-connect.png pixmaps/gnome/penguin-offline.png pixmaps/gnome/penguin-online.png pixmaps/im.xpm pixmaps/info.xpm pixmaps/italic.xpm pixmaps/link.xpm pixmaps/login_icon.xpm pixmaps/logo.xpm pixmaps/logout_icon.xpm pixmaps/msg_pending.xpm pixmaps/no_icon.xpm pixmaps/normal.xpm pixmaps/offline.xpm pixmaps/online.xpm pixmaps/palette.xpm pixmaps/peng_frown.xpm pixmaps/peng_smile.xpm pixmaps/peng_wink.xpm pixmaps/permadd.xpm pixmaps/permdel.xpm pixmaps/signing_on.xpm pixmaps/small.xpm pixmaps/speaker.xpm pixmaps/strike.xpm pixmaps/underline.xpm pixmaps/wood.xpm sounds/BuddyArrive.au sounds/BuddyLeave.au sounds/Makefile.am sounds/Receive.au sounds/Send.au sounds/au2h.c src/Makefile.am src/about.c src/aim.c src/away.c src/browser.c src/buddy.c src/buddy_chat.c src/conversation.c src/dialogs.c src/gaim.h src/gaimrc.c src/gnome_applet_mgr.c src/gnome_applet_mgr.h src/gtkhtml.c src/gtkhtml.h src/html.c src/idle.c src/network.c src/oscar.c src/plugins.c src/prefs.c src/proxy.c src/proxy.h src/server.c src/sound.c src/toc.c src/util.c
diffstat 83 files changed, 26666 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/CREDITS	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,25 @@
+gaim: The Pimpin' Penguin IM Clone that's Good For The Soul! 
+
+CREDITS
+-------
+Authors:
+
+Rob Flynn	<IM: RobFlynn>	   rob@linuxpimps.com
+Jim Duchek      <IM: zilding>      jimduchek@ou.edu
+Mark Spencer    <IM: markster97>   markster@marko.net
+
+Other Contributors:
+
+** LOGO DESIGNED BY: Naru Sundar **
+
+David Prater    <IM: dRaven43>          draven@tcsx.net   
+	Log and Colour Button Images
+Sébastien Carpe <IM: Seb Carpe>
+	Base HTTP Proxy Support
+Ari Pollak      <IM: Ari Pollak>	compwiz.dhs.org
+	Resize conversation window patch   
+Decklin Foster
+	Info box looks nicer
+David <IM: CrazyDavy>
+	The neato-bigger text box
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/FAQ	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,321 @@
+GAIM: The Pimpin' Penguin IM Clone Thats Good For The Soul 
+
+Here's the FAQ.  PLEASE don't bother me about anything on this list.  You
+will be ignored or pointed at the FAQ -- I have been extremely short of time
+lately!  Feel free to contact any of us with praise or ideas.  If you have
+ideas or bug problems, please use email, because I like to keep records of
+that kinda stuff and I don't log all my conversations.  Enjoy gaim!
+					- Jim Duchek <jimduchek@ou.edu>
+
+I. The Protocol
+	1. Is it the same protocol as the Windows client uses?
+	2. Where can I find info on it?
+	3. What other clients use this protocol?
+	4. TCP or UDP?
+	5. So the buddy list is stored on the server?
+
+II. The Client
+	1. What does 'gaim' stand for?
+	2. How do I make multiple groups?
+	3. How come there's no file transfer?
+	4. Why no AOL logo?
+	5. Where are my log files stored?
+	6. Can I use my Windows 95 Buddylist with Gaim?
+        7. I'm not a native English speaker and I would like a translated
+           version of gaim.
+        8. I've got a proxy, and I'd like to use GAIM.
+	
+III. Problems
+        1. WAAAAAH!  My sound doesn't work!
+	2. My buddy list disappeared!
+	3. I click on URLs, but Netscape doesn't popup!
+	4. I don't use Netscape.
+	5. I'm using the GNOME client.  I have a bug. 
+        6. I have a bug not described here.
+	7. I have Mandrake 6.0 and GAIM doesnt work!
+
+IV. Programming
+	1. I have a patch for gaim!
+	2. Can you teach me how to program GTK?
+
+V. Miscellaneous
+        1. Can I talk to you on IM?
+        2. I want to write an IM client.  Will you help me?
+        3. I have money.  I need some software written.  Can you help?
+	4. I have hardware here that's not being used, or money.  Can 
+           you use it?
+	5. I would like to send you beer.
+	6. Are you going to port this thing to Windows?
+	7. Why the GPL?
+	8. I use *BSD and I hate the penguin! I want daemon images!
+	9. Can I design a logo for you?
+       10. What is a wagii?
+       11. Speaking of the penguin, I heard a rumour you have a tattoo of
+	   it.  Is that true?
+       12. What Window Manager do you use?  What distribution do you use?
+           What other stupid things can you ask me that don't really matter
+           but ya'll ask me anyway?
+       13. Is XX a good Harddrive, YY a good monitor and ZZ a good CPU?
+       14. Who designed the new logo?	
+       15. I want to contribute to the effort.  Where can I send beer to?
+
+I. The Protocol
+	1. Is it the same protocol as the Windows client uses?
+		No.  The Windows client uses Oscar, which is proprietary
+and undocumented.  Some people have used network tools and such to figure
+it mostly out -- Look for 'faim'.  We use TOC, which is completely open and
+documented. 
+
+	2. Where can I find info on it?
+		Go to <http://www.aim.aol.com/tik> and download a copy of TiK.
+In it you will find a document called PROTOCOL which describes the protocol in
+full.
+
+	3. What other clients use this protocol?
+		Go to <http://www.aim.aol.com/tik>.  There is a list there.
+
+	4. TCP or UDP?
+		TCP.
+
+	5. So the buddy list is stored on the server?
+		Yep.
+
+
+II. The Client
+	1. What does 'gaim' stand for?
+		It's basically the letter 'g' tacked on to the beginning of
+'AIM' (which is fairly obvious).  G stands for all sorts of good things. 
+Girls, Godzilla, GTK, graham crackers, whatever.
+
+	2. How do I make multiple groups?
+		When adding a new buddy, you just type in a new group name.
+Future versions intend to handle this and renaming groups better.
+
+	3. How come there's no file transfer?
+		The TOC server doesn't (yet) support file transfer. Be
+patient!  It is coming.
+
+	4. Why no AOL logo?
+		AOL's legal staff told us no-no.
+
+	5. Where are my log files stored?
+		After you select `log all conversations' you may be wondering
+where your log files are stored. Well, they are currently, by default, stored
+under $HOME/.gaim/YourScreenName/.  If your screen name is Zilding then you
+will find your logs under: $HOME/.gaim/Zilding/.  This will eventually become
+configurable.
+	
+       6. Can I use my Windows 95 buddylist with Gaim?
+		Well, you are in luck.  As of the 0.9.5 release there is a 
+small perl script called 'buddytrans' that is included with the distribution.
+If you installed the RPM copy of GAIM then you can find the script in
+/usr/bin/buddytrans.  The correct script syntax is: 
+buddytrans buddy.lst gaim.list.  You can then import `gaim.list' from inside
+gaim.  This will eventually be fully incorporated into GAIM and the script
+will no longer be needed.
+
+        7. I'm not a native English speaker and I would like a translated   
+           version of gaim.
+
+		By all means, IM me at 'Zilding' or email me at
+jimduchek@ou.edu.  I'm working on standard GNU locale support for the next
+version of gaim, and I'm going to need translations.  If you can do a
+translation for us, I'd greatly appreciate it!  Just let me know and I'll
+give you detailed instructions on how to do it.
+ 
+	8. I'm behind a proxy, and I'd like to use GAIM.
+		Well, I'm planning to add more 'real' proxy support in the
+future, but it's not all that high on my priority list.  For now, try
+changing the two PORT defines in gaim.h to 21 -- The TOC server listens on
+ALL ports, and a lot of proxy servers allow port 21 to pass through.
+
+
+III. Problems
+	1. WAAAAAH!  My sound doesn't work!
+		./configure should autodetect whether or not you have ESD
+libraries.  If you have them it _WILL_ compile with them, if not it won't. 
+If it compiles with them, you don't need to be running the ESD daemon, it'll
+automatically fallback to using /dev/dsp.  Make sure that gaim has proper
+permissions to talk to /dev/dsp and /dev/audio though!  
+
+	2. My buddy list disappeared!
+		You didn't back up your buddy list, did you?  You never back
+anything up!  Oh well.  The TOC server loses lists from time to time, it
+happens to me as well.  (And no, I never have a backup ;).  I intend to
+support saving lists on your own computer in the future.
+
+        3. I click on URLs, but Netscape doesn't popup!
+		Netscape either needs to be running on the current display
+(gaim should handle remote netscape windows OK.), or 'netscape' needs to be
+in your path.
+
+        4. I don't use Netscape. 
+		I'm very interested in supporting other web browsers.  Do
+send me information on how to send a URL to your browser remotely (or point
+me at the source to the browser, I might be able to figure it out.). 
+
+	5. I'm using the GNOME client.  I have a bug.
+		Too smeggin' bad.  :)  I personally do NOT write any of the
+GNOME code.  If you find bugs in the GNOME client, I will accept emails
+describing these bugs, so I can pass them on to the correct person.
+I will also accept PATCHES to fix these bugs (but not like any of y'all
+ever do anything but whine about bugs anyway, who am I kidding ;).  
+If you IM me whining about a GNOME bug, you will probably be ignored.
+	
+	6. I have a bug not described here.
+		Well, it could be a few things.  Firstly, you MUST HAVE GTK+
+VERSION 1.2.3 installed!  Please state in any bug report that you ARE using
+1.2.3, otherwise you have a chance of being ignored.  With that said ;)
+email me at jimduchek@ou.edu, I would like to hear your bug reports (but
+please, not your problems installing GTK).
+
+	7. I have Mandrake 6.0 and GAIM doesnt work!
+
+Bob Meyer <meyer_rm@yahoo.com> writes:
+
+Here's the solution:
+        * Get esound-0.2.12-4mdk.i586.rpm and
+          esound-devel-0.2.12-4mdk.i586.rpm from any Mandrake mirror.
+        * rpm --upgrade esound-0.2.12-4mdk.i586.rpm
+        * rpm -- upgrade esound-devel-0.2.12-4mdk.i586.rpm
+
+Don't use EVIL 'updates' tool.  It's broke.. really bad.
+
+	Mandrake 6.1, with its newer libraries, appears to fix this problem.
+
+IV. Programming
+	1. I have a patch for gaim!
+		Nice.  Think about your patch though.  First, does it have
+to do with AIM?  I won't apply patches for stock tickers, search engines,
+etc.  We're working on plug-ins if you really want bloat like that. 
+Second, is it useful?  A lot of patches I get are horribly unuseful except
+in very specific situations (ie YOUR situation).  Thirdly, your code 
+will not retain your copyright.  All code submitted must be protected by 
+the GPL and the copyright will be given to Mark Spencer.  If you don't 
+like this, don't send me your patches.  You will be given authorship credit, 
+don't worry -- I just want a homogenous copyright on the program.  Lastly,
+does your code match the coding style already present in gaim?  I like my
+brackets where I like them.  I do NOT like, in fact I positively HATE, I
+DESPISE, with a PASSION, the convention of variablesLikeThis.  And 
+functionsLikeThis.  If you do that, fine.  It's great.  But guess what?
+This is C.  C programmers don't write like that.  I don't write like that.
+I don't want to READ code like that.  I want a homogenous coding style
+on this program, and it's gonna be MY coding style. :)
+	Now, if you've managed to get through all that and I haven't
+discouraged you entirely, my email address is jimduchek@ou.edu, you can
+send your patches there.
+
+	2. Can you teach me how to program GTK?
+		Yes, I can.  But no, I'm not going to. There's a really
+nice tutorial at http://www.gtk.org.  If you're a fairly experienced 
+programmer, and you get stuck on something odd, IM me, I'm usually happy to
+help.  If you had a little BASIC experience in high school and are having
+trouble making a button widget do anything when you click it, buy a book on
+C and read the damn GTK tutorial, I'm a busy person.
+
+
+V. Miscellaneous
+	1. Can I talk to you on IM?
+		Sure.  My IM name is Zilding.  The rest of the crew's IM names
+can be found in various places.  Keep in mind though, I'm a very busy person. 
+This IM name is used for friends as well as for gaim (I don't just log this
+guy in when I want to talk to gaim people).  So please, don't IM me just to
+chat, or to answer various Linux questions.  I'd like to be able to answer
+everyone's questions on whatever (I usually do know the answer, or at least
+where to find it!) but I just don't have time.  Things like this will
+usually be ignored.  Other things to keep in mind when talking to me:  Don't
+start off with 'I have a gaim question', 'Can I ask a question?', 'Hello?',
+'Are you there?', 'Is this the gaim guy?', 'gaim doesn't work', 'I can't get
+gaim to compile' or anything else like that.  Why?  If you'll notice in all
+of the above statements, nothing useful has been said.  I'm often away from
+my computer.  I suggest if you are having a serious problem or you have a
+question, just ASK THE QUESTION, right off, I don't require any preliminary
+stuff.  Simply sending me "gaim segfaults when I do 'blah blah click blah'"
+to start a conversation is fine -- I don't consider it rude, please just ask
+the question.  If I don't answer within a few minutes, leave your email
+address, I will get back to you sooner or later.  Lastly, do NOT abbreviate
+'you' as 'u', 'are' as 'r', 'to' as '2', 'for' as '4', or any of those other
+annoying AOLisms.  They bother me greatly, and as I work long hours and am
+an insomniac (probably because I'm such a mean bastard ;), I'm likely to
+make fun of you, or more likely ignore you completely.  I don't require
+perfect English but it'd be nice.
+
+
+	2. I want to write an IM client.  Will you help me?
+		No, unless you're writing one commercially.  Email me for
+rates -- I'm not all that expensive. :)
+
+	3. I have money.  I need some software written.  Can you help?
+		Oh yes.  My email address is jimduchek@ou.edu, my IM is Zilding.
+	
+	4. I have hardware that's not being used, or money.  Can you use it?
+		Almost always.  I'm a broke college student.  We're all
+broke here.  Flat busted.  Money would always help.  If you have some useful
+equipment (or even useless equipment!  I like old mainframes and
+workstations ;), do send it to us!  I might be able to scratch together
+shipping money even. :)
+
+	5. I would like to send you beer.
+		OK.
+
+	6. Are you going to port this thing to Windows?
+		I've been mulling it over and playing with cygwin on the
+tiny Windows partition I do have on my laptop (It's required for school),
+but I'm not sure yet.  I actually do have a version of gaim running on it
+now, as of 7/20.  However, the Win32 port of GTK has some issues that need
+to be resolved before I can even attempt to release this.  Some of my WIN32
+patches are included in this release, usually under an #ifdef _WIN32 (which
+cygwin and I think other windows compilers set).  
+
+	7. Why the GPL?
+		I like the GPL.  
+
+	8. I use *BSD and I hate the penguin!  I want daemon images!
+		I do have a nice pixmap of the daemon, and one of these days
+I will do a second set of buttons.  You'll have to wait (or send me button
+pixmaps yourself).  I still don't understand why ya'll hate the penguin
+though, maybe it's just jealousy cause our OS gets all the media attention? 
+I kinda like the daemon :)
+
+	9. Can I design a logo for you?
+		Sure!  Do your best.  Entries may be emailed to: 
+gaimlogo@blueridge.net.  After we get a nice supply of entries we'll sort
+through them and pick the winner.
+
+       10. What is a wagii?
+		Interesting question that you ask, there.  `Wagii' is the 
+official celebratory cry of gaim.  Anytime you are feeling happy or excited,
+just remember all of the hard work that we have done to provide you with 
+this wonderful, free piece of software -- as the pure, raw, emotion flows
+through you, maybe you too will let out the cry of -- Wagii.
+		Its also the sound a Penguin Samurai makes :)
+
+       11. Speaking of the penguin, I heard a rumour you have a tattoo of  
+           it.  Is that true?
+		Hehe.  Yes, that is true.  He's on my left upper arm.  If
+you'd like to see a picture, visit <http://www.woodsoup.org/~sbaker/tux/doc/>.
+It's a 'history of Tux' and there's a pic of my tattoo at the bottom.  A pic
+of my tattoo is also in the LIMP, and linux.remotepoint.com.  There's also a
+picture of the two matching Tux tattoos that a husband and wife have in
+there.  I've heard a rumour someone at Red Hat has one as well.  BTW -- no,
+it really didn't hurt, and yes, I was sober ;)
+
+       12. What Window Manager do you use?  What distribution do you use?
+           What other stupid things can you ask me that don't really matter
+           but ya'll ask me anyway?
+		I use WindowMaker, without any GNOME or KDE bits.  I don't
+really use a distro, per se, as it used to be a Red Hat distro a long time
+ago, but since then I've custom-installed by hand from one hard drive to
+another, so it really doesn't resemble Red Hat anymore, and I've written
+most of the rc. scripts from scratch.  Please don't ask me Red Hat
+questions, also I hate it when people assume that Red Hat == Linux. 
+
+      13. Is XX a good harddrive, YY a good monitor, and ZZ a good CPU?
+               Hmm, we're kinda poor so we cant be positive... if you wanna
+send us some hardware we'll use it though and tell you how good it is *wink*
+
+      14. Who designed the new logo?
+	       A good guy named Naru Sundar.
+
+      15. I want to contribute to the effort.  Where can I send beer to?
+               IM Zilding or email him at jimduchek@ou.edu.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/Makefile.am	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,2 @@
+EXTRA_DIST = the_penguin.txt CREDITS FAQ gaims_funniest_home_convos.txt PROTOCOL
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/PROTOCOL	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,443 @@
+# Copyright (c) 1998-9 America Online, Inc. All Rights Reserved.
+#
+#   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.
+#
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#   GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License
+#   along with this program; if not, write to the Free Software
+#   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+# Note from Jim Duchek, gaim maintainer -- this may not be the latest
+# version of this document, I provide it as a service.  Download a copy
+# of TiK (http://www.aim.aol.com/tik/) for the latest version of this
+# doc.
+
+Version: TOC1.0
+
+This document describes the protocol between TOC and TOC clients.
+The protocol is built on TCP.  Framing is done by SFLAP,
+described at the bottom of this document.  Inside each
+SFLAP frame is a TOC command.
+
+The TOC protocol is ASCII based, and special attention
+must be placed argument separation.  The separator and 
+the rules of separation are different for messages inbound 
+to TOC and outbound to the client.  The rules of separation
+are described in sections below.
+
+The TOC server is built mainly to service the TIC and TiK clients.  Since
+the TIC client is a Java applet, and downloadable, TOC will NOT support
+multiple TOC protocol versions at the same time.   Therefore, TiK
+users will be forced to upgrade if the protocol version changes.  
+TOC sends down the protocol version it expects the client
+to speak and understand.  Note, the protocol version is a string.
+
+Important Notes
+===============
+* TOC will drop the connection if a command exceeds the maximum
+  length, which is currently 2048 bytes.  So the client needs to 
+  spend special attention to im, chat, and config message lengths.
+  There is an 8k length maximum from TOC to the client.
+
+* No commands should be sent to TOC (besides toc_signon) before 
+  a SIGN_ON is received.  If you do send a command before SIGN_ON
+  the command will be ignored, and in some case the connection
+  will be dropped.
+
+* Initial permit/deny items should be sent after receiving SIGN_ON 
+  but before sending toc_init_done, otherwise the user will flash
+  on peoples buddylist who the user has denied.  You will probably
+  want to send the toc_add_buddies at this time also.
+
+* After TOC sends the PAUSE message to a client, all messages sent 
+  to TOC will be ignored, and in some cases the connection will 
+  be dropped.  Another SIGN_ON message will be sent to the client 
+  when it is online again.  The buddy list and permit/deny items must 
+  be sent again, followed by the toc_init_done.  In most cases the 
+  SIGN_ON message will be sent between 1-2 seconds after the 
+  PAUSE message.  Therefore a client could choose to ignore the 
+  PAUSE message and hope nothing bad happens.
+
+
+Client -> TOC
+==============
+The commands and the arguments are usually separated by whitespaces.  Arguments
+with whitespace characters should be enclosed in quotes.  Dollar signs, 
+curly brackets, square brackets, parentheses, quotes, and backslashes 
+must all be backslashed whether in quotes or not.  It is usually 
+a good idea just to use quotes no matter what.  All user names from clients 
+to TOC should be normalized (spaces removed and lowercased), and therefore
+are the one exception to the always use quotes rule.
+
+When sending commands to the server you will not get a response
+back confirming that the command format was correct or not!  However
+in some cases if the command format was incorrect the connection
+will be dropped.
+
+
+RoastingString="Tic/Toc"
+
+toc_signon <authorizer host> <authorizer port> <User Name> <Password> 
+           <language> <version>
+    The password needs to be roasted with the Roasting String if
+    coming over a FLAP connection, CP connections don't use
+    roasted passwords.  The language specified will be used
+    when generating web pages, such as the get info pages.
+    Currently the only supported language is "english".
+    If the language sent isn't found, the default "english"
+    language will be used.  The version string will be used
+    for the client identity, and must be less then 50
+    characters.
+
+    Passwords are roasted when sent to the host.  This is done so they 
+    aren't sent in "clear text" over the wire, although they are still 
+    trivial to decode.  Roasting is performed by first xoring each byte 
+    in the password with the equivalent modulo byte in the roasting 
+    string.  The result is then converted to ascii hex, and prepended 
+    with "0x".  So for example the password "password" roasts to 
+    "0x2408105c23001130"
+
+toc_init_done
+    Tells TOC that we are ready to go online.  TOC clients should first 
+    send TOC the buddy list and any permit/deny lists.  However toc_init_done
+    must be called within 30 seconds after toc_signon, or the connection
+    will be dropped.  Remember, it can't be called until after the SIGN_ON
+    message is received.  Calling this before or multiple times after a
+    SIGN_ON will cause the connection to be dropped.
+
+toc_send_im <Destination User> <Message> [auto]
+    Send a message to a remote user.  Remember to quote and encode the 
+    message.  If the optional string "auto" is the last argument, then the 
+    auto response flag will be turned on for the im. 
+
+toc_add_buddy <Buddy User 1> [<Buddy User2> [<Buddy User 3> [...]]]
+    Add buddies to your buddy list.  This does not change your
+    saved config.
+
+toc_remove_buddy <Buddy User 1> [<Buddy User2> [<Buddy User 3> [...]]]
+    Remove buddies from your buddy list.  This does not change your
+    saved config.
+
+toc_set_config <Config Info>
+    Set the config information for this user.  The config information
+    is line oriented with the first character being the item type,
+    followed by a space, with the rest of the line being the item
+    value.  Only letters, numbers, and spaces should be used.  Remember
+    you will have to enclose the entire config in quotes.
+
+    Item Types:
+    g - Buddy Group (All Buddies until the next g or the end of config 
+		     are in this group.)
+    b - A Buddy 
+    p - Person on permit list
+    d - Person on deny list
+    m - Permit/Deny Mode.  Possible values are
+	1 - Permit All
+	2 - Deny All
+	3 - Permit Some
+	4 - Deny Some
+
+toc_evil <User> <norm|anon>
+    Evil/Warn someone else.  The 2nd argument is either the string
+    "norm" for a normal warning, or "anon" for an anonymous 
+    warning.  You can only evil people who have recently sent you
+    ims.  The higher someones evil level, the slower they can
+    send message.
+
+toc_add_permit [ <User 1> [<User 2> [...]]]
+    ADD the following people to your permit mode.  If
+    you are in deny mode it will switch you to permit
+    mode first.  With no arguments and in deny mode
+    this will switch you to permit none. If already
+    in permit mode, no arguments does nothing
+    and your permit list remains the same.
+
+toc_add_deny [ <User 1> [<User 2> [... ]]]
+    ADD the following people to your deny mode. If
+    you are in permit mode it will switch you to
+    deny mode first.  With no arguments and in permit
+    mode, this will switch you to deny none. If
+    already in deny mode, no arguments does nothing
+    and your deny list remains unchanged.
+
+toc_chat_join <Exchange> <Chat Room Name>
+    Join a chat room in the given exchange.  Exchange is
+    an integer that represents a group of chat rooms.
+    Different exchanges have different properties.  For
+    example some exchanges might have room replication (ie
+    a room never fills up, there are just multiple
+    instances.) and some exchanges might have navigational
+    information, and some exchanges might have ...  Currently
+    exchange should always be 4, however this may
+    change in the future.  You will either
+    receive an ERROR if the room couldn't be joined
+    or a CHAT_JOIN message.  The Chat Room Name
+    is case insensitive and consecutive spaces
+    are removed.
+
+toc_chat_send <Chat Room ID> <Message>
+    Send a message in a chat room using the chat room
+    id from CHAT_JOIN.  Since reflection is always on in
+    TOC, you do not need to add the message to your chat UI,
+    since you will get a CHAT_IN with the message.  
+    Remember to quote and encode the message.
+
+toc_chat_whisper <Chat Room ID> <dst_user> <Message>
+    Send a message in a chat room using the chat room
+    id from CHAT_JOIN.  This message is directed at
+    only one person.  (Currently you DO need to add this to
+    your UI.)  Remember to quote and encode the message.  
+    Chat whispering is different from IMs since it is linked
+    to a chat room, and should usually be displayed in the chat
+    room UI.
+
+toc_chat_evil <Chat Room ID> <User> <norm|anon>
+    Evil/Warn someone else inside a chat room.  The 3rd argument is either 
+    the string "norm" for a normal warning, or "anon" for an anonymous 
+    warning.  Currently chat evil is not turned on in the chat complex.
+
+toc_chat_invite <Chat Room ID> <Invite Msg> <buddy1> [<buddy2> [<buddy3> [...]]]
+    Once you are inside a chat room you can invite other people into
+    that room.  Remember to quote and encode the invite message.
+
+toc_chat_leave <Chat Room ID>
+    Leave the chat room.
+
+toc_chat_accept <Chat Room ID>
+    Accept a CHAT_INVITE message from TOC.  The server will send a
+    CHAT_JOIN in response.
+
+toc_get_info <username>
+    Gets a user's info a GOTO_URL or ERROR message will be sent back to the 
+    client.
+
+toc_set_info <info information>
+    Set the LOCATE user information.  This is basic HTML.
+    Remember to encode the info.
+
+toc_set_away [<away message>]
+    if the away message is present, then the unavailable
+    status flag is set for the user.  If the away message
+    is not present, then the unavailable status flag is
+    unset.  The away message is basic HTML, remember to
+    encode the information.
+
+toc_get_dir <username>
+    Gets a user's dir info a GOTO_URL or ERROR message will be sent back to the 
+    client.
+
+toc_set_dir <info information>
+    Set the DIR user information.  This is a colon separated fields as in:
+    "first name":"middle name":"last name":"maiden name":"city":"state":"country":"email":"allow web searches"
+    Should return a DIR_STATUS msg.  Having anything in the "allow web searches"
+    field allows people to use web-searches to find your directory info.
+    Otherwise, they'd have to use the client.  
+
+toc_dir_search <info information>
+    Perform a search of the Oscar Directory, using colon separated fields as in:
+    "first name":"middle name":"last name":"maiden name":"city":"state":"country":"email"
+    Returns either a GOTO_URL or ERROR msg.  
+
+toc_set_idle <idle secs>
+    Set idle information. If <idle secs> is 0 then the user isn't idle at all.
+    If <idle secs> is greater then 0 then the user has already been idle
+    for <idle secs> number of seconds.  The server will automatically
+    keep incrementing this number, so do not repeatedly call with new
+    idle times.
+
+
+TOC -> Client
+==============
+All user names from TOC to client are NOT normalized, and are
+sent as they should be displayed.  String are NOT encoded, instead
+we use colons as separators.  So that you can have colons inside
+of messages, everything after the colon before :<Message> should
+be considered part of the message (ie don't just "split" on colons,
+instead split with a max number of results.)
+
+
+SIGN_ON:<Client Version Supported>
+   This is sent after a successful toc_signon command is sent to TOC.
+   If the command was unsuccessful either the FLAP connection will
+   be dropped or you will receive a ERROR message.
+
+CONFIG:<config>
+   A user's config. Config can be empty in which case the host was not able to
+   retrieve it, or a config didn't exist for the user.  See toc_set_config
+   above for the format.
+
+NICK:<Nickname>
+   Tells you your correct nickname (ie how it should be capitalized and
+   spacing)
+
+IM_IN:<Source User>:<Auto Response T/F?>:<Message>
+   Receive an IM from some one.  Everything after the third colon is
+   the incoming message, including other colons.
+
+UPDATE_BUDDY:<Buddy User>:<Online? T/F>:<Evil Amount>:<Signon Time>:<IdleTime>:<UC>
+   This one command handles arrival/depart/updates.  Evil Amount is
+   a percentage, Signon Time is UNIX epoc, idle time is in minutes, UC (User Class)
+   is a two/three character string.
+   uc[0]:
+   ' '  - Ignore
+   'A'  - On AOL
+   uc[1]
+   ' '  - Ignore
+   'A'  - Oscar Admin
+   'U'  - Oscar Unconfirmed
+   'O'  - Oscar Normal
+   uc[2] 
+   '\0' - Ignore
+   ' '  - Ignore
+   'U'  - The user has set their unavailable flag.
+
+
+
+ERROR:<Error Code>:Var args
+   * General Errors *
+   901   - $1 not currently available
+   902   - Warning of $1 not currently available
+   903   - A message has been dropped, you are exceeding
+	   the server speed limit
+   * Chat Errors  *
+   950   - Chat in $1 is unavailable.
+
+   * IM & Info Errors *
+   960   - You are sending message too fast to $1
+   961   - You missed an im from $1 because it was too big.
+   962   - You missed an im from $1 because it was sent too fast.
+
+   * Dir Errors *
+   970   - Failure
+   971   - Too many matches
+   972   - Need more qualifiers
+   973   - Dir service temporarily unavailable
+   974   - Email lookup restricted
+   975   - Keyword Ignored
+   976   - No Keywords
+   977   - Language not supported
+   978   - Country not supported
+   979   - Failure unknown $1
+
+   * Auth errors *
+   980   - Incorrect nickname or password.
+   981   - The service is temporarily unavailable.
+   982   - Your warning level is currently too high to sign on.
+   983   - You have been connecting and
+	   disconnecting too frequently.  Wait 10 minutes and try again.
+	   If you continue to try, you will need to wait even longer.
+   989   - An unknown signon error has occurred $1
+
+
+EVILED:<new evil>:<name of eviler, blank if anonymous>
+   The user was just eviled.
+
+CHAT_JOIN:<Chat Room Id>:<Chat Room Name>
+   We were able to join this chat room.  The Chat Room Id is
+   internal to TOC.
+
+CHAT_IN:<Chat Room Id>:<Source User>:<Whisper? T/F>:<Message>
+   A chat message was sent in a chat room.
+
+CHAT_UPDATE_BUDDY:<Chat Room Id>:<Inside? T/F>:<User 1>:<User 2>...
+   This one command handles arrival/departs from a chat room.  The
+   very first message of this type for each chat room contains the
+   users already in the room.
+
+CHAT_INVITE:<Chat Room Name>:<Chat Room Id>:<Invite Sender>:<Message>
+   We are being invited to a chat room.
+
+CHAT_LEFT:<Chat Room Id>
+   Tells tic connection to chat room has been dropped
+
+GOTO_URL:<Window Name>:<Url>
+   Goto a URL.  Window Name is the suggested internal name of the window
+   to use.  (Java supports this.) 
+
+DIR_STATUS:<Return Code>
+   
+
+PAUSE
+   Tells TIC to pause so we can do migration
+
+Typical Signon Process
+======================
+Except for the section marked optional this is an sequential
+process.  Each line MUST occur before the following line.
+
+* Client connects to TOC
+* Client sends "FLAPON\r\n\r\n"
+* TOC sends Client FLAP SIGNON
+* Client sends TOC FLAP SIGNON
+* Client sends TOC "toc_signon" message
+* if login fails TOC drops client's connection
+  else TOC sends client SIGN_ON reply
+* if Client doesn't support version it drops the connection
+
+[BEGIN OPTIONAL]
+    * TOC sends Client CONFIG
+    * Client sends TOC permit/deny stuff
+    * Client sends TOC toc_add_buddy message
+[END OPTIONAL]
+
+* Client sends TOC toc_init_done message
+
+
+SFLAP Documentation
+===================
+SFLAP is pretty much a FLAP connection except the DATA frame payload is a null
+terminated string when traveling from client to host, it is NOT null
+terminated when traveling from host to client.  The FLAP Header is binary 
+data, and is in network byte order.  The data portion is at offset 6, after the
+header.  The sequence number is sequential in each direction.  So
+packets from the server to client have one sequence number, while
+the packets from the client to server have an independent
+increasing number.
+
+FLAP Header (6 bytes)
+-----------
+Offset   Size  Type
+0        1     ASTERISK (literal ASCII '*')
+1        1     Frame Type
+2        2     Sequence Number
+4        2     Data Length
+
+
+Valid Frame Type Values
+-----------------------
+1   SIGNON
+2   DATA
+3   ERROR     (Not used by TOC)
+4   SIGNOFF   (Not used by TOC)
+5   KEEP_ALIVE
+
+
+TOC SIGNON FRAME TYPE
+---------------------
+Sequence Number contains the initial sequence number used in each direction.
+Data Length contains the payload length, with the payload described
+below.  The payload area is NOT null terminated.
+
+Host To Client:
+    4 byte FLAP version (1)
+
+Client To Host:  
+    4 byte FLAP version (1)
+    2 byte TLV Tag (1)
+    2 byte Normalized User Name Length
+    N byte Normalized User Name  (NOT null terminated)
+
+    
+TOC DATA FRAME TYPE
+-------------------
+Sequence Number contains the next sequence number.
+Data Length is the length of the payload, including the null termination
+from client to host.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/gaims_funniest_home_convos.txt	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,169 @@
+All IM names have been changed, so I don't get sued or nothing.  I get some 
+interesting convos....
+
+17:58:27 Luser: You do any GTK programming?
+17:58:43 Zilding: You mean, work on GTK itself?
+17:58:56 Luser: no program stuff using GTK
+17:59:37 Zilding: Hrm.  How do you know me, again? :)
+17:59:54 Luser: haha.......i saw your handle in the help part of gaim
+18:00:01 Zilding: yes.
+18:00:05 Luser: Didnt mean to freak you out
+18:00:16 Zilding: Iz okay, I figured that was the answer.
+18:00:26 Zilding: Is gaim written with Athena, Motif, or Xforms?
+18:00:29 Zilding: or GTK? :)
+18:00:39 Luser: GTK :)
+18:00:50 Zilding: I believe you have answered your own question. :)
+
+
+15:40:14 SomeGuy: hey you there?
+15:40:28 Zilding: nope
+15:40:33 SomeGuy: :-)
+15:40:43 SomeGuy: ah there was a little bug in my code.
+15:40:46 SomeGuy: did you notice it?
+15:41:28 Zilding:  uh....jim ain't here...well...not at the keyboard at
+least...this is alissa...
+15:41:38 Zilding: and uh...i am not wearing a bra
+15:41:46 SomeGuy: hi alissa
+15:41:46 Zilding: i have him tied up at the moment
+15:41:51 SomeGuy: ah
+15:41:52 Zilding: hello
+15:42:01 SomeGuy: I hope he is having fun.
+15:42:05 Zilding: yeah....we're kinda busy righ tnow
+15:42:09 Zilding: know..err
+15:42:22 Zilding: hehe....
+15:42:24 SomeGuy: should I let you two love bird go?
+15:43:09 Zilding: uh...well...yeah i  guess...he really isn't in any sort of
+position to help you right now...
+15:43:42 Zilding: THREE CHEERS FOR A WIRELESS KEYBOARD
+15:43:44 Zilding: WOOHOO
+15:43:54 SomeGuy: tell him I said... compared to the current situation what
+I was going to ask him is microscopic.
+15:44:00 SomeGuy: have fun guys.
+
+
+16:24:41 JailBait: Hello How are you?
+16:24:48 JailBait: stats?
+16:25:00 Zilding: pretty good, who is this?
+16:25:54 JailBait: I got your name from the hotmail webCourier...i'm Abi   13/f
+16:26:39 Zilding: Hotmail webcourier?
+16:26:51 JailBait: yeah
+16:26:59 Zilding: Interesting.
+16:27:17 Zilding: Well, I'm 18 years old, male, and I still haven't a clue how you got my IM :)
+16:28:28 JailBait: yes it was under the thing where people were asking Questions and you anwered them....someone ask if they could IM you and you put in this s/n
+16:28:59 Zilding: Hmm.. what kind of questions was I answering?
+16:29:38 JailBait: normal one's you were ansering   holdon
+16:29:54 JailBait: hey mom is home talk to you later
+16:29:56 JailBait: bye bye]
+16:30:02 Zilding: uh.. okay :)
+16:31:58 Zilding: hey can you send me the URL to where you got my screen name?  I'm just curious :)
+
+
+19:05:45 ZFriend: waddle waddle waddle
+19:15:34 ZFriend: *waddle waddle waddle*
+19:15:45 ZFriend: (pssttt)
+19:16:07 ZFriend: (the penguins are coming...)
+19:16:12 ZFriend: (they are coming to dance with you...)
+19:45:16 Zilding: Really?  Coming to dance with ME?
+19:45:22 ZFriend: yes!
+19:45:49 Zilding: Cool! Why?
+19:46:01 ZFriend: they like you
+19:47:12 Zilding: wooohooo!
+19:47:14 Zilding: How'd you find this out?
+19:47:22 ZFriend: ...........they told me.......
+19:47:58 Zilding: Do you have secret meetings with them?  And what kind of dancng will we be doing?
+19:48:17 ZFriend: i cannot release any more information..... they do the mambo
+19:49:13 Zilding: hehe sounds like fun.  When are they coming?
+19:49:24 ZFriend: after their tea time
+19:49:55 Zilding: Okay.  Are they bringing the herring or should I make a run?
+19:50:10 ZFriend: the herring is not provided 
+19:50:31 Zilding: Ok cool.  Well thank you, Miss Mander Oracle :)
+19:50:54 ZFriend: :)
+
+
+16:57:30 L0s3R: u help write tik?
+16:57:54 Zilding: No, I'm the author and maintainer of gaim, and I spell correctly.
+16:58:25 L0s3R: gud gohd eyem sohry ashole
+16:58:36 Zilding: Fuck off.
+16:59:44 L0s3R: eheh
+16:59:46 L0s3R: i bet you have awin98 box too dont you fag
+16:59:46 L0s3R: tik owns
+16:59:46 L0s3R: eheh
+16:59:46 L0s3R: actually all this aol shit sucks
+16:59:46 L0s3R: eheh
+17:00:36 Zilding: Pardon me.  I've written Linux device drivers, and I'm on the XFree development team.  What have you given to the community?
+17:01:27 L0s3R: Nothing you've heard about mr uppity. =)
+17:02:17 Zilding: I'm sure not.  So forgive me when I'm not in a very good mood and I have a little contempt for people who use phrases like 'owns', can't spell correctly, and feel the need to capitalize every other letter in their name.  Are you a hax0r too?
+17:02:26 L0s3R: you ego is taknig up alot of space btw
+17:02:29 L0s3R: taking
+17:02:29 L0s3R: if you will
+17:02:32 L0s3R: lol
+17:02:39 L0s3R: goddamn
+17:02:50 L0s3R: im sure you use office software too
+17:03:31 Zilding: Get outta my face, ya script kiddie, and go back to your quake game.
+
+13:35:35 WinFreak: could u help me out with gaim..i kno i'm retarded  ROFL
+13:35:54 WinFreak : after you unzip it what do u do?
+13:36:36 RobFlynn: You have gaim-0.9.5.tar.gz?
+13:36:40 WinFreak : yeah 
+13:36:43 RobFlynn: first do: tar xvzf gaim-0.9.5.tar.gz
+13:36:47 RobFlynn: then go into that directory and type:
+13:36:49 RobFlynn: ./configure                                                 
+13:36:52 RobFlynn: then type: make
+13:37:10 WinFreak : tar xvzf...is that on ur webpage?
+13:40:00 RobFlynn: Umm ...
+13:45:00 WinFreak : Where can I download tar xvzf gaim-0.9.5.tar.gz?  Is this for windows?
+
+
+*** This is what happens when GAIM Developers get bored.
+
+22:39:18 RobFlynn: Umm
+22:39:19 RobFlynn: My brain is dead.
+22:39:39 Flyn Orange: *hooks up electrodes to Rob's brain and connects the battery*
+22:39:47 Flyn Orange: kaZAP!
+22:39:53 RobFlynn: EEpepEPAPEPAEppaep BBrRERERFFFF EPEPEPPEPpeppepape
+22:39:58 RobFlynn: *waddle jerk waddle waddle twitch*
+22:40:14 Flyn Orange: Its alive! Its ALIIIIIIIIIIIVE!!
+22:40:25 Flyn Orange: *maniacal laugh*
+22:40:26 RobFlynn: *twitch twitch waddle convulse*
+22:40:41 Flyn Orange: *disconnects battery*
+22:40:52 RobFlynn: *** The sun slowly fades away as a giant penguin towers above the remains of a small, wooden table***
+22:41:13 Flyn Orange: ** storm clouds rise **
+22:41:25 Flyn Orange: *thunder crack*
+22:41:26 RobFlynn: *** With an eerie, almost mechanical qualling, the penguin marches its way over to its creator ***
+22:41:56 Flyn Orange: Well, hello lit...er...big fella. Would you like some HERRING?
+22:42:19 Flyn Orange: How about some FREE BEER?
+22:42:44 RobFlynn: *** A booming voice echos through the hallways ***
+22:42:47 RobFlynn: *** PIPE GREP MORE ***
+22:43:20 RobFlynn: *** With a low, rumbling sound the last syllable of the mysterious phrase shakes the very foundation of the decrepit laboratory***
+22:43:22 Flyn Orange: ** the mad scientists terminal suddenly crashes, and a vaguely familiar blue screen shows on it's display **
+22:44:08 Flyn Orange: Damn the fates! How can I face my peers now when I TOLD them proprietary was better!
+!
+22:45:19 RobFlynn: *** THE PENGUIN BALKS: CTRL-ALT-DELETE ***
+
+
+hungryguy: Were you the one who ate the 1lbs hamburger?
+Flyn Orange: hehe... Well, I tried to. I was feeling kinda sick. :)
+Flyn Orange: Flyn Orange: Would've finished that sucker off if I'd have been feeling better!
+hungryguy: I'm proud of you still.
+Flyn Orange: PsyAssasin: That's quite impressive.
+Flyn Orange: *grin*  Thanks!
+hungryguy: I'm motivated to have a 1lbs hamburger party here.
+hungryguy: That would be sweet.
+Flyn Orange: haha!  That would rock!
+Flyn Orange: Good idea.
+Flyn Orange: Think I might do that sometime too!
+Flyn Orange: There are some truly cool people out there.
+
+--- If you guys havent learned yet, Jer is a smartass :-) ---
+
+00:03:43 Flyn Orange: *shoots you with silly string*
+00:03:55 RobFlynn: HELP! I AM COVERED IN NEONG REEN STRING
+00:06:54 Flyn Orange: NEONG REEN, Taiwan (AP) -
+                      Despite the recent economical collapses suffered due to 
+                      massive geological activity over the last month, the very
+                      profitable gag-manufacturer of Silly String has 
+                      maintained production through the turmoil. Still 
+                      employing 324 workers and a management team of 15 
+                      Slinkies, there is no risk of a price hike in cans of
+                      Silly String over the next few months...
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/the_penguin.txt	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,64 @@
+The Penguin
+
+by Jeramey Crawford <jacrawf@marko.net>
+   and
+   Rob Flynn <rflynn@blueridge.net>
+
+
+Once upon a term'nal dreary, while I hack'ed, weak and weary,
+Over many a quaint and curious volume of forgotten code--
+While I nodded, nearly napping, suddenly there came a beeping,
+As of some one gently feeping, feeping using damn talk mode.
+"'Tis some hacker," I muttered, "beeping using damn talk mode--
+                          Only this. I hate talk mode."
+
+Ah, distinctly I remember it was in the bleak semester,
+And college life wrought its terror as the school year became a bore.
+Eagerly I wished for privledges;--higher access I sought to borrow
+For my term'nal, unceasing sorrow--sorrow for a file called core--
+For the rare and radiant files of .c  the coders call the core--
+                           Access Denied.  Chown me more.
+
+"Open Source," did all mutter, when, with very little flirt and flutter,
+In there stepped a stately Penguin of the saintly days of yore.
+Quite a bit obese was he; having eaten lots of fish had he,
+But, by deign of Finnish programmer, he sat in the middle of my floor--
+Looking upon my dusty term'nal in the middle of my floor--
+                           Came, and sat, and nothing more.
+
+Then the tubby bird beguiling my sad code into shining,
+By the free and open decorum of the message that it bore,
+"Though thy term'nal be dusty and slow," he said, "Linux be not craven!"
+And thus I installed a new OS far from the proprietary shore--
+The kernel code open but documentation lacking on this shore.
+                           Quoth the Penguin, "pipe grep more!"
+
+Much I marvelled this rotund fowl to hear discourse so plainly,
+Though its answer little meaning--little relevancy bore;
+For we cannot help believing that no living human being
+Ever yet was blessed with seeing bird in the middle of his floor--
+Bird or beast sitting in the middle of his cluttered floor,
+                           With such instructions as "pipe grep more."
+
+But the Penguin, sitting lonely in that cluttered floor, spoke only
+Those words, as if its soul in that instruction he did outpour.
+Nothing more did he need utter; understood did I among that clutter--
+Understood his command as I could scarcely do a few moments before--
+I typed as furious as was willed me, understanding just a minute before.
+                           Again the bird said "pipe grep more!"
+
+"Amazing!" said I, "Penguin we will conquor the world if you will!
+By the Network that interconnects us--by that Finn we both adore--
+We'll take this very world by storm!" For now grasped I what he'd meant,
+The thing I do while searching /usr/doc/* for that wond'rous lore--
+Those compendiums of plaintext documentation and descriptive lore.
+                           Quoth the Penguin, "pipe grep more!"
+
+And the Penguin, never waddling, still is sitting, still is sitting
+In the middle of my room and still very cluttered floor;
+And his eyes have all the seeming of the free beer I am drinking
+And the term'nal-light o'er him glowing throws his shadows on the floor;
+And this OS from out the shadows that is pow'ring my term'nal on the floor
+                            Shall be dominating--"Pipe grep more!"
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/Makefile.am	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,17 @@
+EXTRA_DIST = admin_icon.xpm aimicon.xpm \
+	aimicon2.xpm aol_icon.xpm big.xpm \
+	bold.xpm dt_icon.xpm free_icon.xpm \
+	italic.xpm login_icon.xpm logo.xpm \
+	logout_icon.xpm no_icon.xpm normal.xpm \
+	link.xpm small.xpm speaker.xpm im.xpm \
+        buddychat.xpm info.xpm buddyadd.xpm \
+        buddydel.xpm permadd.xpm permdel.xpm \
+        wood.xpm palette.xpm offline.xpm \
+        online.xpm signing_on.xpm msg_pending.xpm \
+        away.xpm away_icon.xpm underline.xpm \
+        peng_smile.xpm peng_frown.xpm peng_wink.xpm \
+	strike.xpm \
+	gnome/devil-connect.png gnome/devil-offline.png \
+	gnome/devil-online.png gnome/penguin-connect.png \
+	gnome/penguin-offline.png gnome/penguin-online.png
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/admin_icon.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,23 @@
+/* XPM */
+static char * admin_icon_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"12 12 5 1",
+/* colors */
+" 	c None",
+".	c Gray0",
+"X	c yellow",
+"o	c #009900",
+"O	c #cccc99",
+/* pixels */
+" .   ..   . ",
+" .. .XX. .. ",
+" .X.XXXX.X. ",
+" .XXXooXXX. ",
+" .XXXoOXXX. ",
+" .XXooooXX. ",
+" .XXooooXX. ",
+" .XooXoooX. ",
+" .XXXXXXXX. ",
+"  .XXXXXX.  ",
+"   ..XX..   ",
+"     ..     "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/aimicon.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,217 @@
+/* XPM */
+static char *aimicon_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"29 42 169 2",
+"   c Gray0",
+".  c Transparent",
+"X  c #000002",
+"o  c #010102",
+"O  c #010103",
+"+  c #020203",
+"@  c Gray1",
+"#  c #020204",
+"$  c #030304",
+"%  c #040304",
+"&  c #050506",
+"*  c #050507",
+"=  c #060608",
+"-  c #070708",
+";  c #070709",
+":  c #0e0c05",
+">  c #08080a",
+",  c #0a0a0c",
+"<  c #0c0c0d",
+"1  c #0c0c0e",
+"2  c #0e0e10",
+"3  c #10100f",
+"4  c #12110d",
+"5  c #191507",
+"6  c #181508",
+"7  c #1b1708",
+"8  c #101012",
+"9  c #141415",
+"0  c #161618",
+"q  c #18181a",
+"w  c #1e1e20",
+"e  c #231f0c",
+"r  c #24200b",
+"t  c #2d280e",
+"y  c #21201b",
+"u  c #2c2712",
+"i  c Gray13",
+"p  c #29292b",
+"a  c #2e2e30",
+"s  c #3a372c",
+"d  c #303031",
+"f  c #383734",
+"g  c #3d3d3f",
+"h  c #423912",
+"j  c #433a12",
+"k  c #433b13",
+"l  c #463f18",
+"z  c #463f21",
+"x  c #4c4316",
+"c  c #53491a",
+"v  c #554a19",
+"b  c #564b19",
+"n  c #474020",
+"m  c #60531a",
+"M  c #61551a",
+"N  c #63571a",
+"B  c #645820",
+"V  c #6a5f2b",
+"C  c #6e601d",
+"Z  c #6e611f",
+"A  c #73641f",
+"S  c #77671f",
+"D  c #776821",
+"F  c #7b6b22",
+"G  c #71683f",
+"H  c #7d6e36",
+"J  c #404041",
+"K  c #424243",
+"L  c #434344",
+"P  c #454544",
+"I  c #454546",
+"U  c #4a4947",
+"Y  c #49494b",
+"T  c #545455",
+"R  c #59595a",
+"E  c #5b5b5d",
+"W  c #5c5c5e",
+"Q  c #5e5e60",
+"!  c #7f7857",
+"~  c #606060",
+"^  c #6a6a6b",
+"/  c #6c6c6b",
+"(  c Gray43",
+")  c #717170",
+"_  c #727272",
+"`  c #797978",
+"'  c #7b7b7b",
+"]  c Gray50",
+"[  c #837223",
+"{  c #837325",
+"}  c #887725",
+"|  c #8d7b25",
+" . c #8d7a26",
+".. c #8d7b26",
+"X. c #8e7c26",
+"o. c #807233",
+"O. c #8b7b38",
+"+. c #917f27",
+"@. c None",
+"#. c #958228",
+"$. c #9a872a",
+"%. c #958431",
+"&. c #aa952d",
+"*. c #ad972f",
+"=. c #ae982e",
+"-. c #a59130",
+";. c #b39c34",
+":. c #b59e32",
+">. c #baa233",
+",. c #bca433",
+"<. c #bda533",
+"1. c #b8a33d",
+"2. c #aca16e",
+"3. c #c0a734",
+"4. c #c3ab39",
+"5. c #c9af36",
+"6. c #cab037",
+"7. c #cdb338",
+"8. c #cfb438",
+"9. c #cfb538",
+"0. c #d1b738",
+"q. c #d3b839",
+"w. c #d2b83b",
+"e. c #d2b83c",
+"r. c #d5ba3a",
+"t. c #d9bd3b",
+"y. c #dabe3b",
+"u. c #dbbf3b",
+"i. c #dabe3c",
+"p. c #dbbf3c",
+"a. c #c1ab45",
+"s. c #d5bb40",
+"d. c #d9bf42",
+"f. c #dcc03b",
+"g. c #dcc03c",
+"h. c #ddc13c",
+"j. c #838383",
+"k. c #838385",
+"l. c #868685",
+"z. c #888889",
+"x. c #8d8d8f",
+"c. c #8e8e8d",
+"v. c #b8af86",
+"b. c #b5b5b3",
+"n. c #b5b5b4",
+"m. c Gray71",
+"M. c #bababc",
+"N. c #bcbcbb",
+"B. c #c3c3c3",
+"V. c #c4c4c3",
+"C. c #c5c5c3",
+"Z. c #c7c7c6",
+"A. c #c9c9c8",
+"S. c #d2d2d0",
+"D. c #d5d5d3",
+"F. c #d6d6d4",
+"G. c #dddddb",
+"H. c #e5e5e6",
+"J. c #e7e7e6",
+"K. c #e8e8e6",
+"L. c #ebebe9",
+"P. c #efefee",
+"I. c #f5f5f3",
+"U. c #f9f9f8",
+"Y. c #fafaf9",
+"T. c #fbfbf9",
+"R. c #fdfdfb",
+"E. c #fdfdfc",
+"W. c #fefefc",
+/* pixels */
+"@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.@.@.@.@.o o @.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.@.@.@.o o o o @.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.@.@.o o o o o o @.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.@.o # o o o o 9 ~ x.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o l._ k.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o n.K M.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o d ' U z @.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o o i B ;.v v F 3.M @.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o o Z 8.e.O.M  .=.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o o x 5.4.H o @.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o o % n @.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o o P g @.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o o D.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o q ( 0 o _ @.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o 8 L 2 o = o o @.@.@.@.@.@.@.@.@.@.z.@.",
+"@.@.@.@.@.@.o o # o o o o o o o o o o o Y R @.@.o o o a @.",
+"@.@.@.@.@.@.o o # o o o o o o o # # # # 1 2 o o o # # o @.",
+"@.@.@.@.@.o o o # o o o o o o o # # # # # # # # # # o @.@.",
+"@.@.@.@.@.o o o # o o o o o o o # # # # # # # o = # @.@.@.",
+"@.@.@.@.o o o o # o o o o o o o # # # # o o o o = @.@.@.@.",
+"@.@.@.@.o o o o # o o o o o o o # o o o o @.@.@.@.@.@.@.@.",
+"@.@.@.o o o o o # o o o o o o 1 P , @.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.o o o o o # o o o o ~ ^ ' A.Q @.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.# o o o o # o o o o S.K.L.Y.n.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.4 # o o o o # o o o x.I.R.R.E.B.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.& # o o o o # o o o D.R.R.R.E.V.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.o # o o o o # o o p G.R.R.R.E.V.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.o # o o o o # o o N.Y.R.R.R.E.V.@.@.@.@.@.@.@.@.@.@.@.",
+"@.E o # o o o o # o o V.R.R.R.R.E.V.@.@.@.@.@.@.@.@.@.@.@.",
+"@.T o # o o o o # o o V.R.R.R.R.E.V.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.# # o o o o # o o b.Y.R.R.R.E.V.@.@.@.@.@.@.r 4 u @.@.",
+"@.-.w # o o o o # o o W J.R.R.R.E.V.@.@.@.A :.:.:.V l @.@.",
+"@.%.! # o o o o # o o > F.R.R.R.P.j.@.S 6.w.p.p.p.w.+.[ @.",
+"@.7 >.c & o o o # o o o ^ Z.J.] / e X.g.g.r.7.8.8.d.{ : @.",
+"@.@.Z 1.s o o o # o o o o K E o t $.w.3.3. .@.@.@.2.a.5 @.",
+"@.@.@.s.o.o o o o o o o o o o y D *. .@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.g.&.@.j j j 7 o o o @.@.f @.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.p.0.<.<.<.<.j @.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.p.y.f.f.y.#.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.G v.@.} y.m @.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@."
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/aimicon2.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,217 @@
+/* XPM */
+static char *aimicon2_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"29 42 169 2",
+"   c Gray0",
+".  c Transparent",
+"X  c #000002",
+"o  c #010102",
+"O  c #010103",
+"+  c #020203",
+"@  c Gray1",
+"#  c #020204",
+"$  c #030304",
+"%  c #040304",
+"&  c #050506",
+"*  c #050507",
+"=  c #060608",
+"-  c #070708",
+";  c #070709",
+":  c #0e0c05",
+">  c #08080a",
+",  c #0a0a0c",
+"<  c #0c0c0d",
+"1  c #0c0c0e",
+"2  c #0e0e10",
+"3  c #10100f",
+"4  c #12110d",
+"5  c #191507",
+"6  c #181508",
+"7  c #1b1708",
+"8  c #101012",
+"9  c #141415",
+"0  c #161618",
+"q  c #18181a",
+"w  c #1e1e20",
+"e  c #231f0c",
+"r  c #24200b",
+"t  c #2d280e",
+"y  c #21201b",
+"u  c #2c2712",
+"i  c Gray13",
+"p  c #29292b",
+"a  c #2e2e30",
+"s  c #3a372c",
+"d  c #303031",
+"f  c #383734",
+"g  c #3d3d3f",
+"h  c #423912",
+"j  c #433a12",
+"k  c #433b13",
+"l  c #463f18",
+"z  c #463f21",
+"x  c #4c4316",
+"c  c #53491a",
+"v  c #554a19",
+"b  c #564b19",
+"n  c #474020",
+"m  c #60531a",
+"M  c #61551a",
+"N  c #63571a",
+"B  c #645820",
+"V  c #6a5f2b",
+"C  c #6e601d",
+"Z  c #6e611f",
+"A  c #73641f",
+"S  c #77671f",
+"D  c #776821",
+"F  c #7b6b22",
+"G  c #71683f",
+"H  c #7d6e36",
+"J  c #404041",
+"K  c #424243",
+"L  c #434344",
+"P  c #454544",
+"I  c #454546",
+"U  c #4a4947",
+"Y  c #49494b",
+"T  c #545455",
+"R  c #59595a",
+"E  c #5b5b5d",
+"W  c #5c5c5e",
+"Q  c #5e5e60",
+"!  c #7f7857",
+"~  c #606060",
+"^  c #6a6a6b",
+"/  c #6c6c6b",
+"(  c Gray43",
+")  c #717170",
+"_  c #727272",
+"`  c #797978",
+"'  c #7b7b7b",
+"]  c Gray50",
+"[  c #837223",
+"{  c #837325",
+"}  c #887725",
+"|  c #8d7b25",
+" . c #8d7a26",
+".. c #8d7b26",
+"X. c #8e7c26",
+"o. c #807233",
+"O. c #8b7b38",
+"+. c #917f27",
+"@. c None",
+"#. c #958228",
+"$. c #9a872a",
+"%. c #958431",
+"&. c #aa952d",
+"*. c #ad972f",
+"=. c #ae982e",
+"-. c #a59130",
+";. c #b39c34",
+":. c #b59e32",
+">. c #baa233",
+",. c #bca433",
+"<. c #bda533",
+"1. c #b8a33d",
+"2. c #aca16e",
+"3. c #c0a734",
+"4. c #c3ab39",
+"5. c #c9af36",
+"6. c #cab037",
+"7. c #cdb338",
+"8. c #cfb438",
+"9. c #cfb538",
+"0. c #d1b738",
+"q. c #d3b839",
+"w. c #d2b83b",
+"e. c #d2b83c",
+"r. c #d5ba3a",
+"t. c #d9bd3b",
+"y. c #dabe3b",
+"u. c #dbbf3b",
+"i. c #dabe3c",
+"p. c #dbbf3c",
+"a. c #c1ab45",
+"s. c #d5bb40",
+"d. c #d9bf42",
+"f. c #dcc03b",
+"g. c #dcc03c",
+"h. c #ddc13c",
+"j. c #838383",
+"k. c #838385",
+"l. c #868685",
+"z. c #888889",
+"x. c #8d8d8f",
+"c. c #8e8e8d",
+"v. c #b8af86",
+"b. c #b5b5b3",
+"n. c #b5b5b4",
+"m. c Gray71",
+"M. c #bababc",
+"N. c #bcbcbb",
+"B. c #c3c3c3",
+"V. c #c4c4c3",
+"C. c #c5c5c3",
+"Z. c #c7c7c6",
+"A. c #c9c9c8",
+"S. c #d2d2d0",
+"D. c #d5d5d3",
+"F. c #d6d6d4",
+"G. c #dddddb",
+"H. c #e5e5e6",
+"J. c #e7e7e6",
+"K. c #e8e8e6",
+"L. c #ebebe9",
+"P. c #efefee",
+"I. c #f5f5f3",
+"U. c #f9f9f8",
+"Y. c #fafaf9",
+"T. c #fbfbf9",
+"R. c #fdfdfb",
+"E. c #fdfdfc",
+"W. c #fefefc",
+/* pixels */
+"@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.@.@.@.@.o o @.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.@.@.@.o o o o @.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.@.@.o o o o o o @.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.@.o # o o o o 9 ~ x.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o l._ k.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o n.K M.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o d ' U z @.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o o i B ;.v v F 3.M @.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o o Z 8.e.O.M  .=.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o o x 5.4.H o @.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o o % n @.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o o P g @.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o o o o o D.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o q ( 0 o _ @.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.o o # o 8 L 2 o = o o @.@.@.@.@.@.@.@.@.@.z.@.",
+"@.@.@.@.@.@.o o # o o o o o o o o o o o Y R @.@.o o o a @.",
+"@.@.@.@.@.@.o o # o o o o o o o # # # # 1 2 o o o # # o @.",
+"@.@.@.@.@.o o o # o o o o o o o # # # # # # # # # # o @.@.",
+"@.@.@.@.@.o o o # o o o o o o o # # # # # # # o = # @.@.@.",
+"@.@.@.@.o o o o # o o o o o o o # # # # o o o o = @.@.@.@.",
+"@.@.@.@.o o o o # o o o o o o o # o o o o @.@.@.@.@.@.@.@.",
+"@.@.@.o o o o o # o o o o o o 1 P , @.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.o o o o o # o o o o ~ ^ ' A.Q @.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.# o o o o # o o o o S.K.L.Y.n.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.4 # o o o o # o o o x.I.R.R.E.B.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.& # o o o o # o o o D.R.R.R.E.V.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.o # o o o o # o o p G.R.R.R.E.V.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.o # o o o o # o o N.Y.R.R.R.E.V.@.@.@.@.@.@.@.@.@.@.@.",
+"@.E o # o o o o # o o V.R.R.R.R.E.V.@.@.@.@.@.@.@.@.@.@.@.",
+"@.T o # o o o o # o o V.R.R.R.R.E.V.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.# # o o o o # o o b.Y.R.R.R.E.V.@.@.@.@.@.@.r 4 u @.@.",
+"@.-.w # o o o o # o o W J.R.R.R.E.V.@.@.@.A :.:.:.V l @.@.",
+"@.%.! # o o o o # o o > F.R.R.R.P.j.@.S 6.w.p.p.p.w.+.[ @.",
+"@.7 >.c & o o o # o o o ^ Z.J.] / e X.g.g.r.7.8.8.d.{ : @.",
+"@.@.Z 1.s o o o # o o o o K E o t $.w.3.3. .@.@.@.2.a.5 @.",
+"@.@.@.s.o.o o o o o o o o o o y D *. .@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.g.&.@.j j j 7 o o o @.@.f @.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.p.0.<.<.<.<.j @.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.p.y.f.f.y.#.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.G v.@.} y.m @.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.",
+"@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@."
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/aol_icon.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,24 @@
+/* XPM */
+static char * aol_icon_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"12 12 6 1",
+/* colors */
+" 	c None",
+".	c #ccccff",
+"X	c #3333ff",
+"o	c blue",
+"O	c #9999ff",
+"+	c #6666ff",
+/* pixels */
+"            ",
+"     ..     ",
+"     XX     ",
+"    .oo.    ",
+"    XooX    ",
+"   .XOOXO   ",
+"   Xooo.O   ",
+"  .OoooXOO  ",
+"  X.oooo.X  ",
+" OoXOooo.oO ",
+" Xoo+.+oooX ",
+"            "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/away.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,12 @@
+/* XPM */
+static char * away_xpm[] = {
+"16 7 2 1",
+" 	c None",
+".	c #E89530",
+"  ....          ",
+" .  ..          ",
+"   ..  .... ....",
+"  ..  . .. . .. ",
+" ...  . .  . .  ",
+" ..  . .. . .. .",
+"..... .... .... "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/away_icon.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,21 @@
+/* XPM */
+static char * away_icon_xpm[] = {
+"12 12 6 1",
+" 	c None",
+".	c #000000",
+"+	c #EFFB41",
+"@	c #FBF9AE",
+"#	c #F2FB3C",
+"$	c #F4FC44",
+"  ......... ",
+" ..+++++++. ",
+".@.+...+++. ",
+".@.+++++++. ",
+".@.#+....+. ",
+".@.$++++++. ",
+".@.++....+. ",
+".@..++++++..",
+".@@.+++++++.",
+".@@.........",
+".@@@@@@@@.  ",
+"..........  "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/big.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,30 @@
+/* XPM */
+static char *big_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"22 17 7 1",
+"  c Gray0",
+". c Gray40",
+"X c #666666669999",
+"o c Magenta",
+"O c #999999996666",
+"+ c Gray60",
+"@ c None",
+/* pixels */
+"@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@ @@@@@@@ @@@@@@@",
+"@@@@@   @@@@@@ @@@@@@@",
+"@@@@     @@@@   @@@@@@",
+"@@@@     @@@@   @@@@@@",
+"@@@@ . . @@@  @  @@@@@",
+"@@@@XOXO.@@@  @  @@@@@",
+"@@@@OXOX@@@@     @@@@@",
+"@@@@XOXO.@@  @@@  @@@@",
+"@@@@@@@@@@@  @@@  @@@@",
+"@@@@@@@@@@    @    @@@",
+"@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@"
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/bold.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,22 @@
+/* XPM */
+static char * bold_xpm[] = {
+"22 17 2 1",
+" 	c None",
+".	c #000000",
+"                      ",
+"                      ",
+"                      ",
+"                      ",
+"                      ",
+"       .......        ",
+"        ... ...       ",
+"        ... ...       ",
+"        ... ...       ",
+"        ......        ",
+"        ... ...       ",
+"        ... ...       ",
+"        ... ...       ",
+"       .......        ",
+"                      ",
+"                      ",
+"                      "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/buddyadd.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,263 @@
+/* XPM */
+static char * buddyadd_xpm[] = {
+"42 39 221 2",
+"  	c None",
+". 	c #F41515",
+"+ 	c #F71515",
+"@ 	c #ED1414",
+"# 	c #F91515",
+"$ 	c #D41212",
+"% 	c #DD1313",
+"& 	c #CD1111",
+"* 	c #D21212",
+"= 	c #E21313",
+"- 	c #D81212",
+"; 	c #FA1515",
+"> 	c #EF1414",
+", 	c #EB1414",
+"' 	c #F61515",
+") 	c #FC1616",
+"! 	c #EA1414",
+"~ 	c #DF1313",
+"{ 	c #DB1313",
+"] 	c #E61414",
+"^ 	c #000000",
+"/ 	c #E91414",
+"( 	c #EE1414",
+"_ 	c #E71414",
+": 	c #E01313",
+"< 	c #0A0A0A",
+"[ 	c #6B6B6B",
+"} 	c #090909",
+"| 	c #595959",
+"1 	c #0F0F0F",
+"2 	c #CA1111",
+"3 	c #464646",
+"4 	c #7A7A83",
+"5 	c #D11212",
+"6 	c #FFFFFF",
+"7 	c #F5F5F5",
+"8 	c #DEDEDE",
+"9 	c #C71111",
+"0 	c #C31111",
+"a 	c #1B1B1B",
+"b 	c #7B7B7B",
+"c 	c #FFD712",
+"d 	c #FFE316",
+"e 	c #EED408",
+"f 	c #EBEBEB",
+"g 	c #F4B509",
+"h 	c #FFDB09",
+"i 	c #FFE608",
+"j 	c #F9D83B",
+"k 	c #DFC707",
+"l 	c #D8C007",
+"m 	c #FFC712",
+"n 	c #FFE23E",
+"o 	c #EDD308",
+"p 	c #C99100",
+"q 	c #DD9D07",
+"r 	c #D0D0D0",
+"s 	c #EDBB04",
+"t 	c #EFA808",
+"u 	c #E4A110",
+"v 	c #A6813C",
+"w 	c #CCCCCC",
+"x 	c #272727",
+"y 	c #2D2D27",
+"z 	c #FAFAFA",
+"A 	c #D3D3D3",
+"B 	c #B58D42",
+"C 	c #D1D1D1",
+"D 	c #F2F2F2",
+"E 	c #E4E4E4",
+"F 	c #E8E8E8",
+"G 	c #D4D4D4",
+"H 	c #E7E7E7",
+"I 	c #F3F3F3",
+"J 	c #EFEFEF",
+"K 	c #ECECEC",
+"L 	c #DCDCDC",
+"M 	c #EEEEEE",
+"N 	c #D5D5D5",
+"O 	c #FBFBFB",
+"P 	c #F7F7F7",
+"Q 	c #BBBBBB",
+"R 	c #3D3D3D",
+"S 	c #F6F6F6",
+"T 	c #F4F4F4",
+"U 	c #BABABA",
+"V 	c #FEFEFE",
+"W 	c #F8F8F8",
+"X 	c #1F1F1F",
+"Y 	c #070707",
+"Z 	c #5E5E5E",
+"` 	c #25253C",
+" .	c #676767",
+"..	c #1E1E1E",
+"+.	c #FFF025",
+"@.	c #FFD812",
+"#.	c #D7970F",
+"$.	c #FFCE15",
+"%.	c #FFFF1A",
+"&.	c #FFE614",
+"*.	c #FFEF17",
+"=.	c #EFC713",
+"-.	c #D7A30F",
+";.	c #0C0C0C",
+">.	c #958514",
+",.	c #FFDD15",
+"'.	c #FFC616",
+").	c #FFF416",
+"!.	c #FFFF1B",
+"~.	c #FFFF29",
+"{.	c #FFE609",
+"].	c #C7C7C7",
+"^.	c #F7C737",
+"/.	c #CF9700",
+"(.	c #8C5D07",
+"_.	c #282103",
+":.	c #966806",
+"<.	c #A78005",
+"[.	c #9B7805",
+"}.	c #FFD40A",
+"|.	c #FFFF16",
+"1.	c #FFDB0A",
+"2.	c #FFF40A",
+"3.	c #FFF626",
+"4.	c #FFEB16",
+"5.	c #BF8F03",
+"6.	c #DFA707",
+"7.	c #D29C07",
+"8.	c #C69307",
+"9.	c #C89A0D",
+"0.	c #C79A06",
+"a.	c #BD9D0F",
+"b.	c #FFC114",
+"c.	c #FFFE0A",
+"d.	c #FFF615",
+"e.	c #FFFF33",
+"f.	c #FFE814",
+"g.	c #FFFC27",
+"h.	c #FFED42",
+"i.	c #FFD012",
+"j.	c #F5B110",
+"k.	c #F0F0F0",
+"l.	c #C2C2C2",
+"m.	c #BA8307",
+"n.	c #E1AA07",
+"o.	c #E6B00F",
+"p.	c #E5B107",
+"q.	c #D7B311",
+"r.	c #DEA50E",
+"s.	c #CEAB11",
+"t.	c #B99A0F",
+"u.	c #FAA612",
+"v.	c #FFF218",
+"w.	c #FFC309",
+"x.	c #FFBA09",
+"y.	c #FFD909",
+"z.	c #FFD408",
+"A.	c #FFCD08",
+"B.	c #ECC308",
+"C.	c #E0E0E0",
+"D.	c #DDDDDD",
+"E.	c #B87F07",
+"F.	c #D8A607",
+"G.	c #DAB91D",
+"H.	c #DCAA07",
+"I.	c #D59E0D",
+"J.	c #C48C07",
+"K.	c #DCB511",
+"L.	c #B98406",
+"M.	c #F1AA11",
+"N.	c #FFCD11",
+"O.	c #F3CF20",
+"P.	c #EBAE0F",
+"Q.	c #E9B507",
+"R.	c #EFB10F",
+"S.	c #ECB707",
+"T.	c #DBA10E",
+"U.	c #AE7D06",
+"V.	c #CACACA",
+"W.	c #C0C0C0",
+"X.	c #B9B9B9",
+"Y.	c #A16F06",
+"Z.	c #C8A006",
+"`.	c #D2AF11",
+" +	c #BA8506",
+".+	c #B69A18",
+"++	c #A78E16",
+"@+	c #AD800B",
+"#+	c #A5780B",
+"$+	c #E39D11",
+"%+	c #CE9408",
+"&+	c #B28206",
+"*+	c #997105",
+"=+	c #A87F05",
+"-+	c #CE9F06",
+";+	c #C4A71A",
+">+	c #BA8E0C",
+",+	c #8B5B06",
+"'+	c #8C5F05",
+")+	c #C69106",
+"!+	c #D7A00D",
+"~+	c #BE9106",
+"{+	c #9E7805",
+"]+	c #6E4E10",
+"^+	c #4B3303",
+"/+	c #654105",
+"(+	c #7F5305",
+"_+	c #886205",
+":+	c #956D05",
+"<+	c #7D5705",
+"[+	c #523002",
+"}+	c #714B05",
+"|+	c #A07106",
+"1+	c #B18106",
+"2+	c #8A6205",
+"3+	c #291B04",
+"4+	c #020100",
+"5+	c #030200",
+"6+	c #0F0A00",
+"7+	c #100B00",
+"8+	c #040200",
+"                                                                                    ",
+"                                                                    . +             ",
+"                                                                    @ #             ",
+"                                                                    $ %             ",
+"                                                                    & *             ",
+"                                                                    = -             ",
+"                                                          . ; > , ' ) ! ~ ~ { ! ]   ",
+"                                ^ ^ ^ ^ ^                 / ' ( _ / ( ~ ~ ~ : ] {   ",
+"                              ^ ^ ^ ^ < [ ^                         ~ ~             ",
+"                            ^ ^ ^ ^ ^ } | 1 ^                       ~ ~             ",
+"                            ^ ^ ^ ^ ^ ^ ^ ^ ^                       ~ 2             ",
+"                            ^ ^ 3 ^ ^ 4 ^ ^ ^                       & 5             ",
+"                            ^ 6 6 ^ 7 6 8 ^ ^ ^                     9 0             ",
+"                            ^ ^ 6 a 6 ^ b ^ ^ ^                                     ",
+"                            ^ ^ c d e ^ f ^ ^ ^                                     ",
+"                            ^ g h i j k l ^ ^ ^                                     ",
+"                            ^ m h n o p q ^ ^ ^                                     ",
+"                            ^ r s t u v w ^ x y ^                                   ",
+"                            ^ z A B A C D E ^ ^ ^                                   ",
+"                          ^ 6 6 F G 6 z D H ^ ^ ^ ^                                 ",
+"                        ^ ^ 6 6 6 6 6 z I J K ^ ^ ^                                 ",
+"                      ^ ^ L 6 6 6 6 6 z M N F ^ ^ ^ ^                               ",
+"                      ^ ^ 6 6 6 6 6 6 O P K Q R ^ ^ ^ ^                             ",
+"                      ^ ^ 6 6 6 6 6 6 O P S T U ^ 1 ^ ^                             ",
+"                    ^ ^ 6 6 6 6 6 6 V W P P T D X Y 3 ^ ^                           ",
+"                    ^ ^ 6 6 6 6 6 V W P P P S S P ^ ^ ^ ^                           ",
+"                  ^ Z 6 6 6 6 6 V W P P P P P P P ^ ` ^ ^                           ",
+"                  ^  .6 6 6 6 6 O P P P P P P P T ^ ..^ ^                           ",
+"                  ^ } 6 6 6 6 6 O P P P P P P P S ^ 1 ^ ^                           ",
+"                  +.@.^ 6 6 6 V W P P P P P P #.#.^ ^ ^ ^                           ",
+"                $.%.&.*.^ 6 6 O P P P P P P P =.-.^ ^ ;.>.                          ",
+"            ,.'.).!.~.{.^ ^ V W P P P P P P ].^./.(._.:.<.[.                        ",
+"          }.|.|.1.%.2.3.4.^ ^ P P P P P P P ].5.6.7.8.9.0.a.                        ",
+"          b.c.d.e.f.g.h.i.j.^ k.k.k.k.k.k.k.l.m.n.o.p.q.r.s.t.                      ",
+"          u.v.&.w.x.y.z.A.B.f C.D.L L L L ^ ^ E.F.G.H.I.J.K.s.L.                    ",
+"          M.i.N.O.P.Q.R.S.T.U.V.W.Q X.X.^ ^ ^ Y.Z.`. +.+++@+#+                      ",
+"          $+%+&+*+=+0.-+;+>+,+^ ^ ^ ^ ^ ^ ^ ^ '+)+!+~+{+]+                          ",
+"                ^+/+(+_+:+<+[+^ ^           ^ }+|+1+2+3+                            ",
+"                      4+5+^                   6+7+8+^                               "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/buddychat.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,423 @@
+/* XPM */
+static char * buddychat_xpm[] = {
+"34 40 380 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #FEFEFE",
+"@ 	c #E9E9E9",
+"# 	c #FDFDFD",
+"$ 	c #F4F4F4",
+"% 	c #E5E5E5",
+"& 	c #FBFBFB",
+"* 	c #FAFAFA",
+"= 	c #E3E3E3",
+"- 	c #C1C1C1",
+"; 	c #F8F8F8",
+"> 	c #F7F7F7",
+", 	c #F0F0F0",
+"' 	c #D1D1D1",
+") 	c #F6F6F6",
+"! 	c #EDEDED",
+"~ 	c #DBDBDB",
+"{ 	c #C4C4C4",
+"] 	c #B5B5B5",
+"^ 	c #E0E0E0",
+"/ 	c #D2D2D2",
+"( 	c #C3C3C3",
+"_ 	c #ADADAD",
+": 	c #949494",
+"< 	c #EAEAEA",
+"[ 	c #EFEFEF",
+"} 	c #F9F9F9",
+"| 	c #F1F1F1",
+"1 	c #E7E7E7",
+"2 	c #F3F3F3",
+"3 	c #E6E6E6",
+"4 	c #D4D4D4",
+"5 	c #E2E2E2",
+"6 	c #CACACA",
+"7 	c #CDCDCD",
+"8 	c #DCDCDC",
+"9 	c #DEDEDE",
+"0 	c #D6D6D6",
+"a 	c #B2B2B2",
+"b 	c #959595",
+"c 	c #B9B9B9",
+"d 	c #A4A4A4",
+"e 	c #A8A8A8",
+"f 	c #D5D5D5",
+"g 	c #D8D8D8",
+"h 	c #CECECE",
+"i 	c #C7C7C7",
+"j 	c #C5C5C5",
+"k 	c #BEBEBE",
+"l 	c #BABABA",
+"m 	c #B6B6B6",
+"n 	c #A2A2A2",
+"o 	c #9E9E9E",
+"p 	c #A1A1A1",
+"q 	c #ABABAB",
+"r 	c #A9A9A9",
+"s 	c #A5A5A5",
+"t 	c #C0C0C0",
+"u 	c #010102",
+"v 	c #383839",
+"w 	c #000001",
+"x 	c #0B0B0B",
+"y 	c #020203",
+"z 	c #000002",
+"A 	c #161516",
+"B 	c #313031",
+"C 	c #010104",
+"D 	c #010103",
+"E 	c #020205",
+"F 	c #020204",
+"G 	c #1D1D1D",
+"H 	c #1C1B1B",
+"I 	c #030304",
+"J 	c #313030",
+"K 	c #050506",
+"L 	c #060607",
+"M 	c #0C0C0D",
+"N 	c #060609",
+"O 	c #070709",
+"P 	c #CCCCCC",
+"Q 	c #232324",
+"R 	c #1D1D1E",
+"S 	c #080809",
+"T 	c #19191A",
+"U 	c #1E1E1F",
+"V 	c #C2C2C1",
+"W 	c #565556",
+"X 	c #6E6E6E",
+"Y 	c #5C5C5D",
+"Z 	c #404041",
+"` 	c #888888",
+" .	c #383738",
+"..	c #AFAFAD",
+"+.	c #2A2A2B",
+"@.	c #939392",
+"#.	c #272727",
+"$.	c #717171",
+"%.	c #3C3C3E",
+"&.	c #696353",
+"*.	c #B39F55",
+"=.	c #8C7A3E",
+"-.	c #555453",
+";.	c #4B4B4C",
+">.	c #7D6E42",
+",.	c #AE9A4B",
+"'.	c #121112",
+").	c #4E4E4E",
+"!.	c #A49D7A",
+"~.	c #BEA635",
+"{.	c #C19E15",
+"].	c #53472B",
+"^.	c #332B10",
+"/.	c #FFEF26",
+"(.	c #FFFD26",
+"_.	c #FFD00C",
+":.	c #7A5A15",
+"<.	c #553F11",
+"[.	c #F3BB0C",
+"}.	c #504407",
+"|.	c #1B1B1B",
+"1.	c #0D0D0E",
+"2.	c #BC9210",
+"3.	c #FFD916",
+"4.	c #E0BD15",
+"5.	c #7E5D05",
+"6.	c #2C2C2E",
+"7.	c #4A463E",
+"8.	c #F0C762",
+"9.	c #EBB40F",
+"0.	c #EEBC1B",
+"a.	c #5A4B26",
+"b.	c #38301B",
+"c.	c #B58F1D",
+"d.	c #060604",
+"e.	c #141415",
+"f.	c #030305",
+"g.	c #0B0B0D",
+"h.	c #2F2F30",
+"i.	c #D8CFBD",
+"j.	c #C9A24D",
+"k.	c #B08A23",
+"l.	c #64583C",
+"m.	c #DADAD9",
+"n.	c #DDD3BF",
+"o.	c #CFC7B8",
+"p.	c #919191",
+"q.	c #616061",
+"r.	c #8E8C87",
+"s.	c #3A3A3B",
+"t.	c #171718",
+"u.	c #2D2D2E",
+"v.	c #4F4F4F",
+"w.	c #777676",
+"x.	c #F7F7F5",
+"y.	c #B5B5B4",
+"z.	c #9F9F9E",
+"A.	c #1F1F1F",
+"B.	c #272628",
+"C.	c #29292A",
+"D.	c #9B9B9A",
+"E.	c #626263",
+"F.	c #524F42",
+"G.	c #6B6962",
+"H.	c #7D7D7C",
+"I.	c #040406",
+"J.	c #C6C6C6",
+"K.	c #E3E3E2",
+"L.	c #CCCCCA",
+"M.	c #767676",
+"N.	c #09090B",
+"O.	c #959597",
+"P.	c #F5F5F3",
+"Q.	c #59595A",
+"R.	c #131315",
+"S.	c #765F2B",
+"T.	c #D8AE0F",
+"U.	c #DCBF25",
+"V.	c #CDB851",
+"W.	c #040405",
+"X.	c #484849",
+"Y.	c #F3F3F2",
+"Z.	c #F0F0EF",
+"`.	c #E7E7E6",
+" +	c #C7C7C6",
+".+	c #0F0D10",
+"++	c #383838",
+"@+	c #FFFFFE",
+"#+	c #D2D2D1",
+"$+	c #121213",
+"%+	c #936F0D",
+"&+	c #EBC215",
+"*+	c #E2B80F",
+"=+	c #CD9F24",
+"-+	c #505050",
+";+	c #F6F6F5",
+">+	c #F8F8F6",
+",+	c #636364",
+"'+	c #060606",
+")+	c #030203",
+"!+	c #4D4D4E",
+"~+	c #FDFDFC",
+"{+	c #FBFBF9",
+"]+	c #88847C",
+"^+	c #B6995B",
+"/+	c #C0A571",
+"(+	c #E5E3DD",
+"_+	c #525253",
+":+	c #111113",
+"<+	c #FEFEFD",
+"[+	c #FAFAF9",
+"}+	c #F9F9F8",
+"|+	c #F8F8F7",
+"1+	c #EEEEEC",
+"2+	c #B3B3B2",
+"3+	c #060608",
+"4+	c #8B8B8B",
+"5+	c #FCFCFB",
+"6+	c #DEDEDD",
+"7+	c #414141",
+"8+	c #DAD9D8",
+"9+	c #F0F0EE",
+"0+	c #FDFDFB",
+"a+	c #BABAB8",
+"b+	c #FCFCFA",
+"c+	c #EFEFEE",
+"d+	c #D8D7D7",
+"e+	c #0E0E0F",
+"f+	c #0B0B0C",
+"g+	c #5D5B54",
+"h+	c #565657",
+"i+	c #6C6B6C",
+"j+	c #F7F7F6",
+"k+	c #ECECEC",
+"l+	c #D3D3D2",
+"m+	c #202021",
+"n+	c #616162",
+"o+	c #EEEEED",
+"p+	c #F3F3F1",
+"q+	c #A7A6A2",
+"r+	c #795F10",
+"s+	c #3F2E03",
+"t+	c #81690D",
+"u+	c #060404",
+"v+	c #795C08",
+"w+	c #FFF288",
+"x+	c #BBBBBB",
+"y+	c #D3D3D1",
+"z+	c #FBFBFA",
+"A+	c #969696",
+"B+	c #101011",
+"C+	c #CCCCCB",
+"D+	c #F9F9F7",
+"E+	c #F4F4F2",
+"F+	c #909090",
+"G+	c #68540F",
+"H+	c #CA9C09",
+"I+	c #B88B08",
+"J+	c #8D6808",
+"K+	c #FFD40C",
+"L+	c #C89008",
+"M+	c #E7A709",
+"N+	c #E2C168",
+"O+	c #FAFAF8",
+"P+	c #7A7A7A",
+"Q+	c #676767",
+"R+	c #6F6F6F",
+"S+	c #B1B1B0",
+"T+	c #1E1905",
+"U+	c #CDA00A",
+"V+	c #E2AF0B",
+"W+	c #EAB30B",
+"X+	c #DCA80A",
+"Y+	c #FFF00F",
+"Z+	c #FFF10F",
+"`+	c #FFE60D",
+" @	c #9C7517",
+".@	c #BDBDBC",
+"+@	c #E7E7E5",
+"@@	c #E3E3E1",
+"#@	c #CBCBCA",
+"$@	c #0F0F10",
+"%@	c #9E9E9D",
+"&@	c #F6F6F4",
+"*@	c #F5F5F4",
+"=@	c #313132",
+"-@	c #D4D4D3",
+";@	c #C8C7C6",
+">@	c #A2851C",
+",@	c #DBA90A",
+"'@	c #E4B00B",
+")@	c #EBB50B",
+"!@	c #CC9C09",
+"~@	c #D39C09",
+"{@	c #FFE20D",
+"]@	c #FFD90C",
+"^@	c #F2B90B",
+"/@	c #886106",
+"(@	c #5B5B5B",
+"_@	c #7A7A79",
+":@	c #646462",
+"<@	c #100D09",
+"[@	c #CECECD",
+"}@	c #363637",
+"|@	c #09090A",
+"1@	c #393939",
+"2@	c #3F3728",
+"3@	c #9E7706",
+"4@	c #C09409",
+"5@	c #C39508",
+"6@	c #B48A09",
+"7@	c #A37B07",
+"8@	c #513903",
+"9@	c #956D05",
+"0@	c #AD8007",
+"a@	c #604103",
+"b@	c #050301",
+"c@	c #231702",
+"d@	c #5D4305",
+"e@	c #CD9E0A",
+"f@	c #7E7555",
+"g@	c #FFFFFD",
+"h@	c #EAD475",
+"i@	c #251D04",
+"j@	c #312A0A",
+"k@	c #0E0901",
+"l@	c #593D03",
+"m@	c #745304",
+"n@	c #302101",
+"o@	c #332201",
+"p@	c #705306",
+"q@	c #BF9108",
+"r@	c #FAC00C",
+"s@	c #CFA10A",
+"t@	c #3C3B36",
+"u@	c #DBDBD9",
+"v@	c #F4F4F3",
+"w@	c #E5E5E4",
+"x@	c #D5AD3C",
+"y@	c #755105",
+"z@	c #5E4305",
+"A@	c #957207",
+"B@	c #A47B07",
+"C@	c #EFB80A",
+"D@	c #FFCF0D",
+"E@	c #FFC70C",
+"F@	c #655006",
+"G@	c #7E7E7E",
+"H@	c #E1E1E0",
+"I@	c #E0E0DE",
+"J@	c #BCBCBA",
+"K@	c #A98117",
+"L@	c #CA9908",
+"M@	c #AF8708",
+"N@	c #745905",
+"O@	c #EEB30A",
+"P@	c #FFCC0B",
+"Q@	c #FFC90C",
+"R@	c #BA9209",
+"S@	c #B0AA9E",
+"T@	c #B9B9B8",
+"U@	c #201E1C",
+"V@	c #936B06",
+"W@	c #B98E09",
+"X@	c #B68C08",
+"Y@	c #A98207",
+"Z@	c #916D07",
+"`@	c #D59A09",
+" #	c #E2A80C",
+".#	c #C89709",
+"+#	c #AC8407",
+"@#	c #957006",
+"##	c #2C1D02",
+"$#	c #040302",
+"%#	c #705004",
+"&#	c #977306",
+"*#	c #8B6806",
+"=#	c #453202",
+"-#	c #050300",
+";#	c #020100",
+"                                                                    ",
+"                          . . . . . . . . . . .                     ",
+"                    . . . . . . . . . . . . . . .                   ",
+"                  . . . . . . . . . . . . . . . + @                 ",
+"              . . . . . . . . . . . . . . . . . # $ %               ",
+"            . . . . . . . . . . . . . . . . . . . & @               ",
+"            . . . . . . . . . . . . . . . . . . . * = -             ",
+"            . . . . . . . . . . . . . + + # & ; > , = '             ",
+"            . . . . . . . . . . + + + + & ) ! % ~ ' { ]             ",
+"            . . . # . . . + * ; ; * & & ; ! ^ / ( _ :               ",
+"              < [ & . } | < 1 @ | ) 2 | , 3 4 ( _ :                 ",
+"              = < ; | 5 4 6 7 8 1 < = 9 ~ 0 6 a b                   ",
+"                5 ! 9 c d e - f g h i j k l m n                     ",
+"                = 1 7     o { i a p n q r   n s                     ",
+"                  '       { 5         n     r t                     ",
+"                            +         0                             ",
+"                    u       v u w     .     x y z w                 ",
+"                A B C D u u E F G H   .   I J K F F                 ",
+"                L M C N D D N E N O u P   F Q R S T                 ",
+"              u U V W X Y Z `  ...+.D     F @.e #.$.                ",
+"              D %.&.*.=.-.;.>.,.'.).D     F !.~.{.].                ",
+"              D ^./.(._.:.<.[.}.F D |.    1.2.3.4.5.                ",
+"              6.7.8.9.0.a.b.c.d.D D e.f.g.h.i.j.k.l.                ",
+"            D y m.. n.o.p.q.r.s.t.u.v.f.F w.. x.y.z.A.              ",
+"            D B.. . . . x.C.D.E.F.G.H.f.I.J.. . K.L.M.w             ",
+"          E N.O.. . . . P.Q.R.S.T.U.V.W.X.Y.. . Z.`. +R.            ",
+"        u .+++. . . . . @+#+$+%+&+*+=+t.-+. . @+;+x.>+,+'+          ",
+"        D )+!+. . . . . ~+{+-+]+^+/+(+_+:+r <+[+}+|+1+2+3+          ",
+"        D 1.4+. . . . <+5+6+7+P.8+9+0+a+D +.x.b+{+, c+d+A           ",
+"        e+f+g+. . . . [+Y.h+i+j+Y.}+k+l+m+F n+b+j+o+p+q+r+s+        ",
+"        t+u+v+w+. . . |+x+e+y+z+{+b+b+, A+B+N.C+D+E+F+G+H+I+J+      ",
+"        K+L+M+N+|+O+>+E+P+Q+D+O+|+z+b+[+`.e+K R+o+S+T+U+V+W+X+      ",
+"      Y+Z+`+_. @.@+@@@#@$@%@&@}+|+[+b+b+*@=@F =@-@;@>@,@'@)@!@      ",
+"      ~@{@]@^@/@f+(@_@:@<@[@@+j+O+z+0+0+E+}@f+|@1@2@3@4@5@6@7@8@    ",
+"          9@0@a@w b@c@d@e@f@g@j+j+0+0+b+h@i@K j@  k@l@m@8@n@        ",
+"            o@      p@q@r@s@t@u@v@P.Y.w@x@y@z@A@                    ",
+"                    B@C@D@E@F@G@H@I@I@J@K@L@q@M@N@                  ",
+"                    O@P@Q@'@R@S@T@a+4+U@V@W@X@Y@Z@                  ",
+"                    `@ #.#+#@###K u w $#%#&#*#=#                    ",
+"                          -#;#          ;#;#                        "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/buddydel.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,247 @@
+/* XPM */
+static char * buddydel_xpm[] = {
+"42 39 205 2",
+"  	c None",
+". 	c #F41515",
+"+ 	c #FA1515",
+"@ 	c #EF1414",
+"# 	c #EB1414",
+"$ 	c #EA1414",
+"% 	c #E61414",
+"& 	c #000000",
+"* 	c #E91414",
+"= 	c #F61515",
+"- 	c #EE1414",
+"; 	c #E71414",
+"> 	c #DB1313",
+", 	c #0A0A0A",
+"' 	c #6B6B6B",
+") 	c #090909",
+"! 	c #595959",
+"~ 	c #0F0F0F",
+"{ 	c #464646",
+"] 	c #7A7A83",
+"^ 	c #FFFFFF",
+"/ 	c #F5F5F5",
+"( 	c #DEDEDE",
+"_ 	c #1B1B1B",
+": 	c #7B7B7B",
+"< 	c #FFD712",
+"[ 	c #FFE316",
+"} 	c #EED408",
+"| 	c #EBEBEB",
+"1 	c #F4B509",
+"2 	c #FFDB09",
+"3 	c #FFE608",
+"4 	c #F9D83B",
+"5 	c #DFC707",
+"6 	c #D8C007",
+"7 	c #FFC712",
+"8 	c #FFE23E",
+"9 	c #EDD308",
+"0 	c #C99100",
+"a 	c #DD9D07",
+"b 	c #D0D0D0",
+"c 	c #EDBB04",
+"d 	c #EFA808",
+"e 	c #E4A110",
+"f 	c #A6813C",
+"g 	c #CCCCCC",
+"h 	c #272727",
+"i 	c #2D2D27",
+"j 	c #FAFAFA",
+"k 	c #D3D3D3",
+"l 	c #B58D42",
+"m 	c #D1D1D1",
+"n 	c #F2F2F2",
+"o 	c #E4E4E4",
+"p 	c #E8E8E8",
+"q 	c #D4D4D4",
+"r 	c #E7E7E7",
+"s 	c #F3F3F3",
+"t 	c #EFEFEF",
+"u 	c #ECECEC",
+"v 	c #DCDCDC",
+"w 	c #EEEEEE",
+"x 	c #D5D5D5",
+"y 	c #FBFBFB",
+"z 	c #F7F7F7",
+"A 	c #BBBBBB",
+"B 	c #3D3D3D",
+"C 	c #F6F6F6",
+"D 	c #F4F4F4",
+"E 	c #BABABA",
+"F 	c #FEFEFE",
+"G 	c #F8F8F8",
+"H 	c #1F1F1F",
+"I 	c #070707",
+"J 	c #5E5E5E",
+"K 	c #25253C",
+"L 	c #676767",
+"M 	c #1E1E1E",
+"N 	c #FFF025",
+"O 	c #FFD812",
+"P 	c #D7970F",
+"Q 	c #FFCE15",
+"R 	c #FFFF1A",
+"S 	c #FFE614",
+"T 	c #FFEF17",
+"U 	c #EFC713",
+"V 	c #D7A30F",
+"W 	c #0C0C0C",
+"X 	c #958514",
+"Y 	c #FFDD15",
+"Z 	c #FFC616",
+"` 	c #FFF416",
+" .	c #FFFF1B",
+"..	c #FFFF29",
+"+.	c #FFE609",
+"@.	c #C7C7C7",
+"#.	c #F7C737",
+"$.	c #CF9700",
+"%.	c #8C5D07",
+"&.	c #282103",
+"*.	c #966806",
+"=.	c #A78005",
+"-.	c #9B7805",
+";.	c #FFD40A",
+">.	c #FFFF16",
+",.	c #FFDB0A",
+"'.	c #FFF40A",
+").	c #FFF626",
+"!.	c #FFEB16",
+"~.	c #BF8F03",
+"{.	c #DFA707",
+"].	c #D29C07",
+"^.	c #C69307",
+"/.	c #C89A0D",
+"(.	c #C79A06",
+"_.	c #BD9D0F",
+":.	c #FFC114",
+"<.	c #FFFE0A",
+"[.	c #FFF615",
+"}.	c #FFFF33",
+"|.	c #FFE814",
+"1.	c #FFFC27",
+"2.	c #FFED42",
+"3.	c #FFD012",
+"4.	c #F5B110",
+"5.	c #F0F0F0",
+"6.	c #C2C2C2",
+"7.	c #BA8307",
+"8.	c #E1AA07",
+"9.	c #E6B00F",
+"0.	c #E5B107",
+"a.	c #D7B311",
+"b.	c #DEA50E",
+"c.	c #CEAB11",
+"d.	c #B99A0F",
+"e.	c #FAA612",
+"f.	c #FFF218",
+"g.	c #FFC309",
+"h.	c #FFBA09",
+"i.	c #FFD909",
+"j.	c #FFD408",
+"k.	c #FFCD08",
+"l.	c #ECC308",
+"m.	c #E0E0E0",
+"n.	c #DDDDDD",
+"o.	c #B87F07",
+"p.	c #D8A607",
+"q.	c #DAB91D",
+"r.	c #DCAA07",
+"s.	c #D59E0D",
+"t.	c #C48C07",
+"u.	c #DCB511",
+"v.	c #B98406",
+"w.	c #F1AA11",
+"x.	c #FFCD11",
+"y.	c #F3CF20",
+"z.	c #EBAE0F",
+"A.	c #E9B507",
+"B.	c #EFB10F",
+"C.	c #ECB707",
+"D.	c #DBA10E",
+"E.	c #AE7D06",
+"F.	c #CACACA",
+"G.	c #C0C0C0",
+"H.	c #B9B9B9",
+"I.	c #A16F06",
+"J.	c #C8A006",
+"K.	c #D2AF11",
+"L.	c #BA8506",
+"M.	c #B69A18",
+"N.	c #A78E16",
+"O.	c #AD800B",
+"P.	c #A5780B",
+"Q.	c #E39D11",
+"R.	c #CE9408",
+"S.	c #B28206",
+"T.	c #997105",
+"U.	c #A87F05",
+"V.	c #CE9F06",
+"W.	c #C4A71A",
+"X.	c #BA8E0C",
+"Y.	c #8B5B06",
+"Z.	c #8C5F05",
+"`.	c #C69106",
+" +	c #D7A00D",
+".+	c #BE9106",
+"++	c #9E7805",
+"@+	c #6E4E10",
+"#+	c #4B3303",
+"$+	c #654105",
+"%+	c #7F5305",
+"&+	c #886205",
+"*+	c #956D05",
+"=+	c #7D5705",
+"-+	c #523002",
+";+	c #714B05",
+">+	c #A07106",
+",+	c #B18106",
+"'+	c #8A6205",
+")+	c #291B04",
+"!+	c #020100",
+"~+	c #030200",
+"{+	c #0F0A00",
+"]+	c #100B00",
+"^+	c #040200",
+"                                                                                    ",
+"                                                                                    ",
+"                                                                                    ",
+"                                                                                    ",
+"                                                                                    ",
+"                                                                                    ",
+"                                                          . + @ # # # # # # # $ %   ",
+"                                & & & & &                 * = - ; % % % % % % % >   ",
+"                              & & & & , ' &                                         ",
+"                            & & & & & ) ! ~ &                                       ",
+"                            & & & & & & & & &                                       ",
+"                            & & { & & ] & & &                                       ",
+"                            & ^ ^ & / ^ ( & & &                                     ",
+"                            & & ^ _ ^ & : & & &                                     ",
+"                            & & < [ } & | & & &                                     ",
+"                            & 1 2 3 4 5 6 & & &                                     ",
+"                            & 7 2 8 9 0 a & & &                                     ",
+"                            & b c d e f g & h i &                                   ",
+"                            & j k l k m n o & & &                                   ",
+"                          & ^ ^ p q ^ j n r & & & &                                 ",
+"                        & & ^ ^ ^ ^ ^ j s t u & & &                                 ",
+"                      & & v ^ ^ ^ ^ ^ j w x p & & & &                               ",
+"                      & & ^ ^ ^ ^ ^ ^ y z u A B & & & &                             ",
+"                      & & ^ ^ ^ ^ ^ ^ y z C D E & ~ & &                             ",
+"                    & & ^ ^ ^ ^ ^ ^ F G z z D n H I { & &                           ",
+"                    & & ^ ^ ^ ^ ^ F G z z z C C z & & & &                           ",
+"                  & J ^ ^ ^ ^ ^ F G z z z z z z z & K & &                           ",
+"                  & L ^ ^ ^ ^ ^ y z z z z z z z D & M & &                           ",
+"                  & ) ^ ^ ^ ^ ^ y z z z z z z z C & ~ & &                           ",
+"                  N O & ^ ^ ^ F G z z z z z z P P & & & &                           ",
+"                Q R S T & ^ ^ y z z z z z z z U V & & W X                           ",
+"            Y Z `  ...+.& & F G z z z z z z @.#.$.%.&.*.=.-.                        ",
+"          ;.>.>.,.R '.).!.& & z z z z z z z @.~.{.].^./.(._.                        ",
+"          :.<.[.}.|.1.2.3.4.& 5.5.5.5.5.5.5.6.7.8.9.0.a.b.c.d.                      ",
+"          e.f.S g.h.i.j.k.l.| m.n.v v v v & & o.p.q.r.s.t.u.c.v.                    ",
+"          w.3.x.y.z.A.B.C.D.E.F.G.A H.H.& & & I.J.K.L.M.N.O.P.                      ",
+"          Q.R.S.T.U.(.V.W.X.Y.& & & & & & & & Z.`. +.+++@+                          ",
+"                #+$+%+&+*+=+-+& &           & ;+>+,+'+)+                            ",
+"                      !+~+&                   {+]+^+&                               "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/dt_icon.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,21 @@
+/* XPM */
+static char * dt_icon_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"12 12 3 1",
+/* colors */
+" 	c None",
+".	c #336699",
+"X	c #9999ff",
+/* pixels */
+"            ",
+"            ",
+" .......... ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+"  .XXXXXX.  ",
+"  .XXXXXX.  ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .......... ",
+"            ",
+"            "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/free_icon.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,31 @@
+/* XPM */
+static char * free_icon_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"12 12 13 1",
+/* colors */
+" 	c None",
+".	c #9999cc",
+"X	c #cccccc",
+"o	c Gray60",
+"O	c #666666",
+"+	c white",
+"@	c #ffccff",
+"#	c #99cc99",
+"$	c #cc99cc",
+"%	c #333333",
+"&	c #336666",
+"*	c #663333",
+"=	c Gray0",
+/* pixels */
+"            ",
+"   .Xoo.X   ",
+"  XXXXXoO.  ",
+" .XX+XXooOX ",
+" XoX@X#oOOO ",
+" ooX#$ooO%& ",
+" ooooooOO*% ",
+" oOOoOOO%%O ",
+" X%OOO&%%=# ",
+"  o%%%%%=o  ",
+"   oO%%Oo   ",
+"            "};
Binary file pixmaps/gnome/devil-connect.png has changed
Binary file pixmaps/gnome/devil-offline.png has changed
Binary file pixmaps/gnome/devil-online.png has changed
Binary file pixmaps/gnome/penguin-connect.png has changed
Binary file pixmaps/gnome/penguin-offline.png has changed
Binary file pixmaps/gnome/penguin-online.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/im.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,298 @@
+/* XPM */
+static char * im_xpm[] = {
+"42 39 256 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #020205",
+"@ 	c #020204",
+"# 	c #FDFDFB",
+"$ 	c #E8E8E6",
+"% 	c #3F3F3F",
+"& 	c #FCFCFA",
+"* 	c #F3F3F1",
+"= 	c #FAFAF8",
+"- 	c #6F6F6F",
+"; 	c #1B1B1A",
+"> 	c #010103",
+", 	c #FFFFFE",
+"' 	c #FEFEFC",
+") 	c #F9F9F7",
+"! 	c #0E0E0E",
+"~ 	c #505050",
+"{ 	c #EAEAEA",
+"] 	c #0B0704",
+"^ 	c #838383",
+"/ 	c #D1D1D1",
+"( 	c #A3A3A3",
+"_ 	c #D3D3D1",
+": 	c #E4E4E4",
+"< 	c #9F9F9E",
+"[ 	c #161615",
+"} 	c #EEEEEE",
+"| 	c #F5F5F3",
+"1 	c #ECECEA",
+"2 	c #E2E2E1",
+"3 	c #C0C0BF",
+"4 	c #D4D3D2",
+"5 	c #54420D",
+"6 	c #D8A30C",
+"7 	c #EBEBEA",
+"8 	c #989898",
+"9 	c #F6F6F4",
+"0 	c #EBEBE9",
+"a 	c #DEDEDC",
+"b 	c #D1D1D0",
+"c 	c #AEAEAD",
+"d 	c #D1940A",
+"e 	c #FFCF0D",
+"f 	c #FFE20F",
+"g 	c #FFE64E",
+"h 	c #F5CE0C",
+"i 	c #A1823B",
+"j 	c #C9C9C7",
+"k 	c #CCCCCA",
+"l 	c #A0A09F",
+"m 	c #ADADAB",
+"n 	c #CDCDCC",
+"o 	c #E1E1DF",
+"p 	c #F2F2F0",
+"q 	c #F7F7F5",
+"r 	c #C2C2C0",
+"s 	c #939392",
+"t 	c #BF7F05",
+"u 	c #FCBA0A",
+"v 	c #FFD60C",
+"w 	c #FFEB2E",
+"x 	c #FFE615",
+"y 	c #F9D80D",
+"z 	c #D7A008",
+"A 	c #010102",
+"B 	c #959594",
+"C 	c #DBDBDA",
+"D 	c #E7E7E5",
+"E 	c #EFEFED",
+"F 	c #E4E4E2",
+"G 	c #D0D0CE",
+"H 	c #CD9E09",
+"I 	c #FFEA2D",
+"J 	c #FFEA12",
+"K 	c #845705",
+"L 	c #DA9D08",
+"M 	c #B17B2E",
+"N 	c #545454",
+"O 	c #080808",
+"P 	c #B1B1B0",
+"Q 	c #CACAC9",
+"R 	c #DFDFDE",
+"S 	c #DDDDDB",
+"T 	c #CFCFCD",
+"U 	c #C6C6C5",
+"V 	c #BCBCBB",
+"W 	c #ABABAA",
+"X 	c #DCDBD9",
+"Y 	c #C6890B",
+"Z 	c #DC9908",
+"` 	c #B57805",
+" .	c #BFBEBD",
+"..	c #DFDFDF",
+"+.	c #212121",
+"@.	c #0E0E0D",
+"#.	c #B0B0AE",
+"$.	c #BFBFBE",
+"%.	c #C8C8C6",
+"&.	c #B9B9B8",
+"*.	c #AAAAA9",
+"=.	c #9C9C9B",
+"-.	c #8A8A88",
+";.	c #606063",
+">.	c #F5F5F5",
+",.	c #DDDCDA",
+"'.	c #D9D9D9",
+").	c #C9C8C7",
+"!.	c #A7A7A6",
+"~.	c #A1A1A0",
+"{.	c #91918F",
+"].	c #8E8E8D",
+"^.	c #8F8F8E",
+"/.	c #878786",
+"(.	c #E3E3E3",
+"_.	c #EEEEEC",
+":.	c #474747",
+"<.	c #E2E2E2",
+"[.	c #EFEFEF",
+"}.	c #D2D2D2",
+"|.	c #C9C9C9",
+"1.	c #C4C4C4",
+"2.	c #262624",
+"3.	c #CECECE",
+"4.	c #ECECEC",
+"5.	c #343434",
+"6.	c #D3D3D3",
+"7.	c #1C1C1B",
+"8.	c #F4F4F4",
+"9.	c #F3F3F3",
+"0.	c #F6F6F6",
+"a.	c #0B0B0B",
+"b.	c #F7F7F7",
+"c.	c #C88B0B",
+"d.	c #FFE40E",
+"e.	c #595959",
+"f.	c #FFD40B",
+"g.	c #FFDF0E",
+"h.	c #FFE00E",
+"i.	c #DEA408",
+"j.	c #F2CC0B",
+"k.	c #968107",
+"l.	c #FFD00A",
+"m.	c #FFE20C",
+"n.	c #FFEA0C",
+"o.	c #FFFF10",
+"p.	c #FFF10F",
+"q.	c #FFDE0E",
+"r.	c #FFD40D",
+"s.	c #E8E8E7",
+"t.	c #EBEBEB",
+"u.	c #D79B07",
+"v.	c #A98707",
+"w.	c #AD8608",
+"x.	c #FFE81C",
+"y.	c #FFFA0F",
+"z.	c #FFD30C",
+"A.	c #141413",
+"B.	c #C3C3C3",
+"C.	c #CE9317",
+"D.	c #EBB30A",
+"E.	c #CB8C07",
+"F.	c #BC8207",
+"G.	c #C08B07",
+"H.	c #CFA00A",
+"I.	c #B88E09",
+"J.	c #FFBF0A",
+"K.	c #FFE80E",
+"L.	c #FFF40F",
+"M.	c #FFF00F",
+"N.	c #FFED0F",
+"O.	c #FFE50E",
+"P.	c #FFD60D",
+"Q.	c #FBD80E",
+"R.	c #B88208",
+"S.	c #E2A908",
+"T.	c #DBA508",
+"U.	c #E0A80B",
+"V.	c #D5A40A",
+"W.	c #BB9009",
+"X.	c #A37D07",
+"Y.	c #F1AE08",
+"Z.	c #FFD80D",
+"`.	c #FFE20E",
+" +	c #FFE10E",
+".+	c #FFDC0D",
+"++	c #FFD50D",
+"@+	c #FFC70C",
+"#+	c #A27609",
+"$+	c #B37F08",
+"%+	c #E4B60A",
+"&+	c #EBB50B",
+"*+	c #E4B00B",
+"=+	c #DDAA0A",
+"-+	c #D3A30A",
+";+	c #CB9D09",
+">+	c #CD9E0A",
+",+	c #D1A10A",
+"'+	c #FFCA0A",
+")+	c #FFDB0D",
+"!+	c #FFCE0D",
+"~+	c #FCC20C",
+"{+	c #F8BF0C",
+"]+	c #FBC10C",
+"^+	c #F0B90B",
+"/+	c #CEAC0A",
+"(+	c #AFAFAF",
+"_+	c #A16F08",
+":+	c #D9A70A",
+"<+	c #DCA90A",
+"[+	c #D6A50A",
+"}+	c #CA9C09",
+"|+	c #BF9309",
+"1+	c #C29509",
+"2+	c #B98907",
+"3+	c #F4A908",
+"4+	c #FFD90B",
+"5+	c #FFCD0D",
+"6+	c #DAA80A",
+"7+	c #C09208",
+"8+	c #795205",
+"9+	c #8A6206",
+"0+	c #BE9209",
+"a+	c #BA8F09",
+"b+	c #A57C08",
+"c+	c #816005",
+"d+	c #AE7507",
+"e+	c #B87C07",
+"f+	c #A87506",
+"g+	c #916804",
+"h+	c #A07606",
+"i+	c #C29209",
+"j+	c #C19109",
+"k+	c #9E6E09",
+"l+	c #5F3C02",
+"m+	c #654302",
+"n+	c #9D7406",
+"o+	c #BF9009",
+"p+	c #926905",
+"q+	c #634202",
+"r+	c #2E1E02",
+"s+	c #553C04",
+"t+	c #704A03",
+"u+	c #755305",
+"v+	c #775204",
+"w+	c #603D03",
+"x+	c #362302",
+"y+	c #432A01",
+"z+	c #7B5506",
+"A+	c #996C05",
+"B+	c #7A5204",
+"C+	c #3F2702",
+"D+	c #020100",
+"E+	c #010100",
+"F+	c #140D01",
+"G+	c #0B0700",
+"                                                                                    ",
+"                                                                                    ",
+"                                                          . . . . . . . .           ",
+"                                                      . . . . . + + . . . . .       ",
+"                                                    . . . . . + + + @ . . . . .     ",
+"                          + + + + +               . . . . . . @ @ @ @ . . . . # $   ",
+"                        + + + + + % @           . . . . . . . @ @ @ @ . . . . & * = ",
+"                      + + + + + @ - ; >         . . . . . . . @ @ @ @ . . . , ' = ) ",
+"                      + + + + @ @ @ > >         . . . . . . . @ @ @ @ , , , , , ) * ",
+"                      @ ! + @ @ @ ~ > > >     . . . . . . . . @ @ > > # # ' , # * $ ",
+"                      @ { ] @ ^ / ( > > >   . . . . . . . . . @ > > > # # & = * $ _ ",
+"                      : < . [ . @ } > > >   . . . . . . . # # & > > # # = | 1 2 _ 3 ",
+"                      4 @ 5 6 7 @ 8 > > > * . . . . & ) | 9 ) = & # # = | 0 a b 3 c ",
+"                      @ d e f g h i > > > j k   l m n o 1 p 9 q > > q * 0 a b r c s ",
+"                      t u v w x y z > > A         B r C D 1 E > > > > F C G 3 m s   ",
+"                      @ H I J K L M > N O           P Q C R S > > > > T U V W s     ",
+"                      ! X Y Z `  ...+.> @.A           #.$.r %.G > > 3 &.*.=.-.      ",
+"                    + ;.>.,.'.).} ) 1 > > A               B !.#.~.{.].^./.          ",
+"                  + + . . { (.. , ) _.:.> > >                                       ",
+"                  + . . . . . . , = | E > > > >                                     ",
+"                + + <.. . . . . [.}.|.1.> > > > >                                   ",
+"              + + 2.. . . . . . . # = 3.4.> 5.> >                                   ",
+"              + + . . . . . . . ' # & & 6.@ 7.> > >                                 ",
+"              ! @ . . . . . . 8.# 9.# # ' 0.; a.> >                                 ",
+"            + + . . . . . . . # # 9.# # 9.# > > > >                                 ",
+"            + + . . . . . . ' # # # # # # = > > > > A                               ",
+"          + + + . . . . . ' 9.9.9.# # # # & > > > > >                               ",
+"          + + + . . . . b.# # # # # # 9.9.# > a.> > A                               ",
+"          c.d.@ . . . . . # # # 9.# # # # # > > > e.                                ",
+"          f.g.h.@ . . . 8.# # # # # # 9.i.j.> > > A k.                              ",
+"    l.m.n.o.p.q.r.@ s.b.# # # # # # # t.u.i.a.> > v.w.                              ",
+"    x.o.o.o.y.d.z.@ @ A.# # # # # # 9.B.C.D.E.F.G.H.I.                              ",
+"    J.K.L.M.N.O.P.Q.@ > # # # 9.# # # (.R.D.S.T.U.V.W.X.                            ",
+"    Y.Z.`. +q..+++@+#+9 9 9 4.4.9 4.9 > $+%+&+*+=+-+;+>+,+                          ",
+"    '+)+Z.!+~+{+]+^+/+(+o o o o o o > > _+:+<+[+}+|+I.1+2+                          ",
+"  3+4+q.5+*+>+H.6+:+7+8+> ! O A A A A A 9+0+>+;+a+b+c+                              ",
+"    d+e+f+g+h+i+}+j+k+l+A A A A A A A A m+n+i+o+p+q+                                ",
+"          r+s+t+u+v+w+x+                y+z+A+B+C+                                  ",
+"                  D+E+                    F+G+                                      "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/info.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,376 @@
+/* XPM */
+static char * info_xpm[] = {
+"48 45 328 2",
+"  	c None",
+". 	c #000000",
+"+ 	c #1A1A1A",
+"@ 	c #252525",
+"# 	c #222222",
+"$ 	c #444444",
+"% 	c #5C5C5C",
+"& 	c #474748",
+"* 	c #141417",
+"= 	c #252527",
+"- 	c #7E7E7F",
+"; 	c #060606",
+"> 	c #202020",
+", 	c #0A0A0A",
+"' 	c #242425",
+") 	c #636363",
+"! 	c #18181A",
+"~ 	c #010103",
+"{ 	c #1A1A1B",
+"] 	c #656565",
+"^ 	c #737374",
+"/ 	c #2B2B2C",
+"( 	c #0E0E10",
+"_ 	c #717174",
+": 	c #2F2F2F",
+"< 	c #060607",
+"[ 	c #A7A6A6",
+"} 	c #BEBEBC",
+"| 	c #AAA8A8",
+"1 	c #171718",
+"2 	c #A1A1A1",
+"3 	c #9C9C9A",
+"4 	c #8D8D8D",
+"5 	c #BABAB9",
+"6 	c #050507",
+"7 	c #6B6B6C",
+"8 	c #07070A",
+"9 	c #7F7E7E",
+"0 	c #211C12",
+"a 	c #B99C4A",
+"b 	c #A1810D",
+"c 	c #B49E4F",
+"d 	c #353021",
+"e 	c #0B0B0D",
+"f 	c #C4C4C3",
+"g 	c #0F0F11",
+"h 	c #000002",
+"i 	c #404040",
+"j 	c #2B2B2B",
+"k 	c #020206",
+"l 	c #9D8E72",
+"m 	c #D99F11",
+"n 	c #FFD00C",
+"o 	c #FFDB10",
+"p 	c #FDDB2E",
+"q 	c #F0CD15",
+"r 	c #D0B22C",
+"s 	c #BEAC69",
+"t 	c #060403",
+"u 	c #1B1B1D",
+"v 	c #545454",
+"w 	c #090909",
+"x 	c #150F05",
+"y 	c #C88B09",
+"z 	c #FFC30A",
+"A 	c #FFD50C",
+"B 	c #FFE11F",
+"C 	c #FFE32E",
+"D 	c #FFDE0F",
+"E 	c #E1BA0B",
+"F 	c #DAA70D",
+"G 	c #1F1604",
+"H 	c #030305",
+"I 	c #050404",
+"J 	c #7A5C18",
+"K 	c #EDB30B",
+"L 	c #FDD214",
+"M 	c #F1CE13",
+"N 	c #D5AD0B",
+"O 	c #CA9609",
+"P 	c #D29A10",
+"Q 	c #B38F3C",
+"R 	c #0C0A08",
+"S 	c #292929",
+"T 	c #101011",
+"U 	c #4D4D4E",
+"V 	c #1D1D1D",
+"W 	c #020204",
+"X 	c #8C8B8A",
+"Y 	c #BB9751",
+"Z 	c #CE9908",
+"` 	c #D19509",
+" .	c #C58708",
+"..	c #BE9032",
+"+.	c #BFB5A2",
+"@.	c #CBCBCA",
+"#.	c #363637",
+"$.	c #151516",
+"%.	c #383838",
+"&.	c #0A0A0B",
+"*.	c #454545",
+"=.	c #040407",
+"-.	c #B7B5B5",
+";.	c #DDDBD7",
+">.	c #C4B49A",
+",.	c #B59865",
+"'.	c #B6A688",
+").	c #C1BFBC",
+"!.	c #E6E6E5",
+"~.	c #F6F6F4",
+"{.	c #A1A0A0",
+"].	c #020203",
+"^.	c #555555",
+"/.	c #010101",
+"(.	c #0F0F0F",
+"_.	c #6A686A",
+":.	c #FFFFFF",
+"<.	c #D2D1D0",
+"[.	c #C9C8C8",
+"}.	c #D4D4D3",
+"|.	c #F3F3F2",
+"1.	c #FCFCFA",
+"2.	c #F9F9F7",
+"3.	c #F1F1EF",
+"4.	c #3B3B3B",
+"5.	c #19191B",
+"6.	c #09090C",
+"7.	c #FDFDFC",
+"8.	c #FEFEFC",
+"9.	c #FDFDFB",
+"0.	c #FAFAF8",
+"a.	c #9C9C9B",
+"b.	c #323233",
+"c.	c #FFFFFE",
+"d.	c #FCFCFB",
+"e.	c #F6F6F5",
+"f.	c #CCCCCC",
+"g.	c #010104",
+"h.	c #7E7E7E",
+"i.	c #F9F9F8",
+"j.	c #EAEAEA",
+"k.	c #D9D9D9",
+"l.	c #CFCFCE",
+"m.	c #D0D0CF",
+"n.	c #2B2A2B",
+"o.	c #0A0A0C",
+"p.	c #111113",
+"q.	c #060609",
+"r.	c #080809",
+"s.	c #D5D5D5",
+"t.	c #F4F4F3",
+"u.	c #E7E7E6",
+"v.	c #CBCBCB",
+"w.	c #BEBEBE",
+"x.	c #121214",
+"y.	c #19191A",
+"z.	c #1D1D1E",
+"A.	c #6A6A6B",
+"B.	c #FBFBF9",
+"C.	c #FBFBFA",
+"D.	c #F8F8F6",
+"E.	c #DADADA",
+"F.	c #606061",
+"G.	c #09090A",
+"H.	c #161515",
+"I.	c #3A3A3B",
+"J.	c #131314",
+"K.	c #111112",
+"L.	c #B4B4B3",
+"M.	c #212121",
+"N.	c #1B1B1B",
+"O.	c #070708",
+"P.	c #1C1C1E",
+"Q.	c #141214",
+"R.	c #464646",
+"S.	c #E6E6E4",
+"T.	c #0D0D0E",
+"U.	c #020205",
+"V.	c #181819",
+"W.	c #AEAEAE",
+"X.	c #F7F7F6",
+"Y.	c #FAFAF9",
+"Z.	c #F7F7F5",
+"`.	c #272729",
+" +	c #040406",
+".+	c #121213",
+"++	c #EDEDEC",
+"@+	c #202021",
+"#+	c #0B0B0B",
+"$+	c #111111",
+"%+	c #FEFEFD",
+"&+	c #EBEBEB",
+"*+	c #29292A",
+"=+	c #050506",
+"-+	c #303030",
+";+	c #565656",
+">+	c #FFFFFD",
+",+	c #ECECEB",
+"'+	c #0B0B0C",
+")+	c #050505",
+"!+	c #F5B80D",
+"~+	c #7A5D0C",
+"{+	c #C0BFBE",
+"]+	c #F1EDE2",
+"^+	c #D2C6A4",
+"/+	c #120E0A",
+"(+	c #3C341E",
+"_+	c #FFC90C",
+":+	c #FFD30C",
+"<+	c #7F630E",
+"[+	c #9F9F9E",
+"}+	c #E9E9E8",
+"|+	c #F5F5F4",
+"1+	c #F2F2F0",
+"2+	c #DCB851",
+"3+	c #C7A109",
+"4+	c #0E0B03",
+"5+	c #291E03",
+"6+	c #967B25",
+"7+	c #1F1F1F",
+"8+	c #FFCD0C",
+"9+	c #FFD80D",
+"0+	c #FFD10C",
+"a+	c #3F3105",
+"b+	c #515051",
+"c+	c #E4E4E2",
+"d+	c #EBEBEA",
+"e+	c #F4F4F2",
+"f+	c #F5F5F3",
+"g+	c #EBEBE9",
+"h+	c #D3D2D1",
+"i+	c #C6A23D",
+"j+	c #B98707",
+"k+	c #765405",
+"l+	c #A57E07",
+"m+	c #997407",
+"n+	c #8E7C4A",
+"o+	c #5B5B5B",
+"p+	c #FFBC14",
+"q+	c #FFE30F",
+"r+	c #FFE30E",
+"s+	c #FFCF0D",
+"t+	c #CB9F09",
+"u+	c #1D1603",
+"v+	c #9B9A99",
+"w+	c #E1E1DF",
+"x+	c #E2E2E0",
+"y+	c #DFDFDD",
+"z+	c #E0E0DF",
+"A+	c #DEDEDD",
+"B+	c #DADAD9",
+"C+	c #ACACAB",
+"D+	c #A87F18",
+"E+	c #B68A08",
+"F+	c #AB8208",
+"G+	c #8C6C14",
+"H+	c #6D4D17",
+"I+	c #4A340F",
+"J+	c #181105",
+"K+	c #FAC044",
+"L+	c #D5960B",
+"M+	c #B38008",
+"N+	c #946E06",
+"O+	c #836506",
+"P+	c #312910",
+"Q+	c #646464",
+"R+	c #CECECD",
+"S+	c #C7C7C6",
+"T+	c #C0C0BE",
+"U+	c #BCBCBB",
+"V+	c #BDBDBB",
+"W+	c #BBBBBA",
+"X+	c #999998",
+"Y+	c #5B4C2C",
+"Z+	c #9A7306",
+"`+	c #8B6506",
+" @	c #7D6532",
+".@	c #7B571B",
+"+@	c #79571A",
+"@@	c #7A561B",
+"#@	c #513A11",
+"$@	c #120C03",
+"%@	c #49350F",
+"&@	c #674804",
+"*@	c #6D5C3E",
+"=@	c #72716F",
+"-@	c #616161",
+";@	c #60605F",
+">@	c #4E4D4C",
+",@	c #231703",
+"'@	c #5A3D03",
+")@	c #573C06",
+"!@	c #080808",
+"~@	c #7E5A1B",
+"{@	c #7D591B",
+"]@	c #79561A",
+"^@	c #654815",
+"/@	c #5E4314",
+"(@	c #030200",
+"_@	c #575757",
+":@	c #7A571A",
+"<@	c #6F4F18",
+"[@	c #5B4114",
+"}@	c #44310F",
+"|@	c #060300",
+"1@	c #131312",
+"2@	c #7E581B",
+"3@	c #5A4013",
+"4@	c #3E2C0D",
+"5@	c #0F0B02",
+"6@	c #2D2D2D",
+"7@	c #959595",
+"8@	c #979797",
+"9@	c #929292",
+"0@	c #3E3E3E",
+"a@	c #7C581B",
+"b@	c #78551A",
+"c@	c #6E4E18",
+"d@	c #7C5A1B",
+"e@	c #7C591B",
+"f@	c #78571A",
+"g@	c #6E4F18",
+"h@	c #7D581B",
+"i@	c #7A551A",
+"j@	c #6F4E18",
+"k@	c #7B591B",
+"l@	c #77561A",
+"m@	c #594013",
+"                                                                                                ",
+"                                                  . . + @ @ @ @ # . . .                         ",
+"                                            . . $                     % . .                     ",
+"                                          .           & * * * = -           ; .                 ",
+"                                      . >         , ' ) ! ~ { ] ^ / ( _       : .               ",
+"                                    .             < [ } | 1 2 3 4 5 6 ~ 7         .             ",
+"                                  .               8 9 0 a b c d e f g h i           .           ",
+"                                  j               k l m n o p q r s t h u           v .         ",
+"                                w                 x y z A B C D E F G h H             > .       ",
+"                              .                   I J K L M N O P Q R S T U             .       ",
+"                              V                   W X Y Z `  ...+.@.#.$.%.&.            *..     ",
+"                            .                     =.-.;.>.,.'.).!.~.{.].~ h ^.            .     ",
+"                            /.                  (._.:.:.<.[.}.|.1.2.3.$ h h e             # .   ",
+"                            4.                5.6.:.:.:.:.7.8.9.9.1.0.a.h h h b.            .   ",
+"                          .                   ~ ] :.:.:.:.:.c.d.d.1.e.f.].h h h             .   ",
+"                          .                 g.~ h.:.:.:.:.:.7.i.j.k.l.m.n.H ~ h o.          .   ",
+"                          .               p.q.r.s.:.:.:.:.:.c.1.0.t.u.v.w.x.y.H h           .   ",
+"                          .               ].z.A.:.:.:.:.:.:.9.B.B.C.B.D.E.F.G.H.h I.        .   ",
+"                          .               J.K.i.:.:.:.:.:.9.1.B.1.1.C.1.e.L.M.N.O.P.        .   ",
+"                          .               Q.R.:.:.:.:.:.1.B.C.B.C.C.1.1.B.S.T.~ T.h         .   ",
+"                          .             U.V.W.:.:.:.:.X.Y.C.1.C.C.B.1.1.1.Z.`.h  +h         .   ",
+"                          .             < .+:.:.:.:.:.++D.C.B.C.C.C.0.B.1.~.@+~ #+T         .   ",
+"                            $+          G.`.:.:.:.:.%+&+i.C.1.1.1.1.C.B.B.~.*+=+].-+      ;+.   ",
+"                            .            +@+:.:.:.:.>+,+i.B.1.1.1.9.1.B.2.3.> '+G.        )+    ",
+"                            . *.        !+~+{+:.:.:.>+++B.1.1.1.Y.C.1.2.]+^+/+~ (+        .     ",
+"                              .         _+:+<+[+:.9.D.}+e.0.1.B.1.2.|+1+2+3+4+5+6+      (..     ",
+"                              . 7+      8+9+0+a+b+}.c+d+e+|.f+f+f+3.g+h+i+j+k+l+m+n+  o+.       ",
+"                                .     p+q+r+s+t+u+.+v+w+!.x+y+y+z+A+B+C+D+E+F+G+      /.        ",
+"                              H+I+J+    K+L+M+N+O+P+Q+R+S+T+U+U+V+W+X+Y+Z+`+ @      w .         ",
+"                            .@+@@@#@$@          %@&@*@=@) -@;@) o+>@,@'@)@        !@.           ",
+"                          .@~@{@]@^@/@(@_@                                      . .             ",
+"                        .@~@{@:@<@[@}@  |@1@                                -+. .               ",
+"                      .@2@{@:@<@3@4@      5@. S                         i /..                   ",
+"                    .@~@{@:@<@3@4@            . . . 6@h.7@8@8@9@4 0@. . .                       ",
+"                  .@~@{@:@H+3@4@                    . . . . . . . .                             ",
+"                .@a@a@b@c@3@4@                                                                  ",
+"              .@d@e@f@g@3@4@                                                                    ",
+"            .@a@a@f@g@3@4@                                                                      ",
+"          .@~@e@f@<@3@4@                                                                        ",
+"        .@d@e@:@<@3@4@                                                                          ",
+"      .@2@h@i@j@3@4@                                                                            ",
+"    .@~@{@:@<@3@4@                                                                              ",
+"  .@~@{@:@<@3@4@                                                                                ",
+"b@k@k@l@c@m@4@                                                                                  ",
+"k@k@l@c@m@4@                                                                                    "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/italic.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,22 @@
+/* XPM */
+static char * italic_xpm[] = {
+"22 17 2 1",
+" 	c None",
+".	c #000000",
+"                      ",
+"                      ",
+"                      ",
+"                      ",
+"                      ",
+"           ......     ",
+"             ..       ",
+"            ..        ",
+"           ..         ",
+"          ..          ",
+"         ..           ",
+"        ..            ",
+"       ..             ",
+"     ......           ",
+"                      ",
+"                      ",
+"                      "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/link.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,26 @@
+/* Cute little link :) */
+
+static char *link_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"14 14 5 1",
+"  c #2f2f60",
+". c #6060cf",
+"X c None",
+"o c #cfcfff",
+"O c Gray100",
+/* pixels */
+"XXXXXXXXXXX  X",
+"XXXXXXXXXX oO ",
+"XXXXXX    oO. ",
+"XXXXX oO oO. X",
+"XXXX oO oO. XX",
+"XXX oO  ..  XX",
+"XX oO XX  o XX",
+"X oO XXO oO XX",
+"X O  XO oO XXX",
+"X  oX  oO XXXX",
+"X oO. oO XXXXX",
+" oO. oO XXXXXX",
+" O.    XXXXXXX",
+"   XXXXXXXXXXX"
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/login_icon.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,32 @@
+/* XPM */
+static char * login_icon_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"12 12 14 1",
+/* colors */
+" 	c None",
+".	c #ccccff",
+"X	c #6699cc",
+"o	c #336699",
+"O	c #000099",
+"+	c #000066",
+"@	c #cccccc",
+"#	c black",
+"$	c #999966",
+"%	c #ffff66",
+"&	c #cccc99",
+"*	c #996666",
+"=	c #999999",
+"-	c #666699",
+/* pixels */
+"        .XoO",
+" OO+O+OOX.@+",
+" O#$%$#O .&+",
+" +#%%%#+ .@O",
+" O#$%*#O .&O",
+" O%%%%%O =@O",
+" +%%%%%+ #-+",
+" O$%%%$O $@O",
+" +#%%%#+ .&+",
+" O#%%%#O .@O",
+"OOO+O+OOX.&+",
+"         XoO"};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/logo.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,410 @@
+static char *aol_logo[] = {
+"190 150 256 2",
+"   c #020102",
+".  c #01010c",
+"X  c #0c0502",
+"o  c #010114",
+"O  c #03031a",
+"+  c #160601",
+"@  c #1b1303",
+"#  c #161118",
+"$  c #010224",
+"%  c #02032c",
+"&  c #080929",
+"*  c #020334",
+"=  c #02043b",
+"-  c #090a37",
+";  c #130d38",
+":  c #181529",
+">  c #171335",
+",  c #240401",
+"<  c #241802",
+"1  c #331508",
+"2  c #241a2a",
+"3  c #2c2403",
+"4  c #362900",
+"5  c #3c3301",
+"6  c #312a17",
+"7  c #272539",
+"8  c #342f2e",
+"9  c #010344",
+"0  c #01034c",
+"q  c #090a47",
+"w  c #010353",
+"e  c #01045c",
+"r  c #070959",
+"t  c #161659",
+"y  c #16144b",
+"u  c #010463",
+"i  c #01046c",
+"p  c #080a67",
+"a  c #010473",
+"s  c #00057e",
+"d  c #01047a",
+"f  c #060979",
+"g  c #18196a",
+"h  c #181a78",
+"j  c #0f1069",
+"k  c #1e2152",
+"l  c #1c217a",
+"z  c #221e4a",
+"x  c #272647",
+"c  c #2a2758",
+"v  c #383549",
+"b  c #3a3958",
+"n  c #322c4f",
+"m  c #272668",
+"M  c #373669",
+"N  c #393978",
+"B  c #292877",
+"V  c #201e69",
+"C  c #3e407b",
+"Z  c #521500",
+"A  c #493901",
+"S  c #4c2f07",
+"D  c #443c28",
+"F  c #483c37",
+"G  c #703600",
+"H  c #413c4b",
+"J  c #413f77",
+"K  c #584902",
+"L  c #54480e",
+"P  c #524a33",
+"I  c #675603",
+"U  c #7c4a00",
+"Y  c #6a5003",
+"T  c #675a37",
+"R  c #766603",
+"E  c #756919",
+"W  c #746832",
+"Q  c #494547",
+"!  c #484559",
+"~  c #5b5556",
+"^  c #564f4b",
+"/  c #494668",
+"(  c #474579",
+")  c #59586c",
+"_  c #595977",
+"`  c #514d70",
+"'  c #645b52",
+"]  c #665b6b",
+"[  c #72694d",
+"{  c #746d6e",
+"}  c #010484",
+"|  c #01058a",
+" . c #01058e",
+".. c #00038a",
+"X. c #070b87",
+"o. c #000592",
+"O. c #000595",
+"+. c #010596",
+"@. c #030595",
+"#. c #050b95",
+"$. c #090c95",
+"%. c #070b99",
+"&. c #0c1189",
+"*. c #0d1295",
+"=. c #0d129a",
+"-. c #191c88",
+";. c #151998",
+":. c #171ca1",
+">. c #1e2187",
+",. c #1d2199",
+"<. c #1c21a3",
+"1. c #252688",
+"2. c #252899",
+"3. c #383886",
+"4. c #373998",
+"5. c #2e3092",
+"6. c #262aa4",
+"7. c #3739a8",
+"8. c #3e4095",
+"9. c #3d41a5",
+"0. c #403f83",
+"q. c #484686",
+"w. c #575886",
+"e. c #555698",
+"r. c #494893",
+"t. c #5356a8",
+"y. c #4f52b2",
+"u. c #605a84",
+"i. c #737290",
+"p. c #7474a7",
+"a. c #6f70b7",
+"s. c #5256c6",
+"d. c #6d6fc8",
+"f. c #6b70e4",
+"g. c #893700",
+"h. c #8b5504",
+"j. c #8a7702",
+"k. c #987800",
+"l. c #8a6f09",
+"z. c #8a7732",
+"x. c #ab7201",
+"c. c #b35f00",
+"v. c #877950",
+"b. c #857a72",
+"n. c #aa674a",
+"m. c #d1760d",
+"M. c #db6c06",
+"N. c #827b85",
+"B. c #817cb1",
+"V. c #998601",
+"C. c #988912",
+"Z. c #988635",
+"A. c #aa9500",
+"S. c #b09104",
+"D. c #ac9531",
+"F. c #baa600",
+"G. c #bbaa15",
+"H. c #b7a72e",
+"J. c #928753",
+"K. c #928971",
+"L. c #ae9352",
+"P. c #ad9a6c",
+"I. c #b6a850",
+"U. c #b8ac6a",
+"Y. c #ca9a01",
+"T. c #da8b09",
+"R. c #c6aa01",
+"E. c #cab502",
+"W. c #d6ba02",
+"Q. c #d4b012",
+"!. c #d5aa30",
+"~. c #e58a01",
+"^. c #e69701",
+"/. c #ef9d10",
+"(. c #eaa401",
+"). c #e8a901",
+"_. c #edb601",
+"`. c #edb900",
+"'. c #e8b706",
+"]. c #f2b504",
+"[. c #ebad13",
+"{. c #e4b126",
+"}. c #d58d2c",
+"|. c #c48e4b",
+" X c #ceaf4d",
+".X c #c8b670",
+"XX c #c19e68",
+"oX c #dac502",
+"OX c #dcc41a",
+"+X c #d9c630",
+"@X c #eac702",
+"#X c #e9c818",
+"$X c #ecd504",
+"%X c #f3c502",
+"&X c #f3cb01",
+"*X c #f9cb06",
+"=X c #f5d300",
+"-X c #f7dd00",
+";X c #f6da01",
+":X c #f9dc01",
+">X c #f9d505",
+",X c #f6db17",
+"<X c #ecd216",
+"1X c #e4ca37",
+"2X c #ebd529",
+"3X c #edd938",
+"4X c #f4dc27",
+"5X c #f2dc38",
+"6X c #ebca2a",
+"7X c #fae500",
+"8X c #fae501",
+"9X c #fae201",
+"0X c #f8e207",
+"qX c #f6e218",
+"wX c #f3e128",
+"eX c #d7c858",
+"rX c #d7ca74",
+"tX c #ecda47",
+"yX c #ead855",
+"uX c #e4d770",
+"iX c #91919c",
+"pX c #908a91",
+"aX c #918fad",
+"sX c #ae9991",
+"dX c #afa88f",
+"fX c #acacb7",
+"gX c #b8b2b4",
+"hX c #a690a5",
+"jX c #8e8ecd",
+"kX c #868ae9",
+"lX c #acacc7",
+"zX c #a8a9d9",
+"xX c #b7b2cd",
+"cX c #a4a7f9",
+"vX c #a4a7f4",
+"bX c #a6a8e7",
+"nX c #bec2ff",
+"mX c #c5b7a2",
+"MX c #cdbc87",
+"NX c #c3becd",
+"BX c #d4c890",
+"VX c #d4cbb0",
+"CX c #e1d68b",
+"ZX c #c8c7d3",
+"AX c #c2c3f9",
+"SX c #dcdeff",
+"DX c #c5c7e4",
+"FX c #dfe0fe",
+"GX c #e3e2e8",
+"HX c #e1e1f6",
+"JX c #f7f9ff",
+"KX c Gray100",
+"LX c #fdfefe",
+"PX c #fafbff",
+"IX c #f5f7ff",
+"UX c #e2dffa",
+/* pixels */
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.@.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.@.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.@.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.+.+.O.O.O.O.o.o.o. . . .s } d d  . . .|  . . . .s s s s O.O.o.o.o.O.O.O.O.O.O.O.O.O.O.O.o.o. . .o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.o.o.o.o.o. .o.o.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.+.+.O.O.O.o. . . . . . .,.s.s.s. . .| |  . . . .,.f.cXd o.o.o.o.o.o.O.O.O.O.O.O.O.O.O.O.o.o. . . . . . .o.o.o.o.o.o. . . .o. . .o.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.o.o. . . . .o.o.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.+.+.O.O.o. .| | s s q p.fXLXLXLXPXPXLXLXlX_ q m i.DXLXLXnXp | | d ,.lXlXd.p O.O.O.O.O.O.o. .| | zXzXlXlXlXlXlXlXzXzX| | 8.vXlXlXlXlXlXlX|  .+.O.O.O.O.O.O.O.O.o. . .} } / zXlXlXlXlXzXzXO.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.| | O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O. . .| | s s.SXPXLXLXDXi.u.aXGXLXPXPXPXJXLXLXLXLXkXp | | a f.LXLXIXp O.O.O.O.O.o. . .| ..zXzXHXPXLXLXPXDXzXzX| | 3.bXlXLXLXLXLXLX7.o.O.O.O.O.O.O.O.O.O.o. . .} } AXJXLXLXPXDXzXzXo.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.+.*.;.O.O.+.+.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.o.o.} } a a ) LXLXLXJXe.i i i i w vXLXLXLXLXPXPXSXvX7.d d d q SXLXLXPX_  . .o.O.o.o.| | s s a i q AXLXLXAXr } } s s i a e t.LXLXLXLXAXr o.o.O.O.O.O.O.O. . .} s u l LXLXLXLXnXe | | o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.p p < D R C.F.E.R.V.E 5 j r +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.o.o.} } a s.LXLXLXLXe.q i i i u w w ZXLXLXLXp.& w q a a d d N PXLXLXPXDX . .O.O.o.o.| | s s i i q bXLXLXvXw } s s s i i e t.LXGXLXLXJXm o.o.O.O.O.O.O.O. . .s s u kXLXZXLXLXvXr | | o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.h y.dXBXyXyX4X4X5X5XBXU.a.B #.#.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.o.o.} } a a - SXLXLXLXGXu u u u u e w w b LXLXLXJXx a a a a i u iXLXaXPXLXLX,.f O.O.o.o.| } a a u u = bXLXLXvXr d s a d u u q e.PXi.LXLXLXiX| | O.O.O.O.o. .} } i i & PXaXzXLXLXvXr ..|  .o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| | ; n V.{.=X-X7X7X7X7X8X8X8X8X<XF.H : O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.o.o.} } a a w.PXLXLXLXiXu u i i e e w 0 & HXLXLXPX_ a i a a u u HXZXx LXLXLXf.f o.O.o.o.| } d a u u = zXLXLXvXw d s a a u u 9 e.PX_ iXLXLXLX:.| @.O.O.O.o.o.} } a i i.PXx zXLXLXvXw ..|  .o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.| | n B.OX6X=X-X9X7X7X7X8X8X8X8XqX<XxXH O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O. . .s s u u iXLXLXLXPX_ a a a a u u 0 0 % zXLXLXLXfXa a i i 0 N PX_ - AXLXLXAXr  .o.o.o.| | d a e u = zXLXLXvXr } s d d u u 9 e.LX) M PXLXLXkXr o.o.O.O.| | s s e w HXZX* zXLXLXvXr | | O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.+.+.O.O.O.O. .o.} } r t k.6X=X=X=X>X9X7X7X7X7X7X7X7X7X7XqXE.m r O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O. . .s s u u fXLXLXLXPX_ a a a a u u 0 0 % lXLXLXLXfXi a i i 0 vXPX$ = p.LXLXJXm  . .o.o.| | a a e e = zXLXLXvXr s } d d u u 9 e.LX) & DXLXLXJXr o.o.O.O.| | s s e d.LXb % zXLXLXvXr | | O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O. . .} s w N Q.6X=X=X=X:X-X7X7X7X7X7X7X7X7X7XqXqXa.m O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.| | a a w w fXLXLXLXPX_ s s s s i i w 0 % lXLXLXLXlXa a i i & PXzX= 9 g LXLXPXi.| | o.o.| | d d u e = zXLXLXvXr } } s s i u 9 e.PX) 9 e.LXLXLXi.|  . . .| } a a - SXAX* * zXLXLXvXr | | O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } u u , L.%X%X&X>X;X-X-X7X7X7X7X7X7X7X7X7X7X7XI.I O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.@.O.O.| | a a w w i.LXLXLXPXaXs s s s i i w w % SXLXLXLXi.a a i i w.PXw.= 0 0 ZXLXLXHX| | o.o.| | d d u e = zXLXLXvXr | } } } i u 9 e.LX) 9 9 GXLXLXHX| |  .o.| } d a M PXp.* % zXLXLXcXr | | O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.} } u e K U.%X%X&X&X-X-X-X7X7X7X7X7X7X7X7X7X7X7XrXz.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.| | a i w 0 b PXLXLXLXZXa a } } a i w w 7 LXLXLXPXN a a i u ZXLXw w 0 0 i.PXLXLX7.a o.o.| | d d u e - zXLXLXcXr } } } } i i 0 e.LX) 9 9 i.PXLXLXy.i | | } } i i ZXHX0 0 * zXLXLXcXr  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. .| i i - - k.+X%X%X%X&X-X-X-X7X7X7X7X7X7X7X7X7X7X7XqXF.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.| | a i w 0 $ lXLXLXLXLXs.a } } a i e w fXLXLXLXAX- a i i -.LXfXw w 0 0 & PXLXLXkXa o.o.| | d d u u = zXLXLXcXr } | } } i i w e.LX_ 9 9 & PXLXLXnXp  .| } } i 4.LXi.0 0 * zXLXLXcXr  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| ..i i * ; l.1X&X%X&X&X-X;X9X7X7X7X7X7X7X7X7X7X7X7XqX<X+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.| | d d e w = t HXPXLXLXHX! u u r w & i.LXLXPXFX-.u i i q a.PXw.e e 0 0 = zXLXLXFXq  . .| | d d u e = zXLXLXcXr | | } } a a w t.PX_ 0 0 9 jXLXLXLX/ } } d d 9 bXJXc w w * zXLXLXcXr  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } w 0 O : S.'.%X&X%X&X-X-X9X7X7X7X7X7X7X7X7X7X7X7X0X-X>.f O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.| | d a w w = = 7 lXLXLXPXPXcXy.t.d.DXPXLXLXDX7 u i a i 0 nXPX% e e 0 0 = e.LXLXPXC  . .| | d d u u = zXLXLXcXr } | } } a a w t.PX_ 0 0 9 V LXLXPXlX} } d d c IXjX= w w - zXLXLXcXr  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} s w 0 O O R.#X%X&X%X&X-X-X9X7X7X7X7X7X7X7X7X7X7X7X0X$X7.f O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O. . .s s u u 9 9 9 9 b lXLXLXPXPXPXPXPXPXbXN e u i i i i x PXUXlXlXlXlXlXfXlXLXLXLXfX . .| | d d u e = zXLXLXcXr } | } } a a e t.PX_ w w w 0 ZXPXLXLX>.u a a iXLXh u e w = zXLXLXcXr  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.o.o.d a 9 = o o R.#X%X%X%X&X:X-X7X7X7X7X7X7X7X7X7X7X7X7XqXoXr.p O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O. . .s d u u 0 9 9 t DXPXHX) _ _ _ _ x % 9 9 u u i i i i i.PXDXlXlXlXlXlXlXlXGXLXLXLX| o.| | d d u e = zXLXLXcXr } | } } a a r t.PX_ w w w w b LXLXLXkXu a a LXZXu u e w = zXLXLXcXr  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.o.o.d a 9 = o o S.#X%X%X%X%X=X-X7X7X7X7X7X7X7X7X7X7X7X7XqXoX4.p O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.o.o.} } i i 0 0 ) LXLXZXe e u u u u e u u u i i a a u u GXLXu u u u w w 9 9 _ LXLXLXy.p | | d d u u = zXLXLXcXr } | } } d a u y.PX_ u e 0 w - AXLXLXPX- w a.PXN i u e e = zXLXLXcXr  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o. .a i = * . . U  X%X%X%X&X&X>X7X7X7X7X7X7X7X7X7X7X7X7XtXG.;. .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.o.o.} } i i 0 e.LXLXLX) e e u u u u u u i i i a i i u 4.LXfXi u u u w w 9 9 $ LXLXLXcXi | | d d u u 9 zXLXLXcXr | | } } a a e y.PX_ u e w 0 = p.LXLXPXp.w SXAX- i i e e = zXLXLXcXr  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o. .a i = * . . S S.@X%X%X%X&X>X9X7X7X7X7X7X7X7X7X7X7X7X3XV. . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.o.o.} } i i - AXLXLXLXiX9 9 e w e e e r u i d a a a 9 jXPXw.i i i i e e 0 0 = bXLXLXPX- } | d d e e = zXLXLXcXr } | } } d a u y.PXu.i i w w 0 0 GXLXLXGX) LXd.i a i u e = zXLXLXcXr  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o. .a a = * . . + T _.`.`.%X&X*X:X:X7X7X8X8X8X8X7X7X7X7XgXD o.+.+.+.f f s f +.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.o.o.} } a i - SXLXLXLXLXAXp.t.t.t.t.t.t.y.4.a d i a q SXPX- i i i i u e 0 0 = N LXLXPXp.| } d d u e = zXLXLXcXr } | } } d a u y.PX_ i i e e 0 0 iXLXLXLXLXHXu u a i u e = zXLXLXcXr  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. . .a a = = o .   < ).`.`.`.%X&X=X=X7X7X8X8X8X8X7X7X7X9X{ 6 o.o.+.+.>.9.7.&.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.o.o.} } i u 9 a.LXLXLXLXLXLXLXLXLXLXLXLXLXLXLXfXw.- _ LXcXe d d d d i i w w 0 w GXLXLXZXs s d a u u = zXLXLXcXr } | } } a a u t.PX_ a a u e 0 0 z JXLXLXPXp.a d a a e e = zXLXLXcXr  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.s s 0 9 o o .   Y L.'.'.`.%X&X>X-X8X8X8X8X8X8X8XuXD.6.s } } @ 8 V.E.J.5 +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.o.o.} } i u 9 9 fXLXLXLXLXLXLXLXLXLXLXLXLXLXLXLXJXAXxXLXt.e d d d d i a e w w 0 iXLXLXLX;.s d d e u 9 zXLXLXcXr } | } } a a u y.PXlXa a u e 0 0 % aXLXLXJXx d d a a e e = zXLXLXcXr  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.s s 0 0 o o .   + I Y.'.`.%X&X&X;X7X8X8X8X8X8X$XD.A f s X.,.K.VX5X5XBXW +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.o. .} } u u 0 9 * M fXLXLXLXLXLXPXPXLXLXLXLXLXLXLXLXLXLXu p s s } } s d u e 9 9 b PXLXLXp.q i i 0 0 & lXLXLXzXq i a s s i i - zXLXZXr r u u w w 0 N LXLXkXe s s a a 0 0 $ lXLXLXzX- f d o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.| ..u u * % . .   # K J.[.6X%X%X&X>X7X7XqXqXrXW >.f : n j.G.$X0X7X7X0X@Xg p +.o.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.o. .} } i u 0 9 * M fXLXLXfXi.) ) _ ) i.fXLXLXLXLXLXLXLXd.y.s.s | } d d u e e.e.i.PXLXLXJXjXy.>.e.t.aXPXLXLXPXjXs.s.s s >.y.aXPXLXPXcXt.y.u e w 0 0 ZXLXl u d s a a t.t.aXPXLXLXPXjXs.s.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| | u u * % . .     + 4 h.Y.'.'.@X&X7X9XoXF.E 4 a a n aX+XtX0X0X7X7X0X0Xa.V +.+.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.o. .} } i u = t ZXLXLXHXt 9 0 0 9 9 9 9 = = i.LXLXLXLXLXPXPXIXi | | } } i u PXPXPXPXPXPXPXPXIXe.PXPXPXPXPXPXPXJXJXJXd d e.IXPXPXJXPXJXJXIXe u u e e 3.jXa a s s i a JXJXPXPXPXPXJXJXJXJXo.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.s d w w % % o o .   X # 5 v.z.W ^ D x > & : K C.$X7X7X7X8X8X7X7X8X8XU.K  . .+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O. . .} } u u k SXLXLXLX7 = 9 0 0 0 9 9 9 = = $ _ LXLXLXLXw.; i i | | } s i u - % % % - - - = q 0 * * & % * - - q q q d d 0 q - - = = q q r r i u u e w r a d s s a i - - % - * - q q q q o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.s s r r - - # O .       X X + @ @ X % ; H i.eXyX7X7X7X8X8X8X7X7X8X8XrXC.=. .+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O. . .} s u u iXLXLXLXjX= w e e e e e 0 0 9 = * * GXLXLXLXy.p | | | | } } a i e e w w u u i i i i u e w e u u a a d d d a i i u i i a s s } s d d i a a a } } } s a a u u e e e u a d } | o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| | f f g j q = $ O o o X X @ @ 3 3 L R F.$X8X8X8X8X8X8X8X8X8X8X8X8XqXoX_ : +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O. . .s } u u LXLXLXLXe.= w e e u e e w w = = * * fXLXLXLXy.u | | | | } } a a e e e e u u i a i i e u e e u u a a d d a a i i i u i a s s s s d d a a a d } } } } a a u u e e u u a a } | o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. . .&.-.g g y q & > : : 2 H ' v.L.rXyXyXqXqX8X8X8X8X8X8X8X8X8X8X8X8XqX0XlX> +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.| | d a e e LXLXLXLXe.w a a d s a d u u w w = = fXLXLXLX>.a } | | | } } d d a i i i i a a a a a i i i i i i d d s s s s a a a i a d } } } } } } } s } } } } } } d d a i i i i a s s | | o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.&.;.l h 4 S Y k.S.Y.%X%X&X;X8X8X7X7X7X7X8X8X8X8X8X8X8X8X8X8X7X8X8X8XtXI X.} O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.| | a a e e GXLXLXLXjXw a a s s d d i i w w = = GXLXLXZXa a } | | | } } d d a a i i a a a a a a i a i i i a d d s s s d a a a a a a s } } } } } } } } } | } } } d d a a i i i a s s | | o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.&.;.h 1.L..X X!.{.[.%X&X=X:X8X8X7X7X7X7X7X8X8X8X8X8X8X8X8X8X7X8X7X8XyXH.6.} O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.o.| } a i w w aXPXLXLXSX- } s | | } } a a e e * w.LXLXJXw.a a JXJXIXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXIXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXPXJXJXJXJXJXJXJXJXJXJXJXo.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.o. .| | X.&.2 / R.#X%X%X`.%X=X:X-X9X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X7X7X7X7X7X8X{ 6 +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.o.| | a i w w 7 LXLXLXPXzXs } | | } } d d e e z SXLXLXzX- d a q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q r o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O. . .} } d f : iXW.#X*X%X%X%X;X-X9X7X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X7X7X7X7X7X7XdXQ +.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.| ..a a w w 9 e.LXLXLXLXDX/ r r i i r r & i.GXLXPXzXi i d d s } } } } } } s s s s s s s s s } } s s s s s s s s s s s s s s s s s s } s } s s } } } } s } } s } s s s s s s } } } }  . .o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. . .a a w w A I.@X@X=X=X=X=X-X-X9X0X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X7X7X7X7X8X8X2XA.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.o.| | a a w w 9 9 7 ZXLXLXPXPXSXvXd.y.d.cXPXPXLXGXw.- i i d d } s } } } } s s s s s s s s s s s } s s s s s s s s s s s s s s s s s s s s s } } } } } s } } } } s s s s s s s s } } }  . .o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. ...a a w r R  X&X&X=X=X=X=X-X-X9X9X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X7X7X7X7X8X8XwXOXO.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O. . .s d u u w w w w 3.kXSXJXPXPXJXJXPXPXAXjX4.w u i d d } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } | |  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } e e $ > V.<X=X=X=X=X=X=X-X-X-X9X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X7X7X7X7X8X8X8X8X1.i O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O. . .s d u u w w w w w w = q q q q q - = q 0 e e u i d d } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } | | |  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } e w $ 7 R.2X=X&X&X&X&X=X;X:X-X-X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X7X7X7X7X8X8X8X8Xy.i O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.o.o.| } d a u u u u u u i i a a a a i i i i a a s d ..| | |  . . . . . . . . . .| |  . .| |  . .| |  . .| |  . .| |  . .| |  . .| |  . .| |  . .| |  . .| |  . . . . . . . . . . . .o.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.o.s d 0 9 X P >X=X&X&XQ.#X&X&X:X:X-X-X7X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X7X7X7X7X7X7X8X8XK.8 O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.o.o.| | d d i i u u u u i i a a a a a i a i a a s s | | | |  . . . . . . . . . .| |  . .| |  . .| |  . .| |  . .| |  . .| |  . .| |  . .| |  . .| |  . .| |  . . . . . . . . . . .o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.o.d d 0 9 X K.&X&X%X`.k.R.%X&X=X:X-X-X-X8X8X7X8X8X8X8X8X8X8X8X8X8X8X8X7X7X7X7X8X7X8X8XdX8 O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.o.o.| ..} s d d a a d d s s d s s s s s } } | | o.o.o.o.O.O.o.o.O.O.O.O.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.@. . .i i * * 4 H.=X&X1Xk.4 z.%X*X=X=X:X-X-X9X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X8X7X7X7X7X7X7XrXA +.+.+.+.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.o.o.| | } s d d a a d d s s s s s s s } } } | | O.O.o.o.O.O.o.o.O.O.O.O.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.@.@. ...i i * * j.eX=X&XG.A X L W.*X=X=X=X-X-X-X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7XCXK +.+.+.o.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.o.o. . .| | | | | | | | | | .... . .o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.} } e e O : k.<X<X'.[ X   # k.1X=X=X=X>X-X-X9X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7XyXR *.} O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.o.o.o. .| | | | | | | | | | | .. . .o.o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.} } e e O v #X<X#XY.< X     S 1X=X=X=X=X-X-X-X8X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7XyXV.;.X.O.+.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.o.O.o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.s d q 9 < D.4X<XP.P $ O . . X L.&X*X=X=X;X-X-X9X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7XqXE.8.r O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.O.O.o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.d d 0 q l.eX<XA.D < $ O . . + W '.&X=X=X=X:X-X-X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7XqXoXt.p O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| | i i # ! J.[ g r e e = = . o   D Y.#X&X*X=X>X-X-X9X9X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X8X-Xu.q @.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| ..i u : v 5 < w e u e = = . . X < k.[.@X%X=X=X-X-X-X9X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X0X0Xp.z O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.d d A K #. .O.O.O.O.O.O.O.O.O.O.o.o.} } u u w w e e s s s s w w $ O   . A  X`.`.%X*X>X>X-X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X8X8X7X7XK.6 O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.d y.BX.X=. .O.O.O.O.O.O.O.O.O.O.o.o.} } u u w w e u s s } s w w $ $     , D.`.`.`.&X=X:X-X9X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X8X8X7X7XdXP O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.r t k.2X0X,XI.4 @.O.O.O.O.O.O.O.O.O.o.o.} } a a a a } }  . . ...i u * * . . X [ ).'.`.`.=X>X-X-X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7XeXj.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.V jX5X2XoX0XCXZ.%.O.O.O.O.O.+.O.O.O.o.o.} } a a a a } }  .o. . .i u * * . . X L R.'.`.`.%X=X-X-X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X8XeXC.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.# 8 @X,XBXW 3X1X,X4X' @ O.O.O.O.O.O.O.O.O.O. .o. .|  . .o.o.O.O.o.o.s d 0 9 O o   6 x.{.`.`.`.*X:X:X7X7X7X7X7X7X7X7X7X7X7X8X7X7X7X7X7X7X8X7XtXF. . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.@.] ZX,XW.W v.3XR F.4XVX^ O.O.O.O.O.O.O.O.O.O.o. .| |  .o.o.o.O.O.o.o.s d 0 9 O o   @ h.{.`.`.`.`.;X:X7X7X7X7X7X7X7X7X7X7X7X8X7X7X7X7X7X7X7X7XtXV.=. .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| | < J.,X4XhX! K U.xX8 c jX,X&XM ; O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.O.| } e e $ $     S  X`.`.`.`.&X>X9X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7XtXA.;.X.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| 6.I.CX<XF.Q H E CX{ 8 c M W.qXjXy O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| } e e % $ . . 1 !.`.`.`._.@X>X9X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X9XtXA.*.X.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.X.X.1 P x.T.^.(.).(.Y.S.8 @ |  .O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.p j Y !.4X2X{ F B B Q.+X2.2.,.,.H ZX,XR.j p O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. . .a i * * . . X v.).'.`.`.`.*X9X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X5XF.#.+.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.} :.n.sX}.!.(.(.).].{.3XVXK.:. .O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.@.f s.tXtX#XR Q 8 B 3.tXA.,.,.,.2.7 v ,X,Xd.j O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. . .a i = * . . X L Y.'.`.`.`.`.-X9X8X8X8X8X8X8X8X8X8X8X7X7X8X8X8X8X8X8XwXF.+.+.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. . .i i G }.~.~.^.^.^.(.).].@X:X9X7XtXK } } O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.; z V.4XyXG.D D W W K U.BXE ,.,.2.2.,.;.' VX1XR | | O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.d d 0 9 o o   # k.{.'.`._._.=X0X8X8X0X0X2X2XwXwX0X0X8X8X8X8X8X8X8X8X3XF.&.| +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o. ...i 5.}.}.^.~.^.^.^.(.).].=X:X7X7XtX1X6.} O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.+.O.n zXwX4XV.< 3 T v.W E rXU.K 2.,.,.,.,.,.6 ' tX1X<.| O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.s d 0 0 O o   X G {.'.`._.`.&X0X8X8X0XoXA.V.j.F.;XoX$X8X8X8X8X8X8X8X3XA.<.} +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O...| a a Z |.~.~.^.^.^.^.)._.@X=X9X7X7X7X8X8XU.< O.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.< P @X,XrXI   2 P [ [ [ R.,XaXc 2.,.,.,.,.,.;.-.z.BX X5 O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } e e % $ . . 1  X`.`._._.%X,XwXwXP.5 . X @ # X 8 R eX8X0X8X8X8X7X3XF.2.f +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.} } i i c.|.~.~.(.(.].].%X*X>X>X7X7X7X7X8X8XCXz.O.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.{ VX,XoXA + 8 H T [ P T <X4Xw.c 2.2.,.,.;.;.;.2.5 L.uXD.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.| } u e % $ . . S H.`.`._._.@X>XoXj.3 X             < R oX0X8X8X8X8X5XF.2.d O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| | i i # 7 ~.M.M.~.)._.%X%X&X=X-X8X7X7X7X7X8X8X8X0X-.a O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } 4 I.,X,XU.3 O v M M W [ D [ 4X#X{ Q 2.2.2.,.;.2.;.;.;.;.I.uX[ < O.O.O.O.O.O.O.O.O.O.@.O.O.O.O.O. . .a i = * . . S D.`.`._._.!.Q.! : * * % % O O . .   # R eX8X8X8X8XqXE.;. .+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| ..i i # ] ~.~.~.^._.].%X*X=X=X9X8X7X7X7X7X8X8X8X8Xy.f O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} 7.I.uX,XA.< < v v M ( [ P P mX4XA.b.] 2.2.2.2.,.2.;.,.;.&.S I.VXT O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o. .f a = * . . S z.`._._._.G.Y # O * * % % O O .       3 R 7X8X8X8XqX$X . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o. .d a 0 9 , n.~.~.~.^.`.%X&X=X$X-X7X7X7X7X7X7X8X8X8X8XpX# O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.p p l.6X4X4X[ X > v h >.D [ z.K A.4XmX^ { b.u.n ,.2.2.;.;.2.X.} > b :X$Xh p O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.d d 9 9 O o 1 z._._.[.[.w.; i i i i e e 9 9 $ $ . . . # j.uX8X8XqX$X;.f +.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o. .d a 9 9 , L.~.M.~./.%X%X*X=X;X9X7X9X7X7X7X7X8X8X8X8XgX# O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.f d.3X5XQ.K X 6 / 7 h 1.P pXI.rXwX4XK.D P b.i._ ,.2.2.;.;.X.} f x lX0X=Xy.p +.+.O.O.O.O.O.O.O.O.O.O.O.O.o.o.d d 9 9 o o < Z.`._.[.S.> - i i a i u u 0 9 $ $ . . . . 3 H.0X8XqXE.6.s +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| | u u % $ , L.~.~.~./.%X%X=X>X9X9X7X7X7X8X7X7X8X8X8X8XVX@ O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.; c R.,XtX+X3 X D P L L K H.#X,XCXrXp.u.7.5.5.9.K.b.( m 2.2.&.X.> x W.,XVX[ %.+.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } 0 0 O O X v._.].sX1 s } | |  . .} } a a 0 0 $ O . o O / G.tX3XF.6.f +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| ..u u % $ , |.^.~.~./.%X*X>X>X9X7X7X7X7X8X7X7X8X8X8X8XVX@ O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.n xX,X,XG., @ P P P [ BXyXyX<XW.I I / b 2.2.5.5.P b.a.B ;.&.X.f x xX,X>XT @ @.@.+.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.} } 0 0 O O X W )._.' < s } |  . . .| } a a 0 0 $ $ o o O O R +XwXF.,.f +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } w w O O , n.~.~.^.].&X&X:X:X9X7X7X7X7X7X7X7X8X7X7X9XmX# o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.< T =X0XuXR @ 3 R V.A.2XuXeXL.Z.' ~ 8.8.6.;.,.6.2.6.1.y.b.[ -.p : 7 E.,XBXT o. .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } w w % $ X ~  Xz.>.f o.@.O.O.O.O.O.O.| ..a a 9 9 $ $ * * k p.2XE.;.} o.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } w w $ O , z.~.~.(.].=X=X-X:X9X7X7X7X7X7X7X7X7X7X7X7XpX# +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.v.VX0X=X5 @ I U.1XtX2XR.I I I I ^ Q 4.3.;.*.*.,.2.2.5.5.[ { r.p 7 NX,X,XT < o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } w w % $ X ^ D.G f f o.o.O.O.O.O.O.O. .| a a 0 9 $ $ * * - y A.2X*.} +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } w 0 O o + T ~.^.).].&X=X-X:X9X9X7X7X7X7X7X7X7X7X8X8Xy.p #.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.+.O.O.q B.9X9X,XA.V.OXuX XsX{ ~ ~ b b P P i./ 6.;.;.;.*.*.,.6.6.2.g r.W I W.,XBXE } | O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } u e 9 9 0 V e.j  .o.@.@.O.O.O.O.O.O.O.O.| ..i i 9 9 9 9 i a v fX6.f +.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } w 0 O o + 1 ~./.).].&X&X:X-X9X9X7X7X7X7X7X7X7X7X8X9X>.p +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.y q.:X9X,X,X2XF.l.K 8 F ~ ^ b x P [ i./ ;.&.*.;.*.*.;.,.6.-.p g W MX,X,XT < | | O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| } u e 9 9 0 0 r r o.o.@.@.O.O.O.O.O.O.O.O.| | i i 0 9 9 9 i i : b &.X.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } w w O O     c.!.).].&X&X;X:X-X9X9X7X7X7X7X7X7X7XCXZ.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O. . .; > I uX0XW.Q 8 M B v / ~ Q 8 ^ { { q.q.3.g *.=.;.*.*.;.;.} ; c E.,XuXR } } O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. . .a a e e a a  . .O.O.O.O.O.O.O.O.O.O.O.O.O.o.} } i i e e a d  .o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } w w O O     Z }.).].%X&X=X:X-X9X9X7X7X7X7X7X7X7XeX< O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O. .=.z % @ C.,X=X~ 8 m M H ] ' ] { { K.^ m q.8.3.=.=.*.;.*.*.X.X.z aX,X,Xl.4 } | O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. . .a a u u a a  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } i i e u a d  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.| ..u e % $ . . X 8 [.{.`.*X=X>X-X9X9X9X7X7X7X7X5X3X7.f O.+.+.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.} | 7 v 3 X 3 P G.yX1XI F Q v.v.N.b.p.e.7.,.;.,.( ( 1.h *.;.*.X.q t E.,XuXR -.f O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.} } s } ..| o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.} } d d } } o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.| ..u u % $ . . X X U {.`.*X=X>X-X9X9X9X7X7X7X8X5XI a f +.+.+.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.+.+.X.<.! v 8 P P 8 A D.tX+X{ b.J.J.{ ~ q.M >.-.;.;.m ( 7.-.*.*.&.X.t jX,X=XR 3 f f O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| } } } | | O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.} } d d } } o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.o.o.a -.m.g.Z Z + X .   X 8 D.eX=X>X9X9X9X9XqX0XCXI.1.i o.o.#.%.%.#.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.d f Q ' ^ P P P D 6 L T +XtX!.j.i.) 4.4.6.;.$.*.;.;.;.2.( J -.X.q t R.,XuXI -.i O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.o.o.o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.a 5.}.m.n.n.H +         , Y W.$X-X9X9X-X$XW.L @ i a o.#.%.=.=.%.%.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.s y.{ { [ P P D P ^ ' [ j.+XyX!._ n 1.1.;.X.#.$.*.;.;.-.M ( 6.X.t jX,X<XK 3 a f O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.o.o.o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O...| } s , b.~.~.~.M.M.M.c.g., , X   X # 6 8 8 7 y = i i | | +.#.=.:.,.;.=.#.O.O.O.O.O.O.O.O.O.O.O.O.o.@.' pXJ.J.[ [ ' ' ) ) w.J N w.OX3XJ.5 <.;.*.#.%.%.$.=.=.;.-.6.! 7 A.4XrXR h u O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| ..s s 1 hX~.~./.~.M.M.m.}..Xz.P @           . = = i a | | +.#.#.:.<.<.:.#.O.O.O.O.O.O.O.O.O.O.O.O.@.<.~ pXJ.J.v.W ^ Q ! ! ( M M N j.5XBXW ;.&.#.#.$.%.#.#.;.=.f f v hX4X,XI 4 p i O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. . .a a w w h.!.~.^.(.(.^.^.^.(.`.&X=X:XF.K 4 4 5 5 5 5 5 5 5 5 5 5 5 A <.<.:.%.O.O.O.O.O.O.O.O.O.O.O.O.g 8.' { K.v.) v 3.3.N N N N / / _ i.6X3X/ : %.@.=.$.@.#.=.#.r r S.4XrXI j u +.+.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. . .i i w w x.!.^./.(.(.].].].].&X>X;X:X3X3XuXuXuXuXuXCXCXCXCXCXCXCXVXdX;.;.=.$.O.O.O.O.O.O.O.O.O.O.O.=.3.r.~ ~ [ [ { / 1.3.N 3.( q._ u.] / R 5XxXn %.%.%.%.%.#. . .r B.4X4XK 5 u i +.+.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } w w . # ^.(.(.).(.(._.].@X*X;X:X9X7X7X7X7X7X7X7X7X7X7X7X7X7X9X7XwXE.] : %.+.O.O.O.O.O.O.O.O.o.o.t N ! ) ( c M w.v.v.! ! _ _ w.w.e.r.7.2.l y.2X6Xm y %.%.#.o.p j V.4XrXA h p O.O.+.+.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.} } w 0 . ~ (.(.(.].).].]._.&X*X:X:X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7XwXoXZX2 O.O.O.O.O.O.O.O.O.O.o.=.N q.! H c c M N [ K.pX] _ _ w./ 8.N 2.1.1.h k.2XjXc @.@.#.o.p d.4X4XI 4 e p O.O.+.+.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.a a = = , L.(.(.).]._.`.%X%X=X>X9X9X7X7X7X7X7X7X7X7X7X7X8X8X8X9X>X:X,X@X2Xl.| | O.O.O.O.O.O.|  .k ( ` / m t c M / / ] pXK.v.q.N 4.4.6.2.,.;.,.2.V d.tXS.j j p p S.4XrX3 g r o.O.O.+.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.a a = = 1 L.(.(._.].`.%X%X*X:X:X9X9X7X7X7X7X7X7X7X7X7X7X8X8X9X-X;X=X*X&X2X2X<.| +.O.O.O.O.O.| :.( w./ x t m ( q._ _ ) ! v.v.e.M 5.5.2.,.;.,.,.,.m V F.5Xd.j p d.4XW.K 3 e p O.O.O.+.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| ..u u % $ h./.(.(.].].`.%X&X=X;X-X9X7X7X7X7X7X8X7X8X8X7X7X7X9X:X=X=X=X=X=X=X=X{ @ O.O.O.O.O.O.m q.) ` J b ( ( C 3.4.4.5.4.( i.{ ^ 5.1.2.,.;.;.;.,.,.,.c jX3Xj.V.2XU.5 h e o.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.| ..u u % $ /./.(.(.]._.%X%X&X>X-X-X9X7X7X7X7X7X8X7X8X7X7X7X9X9X>X=X=X=X=X=X=X=XVX8 O.O.O.O.+.%.m r.` ` ` / M c m m B 3.5.5.c M b.b.7.>.,.,.,.;.;.,.,.&.y y OX5X5XR.3 4 e p O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} s w 0 X 6 ^.(.(.(.]._.%X%X=X>X:X-X9X7X7X7X7X7X7X7X7X9X7X7X0X-X=X=X=X=X2X<X=X=X<XY.|  .@.O.X.*.h 1.` ( 3.m -.-.,.>.-.1.2.6.5.5.J p.b.F ;.;.2.;.;.-.&.X.f f 6 dXJ.4 g e O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.s s 0 0 X ' (.(.(.(.`.].%X%X>X:X:X-X7X7X7X7X7X7X7X7X9X7X7X7X9X-X=X=X=X=Xk.#X=X=X<X#X:.| O.O.$.$.j h M ` r.B -.-.-.>.-.>.1.2.4.4.m J b.{ 2.;.2.2.;.X.X.f h >.D @ + 3 r p O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.a i = * , L.(.(.(.(._.].%X&X:X:X-X9X7X7X7X7X7X7X7X7X7X7X7X7X9X-X=X=X=X=X> _ 6X6X=X=XMX1  . .f &.X.&.1.4.( ( 1.h ;.;.;.;.;.6.6.6.6.2.( p.i.8 ;.,.&.X.X.&.7 x X X g r O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.a i = * , XX(.(.(.(._.].&X*X>X:X-X9X7X7X7X7X7X7X7X7X7X7X7X7X9X-X=X=X=X&X& - j.6X=X=XBXS $.$.f f f -.-.-.M ( 4.1.;.;.,.,.;.;.;.2.2.6.c ` N.{ <.&.f X.&.&.7 : # 8 e r +.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.| | u u $ $ , XX(.(.(.(._.%X%X*X;X:X-X7X7X7X8X8X8X8X7X7X7X7X8X7X9X:X&X%X1Xk.* = - aX<X<X<XW.n y X.X.&.&.-.-.>.4.( J >.-.;.;.;.*.*.:.2.6.6.2._ i.` > f &.: v 3 6 h e O.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.| | u e $ $ ,  X(.(.(.(._.%X&X*X;X:X-X7X7X7X7X8X8X8X7X7X7X7X9X-X-X-X*X%X1XY * * % - F.<X*X#XjXz X.&.&.&.&.;.-.-.J ( 7.-.;.*.;.*.*.*.;.6.2.2.x / u.H &.&.v 7 8 6 u u O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } w w O O Z !.^.(.(.(._.%X&X&X;X-X9X8X7X8X7X7X8X8X7X7X7X7X-X-X-X-X>X&X.X+ % % 0 w t t.sXmXeX Xn y $.&.*.;.;.;.1.7.J m &.*.*.;.=.$.;.:.6.,.&.&.! { F D D D l r +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } w 0 O o S  X(.(.(.(._.%X=X=X-X-X9X7X7X7X7X7X8X8X7X7X7X9X-X-X-X-X>X=XU.+ % % 0 0 r t < 6 I z.aXM &.&.&.;.;.;.-.-.( ( 6.&.*.=.;.*.*.;.;.&.s f : ] ' ^ P 3 r p +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.} s 0 0 o o Z !.(.(.(.(._.%X=X>X-X-X9X8X8X8X8X8X8X8X7X7X7X9X-X-X-X-X-X=XsXX 9 = 9 q i j X.&.*.*.$.$.$.$.$.#.=.;.;.=.-.7.q.m *.*.*.;.=.*.*.| d } y m ^ ^ h u +.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } 0 9 o o Z  X(.(.(.(._.%X=X>X:X-X9X8X8X8X8X8X8X8X7X7X7X9X-X-X-X-X-X:X{ + 9 9 9 q i j &.&.*.&.$.$.$.#.#.@.#.=.;.=.h 1.q.N ;.*.*.=.=.*.| | f f m m 8 < u p o.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.o.s s 0 9 o o S !.(.(.(.(.`.%X=X>X:X:X9X8X7X7X8X8X8X8X7X7X7X9X-X-X-X-X-X-X8.p i i u u p p X.&.$.$.$.#.#.=.%.%.%.%.=.=.;.=.1.9.3.g *.*.*.$.| | r m v v a p O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.o.s d 9 9 o . S  X(.(.(.).%X%X=X>X:X:X9X7X7X7X8X8X8X8X7X7X8X-X-X-X-X-X-X-Xg p i i u u i p X.X.$.$.#.#.#.#.$.$.%.%.$.=.;.;.h 1.q.3.=.*. . .| $.B 3.v : i a O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.s d 9 9 o o U !.^.(.(.(.%X%X=X>X;X:X9X7X7X7X7X7X7X7X7X7X9X-X-X-X-X-X4XE.o.o.| | } } } X. .&.#.#.#.%.#.%.$.%.$.%.%.$.*.;.=.;.1.8.3.p | | r B b b a a O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.s d 9 9 o . h.!.^.(.(.].%X%X=X>X:X:X9X7X7X7X7X7X7X7X7X7X9X-X-X-X-X-X4XF.o.o. .| } } } }  .&.#.#.%.#.%.#.$.$.%.%.%.%.$.*.=.;.g 3.3.l  . .l 3.n > a f O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.s d 9 = o . U !.(.(.).].%X%X=X=X-X-X9X7X7X7X7X7X7X7X7X7X9X-X-X-X-X-XyXV.o.O.O.O.O.O.O.O.O.%.%.%.@.%.%.%.%.%.#.$.%.$.%.%.=.=.;.&.B 3.m m M M f s O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.d d 9 9 o . U !.(.(.).].%X%X;X=X-X-X9X7X7X7X7X7X7X7X7X7X9X-X-X-X-X-XyXR O.O.O.O.O.O.O.O.O.O.+.%.%.%.@.%.%.#.@.#.%.$.%.%.=.=.| | t 3.N N M ; s s O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.d d 9 = o . h.!.^.(.).].%X%X=X;X-X-X9X8X8X8X8X8X8X8X8X8X9X-X-X-X-X-XrXI O.O.O.O.O.O.O.O.O.O.+.%.%.%.%.%.%.%.%.%.#.=.#.#.#.+. .| X.&.B m X.} O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.d d = = o . h.!.^.(.).].%X%X;X=X-X-X9X8X8X8X8X8X8X8X8X8X9X-X-X-X-X-XuXA +.O.O.O.O.O.O.O.O.O.+.@.@.%.%.%.%.%.#.#.#.#.#.@.o.o. . .X.s r r } } O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.d a 9 = o . x.Q.(.(.).].`.%X;X=X-X9X9X8X8X8X8X8X8X7X7X7X9X-X-X-X-X-XVX3 O.O.O.O.O.O.O.O.O.O.+.O.+.%.%.$.%.%.#.%.#.#.#.o.o.o. .#.a a } } O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.d a = = o . x./.(.(.(.].`.%X=X=X-X9X9X8X8X8X8X8X8X8X7X7X0X-X-X-X-X-XBX< O.O.O.O.O.O.O.O.O.O.O.+.O.+.@.$.%.%.%.%.%.#.o.o.o.#.#. .a a } } O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.a a = = o . x.{.(.(.).].`.%X;X=X;X9X9X8X8X8X7X7X7X7X7X7X9X-X-X-X-X-XaX; O.O.O.O.O.O.O.O.O.O.O.O.O.O.%.%.%.%.%.@.#.o.o.o. . .s s  . .O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.a a = = . . h.!.(.(.).].`.%X=X;X;X9X9X7X8X8X7X7X7X7X7X7X0X-X-X-X-X-Xu.; O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.%.%.%.%.#.o.o. .o. . .s s  .o.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o. .a a = * . . G |.(.(.).]._.%X;X=X;X-X9X7X7X7X7X7X7X7X7X7X9X-X-X-X-X-X5.f O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.%.%.#.o.o.o.o.o.} }  .o.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.a a = * o . Z !.(.(.).]._.%X=X=X:X:X9X7X7X7X7X7X7X7X7X7X9X-X-X-X-X-X,.f O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.@.@.o.o.o.o.o. .} | o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.d a = = . . , XX(.(.(.]._.%X=X;X;X:X0XqXyXyXeXyXqX0X7X7X8X-X-X-X-X-X1.p O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o. . .o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.d a 9 = . . , Z.(.(.(.]._.%X=X;X=X:X0XF.K 4 @ 5 F.0X7X7X0X0X-X-X-X-Xt.p O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o. . .o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.s d 9 9 o o + z.(.(.).]._.%X=X>XU.L # . . . .     8 D.uX0X;X-X-X-X-Xe.q +.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.+.+.+.O.O.O.O.@.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.o.o.s d 9 9 o . + T (.(.).]._.].=X=X4 + . . . .         + 3 W.:X-X-X-X-Xe.y +.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.o.+.+.O.O.O.O.O.@.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } 0 0 O o X P (.(.).].`.%XeXz.= = = = % % O o . . . . @ dX,X;X-X-XpX: O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.o.} } w 0 O o X 6 (.(.).]._.%XH.1 9 9 9 9 * * O O . . . . X @ E.,X-X-XiX: O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.| } e w O O   # (.(.(.].{.{.3.r a d d a u u 0 9 % % o o O $ # gX;X;XiX: O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.| } e w $ O     (.(.(.].[.x.r r d d d d i i 0 0 % % o o $ $ X 7 $X:XhX# O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.| | u e $ $ . . Y.[.(.].mX1 ..| o.o.o.o.| ..d a e w * % % % w e v NXVX< o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.| | u e % $ . . x./.(.(.b., | | o.o.o.o. .| d d e e * * % % w e # 8 mX@ O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O. . .i u % % o o U |.{.T.....O.O.O.O.O.O.O.O. . .s d e w 9 9 e u } | =.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O. . .i u * % o o S  X{.x.....O.O.O.O.O.O.O.O.o. .s s e e 9 9 e u } | O.o.O.O.O.O.O.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.o. .a i = * $ $ 1 XXhX: o.o.O.O.O.O.O.O.O.O.O.O. . .} s i u a a ..| O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.o. .a i = = % $ 1 P.] # o.o.O.@.O.O.O.O.O.O.O.O.o. .} s i i a a | | O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.d d 0 0 9 9 : hX*.} @.@.O.+.O.O.O.O.O.O.+.+.O.O. . .| } ..| o.o.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.s d w 0 9 9 # x } } @.@.O.+.O.O.O.O.O.O.+.+.+.O.o.o.| | | | o.o.O.O.O.O.O.O.O.O.+.+.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } i u u u } } o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.} } i u i i } X.o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. .| } s s s  . .O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. . .} } } }  .o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.o.o.o.@.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.+.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O."
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/logout_icon.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,33 @@
+/* XPM */
+static char * logout_icon_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"12 12 15 1",
+/* colors */
+" 	c #cccccc",
+".	c #999999",
+"X	c None",
+"o	c black",
+"O	c #000066",
+"+	c #996666",
+"@	c white",
+"#	c #000099",
+"$	c #666699",
+"%	c #ffff99",
+"&	c #6666cc",
+"*	c #336699",
+"=	c #333366",
+"-	c #333399",
+";	c #333333",
+/* pixels */
+" .Xooooooooo",
+"XXXo       O",
+"o.Xo ++@++@#",
+"XX$o.+%@+%@O",
+"XX&o +%@+%@#",
+" .*o @@@@@@O",
+"=X-ooo+@++@#",
+"XX=o +.@+%@#",
+"X.;o +%@+%@O",
+"oXXo +%@+%@#",
+"XXXo @@@@@@O",
+" .*#O#O#O#O#"};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/msg_pending.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,825 @@
+/* XPM */
+static char * msg_pending_xpm[] = {
+"32 31 791 2",
+"  	c None",
+". 	c #000000",
+"+ 	c #0F0B08",
+"@ 	c #383330",
+"# 	c #2E2A2A",
+"$ 	c #2E2924",
+"% 	c #35312E",
+"& 	c #0B0E10",
+"* 	c #050403",
+"= 	c #3D3E47",
+"- 	c #26211F",
+"; 	c #050201",
+"> 	c #010100",
+", 	c #050402",
+"' 	c #161314",
+") 	c #332D28",
+"! 	c #332B23",
+"~ 	c #2A241A",
+"{ 	c #0E0A08",
+"] 	c #25221F",
+"^ 	c #9D8B7C",
+"/ 	c #756F65",
+"( 	c #3E3D3F",
+"_ 	c #36322D",
+": 	c #676258",
+"< 	c #7F879C",
+"[ 	c #888C94",
+"} 	c #75798D",
+"| 	c #97979E",
+"1 	c #787A8E",
+"2 	c #97989E",
+"3 	c #7C7D8F",
+"4 	c #888D93",
+"5 	c #BEC0CF",
+"6 	c #AFABAE",
+"7 	c #7E7E8E",
+"8 	c #7B7D8E",
+"9 	c #7F7F90",
+"0 	c #7B7D8F",
+"a 	c #A1A09E",
+"b 	c #A09281",
+"c 	c #98989A",
+"d 	c #767A8E",
+"e 	c #70768E",
+"f 	c #636577",
+"g 	c #3C3732",
+"h 	c #786B5F",
+"i 	c #9D8E7E",
+"j 	c #A19E9E",
+"k 	c #212122",
+"l 	c #5A5349",
+"m 	c #AB9D8F",
+"n 	c #424240",
+"o 	c #5C5D67",
+"p 	c #8C8A81",
+"q 	c #8F8A88",
+"r 	c #C7CACE",
+"s 	c #A6ABC8",
+"t 	c #A8ACC8",
+"u 	c #ACAFC9",
+"v 	c #AEB0C9",
+"w 	c #B1B1C9",
+"x 	c #B1B2C9",
+"y 	c #B2B3C9",
+"z 	c #B5B4C9",
+"A 	c #676877",
+"B 	c #A8A9B8",
+"C 	c #AFB1C9",
+"D 	c #CCC9D0",
+"E 	c #A3A9C8",
+"F 	c #929AB2",
+"G 	c #636871",
+"H 	c #6C6B77",
+"I 	c #252C2F",
+"J 	c #C4BFB3",
+"K 	c #32312A",
+"L 	c #4A423B",
+"M 	c #423C35",
+"N 	c #42434A",
+"O 	c #9DA6C8",
+"P 	c #B7BCD2",
+"Q 	c #ABB0CA",
+"R 	c #A7ABC8",
+"S 	c #AAAEC9",
+"T 	c #ADB0C9",
+"U 	c #B3B3C9",
+"V 	c #B6B5CA",
+"W 	c #ABAABC",
+"X 	c #BBBBCC",
+"Y 	c #B8B7CA",
+"Z 	c #B7B6CA",
+"` 	c #B8B8CB",
+" .	c #0A0202",
+"..	c #302626",
+"+.	c #CBC5C1",
+"@.	c #BEC3D4",
+"#.	c #A4AAC8",
+"$.	c #A1A8C8",
+"%.	c #C7C3BC",
+"&.	c #756962",
+"*.	c #AEA79B",
+"=.	c #282724",
+"-.	c #2C2A28",
+";.	c #393834",
+">.	c #615F63",
+",.	c #A9ADC9",
+"'.	c #B2B2C9",
+").	c #B4B4C9",
+"!.	c #D9D8E2",
+"~.	c #A39DA3",
+"{.	c #CACBD2",
+"].	c #ADABAB",
+"^.	c #E0E4E3",
+"/.	c #BCBDCD",
+"(.	c #C5C5CA",
+"_.	c #D1D2CE",
+":.	c #540B0B",
+"<.	c #A50000",
+"[.	c #182220",
+"}.	c #4C6065",
+"|.	c #C8C9D8",
+"1.	c #B1B7D2",
+"2.	c #ADB4D1",
+"3.	c #C3C7C3",
+"4.	c #302D2F",
+"5.	c #3F3935",
+"6.	c #A4968B",
+"7.	c #6D6C6F",
+"8.	c #AEB3C7",
+"9.	c #ADAFC9",
+"0.	c #B6B5C9",
+"a.	c #D4D4DE",
+"b.	c #B0AAA3",
+"c.	c #232221",
+"d.	c #2E2D2A",
+"e.	c #515048",
+"f.	c #CCC3B9",
+"g.	c #ECECEF",
+"h.	c #B8BCB7",
+"i.	c #BEC2BD",
+"j.	c #590507",
+"k.	c #FD0101",
+"l.	c #D70000",
+"m.	c #660000",
+"n.	c #92A3A5",
+"o.	c #C5C8D3",
+"p.	c #9AA7AA",
+"q.	c #1B2121",
+"r.	c #302A27",
+"s.	c #5D5455",
+"t.	c #AAABBA",
+"u.	c #BFC1CE",
+"v.	c #B0B1C9",
+"w.	c #D5D5DB",
+"x.	c #818087",
+"y.	c #48423D",
+"z.	c #666765",
+"A.	c #464542",
+"B.	c #040404",
+"C.	c #211D1C",
+"D.	c #989395",
+"E.	c #BFBABE",
+"F.	c #F6F6F7",
+"G.	c #550100",
+"H.	c #FE0000",
+"I.	c #FD0000",
+"J.	c #162728",
+"K.	c #BCD0D1",
+"L.	c #B5B5C9",
+"M.	c #9FA1A7",
+"N.	c #131210",
+"O.	c #060705",
+"P.	c #494A4A",
+"Q.	c #A8ADC9",
+"R.	c #AEB1CA",
+"S.	c #BABCC2",
+"T.	c #7A817C",
+"U.	c #252A27",
+"V.	c #4B4947",
+"W.	c #C3B8A5",
+"X.	c #E7D9C4",
+"Y.	c #CDCBC5",
+"Z.	c #242524",
+"`.	c #0F0C0F",
+" +	c #54504D",
+".+	c #C8CCC5",
+"++	c #540000",
+"@+	c #550101",
+"#+	c #E80000",
+"$+	c #0F191A",
+"%+	c #B8C3C3",
+"&+	c #BEBBCA",
+"*+	c #B7B7CA",
+"=+	c #ABAEC9",
+"-+	c #CBCECD",
+";+	c #222624",
+">+	c #25282B",
+",+	c #949AB1",
+"'+	c #A9ADC8",
+")+	c #C5C4D3",
+"!+	c #595E5B",
+"~+	c #141715",
+"{+	c #35393F",
+"]+	c #7A6F66",
+"^+	c #B2AA99",
+"/+	c #C5B19F",
+"(+	c #C8BBAC",
+"_+	c #C5C6C6",
+":+	c #29292A",
+"<+	c #000403",
+"[+	c #214639",
+"}+	c #560101",
+"|+	c #5D6264",
+"1+	c #430000",
+"2+	c #0E1310",
+"3+	c #B6BAB7",
+"4+	c #BEBCCA",
+"5+	c #B8B8CA",
+"6+	c #CFD2CA",
+"7+	c #272B22",
+"8+	c #4B4B49",
+"9+	c #BBBDCE",
+"0+	c #B5B6CA",
+"a+	c #7B777A",
+"b+	c #111612",
+"c+	c #6F6058",
+"d+	c #91837D",
+"e+	c #E6D2BB",
+"f+	c #A59C93",
+"g+	c #9B9A95",
+"h+	c #74685F",
+"i+	c #FCFAFA",
+"j+	c #828080",
+"k+	c #080708",
+"l+	c #01190E",
+"m+	c #849592",
+"n+	c #DADAD4",
+"o+	c #D0D0D6",
+"p+	c #EDEEE7",
+"q+	c #C6C6CB",
+"r+	c #C0C1CE",
+"s+	c #969590",
+"t+	c #C4C6D3",
+"u+	c #D1D6D2",
+"v+	c #2A2E2A",
+"w+	c #393A43",
+"x+	c #C1C2C7",
+"y+	c #292D29",
+"z+	c #554E46",
+"A+	c #9B908D",
+"B+	c #C6BFBA",
+"C+	c #8A8174",
+"D+	c #C0B9B7",
+"E+	c #B7C1BE",
+"F+	c #999897",
+"G+	c #EDDDCB",
+"H+	c #ACA39F",
+"I+	c #090708",
+"J+	c #01271A",
+"K+	c #0A0E0C",
+"L+	c #424644",
+"M+	c #878785",
+"N+	c #BCBDC6",
+"O+	c #D3D2D6",
+"P+	c #B7B9B7",
+"Q+	c #C7C5D0",
+"R+	c #B5B8CE",
+"S+	c #CFD1C9",
+"T+	c #262720",
+"U+	c #625F58",
+"V+	c #C7C9D7",
+"W+	c #B5B5CA",
+"X+	c #BDBDCA",
+"Y+	c #4A4B50",
+"Z+	c #212524",
+"`+	c #463F3B",
+" @	c #23251F",
+".@	c #2A302B",
+"+@	c #939793",
+"@@	c #989B96",
+"#@	c #6D6A66",
+"$@	c #A2A4A4",
+"%@	c #F7EBDC",
+"&@	c #B1ADB0",
+"*@	c #030303",
+"=@	c #012A1D",
+"-@	c #4C4851",
+";@	c #2E2B29",
+">@	c #21201D",
+",@	c #0D0C0B",
+"'@	c #494445",
+")@	c #949193",
+"!@	c #A4A5A1",
+"~@	c #B9BAC0",
+"{@	c #B5B4CA",
+"]@	c #D1D7D4",
+"^@	c #292E2B",
+"/@	c #434347",
+"(@	c #B3B6CC",
+"_@	c #BDBDCB",
+":@	c #4C5053",
+"<@	c #353836",
+"[@	c #2B2A2C",
+"}@	c #2B2C2B",
+"|@	c #292926",
+"1@	c #8D7F75",
+"2@	c #5C5353",
+"3@	c #BFB7B2",
+"4@	c #7A7579",
+"5@	c #020202",
+"6@	c #000906",
+"7@	c #272B28",
+"8@	c #45403E",
+"9@	c #5E5E55",
+"0@	c #878782",
+"a@	c #322D2C",
+"b@	c #221D1F",
+"c@	c #524847",
+"d@	c #B5AEB4",
+"e@	c #CFD0C8",
+"f@	c #272820",
+"g@	c #2A2A32",
+"h@	c #9D9FB9",
+"i@	c #C7C7D2",
+"j@	c #5B605A",
+"k@	c #1F2420",
+"l@	c #121212",
+"m@	c #010101",
+"n@	c #362F30",
+"o@	c #615A54",
+"p@	c #73675D",
+"q@	c #FCF9F9",
+"r@	c #676262",
+"s@	c #020303",
+"t@	c #515453",
+"u@	c #252822",
+"v@	c #605B5B",
+"w@	c #777571",
+"x@	c #A99A90",
+"y@	c #908576",
+"z@	c #010102",
+"A@	c #605F6E",
+"B@	c #CACAD6",
+"C@	c #CDD4D4",
+"D@	c #252C2C",
+"E@	c #050708",
+"F@	c #93959C",
+"G@	c #90919A",
+"H@	c #212320",
+"I@	c #5B544C",
+"J@	c #030302",
+"K@	c #050504",
+"L@	c #4B4040",
+"M@	c #424440",
+"N@	c #5C5651",
+"O@	c #FCF8F8",
+"P@	c #A49D9A",
+"Q@	c #030E0C",
+"R@	c #6B0000",
+"S@	c #530000",
+"T@	c #434745",
+"U@	c #595653",
+"V@	c #7B7270",
+"W@	c #8F8378",
+"X@	c #817A7A",
+"Y@	c #C3BFB6",
+"Z@	c #817566",
+"`@	c #171517",
+" #	c #C0BFCF",
+".#	c #E2E2DE",
+"+#	c #393936",
+"@#	c #080808",
+"##	c #7C7C8D",
+"$#	c #898C8E",
+"%#	c #303331",
+"&#	c #333032",
+"*#	c #252221",
+"=#	c #463D3E",
+"-#	c #4C4841",
+";#	c #67605D",
+">#	c #4F4849",
+",#	c #FCF9F7",
+"'#	c #60605C",
+")#	c #020D09",
+"!#	c #0A3428",
+"~#	c #DA0000",
+"{#	c #480403",
+"]#	c #3A3937",
+"^#	c #50504F",
+"/#	c #827675",
+"(#	c #AB9A8B",
+"_#	c #9E8F86",
+":#	c #A6968A",
+"<#	c #F6EFD5",
+"[#	c #4E4741",
+"}#	c #7B7A87",
+"|#	c #D6D5C8",
+"1#	c #2C2B23",
+"2#	c #121313",
+"3#	c #878899",
+"4#	c #C0C1CA",
+"5#	c #6A6C74",
+"6#	c #2D362B",
+"7#	c #020203",
+"8#	c #0E0D0C",
+"9#	c #131213",
+"0#	c #534E4D",
+"a#	c #746D6B",
+"b#	c #7B6C61",
+"c#	c #FDFCF8",
+"d#	c #545252",
+"e#	c #060806",
+"f#	c #081C13",
+"g#	c #56322D",
+"h#	c #3D3537",
+"i#	c #5B5856",
+"j#	c #3B3D39",
+"k#	c #645E5F",
+"l#	c #65615A",
+"m#	c #A08E7E",
+"n#	c #AE9B8B",
+"o#	c #FDF9F6",
+"p#	c #787975",
+"q#	c #3D3C43",
+"r#	c #CECEBC",
+"s#	c #25261B",
+"t#	c #2A2C33",
+"u#	c #9DA2B9",
+"v#	c #787A86",
+"w#	c #191D1E",
+"x#	c #1F2925",
+"y#	c #030602",
+"z#	c #060706",
+"A#	c #32332F",
+"B#	c #393533",
+"C#	c #423C3C",
+"D#	c #514B49",
+"E#	c #817263",
+"F#	c #FDFCF4",
+"G#	c #545353",
+"H#	c #0D140F",
+"I#	c #182017",
+"J#	c #453B3C",
+"K#	c #575450",
+"L#	c #5D5B59",
+"M#	c #5C5954",
+"N#	c #8E8377",
+"O#	c #6B675E",
+"P#	c #B6B3A9",
+"Q#	c #FCF2E6",
+"R#	c #FDF9F9",
+"S#	c #1A1A1D",
+"T#	c #8F90A3",
+"U#	c #CFD8D7",
+"V#	c #262E2E",
+"W#	c #383942",
+"X#	c #494E51",
+"Y#	c #3A3934",
+"Z#	c #191816",
+"`#	c #090D0C",
+" $	c #172018",
+".$	c #42423C",
+"+$	c #46443D",
+"@$	c #625E5A",
+"#$	c #746D6C",
+"$$	c #090F0B",
+"%$	c #151F17",
+"&$	c #3D3736",
+"*$	c #483E3F",
+"=$	c #52534B",
+"-$	c #5C5852",
+";$	c #514C4A",
+">$	c #1E1D1F",
+",$	c #2E2E31",
+"'$	c #6A6463",
+")$	c #E8DAC6",
+"!$	c #FBEDD9",
+"~$	c #A4A5A6",
+"{$	c #C0BFBC",
+"]$	c #171614",
+"^$	c #3D3D44",
+"/$	c #494E52",
+"($	c #8A7A71",
+"_$	c #7D7062",
+":$	c #0E0E0D",
+"<$	c #020402",
+"[$	c #201919",
+"}$	c #2E2A2F",
+"|$	c #33322C",
+"1$	c #4B4944",
+"2$	c #CAC5C6",
+"3$	c #EEE9E9",
+"4$	c #F3F3F1",
+"5$	c #4A4B49",
+"6$	c #050505",
+"7$	c #121A13",
+"8$	c #3E3834",
+"9$	c #6E6767",
+"0$	c #56524C",
+"a$	c #050529",
+"b$	c #0000E3",
+"c$	c #0000D9",
+"d$	c #0E0C1F",
+"e$	c #A9A099",
+"f$	c #FCF3EB",
+"g$	c #A9A9A8",
+"h$	c #C0BCB7",
+"i$	c #17130F",
+"j$	c #4C4A4B",
+"k$	c #B1B5CC",
+"l$	c #C1C1CC",
+"m$	c #2A2926",
+"n$	c #585557",
+"o$	c #F3EBE1",
+"p$	c #F3ECE8",
+"q$	c #F8F4F4",
+"r$	c #F9F4F5",
+"s$	c #EFE8E4",
+"t$	c #D4C5BB",
+"u$	c #D0C6BC",
+"v$	c #938C82",
+"w$	c #21211F",
+"x$	c #1B1511",
+"y$	c #92867B",
+"z$	c #4E4843",
+"A$	c #090907",
+"B$	c #10160F",
+"C$	c #4E5147",
+"D$	c #595652",
+"E$	c #00005F",
+"F$	c #0000FF",
+"G$	c #0000FE",
+"H$	c #00003F",
+"I$	c #94908C",
+"J$	c #97989D",
+"K$	c #BDC4CA",
+"L$	c #272D2D",
+"M$	c #424347",
+"N$	c #B1B4CC",
+"O$	c #BFC0CE",
+"P$	c #AFADB5",
+"Q$	c #565959",
+"R$	c #4F4D4D",
+"S$	c #4D4844",
+"T$	c #352A21",
+"U$	c #37322B",
+"V$	c #96968A",
+"W$	c #A49C91",
+"X$	c #B6AC9B",
+"Y$	c #E4D8C2",
+"Z$	c #796E68",
+"`$	c #9A8F84",
+" %	c #50514C",
+".%	c #141D14",
+"+%	c #42443F",
+"@%	c #03031C",
+"#%	c #0000AC",
+"$%	c #0000A0",
+"%%	c #211E1E",
+"&%	c #A49891",
+"*%	c #F4EAE1",
+"=%	c #717383",
+"-%	c #CBD0D3",
+";%	c #343837",
+">%	c #353842",
+",%	c #D2D2DE",
+"'%	c #373539",
+")%	c #19110D",
+"!%	c #81776D",
+"~%	c #E4E1DF",
+"{%	c #F5EBD9",
+"]%	c #E3CDAE",
+"^%	c #CBC9C0",
+"/%	c #CAC5BD",
+"(%	c #E6D7C4",
+"_%	c #FAF9F7",
+":%	c #F9F0E5",
+"<%	c #AF9A88",
+"[%	c #AE9A8C",
+"}%	c #302C2D",
+"|%	c #00009C",
+"1%	c #070716",
+"2%	c #494946",
+"3%	c #F5F0EE",
+"4%	c #5C5B5E",
+"5%	c #CABCA8",
+"6%	c #231D19",
+"7%	c #28272F",
+"8%	c #9498B5",
+"9%	c #ACA9BB",
+"0%	c #A4A0A0",
+"a%	c #6A6A73",
+"b%	c #252824",
+"c%	c #575451",
+"d%	c #98999B",
+"e%	c #E3DDC8",
+"f%	c #E4E5E3",
+"g%	c #D8CEBE",
+"h%	c #6C6058",
+"i%	c #5F5959",
+"j%	c #EEE1CE",
+"k%	c #E3D1BA",
+"l%	c #BAA996",
+"m%	c #010144",
+"n%	c #0000FD",
+"o%	c #0000FA",
+"p%	c #0000EE",
+"q%	c #0000F8",
+"r%	c #03032F",
+"s%	c #D4D0D0",
+"t%	c #6E7185",
+"u%	c #C2BDB7",
+"v%	c #1A1512",
+"w%	c #232125",
+"x%	c #8E91AB",
+"y%	c #BBBACA",
+"z%	c #E5E5E8",
+"A%	c #56545C",
+"B%	c #1E1D1E",
+"C%	c #060505",
+"D%	c #201A17",
+"E%	c #0F0F0C",
+"F%	c #4D4D4C",
+"G%	c #1D1B1B",
+"H%	c #90908A",
+"I%	c #CCCDC6",
+"J%	c #96948F",
+"K%	c #00007F",
+"L%	c #000074",
+"M%	c #080840",
+"N%	c #4E4640",
+"O%	c #CCC9CA",
+"P%	c #6B7085",
+"Q%	c #A9A69A",
+"R%	c #121410",
+"S%	c #343743",
+"T%	c #9AA3C8",
+"U%	c #B6B6CA",
+"V%	c #BFBFCF",
+"W%	c #BAB9CA",
+"X%	c #BCBBC4",
+"Y%	c #888687",
+"Z%	c #696362",
+"`%	c #050707",
+" &	c #E3E4E5",
+".&	c #4C4C4C",
+"+&	c #2A2A26",
+"@&	c #9D9E96",
+"#&	c #5E5F5E",
+"$&	c #0000A6",
+"%&	c #0000F6",
+"&&	c #43413E",
+"*&	c #84776B",
+"=&	c #242322",
+"-&	c #050E05",
+";&	c #6F768A",
+">&	c #CFC8B1",
+",&	c #2A2B20",
+"'&	c #323642",
+")&	c #98A2C7",
+"!&	c #9EA6C8",
+"~&	c #AFB0C9",
+"{&	c #C2C6CD",
+"]&	c #929196",
+"^&	c #C3C2D3",
+"/&	c #ECEDF1",
+"(&	c #202228",
+"_&	c #010000",
+":&	c #FDFBFB",
+"<&	c #7B716D",
+"[&	c #090D0D",
+"}&	c #00005E",
+"|&	c #0000FC",
+"1&	c #0000B6",
+"2&	c #0000BF",
+"3&	c #00008D",
+"4&	c #3C362C",
+"5&	c #5F5453",
+"6&	c #8E94AF",
+"7&	c #C7CED1",
+"8&	c #1E2428",
+"9&	c #444444",
+"0&	c #969DAE",
+"a&	c #A6ADC0",
+"b&	c #C9CDDF",
+"c&	c #A2A8C8",
+"d&	c #B4B5CA",
+"e&	c #BABCC3",
+"f&	c #C4C3CF",
+"g&	c #E9E8E4",
+"h&	c #56453A",
+"i&	c #020000",
+"j&	c #FDF5EE",
+"k&	c #C9BBAD",
+"l&	c #00000C",
+"m&	c #0000AE",
+"n&	c #0000C6",
+"o&	c #202029",
+"p&	c #3E3A3B",
+"q&	c #01013F",
+"r&	c #7F8398",
+"s&	c #B0B3C9",
+"t&	c #98A0AC",
+"u&	c #BABFBF",
+"v&	c #2C2F2E",
+"w&	c #50453E",
+"x&	c #6F6658",
+"y&	c #545E58",
+"z&	c #B8BFCE",
+"A&	c #A0A7C8",
+"B&	c #BFC0D4",
+"C&	c #F3F3EC",
+"D&	c #766858",
+"E&	c #221E21",
+"F&	c #CBC8C8",
+"G&	c #5F5D5D",
+"H&	c #131112",
+"I&	c #0000AF",
+"J&	c #000079",
+"K&	c #2D2E3B",
+"L&	c #9B9DB5",
+"M&	c #4A4D5A",
+"N&	c #000065",
+"O&	c #06072A",
+"P&	c #7F808B",
+"Q&	c #C6C9C8",
+"R&	c #232725",
+"S&	c #767167",
+"T&	c #282624",
+"U&	c #3F3730",
+"V&	c #CDB6A4",
+"W&	c #5F594F",
+"X&	c #282625",
+"Y&	c #222123",
+"Z&	c #524740",
+"`&	c #A0A7B7",
+" *	c #C1C5BF",
+".*	c #C0C5C4",
+"+*	c #C0C4BF",
+"@*	c #C1C6C5",
+"#*	c #D6D3CF",
+"$*	c #CDCFCC",
+"%*	c #BEC0BF",
+"&*	c #1F1D19",
+"**	c #B6B2B1",
+"=*	c #F6F3F3",
+"-*	c #92918E",
+";*	c #2C2923",
+">*	c #4C4944",
+",*	c #747479",
+"'*	c #AEB0C0",
+")*	c #A4A1B1",
+"!*	c #8A8FA2",
+"~*	c #A7A7B7",
+"{*	c #474954",
+"]*	c #878D94",
+"^*	c #99A4A2",
+"/*	c #403F3A",
+"(*	c #404139",
+"_*	c #D8CFC0",
+":*	c #3B3733",
+"<*	c #060605",
+"[*	c #302B27",
+"}*	c #5A493C",
+"|*	c #38342C",
+"1*	c #3E3F41",
+"2*	c #353330",
+"3*	c #161B17",
+"4*	c #151B17",
+"5*	c #151916",
+"6*	c #171C18",
+"7*	c #302C28",
+"8*	c #242621",
+"9*	c #0D100E",
+"0*	c #2F2B27",
+"a*	c #797170",
+"b*	c #E7E3E2",
+"c*	c #BBB1A3",
+"d*	c #111712",
+"e*	c #837B72",
+"f*	c #191817",
+"g*	c #696461",
+"h*	c #362F2A",
+"i*	c #191B19",
+"j*	c #464039",
+"k*	c #2F2D2E",
+"l*	c #1A1F18",
+"m*	c #2B2929",
+"n*	c #2E2E2A",
+"o*	c #323533",
+"p*	c #3F3B36",
+". + @ # $ % & . . * . * . . = - . . ; > , > , > . . ' ) ! ~ { . ",
+"] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d [ e f g h i j k ",
+"l m n o p q r s t u v w x x y z z y A B C D u t s E F G H I J K ",
+"L M N O P Q R S T C U z V W X Y Z `  ...+.@.C T S R #.$.%.&.*.=.",
+"-.;.>.$.s ,.u v '.).!.~.{.].^./.(._.:.<.[.}.|.'.v u ,.s 1.2.3.4.",
+"5.6.7.8.,.9.x U 0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.U x 9.,.#.$.p.q.",
+"r.s.t.u.u v.).0.w.x.y.z.A.B.C.D.E.F.G.H.I.H.J.K.L.).v.u R E M.N.",
+"O.P.Q.R.v U 0.S.T.U.V.W.X.Y.Z.`. +.+++m.@+#+$+%+&+*+U v =+s -+;+",
+">+,+'+T y L.)+!+~+{+]+^+/+(+_+:+<+[+++}+|+1+2+3+4+5+).y T '+6+7+",
+"8+9+T v.0+*+a+b+c+d+e+f+g+h+i+j+k+l+++++m+n+o+p+q+r+s+t+v.T u+v+",
+"w+t v y *+x+y+z+A+B+C+D+E+F+G+H+I+J+++++K+L+M+N+O+P+Q+R+y v S+T+",
+"U+V+w W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@++++-@;@>@,@'@)@!@~@{@v.]@^@",
+"/@(@x )._@:@<@[@> > }@|@1@2@3@4@5@6@++++7@8@9@0@a@b@c@d@z x e@f@",
+"g@h@w L.i@j@k@l@. m@C.n@o@p@q@r@s@. ++G.t@u@v@w@x@y@z@A@B@x C@D@",
+"E@F@).0.G@H@I@. J@K@n@L@M@N@O@P@E@Q@R@S@T@U@V@W@X@Y@Z@`@ #)..#+#",
+"@###z 0.$#%#&#. K@*#=#-#;#>#,#'#)#!#~#{#]#^#/#(#_#:#<#[#}#z |#1#",
+"2#3#y 4#5#6#7#J@J@8#9#0#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#q#).r#s#",
+"t#u#w v#w#x#y#J@z#A#B#C#D#E#F#G#H#I#]#J#K#L#M#N#O#P#Q#R#S#T#U#V#",
+"W#=+x X#Y#Z#J@J@`# $.$+$@$#$R#G#$$%$&$*$=$-$;$>$,$'$)$!$. ~${$]$",
+"^$=+w /$($_$:$<$[$}$|$1$2$3$4$5$6$7$8$ +9$0$a$b$c$d$e$f$. g$h$i$",
+"j$k$v l$m$n$o$p$q$r$s$t$u$v$w$x$y$z$A$B$C$D$E$F$G$H$I$R#. J$K$L$",
+"M$N$T O$P$Q$R$R$R$R$S$T$U$V$W$X$Y$Z$`$ %.%+%@%#%$%%%&%*%. =%-%;%",
+">%#.'+T y ,%'%)%. . !%~%{%]%^%/%(%_%:%<%[%}%|%E$. 1%2%3%. 4%5%6%",
+"7%8%s =+v U 9%0%a%b%Z#c%d%e%f%g%h%i%j%k%l%m%n%o%p%q%r%s%. t%u%v%",
+"w%x%E R u v.).L.y%z%A%B%C%D%E%. F%G%H%I%J%K%n%L%E$M%N%O%. P%Q%R%",
+"S%T%$.#.,.9.x U U%V%W%X%Y%Z%`%.  &.&+&@&#&$&n%%&K%&&*&=&-&;&>&,&",
+"'&)&!&$.s ,.u ~&'.U {&]&^&/&(&_&:&<&. [&}&|&1&2&n%3&K@4&5&6&7&8&",
+"9&0&a&b&c&#.t =+T ~&d&e&f&g&h&i&j&k&l&m&F$n&o&p&L%G$q&r&s&t&u&v&",
+"w&x&y&z&O A&E s t u T C B&C&D&E&F&G&H&I&J&K&L&t M&N&O&P&Q&R&S&T&",
+"U&V&W&X&Y&Z&`& *.*+*@*#*$*%*&***=*-*;*>*,*'*)*!*~*{*]*^*/*(*_*:*",
+"<*[*}*|*1*2*Z+3*4*5*6*7*8*9*0*a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*8#"};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/no_icon.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,19 @@
+/* XPM */
+static char * no_icon_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"12 12 1 1",
+/* colors */
+" 	c None",
+/* pixels */
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/normal.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,27 @@
+/* XPM */
+static char *normal_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"22 17 4 1",
+"  c Gray0",
+". c Magenta",
+"X c Gray60",
+"o c None",
+/* pixels */
+"oooooooooooooooooooooo",
+"oooooooooooooooooooooo",
+"oooooooooooooooooooooo",
+"oooooooooooooooooooooo",
+"oooooooooooooooooooooo",
+"oooooooooooooooooooooo",
+"ooooooooooo oooooooooo",
+"oooooooooo   ooooooooo",
+"oooooooooo   ooooooooo",
+"ooooooooo  o  oooooooo",
+"ooooooooo     oooooooo",
+"oooooooo  ooo  ooooooo",
+"oooooooo  ooo  ooooooo",
+"ooooooo    o    oooooo",
+"oooooooooooooooooooooo",
+"oooooooooooooooooooooo",
+"oooooooooooooooooooooo"
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/offline.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,392 @@
+/* XPM */
+static char * offline_xpm[] = {
+"35 32 357 2",
+"  	c None",
+". 	c #989897",
+"+ 	c #F7F7F5",
+"@ 	c #FEFEFD",
+"# 	c #FEFEFC",
+"$ 	c #C4C4C2",
+"% 	c #E5E5E3",
+"& 	c #FDFDFB",
+"* 	c #FEFEFE",
+"= 	c #A7A7A6",
+"- 	c #010102",
+"; 	c #010103",
+"> 	c #060608",
+", 	c #C3C5FC",
+"' 	c #A4A8FC",
+") 	c #EBECFC",
+"! 	c #FDFDFD",
+"~ 	c #FAFBFF",
+"{ 	c #CACBFE",
+"] 	c #A3A7FB",
+"^ 	c #E7E7F7",
+"/ 	c #FBFBF9",
+"( 	c #AFAFAE",
+"_ 	c #232324",
+": 	c #1F1F1F",
+"< 	c #E6E6E5",
+"[ 	c #DADBFC",
+"} 	c #6469F8",
+"| 	c #7579F1",
+"1 	c #D6D7F2",
+"2 	c #FCFCFC",
+"3 	c #B5B7FF",
+"4 	c #5F64FC",
+"5 	c #8D90EA",
+"6 	c #CFD0D8",
+"7 	c #F1F1EF",
+"8 	c #141416",
+"9 	c #151516",
+"0 	c #030304",
+"a 	c #BABCF9",
+"b 	c #3E44F0",
+"c 	c #5C61E9",
+"d 	c #9093F3",
+"e 	c #454BFD",
+"f 	c #676BE7",
+"g 	c #A9AABD",
+"h 	c #C3C3C1",
+"i 	c #EEEEEC",
+"j 	c #050506",
+"k 	c #040406",
+"l 	c #1F1F21",
+"m 	c #151517",
+"n 	c #8F8F8E",
+"o 	c #F9F9F7",
+"p 	c #F9F9FC",
+"q 	c #A1A4F1",
+"r 	c #2930F0",
+"s 	c #1D25F7",
+"t 	c #4A4FE5",
+"u 	c #9999AB",
+"v 	c #AAAAA8",
+"w 	c #CCCCCA",
+"x 	c #F4F4F2",
+"y 	c #6E6E6E",
+"z 	c #686564",
+"A 	c #161516",
+"B 	c #939393",
+"C 	c #A8A8A8",
+"D 	c #3A3A3C",
+"E 	c #7E7E7D",
+"F 	c #FAFAFE",
+"G 	c #ADAFFD",
+"H 	c #3239F8",
+"I 	c #181FF1",
+"J 	c #3136CC",
+"K 	c #88899B",
+"L 	c #BCBCBB",
+"M 	c #E9E9E7",
+"N 	c #939292",
+"O 	c #959083",
+"P 	c #706032",
+"Q 	c #AFAFAF",
+"R 	c #646465",
+"S 	c #434345",
+"T 	c #1F1F20",
+"U 	c #B1B1B0",
+"V 	c #BEC0FE",
+"W 	c #4A4FFD",
+"X 	c #575BE4",
+"Y 	c #585BBB",
+"Z 	c #2329DA",
+"` 	c #464AC6",
+" .	c #B9BACD",
+"..	c #F8F8F6",
+"+.	c #5C4D2D",
+"@.	c #99720A",
+"#.	c #D6B114",
+"$.	c #D3C162",
+"%.	c #998433",
+"&.	c #342E22",
+"*.	c #4C4C4D",
+"=.	c #929291",
+"-.	c #F0F0EE",
+";.	c #686DFD",
+">.	c #6D71E9",
+",.	c #9C9DB8",
+"'.	c #9E9E9E",
+").	c #7678C0",
+"!.	c #3A3FD7",
+"~.	c #7376D1",
+"{.	c #DDDEE7",
+"].	c #AC7906",
+"^.	c #E5B10A",
+"/.	c #F0CF20",
+"(.	c #F5D819",
+"_.	c #E3B90F",
+":.	c #433308",
+"<.	c #101011",
+"[.	c #9A9DF2",
+"}.	c #BBBCCC",
+"|.	c #B6B6B6",
+"1.	c #BABABA",
+"2.	c #D8D8DC",
+"3.	c #A6A7DA",
+"4.	c #6C6FC4",
+"5.	c #B4B4C4",
+"6.	c #F5F5F3",
+"7.	c #554617",
+"8.	c #D1AE25",
+"9.	c #E0BB11",
+"0.	c #9B6D0F",
+"a.	c #C99A3E",
+"b.	c #423421",
+"c.	c #424242",
+"d.	c #090909",
+"e.	c #DBDBDB",
+"f.	c #D2D2D2",
+"g.	c #E7E7E7",
+"h.	c #D9D9D7",
+"i.	c #C7C7C5",
+"j.	c #999998",
+"k.	c #09090A",
+"l.	c #6B6B6B",
+"m.	c #B8A276",
+"n.	c #C29E52",
+"o.	c #BAA171",
+"p.	c #DEDEDD",
+"q.	c #9F9F9F",
+"r.	c #101012",
+"s.	c #ECECEB",
+"t.	c #EEEEED",
+"u.	c #FCFCFB",
+"v.	c #BEBEBD",
+"w.	c #868685",
+"x.	c #2E2E30",
+"y.	c #CCCCCB",
+"z.	c #CECECD",
+"A.	c #C9C9C9",
+"B.	c #E5E4E4",
+"C.	c #FAFAF8",
+"D.	c #434344",
+"E.	c #0A0A0B",
+"F.	c #CDCDCD",
+"G.	c #F1F1F0",
+"H.	c #F3F3F1",
+"I.	c #FCFCFA",
+"J.	c #CBCBCA",
+"K.	c #0E0E0F",
+"L.	c #C6C6C6",
+"M.	c #F0F0F1",
+"N.	c #E2DEE1",
+"O.	c #DBD0D5",
+"P.	c #E5D9DD",
+"Q.	c #DAD3D7",
+"R.	c #CCC7CC",
+"S.	c #B7B4B9",
+"T.	c #212124",
+"U.	c #020204",
+"V.	c #676767",
+"W.	c #E4DFE9",
+"X.	c #DAC0CD",
+"Y.	c #C295A3",
+"Z.	c #A76F80",
+"`.	c #A06879",
+" +	c #B4808E",
+".+	c #C68E9D",
+"++	c #AE8497",
+"@+	c #8B8A96",
+"#+	c #161617",
+"$+	c #0D0D0F",
+"%+	c #040405",
+"&+	c #C6C4CA",
+"*+	c #D1A0AE",
+"=+	c #C56A71",
+"-+	c #94515A",
+";+	c #998291",
+">+	c #A897A6",
+",+	c #A37D89",
+"'+	c #AD595E",
+")+	c #9A4247",
+"!+	c #918DA0",
+"~+	c #545456",
+"{+	c #0D0D0E",
+"]+	c #838382",
+"^+	c #CCB3C3",
+"/+	c #D16468",
+"(+	c #A3393B",
+"_+	c #8E6B7B",
+":+	c #DDDDE4",
+"<+	c #F2F3F4",
+"[+	c #DDDBE1",
+"}+	c #A38B97",
+"|+	c #7F5E6B",
+"1+	c #C3C4D3",
+"2+	c #7E7F80",
+"3+	c #A1A1A0",
+"4+	c #D1777D",
+"5+	c #C4484A",
+"6+	c #982F33",
+"7+	c #9F8596",
+"8+	c #F2F2F4",
+"9+	c #F7F7F7",
+"0+	c #F0EEF2",
+"a+	c #E4E2EA",
+"b+	c #DFDCE6",
+"c+	c #EFEFF2",
+"d+	c #7D7E7E",
+"e+	c #C66264",
+"f+	c #C04244",
+"g+	c #A53438",
+"h+	c #A58093",
+"i+	c #E8E8ED",
+"j+	c #CEC3D2",
+"k+	c #C39AAA",
+"l+	c #CB92A1",
+"m+	c #C78C9B",
+"n+	c #BC97A3",
+"o+	c #5F575D",
+"p+	c #725207",
+"q+	c #544106",
+"r+	c #A2A2A1",
+"s+	c #BA7C87",
+"t+	c #B73A3C",
+"u+	c #B63B3D",
+"v+	c #9F5667",
+"w+	c #CFC8D9",
+"x+	c #CDC2D1",
+"y+	c #BE8991",
+"z+	c #C4595B",
+"A+	c #AB4042",
+"B+	c #825865",
+"C+	c #48424D",
+"D+	c #303031",
+"E+	c #DFA709",
+"F+	c #E0AC0B",
+"G+	c #685825",
+"H+	c #B1A4B4",
+"I+	c #9F4750",
+"J+	c #B3393B",
+"K+	c #B34046",
+"L+	c #B38298",
+"M+	c #C7C2D8",
+"N+	c #CBA5B1",
+"O+	c #B74F54",
+"P+	c #762D2D",
+"Q+	c #A38430",
+"R+	c #70611A",
+"S+	c #4F4715",
+"T+	c #E0A60A",
+"U+	c #E7AE09",
+"V+	c #F5BD0C",
+"W+	c #F5BD0B",
+"X+	c #EABC0B",
+"Y+	c #2C260E",
+"Z+	c #82778A",
+"`+	c #753F4D",
+" @	c #963A3F",
+".@	c #A33D41",
+"+@	c #A75A63",
+"@@	c #A05B63",
+"#@	c #7D484E",
+"$@	c #8D8287",
+"%@	c #D09910",
+"&@	c #8A670A",
+"*@	c #2C1F06",
+"=@	c #403005",
+"-@	c #E4B30A",
+";@	c #EFB60D",
+">@	c #F5BC0B",
+",@	c #F1BC0B",
+"'@	c #725F08",
+")@	c #05060B",
+"!@	c #65646F",
+"~@	c #AA9DA6",
+"{@	c #8F7274",
+"]@	c #8C7071",
+"^@	c #9A8B91",
+"/@	c #C5C4CF",
+"(@	c #CAC6BF",
+"_@	c #D1980F",
+":@	c #E1A709",
+"<@	c #D49808",
+"[@	c #E3A709",
+"}@	c #F4BC0B",
+"|@	c #A88108",
+"1@	c #EAB10A",
+"2@	c #EBBC0C",
+"3@	c #705C2B",
+"4@	c #F8F8F7",
+"5@	c #F6F6F6",
+"6@	c #777267",
+"7@	c #C79209",
+"8@	c #ECB70A",
+"9@	c #EEB60A",
+"0@	c #F3BA0B",
+"a@	c #AD8608",
+"b@	c #EDB50A",
+"c@	c #F4BD0C",
+"d@	c #F3BC0B",
+"e@	c #D4B63C",
+"f@	c #E4E4E3",
+"g@	c #737374",
+"h@	c #18130A",
+"i@	c #C8910A",
+"j@	c #E8AF0A",
+"k@	c #B27F06",
+"l@	c #DFA50A",
+"m@	c #EAB10B",
+"n@	c #EEB50B",
+"o@	c #F2B90B",
+"p@	c #F3BB0B",
+"q@	c #D49C0A",
+"r@	c #553805",
+"s@	c #0B0B0B",
+"t@	c #0A0A0A",
+"u@	c #120D04",
+"v@	c #C79009",
+"w@	c #F4BB0B",
+"x@	c #D49C09",
+"y@	c #664504",
+"z@	c #765104",
+"A@	c #A87606",
+"B@	c #C58F08",
+"C@	c #D9A10A",
+"D@	c #DCA10A",
+"E@	c #AD7408",
+"F@	c #442B03",
+"G@	c #0F0A02",
+"H@	c #AD7506",
+"I@	c #D89D09",
+"J@	c #DBA009",
+"K@	c #AB7706",
+"L@	c #795105",
+"M@	c #573804",
+"N@	c #4E3303",
+"O@	c #875C06",
+"P@	c #5C3E04",
+"                                                                      ",
+"                                                                      ",
+"                                            . + @ @ @ @ # $ .         ",
+"                                          % & # * * * * @ # # =       ",
+"                    - ; ; >             & & , ' ) ! * ~ { ] ^ / (     ",
+"                  - ; ; ; _ :         < & & [ } | 1 2 3 4 5 6 7 #     ",
+"                  ; ; ; ; 8 9 0       < & & & a b c d e f g h i #     ",
+"                  j k ; ; l m ; -   n o & & & p q r s t u v w x #     ",
+"                  y z A B C D ; - E & & & & & F G H I J K L M & #     ",
+"                  N O P Q R S ; T U & & & & & V W X Y Z `  ...# #     ",
+"                  +.@.#.$.%.&.; *.& =.-.& & [ ;.>.,.'.).!.~.{.& #     ",
+"                  ].^./.(._.:.; <.      & & , [.}.|.1.2.3.4.5.6.(     ",
+"                  7.8.9.0.a.b.c.d.        % & 7 e.f.g.@ + h.i.j.      ",
+"                k.l.m.n.o.p.q.r.k.-         . 6.s.t.u.@ # v.w.        ",
+"              - x.y.z.A.B.C.& D.; ;                                   ",
+"              E.F.& G.H.I.& & J.; ; ;                                 ",
+"            - K.L.M.N.O.P.Q.R.S.T.> k ;                               ",
+"            U.V.W.X.Y.Z.`. +.+++@+#+$+;                               ",
+"            %+&+*+=+-+;+>+,+'+)+!+~+{+U.-                             ",
+"          U.]+^+/+(+_+:+<+[+}+|+1+2+k U.-                             ",
+"          U.3+4+5+6+7+8+9+0+a+b+c+d+; ; ;                             ",
+"        U.U.'.e+f+g+h+i+j+k+l+m+n+o+k U.;                             ",
+"        p+q+r+s+t+u+v+w+x+y+z+A+B+C+k E.D+                            ",
+"        E+F+G+H+I+J+K+L+M+N+O+P+Q+R+; k S+                            ",
+"    T+U+V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@                            ",
+"    ;@>@W+W+,@'@)@!@~@{@]@^@/@(@_@:@<@[@}@|@                          ",
+"    1@V+W+W+V+2@3@i.& 4@5@/ I.6@7@8@9@0@}@}@a@                        ",
+"    b@V+c@V+V+d@e@f@& I.I.& g@h@i@d@}@}@}@}@j@                        ",
+"  k@l@m@n@o@}@p@q@r@s@t@; ; ; u@v@o@w@n@x@                            ",
+"    y@z@A@B@C@D@E@F@- - - - - G@H@I@J@K@                              ",
+"              L@M@              N@O@P@                                ",
+"                                                                      "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/online.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,393 @@
+/* XPM */
+static char * online_xpm[] = {
+"35 32 358 2",
+"  	c None",
+". 	c #888887",
+"+ 	c #C6C6C4",
+"@ 	c #FEFEFD",
+"# 	c #FEFEFC",
+"$ 	c #F8F8F6",
+"% 	c #B7B7B6",
+"& 	c #FDFDFB",
+"* 	c #FEFEFE",
+"= 	c #DFDFDD",
+"- 	c #010103",
+"; 	c #020204",
+"> 	c #030304",
+", 	c #B2B2B0",
+"' 	c #FCFCFA",
+") 	c #FDFDFD",
+"! 	c #FDF8F8",
+"~ 	c #EDEDEC",
+"{ 	c #101012",
+"] 	c #282828",
+"^ 	c #91918F",
+"/ 	c #FCF8F6",
+"( 	c #FDE0E0",
+"_ 	c #FDE5E5",
+": 	c #CDBEBE",
+"< 	c #EDB2B2",
+"[ 	c #FC9E9E",
+"} 	c #FCCAC8",
+"| 	c #FCF6F4",
+"1 	c #0F0F10",
+"2 	c #272728",
+"3 	c #070708",
+"4 	c #FCD9D7",
+"5 	c #FB7878",
+"6 	c #FB7D7D",
+"7 	c #312323",
+"8 	c #D64949",
+"9 	c #F92727",
+"0 	c #F95251",
+"a 	c #EEB7B5",
+"b 	c #E8E5E3",
+"c 	c #E5E5E3",
+"d 	c #EBEBE9",
+"e 	c #030305",
+"f 	c #050506",
+"g 	c #0D0D0F",
+"h 	c #1D1D1E",
+"i 	c #010102",
+"j 	c #CDCDCB",
+"k 	c #C4C4C2",
+"l 	c #B3B3B1",
+"m 	c #BAB9B7",
+"n 	c #D09896",
+"o 	c #F64848",
+"p 	c #FA4242",
+"q 	c #070404",
+"r 	c #4F1C1C",
+"s 	c #F93131",
+"t 	c #EE3E3D",
+"u 	c #AD5B5A",
+"v 	c #7A6F6E",
+"w 	c #6D6D6C",
+"x 	c #303031",
+"y 	c #5A5858",
+"z 	c #040303",
+"A 	c #525253",
+"B 	c #99999A",
+"C 	c #545455",
+"D 	c #DDDDDB",
+"E 	c #C9C9C7",
+"F 	c #4B4B4B",
+"G 	c #303030",
+"H 	c #3B3434",
+"I 	c #803635",
+"J 	c #E23B3B",
+"K 	c #F84A4A",
+"L 	c #140A0A",
+"M 	c #693131",
+"N 	c #E23B3A",
+"O 	c #7F3535",
+"P 	c #AFAFAE",
+"Q 	c #A8A7A2",
+"R 	c #686251",
+"S 	c #CDCCC8",
+"T 	c #3B3B3D",
+"U 	c #838384",
+"V 	c #E3E3E1",
+"W 	c #AE5C5B",
+"X 	c #EE3E3E",
+"Y 	c #110707",
+"Z 	c #301616",
+"` 	c #F64847",
+" .	c #D09796",
+"..	c #6C675C",
+"+.	c #5E4608",
+"@.	c #B68F0B",
+"#.	c #DBCD8C",
+"$.	c #645822",
+"%.	c #5B5548",
+"&.	c #DDDDDC",
+"*.	c #D8D8D6",
+"=.	c #EFB8B7",
+"-.	c #F95252",
+";.	c #8C3030",
+">.	c #9B6B6B",
+",.	c #FB7877",
+"'.	c #795405",
+").	c #DCA50A",
+"!.	c #EEC816",
+"~.	c #F4D82A",
+"{.	c #E7C211",
+"].	c #6E5515",
+"^.	c #DEDEDD",
+"/.	c #FDF7F6",
+"(.	c #FCCACA",
+"_.	c #FCBDBD",
+":.	c #FDEAEA",
+"<.	c #FDE0DE",
+"[.	c #949493",
+"}.	c #5E4405",
+"|.	c #D5AC13",
+"1.	c #EECF1A",
+"2.	c #B08B0B",
+"3.	c #D9A40F",
+"4.	c #6E4F15",
+"5.	c #2B2B2D",
+"6.	c #141415",
+"7.	c #F5F5F3",
+"8.	c #919190",
+"9.	c #403E39",
+"0.	c #B99F61",
+"a.	c #C49114",
+"b.	c #AC7A16",
+"c.	c #CAC2B0",
+"d.	c #918D88",
+"e.	c #19191A",
+"f.	c #111111",
+"g.	c #F0F0EF",
+"h.	c #F7F7F5",
+"i.	c #979796",
+"j.	c #0C0C0E",
+"k.	c #8E8E8E",
+"l.	c #C8C8C7",
+"m.	c #C3C3C3",
+"n.	c #CBCACA",
+"o.	c #F3F3F2",
+"p.	c #6D6D6D",
+"q.	c #050507",
+"r.	c #C3C3C1",
+"s.	c #BABAB8",
+"t.	c #676768",
+"u.	c #EBEBEA",
+"v.	c #DDDDDD",
+"w.	c #F5F5F4",
+"x.	c #BEBEBD",
+"y.	c #1E1E1F",
+"z.	c #B7B7B7",
+"A.	c #F6F6F5",
+"B.	c #F2F2F1",
+"C.	c #EBEBEB",
+"D.	c #E3E3E2",
+"E.	c #E0E0DF",
+"F.	c #2C2C2D",
+"G.	c #101010",
+"H.	c #CECED0",
+"I.	c #E7E7EE",
+"J.	c #D4CBD9",
+"K.	c #C5A1B3",
+"L.	c #C08D9E",
+"M.	c #CBAEBA",
+"N.	c #C5B3C4",
+"O.	c #B6AABE",
+"P.	c #ACACB6",
+"Q.	c #09090B",
+"R.	c #A8A9AA",
+"S.	c #D7CBDA",
+"T.	c #CE92A2",
+"U.	c #BA676E",
+"V.	c #945B65",
+"W.	c #896271",
+"X.	c #9B5D66",
+"Y.	c #BC6267",
+"Z.	c #B6585E",
+"`.	c #A08AA0",
+" +	c #1F1F23",
+".+	c #131313",
+"++	c #2D2D2E",
+"@+	c #B2ACB6",
+"#+	c #D28691",
+"$+	c #BD4F50",
+"%+	c #874A55",
+"&+	c #AAA5B5",
+"*+	c #D5D8E3",
+"=+	c #C3BFCB",
+"-+	c #A27A85",
+";+	c #8A4148",
+">+	c #958497",
+",+	c #C4C5C8",
+"'+	c #0F0F0F",
+")+	c #040406",
+"!+	c #868685",
+"~+	c #D7A8B3",
+"{+	c #CD5B5E",
+"]+	c #A73639",
+"^+	c #8D626F",
+"/+	c #E0E0E8",
+"(+	c #F8F8F8",
+"_+	c #D3D0D7",
+":+	c #B0A6B1",
+"<+	c #CCCCD7",
+"[+	c #CBCCCB",
+"}+	c #828283",
+"|+	c #D58184",
+"1+	c #C4484A",
+"2+	c #A73539",
+"3+	c #966A7A",
+"4+	c #E2E2EA",
+"5+	c #EEEFF2",
+"6+	c #D7D1DF",
+"7+	c #D4C8D9",
+"8+	c #D0C2D4",
+"9+	c #D6CEDC",
+"0+	c #C2C3C6",
+"a+	c #060503",
+"b+	c #060504",
+"c+	c #858585",
+"d+	c #C7797C",
+"e+	c #BE4143",
+"f+	c #B43A3D",
+"g+	c #A26372",
+"h+	c #DBD7E2",
+"i+	c #C7BED3",
+"j+	c #BF7D85",
+"k+	c #CC7075",
+"l+	c #CC676B",
+"m+	c #B0595F",
+"n+	c #715862",
+"o+	c #B88409",
+"p+	c #B48B09",
+"q+	c #827D6C",
+"r+	c #BBA0AD",
+"s+	c #AB4248",
+"t+	c #B93D3E",
+"u+	c #A83F49",
+"v+	c #B38FA6",
+"w+	c #D7D5E3",
+"x+	c #C2AFBC",
+"y+	c #BB6166",
+"z+	c #9E3235",
+"A+	c #724847",
+"B+	c #8D8B7A",
+"C+	c #474747",
+"D+	c #E5AE0A",
+"E+	c #F5BC0B",
+"F+	c #A28009",
+"G+	c #777167",
+"H+	c #9C7180",
+"I+	c #993940",
+"J+	c #AD3A3C",
+"K+	c #B35864",
+"L+	c #BB90A4",
+"M+	c #C99EAA",
+"N+	c #A75156",
+"O+	c #793E47",
+"P+	c #9D7428",
+"Q+	c #BD980B",
+"R+	c #040405",
+"S+	c #403305",
+"T+	c #CAA80A",
+"U+	c #E7AE0C",
+"V+	c #EDB40A",
+"W+	c #F4BC0B",
+"X+	c #EDBC0B",
+"Y+	c #433707",
+"Z+	c #46434F",
+"`+	c #5A4050",
+" @	c #8C5460",
+".@	c #792D32",
+"+@	c #7A363B",
+"@@	c #7C4A52",
+"#@	c #8A6672",
+"$@	c #99919E",
+"%@	c #C39532",
+"&@	c #D19C0A",
+"*@	c #765208",
+"=@	c #765406",
+"-@	c #CD9F09",
+";@	c #D1A10A",
+">@	c #ECB40C",
+",@	c #F3BC0B",
+"'@	c #C3A20B",
+")@	c #131106",
+"!@	c #48484D",
+"~@	c #DED9DD",
+"{@	c #CFC4C4",
+"]@	c #C9BCBC",
+"^@	c #D0C9C9",
+"/@	c #E1DFE3",
+"(@	c #DFE0E2",
+"_@	c #C39634",
+":@	c #E9B10A",
+"<@	c #DEA308",
+"[@	c #E5AA0A",
+"}@	c #F2B90B",
+"|@	c #ECB60B",
+"1@	c #E9AF0A",
+"2@	c #F4BD0C",
+"3@	c #F5BD0C",
+"4@	c #AC861E",
+"5@	c #F8F8F7",
+"6@	c #F5F5F5",
+"7@	c #EEEEED",
+"8@	c #626263",
+"9@	c #996D0B",
+"0@	c #EDBB0B",
+"a@	c #F3BB0B",
+"b@	c #EDB70B",
+"c@	c #785804",
+"d@	c #F4BD0B",
+"e@	c #E2B818",
+"f@	c #B8AE99",
+"g@	c #B9B9B8",
+"h@	c #B6B6B6",
+"i@	c #696969",
+"j@	c #946708",
+"k@	c #F4BB0B",
+"l@	c #E6AF0A",
+"m@	c #AA8107",
+"n@	c #8A6205",
+"o@	c #CD9408",
+"p@	c #DDA20A",
+"q@	c #E4AA09",
+"r@	c #EDB40B",
+"s@	c #F4BA0C",
+"t@	c #DCA10B",
+"u@	c #6C4705",
+"v@	c #060607",
+"w@	c #080809",
+"x@	c #906406",
+"y@	c #ECB30A",
+"z@	c #F3B90B",
+"A@	c #ECB20A",
+"B@	c #D69C09",
+"C@	c #895E05",
+"D@	c #AF7D07",
+"E@	c #C78F08",
+"F@	c #D09609",
+"G@	c #AB7307",
+"H@	c #503303",
+"I@	c #7C4F03",
+"J@	c #C88F09",
+"K@	c #D29708",
+"L@	c #AD7706",
+"M@	c #523702",
+"N@	c #573904",
+"O@	c #523505",
+"P@	c #704A06",
+"Q@	c #553A04",
+"                                                                      ",
+"                                                                      ",
+"                                            . + @ @ @ @ # $ .         ",
+"                                          % & & * * * * * # & =       ",
+"                      - - ; >           , ' & & * * ) ! ! & & & ~     ",
+"                    - - - { ] >       ^ & & & / ( _ : < [ } | & & &   ",
+"                  - - - - 1 2 3       ^ & & & 4 5 6 7 8 9 0 a b c d   ",
+"                  e f - - g h - i     j k l m n o p q r s t u v w .   ",
+"                  x y z A B C - -   D E F G H I J K L M K N O H G F   ",
+"                  P Q R S T U - -   & V . w v W X s Y Z p `  .m l k   ",
+"                  ..+.@.#.$.%.- - & &.*.d c b =.-.9 ;.>.6 ,.4 & & &   ",
+"                  '.).!.~.{.].- -       ^.& & /.(.[ _.:._ <./ & & [.  ",
+"                  }.|.1.2.3.4.5.6.        7.& # ) ! ! ) @ # & & 8.    ",
+"                  9.0.a.b.c.d.e.f.i         g.h.# * * * # & g.i.      ",
+"                j.k.l.m.n.o.& p.q.-             r.r.r.r.r.s.          ",
+"              i t.& u.v.w.& & x.y.- -                                 ",
+"              - z.A.B.C.A.g.D.E.F.- - -                               ",
+"            - G.H.I.J.K.L.M.N.O.P.Q.e.-                               ",
+"            ; R.S.T.U.V.W.X.Y.Z.`. +.+; -                             ",
+"          > ++@+#+$+%+&+*+=+-+;+>+,+'+)+-                             ",
+"          ; !+~+{+]+^+/+& (+_+:+<+[+- - -                             ",
+"        i ; }+|+1+2+3+4+5+6+7+8+9+0+- - - -                           ",
+"        a+b+c+d+e+f+g+h+i+j+k+l+m+n+f f )+-                           ",
+"        o+p+q+r+s+t+u+v+w+x+y+z+A+B+- - C+                            ",
+"        D+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+- S+T+                          ",
+"    U+V+W+E+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@                          ",
+"    >@W+W+E+,@'@)@!@~@{@]@^@/@(@_@:@<@[@}@|@                          ",
+"    1@2@3@W+2@2@4@u.& 5@6@' 7@8@9@0@a@W+W+W+b@                        ",
+"  c@V+W+W+d@W+3@e@f@g@s.% h@i@- j@W+W+W+k@l@m@                        ",
+"  n@o@p@q@r@k@s@t@u@v@w@; - - - x@y@z@A@B@                            ",
+"        C@D@E@F@G@H@            I@J@K@L@M@                            ",
+"              N@O@                P@Q@                                "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/palette.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,129 @@
+/* XPM */
+static char * palette_xpm[] = {
+"16 16 110 2",
+"  	c None",
+". 	c #45454F",
+"+ 	c #494850",
+"@ 	c #C0C1C6",
+"# 	c #E8EAE9",
+"$ 	c #FEFDFB",
+"% 	c #FCFEFD",
+"& 	c #6F6E74",
+"* 	c #3F414D",
+"= 	c #EFEFF1",
+"- 	c #FFFFFF",
+"; 	c #ECBFFF",
+"> 	c #FFFDFF",
+", 	c #6C6D72",
+"' 	c #FFFFFD",
+") 	c #F4F3F1",
+"! 	c #D473FF",
+"~ 	c #CE5EFE",
+"{ 	c #FFFEFF",
+"] 	c #FEFFFF",
+"^ 	c #545760",
+"/ 	c #FDFDFB",
+"( 	c #F9F7FA",
+"_ 	c #BC1CFF",
+": 	c #B912FE",
+"< 	c #FEFFFD",
+"[ 	c #73777A",
+"} 	c #4F4B5A",
+"| 	c #FCFCFA",
+"1 	c #FDFBFC",
+"2 	c #FEFEFF",
+"3 	c #FEFEFE",
+"4 	c #FFFDFE",
+"5 	c #7E7E86",
+"6 	c #A2A1A6",
+"7 	c #F2F2F0",
+"8 	c #FBFDFA",
+"9 	c #909195",
+"0 	c #ADACB1",
+"a 	c #FFFCFD",
+"b 	c #7690FE",
+"c 	c #F2F3F5",
+"d 	c #9F9EA4",
+"e 	c #FEFFFB",
+"f 	c #373741",
+"g 	c #080A17",
+"h 	c #DDDDDD",
+"i 	c #FBFFFE",
+"j 	c #99ABFD",
+"k 	c #123EF9",
+"l 	c #DBE3FA",
+"m 	c #FDFFFE",
+"n 	c #BEBCC1",
+"o 	c #FCFAFD",
+"p 	c #FFFFFB",
+"q 	c #474751",
+"r 	c #595963",
+"s 	c #A7A8AC",
+"t 	c #EBF1FF",
+"u 	c #7890FC",
+"v 	c #FDFCFF",
+"w 	c #EFF1EE",
+"x 	c #FDFFFC",
+"y 	c #A09DA4",
+"z 	c #64646C",
+"A 	c #514F5A",
+"B 	c #EDEDED",
+"C 	c #FFFBFA",
+"D 	c #FFFEFC",
+"E 	c #F6F6F4",
+"F 	c #EAFFEE",
+"G 	c #FCFDFF",
+"H 	c #FEB6B7",
+"I 	c #FFFCFB",
+"J 	c #FEFEFC",
+"K 	c #E2FEE7",
+"L 	c #26FA50",
+"M 	c #6AFB86",
+"N 	c #FCFAFB",
+"O 	c #FBF5F9",
+"P 	c #FAFCFB",
+"Q 	c #FDC6C3",
+"R 	c #FA0605",
+"S 	c #FB696C",
+"T 	c #F9BD77",
+"U 	c #FA9426",
+"V 	c #0BF934",
+"W 	c #F3FDF4",
+"X 	c #FCFCFC",
+"Y 	c #86898E",
+"Z 	c #DBDDDC",
+"` 	c #F3F3F5",
+" .	c #FDDEDC",
+"..	c #FDF9F8",
+"+.	c #FB850A",
+"@.	c #FBCA92",
+"#.	c #FCFFFF",
+"$.	c #F9FAFC",
+"%.	c #E3E3E3",
+"&.	c #A9AAAF",
+"*.	c #F8F8FA",
+"=.	c #F9FBFA",
+"-.	c #F9F9F9",
+";.	c #E3E5E4",
+">.	c #85848C",
+",.	c #BABEC1",
+"'.	c #F7F9F6",
+").	c #EAE8EB",
+"!.	c #F4F4F2",
+"~.	c #88898E",
+"            . +                 ",
+"          @ # $ % &             ",
+"        * = - - ; > -           ",
+"        , ' ) ! ~ { ' ]         ",
+"        ^ / ( _ : { < - - [     ",
+"        } | 1 2 ' 3 { - 4 - 5   ",
+"  6 2 7 8 ] - 9 0 { a ' b { c   ",
+"d e 2 - { 2 { f g h i j k l m n ",
+"o < { - p ] m q r s 1 t u v - w ",
+"- ] - - x ' y z A B 2 { x { - C ",
+"] - ' D { - - E | ] - - - F ] G ",
+"3 ] { ] 4 H I ] { ] J { K L M N ",
+"  O % P Q R S ] - T U J i V W X ",
+"  Y Z ` C  ...' J +.@.#.{ { J $.",
+"    %.&.*.4 2 { ] > ' 2 ] =.-.;.",
+"      >.,.| '.N 8 - { ] 4 ).!.~."};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/peng_frown.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,312 @@
+/* XPM */
+static char * peng_frown_xpm[] = {
+"32 32 277 2",
+"  	c None",
+". 	c #000000",
+"+ 	c #030000",
+"@ 	c #020202",
+"# 	c #040404",
+"$ 	c #040001",
+"% 	c #010000",
+"& 	c #1B1B1B",
+"* 	c #393939",
+"= 	c #181820",
+"- 	c #080808",
+"; 	c #090909",
+"> 	c #2B2B2B",
+", 	c #666666",
+"' 	c #656565",
+") 	c #2C2C32",
+"! 	c #0A0A0A",
+"~ 	c #050505",
+"{ 	c #353535",
+"] 	c #787878",
+"^ 	c #737376",
+"/ 	c #3E3E40",
+"( 	c #1E1E1E",
+"_ 	c #030303",
+": 	c #363636",
+"< 	c #5A5A5E",
+"[ 	c #444444",
+"} 	c #272727",
+"| 	c #1A1A1A",
+"1 	c #212121",
+"2 	c #0F0F0F",
+"3 	c #010101",
+"4 	c #0B0B0B",
+"5 	c #0A0A09",
+"6 	c #060606",
+"7 	c #292929",
+"8 	c #121212",
+"9 	c #141414",
+"0 	c #11110D",
+"a 	c #454545",
+"b 	c #171719",
+"c 	c #4A4A4A",
+"d 	c #4E4E50",
+"e 	c #141415",
+"f 	c #28282F",
+"g 	c #0C0C0C",
+"h 	c #848486",
+"i 	c #939392",
+"j 	c #9B9B9A",
+"k 	c #919191",
+"l 	c #171717",
+"m 	c #262626",
+"n 	c #0D0D0E",
+"o 	c #6A6A6E",
+"p 	c #B2B2B2",
+"q 	c #B3B3B4",
+"r 	c #747478",
+"s 	c #0D0D0D",
+"t 	c #212129",
+"u 	c #8F8F8F",
+"v 	c #ADADAD",
+"w 	c #B8B8B8",
+"x 	c #C5C5C4",
+"y 	c #C5C5C5",
+"z 	c #757575",
+"A 	c #39393A",
+"B 	c #A9A9AD",
+"C 	c #D3D3D3",
+"D 	c #E5E5E6",
+"E 	c #DBDBDC",
+"F 	c #75757D",
+"G 	c #0B0B0C",
+"H 	c #868688",
+"I 	c #DCDCDC",
+"J 	c #EBEBEB",
+"K 	c #E3E3E3",
+"L 	c #E6E6E6",
+"M 	c #D7D7D7",
+"N 	c #A6A6A6",
+"O 	c #6D6D6F",
+"P 	c #EFEFEF",
+"Q 	c #6A6A6A",
+"R 	c #7E7E7E",
+"S 	c #E4E4E4",
+"T 	c #E1E1E1",
+"U 	c #181818",
+"V 	c #D2D2D2",
+"W 	c #F7F7F7",
+"X 	c #A4A4A4",
+"Y 	c #565656",
+"Z 	c #727272",
+"` 	c #CECECE",
+" .	c #F1F1F1",
+"..	c #848484",
+"+.	c #6B6B6B",
+"@.	c #626262",
+"#.	c #414141",
+"$.	c #111115",
+"%.	c #1B1B1F",
+"&.	c #171718",
+"*.	c #D0D0D6",
+"=.	c #E2E2E2",
+"-.	c #646464",
+";.	c #ECECEC",
+">.	c #191919",
+",.	c #8C8C8E",
+"'.	c #6F6F6F",
+").	c #5B5B5B",
+"!.	c #4E4E4E",
+"~.	c #EDEDED",
+"{.	c #424242",
+"].	c #101011",
+"^.	c #242425",
+"/.	c #232323",
+"(.	c #939393",
+"_.	c #DADADA",
+":.	c #E9E9E9",
+"<.	c #3B3B3B",
+"[.	c #6B6B70",
+"}.	c #6C6C6C",
+"|.	c #373631",
+"1.	c #E2D8B7",
+"2.	c #795212",
+"3.	c #7C5208",
+"4.	c #7F5616",
+"5.	c #8A6626",
+"6.	c #59492A",
+"7.	c #8A8A8A",
+"8.	c #C9C9C9",
+"9.	c #010100",
+"0.	c #8C6E35",
+"a.	c #9B6A08",
+"b.	c #B97F0A",
+"c.	c #BA8008",
+"d.	c #BB7E09",
+"e.	c #B47609",
+"f.	c #AF7408",
+"g.	c #A5741F",
+"h.	c #0E0B00",
+"i.	c #B7B7B7",
+"j.	c #B2A78C",
+"k.	c #916A29",
+"l.	c #9E6B08",
+"m.	c #C89609",
+"n.	c #DCA909",
+"o.	c #D89E0A",
+"p.	c #D89809",
+"q.	c #D7970C",
+"r.	c #D08F0E",
+"s.	c #C7890C",
+"t.	c #A27316",
+"u.	c #605005",
+"v.	c #594614",
+"w.	c #F8F8F8",
+"x.	c #736D63",
+"y.	c #5E4304",
+"z.	c #895F06",
+"A.	c #806705",
+"B.	c #CD9209",
+"C.	c #D6970C",
+"D.	c #D6970B",
+"E.	c #CF9108",
+"F.	c #BD8C2D",
+"G.	c #E0BA2E",
+"H.	c #A48229",
+"I.	c #292008",
+"J.	c #3D2A01",
+"K.	c #F0BD0D",
+"L.	c #F1C916",
+"M.	c #EED030",
+"N.	c #E5CA1D",
+"O.	c #D4BC07",
+"P.	c #C3A705",
+"Q.	c #9A7504",
+"R.	c #DDA307",
+"S.	c #DEA30B",
+"T.	c #D09512",
+"U.	c #79570D",
+"V.	c #A9860C",
+"W.	c #110D00",
+"X.	c #302103",
+"Y.	c #F0B60A",
+"Z.	c #F2C415",
+"`.	c #F2C40E",
+" +	c #F4D112",
+".+	c #E6CB21",
+"++	c #E6CC17",
+"@+	c #E1C910",
+"#+	c #E0C808",
+"$+	c #C6AD0E",
+"%+	c #B59405",
+"&+	c #D9A007",
+"*+	c #DEA708",
+"=+	c #D99D0B",
+"-+	c #876006",
+";+	c #171101",
+">+	c #76540C",
+",+	c #DF9F0C",
+"'+	c #EDB30D",
+")+	c #F4BE0B",
+"!+	c #F3C10C",
+"~+	c #F0CD14",
+"{+	c #EACE10",
+"]+	c #E9CC3E",
+"^+	c #E6CC3C",
+"/+	c #E1C90D",
+"(+	c #DFC707",
+"_+	c #E0C80D",
+":+	c #CDB20E",
+"<+	c #D9A006",
+"[+	c #B7860A",
+"}+	c #110C01",
+"|+	c #6A4B05",
+"1+	c #C1880E",
+"2+	c #DB9C10",
+"3+	c #EBB10D",
+"4+	c #F6B90C",
+"5+	c #F1C008",
+"6+	c #F0C910",
+"7+	c #F1D116",
+"8+	c #E8CD22",
+"9+	c #E8CC49",
+"0+	c #E9CC30",
+"a+	c #E1C912",
+"b+	c #E0C707",
+"c+	c #D3AC10",
+"d+	c #C79B0D",
+"e+	c #171001",
+"f+	c #8B6006",
+"g+	c #C88E0C",
+"h+	c #E6AE0D",
+"i+	c #F1B90D",
+"j+	c #EFBC0C",
+"k+	c #F0C410",
+"l+	c #F0CF14",
+"m+	c #E4CA12",
+"n+	c #E8CC35",
+"o+	c #EBCC32",
+"p+	c #E7CD36",
+"q+	c #E3CA15",
+"r+	c #E0C809",
+"s+	c #E4CB10",
+"t+	c #E9C227",
+"u+	c #BD891E",
+"v+	c #D7A00C",
+"w+	c #EDB50D",
+"x+	c #F2BC0F",
+"y+	c #F0C310",
+"z+	c #EFCB0E",
+"A+	c #EACF0F",
+"B+	c #E9CC29",
+"C+	c #EBCD2E",
+"D+	c #E8CC42",
+"E+	c #E5CB1A",
+"F+	c #E0C608",
+"G+	c #D7B709",
+"H+	c #7E5B07",
+"I+	c #D9A20B",
+"J+	c #E9B10C",
+"K+	c #F2C40F",
+"L+	c #EDC80E",
+"M+	c #E8CA10",
+"N+	c #DBB31B",
+"O+	c #D4B91F",
+"P+	c #EDCA12",
+"Q+	c #C0A40E",
+"R+	c #553C01",
+"S+	c #D6A309",
+"T+	c #F2C108",
+"U+	c #E2B907",
+"V+	c #D2A914",
+"W+	c #C19009",
+"X+	c #B28F06",
+"Y+	c #504213",
+"Z+	c #4E3D02",
+"`+	c #423202",
+" @	c #433510",
+"                      . . . . . . . .                           ",
+"                  . . . . . . . . . . . . +                     ",
+"              . . . . . . . . . . . . @ # $ % .                 ",
+"            . . . . . . . . . . . . # & * = - . .               ",
+"          . . . . . . . . . . . . . ; > , ' ) ! . .             ",
+"          . . . . . . . . . . . . . ~ { ] ^ / ( _ . .           ",
+"        . . . . . . . . . . . . . . ; : < [ } | ~ . .           ",
+"        . . . . . . . . . . . . . . - ( 1 2 # @ . . . .         ",
+"        . . . . . . . . . . . . . . _ # @ . . . . . . .         ",
+"      . . . . . . . . . . . . . . . . . . . . . . . . .         ",
+"      . . . 3 @ - ! . . . . . . . 3 - 4 5 ; . . . . . . .       ",
+"      . . 3 ! 6 4 7 8 . . . . _ 3 . 9 ! 0 a 8 . . . . . .       ",
+"      . . @ b c d e f g . . # . 7 h i j k l m 6 . . . . .       ",
+"      . . n o p q r 1 s . . . t u v w x y z 8 # . . . . .       ",
+"      . . A B C D E F 3 . . G H I J K L M N m . . . . . .       ",
+"      . . O P Q R S T 9 . ~ U V W X Y Z `  .... . . . . . .     ",
+"        . ..Q g +.@.P #.$.%.&.*.=.U ; -.c ;.` >.. . . . .       ",
+"        . ,.'.. ).!.~.{.].^./.` (.@ . g ! _.:.<.. . . . .       ",
+"        . [.}.. U |.1.2.3.4.5.6.7.. . . . 8.:.<.. . . . .       ",
+"        . | w >.9.0.a.b.c.d.e.f.g.h.. . . I :.<.. . . .         ",
+"        . g i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.w.R . . . . .         ",
+"        . . x.y.z.A.A.A.A.A.A.B.C.D.E.F.G.H.I.. . . .           ",
+"        .   J.A.A.K.L.M.N.O.P.A.Q.A.R.S.T.U.V.W.. . .           ",
+"          X.A.A.Y.Z.`. +.+++@+#+$+%+A.&+*+=+-+;+. .             ",
+"          >+A.,+'+)+!+~+{+]+^+/+(+_+:+A.A.<+[+}+                ",
+"          |+1+2+3+4+5+6+7+8+9+0+a+@+_+b+A.c+d+                  ",
+"          e+f+g+h+i+j+k+l+m+n+o+p+q+r+#+s+t+                    ",
+"              u+v+w+x+y+z+A+B+C+D+E+F+G+                        ",
+"                H+I+J+K+L+M+N+O+P+Q+                            ",
+"                  R+S+T+U+V+W+X+                                ",
+"                      Y+Z+`+ @                                  ",
+"                                                                "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/peng_smile.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,330 @@
+/* XPM */
+static char * peng_smile_xpm[] = {
+"32 32 295 2",
+"  	c None",
+". 	c #000000",
+"+ 	c #030000",
+"@ 	c #020202",
+"# 	c #040404",
+"$ 	c #040001",
+"% 	c #010000",
+"& 	c #1B1B1B",
+"* 	c #393939",
+"= 	c #181820",
+"- 	c #080808",
+"; 	c #090909",
+"> 	c #2B2B2B",
+", 	c #666666",
+"' 	c #656565",
+") 	c #2C2C32",
+"! 	c #0A0A0A",
+"~ 	c #050505",
+"{ 	c #353535",
+"] 	c #787878",
+"^ 	c #737376",
+"/ 	c #3E3E40",
+"( 	c #1E1E1E",
+"_ 	c #030303",
+": 	c #363636",
+"< 	c #5A5A5E",
+"[ 	c #444444",
+"} 	c #272727",
+"| 	c #1A1A1A",
+"1 	c #212121",
+"2 	c #0F0F0F",
+"3 	c #010101",
+"4 	c #0B0B0B",
+"5 	c #0A0A09",
+"6 	c #060606",
+"7 	c #292929",
+"8 	c #121212",
+"9 	c #141414",
+"0 	c #11110D",
+"a 	c #454545",
+"b 	c #171719",
+"c 	c #4A4A4A",
+"d 	c #4E4E50",
+"e 	c #141415",
+"f 	c #28282F",
+"g 	c #0C0C0C",
+"h 	c #848486",
+"i 	c #939392",
+"j 	c #9B9B9A",
+"k 	c #919191",
+"l 	c #171717",
+"m 	c #262626",
+"n 	c #0D0D0E",
+"o 	c #6A6A6E",
+"p 	c #B2B2B2",
+"q 	c #B3B3B4",
+"r 	c #747478",
+"s 	c #0D0D0D",
+"t 	c #212129",
+"u 	c #8F8F8F",
+"v 	c #ADADAD",
+"w 	c #B8B8B8",
+"x 	c #C5C5C4",
+"y 	c #C5C5C5",
+"z 	c #757575",
+"A 	c #39393A",
+"B 	c #A9A9AD",
+"C 	c #D3D3D3",
+"D 	c #E5E5E6",
+"E 	c #DBDBDC",
+"F 	c #75757D",
+"G 	c #0B0B0C",
+"H 	c #868688",
+"I 	c #DCDCDC",
+"J 	c #EBEBEB",
+"K 	c #E3E3E3",
+"L 	c #E6E6E6",
+"M 	c #D7D7D7",
+"N 	c #A6A6A6",
+"O 	c #6D6D6F",
+"P 	c #EFEFEF",
+"Q 	c #6A6A6A",
+"R 	c #7E7E7E",
+"S 	c #E4E4E4",
+"T 	c #E1E1E1",
+"U 	c #181818",
+"V 	c #D2D2D2",
+"W 	c #F7F7F7",
+"X 	c #A4A4A4",
+"Y 	c #565656",
+"Z 	c #727272",
+"` 	c #CECECE",
+" .	c #F1F1F1",
+"..	c #848484",
+"+.	c #6B6B6B",
+"@.	c #626262",
+"#.	c #414141",
+"$.	c #111115",
+"%.	c #1B1B1F",
+"&.	c #171718",
+"*.	c #D0D0D6",
+"=.	c #E2E2E2",
+"-.	c #646464",
+";.	c #ECECEC",
+">.	c #191919",
+",.	c #8C8C8E",
+"'.	c #6F6F6F",
+").	c #5B5B5B",
+"!.	c #4E4E4E",
+"~.	c #EDEDED",
+"{.	c #424242",
+"].	c #101011",
+"^.	c #242425",
+"/.	c #232323",
+"(.	c #939393",
+"_.	c #DADADA",
+":.	c #E9E9E9",
+"<.	c #3B3B3B",
+"[.	c #6B6B70",
+"}.	c #6C6C6C",
+"|.	c #373631",
+"1.	c #E2D8B7",
+"2.	c #504213",
+"3.	c #4E3D02",
+"4.	c #423202",
+"5.	c #433510",
+"6.	c #979284",
+"7.	c #8A8A8A",
+"8.	c #C9C9C9",
+"9.	c #010100",
+"0.	c #553C01",
+"a.	c #D6A309",
+"b.	c #F2C108",
+"c.	c #E2B907",
+"d.	c #D2A914",
+"e.	c #C19009",
+"f.	c #B28F06",
+"g.	c #AB9A3B",
+"h.	c #0E0B00",
+"i.	c #B7B7B7",
+"j.	c #B2A78C",
+"k.	c #7E5B07",
+"l.	c #D9A20B",
+"m.	c #E9B10C",
+"n.	c #F2C40F",
+"o.	c #EDC80E",
+"p.	c #E8CA10",
+"q.	c #DBB31B",
+"r.	c #D4B91F",
+"s.	c #EDCA12",
+"t.	c #C0A40E",
+"u.	c #605005",
+"v.	c #594614",
+"w.	c #F8F8F8",
+"x.	c #736D63",
+"y.	c #BD891E",
+"z.	c #D7A00C",
+"A.	c #EDB50D",
+"B.	c #F2BC0F",
+"C.	c #F0C310",
+"D.	c #EFCB0E",
+"E.	c #EACF0F",
+"F.	c #E9CC29",
+"G.	c #EBCD2E",
+"H.	c #E8CC42",
+"I.	c #E5CB1A",
+"J.	c #E0C608",
+"K.	c #D7B709",
+"L.	c #E0BA2E",
+"M.	c #A48229",
+"N.	c #292008",
+"O.	c #171001",
+"P.	c #8B6006",
+"Q.	c #C88E0C",
+"R.	c #E6AE0D",
+"S.	c #F1B90D",
+"T.	c #EFBC0C",
+"U.	c #F0C410",
+"V.	c #F0CF14",
+"W.	c #E4CA12",
+"X.	c #E8CC35",
+"Y.	c #EBCC32",
+"Z.	c #E7CD36",
+"`.	c #E3CA15",
+" +	c #E0C809",
+".+	c #E0C808",
+"++	c #E4CB10",
+"@+	c #E9C227",
+"#+	c #A9860C",
+"$+	c #110D00",
+"%+	c #6A4B05",
+"&+	c #C1880E",
+"*+	c #DB9C10",
+"=+	c #EBB10D",
+"-+	c #F6B90C",
+";+	c #F1C008",
+">+	c #F0C910",
+",+	c #F1D116",
+"'+	c #E8CD22",
+")+	c #E8CC49",
+"!+	c #E9CC30",
+"~+	c #E1C912",
+"{+	c #E1C910",
+"]+	c #E0C80D",
+"^+	c #E0C707",
+"/+	c #CDB105",
+"(+	c #D3AC10",
+"_+	c #C79B0D",
+":+	c #171101",
+"<+	c #76540C",
+"[+	c #BE8809",
+"}+	c #DF9F0C",
+"|+	c #EDB30D",
+"1+	c #F4BE0B",
+"2+	c #F3C10C",
+"3+	c #F0CD14",
+"4+	c #EACE10",
+"5+	c #E9CC3E",
+"6+	c #E6CC3C",
+"7+	c #E1C90D",
+"8+	c #DFC707",
+"9+	c #CDB20E",
+"0+	c #C09A05",
+"a+	c #D09C03",
+"b+	c #D9A006",
+"c+	c #B7860A",
+"d+	c #110C01",
+"e+	c #302103",
+"f+	c #704A05",
+"g+	c #D79C0B",
+"h+	c #F0B60A",
+"i+	c #F2C415",
+"j+	c #F2C40E",
+"k+	c #F4D112",
+"l+	c #E6CB21",
+"m+	c #E6CC17",
+"n+	c #C6AD0E",
+"o+	c #B59405",
+"p+	c #C29002",
+"q+	c #D9A007",
+"r+	c #DEA708",
+"s+	c #D99D0B",
+"t+	c #876006",
+"u+	c #3D2A01",
+"v+	c #845E05",
+"w+	c #CB9B07",
+"x+	c #F0BD0D",
+"y+	c #F1C916",
+"z+	c #EED030",
+"A+	c #E5CA1D",
+"B+	c #D4BC07",
+"C+	c #C3A705",
+"D+	c #806705",
+"E+	c #9A7504",
+"F+	c #C28C02",
+"G+	c #DDA307",
+"H+	c #DEA30B",
+"I+	c #D09512",
+"J+	c #79570D",
+"K+	c #5E4304",
+"L+	c #895F06",
+"M+	c #A47D05",
+"N+	c #BD9904",
+"O+	c #AB8D08",
+"P+	c #C49F05",
+"Q+	c #AE8202",
+"R+	c #A87805",
+"S+	c #CD9209",
+"T+	c #D6970C",
+"U+	c #D6970B",
+"V+	c #CF9108",
+"W+	c #BD8C2D",
+"X+	c #916A29",
+"Y+	c #9E6B08",
+"Z+	c #C89609",
+"`+	c #DCA909",
+" @	c #D89E0A",
+".@	c #D89809",
+"+@	c #D7970C",
+"@@	c #D08F0E",
+"#@	c #C7890C",
+"$@	c #A27316",
+"%@	c #8C6E35",
+"&@	c #9B6A08",
+"*@	c #B97F0A",
+"=@	c #BA8008",
+"-@	c #BB7E09",
+";@	c #B47609",
+">@	c #AF7408",
+",@	c #A5741F",
+"'@	c #795212",
+")@	c #7C5208",
+"!@	c #7F5616",
+"~@	c #8A6626",
+"{@	c #59492A",
+"                      . . . . . . . .                           ",
+"                  . . . . . . . . . . . . +                     ",
+"              . . . . . . . . . . . . @ # $ % .                 ",
+"            . . . . . . . . . . . . # & * = - . .               ",
+"          . . . . . . . . . . . . . ; > , ' ) ! . .             ",
+"          . . . . . . . . . . . . . ~ { ] ^ / ( _ . .           ",
+"        . . . . . . . . . . . . . . ; : < [ } | ~ . .           ",
+"        . . . . . . . . . . . . . . - ( 1 2 # @ . . . .         ",
+"        . . . . . . . . . . . . . . _ # @ . . . . . . .         ",
+"      . . . . . . . . . . . . . . . . . . . . . . . . .         ",
+"      . . . 3 @ - ! . . . . . . . 3 - 4 5 ; . . . . . . .       ",
+"      . . 3 ! 6 4 7 8 . . . . _ 3 . 9 ! 0 a 8 . . . . . .       ",
+"      . . @ b c d e f g . . # . 7 h i j k l m 6 . . . . .       ",
+"      . . n o p q r 1 s . . . t u v w x y z 8 # . . . . .       ",
+"      . . A B C D E F 3 . . G H I J K L M N m . . . . . .       ",
+"      . . O P Q R S T 9 . ~ U V W X Y Z `  .... . . . . . .     ",
+"        . ..Q g +.@.P #.$.%.&.*.=.U ; -.c ;.` >.. . . . .       ",
+"        . ,.'.. ).!.~.{.].^./.` (.@ . g ! _.:.<.. . . . .       ",
+"        . [.}.. U |.1.2.3.4.5.6.7.. . . . 8.:.<.. . . . .       ",
+"        . | w >.9.0.a.b.c.d.e.f.g.h.. . . I :.<.. . . .         ",
+"        . g i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.w.R . . . . .         ",
+"        . . x.y.z.A.B.C.D.E.F.G.H.I.J.K.L.M.N.. . . .           ",
+"        . O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+++@+#+$+. . .           ",
+"          %+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+. .             ",
+"          <+[+}+|+1+2+3+4+5+6+7+8+]+9+0+a+b+c+d+                ",
+"          e+f+g+h+i+j+k+l+m+{+.+n+o+p+q+r+s+t+                  ",
+"            u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+J+                    ",
+"              K+L+M+N+O+P+Q+R+S+T+U+V+W+                        ",
+"                X+Y+Z+`+ @.@+@@@#@$@                            ",
+"                  %@&@*@=@-@;@>@,@                              ",
+"                      '@)@!@~@{@                                ",
+"                                                                "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/peng_wink.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,279 @@
+/* XPM */
+static char * peng_wink_xpm[] = {
+"32 32 244 2",
+"  	c None",
+". 	c #000000",
+"+ 	c #030000",
+"@ 	c #020202",
+"# 	c #040404",
+"$ 	c #040001",
+"% 	c #010000",
+"& 	c #1B1B1B",
+"* 	c #393939",
+"= 	c #181820",
+"- 	c #080808",
+"; 	c #090909",
+"> 	c #2B2B2B",
+", 	c #666666",
+"' 	c #656565",
+") 	c #2C2C32",
+"! 	c #0A0A0A",
+"~ 	c #050505",
+"{ 	c #353535",
+"] 	c #787878",
+"^ 	c #737376",
+"/ 	c #3E3E40",
+"( 	c #1E1E1E",
+"_ 	c #030303",
+": 	c #363636",
+"< 	c #5A5A5E",
+"[ 	c #444444",
+"} 	c #272727",
+"| 	c #1A1A1A",
+"1 	c #212121",
+"2 	c #0F0F0F",
+"3 	c #010101",
+"4 	c #060606",
+"5 	c #0B0B0B",
+"6 	c #292929",
+"7 	c #121212",
+"8 	c #171719",
+"9 	c #4A4A4A",
+"0 	c #4E4E50",
+"a 	c #141415",
+"b 	c #28282F",
+"c 	c #0C0C0C",
+"d 	c #0D0D0E",
+"e 	c #6A6A6E",
+"f 	c #B2B2B2",
+"g 	c #B3B3B4",
+"h 	c #747478",
+"i 	c #0D0D0D",
+"j 	c #39393A",
+"k 	c #A9A9AD",
+"l 	c #D3D3D3",
+"m 	c #E5E5E6",
+"n 	c #DBDBDC",
+"o 	c #75757D",
+"p 	c #0B0B0C",
+"q 	c #6D6D6F",
+"r 	c #EFEFEF",
+"s 	c #6A6A6A",
+"t 	c #7E7E7E",
+"u 	c #E4E4E4",
+"v 	c #E1E1E1",
+"w 	c #141414",
+"x 	c #848484",
+"y 	c #6B6B6B",
+"z 	c #626262",
+"A 	c #414141",
+"B 	c #111115",
+"C 	c #1B1B1F",
+"D 	c #8C8C8E",
+"E 	c #6F6F6F",
+"F 	c #5B5B5B",
+"G 	c #4E4E4E",
+"H 	c #EDEDED",
+"I 	c #424242",
+"J 	c #101011",
+"K 	c #242425",
+"L 	c #232323",
+"M 	c #6B6B70",
+"N 	c #6C6C6C",
+"O 	c #181818",
+"P 	c #373631",
+"Q 	c #E2D8B7",
+"R 	c #504213",
+"S 	c #4E3D02",
+"T 	c #423202",
+"U 	c #433510",
+"V 	c #B8B8B8",
+"W 	c #191919",
+"X 	c #010100",
+"Y 	c #553C01",
+"Z 	c #D6A309",
+"` 	c #F2C108",
+" .	c #E2B907",
+"..	c #D2A914",
+"+.	c #C19009",
+"@.	c #B28F06",
+"#.	c #AB9A3B",
+"$.	c #0E0B00",
+"%.	c #B7B7B7",
+"&.	c #B2A78C",
+"*.	c #7E5B07",
+"=.	c #D9A20B",
+"-.	c #E9B10C",
+";.	c #F2C40F",
+">.	c #EDC80E",
+",.	c #E8CA10",
+"'.	c #DBB31B",
+").	c #D4B91F",
+"!.	c #EDCA12",
+"~.	c #C0A40E",
+"{.	c #605005",
+"].	c #594614",
+"^.	c #736D63",
+"/.	c #BD891E",
+"(.	c #D7A00C",
+"_.	c #EDB50D",
+":.	c #F2BC0F",
+"<.	c #F0C310",
+"[.	c #EFCB0E",
+"}.	c #EACF0F",
+"|.	c #E9CC29",
+"1.	c #EBCD2E",
+"2.	c #E8CC42",
+"3.	c #E5CB1A",
+"4.	c #E0C608",
+"5.	c #D7B709",
+"6.	c #E0BA2E",
+"7.	c #A48229",
+"8.	c #292008",
+"9.	c #171001",
+"0.	c #8B6006",
+"a.	c #C88E0C",
+"b.	c #E6AE0D",
+"c.	c #F1B90D",
+"d.	c #EFBC0C",
+"e.	c #F0C410",
+"f.	c #F0CF14",
+"g.	c #E4CA12",
+"h.	c #E8CC35",
+"i.	c #EBCC32",
+"j.	c #E7CD36",
+"k.	c #E3CA15",
+"l.	c #E0C809",
+"m.	c #E0C808",
+"n.	c #E4CB10",
+"o.	c #C09A05",
+"p.	c #A9860C",
+"q.	c #110D00",
+"r.	c #6A4B05",
+"s.	c #C1880E",
+"t.	c #DB9C10",
+"u.	c #EBB10D",
+"v.	c #F6B90C",
+"w.	c #F1C008",
+"x.	c #F0C910",
+"y.	c #F1D116",
+"z.	c #E8CD22",
+"A.	c #E8CC49",
+"B.	c #E9CC30",
+"C.	c #E1C912",
+"D.	c #E1C910",
+"E.	c #E0C80D",
+"F.	c #E0C707",
+"G.	c #9A7504",
+"H.	c #C79B0D",
+"I.	c #171101",
+"J.	c #76540C",
+"K.	c #BE8809",
+"L.	c #DF9F0C",
+"M.	c #EDB30D",
+"N.	c #F4BE0B",
+"O.	c #F3C10C",
+"P.	c #F0CD14",
+"Q.	c #EACE10",
+"R.	c #E9CC3E",
+"S.	c #E6CC3C",
+"T.	c #E1C90D",
+"U.	c #DFC707",
+"V.	c #CDB20E",
+"W.	c #B7860A",
+"X.	c #110C01",
+"Y.	c #302103",
+"Z.	c #704A05",
+"`.	c #D79C0B",
+" +	c #F0B60A",
+".+	c #F2C415",
+"++	c #F2C40E",
+"@+	c #F4D112",
+"#+	c #E6CB21",
+"$+	c #E6CC17",
+"%+	c #C6AD0E",
+"&+	c #DEA708",
+"*+	c #D99D0B",
+"=+	c #876006",
+"-+	c #3D2A01",
+";+	c #845E05",
+">+	c #CB9B07",
+",+	c #F0BD0D",
+"'+	c #F1C916",
+")+	c #EED030",
+"!+	c #E5CA1D",
+"~+	c #D4BC07",
+"{+	c #C3A705",
+"]+	c #806705",
+"^+	c #DDA307",
+"/+	c #DEA30B",
+"(+	c #D09512",
+"_+	c #79570D",
+":+	c #5E4304",
+"<+	c #895F06",
+"[+	c #A47D05",
+"}+	c #BD9904",
+"|+	c #AB8D08",
+"1+	c #C49F05",
+"2+	c #AE8202",
+"3+	c #A87805",
+"4+	c #CD9209",
+"5+	c #D6970C",
+"6+	c #D6970B",
+"7+	c #CF9108",
+"8+	c #BD8C2D",
+"9+	c #916A29",
+"0+	c #9E6B08",
+"a+	c #C89609",
+"b+	c #DCA909",
+"c+	c #D89E0A",
+"d+	c #D89809",
+"e+	c #D7970C",
+"f+	c #D08F0E",
+"g+	c #C7890C",
+"h+	c #A27316",
+"i+	c #8C6E35",
+"j+	c #9B6A08",
+"k+	c #B97F0A",
+"l+	c #BA8008",
+"m+	c #BB7E09",
+"n+	c #B47609",
+"o+	c #AF7408",
+"p+	c #A5741F",
+"q+	c #795212",
+"r+	c #7C5208",
+"s+	c #7F5616",
+"t+	c #8A6626",
+"u+	c #59492A",
+"                      . . . . . . . .                           ",
+"                  . . . . . . . . . . . . +                     ",
+"              . . . . . . . . . . . . @ # $ % .                 ",
+"            . . . . . . . . . . . . # & * = - . .               ",
+"          . . . . . . . . . . . . . ; > , ' ) ! . .             ",
+"          . . . . . . . . . . . . . ~ { ] ^ / ( _ . .           ",
+"        . . . . . . . . . . . . . . ; : < [ } | ~ . .           ",
+"        . . . . . . . . . . . . . . - ( 1 2 # @ . . . .         ",
+"        . . . . . . . . . . . . . . _ # @ . . . . . . .         ",
+"      . . . . . . . . . . . . . . . . . . . . . . . . .         ",
+"      . . . 3 @ - ! . . . . . . . 3 - . . ; . . . . . . .       ",
+"      . . 3 ! 4 5 6 7 . . . . . . . . . . . . . . . . . .       ",
+"      . . @ 8 9 0 a b c . . # . . . . . . . . . . . . . .       ",
+"      . . d e f g h 1 i . . . . . . . . . . . . . . . . .       ",
+"      . . j k l m n o 3 . . p . . . . . . . . . . . . . .       ",
+"      . . q r s t u v w . ~ . . . . . . . . . . . . . . . .     ",
+"        . x s c y z r A B C . . . . . . . . . . . . . . .       ",
+"        . D E . F G H I J K L . . . . . . . . . . . . . .       ",
+"        . M N . O P Q R S T U . . . . . . . . . . . . . .       ",
+"        . | V W X Y Z `  ...+.@.#.$.. . . . . . . . . .         ",
+"        . c %.&.*.=.-.;.>.,.'.).!.~.{.].. . . . . . . .         ",
+"        . . ^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.. . . .           ",
+"        . 9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.. . .           ",
+"          r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.o.G.H.I.. .             ",
+"          J.K.L.M.N.O.P.Q.R.S.T.U.E.V.G.G.o.W.X.                ",
+"          Y.Z.`. +.+++@+#+$+D.m.%+o.G.o.&+*+=+                  ",
+"            -+;+>+,+'+)+!+~+{+]+G.G.^+/+(+_+                    ",
+"              :+<+[+}+|+1+2+3+4+5+6+7+8+                        ",
+"                9+0+a+b+c+d+e+f+g+h+                            ",
+"                  i+j+k+l+m+n+o+p+                              ",
+"                      q+r+s+t+u+                                ",
+"                                                                "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/permadd.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,470 @@
+/* XPM */
+static char * permadd_xpm[] = {
+"52 45 422 2",
+"  	c None",
+". 	c #FF1717",
+"+ 	c #FF1616",
+"@ 	c #FF1515",
+"# 	c #B31A19",
+"$ 	c #C11D1B",
+"% 	c #FF1414",
+"& 	c #FF1313",
+"* 	c #FA1313",
+"= 	c #FE1313",
+"- 	c #B51B19",
+"; 	c #C91E1C",
+"> 	c #FF1212",
+", 	c #F61111",
+"' 	c #F21111",
+") 	c #F51212",
+"! 	c #A21817",
+"~ 	c #B21A19",
+"{ 	c #FB1212",
+"] 	c #E21010",
+"^ 	c #D40F0F",
+"/ 	c #670809",
+"( 	c #250405",
+"_ 	c #180305",
+": 	c #440607",
+"< 	c #8E0B0B",
+"[ 	c #C80E0E",
+"} 	c #D90F0F",
+"| 	c #DE0F0F",
+"1 	c #E61010",
+"2 	c #F91111",
+"3 	c #EB1111",
+"4 	c #F41212",
+"5 	c #B01B18",
+"6 	c #AC1918",
+"7 	c #F71111",
+"8 	c #C00D0D",
+"9 	c #1B0204",
+"0 	c #010103",
+"a 	c #040406",
+"b 	c #1B1B1C",
+"c 	c #240607",
+"d 	c #8A0909",
+"e 	c #EA1010",
+"f 	c #EF1212",
+"g 	c #C41D1A",
+"h 	c #C51E1B",
+"i 	c #BE1C1A",
+"j 	c #AB1917",
+"k 	c #841412",
+"l 	c #821412",
+"m 	c #AE1A17",
+"n 	c #8C1514",
+"o 	c #D30F0F",
+"p 	c #4B0506",
+"q 	c #080809",
+"r 	c #4A4A4A",
+"s 	c #171717",
+"t 	c #1C0204",
+"u 	c #9B0B0B",
+"v 	c #ED1212",
+"w 	c #DA1010",
+"x 	c #C31D1A",
+"y 	c #CA1E1C",
+"z 	c #C31E1B",
+"A 	c #B21B18",
+"B 	c #A11817",
+"C 	c #931615",
+"D 	c #9C1715",
+"E 	c #B81C19",
+"F 	c #8A1413",
+"G 	c #120304",
+"H 	c #030304",
+"I 	c #070608",
+"J 	c #000002",
+"K 	c #C20D0D",
+"L 	c #F71212",
+"M 	c #F31212",
+"N 	c #EA1111",
+"O 	c #70100F",
+"P 	c #851413",
+"Q 	c #140305",
+"R 	c #070708",
+"S 	c #0D0D0E",
+"T 	c #020203",
+"U 	c #141315",
+"V 	c #141415",
+"W 	c #060606",
+"X 	c #390405",
+"Y 	c #F21212",
+"Z 	c #DF1010",
+"` 	c #CC0F0F",
+" .	c #620E0E",
+"..	c #871413",
+"+.	c #241516",
+"@.	c #AFAFAF",
+"#.	c #5A5858",
+"$.	c #484849",
+"%.	c #B8B8B7",
+"&.	c #919191",
+"*.	c #0C0C0D",
+"=.	c #260304",
+"-.	c #E51111",
+";.	c #D61010",
+">.	c #C90F0F",
+",.	c #8F1514",
+"'.	c #A51817",
+").	c #6E5E5F",
+"!.	c #656565",
+"~.	c #0F0F10",
+"{.	c #B1B0B0",
+"].	c #383839",
+"^.	c #9B9B9A",
+"/.	c #343435",
+"(.	c #280404",
+"_.	c #E21111",
+":.	c #DB1010",
+"<.	c #B70D0D",
+"[.	c #BF0E0E",
+"}.	c #D81010",
+"|.	c #D10F0F",
+"1.	c #640F0E",
+"2.	c #6B100E",
+"3.	c #645556",
+"4.	c #353231",
+"5.	c #8D7330",
+"6.	c #B28D08",
+"7.	c #B8A04F",
+"8.	c #15130E",
+"9.	c #6F6F70",
+"0.	c #404041",
+"a.	c #2A0405",
+"b.	c #CF0F0F",
+"c.	c #DE1010",
+"d.	c #9A0B0B",
+"e.	c #780909",
+"f.	c #A60C0C",
+"g.	c #C80F0F",
+"h.	c #B00D0D",
+"i.	c #271411",
+"j.	c #D5AA4A",
+"k.	c #FFC70B",
+"l.	c #FFDB0F",
+"m.	c #FEDE2D",
+"n.	c #EBC70F",
+"o.	c #D7BC4C",
+"p.	c #29220F",
+"q.	c #DD1010",
+"r.	c #900A0A",
+"s.	c #D00F0F",
+"t.	c #D31010",
+"u.	c #522F06",
+"v.	c #ECAB09",
+"w.	c #FFD40C",
+"x.	c #FFE61F",
+"y.	c #FFE320",
+"z.	c #E5C10D",
+"A.	c #CE9C09",
+"B.	c #3E2F05",
+"C.	c #FC1313",
+"D.	c #E41111",
+"E.	c #C40E0E",
+"F.	c #920B0B",
+"G.	c #EC1111",
+"H.	c #DC0F0F",
+"I.	c #1C0A07",
+"J.	c #AD872C",
+"K.	c #F7C711",
+"L.	c #F6CC0F",
+"M.	c #CD9A09",
+"N.	c #C7900F",
+"O.	c #C4A357",
+"P.	c #E71111",
+"Q.	c #E31111",
+"R.	c #CA0F0F",
+"S.	c #AA0C0C",
+"T.	c #8B0A0A",
+"U.	c #C60F0F",
+"V.	c #D51010",
+"W.	c #AB0D0D",
+"X.	c #1B0E0F",
+"Y.	c #C7C3BB",
+"Z.	c #C69E48",
+"`.	c #C68909",
+" +	c #BE8D2F",
+".+	c #BEB49E",
+"++	c #E01111",
+"@+	c #B10D0D",
+"#+	c #910B0B",
+"$+	c #700E0F",
+"%+	c #757575",
+"&+	c #FFFFFF",
+"*+	c #DEDDDC",
+"=+	c #D1D0CF",
+"-+	c #D4D4D3",
+";+	c #D41010",
+">+	c #C00E0E",
+",+	c #870A0A",
+"'+	c #FFFEFD",
+")+	c #060102",
+"!+	c #E91111",
+"~+	c #D91010",
+"{+	c #0A0205",
+"]+	c #6F6F6F",
+"^+	c #FD1313",
+"/+	c #0A0102",
+"(+	c #F81212",
+"_+	c #350507",
+":+	c #020205",
+"<+	c #A5A5A5",
+"[+	c #EE1212",
+"}+	c #3B3B3C",
+"|+	c #0E0E0F",
+"1+	c #1E0304",
+"2+	c #FB1313",
+"3+	c #111112",
+"4+	c #212122",
+"5+	c #E4E4E3",
+"6+	c #B8B8B8",
+"7+	c #0B0B0D",
+"8+	c #151415",
+"9+	c #030305",
+"0+	c #7C0A0B",
+"a+	c #171718",
+"b+	c #9B9B9B",
+"c+	c #F9F9F7",
+"d+	c #E8E8E7",
+"e+	c #565656",
+"f+	c #242423",
+"g+	c #330405",
+"h+	c #331516",
+"i+	c #19191B",
+"j+	c #FCFCFA",
+"k+	c #FBFBF9",
+"l+	c #A2A2A1",
+"m+	c #050506",
+"n+	c #171617",
+"o+	c #010102",
+"p+	c #0F0204",
+"q+	c #121213",
+"r+	c #6E6E6F",
+"s+	c #FBFBFA",
+"t+	c #D0D0CF",
+"u+	c #131314",
+"v+	c #1C0306",
+"w+	c #29292A",
+"x+	c #FAFAF9",
+"y+	c #D6D6D4",
+"z+	c #101011",
+"A+	c #480506",
+"B+	c #F9F9F8",
+"C+	c #DCDCDA",
+"D+	c #060608",
+"E+	c #450506",
+"F+	c #F4F4F3",
+"G+	c #CBCBCA",
+"H+	c #09090A",
+"I+	c #0A0A0B",
+"J+	c #0D0D0F",
+"K+	c #EECE68",
+"L+	c #DAB51E",
+"M+	c #0F0B03",
+"N+	c #020204",
+"O+	c #262113",
+"P+	c #C50E0E",
+"Q+	c #910A0A",
+"R+	c #FF7D14",
+"S+	c #FFFFFD",
+"T+	c #E4BA43",
+"U+	c #D6A209",
+"V+	c #120D03",
+"W+	c #030203",
+"X+	c #6B5306",
+"Y+	c #85530B",
+"Z+	c #CE0F0F",
+"`+	c #FF8010",
+" @	c #080709",
+".@	c #8D8D8D",
+"+@	c #FAFAF8",
+"@@	c #DADAD8",
+"#@	c #D5A939",
+"$@	c #DDA508",
+"%@	c #976906",
+"&@	c #6D4B05",
+"*@	c #8C6305",
+"=@	c #B88B07",
+"-@	c #AF7609",
+";@	c #AF0C0C",
+">@	c #FEC90C",
+",@	c #1E1704",
+"'@	c #C9C9C8",
+")@	c #DBDBDB",
+"!@	c #BF9532",
+"~@	c #E8AF09",
+"{@	c #DAA008",
+"]@	c #CD9507",
+"^@	c #D09D08",
+"/@	c #D4A309",
+"(@	c #CC9D0A",
+"_@	c #AD5B0A",
+":@	c #FFD60C",
+"<@	c #FFCE0C",
+"[@	c #AA8709",
+"}@	c #373635",
+"|@	c #DCDCDB",
+"1@	c #F5F5F3",
+"2@	c #F4F4F2",
+"3@	c #F3F3F2",
+"4@	c #F2F2F0",
+"5@	c #878786",
+"6@	c #A07107",
+"7@	c #E6AE09",
+"8@	c #EBB40A",
+"9@	c #E5B00A",
+"0@	c #E3AF0A",
+"a@	c #DFAC0A",
+"b@	c #D9A809",
+"c@	c #D3A20A",
+"d@	c #DC900E",
+"e@	c #FF2617",
+"f@	c #F11212",
+"g@	c #FFCB0B",
+"h@	c #FFC60B",
+"i@	c #FABF0B",
+"j@	c #E1B30A",
+"k@	c #BFAB76",
+"l@	c #E1E1E0",
+"m@	c #E0E0DE",
+"n@	c #555455",
+"o@	c #986C06",
+"p@	c #D8A509",
+"q@	c #E8B20B",
+"r@	c #E4B00A",
+"s@	c #E0AD0A",
+"t@	c #F6BC0C",
+"u@	c #FDB20D",
+"v@	c #FF2213",
+"w@	c #BC0E0E",
+"x@	c #F7BE0C",
+"y@	c #EBB50A",
+"z@	c #DDAA0A",
+"A@	c #D09F09",
+"B@	c #90690A",
+"C@	c #585550",
+"D@	c #898989",
+"E@	c #838383",
+"F@	c #505050",
+"G@	c #080502",
+"H@	c #875E05",
+"I@	c #C89909",
+"J@	c #DCA909",
+"K@	c #E6B10A",
+"L@	c #E6B10B",
+"M@	c #E4AF0B",
+"N@	c #E1A80A",
+"O@	c #E0780F",
+"P@	c #F02810",
+"Q@	c #BA0E0E",
+"R@	c #A00C0C",
+"S@	c #B20D0D",
+"T@	c #CE9608",
+"U@	c #CF9B09",
+"V@	c #CC9B09",
+"W@	c #C69808",
+"X@	c #BE9209",
+"Y@	c #B38607",
+"Z@	c #7E5604",
+"`@	c #150E02",
+" #	c #000001",
+".#	c #0B0702",
+"+#	c #775104",
+"@#	c #BE8E09",
+"##	c #DFAA0A",
+"$#	c #E3AD0B",
+"%#	c #D59D09",
+"&#	c #C26E09",
+"*#	c #CC0F0E",
+"=#	c #B50D0D",
+"-#	c #9D0B0B",
+";#	c #BF120D",
+">#	c #903707",
+",#	c #874A05",
+"'#	c #875A06",
+")#	c #8B6205",
+"!#	c #896306",
+"~#	c #755103",
+"{#	c #4B2E02",
+"]#	c #290803",
+"^#	c #300805",
+"/#	c #593A03",
+"(#	c #A37106",
+"_#	c #BF8A07",
+":#	c #B58007",
+"<#	c #A64708",
+"[#	c #AD0C0C",
+"}#	c #A50C0C",
+"|#	c #512803",
+"1#	c #4A2403",
+"2#	c #651807",
+"3#	c #673804",
+"4#	c #774505",
+"5#	c #9C2D0A",
+"6#	c #C60F0E",
+"7#	c #B90D0D",
+"8#	c #970B0B",
+"9#	c #C90E0E",
+"0#	c #C70E0E",
+"a#	c #CD0E0E",
+"b#	c #BA0D0D",
+"c#	c #980B0B",
+"d#	c #D70F0F",
+"e#	c #DA0F0F",
+"f#	c #CA0E0E",
+"g#	c #E11010",
+"h#	c #A30C0C",
+"i#	c #8C0A0A",
+"j#	c #B60D0D",
+"k#	c #CE0E0E",
+"l#	c #D10E0E",
+"m#	c #A20C0C",
+"n#	c #7D0909",
+"o#	c #E81111",
+"                                                                                                        ",
+"                                                                                                        ",
+"                                                                                                        ",
+"                                  . . + @ @ @ @ @                                         # $           ",
+"                        . . + @ + . + @ % @ % % & * = %                                   - ;           ",
+"                    . . . . @ % % + % & & % & > , ' > & * )                               ! ~           ",
+"                  . . . @ % { ] ^     / ( _ : <   [ } | 1 2 3 4                           5 6           ",
+"                . . . % 7 8         9 0 0 0 a b c       d [ e * f                   g h h i j k l m n   ",
+"              . . . & o           p 0 0 0 0 q r s t         u } v w v               x y z A B C D E F   ",
+"            + . . %               G 0 0 0 0 H I J J           K 7 L M N                   O P           ",
+"            + + &                 Q R S 0 T U V W J X       M & % & Y Z `                  ...          ",
+"        . . . &                   +.@.#.T $.%.&.*.J =.    + . + @ & -.Z ;.>.              ,.'.          ",
+"      + . . %                     ).!.%.~.{.].^./.J (.  _.. . + % :.<.[.}.|.              1.2.          ",
+"      + @ %                       3.4.5.6.7.8.9.0.J a.b.& . + % c.d.  e.f.g.h.                          ",
+"    + + % |                       i.j.k.l.m.n.o.p.J q.L % @ & w d.      r.s.t.[.                        ",
+"    @ % &                         u.v.w.x.y.z.A.B.c.f C.) D.E.F.        h.;.G.t.                        ",
+"    % % H.                        I.J.K.L.M.N.O.c.P.G.Q.R.S.T.            U.c.V.W.                      ",
+"  + @ %                           X.Y.Z.`. +.+Z ++D.q.>.@+#+              g.|.D.[.                      ",
+"  @ + %                         $+%+&+*+=+-+_.Z Z Z ;+>+f.,+                U.Q.b.                      ",
+"  & & M                         S &+&+&+'+v _.Z Z q.t.>+)+                  s.!+~+                      ",
+"  * 7 >.                      {+]+&+&+&+^+v _.Z Z q.t.J J /+                f (+c.                      ",
+"  * M                       _+:+<+&+&+& C.[+Q.Z Z q.}+|+T J 1+              * ^+Z                       ",
+"  * 2+                      3+4+&+&+% & ) G.Q.Z Z 5+6+7+8+9+J               * ^+Z                       ",
+"  * &                     0+a+b+&+% % ^+f -.++Z Z c+d+e+f+V J g+            * ^+Z                       ",
+"  * &                     h+i+&+% & = ) G.Q.Z j+j+k+c+l+m+n+o+p+            * ^+Z                       ",
+"  * &                     q+r+@ % & ) v -.++Z k+s+j+k+t+0 u+o+J             * ^+Z                       ",
+"  * > >+                v+w+@ % & C.f -.++k+k+x+j+s+j+y+9+z+J J A+          * ^+Z                       ",
+"  * % -.                :++ @ % = 4 G.Q.j+x+B+k+j+k+j+C+D+~.J J E+          * ^+c.                      ",
+"  * % G.                % @ @ % = f -.F+k+x+s+s+k+j+k+G+*.H+I+J+            & & w                       ",
+"  * ^+Z               . + @ % & C.[+s+F+x+j+x+j+j+j+K+L+M+J N+O+          + @ % P+                      ",
+"  ) v }.Q+        R+. . . + % = 4 G.S+c+j+k+k+j+j+F+T+U+V+J W+X+Y+        @ + %                         ",
+"    Z+Z [       `+. . . + @ % =  @.@+@j+j+k+j+k+j+@@#@$@%@&@*@=@-@        % % Y                         ",
+"    g.~+| ;@    . + + + @ @ % >@,@9+'@j+k+x++@j+j+)@!@~@{@]@^@/@(@_@    . + % >.                        ",
+"      U.Z ^ ;+% . + @ % % & :@<@[@}@|@1@1@2@3@2@4@5@6@7@8@9@0@a@b@c@d@e@. . &                           ",
+"      g.~+f@C.@ + + @ & C.g@h@i@j@k@l@m@m@m@m@t+n@0 o@p@0@q@r@s@r@t@u@v@+ %                             ",
+"        w@U.Q.& % % % ) x@y@0@z@A@B@C@5@D@E@F@3+J G@H@I@J@K@L@M@N@O@P@* P.Q@                            ",
+"          R@S@>.}.Z c.T@U@V@W@X@Y@Z@`@ # # # # # #.#+#@###$#%#&#  *#R.=#r.                              ",
+"            -#S@E.;#  >#,#'#)#!#~#{#]#            ^#/#(#_#:#<#  =#[#}#r.                                ",
+"              -#S@>+8         |#1#                  2#3#4#5#6#7#[#}#8#                                  ",
+"                -#=#E.9#0#                                a#9#b#W.c#                                    ",
+"                  R@Q@d#e#e#f#                      & > 7 g#>+h#i#                                      ",
+"                    R@j#[.P+d#k#l#Y & % % % @ % % @ + + @ Z m#                                          ",
+"                          n#h.` o#@ % % % % @ @ % @ + @ V.                                              ",
+"                                d.Z+Q._.Z Z Z Z c.:.P+                                                  ",
+"                                                                                                        "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/permdel.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,454 @@
+/* XPM */
+static char * permdel_xpm[] = {
+"52 45 406 2",
+"  	c None",
+". 	c #FF1717",
+"+ 	c #FF1616",
+"@ 	c #FF1515",
+"# 	c #FF1414",
+"$ 	c #FF1313",
+"% 	c #FA1313",
+"& 	c #FE1313",
+"* 	c #FF1212",
+"= 	c #F61111",
+"- 	c #F21111",
+"; 	c #F51212",
+"> 	c #FB1212",
+", 	c #E21010",
+"' 	c #D40F0F",
+") 	c #670809",
+"! 	c #250405",
+"~ 	c #180305",
+"{ 	c #440607",
+"] 	c #8E0B0B",
+"^ 	c #C80E0E",
+"/ 	c #D90F0F",
+"( 	c #DE0F0F",
+"_ 	c #E61010",
+": 	c #F91111",
+"< 	c #EB1111",
+"[ 	c #F41212",
+"} 	c #F71111",
+"| 	c #C00D0D",
+"1 	c #1B0204",
+"2 	c #010103",
+"3 	c #040406",
+"4 	c #1B1B1C",
+"5 	c #240607",
+"6 	c #8A0909",
+"7 	c #EA1010",
+"8 	c #EF1212",
+"9 	c #C41D1A",
+"0 	c #C51E1B",
+"a 	c #BD1C1A",
+"b 	c #B11B18",
+"c 	c #AC1917",
+"d 	c #B91C19",
+"e 	c #BB1C19",
+"f 	c #8C1514",
+"g 	c #D30F0F",
+"h 	c #4B0506",
+"i 	c #080809",
+"j 	c #4A4A4A",
+"k 	c #171717",
+"l 	c #1C0204",
+"m 	c #9B0B0B",
+"n 	c #ED1212",
+"o 	c #DA1010",
+"p 	c #C31D1A",
+"q 	c #CA1E1C",
+"r 	c #C21D1B",
+"s 	c #AD1A18",
+"t 	c #A61917",
+"u 	c #B91B1A",
+"v 	c #BC1C1A",
+"w 	c #BE1C1A",
+"x 	c #8A1413",
+"y 	c #120304",
+"z 	c #030304",
+"A 	c #070608",
+"B 	c #000002",
+"C 	c #C20D0D",
+"D 	c #F71212",
+"E 	c #F31212",
+"F 	c #EA1111",
+"G 	c #140305",
+"H 	c #070708",
+"I 	c #0D0D0E",
+"J 	c #020203",
+"K 	c #141315",
+"L 	c #141415",
+"M 	c #060606",
+"N 	c #390405",
+"O 	c #F21212",
+"P 	c #DF1010",
+"Q 	c #CC0F0F",
+"R 	c #241516",
+"S 	c #AFAFAF",
+"T 	c #5A5858",
+"U 	c #484849",
+"V 	c #B8B8B7",
+"W 	c #919191",
+"X 	c #0C0C0D",
+"Y 	c #260304",
+"Z 	c #E51111",
+"` 	c #D61010",
+" .	c #C90F0F",
+"..	c #6E5E5F",
+"+.	c #656565",
+"@.	c #0F0F10",
+"#.	c #B1B0B0",
+"$.	c #383839",
+"%.	c #9B9B9A",
+"&.	c #343435",
+"*.	c #280404",
+"=.	c #E21111",
+"-.	c #DB1010",
+";.	c #B70D0D",
+">.	c #BF0E0E",
+",.	c #D81010",
+"'.	c #D10F0F",
+").	c #645556",
+"!.	c #353231",
+"~.	c #8D7330",
+"{.	c #B28D08",
+"].	c #B8A04F",
+"^.	c #15130E",
+"/.	c #6F6F70",
+"(.	c #404041",
+"_.	c #2A0405",
+":.	c #CF0F0F",
+"<.	c #DE1010",
+"[.	c #9A0B0B",
+"}.	c #780909",
+"|.	c #A60C0C",
+"1.	c #C80F0F",
+"2.	c #B00D0D",
+"3.	c #271411",
+"4.	c #D5AA4A",
+"5.	c #FFC70B",
+"6.	c #FFDB0F",
+"7.	c #FEDE2D",
+"8.	c #EBC70F",
+"9.	c #D7BC4C",
+"0.	c #29220F",
+"a.	c #DD1010",
+"b.	c #900A0A",
+"c.	c #D00F0F",
+"d.	c #D31010",
+"e.	c #522F06",
+"f.	c #ECAB09",
+"g.	c #FFD40C",
+"h.	c #FFE61F",
+"i.	c #FFE320",
+"j.	c #E5C10D",
+"k.	c #CE9C09",
+"l.	c #3E2F05",
+"m.	c #FC1313",
+"n.	c #E41111",
+"o.	c #C40E0E",
+"p.	c #920B0B",
+"q.	c #EC1111",
+"r.	c #DC0F0F",
+"s.	c #1C0A07",
+"t.	c #AD872C",
+"u.	c #F7C711",
+"v.	c #F6CC0F",
+"w.	c #CD9A09",
+"x.	c #C7900F",
+"y.	c #C4A357",
+"z.	c #E71111",
+"A.	c #E31111",
+"B.	c #CA0F0F",
+"C.	c #AA0C0C",
+"D.	c #8B0A0A",
+"E.	c #C60F0F",
+"F.	c #D51010",
+"G.	c #AB0D0D",
+"H.	c #1B0E0F",
+"I.	c #C7C3BB",
+"J.	c #C69E48",
+"K.	c #C68909",
+"L.	c #BE8D2F",
+"M.	c #BEB49E",
+"N.	c #E01111",
+"O.	c #B10D0D",
+"P.	c #910B0B",
+"Q.	c #700E0F",
+"R.	c #757575",
+"S.	c #FFFFFF",
+"T.	c #DEDDDC",
+"U.	c #D1D0CF",
+"V.	c #D4D4D3",
+"W.	c #D41010",
+"X.	c #C00E0E",
+"Y.	c #870A0A",
+"Z.	c #FFFEFD",
+"`.	c #060102",
+" +	c #E91111",
+".+	c #D91010",
+"++	c #0A0205",
+"@+	c #6F6F6F",
+"#+	c #FD1313",
+"$+	c #0A0102",
+"%+	c #F81212",
+"&+	c #350507",
+"*+	c #020205",
+"=+	c #A5A5A5",
+"-+	c #EE1212",
+";+	c #3B3B3C",
+">+	c #0E0E0F",
+",+	c #1E0304",
+"'+	c #FB1313",
+")+	c #111112",
+"!+	c #212122",
+"~+	c #E4E4E3",
+"{+	c #B8B8B8",
+"]+	c #0B0B0D",
+"^+	c #151415",
+"/+	c #030305",
+"(+	c #7C0A0B",
+"_+	c #171718",
+":+	c #9B9B9B",
+"<+	c #F9F9F7",
+"[+	c #E8E8E7",
+"}+	c #565656",
+"|+	c #242423",
+"1+	c #330405",
+"2+	c #331516",
+"3+	c #19191B",
+"4+	c #FCFCFA",
+"5+	c #FBFBF9",
+"6+	c #A2A2A1",
+"7+	c #050506",
+"8+	c #171617",
+"9+	c #010102",
+"0+	c #0F0204",
+"a+	c #121213",
+"b+	c #6E6E6F",
+"c+	c #FBFBFA",
+"d+	c #D0D0CF",
+"e+	c #131314",
+"f+	c #1C0306",
+"g+	c #29292A",
+"h+	c #FAFAF9",
+"i+	c #D6D6D4",
+"j+	c #101011",
+"k+	c #480506",
+"l+	c #F9F9F8",
+"m+	c #DCDCDA",
+"n+	c #060608",
+"o+	c #450506",
+"p+	c #F4F4F3",
+"q+	c #CBCBCA",
+"r+	c #09090A",
+"s+	c #0A0A0B",
+"t+	c #0D0D0F",
+"u+	c #EECE68",
+"v+	c #DAB51E",
+"w+	c #0F0B03",
+"x+	c #020204",
+"y+	c #262113",
+"z+	c #C50E0E",
+"A+	c #910A0A",
+"B+	c #FF7D14",
+"C+	c #FFFFFD",
+"D+	c #E4BA43",
+"E+	c #D6A209",
+"F+	c #120D03",
+"G+	c #030203",
+"H+	c #6B5306",
+"I+	c #85530B",
+"J+	c #CE0F0F",
+"K+	c #FF8010",
+"L+	c #080709",
+"M+	c #8D8D8D",
+"N+	c #FAFAF8",
+"O+	c #DADAD8",
+"P+	c #D5A939",
+"Q+	c #DDA508",
+"R+	c #976906",
+"S+	c #6D4B05",
+"T+	c #8C6305",
+"U+	c #B88B07",
+"V+	c #AF7609",
+"W+	c #AF0C0C",
+"X+	c #FEC90C",
+"Y+	c #1E1704",
+"Z+	c #C9C9C8",
+"`+	c #DBDBDB",
+" @	c #BF9532",
+".@	c #E8AF09",
+"+@	c #DAA008",
+"@@	c #CD9507",
+"#@	c #D09D08",
+"$@	c #D4A309",
+"%@	c #CC9D0A",
+"&@	c #AD5B0A",
+"*@	c #FFD60C",
+"=@	c #FFCE0C",
+"-@	c #AA8709",
+";@	c #373635",
+">@	c #DCDCDB",
+",@	c #F5F5F3",
+"'@	c #F4F4F2",
+")@	c #F3F3F2",
+"!@	c #F2F2F0",
+"~@	c #878786",
+"{@	c #A07107",
+"]@	c #E6AE09",
+"^@	c #EBB40A",
+"/@	c #E5B00A",
+"(@	c #E3AF0A",
+"_@	c #DFAC0A",
+":@	c #D9A809",
+"<@	c #D3A20A",
+"[@	c #DC900E",
+"}@	c #FF2617",
+"|@	c #F11212",
+"1@	c #FFCB0B",
+"2@	c #FFC60B",
+"3@	c #FABF0B",
+"4@	c #E1B30A",
+"5@	c #BFAB76",
+"6@	c #E1E1E0",
+"7@	c #E0E0DE",
+"8@	c #555455",
+"9@	c #986C06",
+"0@	c #D8A509",
+"a@	c #E8B20B",
+"b@	c #E4B00A",
+"c@	c #E0AD0A",
+"d@	c #F6BC0C",
+"e@	c #FDB20D",
+"f@	c #FF2213",
+"g@	c #BC0E0E",
+"h@	c #F7BE0C",
+"i@	c #EBB50A",
+"j@	c #DDAA0A",
+"k@	c #D09F09",
+"l@	c #90690A",
+"m@	c #585550",
+"n@	c #898989",
+"o@	c #838383",
+"p@	c #505050",
+"q@	c #080502",
+"r@	c #875E05",
+"s@	c #C89909",
+"t@	c #DCA909",
+"u@	c #E6B10A",
+"v@	c #E6B10B",
+"w@	c #E4AF0B",
+"x@	c #E1A80A",
+"y@	c #E0780F",
+"z@	c #F02810",
+"A@	c #BA0E0E",
+"B@	c #A00C0C",
+"C@	c #B20D0D",
+"D@	c #CE9608",
+"E@	c #CF9B09",
+"F@	c #CC9B09",
+"G@	c #C69808",
+"H@	c #BE9209",
+"I@	c #B38607",
+"J@	c #7E5604",
+"K@	c #150E02",
+"L@	c #000001",
+"M@	c #0B0702",
+"N@	c #775104",
+"O@	c #BE8E09",
+"P@	c #DFAA0A",
+"Q@	c #E3AD0B",
+"R@	c #D59D09",
+"S@	c #C26E09",
+"T@	c #CC0F0E",
+"U@	c #B50D0D",
+"V@	c #9D0B0B",
+"W@	c #BF120D",
+"X@	c #903707",
+"Y@	c #874A05",
+"Z@	c #875A06",
+"`@	c #8B6205",
+" #	c #896306",
+".#	c #755103",
+"+#	c #4B2E02",
+"@#	c #290803",
+"##	c #300805",
+"$#	c #593A03",
+"%#	c #A37106",
+"&#	c #BF8A07",
+"*#	c #B58007",
+"=#	c #A64708",
+"-#	c #AD0C0C",
+";#	c #A50C0C",
+">#	c #512803",
+",#	c #4A2403",
+"'#	c #651807",
+")#	c #673804",
+"!#	c #774505",
+"~#	c #9C2D0A",
+"{#	c #C60F0E",
+"]#	c #B90D0D",
+"^#	c #970B0B",
+"/#	c #C90E0E",
+"(#	c #C70E0E",
+"_#	c #CD0E0E",
+":#	c #BA0D0D",
+"<#	c #980B0B",
+"[#	c #D70F0F",
+"}#	c #DA0F0F",
+"|#	c #CA0E0E",
+"1#	c #E11010",
+"2#	c #A30C0C",
+"3#	c #8C0A0A",
+"4#	c #B60D0D",
+"5#	c #CE0E0E",
+"6#	c #D10E0E",
+"7#	c #A20C0C",
+"8#	c #7D0909",
+"9#	c #E81111",
+"                                                                                                        ",
+"                                                                                                        ",
+"                                                                                                        ",
+"                                  . . + @ @ @ @ @                                                       ",
+"                        . . + @ + . + @ # @ # # $ % & #                                                 ",
+"                    . . . . @ # # + # $ $ # $ * = - * $ % ;                                             ",
+"                  . . . @ # > , '     ) ! ~ { ]   ^ / ( _ : < [                                         ",
+"                . . . # } |         1 2 2 2 3 4 5       6 ^ 7 % 8                   9 0 a b c d d e f   ",
+"              . . . $ g           h 2 2 2 2 i j k l         m / n o n               p q r s t u v w x   ",
+"            + . . #               y 2 2 2 2 z A B B           C } D E F                                 ",
+"            + + $                 G H I 2 J K L M B N       E $ # $ O P Q                               ",
+"        . . . $                   R S T J U V W X B Y     + . + @ $ Z P `  .                            ",
+"      + . . #                     ..+.V @.#.$.%.&.B *.  =.. . + # -.;.>.,.'.                            ",
+"      + @ #                       ).!.~.{.].^./.(.B _.:.$ . + # <.[.  }.|.1.2.                          ",
+"    + + # (                       3.4.5.6.7.8.9.0.B a.D # @ $ o [.      b.c.d.>.                        ",
+"    @ # $                         e.f.g.h.i.j.k.l.<.8 m.; n.o.p.        2.` q.d.                        ",
+"    # # r.                        s.t.u.v.w.x.y.<.z.q.A.B.C.D.            E.<.F.G.                      ",
+"  + @ #                           H.I.J.K.L.M.P N.n.a. .O.P.              1.'.n.>.                      ",
+"  @ + #                         Q.R.S.T.U.V.=.P P P W.X.|.Y.                E.A.:.                      ",
+"  $ $ E                         I S.S.S.Z.n =.P P a.d.X.`.                  c. +.+                      ",
+"  % }  .                      ++@+S.S.S.#+n =.P P a.d.B B $+                8 %+<.                      ",
+"  % E                       &+*+=+S.S.$ m.-+A.P P a.;+>+J B ,+              % #+P                       ",
+"  % '+                      )+!+S.S.# $ ; q.A.P P ~+{+]+^+/+B               % #+P                       ",
+"  % $                     (+_+:+S.# # #+8 Z N.P P <+[+}+|+L B 1+            % #+P                       ",
+"  % $                     2+3+S.# $ & ; q.A.P 4+4+5+<+6+7+8+9+0+            % #+P                       ",
+"  % $                     a+b+@ # $ ; n Z N.P 5+c+4+5+d+2 e+9+B             % #+P                       ",
+"  % * X.                f+g+@ # $ m.8 Z N.5+5+h+4+c+4+i+/+j+B B k+          % #+P                       ",
+"  % # Z                 *++ @ # & [ q.A.4+h+l+5+4+5+4+m+n+@.B B o+          % #+<.                      ",
+"  % # q.                # @ @ # & 8 Z p+5+h+c+c+5+4+5+q+X r+s+t+            $ $ o                       ",
+"  % #+P               . + @ # $ m.-+c+p+h+4+h+4+4+4+u+v+w+B x+y+          + @ # z+                      ",
+"  ; n ,.A+        B+. . . + # & [ q.C+<+4+5+5+4+4+p+D+E+F+B G+H+I+        @ + #                         ",
+"    J+P ^       K+. . . + @ # & L+M+N+4+4+5+4+5+4+O+P+Q+R+S+T+U+V+        # # O                         ",
+"    1..+( W+    . + + + @ @ # X+Y+/+Z+4+5+h+N+4+4+`+ @.@+@@@#@$@%@&@    . + #  .                        ",
+"      E.P ' W.# . + @ # # $ *@=@-@;@>@,@,@'@)@'@!@~@{@]@^@/@(@_@:@<@[@}@. . $                           ",
+"      1..+|@m.@ + + @ $ m.1@2@3@4@5@6@7@7@7@7@d+8@2 9@0@(@a@b@c@b@d@e@f@+ #                             ",
+"        g@E.A.$ # # # ; h@i@(@j@k@l@m@~@n@o@p@)+B q@r@s@t@u@v@w@x@y@z@% z.A@                            ",
+"          B@C@ .,.P <.D@E@F@G@H@I@J@K@L@L@L@L@L@L@M@N@O@P@Q@R@S@  T@B.U@b.                              ",
+"            V@C@o.W@  X@Y@Z@`@ #.#+#@#            ##$#%#&#*#=#  U@-#;#b.                                ",
+"              V@C@X.|         >#,#                  '#)#!#~#{#]#-#;#^#                                  ",
+"                V@U@o./#(#                                _#/#:#G.<#                                    ",
+"                  B@A@[#}#}#|#                      $ * } 1#X.2#3#                                      ",
+"                    B@4#>.z+[#5#6#O $ # # # @ # # @ + + @ P 7#                                          ",
+"                          8#2.Q 9#@ # # # # @ @ # @ + @ F.                                              ",
+"                                [.J+A.=.P P P P <.-.z+                                                  ",
+"                                                                                                        "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/signing_on.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,546 @@
+/* XPM */
+static char * signing_on_xpm[] = {
+"34 32 511 2",
+"  	c None",
+". 	c #8E96FD",
+"+ 	c #929AFE",
+"@ 	c #969EFE",
+"# 	c #939BFE",
+"$ 	c #8B93FD",
+"% 	c #959DFD",
+"& 	c #A8ADFD",
+"* 	c #CBCFFD",
+"= 	c #CCD0FD",
+"- 	c #CFD2FE",
+"; 	c #CDD0FD",
+"> 	c #CBCEFD",
+", 	c #CED1FC",
+"' 	c #A4AAFD",
+") 	c #8C93FD",
+"! 	c #979FFD",
+"~ 	c #C7CBFC",
+"{ 	c #C6C9FD",
+"] 	c #C3C7FD",
+"^ 	c #C5C9FF",
+"/ 	c #C8CDFF",
+"( 	c #C4C8FF",
+"_ 	c #C3C7FE",
+": 	c #C9CDFD",
+"< 	c #CDD0FC",
+"[ 	c #C4C8FC",
+"} 	c #1B1E48",
+"| 	c #18193D",
+"1 	c #191B40",
+"2 	c #1C1F45",
+"3 	c #949CFD",
+"4 	c #C8CBFC",
+"5 	c #C7CAFC",
+"6 	c #BEC3FD",
+"7 	c #B8BDFD",
+"8 	c #B9BEFF",
+"9 	c #C0C6FE",
+"0 	c #B8BDFE",
+"a 	c #BBC0FE",
+"b 	c #C2C6FD",
+"c 	c #C5C9FC",
+"d 	c #CBCEFC",
+"e 	c #CACDFC",
+"f 	c #1D2151",
+"g 	c #0E0F26",
+"h 	c #0F1028",
+"i 	c #10112B",
+"j 	c #393A54",
+"k 	c #242753",
+"l 	c #CFD2FC",
+"m 	c #C8CBFD",
+"n 	c #C0C3FB",
+"o 	c #B9B6F5",
+"p 	c #ABADF9",
+"q 	c #A6ACFD",
+"r 	c #B6BDFE",
+"s 	c #A8A5F5",
+"t 	c #B8A5E5",
+"u 	c #BBAEEB",
+"v 	c #BFC2FA",
+"w 	c #C7CBFD",
+"x 	c #CED2FC",
+"y 	c #F4F5FC",
+"z 	c #33388E",
+"A 	c #0D0E24",
+"B 	c #0F1029",
+"C 	c #343551",
+"D 	c #1D1F3C",
+"E 	c #333885",
+"F 	c #C6CAFD",
+"G 	c #C1B2E9",
+"H 	c #C380B3",
+"I 	c #AA7CBE",
+"J 	c #8B85D7",
+"K 	c #B9BEEC",
+"L 	c #A787D2",
+"M 	c #CF537C",
+"N 	c #CF618A",
+"O 	c #BEA7DB",
+"P 	c #C0C3F2",
+"Q 	c #C8CBF3",
+"R 	c #F3F3FA",
+"S 	c #101227",
+"T 	c #0E0F27",
+"U 	c #0F112C",
+"V 	c #2F304C",
+"W 	c #141635",
+"X 	c #1F2356",
+"Y 	c #A4A9F1",
+"Z 	c #A9ABD5",
+"` 	c #A0A3D1",
+" .	c #B082AF",
+"..	c #D93E5A",
+"+.	c #A83856",
+"@.	c #56405C",
+"#.	c #898A8F",
+"$.	c #AE8EA6",
+"%.	c #BF2032",
+"&.	c #E12E3F",
+"*.	c #A56581",
+"=.	c #827F9C",
+"-.	c #898BA6",
+";.	c #E7E7EB",
+">.	c #737488",
+",.	c #1C1B30",
+"'.	c #292A43",
+").	c #797B94",
+"!.	c #8A8CA7",
+"~.	c #151737",
+"{.	c #141638",
+"].	c #4047B1",
+"^.	c #A8AEFC",
+"/.	c #9598B7",
+"(.	c #454759",
+"_.	c #3D3B4E",
+":.	c #763349",
+"<.	c #CF2640",
+"[.	c #B42C4D",
+"}.	c #835C65",
+"|.	c #A9A8A8",
+"1.	c #DFBEBF",
+"2.	c #CD3F4A",
+"3.	c #D82F3E",
+"4.	c #74313E",
+"5.	c #38333F",
+"6.	c #3F404D",
+"7.	c #D8D8D9",
+"8.	c #8A90E4",
+"9.	c #87889C",
+"0.	c #AFADBA",
+"a.	c #6F6D77",
+"b.	c #6D6E87",
+"c.	c #A1A3BD",
+"d.	c #171938",
+"e.	c #151738",
+"f.	c #4E55B1",
+"g.	c #C1C5FB",
+"h.	c #ADAFD2",
+"i.	c #6E708B",
+"j.	c #67637F",
+"k.	c #974E69",
+"l.	c #DE293C",
+"m.	c #B22130",
+"n.	c #543439",
+"o.	c #6F7079",
+"p.	c #C4B0C1",
+"q.	c #A72C46",
+"r.	c #DB354E",
+"s.	c #A979A0",
+"t.	c #9497BE",
+"u.	c #9EA1C3",
+"v.	c #EBEBF1",
+"w.	c #6C71C5",
+"x.	c #524843",
+"y.	c #81682D",
+"z.	c #C5AC5E",
+"A.	c #8B836B",
+"B.	c #847D7B",
+"C.	c #161835",
+"D.	c #8C8FAF",
+"E.	c #D6D9FC",
+"F.	c #B4B9F9",
+"G.	c #C1C5EE",
+"H.	c #BBBEED",
+"I.	c #C09CCA",
+"J.	c #D84F6D",
+"K.	c #D74263",
+"L.	c #D19CC0",
+"M.	c #ACB5FC",
+"N.	c #9792E4",
+"O.	c #AD6BA6",
+"P.	c #C76B9B",
+"Q.	c #BFAAE4",
+"R.	c #C4C8FD",
+"S.	c #CCCFFC",
+"T.	c #F4F4FC",
+"U.	c #5B548E",
+"V.	c #A17827",
+"W.	c #D8AE2E",
+"X.	c #DBC342",
+"Y.	c #DDC43E",
+"Z.	c #B99842",
+"`.	c #171833",
+" +	c #696EB0",
+".+	c #9EA5FD",
+"++	c #B3B9FD",
+"@+	c #C0C0F8",
+"#+	c #BEA2DD",
+"$+	c #C29ED4",
+"%+	c #B8B1F0",
+"&+	c #9CA4FE",
+"*+	c #9CA2FD",
+"=+	c #AFACF5",
+"-+	c #B8B0EF",
+";+	c #BDBFFA",
+">+	c #C5C9FD",
+",+	c #8D8D95",
+"'+	c #4C4A8E",
+")+	c #937225",
+"!+	c #D6B83B",
+"~+	c #C4A935",
+"{+	c #B5902F",
+"]+	c #B68B42",
+"^+	c #21223C",
+"/+	c #383A57",
+"(+	c #4A51B1",
+"_+	c #B2B7FD",
+":+	c #C4C7FC",
+"<+	c #C2C5FC",
+"[+	c #BBBFFE",
+"}+	c #AFB5FE",
+"|+	c #AEB3FF",
+"1+	c #B6BBFE",
+"2+	c #BFC4FD",
+"3+	c #C9CDFC",
+"4+	c #A2A8FD",
+"5+	c #393E8C",
+"6+	c #86838B",
+"7+	c #AD873D",
+"8+	c #B18432",
+"9+	c #A9937A",
+"0+	c #C5C0CE",
+"a+	c #34364F",
+"b+	c #20223E",
+"c+	c #22244B",
+"d+	c #BCC0FD",
+"e+	c #BDC2FE",
+"f+	c #BCC0FE",
+"g+	c #C6CBFC",
+"h+	c #A9AFFD",
+"i+	c #393F97",
+"j+	c #3F4053",
+"k+	c #ACADBF",
+"l+	c #B4B5C7",
+"m+	c #B8BACE",
+"n+	c #CCCDE2",
+"o+	c #E2E4F9",
+"p+	c #C0C2D8",
+"q+	c #1D1F3A",
+"r+	c #151735",
+"s+	c #474EB5",
+"t+	c #B4B9FD",
+"u+	c #B0B5FD",
+"v+	c #AEB3FD",
+"w+	c #B3B8FD",
+"x+	c #252638",
+"y+	c #A7A8B9",
+"z+	c #EBECFC",
+"A+	c #CBCDDF",
+"B+	c #D6D7EA",
+"C+	c #E5E6FA",
+"D+	c #E6E7FC",
+"E+	c #D4D6EC",
+"F+	c #5D5F79",
+"G+	c #131532",
+"H+	c #151839",
+"I+	c #303580",
+"J+	c #404152",
+"K+	c #CECFE0",
+"L+	c #E8E9F9",
+"M+	c #D7D9EA",
+"N+	c #DEDFF2",
+"O+	c #E0E1F5",
+"P+	c #D4D5EA",
+"Q+	c #CCCDE4",
+"R+	c #81839C",
+"S+	c #121430",
+"T+	c #141533",
+"U+	c #1D204A",
+"V+	c #343989",
+"W+	c #0F1024",
+"X+	c #545565",
+"Y+	c #D7D8EC",
+"Z+	c #D2D2ED",
+"`+	c #BDACCD",
+" @	c #B48CAF",
+".@	c #B996B6",
+"+@	c #B7A5C9",
+"@@	c #B2A6CD",
+"#@	c #9F9CC2",
+"$@	c #494C69",
+"%@	c #2B2D48",
+"&@	c #151634",
+"*@	c #3C428E",
+"=@	c #272B65",
+"-@	c #1E1F2F",
+";@	c #D7D6EA",
+">@	c #C5ACCC",
+",@	c #C27F99",
+"'@	c #9A5B72",
+")@	c #86617E",
+"!@	c #88607F",
+"~@	c #A0607A",
+"{@	c #B4627B",
+"]@	c #996B8E",
+"^@	c #535476",
+"/@	c #282A43",
+"(@	c #141630",
+"_@	c #171937",
+":@	c #222451",
+"<@	c #555565",
+"[@	c #CBB1CB",
+"}@	c #C36E83",
+"|@	c #9B4052",
+"1@	c #826F90",
+"2@	c #BCC0DD",
+"3@	c #C2C5E2",
+"4@	c #A69CBB",
+"5@	c #8D526D",
+"6@	c #845D7E",
+"7@	c #BCBCDC",
+"8@	c #42445B",
+"9@	c #171930",
+"0@	c #13152F",
+"a@	c #383D94",
+"b@	c #0A0A1A",
+"c@	c #CFCAD9",
+"d@	c #BF7790",
+"e@	c #BA4E60",
+"f@	c #812E41",
+"g@	c #A9A5C6",
+"h@	c #E8EAFA",
+"i@	c #E9EBFC",
+"j@	c #D9DBF1",
+"k@	c #ABA6C3",
+"l@	c #AEAAC8",
+"m@	c #D7DAF2",
+"n@	c #383A50",
+"o@	c #11132B",
+"p@	c #12132C",
+"q@	c #2F3473",
+"r@	c #181B41",
+"s@	c #0A0A19",
+"t@	c #CAC1CF",
+"u@	c #BC5162",
+"v@	c #B54556",
+"w@	c #853045",
+"x@	c #B2AECF",
+"y@	c #E2E4F5",
+"z@	c #D1D1EB",
+"A@	c #C7BFE0",
+"B@	c #C2B8DB",
+"C@	c #C3BBDC",
+"D@	c #D4D4ED",
+"E@	c #36374D",
+"F@	c #101228",
+"G@	c #11122A",
+"H@	c #0D0D18",
+"I@	c #0B0B19",
+"J@	c #CCC4D1",
+"K@	c #AD4658",
+"L@	c #B54354",
+"M@	c #9C374A",
+"N@	c #AA9BBE",
+"O@	c #D2D2EB",
+"P@	c #B393B1",
+"Q@	c #B9758C",
+"R@	c #C1697E",
+"S@	c #B16077",
+"T@	c #906480",
+"U@	c #252138",
+"V@	c #15162A",
+"W@	c #111228",
+"X@	c #13142D",
+"Y@	c #CA981E",
+"Z@	c #70591C",
+"`@	c #AEABB5",
+" #	c #A9738E",
+".#	c #A83F4F",
+"+#	c #AF4050",
+"@#	c #975373",
+"##	c #BEB9DB",
+"$#	c #C2C1DD",
+"%#	c #B2869E",
+"&#	c #A84256",
+"*#	c #7B3F51",
+"=#	c #8D8389",
+"-#	c #2A2B3B",
+";#	c #0E0F24",
+">#	c #313247",
+",#	c #7375B2",
+"'#	c #A28B84",
+")#	c #E3B01E",
+"!#	c #E8B51F",
+"~#	c #6C5C27",
+"{#	c #877B95",
+"]#	c #935872",
+"^#	c #9B3B4D",
+"/#	c #A94558",
+"(#	c #AD7594",
+"_#	c #BB9DBC",
+":#	c #B3768E",
+"<#	c #843D52",
+"[#	c #805D53",
+"}#	c #C29C2E",
+"|#	c #362F25",
+"1#	c #0E0F22",
+"2#	c #2D2824",
+"3#	c #B19629",
+"4#	c #AA8D73",
+"5#	c #DFAB1D",
+"6#	c #E4B01D",
+"7#	c #E9B61F",
+"8#	c #C9A41F",
+"9#	c #1E1F31",
+"0#	c #48405B",
+"a#	c #7E5E79",
+"b#	c #793C51",
+"c#	c #763345",
+"d#	c #774358",
+"e#	c #7F556E",
+"f#	c #8D7E99",
+"g#	c #A8957F",
+"h#	c #CD9C29",
+"i#	c #886625",
+"j#	c #715423",
+"k#	c #A27F25",
+"l#	c #DEB028",
+"m#	c #AA8C71",
+"n#	c #E6B21D",
+"o#	c #E8B61E",
+"p#	c #E9B51E",
+"q#	c #E0B11F",
+"r#	c #796A1D",
+"s#	c #0C0D1E",
+"t#	c #A2A2B4",
+"u#	c #C8C1D1",
+"v#	c #C1B6C4",
+"w#	c #C0B7C6",
+"x#	c #CAC7D8",
+"y#	c #D9DBED",
+"z#	c #C2B095",
+"A#	c #CC9C25",
+"B#	c #D2A024",
+"C#	c #D19F24",
+"D#	c #DEAC26",
+"E#	c #E3B327",
+"F#	c #C09F62",
+"G#	c #A5876E",
+"H#	c #E5B11C",
+"I#	c #E9B61D",
+"J#	c #CFA11F",
+"K#	c #B9A783",
+"L#	c #E9EAF5",
+"M#	c #EEEFFB",
+"N#	c #E7E8F5",
+"O#	c #EBECF9",
+"P#	c #E8E9F7",
+"Q#	c #B4B5C2",
+"R#	c #554328",
+"S#	c #CB9E23",
+"T#	c #E2B224",
+"U#	c #E4B225",
+"V#	c #E4B325",
+"W#	c #E4B326",
+"X#	c #E3B227",
+"Y#	c #B6996F",
+"Z#	c #B59156",
+"`#	c #E7B21C",
+" $	c #E9B51D",
+".$	c #E8B51E",
+"+$	c #E4B51F",
+"@$	c #C4AB5C",
+"#$	c #AFACB1",
+"$$	c #B3B4BF",
+"%$	c #B0B1BD",
+"&$	c #AEAFBC",
+"*$	c #0E0F1E",
+"=$	c #4B381D",
+"-$	c #CF9E22",
+";$	c #E6B423",
+">$	c #E5B423",
+",$	c #E4B324",
+"'$	c #E1AF24",
+")$	c #C29F5A",
+"!$	c #9A848D",
+"~$	c #AA823F",
+"{$	c #CA9419",
+"]$	c #D6A11B",
+"^$	c #DCA71B",
+"/$	c #E5B01D",
+"($	c #E2AD1E",
+"_$	c #B3811B",
+":$	c #2F2217",
+"<$	c #10111E",
+"[$	c #0C0D1B",
+"}$	c #0A0B19",
+"|$	c #0A0B1A",
+"1$	c #49361B",
+"2$	c #C99720",
+"3$	c #E3B022",
+"4$	c #E2AF22",
+"5$	c #D09D21",
+"6$	c #AB8A63",
+"7$	c #806C86",
+"8$	c #916817",
+"9$	c #B07F18",
+"0$	c #C4911B",
+"a$	c #BE881A",
+"b$	c #8A5D18",
+"c$	c #4D4882",
+"d$	c #625373",
+"e$	c #AB791D",
+"f$	c #C8941F",
+"g$	c #B4821F",
+"h$	c #86695C",
+"i$	c #654516",
+"j$	c #5B4F78",
+"k$	c #6C5764",
+"l$	c #735120",
+"                                                                    ",
+"                                                . + @ # $ $         ",
+"                                            % & * = - ; > , ' )     ",
+"                                          ! ~ { ] ^ / ( _ : < [     ",
+"                      } | 1 2           3 4 5 6 7 8 9 0 a b c d e   ",
+"                    f g h i j k         l m n o p q r s t u v w x y ",
+"                  z A g B i C D E       < F G H I J K L M N O P Q R ",
+"                  z S T B U V W X     Y Z `  ...+.@.#.$.%.&.*.=.-.;.",
+"                  z >.,.'.).!.~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.",
+"                  8.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.",
+"                  w.x.y.z.A.B.C.e.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.",
+"                  U.V.W.X.Y.Z.`.~. +.+  ++: @+#+$+%+&+*+=+-+;+>+< ,+",
+"                  '+)+!+~+{+]+^+/+(+      _+:+<+<+[+}+|+1+2+>+3+4+  ",
+"                  5+6+7+8+9+0+a+b+c+        d+: : _ e+f+2+F g+h+    ",
+"                i+j+k+l+m+n+o+p+q+r+s+          7 t+u+v+u+w+        ",
+"                x+y+z+A+B+C+D+E+F+G+H+                              ",
+"              I+J+K+L+M+N+O+P+Q+R+S+T+U+                            ",
+"            V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@                          ",
+"            =@-@;@>@,@'@)@!@~@{@]@^@/@(@_@                          ",
+"            :@<@[@}@|@1@2@3@4@5@6@7@8@9@0@                          ",
+"          a@b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@                        ",
+"          r@s@t@u@v@w@x@y@z@A@B@C@D@E@F@G@o@                        ",
+"          H@I@J@K@L@M@N@O@P@Q@R@S@T@U@V@W@X@                        ",
+"          Y@Z@`@ #.#+#@###$#%#&#*#=#-#;#>#,#                        ",
+"        '#)#!#~#{#]#^#/#(#_#:#<#[#}#|#1#2#3#                        ",
+"    4#5#6#7#!#8#9#0#a#b#c#d#e#f#g#h#i#j#k#l#                        ",
+"    m#n#o#p#!#q#r#s#t#u#v#w#x#y#z#A#B#C#D#E#F#                      ",
+"    G#H#I#o#o#!#J#K#L#M#N#O#P#Q#R#S#T#U#V#W#X#Y#                    ",
+"    Z#`# $I#I#.$+$@$#$$$%$&$&$*$=$-$;$>$,$'$)$!$                    ",
+"    ~${$]$^$/$.$($_$:$<$[$}$}$|$1$2$3$4$5$6$                        ",
+"        7$8$9$0$a$b$c$          d$e$f$g$h$                          ",
+"                i$j$              k$l$                              "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/small.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,28 @@
+/* XPM */
+static char *small_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"22 17 5 1",
+"  c Gray0",
+". c Gray40",
+"X c Magenta",
+"o c Gray60",
+"O c None",
+/* pixels */
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOO.o.o.OOOO",
+"OOOOOOOOOOOOOo.o.oOOOO",
+"OOOOOOOOOOOOO.o.o.OOOO",
+"OOOOOOO OOOOO  .  OOOO",
+"OOOOOOO OOOOO     OOOO",
+"OOOOOO   OOOO     OOOO",
+"OOOOOO O OOOOO   OOOOO",
+"OOOOO  O  OOOOO OOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO"
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/speaker.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,27 @@
+/* XPM */
+static char * speaker_xpm[] = {
+/* width height ncolors cpp [x_hot y_hot] */
+"16 16 5 1 0 0",
+/* colors */
+" 	s none	m none	c none",
+".	c #808080",
+"X	s iconColor2	m white	c white",
+"o	s iconColor6	m white	c yellow",
+"O	s iconColor1	m black	c black",
+/* pixels */
+"       ..      .",
+"      ..X.  .   ",
+"     .o.o.      ",
+"    .o.oXo.    .",
+"   .oo.XoX. ..  ",
+" ..oXX..Xo.     ",
+".X.XXX.XOX.     ",
+".o.ooo.XOo. ....",
+"....o...OX.     ",
+" OOo.o.OXo.     ",
+"   Oo..XXX. ..  ",
+"    O.OXXX.    .",
+"     O.OX.      ",
+"      OOXO  .   ",
+"       .O      .",
+"                "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/strike.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,22 @@
+/* XPM */
+static char * strike_xpm[] = {
+"22 17 2 1",
+" 	c None",
+".	c #000000",
+"                      ",
+"                      ",
+"                      ",
+"                      ",
+"       ........       ",
+"       ..    ..       ",
+"       ..             ",
+"       ..             ",
+"       .......        ",
+"   ................   ",
+"            ..        ",
+"            ..        ",
+"      ..    ..        ",
+"      ........        ",
+"                      ",
+"                      ",
+"                      "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/underline.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,22 @@
+/* XPM */
+static char * underline_xpm[] = {
+"22 17 2 1",
+" 	c None",
+".	c #000000",
+"                      ",
+"                      ",
+"                      ",
+"                      ",
+"       ..   ..        ",
+"       ..   ..        ",
+"       ..   ..        ",
+"       ..   ..        ",
+"       ..   ..        ",
+"       ..   ..        ",
+"       ..   ..        ",
+"        .. ..         ",
+"         ...          ",
+"                      ",
+"       .......        ",
+"                      ",
+"                      "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/wood.xpm	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,81 @@
+/* XPM */
+static char * wood_xpm[] = {
+"14 15 63 1",
+" 	c None",
+".	c #45060E",
+"+	c #47060C",
+"@	c #44050D",
+"#	c #44060B",
+"$	c #1E701E",
+"%	c #4F0D17",
+"&	c #5A212A",
+"*	c #4C1012",
+"=	c #350E13",
+"-	c #46050D",
+";	c #583839",
+">	c #480B10",
+",	c #58383B",
+"'	c #331016",
+")	c #5A373B",
+"!	c #47050F",
+"~	c #58383D",
+"{	c #4B0E15",
+"]	c #5B3938",
+"^	c #4D0C14",
+"/	c #56393B",
+"(	c #59393C",
+"_	c #48070F",
+":	c #86666B",
+"<	c #4C0D16",
+"[	c #490B10",
+"}	c #5A373D",
+"|	c #5B1F27",
+"1	c #4C0E13",
+"2	c #573939",
+"3	c #4A0D14",
+"4	c #4A0B14",
+"5	c #5B393A",
+"6	c #521419",
+"7	c #4A0D15",
+"8	c #5B373B",
+"9	c #331112",
+"0	c #59363A",
+"a	c #51141B",
+"b	c #583A3C",
+"c	c #320F13",
+"d	c #856767",
+"e	c #75474D",
+"f	c #53171D",
+"g	c #5A3839",
+"h	c #59393E",
+"i	c #49080C",
+"j	c #836668",
+"k	c #490810",
+"l	c #321011",
+"m	c #FEFEFE",
+"n	c #85656A",
+"o	c #450A10",
+"p	c #480610",
+"q	c #46080D",
+"r	c #F8F4F5",
+"s	c #FFFFFD",
+"t	c #490A13",
+"u	c #48070D",
+"v	c #350E11",
+"w	c #330E15",
+"x	c #470A0F",
+"              ",
+"          .+@#",
+"    $$   %&*=-",
+"    $;  >,'))!",
+"     ,~{,]^/(-",
+"     ~_:<[}|_ ",
+"     12345/   ",
+"    6,7890    ",
+"   abcdc;~    ",
+"  ef)g)hh     ",
+" i^9;(jk      ",
+" lmnopq       ",
+" lrstu        ",
+" vcwx         ",
+"              "};
Binary file sounds/BuddyArrive.au has changed
Binary file sounds/BuddyLeave.au has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sounds/Makefile.am	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,21 @@
+bin_PROGRAMS = au2h
+
+au2h_SOURCES = au2h.c
+
+EXTRA_DIST = BuddyArrive.au BuddyLeave.au Send.au Receive.au
+
+all: BuddyArrive.h BuddyLeave.h Send.h Receive.h
+
+BuddyArrive.h: au2h BuddyArrive.au
+	./au2h BuddyArrive.au BuddyArrive.h
+
+BuddyLeave.h: au2h BuddyLeave.au
+	./au2h BuddyLeave.au BuddyLeave.h
+
+Send.h: au2h Send.au                              
+	./au2h Send.au Send.h                  
+
+Receive.h: au2h Receive.au                              
+	./au2h Receive.au Receive.h                  
+
+
Binary file sounds/Receive.au has changed
Binary file sounds/Send.au has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sounds/au2h.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,41 @@
+#include <stdio.h>
+#if !(__GLIBC__ < 2)
+#include <error.h>
+#endif
+#include <fcntl.h>
+
+#define BUF_SIZE 10
+
+int main(int argc, char *argv[])
+{
+	int fd;
+	FILE *f;
+	int cnt;
+	int res,x;
+	char buf[BUF_SIZE];
+
+	fd = open(argv[1], O_RDONLY);
+	if (fd < 0) {
+		perror("open");
+		exit(1);
+	}
+	f = fopen(argv[2], "w+");
+	if (!f) {
+		perror("fopen");
+		exit(1);
+	}
+	argv[1][strlen(argv[1])-3]='\0';
+	fprintf(f, "static unsigned char %s[] = {\n", argv[1]);
+	read(fd, buf, 8); /* id & offset */
+	read(fd, buf, 8); /* len & encoding */
+	read(fd, buf, 8); /* rate & count */
+	/*  no more click :) */
+	
+	while((res = read(fd, buf, BUF_SIZE)) > 0) {
+		for (x=0;x<res;x++)
+			fprintf(f, "%#x, ", buf[x] & 0xff);
+		fprintf(f, "\n");
+	}
+	fprintf(f,"};\n");
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Makefile.am	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,13 @@
+bin_PROGRAMS = gaim
+
+gaim_SOURCES = about.c aim.c away.c buddy.c buddy_chat.c conversation.c \
+	dialogs.c html.c prefs.c proxy.c toc.c sound.c gaim.h \
+	gnome_applet_mgr.c plugins.c network.c server.c \
+        browser.c util.c oscar.c gtkhtml.c idle.c gaimrc.c
+
+
+CFLAGS += $(GAIM_CFLAGS)
+LIBS += $(GAIM_LIBS)
+LDADD += $(GAIM_LDADD)
+
+EXTRA_DIST = gaim.h proxy.h gnome_applet_mgr.h gtkhtml.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/about.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,106 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifdef USE_APPLET
+#include <gnome.h>
+#include <applet-widget.h>
+#endif /* USE_APPLET */
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+
+#include <gtk/gtk.h>
+#include "gaim.h"
+#include "pixmaps/logo.xpm"
+
+static GtkWidget *about=NULL;
+
+static void destroy_about()
+{
+	if (about)
+		gtk_widget_destroy(about);
+	about = NULL;
+}
+
+
+
+void show_about(GtkWidget *w, void *null)
+{
+	GtkWidget *button;
+	GtkWidget *vbox;
+	GtkWidget *pixmap;
+	GtkWidget *label;
+	GtkStyle *style;
+	GdkPixmap *pm;
+	GdkBitmap *bm;
+	char abouttitle[45]; 
+
+	if (!about) {
+		about = gtk_window_new(GTK_WINDOW_DIALOG);
+	             
+		g_snprintf(abouttitle, sizeof(abouttitle), "About GAIM v%s", VERSION);
+		gtk_window_set_title(GTK_WINDOW(about), abouttitle);
+		gtk_container_border_width(GTK_CONTAINER(about), 2);
+		gtk_widget_set_usize(about, 455, 340);
+
+		gtk_widget_show(about);
+        	aol_icon(about->window);
+
+		
+		vbox = gtk_vbox_new(FALSE, 0);
+		gtk_container_add(GTK_CONTAINER(about), vbox);
+		gtk_widget_show(vbox);
+		
+		style = gtk_widget_get_style(about);
+		pm = gdk_pixmap_create_from_xpm_d(about->window, &bm, 
+			&style->bg[GTK_STATE_NORMAL], (gchar **)aol_logo);
+		pixmap = gtk_pixmap_new(pm, bm);
+		gtk_box_pack_start(GTK_BOX(vbox), pixmap, TRUE, TRUE, 0);
+		gtk_widget_show(pixmap);
+		
+		label = gtk_label_new(
+"GAIM is a client that supports AOL's Instant Messenger protocol\nwritten under the GTK\n" 
+"It is developed by:\n"
+"Rob Flynn <rflynn@blueridge.net> <IM: RobFlynn> (Maintainer)\n"
+"Jim Duchek <jimduchek@ou.edu> <IM:Zilding> (Former Maintainer)\n" 
+"Mark Spencer <markster@marko.net> <IM: Markster97> (Original Author)\n" 
+"\n"
+"Gaim is brought to you by a team of penguin pimps, the letter G, and beer.\n");
+
+		gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
+		gtk_widget_show(label);
+		
+		button = gtk_button_new_with_label("Close");
+		gtk_signal_connect_object(GTK_OBJECT(button), "clicked",
+                                          GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about));
+                gtk_signal_connect(GTK_OBJECT(about), "destroy",
+                                   GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about));
+ 
+		GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
+		gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, FALSE, 0);
+		gtk_widget_grab_default(button);
+		gtk_widget_show(button);
+	
+	} else
+                gtk_widget_show(about);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/aim.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,418 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifdef USE_THEMES
+#include <gnome.h>
+#else
+#ifdef USE_APPLET
+#include "gnome_applet_mgr.h"
+#include <gnome.h>
+#endif /* USE_APPLET */
+#endif /* USE_THEMES */
+#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sys/wait.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include "gaim.h"
+#ifndef USE_APPLET
+#include "pixmaps/logo.xpm"
+#endif /* USE_APPLET */
+
+static GtkWidget *name;
+static GtkWidget *pass;
+static GtkWidget *signon;
+static GtkWidget *cancel;
+static GtkWidget *progress;
+static GtkWidget *notice;
+
+GList *permit = NULL;
+GList *deny = NULL;
+GList *log_conversations = NULL;
+GList *buddy_pounces = NULL;
+GList *away_messages = NULL;
+GList *groups = NULL;
+GList *buddy_chats = NULL;
+GList *conversations = NULL;
+GList *chat_rooms = NULL;
+
+GtkWidget *mainwindow = NULL;
+
+char toc_addy[16];
+char *quad_addr;
+
+
+void cancel_logon(void)
+{
+#ifdef USE_APPLET
+        set_applet_draw_closed();
+        AppletCancelLogon();
+        gtk_widget_hide(mainwindow);
+#else
+	exit(0);
+#endif /* USE_APPLET */
+}
+
+void set_login_progress(int howfar, char *whattosay)
+{
+	gtk_progress_bar_update(GTK_PROGRESS_BAR(progress),
+				((float)howfar / (float)LOGIN_STEPS));
+	gtk_statusbar_pop(GTK_STATUSBAR(notice), 1);
+	gtk_statusbar_push(GTK_STATUSBAR(notice), 1, whattosay);	
+
+        while (gtk_events_pending())
+               gtk_main_iteration();
+
+	/* Why do I need these? */
+	usleep(10);
+	while (gtk_events_pending())
+               gtk_main_iteration();
+	       
+}
+
+void hide_login_progress(char *why)
+{
+	gtk_progress_bar_update(GTK_PROGRESS_BAR(progress),
+				0);
+	gtk_statusbar_pop(GTK_STATUSBAR(notice), 1);
+	gtk_statusbar_push(GTK_STATUSBAR(notice), 1, why);	
+
+        while (gtk_events_pending())
+               gtk_main_iteration();
+
+	/* Why do I need these? */
+	usleep(10);
+	while (gtk_events_pending())
+               gtk_main_iteration();
+}
+
+void dologin(GtkWidget *widget, GtkWidget *w)
+{
+	char *username = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(name)->entry));
+        char *password = gtk_entry_get_text(GTK_ENTRY(pass));
+
+        if (query_state() != STATE_OFFLINE)
+                return;
+        
+	if (!strlen(username)) {
+		hide_login_progress("Please enter your logon");
+		return;
+	}
+	if (!strlen(password)) {
+		hide_login_progress("You must give your password");
+		return;
+	}
+
+#ifdef USE_APPLET
+	set_applet_draw_closed();
+	setUserState(signing_on);
+#endif /* USE_APPLET */
+
+
+        if (serv_login(username, password) < 0)
+                return;
+
+        return;
+}
+
+
+
+
+void doenter(GtkWidget *widget, GtkWidget *w)
+{
+	if (widget == name) {
+		gtk_entry_set_text(GTK_ENTRY(pass),"");
+		gtk_entry_select_region(GTK_ENTRY(GTK_COMBO(name)->entry), 0, 0);
+		gtk_window_set_focus(GTK_WINDOW(mainwindow), pass);
+	} else if (widget == pass) {
+		gtk_window_set_focus(GTK_WINDOW(mainwindow), signon);
+	} else {
+		g_print("what did you press enter on?\n");
+	}
+
+}
+
+
+static void combo_changed(GtkWidget *w, GtkWidget *combo)
+{
+        char *txt = gtk_editable_get_chars(GTK_EDITABLE(GTK_COMBO(combo)->entry), 0, -1);
+        struct aim_user *u;
+        
+        if (!(general_options & OPT_GEN_REMEMBER_PASS))
+                return;
+        
+        u = find_user(txt);
+
+        if (u != NULL) {
+                gtk_entry_set_text(GTK_ENTRY(pass), u->password);
+        } else {
+                gtk_entry_set_text(GTK_ENTRY(pass), "");
+        }
+        
+        return;
+}
+
+static GList *combo_user_names()
+{
+        GList *usr = aim_users;
+        GList *tmp = NULL;
+        struct aim_user *u;
+
+        
+        if (!usr)
+                return g_list_append(NULL, "<unknown>");
+        
+        while(usr) {
+                u = (struct aim_user *)usr->data;
+                tmp = g_list_append(tmp, g_strdup(u->username));
+                usr = usr->next;
+
+        }
+
+        return tmp;
+}
+
+
+
+void show_login()
+{
+	GtkWidget *options;
+	GtkWidget *reg;
+	GtkWidget *bbox;
+	GtkWidget *sbox;
+	GtkWidget *label;
+	GtkWidget *table;
+        GtkWidget *remember;
+
+#ifndef USE_APPLET
+	GtkWidget *pmw;
+	GdkPixmap *pm;
+	GtkStyle *style;
+	GdkBitmap *mask;
+#endif /* USE_APPLET */
+
+        if (mainwindow) {
+                gtk_widget_show(mainwindow);
+                return;
+        }
+        
+	mainwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+        signon   = gtk_button_new_with_label("Signon");
+	cancel   = gtk_button_new_with_label("Cancel");
+	reg      = gtk_button_new_with_label("Register");
+	options  = gtk_button_new_with_label("Options");
+	table    = gtk_table_new(8, 2, FALSE);
+	name     = gtk_combo_new();
+	pass     = gtk_entry_new();
+	notice   = gtk_statusbar_new();
+        progress = gtk_progress_bar_new();
+
+        gtk_combo_set_popdown_strings(GTK_COMBO(name), combo_user_names());
+
+	/* Make the buttons do stuff */
+	/* Clicking the button initiates a login */
+	gtk_signal_connect(GTK_OBJECT(signon), "clicked",
+			   GTK_SIGNAL_FUNC(dologin), mainwindow);
+	gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
+			   GTK_SIGNAL_FUNC(cancel_logon), mainwindow);
+	/* Allow user to change prefs before logging in */
+	gtk_signal_connect(GTK_OBJECT(options), "clicked",
+			   GTK_SIGNAL_FUNC(show_prefs), NULL);
+
+	/* Register opens the right URL */
+	gtk_signal_connect(GTK_OBJECT(reg), "clicked",
+			   GTK_SIGNAL_FUNC(open_url), "http://www.aol.com/aim");
+	/* Enter in the username clears the password and sets
+	   the pointer in the password field */
+	gtk_signal_connect(GTK_OBJECT(GTK_COMBO(name)->entry), "activate",
+                           GTK_SIGNAL_FUNC(doenter), mainwindow);
+
+        gtk_signal_connect(GTK_OBJECT(GTK_COMBO(name)->entry), "changed",
+                           GTK_SIGNAL_FUNC(combo_changed), name);
+			   
+	gtk_signal_connect(GTK_OBJECT(pass), "activate",
+			   GTK_SIGNAL_FUNC(doenter), mainwindow);
+	gtk_signal_connect(GTK_OBJECT(mainwindow), "delete_event",
+			   GTK_SIGNAL_FUNC(cancel_logon), mainwindow);
+	/* Homogenous spacing, 10 padding */
+	bbox = gtk_hbox_new(TRUE, 10);
+	sbox = gtk_vbox_new(TRUE, 10);
+	
+	gtk_box_pack_start(GTK_BOX(bbox), reg, TRUE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX(bbox), signon, TRUE, TRUE, 0);
+	
+	gtk_box_pack_start(GTK_BOX(sbox), bbox, TRUE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX(sbox), options, TRUE, TRUE, 0);
+
+	/* Labels for selectors and text boxes */
+#if 0	
+	label = gtk_label_new("TOC: ");
+	gtk_table_attach(GTK_TABLE(table), label, 0,1,1,2,0,0, 5, 5);
+	gtk_widget_show(label);
+#endif
+	label = gtk_label_new("Screen Name: ");
+	gtk_table_attach(GTK_TABLE(table), label, 0,1,2,3,0,0, 5, 5);
+	gtk_widget_show(label);
+	label = gtk_label_new("Password: ");
+	gtk_table_attach(GTK_TABLE(table), label, 0,1,3,4,0,0, 5, 5);
+	gtk_widget_show(label);
+	remember = gtk_check_button_new_with_label("Remember Password");
+	gtk_table_attach(GTK_TABLE(table), remember, 0,2,4,5,0,0, 5, 5);
+	gtk_widget_show(remember);
+
+	gtk_widget_show(options);
+	
+        /* Adjust sizes of inputs */
+	gtk_widget_set_usize(name,95,0);
+	gtk_widget_set_usize(pass,95,0);
+
+
+	/* Status and label */
+	gtk_widget_show(notice);
+
+	gtk_widget_set_usize(progress,150,0);
+
+        gtk_widget_show(progress);
+
+        gtk_table_attach(GTK_TABLE(table), progress, 0, 2, 6, 7, 0, 0, 5, 5);
+	gtk_widget_set_usize(GTK_STATUSBAR(notice)->label, 150, 0);
+	gtk_table_attach(GTK_TABLE(table), notice, 0, 2, 8, 9, 0, 0, 5, 5);
+
+	/* Attach the buttons at the bottom */
+	gtk_widget_show(signon);
+	gtk_widget_show(cancel);
+	gtk_widget_show(reg);
+	gtk_widget_show(bbox);
+	gtk_widget_show(sbox);
+	gtk_table_attach(GTK_TABLE(table), sbox, 0,2,7,8,0,0, 5, 5);
+	
+	/* Text fields */
+	
+	gtk_table_attach(GTK_TABLE(table),name,1,2,2,3,0,0,5,5);
+	gtk_widget_show(name);
+	gtk_table_attach(GTK_TABLE(table),pass,1,2,3,4,0,0,5,5);
+	gtk_entry_set_visibility(GTK_ENTRY(pass), FALSE);
+	gtk_widget_show(pass);
+	
+	gtk_container_border_width(GTK_CONTAINER(sbox), 10);	 
+	
+	gtk_container_add(GTK_CONTAINER(mainwindow),table );
+	
+	gtk_widget_show(table);
+	gtk_window_set_title(GTK_WINDOW(mainwindow),"Gaim - Login");
+
+
+        gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(remember), (general_options & OPT_GEN_REMEMBER_PASS));
+        
+	if (current_user) {
+		gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(name)->entry), current_user->username);
+                if ((general_options & OPT_GEN_REMEMBER_PASS)) {
+                        gtk_entry_set_text(GTK_ENTRY(pass), current_user->password);
+                }
+
+
+		gtk_widget_grab_focus(signon);
+	} else
+		gtk_widget_grab_focus(name);
+
+
+
+	gtk_signal_connect(GTK_OBJECT(remember), "clicked", GTK_SIGNAL_FUNC(set_general_option), (int *)OPT_GEN_REMEMBER_PASS);
+
+
+        gtk_widget_realize(mainwindow);
+
+#ifndef USE_APPLET
+	/* Logo at the top */
+	style = gtk_widget_get_style(mainwindow);
+	pm = gdk_pixmap_create_from_xpm_d(mainwindow->window, &mask,
+		&style->bg[GTK_STATE_NORMAL], (gchar **)aol_logo);
+	pmw = gtk_pixmap_new( pm, mask);
+	gtk_table_attach(GTK_TABLE(table), pmw, 0,2,0,1,0,0,5,5);
+	gtk_widget_show(pmw);
+#endif /* USE_APPLET */
+
+        
+        aol_icon(mainwindow->window);
+#ifndef _WIN32
+        gdk_window_set_group(mainwindow->window, mainwindow->window);
+#endif
+
+        
+        gtk_widget_show(mainwindow);
+	
+        if((general_options & OPT_GEN_AUTO_LOGIN) &&
+           (general_options & OPT_GEN_REMEMBER_PASS)) {
+		dologin(signon, NULL);
+	}
+}
+
+
+int main(int argc, char *argv[])
+{
+#ifdef USE_APPLET
+        InitAppletMgr( argc, argv );
+#elif defined USE_THEMES         
+        gnome_init("GAIM",NULL,argc,argv);
+#else
+        gtk_init(&argc, &argv);
+#endif /* USE_THEMES */
+
+
+        set_defaults();
+        load_prefs();
+
+#ifdef USE_APPLET
+	applet_widget_register_callback(APPLET_WIDGET(applet),
+					"prefs",
+					_("Preferences"),
+					show_prefs,
+					NULL);
+        applet_widget_register_callback(APPLET_WIDGET(applet),
+					"signon",
+					_("Signon"),
+					applet_show_login,
+					NULL);
+
+        if((general_options & OPT_GEN_AUTO_LOGIN) &&
+           (general_options & OPT_GEN_REMEMBER_PASS)) {
+
+                applet_show_login(APPLET_WIDGET(applet), NULL);
+        }
+	
+	applet_widget_gtk_main();
+#else
+        
+
+        show_login();
+        gtk_main();
+        
+#endif /* USE_APPLET */
+        
+	return 0;
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/away.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,279 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+  *
+ */
+
+#ifdef USE_APPLET
+#include <gnome.h>
+#include <applet-widget.h>
+#include "gnome_applet_mgr.h"
+#endif /* USE_APPLET */
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+
+#include <gtk/gtk.h>
+#include "gaim.h"
+
+static GtkWidget *imaway=NULL;
+
+GtkWidget *awaymenu;
+struct away_message *awaymessage = NULL;
+
+#ifndef USE_APPLET
+static void destroy_im_away()
+{
+	if (imaway)
+		gtk_widget_destroy(imaway);
+	imaway=NULL;
+}
+#endif /* USE_APPLET */
+
+void do_im_back(GtkWidget *w, GtkWidget *x)
+{
+#ifdef USE_APPLET
+  applet_widget_unregister_callback(APPLET_WIDGET(applet),"away");
+  if(!blist) applet_widget_unregister_callback(APPLET_WIDGET(applet),"buddy");
+  applet_widget_register_callback(APPLET_WIDGET(applet),
+                "away",
+                _("Away Message"),
+                show_away_mess,
+                NULL);
+	if(!blist) {
+	        applet_widget_register_callback(APPLET_WIDGET(applet),
+        	        "buddy",
+                	_("Buddy List"),
+      		        (AppletCallbackFunc)make_buddy,
+                	NULL);
+	}
+#endif /* USE_APPLET */
+	if (imaway) {
+		gtk_widget_destroy(imaway);
+		imaway=NULL;
+        }
+
+        serv_set_away(NULL);
+	awaymessage = NULL;
+}
+
+void do_away_message(GtkWidget *w, struct away_message *a)
+{
+#ifdef USE_APPLET
+        applet_widget_unregister_callback(APPLET_WIDGET(applet),"away");
+        if(!blist) applet_widget_unregister_callback(APPLET_WIDGET(applet),"buddy");
+        applet_widget_register_callback(APPLET_WIDGET(applet),
+                                        "away",
+                                        _("Back"),
+                                        (AppletCallbackFunc) do_im_back,
+                                        NULL);
+        if(!blist) applet_widget_register_callback(APPLET_WIDGET(applet),
+                                                   "buddy",
+                                                   _("Buddy List"),
+                                                   (AppletCallbackFunc)make_buddy,
+                                                   NULL);
+#else
+
+	GtkWidget *back;
+	GtkWidget *awaytext;
+        GtkWidget *vscrollbar;
+	GtkWidget *bbox;
+	GtkWidget *vbox;
+        GtkWidget *topbox;
+        char *buf2;
+        char buf[BUF_LONG];
+        GList *cnv = conversations;
+        struct conversation *c;
+
+	if (!imaway) {
+		imaway = gtk_window_new(GTK_WINDOW_DIALOG);
+		gtk_widget_realize(imaway);
+		aol_icon(imaway->window);
+		back = gtk_button_new_with_label("I'm Back!");
+		bbox = gtk_hbox_new(TRUE, 10);
+		topbox = gtk_hbox_new(FALSE, 5);
+                vbox = gtk_vbox_new(FALSE, 5);
+
+		awaytext = gtk_text_new(NULL, NULL);
+		g_snprintf(buf, sizeof(buf), "%s", a->message);
+                vscrollbar = gtk_vscrollbar_new(GTK_TEXT(awaytext)->vadj);
+		gtk_widget_show(vscrollbar);
+		gtk_widget_set_usize(awaytext, 225, 75);
+                gtk_text_set_word_wrap(GTK_TEXT(awaytext), TRUE);
+                gtk_widget_show(awaytext);
+		gtk_text_freeze(GTK_TEXT(awaytext));
+		gtk_text_insert(GTK_TEXT(awaytext), NULL, NULL, NULL, buf, -1);
+		gtk_widget_show(awaytext);
+                
+		
+		/* Put the buttons in the box */
+		gtk_box_pack_start(GTK_BOX(bbox), back, TRUE, TRUE, 10);
+		
+		gtk_box_pack_start(GTK_BOX(topbox), awaytext, FALSE, FALSE, 5);
+	
+		/* And the boxes in the box */
+		gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5);
+		gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
+		
+		/* Handle closes right */
+		gtk_signal_connect(GTK_OBJECT(imaway), "destroy",
+			   GTK_SIGNAL_FUNC(destroy_im_away), imaway);
+		gtk_signal_connect(GTK_OBJECT(back), "clicked",
+			   GTK_SIGNAL_FUNC(do_im_back), imaway);
+
+		/* Finish up */
+		gtk_widget_show(back);
+		gtk_widget_show(topbox);
+		gtk_widget_show(bbox);
+		gtk_widget_show(vbox);
+		if (strlen(a->name))
+			gtk_window_set_title(GTK_WINDOW(imaway), a->name);
+		else
+                        gtk_window_set_title(GTK_WINDOW(imaway), "Gaim - Away!");
+		gtk_window_set_focus(GTK_WINDOW(imaway), back);
+		gtk_container_add(GTK_CONTAINER(imaway), vbox);
+		awaymessage = a;
+
+        }
+
+        /* New away message... Clear out the old sent_aways */
+        while(cnv) {
+                c = (struct conversation *)cnv->data;
+                c->sent_away = 0;
+                cnv = cnv->next;
+        }
+
+
+        buf2 = g_strdup(awaymessage->message);
+        escape_text(buf2);
+        serv_set_away(buf2);
+        // g_free(buf2);
+	gtk_widget_show(imaway);
+#endif /* USE_APPLET */
+}
+
+void rem_away_mess(GtkWidget *w, struct away_message *a)
+{
+        away_messages = g_list_remove(away_messages, a);
+        g_free(a);
+        do_away_menu();
+}
+
+
+void do_away_menu()
+{
+	GtkWidget *menuitem;
+	static GtkWidget *remmenu;
+	GtkWidget *remitem;
+	GtkWidget *label;
+	GtkWidget *sep;
+	GList *l;
+	GtkWidget *list_item;
+        GList *awy = away_messages;
+        struct away_message *a;
+
+
+	if (pd != NULL) {
+                gtk_list_clear_items(GTK_LIST(pd->away_list), 0, -1);
+		while(awy) {
+			a = (struct away_message *)awy->data;
+			label = gtk_label_new(a->name);
+			list_item = gtk_list_item_new();
+			gtk_container_add(GTK_CONTAINER(list_item), label);
+			gtk_signal_connect(GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(away_list_clicked), a);
+			gtk_signal_connect(GTK_OBJECT(list_item), "deselect", GTK_SIGNAL_FUNC(away_list_unclicked), a);
+			gtk_object_set_user_data(GTK_OBJECT(list_item), a);
+
+			gtk_widget_show(label);
+			gtk_container_add(GTK_CONTAINER(pd->away_list), list_item);
+			gtk_widget_show(list_item);
+
+			awy = awy->next;
+		}
+		if (away_messages != NULL)
+                        gtk_list_select_item(GTK_LIST(pd->away_list), 0);
+	}
+	
+        
+	l = gtk_container_children(GTK_CONTAINER(awaymenu));
+	
+	while(l) {
+		gtk_widget_destroy(GTK_WIDGET(l->data));
+		l = l->next;
+	}
+
+
+	remmenu = gtk_menu_new();
+	
+	
+
+	menuitem = gtk_menu_item_new_with_label("New Away Message");
+	gtk_menu_append(GTK_MENU(awaymenu), menuitem);
+	gtk_widget_show(menuitem);
+	gtk_signal_connect(GTK_OBJECT(menuitem), "activate", GTK_SIGNAL_FUNC(create_away_mess), NULL);
+
+
+        while(awy) {
+                a = (struct away_message *)awy->data;
+
+		remitem = gtk_menu_item_new_with_label(a->name);
+		gtk_menu_append(GTK_MENU(remmenu), remitem);
+		gtk_widget_show(remitem);
+		gtk_signal_connect(GTK_OBJECT(remitem), "activate", GTK_SIGNAL_FUNC(rem_away_mess), a);
+
+		awy = awy->next;
+
+	}
+	
+	menuitem = gtk_menu_item_new_with_label("Remove Away Message");
+	gtk_menu_append(GTK_MENU(awaymenu), menuitem);
+	gtk_widget_show(menuitem);
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), remmenu);
+	gtk_widget_show(remmenu);
+	
+
+	sep = gtk_hseparator_new();
+	menuitem = gtk_menu_item_new();
+	gtk_menu_append(GTK_MENU(awaymenu), menuitem);
+	gtk_container_add(GTK_CONTAINER(menuitem), sep);
+	gtk_widget_set_sensitive(menuitem, FALSE);
+	gtk_widget_show(menuitem);
+	gtk_widget_show(sep);
+
+	awy = away_messages;
+	
+	while(awy) {
+                a = (struct away_message *)awy->data;
+                
+		menuitem = gtk_menu_item_new_with_label(a->name);
+		gtk_menu_append(GTK_MENU(awaymenu), menuitem);
+		gtk_widget_show(menuitem);
+		gtk_signal_connect(GTK_OBJECT(menuitem), "activate", GTK_SIGNAL_FUNC(do_away_message), a);
+
+		awy = awy->next;
+
+	}
+
+}
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/browser.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,702 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * some code: (most in this file)
+ * Copyright (C) 1996 Netscape Communications Corporation, all rights reserved.
+ * Created: Jamie Zawinski <jwz@netscape.com>, 24-Dec-94.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * This code is mainly taken from Netscape's sample implementation of
+ * their protocol.  Nifty.
+ *
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+
+
+
+#include <gtk/gtk.h>
+#include <gdk/gdkprivate.h>
+#include <gdk/gdkx.h>
+#include "gaim.h"
+
+#ifndef _WIN32
+
+
+
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+
+
+static const char *progname = "gaim";
+static const char *expected_mozilla_version = "1.1";
+
+#define MOZILLA_VERSION_PROP   "_MOZILLA_VERSION"
+#define MOZILLA_LOCK_PROP      "_MOZILLA_LOCK"
+#define MOZILLA_COMMAND_PROP   "_MOZILLA_COMMAND"
+#define MOZILLA_RESPONSE_PROP  "_MOZILLA_RESPONSE"
+
+static GdkAtom XA_MOZILLA_VERSION  = 0;
+static GdkAtom XA_MOZILLA_LOCK     = 0;
+static GdkAtom XA_MOZILLA_COMMAND  = 0;
+static GdkAtom XA_MOZILLA_RESPONSE = 0;
+
+
+static int netscape_lock;
+
+
+static Window
+VirtualRootWindowOfScreen(screen)
+        Screen *screen;
+{
+        static Screen *save_screen = (Screen *)0;
+        static Window root = (Window)0;
+
+        if (screen != save_screen) {
+                Display *dpy = DisplayOfScreen(screen);
+                Atom __SWM_VROOT = None;
+                int i;
+                Window rootReturn, parentReturn, *children;
+                unsigned int numChildren;
+
+                root = RootWindowOfScreen(screen);
+
+                /* go look for a virtual root */
+                __SWM_VROOT = XInternAtom(dpy, "__SWM_VROOT", False);
+                if (XQueryTree(dpy, root, &rootReturn, &parentReturn,
+                                 &children, &numChildren)) {
+                        for (i = 0; i < numChildren; i++) {
+                                Atom actual_type;
+                                int actual_format;
+                                unsigned long nitems, bytesafter;
+                                Window *newRoot = (Window *)0;
+
+                                if (XGetWindowProperty(dpy, children[i],
+                                        __SWM_VROOT, 0, 1, False, XA_WINDOW,
+                                        &actual_type, &actual_format,
+                                        &nitems, &bytesafter,
+                                        (unsigned char **) &newRoot) == Success
+                                    && newRoot) {
+                                    root = *newRoot;
+                                    break;
+                                }
+                        }
+                        if (children)
+                                XFree((char *)children);
+                }
+
+                save_screen = screen;
+        }
+
+        return root;
+}
+
+/* The following code is Copyright (C) 1989 X Consortium */
+
+static Window TryChildren();
+
+/* Find a window with WM_STATE, else return win itself, as per ICCCM */
+
+static Window GClientWindow (dpy, win)
+    Display *dpy;
+    Window win;
+{
+    Atom WM_STATE;
+    Atom type = None;
+    int format;
+    unsigned long nitems, after;
+    unsigned char *data;
+    Window inf;
+
+    WM_STATE = XInternAtom(dpy, "WM_STATE", True);
+    if (!WM_STATE)
+        return win;
+    XGetWindowProperty(dpy, win, WM_STATE, 0, 0, False, AnyPropertyType,
+                       &type, &format, &nitems, &after, &data);
+    if (type)
+        return win;
+    inf = TryChildren(dpy, win, WM_STATE);
+    if (!inf)
+        inf = win;
+    return inf;
+}
+
+static
+Window TryChildren (dpy, win, WM_STATE)
+    Display *dpy;
+    Window win;
+    Atom WM_STATE;
+{
+    Window root, parent;
+    Window *children;
+    unsigned int nchildren;
+    unsigned int i;
+    Atom type = None;
+    int format;
+    unsigned long nitems, after;
+    unsigned char *data;
+    Window inf = 0;
+
+    if (!XQueryTree(dpy, win, &root, &parent, &children, &nchildren))
+        return 0;
+    for (i = 0; !inf && (i < nchildren); i++) {
+        XGetWindowProperty(dpy, children[i], WM_STATE, 0, 0, False,
+                           AnyPropertyType, &type, &format, &nitems,
+                           &after, &data);
+        if (type)
+            inf = children[i];
+    }
+    for (i = 0; !inf && (i < nchildren); i++)
+        inf = TryChildren(dpy, children[i], WM_STATE);
+    if (children) XFree((char *)children);
+    return inf;
+}
+
+/* END X Consortium code */
+
+
+
+static void mozilla_remote_init_atoms()
+{
+	if (!XA_MOZILLA_VERSION)
+		XA_MOZILLA_VERSION = gdk_atom_intern(MOZILLA_VERSION_PROP, 0);
+	if (!XA_MOZILLA_LOCK)
+                XA_MOZILLA_LOCK = gdk_atom_intern(MOZILLA_LOCK_PROP, 0);
+        if (! XA_MOZILLA_COMMAND)
+                XA_MOZILLA_COMMAND = gdk_atom_intern(MOZILLA_COMMAND_PROP, 0);
+	if (! XA_MOZILLA_RESPONSE)
+		XA_MOZILLA_RESPONSE = gdk_atom_intern(MOZILLA_RESPONSE_PROP, 0);
+}
+
+static GdkWindow *mozilla_remote_find_window()
+{
+        int i;
+        Window root = VirtualRootWindowOfScreen(DefaultScreenOfDisplay(gdk_display));
+        Window root2, parent, *kids;
+        unsigned int nkids;
+        Window result = 0;
+        Window tenative = 0;
+        unsigned char *tenative_version = 0;
+
+        if (!XQueryTree (gdk_display, root, &root2, &parent, &kids, &nkids))
+        {
+            sprintf (debug_buff, "%s: XQueryTree failed on display %s\n", progname,
+                     DisplayString (gdk_display));
+			debug_print(debug_buff);
+            return NULL;
+        }
+
+        /* root != root2 is possible with virtual root WMs. */
+
+        if (!(kids && nkids)) {
+                sprintf (debug_buff, "%s: root window has no children on display %s\n",
+                         progname, DisplayString (gdk_display));
+				debug_print(debug_buff);
+            	return NULL;
+        }
+
+        for (i = nkids-1; i >= 0; i--)
+        {
+                Atom type;
+                int format;
+                unsigned long nitems, bytesafter;
+                unsigned char *version = 0;
+                Window w = GClientWindow (gdk_display, kids[i]);
+                int status = XGetWindowProperty (gdk_display, w, XA_MOZILLA_VERSION,
+                                                 0, (65536 / sizeof (long)),
+                                                 False, XA_STRING,
+                                                 &type, &format, &nitems, &bytesafter,
+                                                 &version);
+                if (! version)
+                        continue;
+                if (strcmp ((char *) version, expected_mozilla_version) &&
+                    !tenative)
+                {
+                        tenative = w;
+                        tenative_version = version;
+                        continue;
+                }
+                g_free (version);
+                if (status == Success && type != None)
+                {
+                        result = w;
+                        break;
+                }
+        }
+
+        if (result && tenative)
+        {
+            sprintf (debug_buff,
+                         "%s: warning: both version %s (0x%x) and version\n"
+                         "\t%s (0x%x) are running.  Using version %s.\n",
+                         progname, tenative_version, (unsigned int) tenative,
+                         expected_mozilla_version, (unsigned int) result,
+                         expected_mozilla_version);
+			debug_print(debug_buff);
+            g_free (tenative_version);
+            return gdk_window_foreign_new(result);
+        }
+        else if (tenative)
+        {
+            sprintf (debug_buff,
+                     "%s: warning: expected version %s but found version\n"
+                     "\t%s (0x%x) instead.\n",
+                     progname, expected_mozilla_version,
+                     tenative_version, (unsigned int) tenative);
+			debug_print(debug_buff);
+            g_free (tenative_version);
+            return gdk_window_foreign_new(tenative);
+        }
+        else if (result)
+        {
+                return gdk_window_foreign_new(result);
+        }
+        else
+        {
+            sprintf (debug_buff, "%s: not running on display %s\n", progname,
+                     DisplayString (gdk_display));
+			debug_print(debug_buff);
+            return NULL;
+        }
+}
+
+
+static char *lock_data = 0;
+
+static void mozilla_remote_obtain_lock (GdkWindow *window)
+{
+        Bool locked = False;
+
+        if (!lock_data) {
+		lock_data = (char *)g_malloc (255);
+		sprintf (lock_data, "pid%d@", getpid ());
+		if (gethostname (lock_data + strlen (lock_data), 100)) {
+			return;
+		}
+	}
+
+        do {
+                int result;
+                GdkAtom actual_type;
+                gint actual_format;
+		gint nitems;
+                unsigned char *data = 0;
+
+                result = gdk_property_get (window, XA_MOZILLA_LOCK,
+					   XA_STRING, 0,
+					   (65536 / sizeof (long)), 0,
+					   &actual_type, &actual_format,
+					   &nitems, &data);
+                if (result != Success || actual_type == None)
+                {
+                        /* It's not now locked - lock it. */
+                    sprintf (debug_buff, "%s: (writing " MOZILLA_LOCK_PROP
+                             " \"%s\" to 0x%x)\n",
+                             progname, lock_data, (unsigned int) window);
+					debug_print(debug_buff);
+
+					gdk_property_change(window, XA_MOZILLA_LOCK, XA_STRING,
+						    8, PropModeReplace,
+						    (unsigned char *) lock_data,
+					   		strlen (lock_data));
+                    locked = True;
+                }
+
+                if (!locked) {
+                        /* Then just fuck it. */
+                        if (data)
+                                g_free(data);
+                        return;
+                }
+                if (data)
+                        g_free(data);
+        } while (!locked);
+}
+
+
+static void mozilla_remote_free_lock (GdkWindow *window)
+{
+        int result = 0;
+        GdkAtom actual_type;
+        gint actual_format;
+        gint nitems;
+        unsigned char *data = 0;
+
+       	sprintf (debug_buff, "%s: (deleting " MOZILLA_LOCK_PROP
+           	     " \"%s\" from 0x%x)\n",
+               	 progname, lock_data, (unsigned int) window);
+		debug_print(debug_buff);
+
+		result = gdk_property_get(window, XA_MOZILLA_LOCK, XA_STRING,
+				  0, (65536 / sizeof (long)),
+				  1, &actual_type, &actual_format,
+				  &nitems, &data);
+        if (result != Success)
+        {
+             sprintf (debug_buff, "%s: unable to read and delete " MOZILLA_LOCK_PROP
+                     " property\n",
+                     progname);
+		   	 debug_print(debug_buff);
+           	 return;
+        }
+        else if (!data || !*data)
+        {
+              sprintf (debug_buff, "%s: invalid data on " MOZILLA_LOCK_PROP
+               	     " of window 0x%x.\n",
+                   	 progname, (unsigned int) window);
+			  debug_print(debug_buff);
+              return;
+        }
+        else if (strcmp ((char *) data, lock_data))
+        {
+            sprintf (debug_buff, "%s: " MOZILLA_LOCK_PROP
+                     " was stolen!  Expected \"%s\", saw \"%s\"!\n",
+                     progname, lock_data, data);
+			debug_print(debug_buff);
+            return;
+        }
+
+        if (data)
+                g_free(data);
+}
+
+
+static int
+mozilla_remote_command (GdkWindow *window, const char *command,
+                        Bool raise_p)
+{
+        int result = 0;
+        Bool done = False;
+        char *new_command = 0;
+
+        /* The -noraise option is implemented by passing a "noraise" argument
+         to each command to which it should apply.
+         */
+        if (!raise_p)
+        {
+                char *close;
+                new_command = (char *) malloc (strlen (command) + 20);
+                strcpy (new_command, command);
+                close = strrchr (new_command, ')');
+                if (close)
+                        strcpy (close, ", noraise)");
+                else
+                        strcat (new_command, "(noraise)");
+                command = new_command;
+        }
+
+       	sprintf (debug_buff, "%s: (writing " MOZILLA_COMMAND_PROP " \"%s\" to 0x%x)\n",
+           	     progname, command, (unsigned int) window);
+		debug_print(debug_buff);
+
+	gdk_property_change(window, XA_MOZILLA_COMMAND, XA_STRING, 8,
+			    GDK_PROP_MODE_REPLACE, (unsigned char *) command,
+			    strlen (command));
+
+	while (!done) {
+                GdkEvent *event;
+		
+                event = gdk_event_get();
+		
+		if (!event)
+			continue;
+		
+		if (event->any.window != window) {
+			gtk_main_do_event(event);
+			continue;
+		}
+
+                if (event->type == GDK_DESTROY &&
+                    event->any.window == window) {
+
+						/* Print to warn user...*/
+						sprintf (debug_buff, "%s: window 0x%x was destroyed.\n",
+								 progname, (unsigned int) window);
+						debug_print(debug_buff);
+						result = 6;
+						goto DONE;
+		} else if (event->type == GDK_PROPERTY_NOTIFY &&
+                         event->property.state == GDK_PROPERTY_NEW_VALUE &&
+                         event->property.window == window &&
+                         event->property.atom == XA_MOZILLA_RESPONSE) {
+			GdkAtom actual_type;
+			gint actual_format, nitems;
+			unsigned char *data = 0;
+
+			result = gdk_property_get (window, XA_MOZILLA_RESPONSE,
+						   XA_STRING, 0,
+						   (65536 / sizeof (long)),
+						   1,
+						   &actual_type, &actual_format,
+						   &nitems, &data);
+
+			
+			if (result == Success && data && *data) {
+				sprintf (debug_buff, "%s: (server sent " MOZILLA_RESPONSE_PROP
+					 " \"%s\" to 0x%x.)\n",
+					 progname, data, (unsigned int) window);
+				debug_print(debug_buff);
+			}
+
+			if (result != Success) {
+				sprintf (debug_buff, "%s: failed reading " MOZILLA_RESPONSE_PROP
+					 " from window 0x%0x.\n",
+					 progname, (unsigned int) window);
+				debug_print(debug_buff);
+				result = 6;
+				done = True;
+			} else if (!data || strlen((char *) data) < 5) {
+				sprintf (debug_buff, "%s: invalid data on " MOZILLA_RESPONSE_PROP
+					 " property of window 0x%0x.\n",
+					 progname, (unsigned int) window);
+				debug_print(debug_buff);
+				result = 6;
+				done = True;
+			} else if (*data == '1') { /* positive preliminary reply */
+				sprintf (debug_buff, "%s: %s\n", progname, data + 4);
+				debug_print(debug_buff);
+				/* keep going */
+				done = False;
+			} else if (!strncmp ((char *)data, "200", 3)) {
+				result = 0;
+				done = True;
+			} else if (*data == '2') {
+				sprintf (debug_buff, "%s: %s\n", progname, data + 4);
+				debug_print(debug_buff);
+				result = 0;
+				done = True;
+			} else if (*data == '3') {
+				sprintf (debug_buff, "%s: internal error: "
+					 "server wants more information?  (%s)\n",
+					 progname, data);
+				debug_print(debug_buff);
+				result = 3;
+				done = True;
+			} else if (*data == '4' || *data == '5') {
+				sprintf (debug_buff, "%s: %s\n", progname, data + 4);
+				debug_print(debug_buff);
+				result = (*data - '0');
+				done = True;
+			} else {
+				sprintf (debug_buff,
+					 "%s: unrecognised " MOZILLA_RESPONSE_PROP
+					 " from window 0x%x: %s\n",
+					 progname, (unsigned int) window, data);
+				debug_print(debug_buff);
+				result = 6;
+				done = True;
+			}
+
+			if (data)
+				g_free(data);
+		}
+		else if (event->type == GDK_PROPERTY_NOTIFY &&
+                         event->property.window == window &&
+                         event->property.state == GDK_PROPERTY_DELETE &&
+                         event->property.atom == XA_MOZILLA_COMMAND) {
+                        sprintf (debug_buff, "%s: (server 0x%x has accepted "
+                                 MOZILLA_COMMAND_PROP ".)\n",
+                                 progname, (unsigned int) window);
+						debug_print(debug_buff);
+		}
+		gdk_event_free(event);
+	}
+
+DONE:
+
+	if (new_command)
+		g_free (new_command);
+
+	return result;
+}
+
+
+gint check_netscape(char *msg)
+{
+        int status;
+        GdkWindow *window;
+
+        mozilla_remote_init_atoms ();
+        window = mozilla_remote_find_window();
+
+        if (window) {
+
+		XSelectInput(gdk_display, ((GdkWindowPrivate *)window)->xwindow,
+			     (PropertyChangeMask|StructureNotifyMask));
+
+		
+                mozilla_remote_obtain_lock(window);
+
+                status = mozilla_remote_command(window, msg, False);
+
+                if (status != 6)
+                        mozilla_remote_free_lock(window);
+
+                gtk_timeout_add(1000, (GtkFunction)clean_pid, NULL);
+
+                netscape_lock = 0;
+		
+		g_free(msg);
+                return FALSE;
+        } else
+                return TRUE;
+}
+
+
+static void netscape_command(char *command)
+{
+        int status;
+        pid_t pid;
+	GdkWindow *window;
+
+	if (netscape_lock)
+		return;
+
+	netscape_lock = 1;
+
+
+
+	mozilla_remote_init_atoms();
+	window = mozilla_remote_find_window();
+
+	if (window) {
+
+		XSelectInput(gdk_display, ((GdkWindowPrivate *)window)->xwindow,
+			     (PropertyChangeMask|StructureNotifyMask));
+
+		mozilla_remote_obtain_lock(window);
+
+		status = mozilla_remote_command(window, command, False);
+
+		if (status != 6)
+			mozilla_remote_free_lock(window);
+
+		netscape_lock = 0;
+		
+	} else {
+		pid = fork();
+		if (pid == 0) {
+			char *args[2];
+			int e;
+
+			args[0] = g_strdup("netscape");
+			args[1] = NULL;
+                        e = execvp(args[0], args);
+                        printf("Hello%d\n");
+                        
+			_exit(0);
+		} else {
+			char *tmp = g_strdup(command);
+			gtk_timeout_add(200, (GtkFunction)check_netscape, tmp);
+		}
+	}
+
+}
+
+void open_url(GtkWidget *w, char *url) {
+	if (web_browser == BROWSER_NETSCAPE) {
+                char *command = g_malloc(1024);
+
+		g_snprintf(command, 1024, "OpenURL(%s)", url);
+
+		netscape_command(command);
+		g_free(command);
+	} else if (web_browser == BROWSER_KFM) {
+		pid_t pid;
+
+		pid = fork();
+
+		if (pid == 0) {
+			char *args[4];
+
+			args[0] = g_strdup("kfmclient");
+			args[1] = g_strdup("openURL");
+                        args[2] = url;;
+			args[3] = NULL;
+
+			execvp(args[0], args);
+			_exit(0);
+		} else {
+			gtk_timeout_add(1000, (GtkFunction)clean_pid, NULL);
+		}
+	} else if (web_browser == BROWSER_MANUAL) {
+		pid_t pid;
+
+		pid = fork();
+
+		if (pid == 0) {
+			char *args[4];
+
+			char command[1024];
+
+			g_snprintf(command, sizeof(command), web_command, url);
+
+			args[0] = "sh";
+			args[1] = "-c";
+			args[2] = command;
+			args[3] = NULL;
+
+                        execvp(args[0], args);
+
+			_exit(0);
+		} else {
+			gtk_timeout_add(1000, (GtkFunction)clean_pid, NULL);
+		}
+        } else if (web_browser == BROWSER_INTERNAL) {
+                g_show_info(url);
+        }
+}
+
+void add_bookmark(GtkWidget *w, char *url) {
+	if (web_browser == BROWSER_NETSCAPE) {
+                char *command = g_malloc(1024);
+
+		g_snprintf(command, 1024, "AddBookmark(%s)", url);
+
+		netscape_command(command);
+		g_free(command);
+	}
+}
+
+void open_url_nw(GtkWidget *w, char *url) {
+	if (web_browser == BROWSER_NETSCAPE) {
+                char *command = g_malloc(1024);
+
+		g_snprintf(command, 1024, "OpenURL(%s, new-window)", url);
+
+		netscape_command(command);
+		g_free(command);
+	}
+}
+
+#else
+
+/* Sooner or later, I shall support Windows clicking! */
+
+void add_bookmark(GtkWidget *w, char *url) { }
+void open_url_nw(GtkWidget *w, char *url) { }
+void open_url(GtkWidget *w, char *url) { }
+
+
+#endif _WIN32
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/buddy.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,1922 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifdef USE_APPLET
+#include <gnome.h>
+#include <applet-widget.h>
+#endif /* USE_APPLET */
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <time.h>
+
+#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
+#include "gaim.h"
+#include "pixmaps/admin_icon.xpm"
+#include "pixmaps/aol_icon.xpm"
+#include "pixmaps/free_icon.xpm"
+#include "pixmaps/dt_icon.xpm"
+#include "pixmaps/no_icon.xpm"
+#include "pixmaps/login_icon.xpm"
+#include "pixmaps/logout_icon.xpm"
+
+#include "pixmaps/buddyadd.xpm"
+#include "pixmaps/buddydel.xpm"
+#include "pixmaps/buddychat.xpm"
+#include "pixmaps/im.xpm"
+#include "pixmaps/info.xpm"
+#include "pixmaps/permadd.xpm"
+#include "pixmaps/permdel.xpm"
+#include "pixmaps/away_icon.xpm"
+
+static GtkTooltips *tips;
+static GtkWidget *editpane;
+static GtkWidget *buddypane;
+static GtkWidget *permitpane;
+static GtkWidget *edittree;
+static GtkWidget *permtree;
+static GtkWidget *imbutton, *infobutton, *chatbutton;
+static GtkWidget *addbutton, *rembutton;
+static GtkWidget *addpermbutton, *rempermbutton;
+static GtkWidget *lagometer = NULL;
+static GtkWidget *lagometer_box = NULL;
+
+static int last_lag_us;
+
+
+GtkWidget *blist = NULL;
+GtkWidget *bpmenu;
+GtkWidget *buddies;
+int permdeny;
+
+
+/* Predefine some functions */
+static void new_bp_callback(GtkWidget *w, char *name);
+static void log_callback(GtkWidget *w, char *name);
+
+
+void destroy_buddy()
+{
+	if (blist)
+		gtk_widget_destroy(blist);
+	blist=NULL;
+}
+
+void update_num_groups()
+{
+	GList *grp = groups;
+	GList *mem;
+        struct buddy *b;
+	struct group *g;
+	int pres, total;
+        char buf[BUF_LONG];
+
+        if (!(display_options & OPT_DISP_SHOW_GRPNUM))
+                return;
+
+        while(grp) {
+		g = (struct group *)grp->data;
+                mem = g->members;
+                pres = 0;
+                total = 0;
+                while(mem) {
+			b = (struct buddy *)mem->data;
+                        if (b->present)
+                                pres++;
+                        total++;
+
+
+                        mem = mem->next;
+                }
+
+                g_snprintf(buf, sizeof(buf), "%s  (%d/%d)", g->name, pres, total);
+
+                gtk_label_set(GTK_LABEL(g->label), buf);
+                grp = grp->next;
+        }
+        
+}
+
+void update_show_idlepix()
+{
+	GList *grp = groups;
+	GList *mem;
+	struct group *g;
+        struct buddy *b;
+
+	while (grp) {
+                g = (struct group *)grp->data;
+                mem = g->members;
+
+                while(mem) {
+			b = (struct buddy *)mem->data;
+
+                        if (display_options & OPT_DISP_SHOW_IDLETIME)
+                                gtk_widget_show(b->idletime);
+                        else
+                                gtk_widget_hide(b->idletime);
+						
+                        if (display_options & OPT_DISP_SHOW_PIXMAPS)
+                                gtk_widget_show(b->pix);
+                        else
+                                gtk_widget_hide(b->pix);
+                        mem = mem->next;
+                }
+                grp = grp->next;
+        }
+}
+
+void update_all_buddies()
+{
+	GList *grp = groups;
+	GList *mem;
+        struct buddy *b;
+	struct group *g;
+
+        while(grp) {
+		g = (struct group *)grp->data;
+                mem = g->members;
+                while(mem) {
+			b = (struct buddy *)mem->data;
+
+                        set_buddy(b);
+                        
+                        mem = mem->next;
+                }
+                grp = grp->next;
+        }
+
+
+}
+
+void update_lagometer(int us)
+{
+        double pct;
+        
+
+        
+        if (us != -1)
+                last_lag_us = us;
+
+
+        if (lagometer_box == NULL)
+                return;
+
+        
+        if (!(general_options & OPT_GEN_SHOW_LAGMETER))
+                gtk_widget_hide(lagometer_box);
+        else
+                gtk_widget_show(lagometer_box);
+
+                
+        pct = last_lag_us/100000;
+        pct = 25 * log(pct);
+
+        if (pct < 0)
+                pct = 0;
+
+        if (pct > 100)
+                pct = 100;
+
+
+        pct /= 100;
+
+
+        gtk_progress_bar_update(GTK_PROGRESS_BAR(lagometer), pct);
+}
+
+static void adjust_pic(GtkWidget *button, const char *c, gchar **xpm)
+{
+        GdkPixmap *pm;
+        GdkBitmap *bm;
+        GtkWidget *pic;
+        GtkWidget *label;
+
+		/*if the user had opted to put pictures on the buttons*/
+        if (display_options & OPT_DISP_SHOW_BUTTON_XPM) {
+		pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm,
+						  NULL, xpm);
+		pic = gtk_pixmap_new(pm, bm);
+		gtk_widget_show(pic);
+		label = GTK_BIN(button)->child;
+		gtk_container_remove(GTK_CONTAINER(button), label);
+		gtk_container_add(GTK_CONTAINER(button), pic);
+        } else {
+		label = gtk_label_new(c);
+		gtk_widget_show(label);
+		pic = GTK_BIN(button)->child;
+		gtk_container_remove(GTK_CONTAINER(button), pic);
+		gtk_container_add(GTK_CONTAINER(button), label);
+	}
+
+}
+
+
+void update_button_pix()
+{
+
+        adjust_pic(addbutton, "Add", (gchar **)buddyadd_xpm);
+	adjust_pic(rembutton, "Remove", (gchar **)buddydel_xpm);
+	adjust_pic(chatbutton, "Chat", (gchar **)buddychat_xpm);
+        adjust_pic(imbutton, "IM", (gchar **)im_xpm);
+        adjust_pic(infobutton, "Info", (gchar **)info_xpm);
+        adjust_pic(addpermbutton, "Add", (gchar **)permadd_xpm);
+        adjust_pic(rempermbutton, "Remove", (gchar **)permdel_xpm);
+
+}
+
+
+
+#ifdef USE_APPLET
+gint applet_destroy_buddy( GtkWidget *widget, GdkEvent *event,gpointer *data ) {
+	GList *mem;
+	set_applet_draw_closed();
+	
+	/****NO LONGER NEEDED
+        while(groups) {
+		mem = ((struct group *)groups->data)->members;
+		while(mem) {
+			g_free(mem->data);
+                        mem = g_list_remove(mem, mem->data);
+		}
+		g_free(groups->data);
+                groups = g_list_remove(groups, groups->data);
+	}
+	
+	destroy_buddy();
+	*/
+	gnome_buddy_hide();
+	applet_widget_register_callback(APPLET_WIDGET(applet),
+			"buddy",
+			_("Buddy List"),
+			(AppletCallbackFunc)make_buddy,
+			NULL);
+	return (TRUE);
+}
+
+void gnome_buddy_show(){
+	gtk_widget_show( blist );
+}
+
+void gnome_buddy_hide(){
+	gtk_widget_hide( blist );
+}
+
+void gnome_buddy_set_pos( gint x, gint y ){
+	gtk_widget_set_uposition ( blist, x, y );
+}
+
+GtkRequisition gnome_buddy_get_dimentions(){
+	return blist->requisition;
+}
+
+#endif
+
+
+void signoff()
+{
+	GList *mem;
+        while(groups) {
+		mem = ((struct group *)groups->data)->members;
+		while(mem) {
+			g_free(mem->data);
+                        mem = g_list_remove(mem, mem->data);
+		}
+		g_free(groups->data);
+                groups = g_list_remove(groups, groups->data);
+	}
+
+	serv_close();
+        destroy_all_dialogs();
+        destroy_buddy();
+        hide_login_progress("");
+#ifdef USE_APPLET
+        set_applet_draw_closed();
+        applet_widget_unregister_callback(APPLET_WIDGET(applet),"signoff");
+	applet_widget_unregister_callback(APPLET_WIDGET(applet),"away");
+	applet_widget_unregister_callback(APPLET_WIDGET(applet),"buddy");
+        applet_widget_register_callback(APPLET_WIDGET(applet),
+                "signon",
+                _("Signon"),
+                applet_show_login,
+                NULL);
+#else
+        show_login();
+#endif /* USE_APPLET */
+}
+
+void handle_click_group(GtkWidget *widget, GdkEventButton *event, gpointer func_data)
+{
+	if (event->type == GDK_2BUTTON_PRESS) {
+		if (GTK_TREE_ITEM(widget)->expanded)
+			gtk_tree_item_collapse(GTK_TREE_ITEM(widget));
+		else
+			gtk_tree_item_expand(GTK_TREE_ITEM(widget));
+	} else {
+	}
+}
+
+void pressed_im(GtkWidget *widget, struct buddy *b)
+{
+	struct conversation *c;
+
+	c = find_conversation(b->name);
+
+	if (c != NULL) {
+		gdk_window_raise(c->window->window);
+	} else {
+		c = new_conversation(b->name);
+	}
+}
+
+void pressed_info(GtkWidget *widget, struct buddy *b)
+{
+        serv_get_info(b->name);
+
+}
+
+void pressed_dir_info(GtkWidget *widget, struct buddy *b)
+{
+        serv_get_dir(b->name);
+
+}
+
+void handle_click_buddy(GtkWidget *widget, GdkEventButton *event, struct buddy *b)
+{
+        if (event->type == GDK_2BUTTON_PRESS && event->button == 1) {
+                struct conversation *c;
+
+                c = find_conversation(b->name);
+
+                if (c != NULL) {
+                        gdk_window_raise(c->window->window);
+                } else {
+                        c = new_conversation(b->name);
+                }
+	} else if (event->type == GDK_BUTTON_PRESS && event->button == 3) {
+                GtkWidget *menu, *button;
+		/* We're gonna make us a menu right here */
+
+		menu = gtk_menu_new();
+
+		button = gtk_menu_item_new_with_label("IM");
+		gtk_signal_connect(GTK_OBJECT(button), "activate",
+				   GTK_SIGNAL_FUNC(pressed_im), b);
+		gtk_menu_append(GTK_MENU(menu), button);
+		gtk_widget_show(button);
+
+		button = gtk_menu_item_new_with_label("Info");
+		gtk_signal_connect(GTK_OBJECT(button), "activate",
+				   GTK_SIGNAL_FUNC(pressed_info), b);
+		gtk_menu_append(GTK_MENU(menu), button);
+		gtk_widget_show(button);
+
+		button = gtk_menu_item_new_with_label("Dir Info");
+		gtk_signal_connect(GTK_OBJECT(button), "activate",
+				   GTK_SIGNAL_FUNC(pressed_dir_info), b);
+		gtk_menu_append(GTK_MENU(menu), button);
+		gtk_widget_show(button);
+
+		button = gtk_menu_item_new_with_label("Toggle Logging");
+		gtk_signal_connect(GTK_OBJECT(button), "activate",
+				   GTK_SIGNAL_FUNC(log_callback), b->name);
+		gtk_menu_append(GTK_MENU(menu), button);
+		gtk_widget_show(button);
+
+		button = gtk_menu_item_new_with_label("Add Buddy Pounce");
+		gtk_signal_connect(GTK_OBJECT(button), "activate",
+				   GTK_SIGNAL_FUNC(new_bp_callback), b->name);
+		gtk_menu_append(GTK_MENU(menu), button);
+		gtk_widget_show(button);
+
+                
+		
+		gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
+			       event->button, event->time);
+
+	} else if (event->type == GDK_3BUTTON_PRESS && event->button == 2) {
+		if (!strcasecmp("zilding", normalize(b->name)))
+			show_ee_dialog(0);
+		else if (!strcasecmp("robflynn", normalize(b->name)))
+			show_ee_dialog(1);
+		else if (!strcasecmp("flynorange", normalize(b->name)))
+			show_ee_dialog(2);
+
+	} else {
+		
+                /* Anything for other buttons? :) */
+	}
+}
+
+
+
+void remove_buddy(struct group *rem_g, struct buddy *rem_b)
+{
+	GList *grp;
+	GList *mem;
+	
+	struct group *delg;
+	struct buddy *delb;
+
+	grp = g_list_find(groups, rem_g);
+        delg = (struct group *)grp->data;
+        mem = delg->members;
+	
+        mem = g_list_find(mem, rem_b);
+        delb = (struct buddy *)mem->data;
+	
+	gtk_tree_remove_items(GTK_TREE(delg->tree), g_list_append(NULL, delb->item));
+        delg->members = g_list_remove(delg->members, delb);
+        serv_remove_buddy(delb->name);
+        g_free(delb);
+
+        serv_save_config();
+        
+	update_num_groups();
+
+
+}
+
+void remove_group(struct group *rem_g)
+{
+	GList *grp;
+	GList *mem;
+	
+	struct group *delg;
+	struct buddy *delb;
+
+	grp = g_list_find(groups, rem_g);
+        delg = (struct group *)grp->data;
+        mem = delg->members;
+
+	while(delg->members) {
+		delb = (struct buddy *)delg->members->data;
+		gtk_tree_remove_items(GTK_TREE(delg->tree), g_list_append(NULL, delb->item));
+                delg->members = g_list_remove(delg->members, delb);
+                serv_remove_buddy(delb->name);
+                g_free(delb);
+	}
+
+
+	gtk_tree_remove_items(GTK_TREE(buddies), g_list_append(NULL, delg->item));
+	groups = g_list_remove(groups, delg);
+	g_free(delg);
+
+        serv_save_config();
+}
+
+
+
+void build_permit_tree()
+{
+	GtkWidget *ti;
+        GtkWidget *sub;
+        GList *plist = permit;
+        GList *dlist = deny;
+
+        gtk_tree_clear_items(GTK_TREE(permtree), 0, -1);
+
+        ti = gtk_tree_item_new_with_label("Permit");
+        sub = gtk_tree_new();
+        gtk_widget_show(ti);
+        gtk_widget_show(sub);
+        gtk_tree_prepend(GTK_TREE(permtree), ti);
+        gtk_tree_item_set_subtree(GTK_TREE_ITEM(ti), sub);
+        gtk_tree_item_expand(GTK_TREE_ITEM(ti));
+        
+        while(plist) {
+                ti = gtk_tree_item_new_with_label((char *)plist->data);
+                gtk_widget_show(ti);
+                gtk_tree_prepend(GTK_TREE(sub), ti);
+                plist = plist->next;
+        }
+
+
+        ti = gtk_tree_item_new_with_label("Deny");
+        sub = gtk_tree_new();
+        gtk_widget_show(ti);
+        gtk_widget_show(sub);
+        gtk_tree_prepend(GTK_TREE(permtree), ti);
+        gtk_tree_item_set_subtree(GTK_TREE_ITEM(ti), sub);
+        gtk_tree_item_expand(GTK_TREE_ITEM(ti));
+        
+        while(dlist) {
+                ti = gtk_tree_item_new_with_label((char *)dlist->data);
+                gtk_widget_show(ti);
+                gtk_tree_prepend(GTK_TREE(sub), ti);
+                dlist = dlist->next;
+        }
+
+	
+}
+
+
+gboolean edit_drag_compare_func (GtkCTree *ctree, GtkCTreeNode *source_node,
+				 GtkCTreeNode *new_parent, GtkCTreeNode *new_sibling)
+{
+        gboolean leaf;
+
+	gtk_ctree_get_node_info (ctree, source_node, NULL,
+				 NULL, NULL, NULL, NULL, NULL, &leaf, NULL);
+
+	
+	if (leaf) {
+		if (!new_parent)
+			return FALSE;
+	} else {
+		
+		if (new_parent)
+			return FALSE;
+		
+	}
+
+	return TRUE;
+}
+
+
+
+static void edit_tree_move (GtkCTree *ctree, GtkCTreeNode *child, GtkCTreeNode *parent,
+                 GtkCTreeNode *sibling, gpointer data)
+{
+	char *source;
+	char *target1;
+        char *target2;
+	
+	gtk_ctree_get_node_info (ctree, child, &source,
+				 NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+	if (parent)
+		gtk_ctree_get_node_info (ctree, parent, &target1,
+					 NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+	if (sibling)
+		gtk_ctree_get_node_info (ctree, sibling, &target2,
+					 NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+	
+	if (!parent) {
+		GList *grps, *buds;
+		struct group *g, *g2;
+		GList *tmp;
+		int pos;
+		struct buddy *b;
+		/* Okay we've moved group order... */
+
+		g = find_group(source);
+
+                gtk_widget_ref(g->tree);
+
+		buds = g->members;
+		while(buds) {
+			b = (struct buddy *)buds->data;
+			gtk_widget_ref(b->item);
+			gtk_widget_ref(b->label);
+			gtk_widget_ref(b->idletime);
+			gtk_widget_ref(b->pix);
+			buds = buds->next;
+		}
+
+		
+
+		
+		pos = g_list_index(GTK_TREE(buddies)->children, g->item);
+
+                tmp = g_list_append(NULL, g->item);
+		gtk_tree_remove_items(GTK_TREE(buddies), tmp);
+		g_list_free(tmp);
+
+                groups = g_list_remove(groups, g);
+
+                g->item = gtk_tree_item_new_with_label(g->name);
+                gtk_widget_show(g->item);
+
+		if (sibling) {
+			g2 = find_group(target2);
+                        pos = g_list_index(groups, g2);
+                        if (pos == 0) {
+				groups = g_list_prepend(groups, g);
+				gtk_tree_prepend(GTK_TREE(buddies), g->item);
+			} else {
+				groups = g_list_insert(groups, g, pos);
+				gtk_tree_insert(GTK_TREE(buddies), g->item, pos);
+			}
+         
+		} else {
+			groups = g_list_append(groups, g);
+			gtk_tree_append(GTK_TREE(buddies), g->item);
+
+		}
+
+		gtk_tree_item_set_subtree (GTK_TREE_ITEM(g->item), g->tree);
+                gtk_tree_item_expand (GTK_TREE_ITEM(g->item));
+                gtk_signal_connect(GTK_OBJECT(g->item), "button_press_event",
+                                   GTK_SIGNAL_FUNC(handle_click_group),
+                                   NULL);
+                gtk_object_set_user_data(GTK_OBJECT(g->item), NULL);
+
+                gtk_widget_unref(g->tree);
+
+                update_num_groups();
+
+
+		buds = g->members;
+
+		while(buds) {
+			b = (struct buddy *)buds->data;
+			set_buddy(b);
+			buds = buds->next;
+		}
+
+		grps = groups;
+		while(grps) {
+			g = (struct group *)grps->data;
+			grps = grps->next;
+		}
+
+        } else {
+                struct group *new_g, *old_g;
+                struct buddy *b, *s;
+                GtkWidget *gtree;
+                GtkWidget *owner;
+                GList *temp;
+                int pos;
+
+                b = find_buddy(source);
+                new_g = find_group(target1);
+                old_g = find_group_by_buddy(source);
+                gtree = old_g->tree;
+                if (sibling)
+                        s = find_buddy(target2);
+                else
+                        s = NULL;
+
+                old_g->members = g_list_remove(old_g->members, b);
+
+                gtk_widget_ref(b->item);
+                gtk_widget_ref(b->label);
+                gtk_widget_ref(b->pix);
+                gtk_widget_ref(b->idletime);
+                gtk_widget_ref(gtree);
+
+                owner = GTK_TREE(gtree)->tree_owner;
+                
+                temp = g_list_append(NULL, b->item);
+                gtk_tree_remove_items(GTK_TREE(old_g->tree), temp);
+                g_list_free(temp);
+
+                if (gtree->parent == NULL){
+                        gtk_tree_item_set_subtree (GTK_TREE_ITEM(owner), gtree);
+                        gtk_tree_item_expand (GTK_TREE_ITEM(owner));
+                }
+                
+                if (!sibling) {
+                        gtk_tree_append(GTK_TREE(new_g->tree), b->item);
+                        new_g->members = g_list_append(new_g->members, b);
+                } else {
+                        pos = g_list_index(new_g->members, s);
+                        if (pos != 0) {
+                                new_g->members = g_list_insert(new_g->members, b, pos);
+                                gtk_tree_insert(GTK_TREE(new_g->tree), b->item, pos);
+                        } else {
+                                new_g->members = g_list_prepend(new_g->members, b);
+                                gtk_tree_prepend(GTK_TREE(new_g->tree), b->item);
+
+                        }
+                }
+
+                gtk_widget_unref(b->item);
+                gtk_widget_unref(b->label);
+                gtk_widget_unref(b->pix);
+                gtk_widget_unref(b->idletime);
+                gtk_widget_unref(gtree);
+
+                gtk_ctree_expand(ctree, parent);
+                
+                update_num_groups();
+                update_show_idlepix();
+                set_buddy(b);
+                
+
+
+
+
+        }
+
+        serv_save_config();
+}
+
+
+
+void build_edit_tree()
+{
+        GtkCTreeNode *p = NULL, *n;
+	GList *grp = groups;
+	GList *mem;
+	struct group *g;
+	struct buddy *b;
+	char *text[1];
+
+	gtk_clist_freeze(GTK_CLIST(edittree));
+	gtk_clist_clear(GTK_CLIST(edittree));
+	
+        
+	while(grp) {
+		g = (struct group *)grp->data;
+
+                text[0] = g->name;
+		
+		p = gtk_ctree_insert_node(GTK_CTREE(edittree), NULL,
+					     NULL, text, 5, NULL, NULL,
+					     NULL, NULL, 0, 1);
+
+		n = NULL;
+		
+		mem = g->members;
+
+                while(mem) {
+			b = (struct buddy *)mem->data;
+
+			text[0] = b->name;
+
+			n = gtk_ctree_insert_node(GTK_CTREE(edittree),
+						  p, NULL, text, 5,
+						  NULL, NULL,
+						  NULL, NULL, 1, 1);
+
+			mem = mem->next;
+                        
+ 		}
+		grp = grp->next;
+	}
+
+	gtk_clist_thaw(GTK_CLIST(edittree));
+	
+}
+
+struct buddy *add_buddy(char *group, char *buddy)
+{
+	struct buddy *b;
+	struct group *g;
+	GdkPixmap *pm;
+	GdkBitmap *bm;
+	GtkWidget *box;
+
+
+	if ((b = find_buddy(buddy)) != NULL)
+                return b;
+
+	g = find_group(group);
+
+	if (g == NULL)
+		g = add_group(group);
+	
+        b = (struct buddy *)g_new0(struct buddy, 1);
+        
+	if (!b)
+		return NULL;
+
+	b->present = 0;
+        b->item = gtk_tree_item_new();
+
+	g_snprintf(b->name, sizeof(b->name), "%s", buddy);
+        g->members = g_list_append(g->members, b);
+
+
+        if (blist == NULL)
+                return b;
+        
+	box = gtk_hbox_new(FALSE, 1);
+	pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm,
+					  NULL, (gchar **)login_icon_xpm);
+        b->pix = gtk_pixmap_new(pm, bm);
+
+        b->idle = 0;
+			
+	gtk_widget_show(b->pix);
+
+	b->label = gtk_label_new(buddy);
+	gtk_misc_set_alignment(GTK_MISC(b->label), 0.0, 0.5);
+
+	b->idletime = gtk_label_new("");
+
+	gtk_tree_append(GTK_TREE(g->tree),b->item);
+	gtk_container_add(GTK_CONTAINER(b->item), box);
+
+	gtk_box_pack_start(GTK_BOX(box), b->pix, FALSE, FALSE, 1);
+	gtk_box_pack_start(GTK_BOX(box), b->label, TRUE, TRUE, 1);
+	gtk_box_pack_start(GTK_BOX(box), b->idletime, FALSE, FALSE, 1);
+
+	gtk_widget_show(b->label);
+	gtk_widget_show(box);
+
+	gtk_object_set_user_data(GTK_OBJECT(b->item), b);
+
+	gtk_signal_connect(GTK_OBJECT(b->item), "button_press_event",
+			   GTK_SIGNAL_FUNC(handle_click_buddy), b);
+	
+	return b;
+}
+
+
+struct group *add_group(char *group)
+{
+	struct group *g;
+	g = (struct group *)g_new0(struct group, 1);
+	if (!g)
+		return NULL;
+
+	strncpy(g->name, group, sizeof(g->name));
+        groups = g_list_append(groups, g);
+
+        if (blist == NULL)
+                return g;
+        
+        g->item = gtk_tree_item_new();
+        g->label = gtk_label_new(g->name);
+        gtk_misc_set_alignment(GTK_MISC(g->label), 0.0, 0.5);
+        gtk_widget_show(g->label);
+        gtk_container_add(GTK_CONTAINER(g->item), g->label);
+	g->tree = gtk_tree_new();
+	gtk_widget_show(g->item);
+	gtk_widget_show(g->tree);
+	gtk_tree_append(GTK_TREE(buddies), g->item);
+	gtk_tree_item_set_subtree(GTK_TREE_ITEM(g->item), g->tree);
+	gtk_tree_item_expand(GTK_TREE_ITEM(g->item));
+	gtk_signal_connect(GTK_OBJECT(g->item), "button_press_event",
+			   GTK_SIGNAL_FUNC(handle_click_group),
+			   NULL);
+        gtk_object_set_user_data(GTK_OBJECT(g->item), NULL);
+	g->members = NULL;
+	
+ 
+	build_edit_tree();
+	
+	return g;
+	
+}
+
+
+static void do_del_buddy(GtkWidget *w, GtkCTree *ctree)
+{
+	GtkCTreeNode *node;
+        char *bud, *grp;
+	struct buddy *b;
+	struct group *g;
+	GList *i;
+	
+	i = GTK_CLIST(edittree)->selection;
+	if (i) {
+		node = i->data;
+
+		if (GTK_CTREE_ROW(node)->is_leaf) {
+                        gtk_ctree_get_node_info (GTK_CTREE(edittree), node, &bud,
+						 NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+			b = find_buddy(bud);
+			g = find_group_by_buddy(bud);
+			remove_buddy(g, b);
+		} else {
+			gtk_ctree_get_node_info (ctree, node, &grp,
+						 NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+			g = find_group(grp);
+                        remove_group(g);
+                }
+                
+                build_edit_tree();
+                serv_save_config();
+        } else {
+                /* Nothing selected. */
+        }
+        update_num_groups();
+}
+
+static void do_del_perm(GtkWidget *w, GtkTree *permtree)
+{
+	GtkLabel *label, *plabel;
+	GtkWidget *item, *pitem;
+	char *c, *d;
+	GList *i;
+	
+        GList *plist;
+        GList *dlist;
+	int level;
+
+        plist = permit;
+        dlist = deny;
+        
+	i = GTK_TREE_SELECTION(permtree);
+	if (i) {
+		item = GTK_WIDGET(i->data);
+		gtk_tree_unselect_child(GTK_TREE(permtree), item);
+		label = GTK_LABEL(GTK_BIN(item)->child);
+		gtk_label_get(label, &c);
+		level = GTK_TREE(item->parent)->level;
+		if (level > 0) {
+			pitem = GTK_WIDGET(GTK_TREE(item->parent)->tree_owner);
+			plabel = GTK_LABEL(GTK_BIN(pitem)->child);
+			gtk_label_get(plabel, &d);
+                        if (!strcasecmp(d, "Permit")) {
+                                while(plist) {
+                                        if (!strcasecmp((char *)(plist->data), c)) {
+                                                permit = g_list_remove(permit, plist->data);
+                                                break;
+                                        }
+
+                                        plist = plist->next;
+                                }
+
+                        } else {
+                                while(dlist) {
+                                        if (!strcasecmp((char *)(dlist->data), c)) {
+                                                deny = g_list_remove(deny, dlist->data);
+                                                
+                                                break;
+                                        }
+                                        dlist = dlist->next;
+                                }
+
+                        }
+
+                        
+                } else {
+                        /* Can't delete groups here! :) */
+                        return;
+                }
+                serv_set_permit_deny();
+		gtk_tree_clear_items(GTK_TREE(permtree), 0, -1);
+                build_permit_tree();
+                serv_save_config();
+	}
+}
+
+
+
+void gaimreg_callback(GtkWidget *widget)
+{
+	show_register_dialog(); 
+}
+
+void import_callback(GtkWidget *widget, void *null)
+{
+        show_import_dialog();
+}
+
+void export_callback(GtkWidget *widget, void *null)
+{
+        show_export_dialog();
+}
+
+
+
+void do_quit()
+{
+	exit(0);
+}
+
+void add_buddy_callback(GtkWidget *widget, void *dummy)
+{
+	char *grp = NULL;
+	GtkCTreeNode *node;
+	GList *i;
+
+	i = GTK_CLIST(edittree)->selection;
+	if (i) {
+		node = i->data;
+
+		if (GTK_CTREE_ROW(node)->is_leaf) {
+			node = GTK_CTREE_ROW(node)->parent;
+		}
+
+		gtk_ctree_get_node_info (GTK_CTREE(edittree), node, &grp,
+					 NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+	}
+	show_add_buddy(NULL, grp);
+
+}
+
+void add_perm_callback(GtkWidget *widget, void *dummy)
+{
+        show_add_perm(NULL);
+}
+
+
+static void info_callback(GtkWidget *widget, GtkTree *tree)
+{
+	GList *i;
+	struct buddy *b = NULL;
+	i = GTK_TREE_SELECTION(tree);
+	if (i) {
+		b = gtk_object_get_user_data(GTK_OBJECT(i->data));
+        } else {
+		return;
+        }
+	if (!b->name)
+		return;
+        serv_get_info(b->name);
+}
+
+
+void chat_callback(GtkWidget *widget, GtkTree *tree)
+{
+	join_chat();
+}
+
+struct group *find_group(char *group)
+{
+	struct group *g;
+        GList *grp = groups;
+	char *grpname = g_malloc(strlen(group) + 1);
+
+	strcpy(grpname, normalize(group));
+	while (grp) {
+		g = (struct group *)grp->data;
+		if (!strcasecmp(normalize(g->name), grpname)) {
+				g_free(grpname);
+				return g;
+		}
+		grp = grp->next;
+	}
+
+	g_free(grpname);
+	return NULL;	
+	
+}
+
+
+struct group *find_group_by_buddy(char *who)
+{
+	struct group *g;
+	struct buddy *b;
+	GList *grp = groups;
+	GList *mem;
+        char *whoname = g_malloc(strlen(who) + 1);
+
+	strcpy(whoname, normalize(who));
+	
+	while(grp) {
+		g = (struct group *)grp->data;
+
+		mem = g->members;
+		while(mem) {
+			b = (struct buddy *)mem->data;
+			if (!strcasecmp(normalize(b->name), whoname)) {
+				g_free(whoname);
+				return g;
+			}
+			mem = mem->next;
+		}
+		grp = grp->next;
+	}
+	g_free(whoname);
+	return NULL;
+}
+
+
+struct buddy *find_buddy(char *who)
+{
+	struct group *g;
+	struct buddy *b;
+	GList *grp = groups;
+	GList *mem;
+        char *whoname = g_malloc(strlen(who) + 1);
+
+	strcpy(whoname, normalize(who));
+	
+	while(grp) {
+		g = (struct group *)grp->data;
+
+		mem = g->members;
+		while(mem) {
+			b = (struct buddy *)mem->data;
+			if (!strcasecmp(normalize(b->name), whoname)) {
+				g_free(whoname);
+				return b;
+			}
+			mem = mem->next;
+		}
+		grp = grp->next;
+	}
+	g_free(whoname);
+	return NULL;
+}
+
+
+void rem_bp(GtkWidget *w, struct buddy_pounce *b)
+{
+	buddy_pounces = g_list_remove(buddy_pounces, b);
+}
+
+void do_pounce(char *name)
+{
+        char *who = g_malloc(64);
+        char *buf = g_malloc(BUF_LONG);
+        
+        struct buddy_pounce *b;
+	struct conversation *c;
+
+	GList *bp = buddy_pounces;
+        
+        strcpy(who, normalize(name));
+
+	while(bp) {
+		b = (struct buddy_pounce *)bp->data;;
+                if (!strcasecmp(who, normalize(b->name))) {
+			if (b->popup == 1)
+			{
+				c = find_conversation(name);
+				if (c == NULL)
+					c = new_conversation(name);
+			}
+			if (b->sendim == 1)
+			{
+                        	c = find_conversation(name);
+                        	if (c == NULL)
+                                	c = new_conversation(name);
+
+                        	write_to_conv(c, b->message, WFLAG_SEND);
+
+                        	escape_text(b->message);
+
+                                serv_send_im(name, b->message, 0);
+			}
+                        
+                        rem_bp(NULL, b);
+                        
+                }
+                bp = bp->next;
+        }
+        g_free(who);
+        g_free(buf);
+}
+
+static void new_bp_callback(GtkWidget *w, char *name)
+{
+        show_new_bp(name);
+}
+
+static void log_callback(GtkWidget *w, char *name)
+{
+	struct conversation *c = find_conversation(name);
+
+	if (find_log_info(name))
+	{
+		if (c) { 
+			set_state_lock(1);
+			gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(c->log_button), FALSE);
+			set_state_lock(0);
+		}
+		rm_log(find_log_info(name));
+	}
+	else
+	{
+		show_log_dialog(name);
+		if (c) {
+			set_state_lock(1);
+			gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(c->log_button), TRUE);
+			set_state_lock(0);
+		}
+	}
+}
+
+void do_bp_menu()
+{
+	GtkWidget *menuitem, *mess, *messmenu;
+	static GtkWidget *remmenu;
+        GtkWidget *remitem;
+        GtkWidget *sep;
+	GList *l;
+	struct buddy_pounce *b;
+	GList *bp = buddy_pounces;
+	
+	l = gtk_container_children(GTK_CONTAINER(bpmenu));
+	
+	while(l) {
+		gtk_widget_destroy(GTK_WIDGET(l->data));
+		l = l->next;
+	}
+
+	remmenu = gtk_menu_new();
+	
+	menuitem = gtk_menu_item_new_with_label("New Buddy Pounce");
+	gtk_menu_append(GTK_MENU(bpmenu), menuitem);
+	gtk_widget_show(menuitem);
+	gtk_signal_connect(GTK_OBJECT(menuitem), "activate", GTK_SIGNAL_FUNC(new_bp_callback), NULL);
+
+
+	while(bp) {
+
+		b = (struct buddy_pounce *)bp->data;
+		remitem = gtk_menu_item_new_with_label(b->name);
+		gtk_menu_append(GTK_MENU(remmenu), remitem);
+		gtk_widget_show(remitem);
+		gtk_signal_connect(GTK_OBJECT(remitem), "activate", GTK_SIGNAL_FUNC(rem_bp), b);
+
+		bp = bp->next;
+
+	}
+	
+	menuitem = gtk_menu_item_new_with_label("Remove Buddy Pounce");
+	gtk_menu_append(GTK_MENU(bpmenu), menuitem);
+	gtk_widget_show(menuitem);
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), remmenu);
+        gtk_widget_show(remmenu);
+
+
+        sep = gtk_hseparator_new();
+	menuitem = gtk_menu_item_new();
+	gtk_menu_append(GTK_MENU(bpmenu), menuitem);
+	gtk_container_add(GTK_CONTAINER(menuitem), sep);
+	gtk_widget_set_sensitive(menuitem, FALSE);
+	gtk_widget_show(menuitem);
+	gtk_widget_show(sep);
+
+	bp = buddy_pounces;;
+	
+	while(bp) {
+
+                b = (struct buddy_pounce *)bp->data;
+		
+		menuitem = gtk_menu_item_new_with_label(b->name);
+		gtk_menu_append(GTK_MENU(bpmenu), menuitem);
+                messmenu = gtk_menu_new();
+                gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), messmenu);
+                gtk_widget_show(menuitem);
+                
+
+
+                mess = gtk_menu_item_new_with_label(b->message);
+                gtk_menu_append(GTK_MENU(messmenu), mess);
+                gtk_widget_show(mess);
+
+                bp = bp->next;
+
+	}
+
+}
+
+
+gint log_timeout(char *name)
+{
+	struct buddy *b;
+	
+	b = find_buddy(name);
+
+	if(!b)
+                return FALSE;
+
+        b->log_timer = 0;
+			
+	if (!b->present)
+		gtk_widget_hide(b->item);
+	else
+		set_buddy(b);
+	
+	return FALSE;
+}
+
+
+void set_buddy(struct buddy *b)
+{
+	char *who;
+	char infotip[256];
+        char idlet[16];
+        char warn[256];
+        int i;
+        int ihrs, imin;
+        time_t t;
+	GdkPixmap *pm;
+        GdkBitmap *bm;
+        char *itime, *sotime;
+	
+        if (b->present) {
+                time(&t);
+
+                ihrs = (t - b->idle) / 3600;
+                imin = ((t - b->idle) / 60) % 60;
+
+                if (ihrs)
+                        g_snprintf(idlet, sizeof(idlet), "(%d:%02d)", ihrs, imin);
+                else
+                        g_snprintf(idlet, sizeof(idlet), "(%02d)", imin);
+                
+                gtk_widget_hide(b->idletime);
+                
+		if (b->idle)
+			gtk_label_set(GTK_LABEL(b->idletime), idlet);
+		else
+			gtk_label_set(GTK_LABEL(b->idletime), "");
+                if (display_options & OPT_DISP_SHOW_IDLETIME)
+                        gtk_widget_show(b->idletime);
+
+
+                sotime = sec_to_text(t - b->signon + correction_time);
+                if (b->idle) {
+                        itime = sec_to_text(t - b->idle);
+                } else {
+                        itime = g_malloc(1);
+                        itime[0] = 0;
+                }
+		
+		if (b->evil) {
+			g_snprintf(warn, sizeof(warn), "Warnings: %d%%\n", b->evil);
+
+		} else
+			warn[0] = '\0';
+		
+                i = g_snprintf(infotip, sizeof(infotip), "Name: %s                \nLogged in: %s\n%s%s%s", b->name, sotime, warn, ((b->idle) ? "Idle: " : ""),  itime);
+		
+		gtk_tooltips_set_tip(tips, GTK_WIDGET(b->item), infotip, "");
+
+                g_free(sotime);
+                g_free(itime);
+
+                
+
+                if (!GTK_WIDGET_VISIBLE(b->item)) {
+			
+			play_sound(BUDDY_ARRIVE);
+
+			who = g_malloc(sizeof(b->name) + 10);
+			strcpy(who, b->name);
+	
+			g_free(who);
+			pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm,
+				NULL, (gchar **)login_icon_xpm);
+			gtk_widget_hide(b->pix);
+			gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm);
+                        if (display_options & OPT_DISP_SHOW_PIXMAPS)
+				gtk_widget_show(b->pix);
+
+			if (display_options & OPT_DISP_SHOW_LOGON) {
+				struct conversation *c = find_conversation(b->name);
+				if (c) {
+					char tmp[1024];
+
+					
+					g_snprintf(tmp, sizeof(tmp), "<HR><B>%s logged in%s%s.</B><BR><HR>", b->name,
+                                                   ((display_options & OPT_DISP_SHOW_TIME) ? " @ " : ""),
+                                                   ((display_options & OPT_DISP_SHOW_TIME) ? date() : ""));
+
+
+					write_to_conv(c, tmp, WFLAG_SYSTEM);
+
+				}
+			}
+
+			
+			gtk_widget_show(b->item);
+			gtk_widget_show(b->label);
+                        b->log_timer = gtk_timeout_add(10000, (GtkFunction) log_timeout, b->name);
+                        update_num_groups();
+                        update_show_idlepix();
+                        setup_buddy_chats();
+			return;
+                }
+
+
+                
+                if (!b->log_timer) {
+                        gtk_widget_hide(b->pix);
+                        if (b->uc & UC_UNAVAILABLE) {
+                                pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm,
+                                                                  NULL, (gchar **)away_icon_xpm);
+                                gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm);
+                        } else if (b->uc & UC_AOL) {
+                                pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm,
+                                                                  NULL, (gchar **)aol_icon_xpm);
+                                gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm);
+                        } else if (b->uc & UC_NORMAL) {
+                                pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm,
+                                                                  NULL, (gchar **)free_icon_xpm);
+                                gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm);
+                        } else if (b->uc & UC_ADMIN) {
+                                pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm,
+                                                                  NULL, (gchar **)admin_icon_xpm);
+                                gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm);
+                        } else if (b->uc & UC_UNCONFIRMED) {
+                                pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm,
+                                                                  NULL, (gchar **)dt_icon_xpm);
+                                gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm);
+                        } else {
+                                pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm,
+                                                                  NULL, (gchar **)no_icon_xpm);
+                                gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm);
+                        }
+                        if (display_options & OPT_DISP_SHOW_PIXMAPS)
+                                gtk_widget_show(b->pix);
+                }
+	
+
+
+	} else {
+		if (GTK_WIDGET_VISIBLE(b->item)) {
+			play_sound(BUDDY_LEAVE);
+			pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm,
+				NULL, (gchar **)logout_icon_xpm);
+			gtk_widget_hide(b->pix);
+			gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm);
+                        if (display_options & OPT_DISP_SHOW_PIXMAPS)
+				gtk_widget_show(b->pix);
+			if (display_options & OPT_DISP_SHOW_LOGON) {
+				struct conversation *c = find_conversation(b->name);
+				if (c) {
+					char tmp[1024];
+
+					
+					g_snprintf(tmp, sizeof(tmp), "<HR><B>%s logged out%s%s.</B><BR><HR>", b->name,
+                                                   ((display_options & OPT_DISP_SHOW_TIME) ? " @ " : ""),
+                                                   ((display_options & OPT_DISP_SHOW_TIME) ? date() : ""));
+
+
+					write_to_conv(c, tmp, WFLAG_SYSTEM);
+
+				}
+			}
+                        b->log_timer = gtk_timeout_add(10000, (GtkFunction)log_timeout, b->name);
+                        update_num_groups();
+                        update_show_idlepix();
+		}
+        }
+        setup_buddy_chats();
+}
+
+
+static void set_permit(GtkWidget *w, int *data)
+{
+	permdeny = (int)data;
+/*	printf("BLAH BLAH %d %d", permdeny, (int) data); */
+	/* We don't save this 'at home', it's on the server.
+         * So, we gotta resend the config to the server. */
+        serv_save_config();
+}
+
+
+static void move_blist_window(GtkWidget *w, GdkEventConfigure *e, void *dummy)
+{
+        int x, y, width, height;
+        int save = 0;
+        gdk_window_get_position(blist->window, &x, &y);
+        gdk_window_get_size(blist->window, &width, &height);
+
+        if(e->send_event) { /* Is a position event */
+                if (blist_pos.x != x || blist_pos.y != y)
+                        save = 1;
+                blist_pos.x = x;
+                blist_pos.y = y;
+        } else { /* Is a size event */
+                if (blist_pos.xoff != x || blist_pos.yoff != y ||
+                   blist_pos.width != width || blist_pos.width != width)
+                        save = 1;
+
+                blist_pos.width = width;
+                blist_pos.height = height;
+                blist_pos.xoff = x;
+                blist_pos.yoff = y;
+        }
+
+        if (save)
+                save_prefs();
+
+}
+
+
+/*******************************************************************
+ *
+ * Helper funs for making the menu
+ *
+ *******************************************************************/
+
+void gaim_seperator(GtkWidget *menu)
+{
+	GtkWidget *sep, *menuitem;
+	sep = gtk_hseparator_new();
+	menuitem = gtk_menu_item_new();
+	gtk_menu_append(GTK_MENU(menu), menuitem);
+	gtk_container_add(GTK_CONTAINER(menuitem), sep);
+	gtk_widget_set_sensitive(menuitem, FALSE);
+	gtk_widget_show(menuitem);
+	gtk_widget_show(sep);
+}
+
+GtkWidget *gaim_new_item(GtkWidget *menu, const char *str, GtkSignalFunc sf)
+{
+	GtkWidget *menuitem;
+	menuitem = gtk_menu_item_new_with_label(str);
+        if (menu)
+		gtk_menu_append(GTK_MENU(menu), menuitem);
+	gtk_widget_show(menuitem);
+	if (sf)
+		gtk_signal_connect(GTK_OBJECT(menuitem), "activate", sf, NULL);
+	return menuitem;
+}
+
+
+
+
+
+void show_buddy_list()
+{
+	
+	/* Build the buddy list, based on *config */
+        
+	GtkWidget *sw;
+	GtkWidget *menu;
+	GtkWidget *findmenu;
+	GtkWidget *setmenu;
+	GtkWidget *menubar;
+	GtkWidget *vbox;
+	GtkWidget *hbox;
+	GtkWidget *menuitem;
+        GtkWidget *notebook;
+        GtkWidget *label;
+        GtkWidget *bbox;
+        GtkWidget *permopt;
+        GtkWidget *tbox;
+        GtkWidget *xbox;
+        GtkWidget *pbox;
+
+
+#ifdef USE_APPLET
+        blist = gtk_window_new(GTK_WINDOW_DIALOG);
+#else
+        blist = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+#endif
+        
+	gtk_widget_realize(blist);
+        aol_icon(blist->window);
+        
+        gtk_window_set_policy(GTK_WINDOW(blist), TRUE, TRUE, TRUE);
+        
+	menubar = gtk_menu_bar_new();
+	
+	menu = gtk_menu_new();
+
+
+	menuitem = gaim_new_item(NULL, "File", NULL);
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menu);
+	gtk_menu_bar_append(GTK_MENU_BAR(menubar), menuitem);
+
+	gaim_new_item(menu, "Add A Buddy", GTK_SIGNAL_FUNC(add_buddy_callback));
+        gaim_seperator(menu);
+        gaim_new_item(menu, "Import Buddy List", GTK_SIGNAL_FUNC(import_callback));
+        gaim_new_item(menu, "Export Buddy List", GTK_SIGNAL_FUNC(export_callback));
+	if (!(general_options & OPT_GEN_REGISTERED))
+	{
+        	gaim_seperator(menu);
+		gaim_new_item(menu, "Register", GTK_SIGNAL_FUNC(gaimreg_callback));
+	}
+	gaim_seperator(menu);
+	gaim_new_item(menu, "Signoff", GTK_SIGNAL_FUNC(signoff));
+
+#ifndef USE_APPLET
+	gaim_new_item(menu, "Quit", GTK_SIGNAL_FUNC(do_quit));
+#else
+	gaim_new_item(menu, "Close", GTK_SIGNAL_FUNC(applet_destroy_buddy));
+#endif
+
+	menu = gtk_menu_new();
+
+	menuitem = gaim_new_item(NULL, "Tools", NULL);
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menu);
+	gtk_menu_bar_append(GTK_MENU_BAR(menubar), menuitem);
+
+	awaymenu = gtk_menu_new();
+	menuitem = gaim_new_item(menu, "Away", NULL);
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), awaymenu);
+        do_away_menu();
+
+        bpmenu = gtk_menu_new();
+        menuitem = gaim_new_item(menu, "Buddy Pounce", NULL);
+        gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), bpmenu);
+        do_bp_menu();
+
+        gaim_seperator(menu);
+
+	findmenu = gtk_menu_new();
+	gtk_widget_show(findmenu);
+	menuitem = gaim_new_item(menu, "Search for Buddy", NULL);
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), findmenu);
+	gtk_widget_show(menuitem);
+	menuitem = gtk_menu_item_new_with_label("by Email");
+	gtk_menu_append(GTK_MENU(findmenu), menuitem);
+	gtk_signal_connect(GTK_OBJECT(menuitem), "activate", GTK_SIGNAL_FUNC(show_find_email), NULL);
+	gtk_widget_show(menuitem);
+	menuitem = gtk_menu_item_new_with_label("by Dir Info");
+	gtk_menu_append(GTK_MENU(findmenu), menuitem);
+	gtk_signal_connect(GTK_OBJECT(menuitem), "activate", GTK_SIGNAL_FUNC(show_find_info), NULL);
+ 	gtk_widget_show(menuitem);
+	
+
+	setmenu = gtk_menu_new();
+	gtk_widget_show(setmenu);
+	menuitem = gaim_new_item(menu, "Settings", NULL);
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), setmenu);
+	gtk_widget_show(menuitem);
+	menuitem = gtk_menu_item_new_with_label("User Info");
+	gtk_menu_append(GTK_MENU(setmenu), menuitem);
+	gtk_signal_connect(GTK_OBJECT(menuitem), "activate", GTK_SIGNAL_FUNC(show_set_info), NULL);
+	gtk_widget_show(menuitem);
+	menuitem = gtk_menu_item_new_with_label("Directory Info");
+	gtk_menu_append(GTK_MENU(setmenu), menuitem);
+	gtk_signal_connect(GTK_OBJECT(menuitem), "activate", GTK_SIGNAL_FUNC(show_set_dir), NULL);	
+	gtk_widget_show(menuitem);
+
+	/* Ok, this is the menu hookup for the plugin stuff */
+#ifdef GAIM_PLUGINS
+	gaim_seperator(menu);
+	
+	gaim_new_item(menu, "Plugins", GTK_SIGNAL_FUNC(show_plugins));
+#endif
+
+        /*---------------*/
+
+	gaim_seperator(menu);
+
+        gaim_new_item(menu, "Preferences", GTK_SIGNAL_FUNC(show_prefs));
+	
+	menu = gtk_menu_new();
+
+	menuitem = gaim_new_item(NULL, "Help", NULL);
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menu);
+	gtk_menu_item_right_justify(GTK_MENU_ITEM(menuitem));
+	gtk_menu_bar_append(GTK_MENU_BAR(menubar), menuitem);
+	
+	gaim_new_item(menu, "About", show_about);
+
+        gtk_widget_show(menubar);
+
+        lagometer_box = gtk_hbox_new(FALSE, 0);
+
+        
+        lagometer = gtk_progress_bar_new();
+        gtk_widget_show(lagometer);
+
+        label = gtk_label_new("Lag-O-Meter: ");
+        gtk_widget_show(label);
+        
+        gtk_box_pack_start(GTK_BOX(lagometer_box), label, FALSE, FALSE, 5);
+        gtk_box_pack_start(GTK_BOX(lagometer_box), lagometer, TRUE, TRUE, 5);
+
+        gtk_widget_set_usize(lagometer, 5, 5);
+        
+
+        if ((general_options & OPT_GEN_SHOW_LAGMETER))
+                gtk_widget_show(lagometer_box);
+
+        
+	vbox       = gtk_vbox_new(FALSE, 10);
+        
+        notebook = gtk_notebook_new();
+
+ 
+        
+
+        /* Do buddy list stuff */
+
+        buddypane = gtk_vbox_new(FALSE, 0);
+        
+        imbutton   = gtk_button_new_with_label("Im");
+	infobutton = gtk_button_new_with_label("Info");
+	chatbutton = gtk_button_new_with_label("Chat");
+
+	hbox       = gtk_hbox_new(TRUE, 10);
+
+	buddies    = gtk_tree_new();
+	sw         = gtk_scrolled_window_new(NULL, NULL);
+	
+
+
+
+        
+	tips = gtk_tooltips_new();
+	gtk_object_set_data(GTK_OBJECT(blist), "Buddy List", tips);
+	
+ 
+	
+	/* Now the buddy list */
+	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw),buddies);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
+				       GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC);
+	gtk_widget_set_usize(sw,200,200);
+	gtk_widget_show(buddies);
+	gtk_widget_show(sw);
+
+	/* Put the buttons in the hbox */
+	gtk_widget_show(imbutton);
+	gtk_widget_show(chatbutton);
+	gtk_widget_show(infobutton);
+
+	gtk_box_pack_start(GTK_BOX(hbox), imbutton, TRUE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX(hbox), infobutton, TRUE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX(hbox), chatbutton, TRUE, TRUE, 0);
+        gtk_container_border_width(GTK_CONTAINER(hbox), 10);
+
+
+	gtk_tooltips_set_tip(tips,infobutton, "Information on selected Buddy", "Penguin");
+	gtk_tooltips_set_tip(tips,imbutton, "Send Instant Message", "Penguin");
+	gtk_tooltips_set_tip(tips,chatbutton, "Start/join a Buddy Chat", "Penguin");
+
+        gtk_box_pack_start(GTK_BOX(buddypane), sw, TRUE, TRUE, 0);
+        gtk_box_pack_start(GTK_BOX(buddypane), hbox, FALSE, FALSE, 0);
+
+        gtk_widget_show(hbox);
+        gtk_widget_show(buddypane);
+
+
+
+        /* Swing the edit buddy */
+        editpane = gtk_vbox_new(FALSE, 0);
+
+        
+       	addbutton = gtk_button_new_with_label("Add");
+       	rembutton = gtk_button_new_with_label("Remove");
+	edittree = gtk_ctree_new(1, 0);
+	gtk_ctree_set_line_style (GTK_CTREE(edittree), GTK_CTREE_LINES_SOLID);
+        gtk_ctree_set_expander_style(GTK_CTREE(edittree), GTK_CTREE_EXPANDER_SQUARE);
+	gtk_clist_set_reorderable(GTK_CLIST(edittree), TRUE);
+
+	gtk_ctree_set_drag_compare_func (GTK_CTREE(edittree),
+                                      (GtkCTreeCompareDragFunc)edit_drag_compare_func);
+
+	
+	gtk_signal_connect_after (GTK_OBJECT (edittree), "tree_move",
+				  GTK_SIGNAL_FUNC (edit_tree_move), NULL);
+
+	
+	bbox = gtk_hbox_new(TRUE, 10);
+       	tbox = gtk_scrolled_window_new(NULL, NULL);
+       	/* Put the buttons in the box */
+       	gtk_box_pack_start(GTK_BOX(bbox), addbutton, TRUE, TRUE, 10);
+       	gtk_box_pack_start(GTK_BOX(bbox), rembutton, TRUE, TRUE, 10);
+
+	gtk_tooltips_set_tip(tips, addbutton, "Add a new Buddy", "Penguin");
+	gtk_tooltips_set_tip(tips, rembutton, "Remove selected Buddy", "Penguin");
+
+       	/* And the boxes in the box */
+       	gtk_box_pack_start(GTK_BOX(editpane), tbox, TRUE, TRUE, 5);
+       	gtk_box_pack_start(GTK_BOX(editpane), bbox, FALSE, FALSE, 5);
+
+	/* Handle closes right */
+
+	
+
+       	/* Finish up */
+       	gtk_widget_show(addbutton);
+       	gtk_widget_show(rembutton);
+       	gtk_widget_show(edittree);
+       	gtk_widget_show(tbox);
+       	gtk_widget_show(bbox);
+	gtk_widget_show(editpane);
+
+
+	/* Permit/Deny */
+
+	permitpane = gtk_vbox_new(FALSE, 0);
+
+        permopt = gtk_radio_button_new_with_label(NULL, "Allow anyone");
+        gtk_box_pack_start(GTK_BOX(permitpane), permopt, FALSE, FALSE, 0);
+        gtk_signal_connect(GTK_OBJECT(permopt), "clicked", GTK_SIGNAL_FUNC(set_permit), (void *)1);
+	gtk_widget_show(permopt);
+	if (permdeny == 1)
+		gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(permopt), TRUE);
+
+        permopt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(permopt)), "Permit some");
+        gtk_box_pack_start(GTK_BOX(permitpane), permopt, FALSE, FALSE, 0);
+        gtk_signal_connect(GTK_OBJECT(permopt), "clicked", GTK_SIGNAL_FUNC(set_permit), (void *)3);
+	gtk_widget_show(permopt);
+	if (permdeny == 3)
+		gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(permopt), TRUE);
+
+
+        permopt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(permopt)), "Deny some");
+        gtk_box_pack_start(GTK_BOX(permitpane), permopt, FALSE, FALSE, 0);
+        gtk_signal_connect(GTK_OBJECT(permopt), "clicked", GTK_SIGNAL_FUNC(set_permit), (void *)4);
+        gtk_widget_show(permopt);
+	if (permdeny == 4)
+		gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(permopt), TRUE);
+
+
+
+        addpermbutton = gtk_button_new_with_label("Add");
+        rempermbutton = gtk_button_new_with_label("Remove");
+        
+       	permtree = gtk_tree_new();
+       	pbox = gtk_hbox_new(TRUE, 10);
+       	xbox = gtk_scrolled_window_new(NULL, NULL);
+       	/* Put the buttons in the box */
+       	gtk_box_pack_start(GTK_BOX(pbox), addpermbutton, TRUE, TRUE, 10);
+        gtk_box_pack_start(GTK_BOX(pbox), rempermbutton, TRUE, TRUE, 10);
+        
+
+	gtk_tooltips_set_tip(tips, addpermbutton, "Add buddy to permit/deny", "Penguin");
+	gtk_tooltips_set_tip(tips, rempermbutton, "Remove buddy from permit/deny", "Penguin");
+       	/* And the boxes in the box */
+       	gtk_box_pack_start(GTK_BOX(permitpane), xbox, TRUE, TRUE, 5);
+       	gtk_box_pack_start(GTK_BOX(permitpane), pbox, FALSE, FALSE, 5);
+
+	/* Handle closes right */
+
+	
+
+       	/* Finish up */
+       	gtk_widget_show(addpermbutton);
+        gtk_widget_show(rempermbutton);
+       	gtk_widget_show(permtree);
+       	gtk_widget_show(xbox);
+       	gtk_widget_show(pbox);
+	gtk_widget_show(permitpane);
+
+
+
+        label = gtk_label_new("Online");
+        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), buddypane, label);
+        label = gtk_label_new("Edit Buddies");
+	gtk_notebook_append_page(GTK_NOTEBOOK(notebook), editpane, label);
+	label = gtk_label_new("Permit");
+	gtk_notebook_append_page(GTK_NOTEBOOK(notebook), permitpane, label);
+
+        gtk_widget_show_all(notebook);
+
+	/* Pack things in the vbox */
+        gtk_widget_show(vbox);
+
+
+        gtk_widget_show(notebook);
+
+        /* Enable buttons */
+	
+	gtk_signal_connect(GTK_OBJECT(imbutton), "clicked", GTK_SIGNAL_FUNC(show_im_dialog), buddies);
+	gtk_signal_connect(GTK_OBJECT(infobutton), "clicked", GTK_SIGNAL_FUNC(info_callback), buddies);
+	gtk_signal_connect(GTK_OBJECT(chatbutton), "clicked", GTK_SIGNAL_FUNC(chat_callback), buddies);
+       	gtk_signal_connect(GTK_OBJECT(rembutton), "clicked", GTK_SIGNAL_FUNC(do_del_buddy), edittree);
+       	gtk_signal_connect(GTK_OBJECT(addbutton), "clicked", GTK_SIGNAL_FUNC(add_buddy_callback), NULL);
+        gtk_signal_connect(GTK_OBJECT(addpermbutton), "clicked", GTK_SIGNAL_FUNC(add_perm_callback), NULL);
+        gtk_signal_connect(GTK_OBJECT(rempermbutton), "clicked", GTK_SIGNAL_FUNC(do_del_perm), permtree);
+        gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0);
+        gtk_box_pack_start(GTK_BOX(vbox), lagometer_box, FALSE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
+
+        gtk_container_add(GTK_CONTAINER(blist), vbox);
+
+#ifndef USE_APPLET
+        gtk_signal_connect(GTK_OBJECT(blist), "delete_event", GTK_SIGNAL_FUNC(do_quit), blist);
+#else
+	gtk_signal_connect(GTK_OBJECT(blist), "delete_event", GTK_SIGNAL_FUNC(applet_destroy_buddy), NULL);
+#endif
+
+        gtk_signal_connect(GTK_OBJECT(blist), "configure_event", GTK_SIGNAL_FUNC(move_blist_window), NULL);
+
+
+
+        /* The edit tree */
+        gtk_container_add(GTK_CONTAINER(tbox), edittree);
+       	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(tbox),
+                                       GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC);
+
+
+        /* The permit tree */
+       	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(xbox), permtree);
+       	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(xbox),
+                                       GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC);
+
+        gtk_window_set_title(GTK_WINDOW(blist), "Gaim - Buddy List");
+
+        if (general_options & OPT_GEN_SAVED_WINDOWS) {
+                if (blist_pos.width != 0) { /* Sanity check! */
+                        gtk_widget_set_uposition(blist, blist_pos.x - blist_pos.xoff, blist_pos.y - blist_pos.yoff);
+                        gtk_widget_set_usize(blist, blist_pos.width, blist_pos.height);
+                }
+        }
+}
+
+void refresh_buddy_window()
+{
+        setup_buddy_chats();
+ 
+        build_edit_tree();
+        build_permit_tree();
+        
+        update_button_pix();
+        gtk_widget_show(blist);
+
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/buddy_chat.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,654 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ * 
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include "gaim.h"
+#include "gtkhtml.h"
+
+static GtkWidget *joinchat;
+static GtkWidget *entry;
+static GtkWidget *invite;
+static GtkWidget *inviteentry;
+static GtkWidget *invitemess;
+
+static void destroy_join_chat()
+{
+	if (joinchat)
+		gtk_widget_destroy(joinchat);
+	joinchat=NULL;
+}
+
+static void destroy_invite()
+{
+	if (invite)
+		gtk_widget_destroy(invite);
+	invite=NULL;
+}
+
+
+
+
+static void do_join_chat()
+{
+	char *group;
+
+	group = gtk_entry_get_text(GTK_ENTRY(entry));
+
+        if (joinchat) {
+                serv_join_chat(4, group);
+		gtk_widget_destroy(joinchat);
+	}
+	joinchat=NULL;
+}
+
+
+
+void join_chat()
+{
+	GtkWidget *cancel;
+	GtkWidget *join;
+	GtkWidget *label;
+	GtkWidget *bbox;
+	GtkWidget *vbox;
+	GtkWidget *topbox;
+	if (!joinchat) {
+		joinchat = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+		cancel = gtk_button_new_with_label("Cancel");
+		join = gtk_button_new_with_label("Join");
+		bbox = gtk_hbox_new(TRUE, 10);
+		topbox = gtk_hbox_new(FALSE, 5);
+		vbox = gtk_vbox_new(FALSE, 5);
+		entry = gtk_entry_new();
+
+		/* Put the buttons in the box */
+		gtk_box_pack_start(GTK_BOX(bbox), join, TRUE, TRUE, 10);
+		gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10);
+		
+		label = gtk_label_new("Join what group:");
+		gtk_widget_show(label);
+		gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
+		gtk_box_pack_start(GTK_BOX(topbox), entry, FALSE, FALSE, 5);
+	
+		/* And the boxes in the box */
+		gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5);
+		gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
+		
+		/* Handle closes right */
+		gtk_signal_connect(GTK_OBJECT(joinchat), "delete_event",
+			   GTK_SIGNAL_FUNC(destroy_join_chat), joinchat);
+
+		gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
+			   GTK_SIGNAL_FUNC(destroy_join_chat), joinchat);
+		gtk_signal_connect(GTK_OBJECT(join), "clicked",
+			   GTK_SIGNAL_FUNC(do_join_chat), joinchat);
+		gtk_signal_connect(GTK_OBJECT(entry), "activate",
+			   GTK_SIGNAL_FUNC(do_join_chat), joinchat);
+		/* Finish up */
+		gtk_widget_show(join);
+		gtk_widget_show(cancel);
+		gtk_widget_show(entry);
+		gtk_widget_show(topbox);
+		gtk_widget_show(bbox);
+		gtk_widget_show(vbox);
+		gtk_window_set_title(GTK_WINDOW(joinchat), "Join Chat");
+		gtk_window_set_focus(GTK_WINDOW(joinchat), entry);
+                gtk_container_add(GTK_CONTAINER(joinchat), vbox);
+                gtk_widget_realize(joinchat);
+		aol_icon(joinchat->window);
+
+	}
+	gtk_widget_show(joinchat);
+}
+
+
+static void do_invite(GtkWidget *w, struct buddy_chat *b)
+{
+	char *buddy;
+	char *mess;
+
+	buddy = gtk_entry_get_text(GTK_ENTRY(inviteentry));
+	mess = gtk_entry_get_text(GTK_ENTRY(invitemess));
+
+        if (invite) {
+                serv_chat_invite(b->id, mess, buddy);
+		gtk_widget_destroy(invite);
+	}
+	invite=NULL;
+}
+
+
+
+static void invite_callback(GtkWidget *w, struct buddy_chat *b)
+{
+	GtkWidget *cancel;
+	GtkWidget *invite_btn;
+	GtkWidget *label;
+	GtkWidget *bbox;
+	GtkWidget *vbox;
+	GtkWidget *topbox;
+	if (!invite) {
+		invite = gtk_window_new(GTK_WINDOW_DIALOG);
+		cancel = gtk_button_new_with_label("Cancel");
+		invite_btn = gtk_button_new_with_label("Invite");
+		bbox = gtk_hbox_new(TRUE, 10);
+		topbox = gtk_hbox_new(FALSE, 5);
+		vbox = gtk_vbox_new(FALSE, 5);
+		inviteentry = gtk_entry_new();
+		invitemess = gtk_entry_new();
+
+		/* Put the buttons in the box */
+		gtk_box_pack_start(GTK_BOX(bbox), invite_btn, TRUE, TRUE, 10);
+		gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10);
+		
+		label = gtk_label_new("Invite who?");
+		gtk_widget_show(label);
+		gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
+		gtk_box_pack_start(GTK_BOX(topbox), inviteentry, FALSE, FALSE, 5);
+		label = gtk_label_new("With message:");
+		gtk_widget_show(label);
+		gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
+		gtk_box_pack_start(GTK_BOX(topbox), invitemess, FALSE, FALSE, 5);
+	
+		/* And the boxes in the box */
+		gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5);
+		gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
+		
+		/* Handle closes right */
+		gtk_signal_connect(GTK_OBJECT(invite), "delete_event",
+			   GTK_SIGNAL_FUNC(destroy_invite), invite);
+
+		gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
+			   GTK_SIGNAL_FUNC(destroy_invite), b);
+		gtk_signal_connect(GTK_OBJECT(invite_btn), "clicked",
+			   GTK_SIGNAL_FUNC(do_invite), b);
+		gtk_signal_connect(GTK_OBJECT(inviteentry), "activate",
+			   GTK_SIGNAL_FUNC(do_invite), b);
+		/* Finish up */
+		gtk_widget_show(invite_btn);
+		gtk_widget_show(cancel);
+		gtk_widget_show(inviteentry);
+		gtk_widget_show(invitemess);
+		gtk_widget_show(topbox);
+		gtk_widget_show(bbox);
+		gtk_widget_show(vbox);
+		gtk_window_set_title(GTK_WINDOW(invite), "Invite to Buddy Chat");
+		gtk_window_set_focus(GTK_WINDOW(invite), inviteentry);
+                gtk_container_add(GTK_CONTAINER(invite), vbox);
+                gtk_widget_realize(invite);
+		aol_icon(invite->window);
+
+	}
+	gtk_widget_show(invite);
+}
+
+void chat_write(struct buddy_chat *b, char *who, int flag, char *message)
+{
+        char *buf;
+        GList *ignore = b->ignored;
+        char *str;
+        char colour[10];
+
+
+        while(ignore) {
+                if (!strcasecmp(who, ignore->data))
+                        return;
+                ignore = ignore->next;
+        }
+        
+        buf = g_malloc(BUF_LONG);
+        
+        if (flag & WFLAG_WHISPER) {
+                str = g_malloc(64);
+                g_snprintf(str, 62, "*%s*", who);
+                strcpy(colour, "#00ff00\0");
+        } else {
+                str = g_strdup(normalize(who));
+                if (!strcasecmp(str, normalize(current_user->username)))
+                        strcpy(colour, "#0000ff\0");
+                else
+                        strcpy(colour, "#ff0000\0");
+                g_free(str);
+                str = who;
+        }
+
+
+
+	if (display_options & OPT_DISP_SHOW_TIME)
+                g_snprintf(buf, BUF_LONG, "<FONT COLOR=\"%s\"><B>%s %s: </B></FONT>", colour, date(), str);
+	else
+                g_snprintf(buf, BUF_LONG, "<FONT COLOR=\"%s\"><B>%s: </B></FONT>", colour, str);
+
+        gtk_html_freeze(GTK_HTML(b->text));
+                        
+        gtk_html_append_text(GTK_HTML(b->text), buf, 0);
+        gtk_html_append_text(GTK_HTML(b->text), message, (display_options & OPT_DISP_IGNORE_COLOUR) ? HTML_OPTION_NO_COLOURS : 0);
+        gtk_html_append_text(GTK_HTML(b->text), "<BR>", 0);
+        
+        gtk_html_thaw(GTK_HTML(b->text));
+        
+        if (flag & WFLAG_WHISPER)
+                g_free(str);
+
+        g_free(buf);
+}
+
+static void close_callback(GtkWidget *widget, struct buddy_chat *b)
+{
+        serv_chat_leave(b->id);
+        
+        if (b->window)
+                gtk_widget_destroy(b->window);
+        b->window = NULL;
+}
+
+
+static void whisper_callback(GtkWidget *widget, struct buddy_chat *b)
+{
+	char buf[BUF_LONG];
+	char buf2[BUF_LONG];
+	GList *selected;
+	char *who;
+
+	strncpy(buf, gtk_entry_get_text(GTK_ENTRY(b->entry)), sizeof(buf)/2);
+	if (!strlen(buf))
+		return;
+
+	selected = GTK_LIST(b->list)->selection;
+
+	if (!selected)
+		return;
+	
+
+	who = GTK_LABEL(gtk_container_children(GTK_CONTAINER(selected->data))->data)->label;
+
+	if (!who)
+		return;
+
+	gtk_entry_set_text(GTK_ENTRY(b->entry), "");
+
+        escape_text(buf);
+        serv_chat_whisper(b->id, who, buf);
+                          
+	g_snprintf(buf2, sizeof(buf2), "%s->%s", current_user->username, who);
+
+	chat_write(b, buf2, WFLAG_WHISPER, buf);
+
+	gtk_widget_grab_focus(GTK_WIDGET(b->entry));
+
+
+}
+
+
+static void send_callback(GtkWidget *widget, struct buddy_chat *b)
+{
+	char buf[BUF_LONG];
+
+	strncpy(buf, gtk_entry_get_text(GTK_ENTRY(b->entry)), sizeof(buf)/2);
+	if (!strlen(buf))
+		return;
+
+	gtk_entry_set_text(GTK_ENTRY(b->entry), "");
+
+	if (general_options & OPT_GEN_SEND_LINKS) {
+		linkify_text(buf);
+	}
+
+        escape_text(buf);
+        serv_chat_send(b->id, buf);
+        
+	gtk_widget_grab_focus(GTK_WIDGET(b->entry));
+
+
+}
+
+
+void update_chat_list(struct buddy_chat *b)
+{
+        GtkWidget *list_item;
+        char name[80];
+        char *tmp;
+        GList *names = b->in_room;
+
+
+        gtk_list_clear_items(GTK_LIST(b->list), 0, -1);
+
+
+        while(names) {
+                tmp = (char *)names->data;
+                if (g_list_index(b->ignored, names->data) != -1)
+                        g_snprintf(name, sizeof(name), "X %s", tmp);
+                else
+                        g_snprintf(name, sizeof(name), "%s", tmp);
+
+                list_item = gtk_list_item_new_with_label(name);
+                gtk_widget_show(list_item);
+                gtk_object_set_user_data(GTK_OBJECT(list_item), tmp);
+
+                gtk_list_append_items(GTK_LIST(b->list), g_list_append(NULL, list_item));
+
+                names = names->next;
+        }
+
+}
+
+
+
+void add_chat_buddy(struct buddy_chat *b, char *buddy)
+{
+        char *name = g_strdup(buddy);
+
+        b->in_room = g_list_append(b->in_room, name);
+
+        update_chat_list(b);
+
+}
+
+
+
+
+void remove_chat_buddy(struct buddy_chat *b, char *buddy)
+{	
+        GList *names = b->in_room;
+
+        while(names) {
+                if (!strcasecmp((char *)names->data, buddy)) {
+                        b->in_room = g_list_remove(b->in_room, names->data);
+                        update_chat_list(b);
+                        break;
+                }
+                names = names->next;
+        }
+}
+
+
+static void im_callback(GtkWidget *w, struct buddy_chat *b)
+{
+        char *name;
+        GList *i;
+        struct conversation *c;
+
+        i = GTK_LIST(b->list)->selection;
+        if (i)
+                name = (char *)gtk_object_get_user_data(GTK_OBJECT(i->data));
+        else
+                return;
+
+	c = find_conversation(name);
+
+	if (c != NULL) {
+		gdk_window_raise(c->window->window);
+	} else {
+		c = new_conversation(name);
+	}
+
+        
+}
+
+static void ignore_callback(GtkWidget *w, struct buddy_chat *b)
+{
+        char *name;
+        GList *i;
+
+        i = GTK_LIST(b->list)->selection;
+        if (i)
+                name = (char *)gtk_object_get_user_data(GTK_OBJECT(i->data));
+        else
+                return;
+
+        if (g_list_index(b->ignored, (gpointer)name) == -1)
+                b->ignored = g_list_append(b->ignored, name);
+        else
+                b->ignored = g_list_remove(b->ignored, name);
+
+        update_chat_list(b);
+}
+
+static void info_callback(GtkWidget *w, struct buddy_chat *b)
+{
+        char *name;
+        GList *i;
+
+        i = GTK_LIST(b->list)->selection;
+        if (i)
+                name = (char *)gtk_object_get_user_data(GTK_OBJECT(i->data));
+        else
+                return;
+
+        serv_get_info(name);
+}
+
+
+
+void show_new_buddy_chat(struct buddy_chat *b)
+{
+	GtkWidget *win;
+	GtkWidget *text;
+	GtkWidget *send;
+	GtkWidget *list;
+	GtkWidget *invite_btn;
+	GtkWidget *whisper;
+	GtkWidget *close;
+	GtkWidget *chatentry;
+        GtkWidget *tbox;
+        GtkWidget *lbox;
+        GtkWidget *bbox;
+        GtkWidget *bbox2;
+        GtkWidget *im, *ignore, *info;
+        GtkWidget *sw;
+        GtkWidget *sw2;
+	GtkWidget *vbox;
+
+	
+	win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+	b->window = win;
+
+	close = gtk_button_new_with_label("Close");
+	invite_btn = gtk_button_new_with_label("Invite");
+	whisper = gtk_button_new_with_label("Whisper");
+        send = gtk_button_new_with_label("Send");
+
+        im = gtk_button_new_with_label("IM");
+        ignore = gtk_button_new_with_label("Ignore");
+        info = gtk_button_new_with_label("Info");
+
+	text = gtk_html_new(NULL, NULL);
+	
+	b->text = text;
+
+	list = gtk_list_new();
+	b->list = list;
+
+        bbox = gtk_hbox_new(TRUE, 0);
+        bbox2 = gtk_hbox_new(TRUE, 0);
+	tbox = gtk_hbox_new(FALSE, 0);
+        vbox = gtk_vbox_new(FALSE, 0);
+        lbox = gtk_vbox_new(FALSE, 4);
+	chatentry = gtk_entry_new();
+
+	gtk_widget_realize(win);
+
+
+	b->makesound=1;
+
+	gtk_object_set_user_data(GTK_OBJECT(chatentry), b);
+	b->entry = chatentry;
+	
+	/* Hack something so we know have an entry click event */
+
+	gtk_signal_connect(GTK_OBJECT(chatentry), "activate", GTK_SIGNAL_FUNC(send_callback),b);
+        /* Text box */
+
+        sw = gtk_scrolled_window_new (NULL, NULL);
+        gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
+                                        GTK_POLICY_NEVER,
+                                        GTK_POLICY_ALWAYS);
+        gtk_widget_show(sw);
+        gtk_container_add(GTK_CONTAINER(sw), text);
+        gtk_widget_show(text);
+
+
+        GTK_HTML (text)->hadj->step_increment = 10.0;
+        GTK_HTML (text)->vadj->step_increment = 10.0;
+        gtk_widget_set_usize(sw, 320, 150);
+
+        gtk_box_pack_start(GTK_BOX(tbox), sw, TRUE, TRUE, 0);
+
+
+        sw2 = gtk_scrolled_window_new(NULL, NULL);
+        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2),
+                                       GTK_POLICY_NEVER,
+                                       GTK_POLICY_AUTOMATIC);
+        gtk_widget_show(sw2);
+        gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw2), list);
+
+        gtk_box_pack_start(GTK_BOX(lbox), sw2, TRUE, TRUE, 0);
+        gtk_box_pack_start(GTK_BOX(lbox), bbox2, FALSE, FALSE, 0);
+                                       
+        
+	gtk_box_pack_start(GTK_BOX(tbox), lbox, TRUE, TRUE, 0);
+	gtk_widget_show(list);
+
+
+	gtk_widget_set_usize(list, 150, 150);
+
+
+	/* Ready and pack buttons */
+	gtk_object_set_user_data(GTK_OBJECT(win), b);
+	gtk_object_set_user_data(GTK_OBJECT(close), b);
+	gtk_signal_connect(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(close_callback),b);
+	gtk_signal_connect(GTK_OBJECT(send), "clicked", GTK_SIGNAL_FUNC(send_callback),b);
+	gtk_signal_connect(GTK_OBJECT(invite_btn), "clicked", GTK_SIGNAL_FUNC(invite_callback), b);
+	gtk_signal_connect(GTK_OBJECT(whisper), "clicked", GTK_SIGNAL_FUNC(whisper_callback), b);
+
+        gtk_signal_connect(GTK_OBJECT(im), "clicked", GTK_SIGNAL_FUNC(im_callback), b);
+        gtk_signal_connect(GTK_OBJECT(ignore), "clicked", GTK_SIGNAL_FUNC(ignore_callback), b);
+        gtk_signal_connect(GTK_OBJECT(info), "clicked", GTK_SIGNAL_FUNC(info_callback), b);
+
+	gtk_box_pack_start(GTK_BOX(bbox), send, TRUE, TRUE, 5);
+	gtk_box_pack_start(GTK_BOX(bbox), whisper, TRUE, TRUE, 5);
+	gtk_box_pack_start(GTK_BOX(bbox), invite_btn, TRUE, TRUE, 5);
+        gtk_box_pack_start(GTK_BOX(bbox), close, TRUE, TRUE, 5);
+
+        gtk_box_pack_start(GTK_BOX(bbox2), im, TRUE, TRUE, 5);
+        gtk_box_pack_start(GTK_BOX(bbox2), ignore, TRUE, TRUE, 5);
+        gtk_box_pack_start(GTK_BOX(bbox2), info, TRUE, TRUE, 5);
+	
+	/* pack and fill the rest */
+	
+	
+	gtk_box_pack_start(GTK_BOX(vbox), tbox, TRUE, TRUE, 5);
+	gtk_box_pack_start(GTK_BOX(vbox), chatentry, FALSE, FALSE, 5);
+	gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
+
+	gtk_widget_show(send);
+	gtk_widget_show(invite_btn);
+	gtk_widget_show(whisper);
+        gtk_widget_show(close);
+        gtk_widget_show(im);
+        gtk_widget_show(ignore);
+        gtk_widget_show(info);
+        gtk_widget_show(bbox);
+        gtk_widget_show(lbox);
+        gtk_widget_show(bbox2);
+	gtk_widget_show(vbox);
+	gtk_widget_show(tbox);
+	gtk_widget_show(chatentry);
+
+	
+	gtk_container_add(GTK_CONTAINER(win),vbox);
+	gtk_container_border_width(GTK_CONTAINER(win), 10);
+
+	gtk_window_set_title(GTK_WINDOW(win), b->name);
+	gtk_window_set_focus(GTK_WINDOW(win), chatentry);
+
+	gtk_signal_connect(GTK_OBJECT(win), "destroy", GTK_SIGNAL_FUNC(close_callback),b);
+
+
+        gtk_widget_realize(win);
+	aol_icon(win->window);
+
+	gtk_widget_show(win);
+
+	
+}
+
+
+
+void handle_click_chat(GtkWidget *widget, GdkEventButton *event, struct chat_room *cr)
+{
+        if (event->type == GDK_2BUTTON_PRESS && event->button == 1) {
+                serv_join_chat(cr->exchange, cr->name);
+        }
+}
+
+
+void setup_buddy_chats()
+{
+        GList *list = GTK_TREE(buddies)->children;
+        struct chat_room *cr;
+        GList *crs = chat_rooms;
+        GtkWidget *w;
+        GtkWidget *item;
+        GtkWidget *tree;
+
+        while(list) {
+                w = (GtkWidget *)list->data;
+                if (!strcmp(GTK_LABEL(GTK_BIN(w)->child)->label, "Buddy Chat")) {
+                        gtk_tree_remove_items(GTK_TREE(buddies), list);
+                        list = GTK_TREE(buddies)->children;
+                        if (!list)
+                        	break;
+                }
+                list = list->next;
+        }
+
+        if (crs == NULL)
+                return;
+
+        item = gtk_tree_item_new_with_label("Buddy Chat");
+        tree = gtk_tree_new();
+        gtk_widget_show(item);
+        gtk_widget_show(tree);
+        gtk_tree_append(GTK_TREE(buddies), item);
+        gtk_tree_item_set_subtree(GTK_TREE_ITEM(item), tree);
+        gtk_tree_item_expand(GTK_TREE_ITEM(item));
+
+        while (crs) {
+                cr = (struct chat_room *)crs->data;
+
+                item = gtk_tree_item_new_with_label(cr->name);
+                gtk_object_set_user_data(GTK_OBJECT(item), cr);
+                gtk_tree_append(GTK_TREE(tree), item);
+                gtk_widget_show(item);
+                gtk_signal_connect(GTK_OBJECT(item), "button_press_event",
+                                   GTK_SIGNAL_FUNC(handle_click_chat),
+                                   cr);
+
+                crs = crs->next;
+
+        }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/conversation.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,1042 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ * 
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <string.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include "gaim.h"
+#include "gtkhtml.h"
+#include <gdk/gdkkeysyms.h>
+#include "pixmaps/underline.xpm"
+#include "pixmaps/bold.xpm"
+#include "pixmaps/italic.xpm"
+#include "pixmaps/small.xpm"
+#include "pixmaps/normal.xpm"
+#include "pixmaps/big.xpm"
+#include "pixmaps/speaker.xpm"
+#include "pixmaps/aimicon2.xpm"
+#include "pixmaps/wood.xpm"
+#include "pixmaps/palette.xpm"
+#include "pixmaps/link.xpm"
+#include "pixmaps/strike.xpm"
+
+int state_lock=0;
+
+GdkPixmap *dark_icon_pm = NULL;
+GdkBitmap *dark_icon_bm = NULL;
+
+
+void check_everything(GtkWidget *entry);
+gboolean user_keypress_callback(GtkWidget *entry, GdkEventKey *event,  struct conversation *c);
+
+
+/*------------------------------------------------------------------------*/
+/*  Helpers                                                               */
+/*------------------------------------------------------------------------*/
+
+
+void quiet_set(GtkWidget *tb, int state)
+{
+	state_lock=1;
+	gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(tb), state);
+	state_lock=0;
+}
+
+
+void set_state_lock(int i)
+{
+        state_lock = i;
+}
+
+
+struct conversation *new_conversation(char *name)
+{
+        struct conversation *c;
+
+        c = find_conversation(name);
+	
+        if (c != NULL)
+                return c;
+
+        c = (struct conversation *)g_new0(struct conversation, 1);
+        g_snprintf(c->name, sizeof(c->name), "%s", name);
+
+	if ((general_options & OPT_GEN_LOG_ALL) || find_log_info(c->name)) {
+		FILE *fd;
+		fd = open_log_file(c);
+		if (!(general_options & OPT_GEN_STRIP_HTML))
+			fprintf(fd, "<HR><BR><H3 Align=Center> ---- New Conversation @ %s ----</H3><BR>\n", date());
+		else
+			fprintf(fd, " ---- New Conversation @ %s ----\n", date());
+		fclose(fd);
+	}
+
+        show_conv(c);
+        conversations = g_list_append(conversations, c);
+        return c;
+}
+
+
+struct conversation *find_conversation(char *name)
+{
+        char *cuser = g_malloc(64);
+        struct conversation *c;
+        GList *cnv = conversations;
+        
+        strcpy(cuser, normalize(name));
+
+        while(cnv) {
+                c = (struct conversation *)cnv->data;
+                if(!strcasecmp(cuser, normalize(c->name))) {
+                        g_free(cuser);
+                        return c;
+                }
+                cnv = cnv->next;
+        }
+        g_free(cuser);
+        return NULL;
+}
+
+/* ---------------------------------------------------
+ * Function to remove a log file entry
+ * ---------------------------------------------------
+ */
+
+void rm_log(struct log_conversation *a)
+{
+        struct conversation *cnv = find_conversation(a->name);
+        char buf[128];
+
+        log_conversations = g_list_remove(log_conversations, a);
+        
+        save_prefs();
+
+        if (cnv) {
+		if (!(general_options & OPT_GEN_LOG_ALL))
+                	g_snprintf(buf, sizeof(buf), CONVERSATION_TITLE, cnv->name);
+		else
+			g_snprintf(buf, sizeof(buf), LOG_CONVERSATION_TITLE, cnv->name);
+                gtk_window_set_title(GTK_WINDOW(cnv->window), buf);
+        }
+}
+
+struct log_conversation *find_log_info(char *name)
+{
+        char *pname = g_malloc(64);
+        GList *lc = log_conversations;
+	struct log_conversation *l;
+		
+
+	strcpy(pname, normalize(name));
+
+        while(lc) {
+                l = (struct log_conversation *)lc->data;
+		if (!strcasecmp(pname, normalize(l->name))) {
+			g_free(pname);
+			return l;
+		}
+		lc = lc->next;
+	}
+	g_free(pname);
+	return NULL;
+}
+
+void delete_conversation(struct conversation *cnv)
+{
+        conversations = g_list_remove(conversations, cnv);
+        g_free(cnv);
+}
+
+void update_log_convs()
+{
+	GList *cnv = conversations;
+	struct conversation *c;
+
+	while(cnv) {
+		c = (struct conversation *)cnv->data;
+
+		if (c->log_button)
+			gtk_widget_set_sensitive(c->log_button, ((general_options & OPT_GEN_LOG_ALL)) ? FALSE : TRUE);
+
+		cnv = cnv->next;
+	}
+}
+
+void update_font_buttons()
+{
+	GList *cnv = conversations;
+	struct conversation *c;
+
+	while (cnv) {
+		c = (struct conversation *)cnv->data;
+
+		if (c->bold)
+			gtk_widget_set_sensitive(c->bold, ((font_options & OPT_FONT_BOLD)) ? FALSE : TRUE);
+
+                if (c->italic)
+                        gtk_widget_set_sensitive(c->italic, ((font_options & OPT_FONT_ITALIC)) ? FALSE : TRUE);
+
+                if (c->underline)
+                        gtk_widget_set_sensitive(c->underline, ((font_options & OPT_FONT_UNDERLINE)) ? FALSE : TRUE);
+
+                if (c->strike)
+                        gtk_widget_set_sensitive(c->strike, ((font_options & OPT_FONT_STRIKE)) ? FALSE : TRUE);
+
+		cnv = cnv->next;
+	}
+}
+
+/*
+void update_transparency()
+{
+	GList *cnv = conversations;
+	struct conversation *c;
+
+        This func should be uncalled!
+
+	while(cnv) {
+		c = (struct conversation *)cnv->data;
+
+		if (c->text)
+			gtk_html_set_transparent(GTK_HTML(c->text),
+        						  (transparent) ? TRUE : FALSE);
+
+		cnv = cnv->next;
+	}
+}
+*/
+
+
+/*------------------------------------------------------------------------*/
+/*  Callbacks                                                             */
+/*------------------------------------------------------------------------*/
+
+void toggle_loggle(GtkWidget *w, struct conversation *p)
+{
+        if (state_lock)
+                return;
+        
+        if (find_log_info(p->name))
+                rm_log(find_log_info(p->name));
+        else 
+		show_log_dialog(p->name);
+}
+
+
+static int close_callback(GtkWidget *widget, struct conversation *c)
+{
+        gtk_widget_destroy(c->window);
+        delete_conversation(c);
+        return TRUE;
+}
+
+static gint delete_event_convo(GtkWidget *w, GdkEventAny *e, struct conversation *c)
+{
+	delete_conversation(c);
+	return FALSE;
+}
+	
+
+static void color_callback(GtkWidget *widget, struct conversation *c)
+{
+	/* show_color_dialog(c); */
+	gtk_widget_grab_focus(c->entry);
+}
+
+static void add_callback(GtkWidget *widget, struct conversation *c)
+{
+	if (find_buddy(c->name) != NULL) {
+		sprintf(debug_buff,"Removing '%s' from buddylist.\n", c->name);
+		debug_print(debug_buff);
+		remove_buddy(find_group_by_buddy(c->name), find_buddy(c->name));
+		build_edit_tree();
+		gtk_label_set_text(GTK_LABEL(GTK_BIN(c->add_button)->child), "Add");
+	}
+	else
+	{
+        	show_add_buddy(c->name, NULL);
+	}
+
+	gtk_widget_grab_focus(c->entry);
+}
+
+
+static void block_callback(GtkWidget *widget, struct conversation *c)
+{
+        show_add_perm(c->name);
+	gtk_widget_grab_focus(c->entry);
+}
+
+static void warn_callback(GtkWidget *widget, struct conversation *c)
+{
+        show_warn_dialog(c->name);
+	gtk_widget_grab_focus(c->entry);
+}
+
+static void info_callback(GtkWidget *widget, struct conversation *c)
+{
+        serv_get_info(c->name);
+	gtk_widget_grab_focus(c->entry);
+}
+
+gboolean user_keypress_callback(GtkWidget *entry, GdkEventKey *event,  struct conversation *c)
+{
+  int pos;
+  if(event->keyval==GDK_Return) {
+    if(!(event->state & GDK_SHIFT_MASK)){
+      gtk_signal_emit_by_name(GTK_OBJECT(entry), "activate", c);
+      //to stop the putting in of the enter character
+      gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event");
+    } else {
+      gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event");
+      pos=gtk_editable_get_position(GTK_EDITABLE(entry));
+      gtk_editable_insert_text(GTK_EDITABLE(entry), "\n", 1, &pos);
+    }
+  }
+
+  return TRUE;
+
+}
+
+
+static void send_callback(GtkWidget *widget, struct conversation *c)
+{
+        char buf[BUF_LONG];
+	char *buf2;
+        char *buf3;
+        int hdrlen;
+
+        g_snprintf(buf, BUF_LONG, "%s", gtk_editable_get_chars(GTK_EDITABLE(c->entry), 0, -1)); 
+
+        if (!strlen(buf)) {
+                return;
+        }
+
+        if (general_options & OPT_GEN_SEND_LINKS) {
+                linkify_text(buf);
+        }
+	
+        /* Let us determine how long the message CAN be.
+         * toc_send_im is 11 chars long + 2 quotes.
+	 * + 2 spaces + 6 for the header + 2 for good
+	 * measure = 23 bytes + the length of normalize c->name */
+
+	buf2 = g_malloc(BUF_LONG);
+	buf3 = g_malloc(BUF_LONG);
+	
+        hdrlen = 23 + strlen(normalize(c->name));
+
+/*	printf("%d %d %d\n", strlen(buf), hdrlen, BUF_LONG);*/
+
+        if (font_options & OPT_FONT_BOLD) {
+                g_snprintf(buf2, BUF_LONG, "<B>%s</B>", buf);
+                strcpy(buf, buf2);
+        }
+
+        if (font_options & OPT_FONT_ITALIC) {
+                g_snprintf(buf2, BUF_LONG, "<I>%s</I>", buf);
+                strcpy(buf, buf2);
+        }
+
+        if (font_options & OPT_FONT_UNDERLINE) {
+                g_snprintf(buf2, BUF_LONG, "<U>%s</U>", buf);
+                strcpy(buf, buf2);
+        }
+
+        if (font_options & OPT_FONT_STRIKE) {
+                g_snprintf(buf2, BUF_LONG, "<STRIKE>%s</STRIKE>", buf);
+                strcpy(buf, buf2);
+        }
+        
+	write_to_conv(c, buf, WFLAG_SEND);
+
+	gtk_editable_delete_text(GTK_EDITABLE(c->entry), 0, -1);
+
+	escape_text(buf);
+	if (escape_message(buf) > MSG_LEN - hdrlen) {
+		do_error_dialog("Message too long, some data truncated.", "Error");
+	}
+
+        serv_send_im(c->name, buf, 0);
+        
+	quiet_set(c->bold, FALSE);
+	quiet_set(c->strike, FALSE);
+	quiet_set(c->italic, FALSE);
+	quiet_set(c->underline, FALSE);
+	quiet_set(c->palette, FALSE);
+        quiet_set(c->link, FALSE);
+        
+	if (c->makesound && (sound_options & OPT_SOUND_SEND))
+		play_sound(SEND);
+
+	if (awaymessage != NULL) {
+		do_im_back();
+	}
+
+
+	gtk_widget_grab_focus(c->entry);
+
+        g_free(buf2);
+        g_free(buf3);
+
+}
+
+static int
+entry_key_pressed(GtkWidget *w, GtkWidget *entry)
+{
+        check_everything(w);
+        return TRUE;
+}
+
+/*------------------------------------------------------------------------*/
+/*  HTML-type stuff                                                       */
+/*------------------------------------------------------------------------*/
+
+int count_tag(GtkWidget *entry, char *s1, char *s2)
+{
+	char *p1, *p2;
+	int res=0;
+	char *tmp, *tmpo, h;
+	tmpo = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); 
+	h = tmpo[GTK_EDITABLE(entry)->current_pos];
+	tmpo[GTK_EDITABLE(entry)->current_pos]='\0';
+	tmp=tmpo;
+	do {
+		p1 = strstr(tmp, s1);
+		p2 = strstr(tmp, s2);
+		if (p1 && p2) {
+			if (p1 < p2) {
+				res=1;
+				tmp = p1 +strlen(s1);
+			} else if (p2 < p1) {
+				res = 0;
+				tmp = p2 + strlen(s2);
+			}
+		} else {
+			if (p1) {
+				res = 1;
+				tmp = p1 + strlen(s1);
+			} else if (p2) {
+				res = 0;
+				tmp = p2 + strlen(s2);
+			}
+		}
+	} while (p1 || p2);
+	tmpo[GTK_EDITABLE(entry)->current_pos]=h;
+	return res;
+}
+
+
+int invert_tags(GtkWidget *entry, char *s1, char *s2, int really)
+{
+	int start = GTK_EDITABLE(entry)->selection_start_pos;
+	int finish = GTK_EDITABLE(entry)->selection_end_pos;
+	char *s;
+	
+	s = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); 
+	if (!strncasecmp(&s[start], s1, strlen(s1)) &&
+	    !strncasecmp(&s[finish - strlen(s2)], s2, strlen(s2))) {
+	   	if (really) {
+	    		gtk_editable_delete_text(GTK_EDITABLE(entry), start, start + strlen(s1));
+			gtk_editable_delete_text(GTK_EDITABLE(entry), finish - strlen(s2) - strlen(s1), finish - strlen(s1));
+		}
+		g_free(s);
+		return 1;
+	}
+	g_free(s);
+	return 0;
+}
+
+
+void remove_tags(GtkWidget *entry, char *tag)
+{
+	char *s;
+	char *t;
+	int start = GTK_EDITABLE(entry)->selection_start_pos;
+	int finish = GTK_EDITABLE(entry)->selection_end_pos;
+	s = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); 
+	t = s;
+	while((t = strstr(t, tag))) {
+		if (((t-s) < finish) && ((t-s) >= start)) 
+			gtk_editable_delete_text(GTK_EDITABLE(entry), (t-s), (t-s) + strlen(tag));
+		else t++;
+	}
+	g_free(s);
+}
+
+void surround(GtkWidget *entry, char *pre, char *post)
+{
+	int pos = GTK_EDITABLE(entry)->current_pos;
+	int dummy;
+	int start, finish;
+	if (GTK_EDITABLE(entry)->has_selection) {
+		remove_tags(entry, pre);
+		remove_tags(entry, post);
+		start = GTK_EDITABLE(entry)->selection_start_pos;
+		finish = GTK_EDITABLE(entry)->selection_end_pos;
+		if (start > finish) {
+			dummy = finish;
+			finish = start;
+			start = dummy;
+		}
+		dummy = start;
+		gtk_editable_insert_text(GTK_EDITABLE(entry), pre, strlen(pre), &dummy);
+		dummy = finish + strlen(pre);
+		gtk_editable_insert_text(GTK_EDITABLE(entry), post, strlen(post), &dummy);
+		gtk_editable_select_region(GTK_EDITABLE(entry), start, finish + strlen(pre) + strlen(post));
+	} else {
+		gtk_editable_insert_text(GTK_EDITABLE(entry), pre, strlen(pre), &pos);
+		dummy = pos;
+		gtk_editable_insert_text(GTK_EDITABLE(entry), post, strlen(post), &dummy);
+		gtk_editable_set_position(GTK_EDITABLE(entry), pos);
+	}
+	gtk_widget_grab_focus(entry);
+}
+
+static void advance_past(GtkWidget *entry, char *pre, char *post)
+{
+	char *s, *s2;
+	int pos;
+	if (invert_tags(entry, pre, post, 1))
+		return;
+	s = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1);
+	pos = GTK_EDITABLE(entry)->current_pos;
+	sprintf(debug_buff,"Currently at %d\n",pos);
+	debug_print(debug_buff);
+	s2= strstr(&s[pos], post);
+	if (s2)
+		pos = s2 - s + strlen(post);
+	else
+		pos=-1;
+	sprintf(debug_buff,"Setting position to %d\n",pos);
+	debug_print(debug_buff);
+	gtk_editable_set_position(GTK_EDITABLE(entry), pos);
+	gtk_widget_grab_focus(entry);
+}
+
+static void toggle_color(GtkWidget *color, GtkWidget *entry)
+{
+        if (state_lock)
+                return;
+        if (GTK_TOGGLE_BUTTON(color)->active)
+		show_color_dialog(entry, color);
+        else
+                advance_past(entry, "<FONT COLOR>", "</FONT>");
+}
+
+static void do_link(GtkWidget *linky, GtkWidget *entry)
+{
+	if (state_lock)
+		return;
+	if (GTK_TOGGLE_BUTTON(linky)->active)
+		show_add_link(entry, linky);
+	else
+		advance_past(entry, "<A HREF>", "</A>"	);
+}
+
+static void do_strike(GtkWidget *strike, GtkWidget *entry)
+{
+	if (state_lock)
+		return;
+	if (GTK_TOGGLE_BUTTON(strike)->active)
+		surround(entry, "<STRIKE>","</STRIKE>");
+	else
+		advance_past(entry, "<STRIKE>", "</STRIKE>");
+}
+
+static void do_bold(GtkWidget *bold, GtkWidget *entry)
+{
+	if (state_lock)
+		return;
+	if (GTK_TOGGLE_BUTTON(bold)->active)
+		surround(entry, "<B>","</B>");
+	else
+		advance_past(entry, "<B>", "</B>");
+}
+
+static void do_underline(GtkWidget *underline, GtkWidget *entry)
+{
+	if (state_lock)
+		return;
+	if (GTK_TOGGLE_BUTTON(underline)->active)
+		surround(entry, "<U>","</U>");
+	else
+		advance_past(entry, "<U>", "</U>");
+}
+
+static void do_italic(GtkWidget *italic, GtkWidget *entry)
+{
+	if (state_lock)
+		return;
+	if (GTK_TOGGLE_BUTTON(italic)->active)
+		surround(entry, "<I>","</I>");
+	else
+		advance_past(entry, "<I>", "</I>");
+}
+
+static void do_small(GtkWidget *small, GtkWidget *entry)
+{
+	if (state_lock)
+		return;
+	surround(entry, "<FONT SIZE=\"+1\">","</FONT>");
+}
+
+static void do_normal(GtkWidget *normal, GtkWidget *entry)
+{
+	if (state_lock)
+                 return;
+	surround(entry, "<FONT SIZE=\"+3\">","</FONT>");
+}
+
+static void do_big(GtkWidget *big, GtkWidget *entry)
+{
+	if (state_lock)
+		return;
+	surround(entry, "<FONT SIZE=\"+5\">","</FONT>");
+}
+
+void check_everything(GtkWidget *entry)
+{
+	struct conversation *c;
+	c = (struct conversation *)gtk_object_get_user_data(GTK_OBJECT(entry));
+	if (!c) return;
+	if (invert_tags(entry, "<B>", "</B>", 0))
+		quiet_set(c->bold, TRUE);
+	else if (count_tag(entry, "<B>", "</B>")) 
+		quiet_set(c->bold, TRUE);
+	else
+		quiet_set(c->bold,FALSE);
+	if (invert_tags(entry, "<I>", "</I>", 0))
+		quiet_set(c->italic, TRUE);
+	else if (count_tag(entry, "<I>", "</I>"))  
+		quiet_set(c->italic, TRUE);
+	else
+		quiet_set(c->italic, FALSE);
+     
+	if (invert_tags(entry, "<FONT COLOR", "</FONT>", 0))
+                quiet_set(c->palette, TRUE);
+        else if (count_tag(entry, "<FONT COLOR", "</FONT>"))
+                quiet_set(c->palette, TRUE);
+        else
+                quiet_set(c->palette, FALSE);
+
+	if (invert_tags(entry, "<A HREF", "</A>", 0))
+		quiet_set(c->link, TRUE);
+	else if (count_tag(entry, "<A HREF", "</A>"))
+		quiet_set(c->link, TRUE);
+	else
+		quiet_set(c->link, FALSE);
+	
+ 	if (invert_tags(entry, "<U>", "</U>", 0))
+		quiet_set(c->underline, TRUE);
+	else if (count_tag(entry, "<U>", "</U>"))
+		quiet_set(c->underline, TRUE);
+	else
+		quiet_set(c->underline, FALSE);  
+
+	if (invert_tags(entry, "<STRIKE>", "</STRIKE>", 0))
+		quiet_set(c->strike, TRUE);
+	else if (count_tag(entry, "<STRIKE>", "</STRIKE>"))
+		quiet_set(c->strike, TRUE);
+	else
+		quiet_set(c->strike, FALSE);
+}
+
+
+/*------------------------------------------------------------------------*/
+/*  Takin care of the window..                                            */
+/*------------------------------------------------------------------------*/
+
+
+void write_to_conv(struct conversation *c, char *what, int flags)
+{
+	char *buf = g_malloc(BUF_LONG);
+        char *buf2 = g_malloc(BUF_LONG);
+        char *who = NULL;
+        FILE *fd;
+        char colour[10];
+
+        if (flags & WFLAG_SYSTEM) {
+
+                gtk_html_freeze(GTK_HTML(c->text));
+        
+                gtk_html_append_text(GTK_HTML(c->text), what, 0);
+
+                gtk_html_append_text(GTK_HTML(c->text), "<BR>", 0);
+
+                gtk_html_thaw(GTK_HTML(c->text));
+
+
+                if ((general_options & OPT_GEN_LOG_ALL) || find_log_info(c->name)) {
+                        char *t1;
+
+                        if (general_options & OPT_GEN_STRIP_HTML) {
+                                t1 = strip_html(what);
+                        } else {
+                                t1 = what;
+                        }
+                        fd = open_log_file(c);
+                        fprintf(fd, "%s\n", t1);
+                        fclose(fd);
+                        if (general_options & OPT_GEN_STRIP_HTML) {
+                                g_free(t1);
+                        }
+                }
+                
+        } else {
+
+                if (flags & WFLAG_RECV) {
+                        strcpy(colour, "#ff0000");
+                        who = c->name;
+                } else if (flags & WFLAG_SEND) {
+                        strcpy(colour, "#0000ff");
+                        who = current_user->username;
+                }
+
+                if (flags & WFLAG_AUTO)
+                        sprintf(buf2, " %s", AUTO_RESPONSE);
+                else
+                        buf2[0]=0; /* sprintf(buf2, ""); */
+
+                if (display_options & OPT_DISP_SHOW_TIME)
+                        g_snprintf(buf, BUF_LONG, "<FONT COLOR=\"%s\"><B>%s %s:%s</B></FONT> ", colour, date(), who, buf2);
+                else
+                        g_snprintf(buf, BUF_LONG, "<FONT COLOR=\"%s\"><B>%s:%s</B></FONT> ", colour, who, buf2);
+
+                gtk_html_freeze(GTK_HTML(c->text));
+
+                gtk_html_append_text(GTK_HTML(c->text), buf, 0);
+                gtk_html_append_text(GTK_HTML(c->text), what, (display_options & OPT_DISP_IGNORE_COLOUR) ? HTML_OPTION_NO_COLOURS : 0);
+
+                gtk_html_append_text(GTK_HTML(c->text), "<BR>", 0);
+
+
+                gtk_html_thaw(GTK_HTML(c->text));
+
+                if ((general_options & OPT_GEN_LOG_ALL) || find_log_info(c->name)) {
+                        char *t1, *t2;
+
+                        if (general_options & OPT_GEN_STRIP_HTML) {
+                                t1 = strip_html(buf);
+                                t2 = strip_html(what);
+                        } else {
+                                t1 = buf;
+                                t2 = what;
+                        }
+                        fd = open_log_file(c);
+                        fprintf(fd, "%s%s\n", t1, t2);
+                        fclose(fd);
+                        if (general_options & OPT_GEN_STRIP_HTML) {
+                                g_free(t1);
+                                g_free(t2);
+                        }
+                }
+        }
+
+/*        if (!GTK_WIDGET_MAPPED(c->window)) {
+                
+                if (dark_icon_pm == NULL)
+                        dark_icon_pm = gdk_pixmap_create_from_xpm_d(c->window->window, &dark_icon_bm,
+                                                                    NULL, (gchar **)aimicon2_xpm);
+                gdk_window_set_icon(c->window->window, NULL, dark_icon_pm, dark_icon_bm);
+	}
+*/
+
+        if (general_options & OPT_GEN_POPUP_WINDOWS)
+                gdk_window_raise(c->window->window);
+
+        
+	g_free(buf);
+        g_free(buf2);
+}
+
+
+
+
+
+void show_conv(struct conversation *c)
+{
+	GtkWidget *win;
+        char buf[256];
+        GtkWidget *text;
+        GtkWidget *sw;
+	GtkWidget *send;
+	GtkWidget *info;
+        GtkWidget *warn;
+        GtkWidget *block;
+	GtkWidget *color;
+	GtkWidget *close;
+	GtkWidget *entry;
+	GtkWidget *toolbar;
+	GtkWidget *bbox;
+        GtkWidget *vbox;
+        GtkWidget *add;
+        GdkPixmap *strike_i, *small_i, *normal_i, *big_i, *bold_i, *italic_i, *underline_i, *speaker_i, *wood_i, *palette_i, *link_i;
+        GtkWidget *strike_p, *small_p, *normal_p, *big_p, *bold_p, *italic_p, *underline_p, *speaker_p, *wood_p, *palette_p, *link_p;
+        GtkWidget *strike, *small, *normal, *big, *bold, *italic, *underline, *speaker, *wood, *palette, *link;
+        GdkBitmap *mask;
+	
+	win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+        gtk_window_set_policy(GTK_WINDOW(win), TRUE, TRUE, TRUE);
+
+        gtk_widget_realize(win);
+        aol_icon(win->window);
+ 
+        
+        c->window = win;
+        
+	send = gtk_button_new_with_label("Send");
+	info = gtk_button_new_with_label("Info");
+	warn = gtk_button_new_with_label("Warn");
+	color = gtk_button_new_with_label("Color");
+	close = gtk_button_new_with_label("Close");
+	if (find_buddy(c->name) != NULL) {
+       		add = gtk_button_new_with_label("Remove");
+	}
+	else {
+		add = gtk_button_new_with_label("Add");
+	}
+        block = gtk_button_new_with_label("Block");
+
+
+        bbox = gtk_hbox_new(TRUE, 0);
+	vbox = gtk_vbox_new(FALSE, 0);
+
+	entry = gtk_text_new(NULL, NULL);
+	gtk_text_set_editable(GTK_TEXT(entry), TRUE);
+	gtk_text_set_word_wrap(GTK_TEXT(entry), TRUE);
+        
+	/* Toolbar */
+	toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS);
+
+	link_i = gdk_pixmap_create_from_xpm_d(win->window, &mask,
+	     &win->style->white, link_xpm );
+	link_p = gtk_pixmap_new(link_i, mask);
+	gtk_widget_show(link_p);
+
+	palette_i = gdk_pixmap_create_from_xpm_d (win->window, &mask,
+             &win->style->white, palette_xpm );
+	palette_p = gtk_pixmap_new(palette_i, mask);
+	gtk_widget_show(palette_p);
+
+	wood_i = gdk_pixmap_create_from_xpm_d ( win->window, &mask, 
+	     &win->style->white, wood_xpm );
+	wood_p = gtk_pixmap_new(wood_i, mask);
+	gtk_widget_show(wood_p);
+	speaker_i = gdk_pixmap_create_from_xpm_d ( win->window, &mask,
+             &win->style->white, speaker_xpm );
+	speaker_p = gtk_pixmap_new(speaker_i, mask);
+	gtk_widget_show(speaker_p);
+	c->makesound=1;
+	strike_i = gdk_pixmap_create_from_xpm_d ( win->window, &mask,
+	     &win->style->white, strike_xpm );
+	strike_p = gtk_pixmap_new(strike_i, mask);
+	gtk_widget_show(strike_p);
+	bold_i = gdk_pixmap_create_from_xpm_d ( win->window, &mask,
+             &win->style->white, bold_xpm );
+	bold_p = gtk_pixmap_new(bold_i, mask);
+	gtk_widget_show(bold_p);
+	italic_i = gdk_pixmap_create_from_xpm_d ( win->window, &mask,
+             &win->style->white, italic_xpm );
+	italic_p = gtk_pixmap_new(italic_i, mask);
+	gtk_widget_show(italic_p);
+	underline_i = gdk_pixmap_create_from_xpm_d ( win->window, &mask,
+	     &win->style->white, underline_xpm );
+	underline_p = gtk_pixmap_new(underline_i, mask);
+	gtk_widget_show(underline_p);
+	small_i = gdk_pixmap_create_from_xpm_d ( win->window, &mask,
+             &win->style->white, small_xpm );
+	small_p = gtk_pixmap_new(small_i, mask);
+	gtk_widget_show(small_p);
+	normal_i = gdk_pixmap_create_from_xpm_d ( win->window, &mask,
+             &win->style->white, normal_xpm );
+	normal_p = gtk_pixmap_new(normal_i, mask);
+	gtk_widget_show(normal_p);
+	big_i = gdk_pixmap_create_from_xpm_d ( win->window, &mask,
+             &win->style->white, big_xpm );
+	big_p = gtk_pixmap_new(big_i, mask);
+	gtk_widget_show(big_p);
+
+
+	bold = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar),
+	                                  GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
+					  "Bold", "Bold Text", "Bold", bold_p,
+					  GTK_SIGNAL_FUNC(do_bold), entry);
+	italic = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), 
+		                            GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
+					    NULL, "Italics", "Italics Text",
+					    "Italics", italic_p, GTK_SIGNAL_FUNC(do_italic), entry);
+	underline = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar),
+					    GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
+					    NULL, "Underline", "Underline Text",
+					    "Underline", underline_p, GTK_SIGNAL_FUNC(do_underline), entry);
+	strike = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar),
+					    GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
+					    NULL, "Strike", "Strike through Text",
+					    "Strike", strike_p, GTK_SIGNAL_FUNC(do_strike), entry);
+	gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));
+	small = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "Small", "Decrease font size", "Small", small_p, GTK_SIGNAL_FUNC(do_small), entry);
+	normal = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "Normal", "Normal font size", "Normal", normal_p, GTK_SIGNAL_FUNC(do_normal), entry);
+	big = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "Big", "Increase font size", "Big", big_p, GTK_SIGNAL_FUNC(do_big), entry);
+	gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));
+	link = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar),
+                                            GTK_TOOLBAR_CHILD_TOGGLEBUTTON,                                                 NULL, "Link", "Insert Link",
+                                            "Link", link_p, GTK_SIGNAL_FUNC(do_link), entry);                 
+	palette = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar),
+					    GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
+					    NULL, "Color", "Text Color",
+				 	    "Color", palette_p, GTK_SIGNAL_FUNC(toggle_color), entry); 
+	wood = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar),
+					    GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
+					    NULL, "Logging", "Enable logging",
+                                          "Logging", wood_p, GTK_SIGNAL_FUNC(toggle_loggle), c);
+        speaker = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar),
+		                            GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
+					    NULL, "Sound", "Enable sounds",
+					    "Sound", speaker_p, GTK_SIGNAL_FUNC(set_option), &c->makesound);
+	c->makesound=0;
+	gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(speaker), TRUE);
+
+        state_lock = 1;
+	if (find_log_info(c->name))
+		gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(wood), TRUE);
+	else
+		gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(wood), FALSE);
+        state_lock = 0;
+        
+	gtk_widget_show(toolbar);
+	
+	c->entry = entry;
+	c->bold = bold;
+	c->strike = strike;
+        c->italic = italic;
+	c->underline = underline;
+        c->log_button = wood;
+	c->palette = palette;
+	c->link = link;  
+        c->add_button = add;
+
+        gtk_widget_set_sensitive(c->log_button, ((general_options & OPT_GEN_LOG_ALL)) ? FALSE : TRUE);
+        
+	gtk_widget_set_sensitive(c->bold, ((font_options & OPT_FONT_BOLD)) ? FALSE : TRUE);
+	gtk_widget_set_sensitive(c->italic, ((font_options & OPT_FONT_ITALIC)) ? FALSE : TRUE);
+	gtk_widget_set_sensitive(c->underline, ((font_options & OPT_FONT_UNDERLINE)) ? FALSE : TRUE);
+	gtk_widget_set_sensitive(c->strike, ((font_options & OPT_FONT_STRIKE)) ? FALSE : TRUE);
+        
+	gtk_object_set_user_data(GTK_OBJECT(entry), c);
+
+	
+
+	gtk_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(send_callback),c);
+
+        /* Text box */
+
+        
+        text = gtk_html_new(NULL, NULL);
+
+	gtk_html_set_editable(GTK_HTML(text), FALSE);
+/*	gtk_html_set_transparent(GTK_HTML(text), (transparent) ? TRUE : FALSE);*/
+        c->text = text;
+
+        sw = gtk_scrolled_window_new (NULL, NULL);
+        gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
+                                        GTK_POLICY_NEVER,
+                                        GTK_POLICY_ALWAYS);
+        gtk_widget_show(sw);
+        gtk_container_add(GTK_CONTAINER(sw), text);
+        gtk_widget_show(text);
+        
+
+
+
+        GTK_HTML (text)->hadj->step_increment = 10.0;
+        GTK_HTML (text)->vadj->step_increment = 10.0;
+        gtk_widget_set_usize(sw, 320, 150);
+
+        
+
+	/* Ready and pack buttons */
+	gtk_object_set_user_data(GTK_OBJECT(win), c);
+	gtk_object_set_user_data(GTK_OBJECT(close), c);
+	gtk_signal_connect(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(close_callback), c);
+	gtk_signal_connect(GTK_OBJECT(send), "clicked", GTK_SIGNAL_FUNC(send_callback), c);
+	gtk_signal_connect(GTK_OBJECT(add), "clicked", GTK_SIGNAL_FUNC(add_callback), c);
+        gtk_signal_connect(GTK_OBJECT(info), "clicked", GTK_SIGNAL_FUNC(info_callback), c);
+        gtk_signal_connect(GTK_OBJECT(warn), "clicked", GTK_SIGNAL_FUNC(warn_callback), c);
+        gtk_signal_connect(GTK_OBJECT(block), "clicked", GTK_SIGNAL_FUNC(block_callback), c);
+	gtk_signal_connect(GTK_OBJECT(color), "clicked", GTK_SIGNAL_FUNC(color_callback), c);
+       
+	gtk_signal_connect(GTK_OBJECT(entry), "key_press_event", GTK_SIGNAL_FUNC(user_keypress_callback), c);
+	gtk_widget_set_usize(entry, 300, 70);
+
+	gtk_box_pack_start(GTK_BOX(bbox), send, TRUE, TRUE, 5);
+	gtk_box_pack_start(GTK_BOX(bbox), info, TRUE, TRUE, 5);
+        gtk_box_pack_start(GTK_BOX(bbox), warn, TRUE, TRUE, 5);
+        gtk_box_pack_start(GTK_BOX(bbox), block, TRUE, TRUE, 5);
+	gtk_box_pack_start(GTK_BOX(bbox), color, TRUE, TRUE, 5);
+	gtk_box_pack_start(GTK_BOX(bbox), add, TRUE, TRUE, 5);
+	gtk_box_pack_start(GTK_BOX(bbox), close, TRUE, TRUE, 5);
+	
+	/* pack and fill the rest */
+
+	gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 5);
+        gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 5);
+	gtk_box_pack_start(GTK_BOX(vbox), entry, FALSE, FALSE, 5);
+	gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
+
+	
+
+
+	gtk_widget_show(send);
+	gtk_widget_show(info);
+	gtk_widget_show(warn);
+	/* gtk_widget_show(color); */
+	gtk_widget_show(close);	
+        gtk_widget_show(add);
+        gtk_widget_show(block);
+	gtk_widget_show(bbox);
+	gtk_widget_show(vbox);
+	gtk_widget_show(entry);
+	gtk_widget_show(text);
+	
+	gtk_container_add(GTK_CONTAINER(win),vbox);
+        gtk_container_border_width(GTK_CONTAINER(win), 10);
+
+	if ((find_log_info(c->name)) || ((general_options & OPT_GEN_LOG_ALL)))
+		g_snprintf(buf, sizeof(buf), LOG_CONVERSATION_TITLE, c->name);
+	else
+		g_snprintf(buf, sizeof(buf), CONVERSATION_TITLE, c->name);
+	gtk_window_set_title(GTK_WINDOW(win), buf);
+	gtk_window_set_focus(GTK_WINDOW(win),entry);
+
+	gtk_signal_connect(GTK_OBJECT(win), "delete_event", GTK_SIGNAL_FUNC(delete_event_convo), c);
+	gtk_signal_connect(GTK_OBJECT(entry), "key_press_event", GTK_SIGNAL_FUNC(entry_key_pressed), entry);
+
+	gtk_widget_show(win);
+	
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/dialogs.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,2409 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ * 
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h> 
+#include <unistd.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <gtk/gtk.h>
+#include "gaim.h"
+#include "gtkhtml.h"
+
+static GtkWidget *imdialog = NULL; /*I only want ONE of these :) */
+static GList *dialogwindows = NULL;
+static GtkWidget *linkdialog, *colordialog, *exportdialog, *importdialog, *logdialog;
+
+/*static void accept_callback(GtkWidget *widget, struct file_transfer *t);*/
+
+struct create_away {
+        GtkWidget *window;
+        GtkWidget *entry;
+        GtkWidget *text;
+        GtkWidget *checkbx;
+};
+
+
+struct warning {
+        GtkWidget *window;
+        GtkWidget *anon;
+        char *who;
+};
+
+struct addbuddy {
+        GtkWidget *window;
+        GtkWidget *combo;
+        GtkWidget *entry;
+};
+
+struct addperm {
+        GtkWidget *window;
+        GSList *buttons;
+        GtkWidget *entry;
+};
+
+struct addbp {
+        GtkWidget *window;
+        GtkWidget *nameentry;
+        GtkWidget *messentry;
+	GtkWidget *sendim;
+	GtkWidget *openwindow;
+};
+
+struct findbyemail {
+	GtkWidget *window;
+	GtkWidget *emailentry;
+};
+
+struct findbyinfo {
+	GtkWidget *window;
+	GtkWidget *firstentry;
+	GtkWidget *middleentry;
+	GtkWidget *lastentry;
+	GtkWidget *maidenentry;
+	GtkWidget *cityentry;
+	GtkWidget *stateentry;
+	GtkWidget *countryentry;
+};
+
+struct registerdlg {
+	GtkWidget *window;
+	GtkWidget *name;
+	GtkWidget *email;
+	GtkWidget *uname;
+	GtkWidget *sname;
+	GtkWidget *country;
+};
+
+struct info_dlg {
+	GtkWidget *window;
+	GtkWidget *text;
+	GtkWidget *close;
+};
+
+
+struct set_info_dlg {
+	GtkWidget *window;
+	GtkWidget *text;
+	GtkWidget *save;
+	GtkWidget *cancel;
+};
+
+struct set_dir_dlg {
+	GtkWidget *window;
+	GtkWidget *first;
+	GtkWidget *middle;
+	GtkWidget *last;
+	GtkWidget *maiden;
+	GtkWidget *city;
+	GtkWidget *state;
+	GtkWidget *country;
+	GtkWidget *web;
+	GtkWidget *cancel;
+	GtkWidget *save;
+};
+
+struct linkdlg {
+	GtkWidget *ok;
+	GtkWidget *cancel;
+	GtkWidget *window;
+	GtkWidget *url;
+	GtkWidget *text;
+	GtkWidget *toggle;
+	GtkWidget *entry;
+};
+
+
+/*------------------------------------------------------------------------*/
+/*  Function to Send an Email                                             */
+/*------------------------------------------------------------------------*/
+
+static int g_sendemail(char *name, char *email, int uname, int sname, char *country)
+{
+	static char email_data[2000];
+	int sock;
+	struct hostent *host;
+	struct sockaddr_in site;
+/*	char data[3]; */
+	FILE *sockfile;
+	char uname_output;
+        FILE *tmpfile;
+        char filename[128];
+        char buf[256];
+        int i=0, tmpfd=-1;
+
+        while (i<10000 && tmpfd < 0) {
+                g_snprintf(filename, 128, "/tmp/gaim_%s%d.tmp", current_user->username, i++);
+
+                tmpfd = open(filename, O_RDWR|O_CREAT|O_EXCL, 0600);
+        }
+
+        if(tmpfd < 0) {
+                return -1;
+        }
+
+        
+	if (uname)
+        {
+                g_snprintf(buf, sizeof(buf), "uname -a > %s", filename);
+		system(buf);
+	}
+	
+	host = gethostbyname(REG_SRVR);
+	if (!host) 
+	{
+		printf("Error Resolving Mail Server.\n");
+		return -1;
+	}
+
+	site.sin_family = AF_INET;
+	site.sin_addr.s_addr = *(long *)(host->h_addr);
+	site.sin_port = htons(REG_PORT);
+
+	sock = socket(AF_INET, SOCK_STREAM, 0);
+	if (sock < 0)
+	{
+		printf("Socket Error.\n");
+		return -1;
+	}
+	
+	if (connect(sock, (struct sockaddr *)&site, sizeof(site)))
+	{
+		printf("Error Connecting to Socket.\n");
+		return -1;
+	}	 
+
+	sockfile = fdopen(sock, "r+");
+
+	g_snprintf(email_data, sizeof(email_data), "mail from: %s\n", REG_EMAIL_ADDR);
+	fputs(email_data, sockfile);
+	
+	g_snprintf(email_data, sizeof(email_data), "rcpt to: %s\n", REG_EMAIL_ADDR);
+	fputs(email_data, sockfile);
+
+	g_snprintf(email_data, sizeof(email_data), "data\n");
+	fputs(email_data, sockfile);
+	g_snprintf(email_data, sizeof(email_data), "Subject: Registration Information\n\nBelow is the submitted Registration Information\n----------------------------------\nName: %s\nEmail: %s\nCountry: %s\nSName: %s\nGAIM: v%s\nUname: ", name, email, country, sname ? current_user->username : "N/A", VERSION);
+	fputs(email_data, sockfile);
+
+	if (uname)
+	{
+		tmpfile = fopen(filename, "r");
+		while (!feof(tmpfile))
+		{
+			uname_output = fgetc(tmpfile);
+			if (!feof(tmpfile))
+				fputc(uname_output, sockfile);
+		}
+		fclose(tmpfile);
+        }
+
+        unlink(filename);
+	
+	g_snprintf(email_data, sizeof(email_data), "\n.\nquit\n\n");
+	fputs(email_data, sockfile);
+
+/*	while (fgets(data, 2, sockfile)) {
+	}
+        */
+        /* I don't think the above is necessary... */
+        
+	close(sock);
+
+	return 1;
+}
+
+/*------------------------------------------------------------------------*/
+/*  Destroys                                                              */
+/*------------------------------------------------------------------------*/
+
+
+static void destroy_dialog(GtkWidget *w, GtkWidget *w2)
+{
+        GtkWidget *dest;
+        
+        if (!GTK_IS_WIDGET(w2))
+                dest = w;
+        else
+                dest = w2;
+
+        if (dest == imdialog)
+		imdialog = NULL;
+
+	if (dest == exportdialog)
+		exportdialog = NULL;
+
+	if (dest == importdialog)
+		importdialog = NULL;
+
+	if (dest == logdialog)
+		logdialog = NULL;
+
+	if (dest == colordialog)
+		colordialog = NULL;
+
+	if (dest == linkdialog)
+		linkdialog = NULL;
+
+        dialogwindows = g_list_remove(dialogwindows, dest);
+        gtk_widget_destroy(dest);
+
+}
+
+
+void destroy_all_dialogs()
+{
+        GList *d = dialogwindows;
+        
+        while(d) {
+                destroy_dialog(NULL, d->data);
+                d = d->next;
+        }
+        
+        g_list_free(dialogwindows);
+        dialogwindows = NULL;
+
+        if (imdialog) {
+                destroy_dialog(NULL, imdialog);
+                imdialog = NULL;
+        }
+        
+	if (linkdialog) {
+		destroy_dialog(NULL, linkdialog);
+		linkdialog = NULL;
+	}
+	if (colordialog) {
+		destroy_dialog(NULL, colordialog);
+		colordialog = NULL;
+	}
+
+        if (exportdialog) {
+                destroy_dialog(NULL, exportdialog);
+                exportdialog = NULL;
+        }
+
+        if (importdialog) {
+                destroy_dialog(NULL, exportdialog);
+                importdialog = NULL;
+        }
+	
+	if (logdialog) {
+		destroy_dialog(NULL, logdialog);
+		logdialog = NULL;
+	}
+
+}
+
+static void do_warn(GtkWidget *widget, struct warning *w)
+{
+        serv_warn(w->who, (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w->anon))) ?
+                   1 : 0);
+        
+        destroy_dialog(NULL, w->window);
+}
+
+
+void show_warn_dialog(char *who)
+{
+	GtkWidget *cancel;
+	GtkWidget *warn;
+	GtkWidget *label;
+	GtkWidget *vbox;
+        GtkWidget *bbox;
+        struct warning *w = g_new0(struct warning, 1);
+        
+        char *buf = g_malloc(128);
+        w->window = gtk_window_new(GTK_WINDOW_DIALOG);
+        dialogwindows = g_list_prepend(dialogwindows, w->window);
+        cancel = gtk_button_new_with_label("Cancel");
+        warn = gtk_button_new_with_label("Warn");
+        bbox = gtk_hbox_new(TRUE, 10);
+        vbox = gtk_vbox_new(FALSE, 5);
+
+        /* Put the buttons in the box */
+        gtk_box_pack_start(GTK_BOX(bbox), warn, TRUE, TRUE, 10);
+        gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10);
+
+        g_snprintf(buf, 127, "Do you really want to warn %s?", who);
+        label = gtk_label_new(buf);
+        gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
+        gtk_widget_show(label);
+        w->anon = gtk_check_button_new_with_label("Warn anonymously?");
+        gtk_box_pack_start(GTK_BOX(vbox), w->anon, TRUE, TRUE, 0);
+
+        label = gtk_label_new("Anonymous warnings are less harsh.");
+        gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
+        gtk_widget_show(label);
+
+        w->who = who;
+		
+        gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
+
+        /* Handle closes right */
+        gtk_signal_connect(GTK_OBJECT(w->window), "delete_event",
+                           GTK_SIGNAL_FUNC(destroy_dialog), w->window);
+        gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
+                           GTK_SIGNAL_FUNC(destroy_dialog), w->window);
+        gtk_signal_connect(GTK_OBJECT(warn), "clicked",
+                           GTK_SIGNAL_FUNC(do_warn), w);
+        /* Finish up */
+        gtk_widget_show(warn);
+        gtk_widget_show(cancel);
+        gtk_widget_show(w->anon);
+        gtk_widget_show(bbox);
+        gtk_widget_show(vbox);
+        gtk_window_set_title(GTK_WINDOW(w->window), "Gaim - Warn user?");
+        gtk_container_add(GTK_CONTAINER(w->window), vbox);
+        gtk_widget_realize(w->window);
+        aol_icon(w->window->window);
+
+        gtk_widget_show(w->window);
+}
+
+
+/*------------------------------------------------------------------------*/
+/*  The dialog for getting an error                                       */
+/*------------------------------------------------------------------------*/
+
+void
+do_error_dialog(char *message, char *title)
+{
+        GtkWidget *d;
+	GtkWidget *label;
+	GtkWidget *close;
+
+
+	d = gtk_dialog_new();
+
+        label = gtk_label_new(message);
+        gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
+	gtk_widget_show(label);
+	close = gtk_button_new_with_label("Close");
+	gtk_widget_show(close);
+	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->vbox),
+		label, FALSE, FALSE, 5);
+	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->action_area), 
+		close, FALSE, FALSE, 5);
+		
+
+	gtk_window_set_title(GTK_WINDOW(d), title);
+	gtk_signal_connect(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), d);
+        gtk_widget_realize(d);
+	aol_icon(d->window);
+
+	gtk_widget_show(d);
+}
+
+
+
+void show_error_dialog(char *c)
+{
+
+	int no = atoi(c);
+	char *w = strtok(NULL, ":");
+	char buf[256];
+	char buf2[32];
+ 	
+	
+        switch(no) {
+        case 69:
+                g_snprintf(buf, sizeof(buf), "Unable to write file %s.", w);
+                break;
+        case 169:
+                g_snprintf(buf, sizeof(buf), "Unable to read file %s.", w);
+                break;
+        case 269:
+                g_snprintf(buf, sizeof(buf), "Message too long, last %s bytes truncated.", w);
+                break;
+        case 901:
+                g_snprintf(buf, sizeof(buf), "%s not currently logged in.", w);
+                break;
+        case 902:
+                g_snprintf(buf, sizeof(buf), "Warning of %s not allowed.", w);
+                break;
+        case 903:
+                g_snprintf(buf, sizeof(buf), "A message has been dropped, you are exceeding the server speed limit.");
+                break;
+        case 950:
+                g_snprintf(buf, sizeof(buf), "Chat in %s is not available.", w);
+                break;
+        case 960:
+                g_snprintf(buf, sizeof(buf), "You are sending messages too fast to %s.", w);
+                break;
+        case 961:
+                g_snprintf(buf, sizeof(buf), "You missed an IM from %s because it was too big.", w);
+                break;
+        case 962:
+                g_snprintf(buf, sizeof(buf), "You missed an IM from %s because it was sent too fast.", w);
+                break;
+        case 970:
+                g_snprintf(buf, sizeof(buf), "Failure.");
+                break;
+        case 971:
+                g_snprintf(buf, sizeof(buf), "Too many matches.");
+                break;
+        case 972:
+                g_snprintf(buf, sizeof(buf), "Need more qualifiers.");
+                break;
+        case 973:
+                g_snprintf(buf, sizeof(buf), "Dir service temporarily unavailable.");
+                break;
+        case 974:
+                g_snprintf(buf, sizeof(buf), "Email lookup restricted.");
+                break;
+        case 975:
+                g_snprintf(buf, sizeof(buf), "Keyword ignored.");
+                break;
+        case 976:
+                g_snprintf(buf, sizeof(buf), "No keywords.");
+                break;
+        case 977:
+                g_snprintf(buf, sizeof(buf), "User has no directory information.");
+                /* g_snprintf(buf, sizeof(buf), "Language not supported."); */
+                break;
+        case 978:
+                g_snprintf(buf, sizeof(buf), "Country not supported.");
+                break;
+        case 979:
+                g_snprintf(buf, sizeof(buf), "Failure unknown: %s.", w);
+                break;
+        case 980:
+                g_snprintf(buf, sizeof(buf), "Incorrect nickname or password.");
+                break;
+        case 981:
+                g_snprintf(buf, sizeof(buf), "The service is temporarily unavailable.");
+                break;
+        case 982:
+                g_snprintf(buf, sizeof(buf), "Your warning level is currently too high to log in.");
+                break;
+        case 983:
+                g_snprintf(buf, sizeof(buf), "You have been connecting and disconnecting too frequently.  Wait ten minutes and try again.  If you continue to try, you will need to wait even longer.");
+                break;
+        case 989:
+                g_snprintf(buf, sizeof(buf), "An unknown signon error has occurred: %s.", w);
+                break;
+        default:
+                g_snprintf(buf, sizeof(buf), "An unknown error, %d, has occured.  Info: %s", no, w);
+	}
+	
+	g_snprintf(buf2, sizeof(buf2), "Gaim - Error %d", no);
+
+
+        do_error_dialog(buf, buf2);
+        return;
+}
+
+static void do_im(GtkWidget *widget, GtkWidget *imentry)
+{
+        char *who;
+        struct conversation *c;
+
+        who = g_strdup(normalize(gtk_entry_get_text(GTK_ENTRY(imentry))));
+        
+	destroy_dialog(NULL, imdialog);
+        imdialog = NULL;
+        
+        if (!strcasecmp(who, "")) {
+                g_free(who);
+		return;
+	}
+
+        c = find_conversation(who);
+
+        if (c == NULL) {
+                c = new_conversation(who);
+        } else {
+                gdk_window_raise(c->window->window);
+	}
+        g_free(who);
+}
+
+void show_ee_dialog(int ee)
+{
+	GtkWidget *ok;
+	GtkWidget *label;
+	GtkWidget *box;
+	GtkWidget *eedialog;
+
+	eedialog = gtk_window_new(GTK_WINDOW_DIALOG);
+        ok = gtk_button_new_with_label("OK");
+        box = gtk_vbox_new(FALSE, 10);
+
+	if (ee == 0)
+		label = gtk_label_new("Amazing!  Simply Amazing!");
+	else if (ee == 1)
+		label = gtk_label_new("Pimpin\' Penguin Style! *Waddle Waddle*");
+	else
+		label = gtk_label_new("You should be me.  I'm so cute!");
+
+	gtk_widget_show(label);
+	gtk_widget_show(ok);
+
+	gtk_box_pack_start(GTK_BOX(box), label, TRUE, TRUE, 10);
+	gtk_box_pack_start(GTK_BOX(box), ok, FALSE, FALSE, 10);
+
+	gtk_widget_show(box);
+
+	gtk_container_add(GTK_CONTAINER(eedialog), box);
+	gtk_window_set_title(GTK_WINDOW(eedialog), "Gaim - SUPRISE!");
+
+	gtk_signal_connect(GTK_OBJECT(ok), "clicked",
+			   GTK_SIGNAL_FUNC(destroy_dialog), eedialog);
+	gtk_widget_realize(eedialog);
+        aol_icon(eedialog->window);
+
+	gtk_widget_show(eedialog);
+}
+
+void show_im_dialog(GtkWidget *w, GtkWidget *w2)
+{
+        GtkWidget *cancel;
+	GtkWidget *ok;
+	GtkWidget *imentry;
+        GtkWidget *vbox;
+        GtkWidget *ebox;
+        GtkWidget *bbox;
+        GtkWidget *label;
+
+        if (!imdialog) {
+
+                imdialog = gtk_window_new(GTK_WINDOW_DIALOG);
+                cancel = gtk_button_new_with_label("Cancel");
+                ok = gtk_button_new_with_label("OK");
+                bbox = gtk_hbox_new(TRUE, 10);
+                vbox = gtk_vbox_new(FALSE, 5);
+                ebox = gtk_hbox_new(FALSE, 2);
+
+                /* Put the buttons in the box */
+                gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 10);
+                gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10);
+
+                label = gtk_label_new("IM who: ");
+                gtk_box_pack_start(GTK_BOX(ebox), label, TRUE, TRUE, 10);
+                gtk_widget_show(label);
+
+                imentry = gtk_entry_new();
+                gtk_box_pack_start(GTK_BOX(ebox), imentry, TRUE, TRUE, 10);
+
+                gtk_box_pack_start(GTK_BOX(vbox), ebox, FALSE, FALSE, 5);
+                gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
+
+                /* Handle closes right */
+		gtk_signal_connect(GTK_OBJECT(imentry), "activate",
+				   GTK_SIGNAL_FUNC(do_im), imentry);
+                gtk_signal_connect(GTK_OBJECT(imdialog), "destroy",
+                                   GTK_SIGNAL_FUNC(destroy_dialog), imdialog);
+                gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
+                                   GTK_SIGNAL_FUNC(destroy_dialog), imdialog);
+                gtk_signal_connect(GTK_OBJECT(ok), "clicked",
+                                   GTK_SIGNAL_FUNC(do_im), imentry);
+                /* Finish up */
+                gtk_widget_show(ok);
+                gtk_widget_show(cancel);
+                gtk_widget_show(ebox);
+                gtk_widget_show(imentry);
+                gtk_widget_show(bbox);
+                gtk_widget_show(vbox);
+                gtk_window_set_title(GTK_WINDOW(imdialog), "Gaim - IM user");
+                gtk_container_add(GTK_CONTAINER(imdialog), vbox);
+                gtk_widget_grab_focus(imentry);
+                gtk_widget_realize(imdialog);
+                aol_icon(imdialog->window);
+
+        }
+        gtk_widget_show(imdialog);
+}
+
+
+/*------------------------------------------------------------------------*/
+/*  The dialog for adding buddies                                         */
+/*------------------------------------------------------------------------*/
+
+void do_add_buddy(GtkWidget *w, struct addbuddy *a)
+{
+	char *grp, *who;
+        struct conversation *c;
+        
+	who = gtk_entry_get_text(GTK_ENTRY(a->entry));
+        grp = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(a->combo)->entry));
+
+        c = find_conversation(who);
+
+        add_buddy(grp, who);
+
+        if (c != NULL)
+		gtk_label_set_text(GTK_LABEL(GTK_BIN(c->add_button)->child), "Remove");
+        
+        build_edit_tree();
+
+        serv_save_config();
+
+        serv_add_buddy(who);
+
+        update_num_groups();
+
+        destroy_dialog(NULL, a->window);
+}
+
+
+static GList *groups_tree()
+{
+	GList *tmp=NULL;
+        char *tmp2;
+	struct group *g;
+        GList *grp = groups;
+        
+	if (!grp) {
+                tmp2 = g_strdup("Buddies");
+                tmp = g_list_append(tmp, tmp2);
+	} else {
+		while(grp) {
+			g = (struct group *)grp->data;
+                        tmp2 = g->name;
+                        tmp=g_list_append(tmp, tmp2);
+			grp = grp->next;
+		}
+	}
+	return tmp;
+}
+
+
+void show_add_buddy(char *buddy, char *group)
+{
+	GtkWidget *cancel;
+	GtkWidget *add;
+	GtkWidget *label;
+	GtkWidget *bbox;
+	GtkWidget *vbox;
+        GtkWidget *topbox;
+        struct addbuddy *a = g_new0(struct addbuddy, 1);
+        
+        a->window = gtk_window_new(GTK_WINDOW_DIALOG);
+        dialogwindows = g_list_prepend(dialogwindows, a->window);
+        cancel = gtk_button_new_with_label("Cancel");
+        add = gtk_button_new_with_label("Add");
+        bbox = gtk_hbox_new(TRUE, 10);
+        topbox = gtk_hbox_new(FALSE, 5);
+        vbox = gtk_vbox_new(FALSE, 5);
+        a->entry = gtk_entry_new();
+        a->combo = gtk_combo_new();
+        /* Fix the combo box */
+        gtk_combo_set_popdown_strings(GTK_COMBO(a->combo), groups_tree());
+        /* Put the buttons in the box */
+        gtk_box_pack_start(GTK_BOX(bbox), add, TRUE, TRUE, 10);
+        gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10);
+
+        label = gtk_label_new("Add");
+        gtk_widget_show(label);
+        gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
+        gtk_box_pack_start(GTK_BOX(topbox), a->entry, FALSE, FALSE, 5);
+        if (buddy != NULL)
+                gtk_entry_set_text(GTK_ENTRY(a->entry), buddy);
+
+        label = gtk_label_new("to group");
+        gtk_widget_show(label);
+        gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
+        gtk_box_pack_start(GTK_BOX(topbox), a->combo, FALSE, FALSE, 5);
+
+        if (group != NULL)
+                gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(a->combo)->entry), group);
+
+        /* And the boxes in the box */
+        gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5);
+        gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
+
+        /* Handle closes right */
+        gtk_signal_connect(GTK_OBJECT(a->window), "destroy",
+                           GTK_SIGNAL_FUNC(destroy_dialog), a->window);
+        gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
+                           GTK_SIGNAL_FUNC(destroy_dialog), a->window);
+        gtk_signal_connect(GTK_OBJECT(add), "clicked",
+                           GTK_SIGNAL_FUNC(do_add_buddy), a);
+        gtk_signal_connect(GTK_OBJECT(a->entry), "activate",
+                           GTK_SIGNAL_FUNC(do_add_buddy), a);
+        /* Finish up */
+        gtk_widget_show(add);
+        gtk_widget_show(cancel);
+        gtk_widget_show(a->combo);
+        gtk_widget_show(a->entry);
+        gtk_widget_show(topbox);
+        gtk_widget_show(bbox);
+        gtk_widget_show(vbox);
+        gtk_window_set_title(GTK_WINDOW(a->window), "Gaim - Add Buddy");
+        gtk_window_set_focus(GTK_WINDOW(a->window), a->entry);
+        gtk_container_add(GTK_CONTAINER(a->window), vbox);
+        gtk_widget_realize(a->window);
+        aol_icon(a->window->window);
+
+	gtk_widget_show(a->window);
+}
+
+
+/*------------------------------------------------------------------------*/
+/*  The dialog for new buddy pounces                                      */
+/*------------------------------------------------------------------------*/
+
+
+void do_new_bp(GtkWidget *w, struct addbp *b)
+{
+        struct buddy_pounce *bp = g_new0(struct buddy_pounce, 1);
+	
+        strcpy(bp->name, gtk_entry_get_text(GTK_ENTRY(b->nameentry)));
+        strcpy(bp->message, gtk_entry_get_text(GTK_ENTRY(b->messentry)));
+	if (GTK_TOGGLE_BUTTON(b->openwindow)->active)
+		bp->popup = 1;
+	else
+		bp->popup = 0;
+
+	if (GTK_TOGGLE_BUTTON(b->sendim)->active)
+		bp->sendim = 1;
+	else
+		bp->sendim = 0;
+        buddy_pounces = g_list_append(buddy_pounces, bp);
+	
+        do_bp_menu();
+        
+        
+        destroy_dialog(NULL, b->window);
+        g_free(b);
+}
+
+
+void show_new_bp(char *name)
+{
+	GtkWidget *cancel;
+	GtkWidget *ok;
+	GtkWidget *label;
+	GtkWidget *bbox;
+	GtkWidget *vbox;
+
+        struct addbp *b = g_new0(struct addbp, 1);
+        
+        b->window = gtk_window_new(GTK_WINDOW_DIALOG);
+        dialogwindows = g_list_prepend(dialogwindows, b->window);
+        cancel = gtk_button_new_with_label("Cancel");
+        ok = gtk_button_new_with_label("OK");
+        bbox = gtk_hbox_new(TRUE, 10);
+        vbox = gtk_vbox_new(FALSE, 5);
+        b->nameentry = gtk_entry_new();
+        b->messentry = gtk_entry_new();
+	
+        /* Put the buttons in the box */
+        gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 10);
+        gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10);
+
+        label = gtk_label_new("Buddy To Pounce:");
+        gtk_widget_show(label);
+        gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
+        gtk_box_pack_start(GTK_BOX(vbox), b->nameentry, FALSE, FALSE, 0);
+
+	b->openwindow = gtk_check_button_new_with_label("Open IM Window on Buddy Logon");
+	gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b->openwindow), FALSE);
+	
+	b->sendim = gtk_check_button_new_with_label("Send IM on Buddy Logon"); 
+	gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b->sendim), TRUE);
+
+	gtk_widget_show(b->openwindow);
+	gtk_widget_show(b->sendim);
+	gtk_box_pack_start(GTK_BOX(vbox), b->openwindow, FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(vbox), b->sendim, FALSE, FALSE, 0);
+
+        label = gtk_label_new("Message to send:");
+        gtk_widget_show(label);
+        gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
+        gtk_box_pack_start(GTK_BOX(vbox), b->messentry, FALSE, FALSE, 0);
+
+
+        /* And the boxes in the box */
+        gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
+
+        /* Handle closes right */
+        gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
+                           GTK_SIGNAL_FUNC(destroy_dialog), b->window);
+        gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
+                           GTK_SIGNAL_FUNC(destroy_dialog), b->window);
+        gtk_signal_connect(GTK_OBJECT(ok), "clicked",
+                           GTK_SIGNAL_FUNC(do_new_bp), b);
+        gtk_signal_connect(GTK_OBJECT(b->messentry), "activate",
+                           GTK_SIGNAL_FUNC(do_new_bp), b);
+
+        
+        /* Finish up */
+        gtk_widget_show(ok);
+        gtk_widget_show(cancel);
+        gtk_widget_show(b->nameentry);
+        gtk_widget_show(b->messentry);
+        gtk_widget_show(bbox);
+        gtk_widget_show(vbox);
+        gtk_window_set_title(GTK_WINDOW(b->window), "Gaim - New Buddy Pounce");
+        if (name != NULL) {
+                gtk_entry_set_text(GTK_ENTRY(b->nameentry), name);
+                gtk_window_set_focus(GTK_WINDOW(b->window), b->messentry);
+        } else
+                gtk_window_set_focus(GTK_WINDOW(b->window), b->nameentry);
+        gtk_container_add(GTK_CONTAINER(b->window), vbox);
+        gtk_container_border_width(GTK_CONTAINER(b->window), 10);
+        gtk_widget_realize(b->window);
+        aol_icon(b->window->window);
+
+	gtk_widget_show(b->window);
+}
+
+
+
+/*------------------------------------------------------------------------*/
+/*  The dialog for SET INFO / SET DIR INFO                                */
+/*------------------------------------------------------------------------*/
+
+void do_save_info(GtkWidget *widget, struct set_info_dlg *b)
+{
+	gchar *junk;
+	char *buf;
+
+	junk = gtk_editable_get_chars(GTK_EDITABLE(b->text), 0, -1);
+
+	g_snprintf(current_user->user_info, sizeof(current_user->user_info), "%s", junk);
+	
+	save_prefs();
+
+        buf = g_malloc(strlen(current_user->user_info) * 2);
+        g_snprintf(buf, strlen(current_user->user_info) * 2, "%s", current_user->user_info);
+        escape_text(buf);
+        serv_set_info(buf);
+        g_free(buf);
+
+	destroy_dialog(NULL, b->window);
+	g_free(b);
+}
+
+void do_set_dir(GtkWidget *widget, struct set_dir_dlg *b)
+{
+        char *first = gtk_entry_get_text(GTK_ENTRY(b->first));
+        int web = GTK_TOGGLE_BUTTON(b->web)->active;
+	char *middle = gtk_entry_get_text(GTK_ENTRY(b->middle));
+	char *last = gtk_entry_get_text(GTK_ENTRY(b->last));
+	char *maiden = gtk_entry_get_text(GTK_ENTRY(b->maiden));
+	char *city = gtk_entry_get_text(GTK_ENTRY(b->city));
+	char *state = gtk_entry_get_text(GTK_ENTRY(b->state));
+	char *country = gtk_entry_get_text(GTK_ENTRY(b->country));
+
+
+        serv_set_dir(first, middle, last, maiden, city, state, country, web);
+
+        destroy_dialog(NULL, b->window);
+	g_free(b);
+}
+
+void show_set_dir()
+{
+	GtkWidget *label;
+	GtkWidget *bot;
+	GtkWidget *top;
+	GtkWidget *table;
+
+	struct set_dir_dlg *b = g_new0(struct set_dir_dlg, 1);
+
+	b->window = gtk_window_new(GTK_WINDOW_DIALOG);
+	dialogwindows = g_list_prepend(dialogwindows, b->window);
+	
+	b->cancel = gtk_button_new_with_label("Cancel");
+	b->save = gtk_button_new_with_label("Save");
+
+	bot = gtk_hbox_new(TRUE, 10);
+	top = gtk_vbox_new(FALSE, 10);
+
+	gtk_widget_show(b->save);
+	gtk_widget_show(b->cancel);
+
+	gtk_box_pack_start(GTK_BOX(bot), b->save, FALSE, FALSE, 5);
+	gtk_box_pack_start(GTK_BOX(bot), b->cancel, FALSE, FALSE, 5);
+
+	gtk_widget_show(bot);
+
+	table = gtk_table_new(10, 2, FALSE);
+	
+	b->first = gtk_entry_new();
+	b->middle = gtk_entry_new();
+	b->last = gtk_entry_new();
+	b->maiden = gtk_entry_new();
+	b->city = gtk_entry_new();
+	b->state = gtk_entry_new();
+	b->country = gtk_entry_new();
+	b->web = gtk_check_button_new_with_label("Allow Web Searches To Find Your Info");
+	
+	label = gtk_label_new("First Name");
+	gtk_widget_show(label);
+	gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1);
+	gtk_table_attach_defaults(GTK_TABLE(table), b->first, 1, 2, 0, 1);
+	
+        label = gtk_label_new("Middle Name");
+        gtk_widget_show(label);
+        gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2);
+        gtk_table_attach_defaults(GTK_TABLE(table), b->middle, 1, 2, 1, 2);  
+
+        label = gtk_label_new("Last Name");
+        gtk_widget_show(label);
+        gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 2, 3);
+        gtk_table_attach_defaults(GTK_TABLE(table), b->last, 1, 2, 2, 3);  
+
+        label = gtk_label_new("Maiden Name");
+        gtk_widget_show(label);
+        gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 3, 4);
+        gtk_table_attach_defaults(GTK_TABLE(table), b->maiden, 1, 2, 3, 4);  
+
+        label = gtk_label_new("City");
+        gtk_widget_show(label);
+        gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 4, 5);
+        gtk_table_attach_defaults(GTK_TABLE(table), b->city, 1, 2, 4, 5);  
+
+	label = gtk_label_new("State");        
+	gtk_widget_show(label);
+        gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 5, 6);
+        gtk_table_attach_defaults(GTK_TABLE(table), b->state, 1, 2, 5, 6);
+
+        label = gtk_label_new("Country");
+        gtk_widget_show(label);
+        gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 6, 7);
+        gtk_table_attach_defaults(GTK_TABLE(table), b->country, 1, 2, 6, 7);
+
+	gtk_table_attach_defaults(GTK_TABLE(table), b->web, 0, 2, 8, 9);
+
+	gtk_widget_show(table);
+	gtk_box_pack_start(GTK_BOX(top), table, FALSE, FALSE, 5);
+	gtk_box_pack_start(GTK_BOX(top), bot, FALSE, FALSE, 5);
+
+        gtk_widget_show(b->first); 
+        gtk_widget_show(b->middle);
+        gtk_widget_show(b->last); 
+        gtk_widget_show(b->maiden);
+        gtk_widget_show(b->city);
+	gtk_widget_show(b->state);
+	gtk_widget_show(b->country);
+	gtk_widget_show(b->web);
+
+	gtk_widget_show(top);
+
+        gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
+                           GTK_SIGNAL_FUNC(destroy_dialog), b->window);
+        gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked",
+                           GTK_SIGNAL_FUNC(destroy_dialog), b->window);
+        gtk_signal_connect(GTK_OBJECT(b->save), "clicked",                                                      GTK_SIGNAL_FUNC(do_set_dir), b);   	
+	
+	gtk_container_add(GTK_CONTAINER(b->window), top);
+	gtk_container_border_width(GTK_CONTAINER(b->window), 10);
+ 	gtk_widget_set_usize(b->window, 530, 280); 
+	gtk_window_set_title(GTK_WINDOW(b->window), "Gaim - Set Dir Info");
+        gtk_window_set_focus(GTK_WINDOW(b->window), b->first);
+        gtk_widget_realize(b->window);
+	aol_icon(b->window->window);
+
+	gtk_widget_show(b->window);	
+}
+
+void show_set_info()
+{
+	GtkWidget *bot;
+	GtkWidget *top;
+
+	struct set_info_dlg *b = g_new0(struct set_info_dlg, 1);
+
+	b->window = gtk_window_new(GTK_WINDOW_DIALOG);
+	dialogwindows = g_list_prepend(dialogwindows, b->window);
+
+	b->cancel = gtk_button_new_with_label("Cancel");
+	b->save = gtk_button_new_with_label("Save");
+
+	bot = gtk_hbox_new(TRUE, 10);
+	top = gtk_vbox_new(FALSE, 10);
+
+	gtk_widget_show(b->save);
+	gtk_widget_show(b->cancel);
+
+	gtk_box_pack_start(GTK_BOX(bot), b->save, FALSE, FALSE, 10);
+	gtk_box_pack_start(GTK_BOX(bot), b->cancel, FALSE, FALSE, 10);
+
+
+	gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
+			   GTK_SIGNAL_FUNC(destroy_dialog), b->window);
+	gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked",
+			   GTK_SIGNAL_FUNC(destroy_dialog), b->window);
+	gtk_signal_connect(GTK_OBJECT(b->save), "clicked",
+			   GTK_SIGNAL_FUNC(do_save_info), b);
+
+	gtk_widget_show(bot);
+
+
+	b->text = gtk_text_new(NULL, NULL);
+	gtk_text_set_word_wrap(GTK_TEXT(b->text), TRUE);
+	gtk_text_set_editable(GTK_TEXT(b->text), TRUE);
+	gtk_widget_set_usize(b->text, 350, 100);
+	gtk_text_insert(GTK_TEXT(b->text), NULL, NULL, NULL, current_user->user_info, -1);
+
+	gtk_widget_show(b->text);
+
+	gtk_box_pack_start(GTK_BOX(top), b->text, TRUE, TRUE, 10);
+	gtk_widget_show(top);
+
+	gtk_box_pack_start(GTK_BOX(top), bot, FALSE, FALSE, 10);
+	gtk_container_add(GTK_CONTAINER(b->window), top);
+        gtk_container_border_width(GTK_CONTAINER(b->window), 10);
+        gtk_widget_realize(b->window);
+	aol_icon(b->window->window);
+
+	gtk_window_set_title(GTK_WINDOW(b->window), "Gaim - Set User Info");
+	gtk_widget_show(b->window);
+
+}
+
+/*------------------------------------------------------------------------*/
+/*  The dialog for registration information                               */
+/*------------------------------------------------------------------------*/
+
+void do_register_dialog(GtkWidget *widget, struct registerdlg *b)
+{
+	char *email = gtk_entry_get_text(GTK_ENTRY(b->email));
+	char *name = gtk_entry_get_text(GTK_ENTRY(b->name));
+	int uname = GTK_TOGGLE_BUTTON(b->uname)->active;
+	int sname = GTK_TOGGLE_BUTTON(b->sname)->active;
+	char *country = gtk_entry_get_text(GTK_ENTRY(b->country));
+
+	general_options |= OPT_GEN_REGISTERED;
+	save_prefs();
+	
+	destroy_dialog(NULL, b->window);
+
+	g_free(b);
+
+        g_sendemail(name, email, uname, sname, country);
+}
+
+void set_reg_flag(GtkWidget *widget, struct registerdlg *b)
+{
+	general_options |= OPT_GEN_REGISTERED;
+	save_prefs();
+	destroy_dialog(NULL, b->window);
+	g_free(b);
+}
+ 
+void show_register_dialog()
+{
+	GtkWidget *ok;
+	GtkWidget *cancel;
+	GtkWidget *label;
+	GtkWidget *table;
+	GtkWidget *vbox;
+	GtkWidget *bbox;
+
+	struct registerdlg *b = g_new0(struct registerdlg, 1);
+	b->window = gtk_window_new(GTK_WINDOW_DIALOG);
+	dialogwindows = g_list_prepend(dialogwindows, b->window);
+
+	cancel = gtk_button_new_with_label("Cancel");
+	ok = gtk_button_new_with_label("Send");
+
+	bbox = gtk_hbox_new(TRUE, 10);
+	table = gtk_table_new(6, 2, TRUE);
+	vbox = gtk_vbox_new(FALSE, 5);
+
+	b->name = gtk_entry_new();
+	b->email = gtk_entry_new();
+	b->uname = gtk_check_button_new_with_label("Send the output of uname -a with registration");
+	gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b->uname), TRUE);
+	b->sname = gtk_check_button_new_with_label("Send my screenname with registration");
+	gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b->sname), TRUE);
+	gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 10);
+	gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10);
+
+	label = gtk_label_new("This list will not, in any way, be distributed and\nwill be used for internal census purposes only.\nAll fields are completely optional.");
+	gtk_widget_show(label);
+	gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 2, 0, 1);
+
+	label = gtk_label_new("Name");
+	gtk_widget_show(label);
+	gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2);
+	gtk_table_attach_defaults(GTK_TABLE(table), b->name, 1, 2, 1, 2);
+
+	label = gtk_label_new("Email");
+	gtk_widget_show(label);
+	gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 2, 3);
+	gtk_table_attach_defaults(GTK_TABLE(table), b->email, 1, 2, 2, 3);
+	
+	label = gtk_label_new("Country");
+	b->country = gtk_entry_new();
+	gtk_widget_show(label);
+	gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 3, 4);
+	gtk_table_attach_defaults(GTK_TABLE(table), b->country, 1, 2, 3, 4);
+
+	gtk_table_attach_defaults(GTK_TABLE(table), b->sname, 0, 2, 4, 5);
+	gtk_table_attach_defaults(GTK_TABLE(table), b->uname, 0, 2, 5, 6);
+
+	gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 5);
+	gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
+
+	gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
+			   GTK_SIGNAL_FUNC(destroy_dialog), b->window);
+	gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
+			   GTK_SIGNAL_FUNC(set_reg_flag), b);
+	gtk_signal_connect(GTK_OBJECT(ok), "clicked",
+			   GTK_SIGNAL_FUNC(do_register_dialog), b);
+
+	gtk_widget_show(ok);
+	gtk_widget_show(cancel);
+	gtk_widget_show(b->name);
+	gtk_widget_show(b->email);
+	gtk_widget_show(b->uname);
+	gtk_widget_show(b->sname);
+	gtk_widget_show(b->country);
+	gtk_widget_show(table);
+	gtk_widget_show(bbox);
+	gtk_widget_show(vbox);
+	gtk_window_set_title(GTK_WINDOW(b->window), "Gaim - Registration");
+	gtk_window_set_focus(GTK_WINDOW(b->window), b->name);
+	gtk_container_add(GTK_CONTAINER(b->window), vbox);
+        gtk_container_border_width(GTK_CONTAINER(b->window), 10);
+        gtk_widget_realize(b->window);
+	aol_icon(b->window->window);
+
+	gtk_widget_show(b->window);
+}
+
+
+/*------------------------------------------------------------------------*/
+/*  The dialog for the info requests                                      */
+/*------------------------------------------------------------------------*/
+
+void g_show_info(char *url)
+{
+        GtkWidget *ok;
+        GtkWidget *label;
+	GtkWidget *text;
+        GtkWidget *bbox;
+        GtkWidget *sw;
+        char *url_text;
+
+        struct info_dlg *b = g_new0(struct info_dlg, 1);
+
+        b->window = gtk_window_new(GTK_WINDOW_DIALOG);
+        dialogwindows = g_list_prepend(dialogwindows, b->window);
+        gtk_container_border_width(GTK_CONTAINER(b->window), 5);
+        bbox = gtk_vbox_new(FALSE, 5);
+	gtk_container_add(GTK_CONTAINER(b->window), bbox);
+
+        ok = gtk_button_new_with_label("OK");
+	gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
+			   GTK_SIGNAL_FUNC(destroy_dialog), b->window);
+        gtk_signal_connect(GTK_OBJECT(ok), "clicked",
+			   GTK_SIGNAL_FUNC(destroy_dialog), b->window);
+
+        label = gtk_label_new("Below are the results of your search: ");
+
+	sw = gtk_scrolled_window_new (NULL, NULL);
+	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
+					GTK_POLICY_NEVER,
+					GTK_POLICY_ALWAYS);
+	text = gtk_html_new(NULL, NULL);
+	b->text = text;
+	gtk_container_add(GTK_CONTAINER(sw), text);
+
+	GTK_HTML (text)->hadj->step_increment = 10.0;
+	GTK_HTML (text)->vadj->step_increment = 10.0;
+	gtk_widget_set_usize(sw, 300, 250);
+
+	gtk_box_pack_start(GTK_BOX(bbox), label, FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(bbox), sw, TRUE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX(bbox), ok, FALSE, FALSE, 0);
+
+	gtk_widget_realize(b->window);
+	aol_icon(b->window->window);
+	gtk_widget_show_all(b->window);
+
+	url_text = grab_url(url);
+	gtk_html_append_text(GTK_HTML(b->text), url_text, 0);
+	g_free(url_text);
+}
+
+/*------------------------------------------------------------------------*/
+/*  The dialog for adding to permit/deny                                  */
+/*------------------------------------------------------------------------*/
+
+
+static void do_add_perm(GtkWidget *w, struct addperm *p)
+{
+
+        char *who;
+        char *name;
+        int d = 0;
+        GSList *buttons = p->buttons;
+
+
+        who = gtk_entry_get_text(GTK_ENTRY(p->entry));
+
+        name = g_malloc(strlen(who) + 2);
+        g_snprintf(name, strlen(who) + 2, "%s", who);
+        
+        while(buttons) {
+                if((int)gtk_object_get_user_data(GTK_OBJECT(buttons->data)) == 1) {
+                        if (GTK_TOGGLE_BUTTON(buttons->data)->active)
+                                d = 1;
+                }
+                buttons = buttons->next;
+        }
+
+        if (d) {
+                deny = g_list_append(deny, name);
+                serv_add_deny(name);
+        } else {
+                permit = g_list_append(permit, name);
+                serv_add_permit(name);
+        }
+
+
+
+        build_permit_tree();
+
+        serv_save_config();
+
+        destroy_dialog(NULL, p->window);
+}
+
+
+
+void show_add_perm(char *who)
+{
+	GtkWidget *cancel;
+	GtkWidget *add;
+	GtkWidget *label;
+        GtkWidget *bbox;
+        GtkWidget *vbox;
+        GtkWidget *rbox;
+        GtkWidget *topbox;
+        GtkWidget *which;
+        struct addperm *p = g_new0(struct addperm, 1);
+
+        p->window = gtk_window_new(GTK_WINDOW_DIALOG);
+        dialogwindows = g_list_prepend(dialogwindows, p->window);
+        cancel = gtk_button_new_with_label("Cancel");
+        add = gtk_button_new_with_label("Add");
+        bbox = gtk_hbox_new(TRUE, 10);
+        topbox = gtk_hbox_new(FALSE, 5);
+        vbox = gtk_vbox_new(FALSE, 5);
+        rbox = gtk_vbox_new(FALSE, 5);
+        p->entry = gtk_entry_new();
+
+        if (who != NULL)
+                gtk_entry_set_text(GTK_ENTRY(p->entry), who);
+
+        which = gtk_radio_button_new_with_label(NULL, "Deny");
+        gtk_box_pack_start(GTK_BOX(rbox), which, FALSE, FALSE, 0);
+        gtk_object_set_user_data(GTK_OBJECT(which), (int *)1);
+        gtk_widget_show(which);
+
+        which = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(which)), "Permit");
+        gtk_box_pack_start(GTK_BOX(rbox), which, FALSE, FALSE, 0);
+        gtk_object_set_user_data(GTK_OBJECT(which), (int *)2);
+        gtk_widget_show(which);
+                
+        /* Put the buttons in the box */
+        gtk_box_pack_start(GTK_BOX(bbox), add, TRUE, TRUE, 10);
+        gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10);
+		
+        label = gtk_label_new("Add");
+        gtk_widget_show(label);
+        gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
+        gtk_box_pack_start(GTK_BOX(topbox), p->entry, FALSE, FALSE, 5);
+        gtk_box_pack_start(GTK_BOX(topbox), rbox, FALSE, FALSE, 5);
+        /* And the boxes in the box */
+        gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5);
+        gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
+
+
+        p->buttons = gtk_radio_button_group(GTK_RADIO_BUTTON(which));
+        /* Handle closes right */
+        gtk_signal_connect(GTK_OBJECT(p->window), "destroy",
+                           GTK_SIGNAL_FUNC(destroy_dialog), p->window);
+        gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
+                           GTK_SIGNAL_FUNC(destroy_dialog), p->window);
+        gtk_signal_connect(GTK_OBJECT(add), "clicked",
+                           GTK_SIGNAL_FUNC(do_add_perm), p);
+        gtk_signal_connect(GTK_OBJECT(p->entry), "activate",
+                           GTK_SIGNAL_FUNC(do_add_perm), p);
+
+        /* Finish up */
+        gtk_widget_show(add);
+        gtk_widget_show(cancel);
+        gtk_widget_show(p->entry);
+        gtk_widget_show(topbox);
+        gtk_widget_show(bbox);
+        gtk_widget_show(vbox);
+        gtk_widget_show(rbox);
+        gtk_window_set_title(GTK_WINDOW(p->window), "Gaim - Add Permit/Deny");
+        gtk_window_set_focus(GTK_WINDOW(p->window), p->entry);
+        gtk_container_add(GTK_CONTAINER(p->window), vbox);
+        gtk_widget_realize(p->window);
+        aol_icon(p->window->window);
+
+        gtk_widget_show(p->window);
+}
+
+
+/*------------------------------------------------------------------------*/
+/*  Function Called To Add A Log                                          */
+/*------------------------------------------------------------------------*/
+
+void do_log(GtkWidget *w, char *name)
+{
+        struct log_conversation *l;
+	struct conversation *c;
+        char buf[128];
+
+	c = find_conversation(name);
+        if (!find_log_info(name)) {
+                l = (struct log_conversation *)g_new0(struct log_conversation, 1);
+                strcpy(l->name, name);
+                strcpy(l->filename, gtk_file_selection_get_filename(GTK_FILE_SELECTION(logdialog)));
+                log_conversations = g_list_append(log_conversations, l);
+
+                if (c != NULL)
+                {
+                        g_snprintf(buf, sizeof(buf), LOG_CONVERSATION_TITLE, c->name);
+                        gtk_window_set_title(GTK_WINDOW(c->window), buf);
+                }
+        }
+
+        save_prefs();
+
+        destroy_dialog(NULL, logdialog);
+        logdialog = NULL;
+} 
+
+static void cancel_log(GtkWidget *w, char *name)
+{
+	
+	struct conversation *c = gtk_object_get_user_data(GTK_OBJECT(logdialog));
+
+	if (c != NULL)
+        {
+        set_state_lock(1);
+	gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(c->log_button), FALSE);
+        set_state_lock(0);
+        }
+	destroy_dialog(NULL, logdialog);
+}
+
+void show_log_dialog(char *bname)
+{
+	char *buf = g_malloc(BUF_LEN);
+        struct conversation *c = find_conversation(bname);
+
+	
+	if (!logdialog) {
+		logdialog = gtk_file_selection_new("Gaim - Log Conversation");
+		
+		gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(logdialog));	
+
+                gtk_object_set_user_data(GTK_OBJECT(logdialog), c);
+		
+		g_snprintf(buf, BUF_LEN - 1, "%s/%s.log", getenv("HOME"), bname);
+		
+		gtk_file_selection_set_filename(GTK_FILE_SELECTION(logdialog), buf);
+		gtk_signal_connect(GTK_OBJECT(logdialog), "delete_event", GTK_SIGNAL_FUNC(cancel_log), c);
+		gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(logdialog)->ok_button), "clicked", GTK_SIGNAL_FUNC(do_log), bname);
+		gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(logdialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(cancel_log), bname);
+	}
+
+	gtk_widget_show(logdialog);
+	gdk_window_raise(logdialog->window);
+}
+
+/*------------------------------------------------------*/
+/* Find Buddy By Email                                  */
+/*------------------------------------------------------*/
+
+void do_find_info(GtkWidget *w, struct findbyinfo *b)
+{
+        char *first;
+	char *middle;
+	char *last;
+	char *maiden;
+	char *city;
+	char *state;
+	char *country;
+
+        first = gtk_entry_get_text(GTK_ENTRY(b->firstentry));
+	middle = gtk_entry_get_text(GTK_ENTRY(b->middleentry));
+	last = gtk_entry_get_text(GTK_ENTRY(b->lastentry));
+	maiden = gtk_entry_get_text(GTK_ENTRY(b->maidenentry));
+	city = gtk_entry_get_text(GTK_ENTRY(b->cityentry)); 
+	state = gtk_entry_get_text(GTK_ENTRY(b->stateentry)); 
+	country = gtk_entry_get_text(GTK_ENTRY(b->countryentry)); 
+
+        serv_dir_search(first, middle, last, maiden, city, state, country, "");
+        destroy_dialog(NULL, b->window);
+} 
+
+void do_find_email(GtkWidget *w, struct findbyemail *b)
+{
+	char *email;
+
+	email = gtk_entry_get_text(GTK_ENTRY(b->emailentry));
+	
+        serv_dir_search("","","","","","","", email);
+ 
+	destroy_dialog(NULL, b->window);
+}
+
+void show_find_info()
+{
+        GtkWidget *cancel;
+        GtkWidget *ok;
+        GtkWidget *label;
+        GtkWidget *bbox;
+        GtkWidget *vbox;
+        GtkWidget *topbox;
+
+	struct findbyinfo *b = g_new0(struct findbyinfo, 1);
+        b->window = gtk_window_new(GTK_WINDOW_DIALOG);
+        dialogwindows = g_list_prepend(dialogwindows, b->window);
+
+        cancel = gtk_button_new_with_label("Cancel");
+        ok = gtk_button_new_with_label("OK");
+
+        bbox = gtk_hbox_new(TRUE, 10);
+        topbox = gtk_table_new(7, 2, TRUE);
+        vbox = gtk_vbox_new(FALSE, 5);
+
+        b->firstentry = gtk_entry_new();
+	b->middleentry = gtk_entry_new();
+	b->lastentry = gtk_entry_new();
+	b->maidenentry = gtk_entry_new();
+	b->cityentry = gtk_entry_new();
+	b->stateentry = gtk_entry_new();
+	b->countryentry = gtk_entry_new();
+
+        gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 10);
+        gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10);
+
+        label = gtk_label_new("First Name");
+	gtk_widget_show(label);
+	gtk_table_attach_defaults(GTK_TABLE(topbox), label, 0, 1, 0, 1);
+	gtk_table_attach_defaults(GTK_TABLE(topbox), b->firstentry, 1, 2, 0, 1);
+
+        label = gtk_label_new("Middle Name");
+        gtk_widget_show(label);
+        gtk_table_attach_defaults(GTK_TABLE(topbox), label, 0, 1, 1, 2);
+        gtk_table_attach_defaults(GTK_TABLE(topbox), b->middleentry, 1, 2, 1, 2);
+
+        label = gtk_label_new("Last Name");
+        gtk_widget_show(label);
+        gtk_table_attach_defaults(GTK_TABLE(topbox), label, 0, 1, 2, 3);
+        gtk_table_attach_defaults(GTK_TABLE(topbox), b->lastentry, 1, 2, 2, 3);
+
+        label = gtk_label_new("Maiden Name");
+        gtk_widget_show(label);
+        gtk_table_attach_defaults(GTK_TABLE(topbox), label, 0, 1, 3, 4);
+        gtk_table_attach_defaults(GTK_TABLE(topbox), b->maidenentry, 1, 2, 3, 4);
+
+        label = gtk_label_new("City");
+        gtk_widget_show(label);
+        gtk_table_attach_defaults(GTK_TABLE(topbox), label, 0, 1, 4, 5);
+        gtk_table_attach_defaults(GTK_TABLE(topbox), b->cityentry, 1, 2, 4, 5);
+
+        label = gtk_label_new("State");
+        gtk_widget_show(label);
+        gtk_table_attach_defaults(GTK_TABLE(topbox), label, 0, 1, 5, 6);
+        gtk_table_attach_defaults(GTK_TABLE(topbox), b->stateentry, 1, 2, 5, 6);
+
+        label = gtk_label_new("Country");
+        gtk_widget_show(label);
+        gtk_table_attach_defaults(GTK_TABLE(topbox), label, 0, 1, 6, 7);
+        gtk_table_attach_defaults(GTK_TABLE(topbox), b->countryentry, 1, 2, 6, 7);
+
+	gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5);
+        gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
+
+        gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
+                           GTK_SIGNAL_FUNC(destroy_dialog), b->window);
+        gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
+                         GTK_SIGNAL_FUNC(destroy_dialog), b->window);
+        gtk_signal_connect(GTK_OBJECT(ok), "clicked",
+                           GTK_SIGNAL_FUNC(do_find_info), b);
+
+        gtk_widget_show(ok);
+        gtk_widget_show(cancel);
+        gtk_widget_show(b->firstentry);
+	gtk_widget_show(b->middleentry);
+	gtk_widget_show(b->lastentry);
+	gtk_widget_show(b->maidenentry);
+	gtk_widget_show(b->cityentry);
+	gtk_widget_show(b->stateentry);
+	gtk_widget_show(b->countryentry);
+        gtk_widget_show(topbox);
+        gtk_widget_show(bbox);                      
+        gtk_widget_show(vbox);
+        gtk_window_set_title(GTK_WINDOW(b->window), "Gaim - Find Buddy By Info");
+        gtk_window_set_focus(GTK_WINDOW(b->window), b->firstentry);
+        gtk_container_add(GTK_CONTAINER(b->window), vbox);
+        gtk_container_border_width(GTK_CONTAINER(b->window), 10);
+        gtk_widget_realize(b->window);
+        aol_icon(b->window->window);
+
+        gtk_widget_show(b->window);
+}        
+
+void show_find_email()
+{
+        GtkWidget *cancel;
+        GtkWidget *ok;
+        GtkWidget *label;
+        GtkWidget *bbox;
+        GtkWidget *vbox;
+        GtkWidget *topbox;
+
+        struct findbyemail *b = g_new0(struct findbyemail, 1);
+        b->window = gtk_window_new(GTK_WINDOW_DIALOG);
+        dialogwindows = g_list_prepend(dialogwindows, b->window); 
+
+        cancel = gtk_button_new_with_label("Cancel");
+        ok = gtk_button_new_with_label("OK");
+
+        bbox = gtk_hbox_new(TRUE, 10);
+        topbox = gtk_hbox_new(FALSE, 5);
+        vbox = gtk_vbox_new(FALSE, 5);
+
+        b->emailentry = gtk_entry_new();
+
+        gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 10);
+        gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10);
+
+        label = gtk_label_new("Email");
+        gtk_widget_show(label);
+        gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
+        gtk_box_pack_start(GTK_BOX(topbox), b->emailentry, FALSE, FALSE, 5);
+
+        gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5);
+        gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
+
+        gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
+                           GTK_SIGNAL_FUNC(destroy_dialog), b->window);
+        gtk_signal_connect(GTK_OBJECT(cancel), "clicked", 
+                         GTK_SIGNAL_FUNC(destroy_dialog), b->window);
+        gtk_signal_connect(GTK_OBJECT(ok), "clicked",
+                           GTK_SIGNAL_FUNC(do_find_email), b);
+        gtk_signal_connect(GTK_OBJECT(b->emailentry), "activate",
+                           GTK_SIGNAL_FUNC(do_find_email), b);
+
+        gtk_widget_show(ok);
+        gtk_widget_show(cancel);
+        gtk_widget_show(b->emailentry);
+        gtk_widget_show(topbox);
+        gtk_widget_show(bbox);
+        gtk_widget_show(vbox);
+        gtk_window_set_title(GTK_WINDOW(b->window), "Gaim - Find Buddy By Email");
+        gtk_window_set_focus(GTK_WINDOW(b->window), b->emailentry);
+        gtk_container_add(GTK_CONTAINER(b->window), vbox);
+        gtk_container_border_width(GTK_CONTAINER(b->window), 10);
+        gtk_widget_realize(b->window);
+        aol_icon(b->window->window);
+
+        gtk_widget_show(b->window);
+}
+
+/*------------------------------------------------------*/
+/* Link Dialog                                          */
+/*------------------------------------------------------*/
+
+void cancel_link(GtkWidget *widget, struct linkdlg *b)
+{
+	if (b->toggle)
+		gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b->toggle), FALSE);
+	
+	destroy_dialog(NULL, b->window);
+}
+
+void do_add_link(GtkWidget *widget, struct linkdlg *b)
+{
+	char *open_tag;
+        char *urltext, *showtext;
+	open_tag = g_malloc(2048);
+
+
+	urltext = gtk_entry_get_text(GTK_ENTRY(b->url));
+        showtext = gtk_entry_get_text(GTK_ENTRY(b->text));
+	
+	g_snprintf(open_tag, 2048, "<A HREF=\"%s\">%s", urltext, showtext);
+	surround(b->entry, open_tag, "</A>");
+
+	g_free(open_tag);
+
+	destroy_dialog(NULL, b->window);
+}
+
+
+void show_add_link(GtkWidget *entry, GtkWidget *link)
+{
+	GtkWidget *vbox;
+	GtkWidget *bbox;
+	GtkWidget *table;
+	GtkWidget *label;
+
+	if (!linkdialog) {
+		struct linkdlg *b = g_new0(struct linkdlg, 1);
+		linkdialog = gtk_window_new(GTK_WINDOW_DIALOG);
+		dialogwindows = g_list_prepend(dialogwindows, linkdialog);
+
+		b->cancel = gtk_button_new_with_label("Cancel");
+		b->ok = gtk_button_new_with_label("Ok");
+	
+		vbox = gtk_vbox_new(FALSE, 10);
+		bbox = gtk_hbox_new(TRUE, 10);
+
+		gtk_widget_show(b->ok);
+		gtk_widget_show(b->cancel);
+
+		gtk_box_pack_start(GTK_BOX(bbox), b->ok, FALSE, FALSE, 10);
+		gtk_box_pack_start(GTK_BOX(bbox), b->cancel, FALSE, FALSE, 10);
+		gtk_widget_show(bbox);
+
+		table = gtk_table_new(2, 2, FALSE);
+		b->url = gtk_entry_new();
+		b->text = gtk_entry_new();
+
+		label = gtk_label_new("URL");
+		gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1);
+		gtk_table_attach_defaults(GTK_TABLE(table), b->url, 1, 2, 0, 1);
+		gtk_widget_show(label);
+	
+		label = gtk_label_new("Description");
+		gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2);
+		gtk_table_attach_defaults(GTK_TABLE(table), b->text, 1, 2, 1, 2);
+		gtk_widget_show(label);
+
+		gtk_widget_show(b->url);
+		gtk_widget_show(b->text);
+		gtk_widget_show(table);
+
+		gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 10);
+		gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 10);
+		gtk_widget_show(vbox);
+
+		gtk_signal_connect(GTK_OBJECT(linkdialog), "destroy",
+				   GTK_SIGNAL_FUNC(cancel_link), b);
+		gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked",
+				   GTK_SIGNAL_FUNC(cancel_link), b);
+		gtk_signal_connect(GTK_OBJECT(b->ok), "clicked",
+				   GTK_SIGNAL_FUNC(do_add_link), b);
+
+		gtk_container_add(GTK_CONTAINER(linkdialog  ), vbox);
+		gtk_container_border_width(GTK_CONTAINER(linkdialog  ), 10);
+		gtk_window_set_title(GTK_WINDOW(linkdialog  ), "GAIM - Add URL");
+		gtk_window_set_focus(GTK_WINDOW(linkdialog  ), b->url);
+		b->window = linkdialog;
+		b->toggle = link;
+                b->entry = entry;
+                gtk_widget_realize(linkdialog);
+		aol_icon(linkdialog->window);
+
+	}
+
+	gtk_widget_show(linkdialog);
+	gdk_window_raise(linkdialog->window);
+}
+
+
+/*------------------------------------------------------*/
+/* Color Selection Dialog                               */
+/*------------------------------------------------------*/
+
+void cancel_color(GtkWidget *widget, GtkWidget *color)
+{
+	if (color)
+		gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(color), FALSE);		
+	destroy_dialog(NULL, colordialog);
+}
+
+
+
+void do_color(GtkWidget *widget, GtkColorSelection *colorsel)
+{
+        gdouble color[3];
+	GdkColor text_color;
+	GtkWidget *entry;
+	char *open_tag;
+
+	open_tag = g_malloc(30);
+
+        gtk_color_selection_get_color (colorsel, color);
+
+        entry = gtk_object_get_user_data(GTK_OBJECT(colorsel));
+	
+        text_color.red = ((guint16)(color[0]*65535))>>8;
+        text_color.green = ((guint16)(color[1]*65535))>>8;
+		text_color.blue = ((guint16)(color[2]*65535))>>8;
+	
+	g_snprintf(open_tag, 23, "<FONT COLOR=\"#%02X%02X%02X\">", text_color.red, text_color.green, text_color.blue);
+
+	surround(entry, open_tag, "</FONT>");
+	sprintf(debug_buff,"#%02X%02X%02X\n", text_color.red, text_color.green, text_color.blue);
+	debug_print(debug_buff);
+        g_free(open_tag);
+	cancel_color(NULL, NULL);
+}
+
+
+void show_color_dialog(GtkWidget *entry, GtkWidget *color)
+{
+        GtkWidget *colorsel;
+
+        if (!colordialog) {
+     
+
+		colordialog = gtk_color_selection_dialog_new("Select Text Color");
+                colorsel = GTK_COLOR_SELECTION_DIALOG(colordialog)->colorsel;
+
+                gtk_object_set_user_data(GTK_OBJECT(colorsel), entry);
+		
+                gtk_signal_connect(GTK_OBJECT(colordialog), "delete_event", GTK_SIGNAL_FUNC(cancel_color), color);
+
+                gtk_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(colordialog)->ok_button), "clicked", GTK_SIGNAL_FUNC(do_color), colorsel);
+
+                gtk_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(colordialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(cancel_color), color);
+                gtk_widget_realize(colordialog);
+		aol_icon(colordialog->window);
+
+        }
+
+        gtk_widget_show(colordialog);
+        gdk_window_raise(colordialog->window);
+}
+
+/*------------------------------------------------------------------------*/
+/*  The dialog for import/export                                          */
+/*------------------------------------------------------------------------*/
+
+void do_export(GtkWidget *w, void *dummy)
+{
+        FILE *f;
+        char *buf = g_malloc(BUF_LONG);
+        char *file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(exportdialog));
+
+        if ((f = fopen(file,"w"))) {
+                toc_build_config(buf, BUF_LONG - 1);
+                fprintf(f, "%s\n", buf);
+                fclose(f);
+                chmod(buf, S_IRUSR | S_IWUSR);
+        } else {
+                g_snprintf(buf, BUF_LONG / 2, "Error writing file %s", file);
+                do_error_dialog(buf, "Error");
+        }
+        destroy_dialog(NULL, exportdialog);
+        exportdialog = NULL;
+        
+        g_free(buf);
+        
+        
+}
+
+	
+void show_export_dialog()
+{
+        char *buf = g_malloc(BUF_LEN);
+        if (!exportdialog) {
+                exportdialog = gtk_file_selection_new("Gaim - Export Buddy List");
+
+                gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(exportdialog));
+
+                g_snprintf(buf, BUF_LEN - 1, "%s/gaim.buddy", getenv("HOME"));
+                
+                gtk_file_selection_set_filename(GTK_FILE_SELECTION(exportdialog), buf);
+                gtk_signal_connect(GTK_OBJECT(exportdialog), "destroy",
+                                   GTK_SIGNAL_FUNC(destroy_dialog), exportdialog);
+                
+                gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(exportdialog)->ok_button),
+                                   "clicked", GTK_SIGNAL_FUNC(do_export), NULL);
+                gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(exportdialog)->cancel_button),
+                                   "clicked", GTK_SIGNAL_FUNC(destroy_dialog), exportdialog);
+                
+
+	}
+
+	g_free(buf);
+
+        gtk_widget_show(exportdialog);
+        gdk_window_raise(exportdialog->window);
+
+}
+
+void do_import(GtkWidget *w, void *dummy)
+{
+        GList *grp, *grp2;
+        char *buf = g_malloc(BUF_LONG);
+        char *buf2;
+        char *first = g_malloc(64);
+        char *file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(importdialog));
+        FILE *f;
+        
+        if (!(f = fopen(file,"r"))) {
+                g_snprintf(buf, BUF_LONG / 2, "Error reading file %s", file);
+                do_error_dialog(buf, "Error");
+                destroy_dialog(NULL, importdialog);
+                importdialog = NULL;
+                g_free(buf);
+                return;
+        }
+                
+        fgets(first, 64, f);
+
+        if (!strcasecmp(first, "Config {\n")) {
+                destroy_dialog(NULL, importdialog);
+                importdialog = NULL;
+                return;
+        } else if (buf[0] == 'm') {
+                buf2 = buf;
+                buf = g_malloc(1025);
+                g_snprintf(buf, 1024, "toc_set_config {%s}\n", buf2);
+                g_free(buf2);
+        }
+
+                
+        fseek(f, 0, SEEK_SET);
+
+        fread(buf, BUF_LONG, 1, f);
+
+        grp = groups;
+	
+        while(grp) {
+                grp2 = grp->next;
+		remove_group((struct group *)grp->data);
+		grp = grp2;
+        }
+        
+        parse_toc_buddy_list(buf);
+
+        serv_save_config();
+        
+        build_edit_tree();
+        build_permit_tree();
+        
+        destroy_dialog(NULL, importdialog);
+        importdialog = NULL;
+        
+        g_free(buf);
+        
+}
+
+void show_import_dialog()
+{
+        char *buf = g_malloc(BUF_LEN);
+        if (!importdialog) {
+                importdialog = gtk_file_selection_new("Gaim - Import Buddy List");
+
+                gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(importdialog));
+
+                g_snprintf(buf, BUF_LEN - 1, "%s/", getenv("HOME"));
+                
+                gtk_file_selection_set_filename(GTK_FILE_SELECTION(importdialog), buf);
+                gtk_signal_connect(GTK_OBJECT(importdialog), "destroy",
+                                   GTK_SIGNAL_FUNC(destroy_dialog), importdialog);
+                
+                gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(importdialog)->ok_button),
+                                   "clicked", GTK_SIGNAL_FUNC(do_import), NULL);
+                gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(importdialog)->cancel_button),
+                                   "clicked", GTK_SIGNAL_FUNC(destroy_dialog), importdialog);
+                
+
+        }
+
+        gtk_widget_show(importdialog);
+        gdk_window_raise(importdialog->window);
+}
+
+
+/*------------------------------------------------------------------------*/
+/*  The dialog for new away messages                                      */
+/*------------------------------------------------------------------------*/
+
+void create_mess(GtkWidget *widget, struct create_away *ca)
+{
+        struct away_message *b;
+	gchar  *away_message;
+	guint  text_len;
+	int    is_checked;
+
+	/* Grab the appropriate data */       
+	b = g_new0(struct away_message, 1);
+	g_snprintf(b->name, sizeof(b->name), "%s", gtk_entry_get_text(GTK_ENTRY(ca->entry)));
+
+	/* Get proper Length */
+	text_len = gtk_text_get_length(GTK_TEXT(ca->text));
+	away_message = gtk_editable_get_chars(GTK_EDITABLE(ca->text), 0, text_len);
+
+	g_snprintf(b->message, sizeof(b->message), "%s", away_message);
+
+	is_checked = GTK_TOGGLE_BUTTON(ca->checkbx)->active;
+	
+	if (is_checked) do_away_message(NULL, b);
+
+	/* stick it on the away list */
+	if (strlen(b->name)) {
+                away_messages = g_list_append(away_messages, b);
+                save_prefs();
+                do_away_menu();
+                if (pd != NULL)
+                        gtk_list_select_item(GTK_LIST(pd->away_list), g_list_index(away_messages, b));
+        }
+        
+        destroy_dialog(NULL, ca->window);
+}
+
+void create_away_mess(GtkWidget *widget, void *dummy)
+{
+	GtkWidget *bbox;
+	GtkWidget *titlebox;
+	GtkWidget *tbox;
+	GtkWidget *create;
+	GtkWidget *sw;
+	GtkWidget *label;
+
+        struct create_away *ca = g_new0(struct create_away, 1);
+        
+	/* Set up window */
+	ca->window = gtk_window_new(GTK_WINDOW_DIALOG);
+	gtk_container_border_width(GTK_CONTAINER(ca->window), 10);
+	gtk_window_set_title(GTK_WINDOW(ca->window), "Gaim - New away message");
+	gtk_signal_connect(GTK_OBJECT(ca->window),"delete_event",
+		           GTK_SIGNAL_FUNC(destroy_dialog), ca->window);
+
+	/* set up container boxes */
+	bbox = gtk_vbox_new(FALSE, 0);
+	titlebox = gtk_hbox_new(FALSE, 0);
+	tbox = gtk_vbox_new(FALSE, 0);
+
+	/* Make a label for away entry */
+	label = gtk_label_new("Away title: ");
+	gtk_box_pack_start(GTK_BOX(titlebox), label, TRUE, TRUE, 0);
+
+	/* make away title entry */
+	ca->entry = gtk_entry_new();
+	gtk_box_pack_start(GTK_BOX(titlebox), ca->entry, TRUE, TRUE, 0);
+
+	sw = gtk_scrolled_window_new(NULL, NULL);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
+				       GTK_POLICY_AUTOMATIC,
+				       GTK_POLICY_AUTOMATIC);
+	gtk_widget_show(sw);
+
+	/* create and format text box */
+	ca->text = gtk_text_new(NULL, NULL);
+	gtk_text_set_word_wrap(GTK_TEXT(ca->text), TRUE);
+	gtk_text_set_editable(GTK_TEXT(ca->text), TRUE );
+	gtk_container_add(GTK_CONTAINER(sw), ca->text);
+	gtk_widget_show(ca->text);
+	gtk_box_pack_start(GTK_BOX(bbox), sw, TRUE, TRUE, 10);   
+
+	/* make create button */
+	create = gtk_button_new_with_label ("Create new message");
+	gtk_box_pack_start(GTK_BOX(bbox), create, TRUE, TRUE, 0);
+	gtk_signal_connect(GTK_OBJECT(create), "clicked", GTK_SIGNAL_FUNC(create_mess), ca);
+
+	/* Checkbox for showing away msg */
+	ca->checkbx = gtk_check_button_new_with_label("Make away now");
+
+	/* pack boxes where they belong */
+	gtk_box_pack_start(GTK_BOX(tbox), titlebox, TRUE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX(tbox), bbox, FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(tbox), ca->checkbx, FALSE, FALSE, 0);
+	gtk_container_add(GTK_CONTAINER(ca->window), tbox);
+
+	/* let the world see what we have done. */
+	gtk_widget_show(label);
+	gtk_widget_show(create);
+	gtk_widget_show(ca->checkbx);
+	gtk_widget_show(ca->entry);
+	gtk_widget_show(titlebox);
+	gtk_widget_show(tbox);
+	gtk_widget_show(bbox);
+
+
+        gtk_widget_realize(ca->window);
+        aol_icon(ca->window->window);
+
+	gtk_widget_show(ca->window);
+
+
+}
+
+#if 0
+
+/*------------------------------------------------------------------------*/
+/*  The dialog for file requests                                          */
+/*------------------------------------------------------------------------*/
+
+
+static void cancel_callback(GtkWidget *widget, struct file_transfer *ft)
+{
+	char *send = g_malloc(256);
+
+	if (ft->accepted) {
+		g_free(send);
+		return;
+	}
+	
+	g_snprintf(send, 255, "toc_rvous_cancel %s %s %s", ft->user, ft->cookie, FILETRANS_UID);
+	sflap_send(send, strlen(send), TYPE_DATA);
+	g_free(send);
+	destroy_dialog(NULL, ft->window);
+	g_free(ft->user);
+	if (ft->message)
+		g_free(ft->message);
+	g_free(ft->filename);
+	g_free(ft->cookie);
+	g_free(ft->ip);
+        g_free(ft);
+}
+
+
+static void warn_callback(GtkWidget *widget, struct file_transfer *ft)
+{
+        show_warn_dialog(ft->user);
+}
+
+static void info_callback(GtkWidget *widget, struct file_transfer *ft)
+{
+        serv_get_info(ft->user);
+}
+
+static char *put_16_int(gint i) {
+        static char tmp[2];
+        g_snprintf(tmp, 2, "%c%c", i >> 8,  i & 0xff);
+        return tmp;
+}
+
+static char *put_32_int(gint i) {
+        static char tmp[4];
+        g_snprintf(tmp, 4, "%c%c%c%c", (i >> 24) & 0xff, (i >> 16) & 0xff, (i >> 8) & 0xff, i & 0xff);
+        return tmp;
+}
+
+
+static int get_16_int(char *text)
+{
+        int tmp = 0;
+	tmp = ((*text << 8) & 0xff);
+	text++;
+	tmp |= (*text & 0xff);
+        text++;
+        return tmp;
+}
+
+static int get_32_int(char *text)
+{
+        int tmp = 0;
+	tmp = ((*text << 24) & 0xff);
+	text++;
+	tmp |= ((*text << 16) & 0xff);
+	text++;
+	tmp |= ((*text << 8) & 0xff);
+	text++;
+	tmp |= (*text & 0xff);
+        text++;
+        return tmp;
+}
+	
+static void do_accept(GtkWidget *w, struct file_transfer *ft)
+{
+	char *send = g_malloc(256);
+	char *file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(ft->window));
+	char *buf;
+	char *header;
+	int hdrlen;
+	char bmagic[5];
+	struct sockaddr_in sin;
+	int rcv;
+        gint hdrtype, encrypt, compress, totfiles, filesleft;
+        gint totparts, partsleft, totsize, size, modtime, checksum;
+        gint rfrcsum, rfsize, cretime, rfcsum, nrecvd, recvcsum;
+        char *bcookie, *idstring;
+        char flags, lnameoffset, lsizeoffset, dummy;
+        char *macfileinfo;
+        gint nencode, nlanguage;
+        char *name;
+        char *c;
+
+        
+	if (!(ft->f = fopen(file,"w"))) {
+		buf = g_malloc(BUF_LONG);
+                g_snprintf(buf, BUF_LONG / 2, "Error writing file %s", file);
+		do_error_dialog(buf, "Error");
+		g_free(buf);
+		ft->accepted = 0;
+		accept_callback(NULL, ft);
+		return;
+	}
+
+	ft->accepted = 1;
+	
+	destroy_dialog(NULL, ft->window);
+	g_snprintf(send, 255, "toc_rvous_accept %s %s %s", ft->user, ft->cookie, FILETRANS_UID);
+	sflap_send(send, strlen(send), TYPE_DATA);
+	g_free(send);
+
+	
+
+        sin.sin_addr.s_addr = inet_addr(ft->ip);
+        sin.sin_family = AF_INET;
+	sin.sin_port = htons(ft->port);
+	
+	ft->fd = socket(AF_INET, SOCK_STREAM, 0);
+	
+	if (ft->fd <= -1 || connect(ft->fd, (struct sockaddr_in *)&sin, sizeof(sin))) {
+		return;
+		/*cancel */
+	}
+
+	rcv = 0;
+	header = g_malloc(6);
+	while (rcv != 6) {
+		rcv += read(ft->fd, header + rcv, 6 - rcv);
+		while(gtk_events_pending())
+			gtk_main_iteration();
+	}
+
+	strncpy(bmagic, header, 4);
+        bmagic[4] = 0;
+
+	hdrlen = ((header[4] << 8) & 0xff) | (header[5] & 0xff);
+
+	g_free(header);
+	header = g_malloc(hdrlen+1);
+
+	rcv = 0;
+
+	while (rcv != hdrlen) {
+		rcv += read(ft->fd, header + rcv, hdrlen - rcv);
+		while(gtk_events_pending())
+			gtk_main_iteration();
+	}
+
+	header[hdrlen] = 0;
+
+        c = header;
+
+
+        hdrtype = get_16_int(c);
+        bcookie = g_malloc(9);
+        strncpy(bcookie, c, 8);
+        c+=8;
+        bcookie[8] = 0;
+
+        encrypt = get_16_int(c); c+=2;
+        compress = get_16_int(c); c+=2;
+        totfiles = get_16_int(c); c+=2;
+        filesleft = get_16_int(c); c+=2;
+        totparts = get_16_int(c); c+=2;
+        partsleft = get_16_int(c); c+=2;
+        totsize = get_32_int(c); c+=4;
+        size = get_32_int(c); c+=4;
+        modtime = get_32_int(c); c+=4;
+        checksum = get_32_int(c); c+=4;
+        rfrcsum = get_32_int(c); c+=4;
+        rfsize = get_32_int(c); c+=4;
+        cretime = get_32_int(c); c+=4;
+        rfcsum = get_32_int(c); c+=4;
+        nrecvd = get_32_int(c); c+=4;
+        recvcsum = get_32_int(c); c+=4;
+        idstring = g_malloc(33);
+        strncpy(idstring, c, 32);
+        c+=32;
+        idstring[32] = 0;
+        flags = *c; c++;
+        lnameoffset = *c; c++;
+        lsizeoffset = *c; c++;
+        dummy = *c; c++;
+        
+        macfileinfo = g_malloc(70);
+        strncpy(macfileinfo, c, 69);
+        c+=69;
+        macfileinfo[69] = 0;
+        nencode = get_16_int(c); c+=2;
+        nlanguage = get_16_int(c); c+=2;
+        
+        name = g_strdup(c);
+
+
+        totparts = 1;
+        partsleft = 1;
+        rfsize = 0;
+
+
+        printf("Header type: %d\n", hdrtype);
+        printf("Encryption: %d\n", encrypt);
+        printf("Compress: %d\n", compress);
+        
+
+        
+	
+}
+
+
+static void accept_callback(GtkWidget *widget, struct file_transfer *ft)
+{
+	char *buf = g_malloc(BUF_LEN);
+	char *fname = g_malloc(BUF_LEN);
+	char *c;
+
+	c = ft->filename + strlen(ft->filename);
+
+	while (c != ft->filename) {
+		if (*c == '/' || *c == '\\') {
+			strcpy(fname, c+1);
+			break;
+		}
+		c--;
+	}
+
+	if (c == ft->filename)
+                strcpy(fname, ft->filename);
+
+	
+	destroy_dialog(NULL, ft->window);
+	
+	ft->window = gtk_file_selection_new("Gaim - Save As...");
+
+	gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(ft->window));
+
+	g_snprintf(buf, BUF_LEN - 1, "%s/%s", getenv("HOME"), fname);
+
+	gtk_file_selection_set_filename(GTK_FILE_SELECTION(ft->window), buf);
+	gtk_signal_connect(GTK_OBJECT(ft->window), "destroy",
+			   GTK_SIGNAL_FUNC(cancel_callback), ft);
+                
+	gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(ft->window)->ok_button),
+			   "clicked", GTK_SIGNAL_FUNC(do_accept), ft);
+	gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(ft->window)->cancel_button),
+			   "clicked", GTK_SIGNAL_FUNC(cancel_callback), ft);
+
+        dialogwindows = g_list_prepend(dialogwindows, ft->window);
+
+	gtk_widget_show(ft->window);
+	
+	g_free(buf);
+	g_free(fname);
+
+}
+
+
+
+
+void accept_file_dialog(struct file_transfer *ft)
+{
+        GtkWidget *accept, *info, *warn, *cancel;
+        GtkWidget *text = NULL, *sw;
+        GtkWidget *label;
+        GtkWidget *vbox, *bbox;
+        char buf[1024];
+
+        
+        ft->window = gtk_window_new(GTK_WINDOW_DIALOG);
+        dialogwindows = g_list_prepend(dialogwindows, ft->window);
+
+        accept = gtk_button_new_with_label("Accept");
+        info = gtk_button_new_with_label("Info");
+        warn = gtk_button_new_with_label("Warn");
+        cancel = gtk_button_new_with_label("Cancel");
+
+        bbox = gtk_hbox_new(TRUE, 10);
+        vbox = gtk_vbox_new(FALSE, 5);
+
+        gtk_widget_show(accept);
+        gtk_widget_show(info);
+        gtk_widget_show(warn);
+        gtk_widget_show(cancel);
+
+        gtk_box_pack_start(GTK_BOX(bbox), accept, TRUE, TRUE, 10);
+        gtk_box_pack_start(GTK_BOX(bbox), info, TRUE, TRUE, 10);
+        gtk_box_pack_start(GTK_BOX(bbox), warn, TRUE, TRUE, 10);
+        gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10);
+
+        g_snprintf(buf, sizeof(buf), "%s requests you to accept the file: %s (%d bytes)",
+                   ft->user, ft->filename, ft->size);
+        label = gtk_label_new(buf);
+        gtk_widget_show(label);
+        gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 5);
+        
+        if (ft->message) {
+                text = gaim_new_layout();
+                sw = gtk_scrolled_window_new (NULL, NULL);
+                gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
+                                                GTK_POLICY_NEVER,
+                                                GTK_POLICY_AUTOMATIC);
+                gtk_widget_show(sw);
+                gtk_container_add(GTK_CONTAINER(sw), text);
+                gtk_widget_show(text);
+
+                gtk_layout_set_size(GTK_LAYOUT(text), 250, 100);
+                GTK_LAYOUT (text)->vadjustment->step_increment = 10.0;
+                gtk_widget_set_usize(sw, 250, 100);
+
+                gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 10);
+        }
+        gtk_box_pack_start(GTK_BOX(vbox), bbox, TRUE, TRUE, 5);
+
+        gtk_window_set_title(GTK_WINDOW(ft->window), "Gaim - Accept File?");
+        gtk_window_set_focus(GTK_WINDOW(ft->window), accept);
+        gtk_container_add(GTK_CONTAINER(ft->window), vbox);
+        gtk_container_border_width(GTK_CONTAINER(ft->window), 10);
+        gtk_widget_show(vbox);
+        gtk_widget_show(bbox);
+        gtk_widget_realize(ft->window);
+        aol_icon(ft->window->window);
+
+        gtk_widget_show(ft->window);
+
+
+	gtk_signal_connect(GTK_OBJECT(accept), "clicked",
+			   GTK_SIGNAL_FUNC(accept_callback), ft);
+	gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
+			   GTK_SIGNAL_FUNC(cancel_callback), ft);
+	gtk_signal_connect(GTK_OBJECT(warn), "clicked",
+			   GTK_SIGNAL_FUNC(warn_callback), ft);
+	gtk_signal_connect(GTK_OBJECT(info), "clicked",
+			   GTK_SIGNAL_FUNC(info_callback), ft);
+
+
+	if (ft->message) {
+		while(gtk_events_pending())
+			gtk_main_iteration();
+		html_print(text, ft->message);
+	}
+
+
+
+}
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gaim.h	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,591 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ * 
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifdef USE_APPLET
+#include <applet-widget.h>
+#endif /* USE_APPLET */
+
+
+/*
+	1.  gethostbyname();
+	2.  connect();
+	3.  toc_signon();
+	4.  toc_wait_signon();
+	5.  toc_wait_config();
+	6.  actually done..
+*/
+
+#define STATE_OFFLINE 0
+#define STATE_FLAPON 1
+#define STATE_SIGNON_REQUEST 2
+#define STATE_SIGNON_ACK 3
+#define STATE_CONFIG 4
+#define STATE_ONLINE 5
+
+#define BROWSER_NETSCAPE              0
+#define BROWSER_KFM                   1
+#define BROWSER_MANUAL                2
+#define BROWSER_INTERNAL              3
+
+#define UC_AOL		1
+#define UC_ADMIN 	2
+#define UC_UNCONFIRMED	4
+#define UC_NORMAL	8
+#define UC_UNAVAILABLE  16
+
+#define IDLE_NONE       0
+#define IDLE_GAIM       1
+#define IDLE_SYSTEM     2
+
+#define WFLAG_SEND 1
+#define WFLAG_RECV 2
+#define WFLAG_AUTO 4
+#define WFLAG_WHISPER 8
+#define WFLAG_FILERECV 16
+#define WFLAG_SYSTEM 32
+
+#define AUTO_RESPONSE "<AUTO-REPLY> : "
+
+#define PLUGIN_DIR "$HOME/.gaim/plugins/"
+
+#define REG_EMAIL_ADDR "gaiminfo@blueridge.net"
+#define REG_SRVR "blueridge.net"
+#define REG_PORT 25
+
+extern struct prefs_data *pd;
+extern struct debug_window *dw;
+
+struct aim_user {
+	char username[64];
+        char password[32];
+        char user_info[2048];
+};
+
+struct save_pos {
+        int x;
+        int y;
+        int width;
+        int height;
+        int xoff;
+        int yoff;
+};
+
+struct prefs_data {
+        GtkWidget *window;
+        GtkWidget *away_list;
+        struct away_message *cur_message;
+        GtkWidget *away_text;
+        char *edited_message;
+        GtkWidget *browser_entry;
+        GtkWidget *nwbutton;
+        GtkWidget *aim_host_entry;
+        GtkWidget *aim_port_entry;
+        GtkWidget *login_host_entry;
+        GtkWidget *login_port_entry;
+        GtkWidget *http_proxy_host_entry;
+        GtkWidget *http_proxy_port_entry;
+
+};
+
+
+struct option_set {
+        int *options;
+        int option;
+};
+
+struct g_url {
+	char address[255];
+	int port;
+        char page[255];
+};
+
+struct gaim_plugin {
+        char name[64];
+        char filename[512];
+/*        char description[256];
+        int major_version;
+        int minor_version; */
+        char *(*init_gaim_plugin)();
+        void (*toc_receive)(char *);
+};
+
+struct buddy {
+	char name[80];
+	GtkWidget *item;
+	GtkWidget *label;
+	GtkWidget *pix;
+        GtkWidget *idletime;
+        int present;
+        int log_timer;
+	int evil;
+	time_t signon;
+	time_t idle;
+        int uc;
+};
+
+struct log_conversation {
+	char name[80];
+	char filename[512];
+        struct log_conversation *next;
+};
+
+struct buddy_pounce {
+        char name[80];
+        char message[2048];
+	int popup;
+	int sendim;
+};
+
+struct away_message {
+	char name[80];
+	char message[2048];
+};
+
+struct group {
+	GtkWidget *item;
+        GtkWidget *label;
+        GtkWidget *tree;
+	char name[80];
+	GList *members;
+};
+
+struct buddy_chat {
+	GtkWidget *window;
+	GtkWidget *text;
+	GtkWidget *list;
+        GtkWidget *entry;
+        GList *in_room;
+        GList *ignored;
+	int makesound;
+        int id;
+	char name[80];
+};
+
+struct chat_room {
+        char name[128];
+        int exchange;
+};
+
+struct debug_window {
+	GtkWidget *window;
+	GtkWidget *entry;
+};
+
+struct conversation {
+        GtkWidget *window;
+        char name[80];
+	GtkWidget *text;
+        GtkWidget *entry;
+	GtkWidget *italic;
+        GtkWidget *bold;
+	GtkWidget *underline;
+	GtkWidget *palette;
+	GtkWidget *link;
+        GtkWidget *add_button;
+        GtkWidget *log_button;
+	GtkWidget *strike;
+
+        int makesound;
+        time_t sent_away;
+};
+
+struct file_transfer {
+        GtkWidget *window;
+        char *cookie;
+        char *ip;
+        char *message;
+        int port;
+        int size;
+        int accepted;
+        char *filename;
+        char *lfilename;
+        char *user;
+        FILE *f;
+        int fd;
+};
+
+struct sflap_hdr {
+	unsigned char ast;
+	unsigned char type;
+	unsigned short seqno;
+	unsigned short len;
+};
+
+struct signon {
+	unsigned int ver;
+	unsigned short tag;
+	unsigned short namelen;
+	char username[80];
+};
+
+#define LOGIN_STEPS 5
+
+#define CONVERSATION_TITLE "Gaim - Conversation with %s"
+#define LOG_CONVERSATION_TITLE "Gaim - Conversation with %s (logged)"
+
+#define FILETRANS_UID "09461343-4C7F-11D1-8222-444553540000"
+
+#define LAGOMETER_STR "123CHECKLAG456"
+
+#define AOL_SRCHSTR "/community/aimcheck.adp/url="
+
+/* These should all be runtime selectable */
+
+#define TOC_HOST "toc.oscar.aol.com"
+#define TOC_PORT 9898
+#define AUTH_HOST "login.oscar.aol.com"
+#define AUTH_PORT 5190
+#define LANGUAGE "english"
+
+#define MSG_LEN 2048
+/* The above should normally be the same as BUF_LEN,
+ * but just so we're explictly asking for the max message
+ * length. */
+#define BUF_LEN MSG_LEN
+#define BUF_LONG BUF_LEN * 2
+
+
+#define TYPE_SIGNON    1  
+#define TYPE_DATA      2
+#define TYPE_ERROR     3
+#define TYPE_SIGNOFF   4
+#define TYPE_KEEPALIVE 5
+
+#define REVISION "gaim:$Revision: 10 $"
+#define FLAPON "FLAPON\r\n\r\n"
+
+#define ROAST "Tic/Toc"
+
+
+#define BUDDY_ARRIVE 0
+#define BUDDY_LEAVE 1
+#define SEND 2
+#define RECEIVE 3
+#define FIRST_RECEIVE 4
+#define AWAY 5
+
+
+#ifdef USE_APPLET
+extern GtkWidget *applet;
+#endif /* USE_APPLET */
+
+/* Globals in oscar.c */
+extern struct aim_conn_t *gaim_conn;
+
+/* Globals in server.c */
+extern int correction_time;
+
+/* Globals in network.c */
+
+/* Globals in toc.c */
+
+/* Globals in aim.c */
+extern GList *permit;  /* The list of people permitted */
+extern GList *deny;    /* The list of people denied */
+extern GList *log_conversations;
+extern GList *buddy_pounces;
+extern GList *away_messages;
+extern GList *groups;
+extern GList *buddy_chats;
+extern GList *conversations;
+extern GList *chat_rooms;
+extern GtkWidget *mainwindow;
+extern char *quad_addr;
+extern char toc_addy[16];
+
+/* Globals in away.c */
+extern struct away_message *awaymessage;
+extern GtkWidget *awaymenu;
+
+/* Globals in buddy.c */
+extern int permdeny;
+extern GtkWidget *buddies;
+extern GtkWidget *bpmenu;
+extern GtkWidget *blist;
+
+extern int general_options;
+#define OPT_GEN_ENTER_SENDS      0x00000001
+#define OPT_GEN_AUTO_LOGIN       0x00000002
+#define OPT_GEN_LOG_ALL          0x00000004
+#define OPT_GEN_STRIP_HTML       0x00000008
+#define OPT_GEN_APP_BUDDY_SHOW   0x00000010
+#define OPT_GEN_POPUP_WINDOWS    0x00000020
+#define OPT_GEN_SEND_LINKS       0x00000040
+#define OPT_GEN_SHOW_LAGMETER    0x00000080
+#define OPT_GEN_DEBUG            0x00000100
+#define OPT_GEN_REMEMBER_PASS    0x00000200
+#define OPT_GEN_REGISTERED       0x00000400
+#define OPT_GEN_BROWSER_POPUP    0x00000800
+#define OPT_GEN_SAVED_WINDOWS    0x00001000
+#define OPT_GEN_DISCARD_WHEN_AWAY 0x00002000
+        
+extern int display_options;
+#define OPT_DISP_SHOW_TIME       0x00000001
+#define OPT_DISP_SHOW_GRPNUM     0x00000002
+#define OPT_DISP_SHOW_PIXMAPS    0x00000004
+#define OPT_DISP_SHOW_IDLETIME   0x00000008
+#define OPT_DISP_SHOW_BUTTON_XPM 0x00000010
+#define OPT_DISP_IGNORE_COLOUR   0x00000020
+#define OPT_DISP_SHOW_LOGON      0x00000040
+
+extern int sound_options;
+#define OPT_SOUND_LOGIN          0x00000001
+#define OPT_SOUND_LOGOUT         0x00000002
+#define OPT_SOUND_RECV           0x00000004
+#define OPT_SOUND_SEND           0x00000008
+#define OPT_SOUND_FIRST_RCV      0x00000010
+#define OPT_SOUND_WHEN_AWAY      0x00000020
+
+
+extern int font_options;
+#define OPT_FONT_BOLD		 0x00000001
+#define OPT_FONT_ITALIC          0x00000002
+#define OPT_FONT_UNDERLINE       0x00000008
+#define OPT_FONT_STRIKE          0x00000010
+
+#define DEFAULT_INFO "Visit the GAIM website at <A HREF=\"http://www.marko.net/gaim\">http://www.marko.net/gaim</A>."
+
+extern int report_idle;
+extern int web_browser;
+extern struct aim_user *current_user;
+extern GList *aim_users;
+extern char web_command[2048];
+extern char debug_buff[BUF_LONG];
+extern char aim_host[512];
+extern int aim_port;
+extern char login_host[512];
+extern int login_port;
+extern struct save_pos blist_pos;
+
+/* Functions in about.c */
+extern void show_about(GtkWidget *, void *);
+
+
+/* Functions in buddy_chat.c */
+extern void join_chat();
+extern void chat_write(struct buddy_chat *, char *, int, char *);
+extern void add_chat_buddy(struct buddy_chat *, char *);
+extern void remove_chat_buddy(struct buddy_chat *, char *);
+extern void show_new_buddy_chat(struct buddy_chat *);
+extern void setup_buddy_chats();
+
+
+
+/* Functions in html.c */
+extern char *fix_url(char *);
+extern struct g_url parse_url(char *);
+extern char *grab_url(char *);
+extern gchar *strip_html(gchar *);
+
+/* Functions in util.c */
+extern char *normalize(const char *);
+extern int escape_text(char *);
+extern int escape_message(char *msg);
+extern char *frombase64(char *);
+extern gint clean_pid(void *);
+extern char *date();
+extern gint linkify_text(char *);
+extern void aol_icon(GdkWindow *);
+extern int query_state();
+extern void set_state(int);
+extern FILE *open_log_file (struct conversation *c);
+extern char *sec_to_text(int);
+extern struct aim_user *find_user(const char *);
+
+
+/* Functions in server.c */
+/* input to serv */
+extern int serv_login(char *, char *);
+extern void serv_close();
+extern void serv_touch_idle();
+extern void serv_finish_login();
+extern void serv_send_im(char *, char *, int);
+extern void serv_get_info(char *);
+extern void serv_get_dir(char *);
+extern void serv_set_idle(int);
+extern void serv_set_info(char *);
+extern void serv_set_away(char *);
+extern void serv_add_buddy(char *);
+extern void serv_add_buddies(GList *);
+extern void serv_remove_buddy(char *);
+extern void serv_add_permit(char *);
+extern void serv_add_deny(char *);
+extern void serv_set_permit_deny();
+extern void serv_save_config();
+extern void serv_warn(char *, int);
+extern void serv_set_dir(char *, char *, char *, char *, char *, char *, char *, int);
+extern void serv_dir_search(char *, char *, char *, char *, char *, char *, char *, char *);
+extern void serv_accept_chat(int);
+extern void serv_join_chat(int, char *);
+extern void serv_chat_invite(int, char *, char *);
+extern void serv_chat_leave(int);
+extern void serv_chat_whisper(int, char *, char *);
+extern void serv_chat_send(int, char *);
+
+/* output from serv */
+extern void serv_got_update(char *, int, int, time_t, time_t, int);
+extern void serv_got_im(char *, char *, int);
+extern void serv_got_eviled(char *, int);
+extern void serv_got_chat_invite(char *, int, char *, char *);
+extern void serv_got_joined_chat(int, char *);
+extern void serv_got_chat_left(int);
+extern void serv_got_chat_in(int, char *, int, char *);
+
+/* Functions in conversation.c */
+extern void write_to_conv(struct conversation *, char *, int);
+extern void show_conv(struct conversation *);
+extern struct conversation *new_conversation(char *);
+extern struct conversation *find_conversation(char *);
+extern void delete_conversation(struct conversation *);
+extern void surround(GtkWidget *, char *, char *);
+extern int is_logging(char *);
+extern void set_state_lock(int );
+extern void rm_log(struct log_conversation *a);
+extern struct log_conversation *find_log_info(char *name);
+extern void remove_tags(GtkWidget *entry, char *tag);
+extern void update_log_convs();
+extern void update_transparency();
+extern void update_font_buttons();
+
+/* Functions in network.c */
+extern unsigned int *get_address(char *);
+extern int connect_address(unsigned int, unsigned short);
+
+/* Functions in oscar.c */
+extern void oscar_close();
+extern int oscar_login(char *, char *);
+
+/* Functions in toc.c */
+extern void toc_close();
+extern int toc_login(char *, char *);
+extern int toc_wait_signon(void);
+extern char *toc_wait_config(void);
+extern int sflap_send(char *, int , int );
+extern void parse_toc_buddy_list(char *);
+
+
+/* Functions in buddy.c */
+extern void destroy_buddy();
+extern void update_num_groups();
+extern void update_show_idlepix();
+extern void update_button_pix();
+extern void update_all_buddies();
+extern void show_buddy_list();
+extern void refresh_buddy_window();
+extern void toc_build_config(char *, int len);
+extern void signoff();
+extern void do_im_back();
+extern void set_buddy(struct buddy *);
+extern struct person *add_person(char *, char *);
+extern struct group *add_group(char *);
+extern void add_category(char *);
+extern void build_edit_tree();
+extern void build_permit_tree();
+extern void remove_person(struct group *, struct buddy *);
+extern void remove_category(struct group *);
+extern void do_pounce(char *);
+extern void do_bp_menu();
+extern struct buddy *find_buddy(char *);
+extern struct group *find_group(char *);
+extern struct group *find_group_by_buddy(char *);
+extern void remove_buddy(struct group *, struct buddy *);
+extern struct buddy *add_buddy(char *, char *);
+extern void remove_group(struct group *);
+extern void update_lagometer(int);
+
+/* Functions in away.c */
+extern void rem_away_mess(GtkWidget *, struct away_message *);
+extern void do_away_message(GtkWidget *, struct away_message *);
+extern void do_away_menu();
+extern void away_list_unclicked(GtkWidget *, struct away_message *);
+extern void away_list_clicked(GtkWidget *, struct away_message *);
+
+/* Functions in aim.c */
+extern void hide_login_progress(char *);
+extern void set_login_progress(int, char *);
+extern void show_login();
+#ifdef USE_APPLET
+extern void make_buddy();
+extern void applet_show_login(AppletWidget *, gpointer);
+extern void gnome_buddy_show();
+extern void gnome_buddy_hide();
+extern void gnome_buddy_set_pos( gint x, gint y );
+GtkRequisition gnome_buddy_get_dimentions();
+#endif
+
+
+/* Functions in sound.c */
+extern void play_sound(int);
+
+
+#ifdef GAIM_PLUGINS
+/* Functions in plugins.c */
+extern void load_plugins();
+#endif
+
+/* Functions in prefs.c */
+extern void debug_print( char * chars );
+extern void set_general_option(GtkWidget *, int *);
+extern void set_option(GtkWidget *, int *);
+extern void show_prefs();
+
+/* Functions in gaimrc.c */
+extern void set_defaults();
+extern void load_prefs();
+extern void save_prefs();
+
+
+/*Functions in plugins.c */
+extern void show_plugins();
+
+/* Functions in dialogs.c */
+extern void show_warn_dialog(char *);
+extern void do_error_dialog(char *, char *);
+extern void show_error_dialog(char *);
+extern void show_im_dialog(GtkWidget *, GtkWidget *);
+extern void show_add_buddy(char *, char *);
+extern void show_add_perm();
+extern void destroy_all_dialogs();
+extern void show_export_dialog();
+extern void show_import_dialog();
+extern void show_new_bp();
+extern void show_log_dialog(char *);
+extern void show_find_email();
+extern void show_find_info();
+extern void g_show_info (char *);
+extern void show_register_dialog();
+extern void show_set_info();
+extern void show_set_dir();
+extern void show_color_dialog(GtkWidget *entrye, GtkWidget *color);
+extern void accept_file_dialog(struct file_transfer *);
+extern void create_away_mess(GtkWidget *, void *);
+extern void show_ee_dialog(int);
+extern void show_add_link(GtkWidget *, GtkWidget *);
+
+
+/* Functions in browser.c */
+extern void open_url(GtkWidget *, char *);
+extern void open_url_nw(GtkWidget *, char *);
+extern void add_bookmark(GtkWidget *, char *);
+
+/* functions for appletmgr */
+extern char * getConfig();
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gaimrc.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,527 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <string.h>
+#include <sys/time.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include "gaim.h"
+#include "proxy.h"
+
+
+struct aim_user *current_user = NULL;
+GList *aim_users = NULL;
+int general_options;
+int display_options;
+int sound_options;
+int font_options;
+
+int report_idle, web_browser;
+struct save_pos blist_pos;
+char web_command[2048];
+char aim_host[512];
+int aim_port;
+char login_host[512];
+int login_port;
+
+
+struct parse {
+        char option[256];
+        char value[6][256];
+};
+
+static struct parse *parse_line(char *line)
+{
+        char *c = line;
+        int inopt = 1, inval = 0, curval = -1;
+        int optlen = 0, vallen = 0;
+        static struct parse p;
+        
+
+        while(*c) {
+                if (*c == '\t') {
+                        c++;
+                        continue;
+                }
+                if (inopt) {
+                     //   if ((*c < 'a' || *c > 'z') && *c != '_') {
+			  if ((*c < 'a' || *c > 'z') && *c != '_' && (*c < 'A' || *c > 'Z')) {
+                                inopt = 0;
+                                p.option[optlen] = 0;
+                                c++;
+                                continue;
+                        }
+
+                        p.option[optlen] = *c;
+                        optlen++;
+                        c++;
+                        continue;
+                } else if (inval) {
+                if ( (*c == '}') ) {
+                                if (*(c-1) == '\\') {
+                                        p.value[curval][vallen - 1] = *c;
+                                        c++;
+                                        continue;
+                                } else {
+                                        p.value[curval][vallen - 1] = 0;
+                                        inval = 0;
+                                        c++;
+                                        continue;
+                                }
+                        } else {
+                        p.value[curval][vallen] = *c;
+                        vallen++;
+                        c++;
+                        continue; }
+                } else if (*c == '{') {
+			if (*(c-1) == '\\') {
+				p.value[curval][vallen-1] = *c;
+				c++;
+				continue;
+			}
+			else
+			{
+                        	curval++;
+                        	vallen = 0;
+                        	inval = 1;
+                        	c++;
+                        	c++;
+                        	continue;
+			}
+                }
+                c++;
+        }
+        return &p;
+}
+
+
+static int gaimrc_parse_tag(FILE *f)
+{
+	char buf[2048];
+	char tag[256];
+	buf[0] = '#';
+
+	while (buf[0] == '#' && !feof(f))
+		fgets(buf, sizeof(buf), f);
+
+	if (feof(f))
+		return -1;
+
+	sscanf(buf, "%s {", tag);
+
+	if (!strcmp(tag, "users")) {
+		return 0;
+	} else if (!strcmp(tag, "options")) {
+		return 1;
+	} else if (!strcmp(tag, "away")) {
+		return 2;
+	}
+
+	return -1;
+}
+
+void filter_break(char *msg)
+{
+	char *c;
+	int mc;
+
+	c = g_strdup(msg);
+	mc = 0;
+	while (*c)
+	{
+		if (*c == '\\') {
+			c++;
+			msg[mc] = *c; 
+		}	
+		else {
+			msg[mc] = *c;
+		}
+		mc++;
+		c++;
+	}
+	msg[mc] = 0;
+}
+
+static void gaimrc_read_away(FILE *f)
+{
+	struct parse *p;
+	char buf[4096];
+	struct away_message *a;
+
+	buf[0] = 0;
+	
+	while (buf[0] != '}')
+	{
+		if (!fgets(buf, sizeof(buf), f))
+			return;
+		
+		if (buf[0] == '}')
+			return;
+
+		p = parse_line(buf);
+		a = g_new0(struct away_message, 1);
+
+		g_snprintf(a->name, sizeof(a->name),  "%s", p->option);
+		g_snprintf(a->message, sizeof(a->message), "%s", p->value[0]);
+		filter_break(a->message);
+		away_messages = g_list_append(away_messages, a);
+	}
+}
+
+static void gaimrc_write_away(FILE *f)
+{
+	GList *awy = away_messages;
+	struct away_message *a;
+
+	fprintf(f, "away {\n");
+
+	while (awy) {
+		a = (struct away_message *)awy->data;
+	//	escape_text(a->name);
+	//	escape_text(a->message);
+		fprintf(f, "\t%s { %s }\n", escape_text2(a->name), escape_text2(a->message));
+		awy = awy->next;
+	}
+
+	fprintf(f, "}\n");
+}
+
+
+
+
+static struct aim_user *gaimrc_read_user(FILE *f)
+{
+        struct parse *p;
+        struct aim_user *u;
+        char buf[4096];
+
+        if (!fgets(buf, sizeof(buf), f))
+                return NULL;
+
+        p = parse_line(buf);
+
+        if (strcmp(p->option, "ident"))
+                return NULL;
+        
+        u = g_new0(struct aim_user, 1);
+
+        strcpy(u->username, p->value[0]);
+        strcpy(u->password, p->value[1]);
+
+        u->user_info[0] = 0;
+
+        if (!fgets(buf, sizeof(buf), f))
+                return u;
+
+        if (strcmp(buf, "\t\tuser_info {\n")) {
+                return u;
+        }
+
+        if (!fgets(buf, sizeof(buf), f))
+                return u;
+
+        while (strncmp(buf, "\t\t}", 3)) {
+                if (strlen(buf) > 3)
+                        strcat(u->user_info, &buf[3]);
+
+                if (!fgets(buf, sizeof(buf), f)) {
+                        return u;
+                }
+        }
+
+        return u;
+        
+}
+
+static void gaimrc_write_user(FILE *f, struct aim_user *u)
+{
+        char *c;
+        int nl = 1;;
+        fprintf(f, "\t\tident { %s } { %s }\n", u->username, u->password);
+        fprintf(f, "\t\tuser_info {");
+        c = u->user_info;
+        while(*c) {
+                /* This is not as silly as it looks. */
+                if (*c == '\n') {
+                        nl++;
+                } else {
+                        if (nl) {
+                                while(nl) {
+                                        fprintf(f, "\n\t\t\t");
+                                        nl--;
+                                }
+                        }
+                        fprintf(f, "%c", *c);
+                }
+                c++;
+        }
+        fprintf(f, "\n\t\t}\n");
+        
+}
+
+
+static void gaimrc_read_users(FILE *f)
+{
+	char buf[2048];
+        struct aim_user *u;
+        struct parse *p;
+        int cur = 0;
+
+	buf[0] = 0;
+
+	while (buf[0] != '}') {
+		if (buf[0] == '#')
+			continue;
+		
+		if (!fgets(buf, sizeof(buf), f))
+			return;
+
+
+                
+                p = parse_line(buf);
+
+                if (!strcmp(p->option, "current_user")) {
+                        cur = 1;;
+                } else if (strcmp(p->option, "user")) {
+                        continue;
+                }
+
+                u = gaimrc_read_user(f);
+
+                if (cur)
+                        current_user = u;
+                
+                aim_users = g_list_append(aim_users, u);
+	}
+}
+
+static void gaimrc_write_users(FILE *f)
+{
+	GList *usr = aim_users;
+	struct aim_user *u;
+
+	fprintf(f, "users {\n");
+	
+	while(usr) {
+                u = (struct aim_user *)usr->data;
+                if (current_user == u) {
+                        fprintf(f, "\tcurrent_user {\n");
+                } else {
+                        fprintf(f, "\tuser {\n");
+                }
+                gaimrc_write_user(f, u);
+
+                fprintf(f, "\t}\n");
+                
+		usr = usr->next;
+        }
+
+	fprintf(f, "}\n");
+}
+
+
+
+
+static void gaimrc_read_options(FILE *f)
+{
+	char buf[2048];
+        struct parse *p;
+
+        buf[0] = 0;
+        
+	while (buf[0] != '}') {
+		if (buf[0] == '#')
+			continue;
+		
+		if (!fgets(buf, sizeof(buf), f))
+			return;
+
+                p = parse_line(buf);
+                
+                if (!strcmp(p->option, "general_options")) {
+                        general_options = atoi(p->value[0]);
+                } else if (!strcmp(p->option, "display_options")) {
+                        display_options = atoi(p->value[0]);
+                } else if (!strcmp(p->option, "sound_options")) {
+                        sound_options = atoi(p->value[0]);
+		} else if (!strcmp(p->option, "font_options")) {
+			font_options = atoi(p->value[0]);
+                } else if (!strcmp(p->option, "report_idle")) {
+                        report_idle = atoi(p->value[0]);
+                } else if (!strcmp(p->option, "web_browser")) {
+                        web_browser = atoi(p->value[0]);
+                } else if (!strcmp(p->option, "web_command")) {
+                        strcpy(web_command, p->value[0]);
+                } else if (!strcmp(p->option, "proxy_type")) {
+                        proxy_type = atoi(p->value[0]);
+                } else if (!strcmp(p->option, "proxy_host")) {
+                        strcpy(proxy_host, p->value[0]);
+                } else if (!strcmp(p->option, "proxy_port")) {
+                        proxy_port = atoi(p->value[0]);
+                } else if (!strcmp(p->option, "aim_host")) {
+                        strcpy(aim_host, p->value[0]);
+                } else if (!strcmp(p->option, "aim_port")) {
+                        aim_port = atoi(p->value[0]);
+                } else if (!strcmp(p->option, "login_host")) {
+                        strcpy(login_host, p->value[0]);
+                } else if (!strcmp(p->option, "login_port")) {
+                        login_port = atoi(p->value[0]);
+                } else if (!strcmp(p->option, "blist_pos")) {
+                        blist_pos.x = atoi(p->value[0]);
+                        blist_pos.y = atoi(p->value[1]);
+                        blist_pos.width = atoi(p->value[2]);
+                        blist_pos.height = atoi(p->value[3]);
+                        blist_pos.xoff = atoi(p->value[4]);
+                        blist_pos.yoff = atoi(p->value[5]);
+                }
+
+        }
+
+}
+
+static void gaimrc_write_options(FILE *f)
+{
+
+	fprintf(f, "options {\n");
+        fprintf(f, "\tgeneral_options { %d }\n", general_options);
+        fprintf(f, "\tdisplay_options { %d }\n", display_options);
+        fprintf(f, "\tsound_options { %d }\n", sound_options);
+	fprintf(f, "\tfont_options { %d }\n", font_options);
+        fprintf(f, "\treport_idle { %d }\n", report_idle);
+        fprintf(f, "\tweb_browser { %d }\n", web_browser);
+        fprintf(f, "\tweb_command { %s }\n", web_command);
+        fprintf(f, "\tproxy_type { %d }\n", proxy_type);
+        fprintf(f, "\tproxy_host { %s }\n", proxy_host);
+        fprintf(f, "\tproxy_port { %d }\n", proxy_port);
+        fprintf(f, "\taim_host { %s }\n", aim_host);
+        fprintf(f, "\taim_port { %d }\n", aim_port);
+        fprintf(f, "\tlogin_host { %s }\n", login_host);
+        fprintf(f, "\tlogin_port { %d }\n", login_port);
+        fprintf(f, "\tblist_pos { %d } { %d } { %d } { %d } { %d } { %d }\n",
+                blist_pos.x, blist_pos.y, blist_pos.width, blist_pos.height,
+                blist_pos.xoff, blist_pos.yoff);
+	fprintf(f, "}\n");
+}
+
+
+void set_defaults()
+{
+        general_options =
+                OPT_GEN_SEND_LINKS |
+                OPT_GEN_ENTER_SENDS |
+                OPT_GEN_SAVED_WINDOWS |
+                OPT_GEN_REMEMBER_PASS |
+		OPT_GEN_REGISTERED;
+        display_options =
+                OPT_DISP_SHOW_IDLETIME |
+                OPT_DISP_SHOW_TIME |
+                OPT_DISP_SHOW_PIXMAPS |
+                OPT_DISP_SHOW_BUTTON_XPM;
+	font_options = 0; 
+        sound_options = OPT_SOUND_LOGIN | OPT_SOUND_LOGOUT | OPT_SOUND_RECV | OPT_SOUND_SEND;
+        report_idle = IDLE_GAIM;
+        web_browser = BROWSER_NETSCAPE;
+        proxy_type = PROXY_NONE;
+        
+	aim_port = TOC_PORT;
+	login_port = AUTH_PORT;
+	g_snprintf(aim_host, sizeof(aim_host), "%s", TOC_HOST);
+    	g_snprintf(login_host, sizeof(login_host), "%s", AUTH_HOST);
+        proxy_host[0] = 0;
+        proxy_port = 0;
+        g_snprintf(web_command, sizeof(web_command), "xterm -e lynx %%s");
+        blist_pos.width = 0;
+        blist_pos.height = 0;
+        blist_pos.x = 0;
+        blist_pos.y = 0;
+        blist_pos.xoff = 0;
+        blist_pos.yoff = 0;
+}
+
+
+void load_prefs()
+{
+	FILE *f;
+	char buf[1024];
+	int ver = 0;
+	
+        if (getenv("HOME")) {
+                g_snprintf(buf, sizeof(buf), "%s/.gaimrc", getenv("HOME"));
+		if ((f = fopen(buf,"r"))) {
+			fgets(buf, sizeof(buf), f);
+			sscanf(buf, "# .gaimrc v%d", &ver);
+			if ( (ver <= 0) || (buf[0] != '#')) {
+                                fclose(f);
+				set_defaults();
+				save_prefs();
+				load_prefs();
+                                return;
+			}
+			while(!feof(f)) {
+				switch(gaimrc_parse_tag(f)) {
+				case -1:
+					/* Let the loop end, EOF*/
+					break;
+				case 0:
+					gaimrc_read_users(f);
+					break;
+				case 1:
+					gaimrc_read_options(f);
+                                        break;
+                                case 2:
+                                        gaimrc_read_away(f);
+                                        break;
+				default:
+					/* NOOP */
+					break;
+				}
+			}
+			fclose(f);
+		}
+	}
+	
+}
+
+void save_prefs()
+{
+	FILE *f;
+	char buf[BUF_LONG];
+
+	if (getenv("HOME")) {
+		g_snprintf(buf, sizeof(buf), "%s/.gaimrc", getenv("HOME"));
+		if ((f = fopen(buf,"w"))) {
+			fprintf(f, "# .gaimrc v%d\n", 1);
+			gaimrc_write_users(f);
+                        gaimrc_write_options(f);
+                        gaimrc_write_away(f);
+                        fclose(f);
+                        chmod(buf, S_IRUSR | S_IWUSR);
+                }
+                
+	}
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gnome_applet_mgr.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,678 @@
+/**************************************************************
+**
+** GaimGnomeAppletMgr
+** Author - Quinticent (John Palmieri: johnp@martianrock.com)
+**
+** Purpose - Takes over the task of managing the GNOME applet
+**           code and provides a centralized codebase for
+**	     GNOME integration for Gaim.
+**
+**
+** gaim
+**
+** Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+**
+** 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.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+*/
+
+#ifdef USE_APPLET
+#include <string.h>
+#include <gdk_imlib.h>
+#include "gaim.h"
+#include "gnome_applet_mgr.h"
+
+enum gaim_user_states MRI_user_status; 
+gint total_num_of_buddies;  /* how many buddies I have in my list */ 
+gint num_of_buddies_online; /* how many of them are online */
+
+gboolean buddy_created = FALSE;
+gboolean applet_draw_open = FALSE;
+GtkWidget *applet_popup = NULL;
+
+GtkWidget *applet;
+GtkWidget *button;
+GtkWidget *status_label;
+
+GtkWidget *icon;
+GdkPixmap *icon_offline_pm=NULL;
+GdkPixmap *icon_offline_bm=NULL;
+
+GdkPixmap *icon_online_pm=NULL;
+GdkPixmap *icon_online_bm=NULL;
+
+GdkPixmap *icon_connect_pm=NULL;
+GdkPixmap *icon_connect_bm=NULL;
+
+GdkPixmap *icon_msg_pending_pm=NULL;
+GdkPixmap *icon_msg_pending_bm=NULL;
+
+GdkPixmap *icon_away_pm=NULL;
+GdkPixmap *icon_away_bm=NULL;
+
+/***************************************************************
+**
+** function load_applet_icon
+** visibility - private
+**
+** input:
+**	name - the name of the file to load
+**	height, width - the height and width 
+**					  that the icon should be
+**					 scaled to.
+**
+** output:
+**	TRUE - success
+**      FALSE - failure
+**	pm - a GdkPixmap structure that the icon is loaded into
+**      bm - a GdkBitmap structure that the icon's transparancy
+**		mask is loaded into
+**
+** description - loads an icon from 
+**                    /usr/share/pixmap/gaim/gnome/
+**                    and scales it using imlib
+**
+****************************************************************/
+
+gboolean load_applet_icon( const char *name, int height, int width, GdkPixmap **pm, GdkBitmap **bm ){
+	gboolean result = TRUE;
+	char path[255] = GAIM_GNOME_PIXMAP_DIR;
+	GdkImlibImage *im;
+	GdkPixmap *temp_pm;
+        GdkPixmap *temp_bm;
+		
+	strcat( path, name);
+	
+	im=gdk_imlib_load_image( path );
+	
+	if ((*pm)!=NULL)
+		gdk_imlib_free_pixmap((*pm));
+	
+	if( im!= NULL ){
+		gdk_imlib_render(im,width,height);
+	
+		(*pm) = gdk_imlib_move_image(im);
+		(*bm) = gdk_imlib_move_mask(im);	
+		
+	} else {
+		result = FALSE;
+		sprintf(debug_buff,"file not found: %s\n",path);
+		debug_print(debug_buff);
+	}
+	
+	return result;
+}
+
+/***************************************************************
+**
+** function update_applet
+** visibility - private
+**
+** input:
+**	ap - not in use
+**
+** description - takes care of swapping status icons and 
+**			  updating the status label
+**
+****************************************************************/ 
+
+gboolean update_applet( gpointer *ap ){
+     char temp_string[25];
+     static enum gaim_user_states old_user_status = offline;
+     static gint old_total_num_of_buddies = -1;
+     static gint old_num_of_buddies_online = -1;
+     if( applet_draw_open ){
+     	sprintf(debug_buff, "Drawer is open\n");
+		debug_print(debug_buff);
+     } else {
+     	sprintf(debug_buff, "Drawer is closed\n");
+		debug_print(debug_buff);
+     }
+     
+     if( MRI_user_status != old_user_status ){
+
+         switch( MRI_user_status ){
+      		case offline:
+      			gtk_pixmap_set( GTK_PIXMAP(icon),
+                           icon_offline_pm,
+                           icon_offline_bm );
+         	       gtk_label_set( GTK_LABEL(status_label), _MSG_OFFLINE_ );
+      		break;
+      		case signing_on:
+      			gtk_pixmap_set( GTK_PIXMAP(icon),
+                           icon_connect_pm,
+                           icon_connect_bm );   
+      			gtk_label_set( GTK_LABEL(status_label), _MSG_CONNECT_ );
+      			old_total_num_of_buddies = -1;
+     			old_num_of_buddies_online = -1;
+      		break;
+      		case online:
+      			gtk_pixmap_set( GTK_PIXMAP(icon),
+                           icon_online_pm,
+                           icon_online_bm );                
+                   
+                	gtk_label_set( GTK_LABEL(status_label), _MSG_ONLINE_ );
+      		break;
+      
+      		case unread_message_pending:
+      			gtk_pixmap_set( GTK_PIXMAP(icon),
+                           icon_msg_pending_pm,
+                           icon_msg_pending_bm );   
+      			gtk_label_set( GTK_LABEL(status_label), "msg" );
+      		break;
+      		case away:
+      			gtk_pixmap_set( GTK_PIXMAP(icon),
+                           icon_away_pm,
+                           icon_away_bm );   
+      			gtk_label_set( GTK_LABEL(status_label), "Away" );
+      		break;
+      	}
+      	old_user_status = MRI_user_status;
+      }
+#ifdef _USE_BUDDY_COUNT_
+      if( (( old_total_num_of_buddies != total_num_of_buddies ) || 
+      		( old_num_of_buddies_online != num_of_buddies_online )) && 
+      		( MRI_user_status == online ) ){
+      			/*make user buffer can not overflow*/
+      			if(total_num_of_buddies<1000){
+      				sprintf(temp_string, "%i/%i", num_of_buddies_online, total_num_of_buddies);
+      		    } else {
+      		    	if(num_of_buddies_online<100000){
+      		    		sprintf(temp_string, "%i", num_of_buddies_online);
+      		    	} else {
+      		    		/*we most likely will never get to here but
+      		    		  hey, people also thought computer wouldn't
+      		    		  be around by the year 2000 :-) */
+      		    		sprintf(temp_string, _MSG_ONLINE_ );
+      		    	}
+      		    }
+      			gtk_label_set( GTK_LABEL(status_label), temp_string );
+      			old_total_num_of_buddies = total_num_of_buddies;
+      			old_num_of_buddies_online = num_of_buddies_online;
+      		} 
+#endif /*_USE_BUDDY_COUNT_*/
+      return TRUE;
+
+}
+
+
+/***************************************************************
+**
+** function make_buddy
+** visibility - private
+**
+** description - If buddylist is not created create it
+**                    else show the buddy list
+**
+****************************************************************/ 
+void make_buddy(void) {
+        set_applet_draw_open();        
+	if( !buddy_created ){
+		show_buddy_list();
+		buddy_created = TRUE;
+	} else {
+		gnome_buddy_show();
+	}	
+	applet_widget_unregister_callback(APPLET_WIDGET(applet),"buddy");
+	
+}
+
+/***************************************************************
+**
+** function applet_show_login
+** visibility - private
+**
+** input:
+**
+**
+** description - I guess it shows the login dialog
+**
+****************************************************************/
+
+void applet_show_login(AppletWidget *widget, gpointer data) {
+        show_login();
+        applet_widget_unregister_callback(APPLET_WIDGET(applet),"signon");
+        applet_widget_register_callback(APPLET_WIDGET(applet),
+                "signoff",
+                _("Signoff"),
+                signoff,
+                NULL);
+	applet_widget_register_callback(APPLET_WIDGET(applet),
+		"away",
+		_("Away Message"),
+		show_away_mess,
+		NULL);
+        applet_widget_register_callback(APPLET_WIDGET(applet),
+                "buddy",
+                _("Buddy List"),
+                (AppletCallbackFunc)make_buddy,
+                NULL);
+}
+
+/***************************************************************
+**
+** function applet_show_about
+** visibility - public
+**
+**
+** description - takes care of creating and
+**                    displaying the about box
+**
+****************************************************************/
+void applet_show_about(AppletWidget *widget, gpointer data) {
+  
+  const gchar *authors[] = {"Mark Spencer <markster@marko.net>",
+                            "Jim Duchek <jimduchek@ou.edu>",
+                            "Rob Flynn <rflynn@blueridge.net>",
+			
+                            NULL};
+
+  GtkWidget *about=gnome_about_new(_("GAIM"),
+				   _(VERSION),
+				   _(""),
+				   authors,
+				   "",
+				   NULL);
+  gtk_widget_show(about);
+}
+
+/***************************************************************
+**
+** function AppletCancelLogin (name should be changed to 
+**									applet_cancel_login)
+** visibility - public
+**
+** description - called when user cancels login
+**
+****************************************************************/ 
+void AppletCancelLogon(){
+  applet_widget_unregister_callback(APPLET_WIDGET(applet),"signoff");
+  applet_widget_register_callback(APPLET_WIDGET(applet),
+				  "signon",
+				  _("Signon"),
+				  applet_show_login,
+				  NULL);
+}
+
+/***************************************************************
+**
+** function get_applet_pos
+** visibility - private
+**
+** output:
+**	GtKAllocation - a Gtk struct that holds the 
+**						position of the dialog
+**
+** description - returns the x,y position the buddy list should
+** 				should be placed based on the position
+**                      of the applet and the orientation
+**				of the Gnome panel.
+**
+****************************************************************/ 
+GtkAllocation get_applet_pos(){
+    GtkAllocation pos;
+    gint x,y,pad;
+    GtkRequisition buddy_req, applet_req;
+    GtkAllocation result;
+    GNOME_Panel_OrientType orient = applet_widget_get_panel_orient( APPLET_WIDGET(applet) );
+    pad = 5;
+    gdk_window_get_position( gtk_widget_get_parent_window( button  ),&x,&y );
+    buddy_req = gnome_buddy_get_dimentions();
+    applet_req = button->requisition;
+   switch( orient ){
+   	case ORIENT_UP:
+   		result.x=x;
+   		result.y=y-(buddy_req.height+pad);
+   	break;
+	case ORIENT_DOWN:
+   		result.x=x; 
+   		result.y=y+applet_req.height+pad; 
+   	
+   	break;
+   	case ORIENT_LEFT:
+   		result.x=x-(buddy_req.width + pad );
+   		result.y=y;
+   	break;
+   	case ORIENT_RIGHT:
+   		result.x=x+applet_req.width+pad;
+   		result.y=y;
+   	break;
+   } 
+   
+   
+   return result;
+}
+
+
+
+void createOfflinePopup(){
+	applet_show_login( APPLET_WIDGET(applet), NULL );
+}
+
+
+void createSignonPopup(){
+	applet_draw_open = FALSE;
+}
+
+
+void createOnlinePopup(){
+    GtkAllocation al;
+    make_buddy();
+    al  = get_applet_pos();  
+    gnome_buddy_set_pos(  al.x, al.y );
+}
+
+
+void createPendingPopup(){
+    applet_draw_open = FALSE;
+}
+
+
+void createAwayPopup(){
+     applet_draw_open = FALSE;
+}
+
+
+void closeOfflinePopup(){
+	cancel_logon();
+	set_applet_draw_closed();
+}
+
+
+void closeSignonPopup(){
+
+}
+
+
+void closeOnlinePopup(){
+    set_applet_draw_closed();
+    applet_destroy_buddy();
+}
+
+
+void closePendingPopup(){
+    applet_draw_open = FALSE;
+}
+
+
+void closeAwayPopup(){
+     applet_draw_open = FALSE;
+}
+
+/**************************************************
+**
+**  Dummy function to fix compiles for gnome
+**  Feel free to implement an away message
+**
+***************************************************/ 
+void show_away_mess( AppletWidget *widget, gpointer data ) {
+}
+
+void AppletClicked( GtkWidget *sender, gpointer data ){
+        
+	if( applet_draw_open ){
+	  	switch( MRI_user_status ){
+			case offline:
+				closeOfflinePopup();
+			break;
+			case signing_on:
+				closeSignonPopup();
+			break;
+			case online:
+				closeOnlinePopup();
+				
+			break;
+			case unread_message_pending:
+				closePendingPopup();
+			break;
+			case away:
+				closeAwayPopup();
+			break;
+		}     
+	} else {
+		set_applet_draw_open();
+		switch( MRI_user_status ){
+			case offline:
+				createOfflinePopup();
+			break;
+			case signing_on:
+				createSignonPopup();
+			break;
+			case online:
+				createOnlinePopup();
+			break;
+			case unread_message_pending:
+				createPendingPopup();
+			break;
+			case away:
+				createAwayPopup();
+			break;
+		}
+		
+				
+	}
+}
+
+
+#ifdef HAVE_PANEL_SIZE      
+/***************************************************************
+**
+** Code for panel resizing
+**
+****************************************************************/
+static void applet_change_size(GtkWidget *w, PanelSizeType o, gpointer data) {
+        switch(o) {
+                case SIZE_TINY: 
+                /*24x24*/ 
+                	gtk_widget_set_usize( button, 24,24 );
+        
+			/*load offline icon*/
+			load_applet_icon( GAIM_GNOME_OFFLINE_ICON, 
+							 24, 24, &icon_offline_pm, &icon_offline_bm );
+ 
+ 			/*load connecting icon*/
+ 			load_applet_icon( GAIM_GNOME_CONNECT_ICON, 
+							 24, 24, &icon_connect_pm, &icon_connect_bm );
+							 
+			/*load online icon*/
+			load_applet_icon( GAIM_GNOME_ONLINE_ICON, 
+							 24, 24, &icon_online_pm, &icon_online_bm );
+                break;
+                 
+                case SIZE_STANDARD: 
+                /*48x48*/      
+        		gtk_widget_set_usize( button, 48,48 );
+        
+			/*load offline icon*/
+			load_applet_icon( GAIM_GNOME_OFFLINE_ICON, 
+							 32, 34, &icon_offline_pm, &icon_offline_bm );
+ 
+ 			/*load connecting icon*/
+ 			load_applet_icon( GAIM_GNOME_CONNECT_ICON, 
+							 32, 34, &icon_connect_pm, &icon_connect_bm );
+							 
+			/*load online icon*/
+			load_applet_icon( GAIM_GNOME_ONLINE_ICON, 
+							 32, 34, &icon_online_pm, &icon_online_bm );
+     	        break;
+                
+                case SIZE_LARGE: 
+                /*64x64*/
+                	gtk_widget_set_usize( button, 64, 64 );
+        
+			/*load offline icon*/
+			load_applet_icon( GAIM_GNOME_OFFLINE_ICON, 
+							 55, 55, &icon_offline_pm, &icon_offline_bm );
+ 
+ 			/*load connecting icon*/
+ 			load_applet_icon( GAIM_GNOME_CONNECT_ICON, 
+							 55, 55, &icon_connect_pm, &icon_connect_bm );
+							 
+			/*load online icon*/
+			load_applet_icon( GAIM_GNOME_ONLINE_ICON, 
+							 55, 55, &icon_online_pm, &icon_online_bm );
+     	        break;
+                
+                case SIZE_HUGE: 
+                /*80x80*/
+                	gtk_widget_set_usize( button, 80, 80 );
+        
+			/*load offline icon*/
+			load_applet_icon( GAIM_GNOME_OFFLINE_ICON, 
+							 70, 70, &icon_offline_pm, &icon_offline_bm );
+ 
+ 			/*load connecting icon*/
+ 			load_applet_icon( GAIM_GNOME_CONNECT_ICON, 
+							 70, 70, &icon_connect_pm, &icon_connect_bm );
+							 
+			/*load online icon*/
+			load_applet_icon( GAIM_GNOME_ONLINE_ICON, 
+							 70, 70, &icon_online_pm, &icon_online_bm );
+     	 
+                break;
+        }
+}
+#endif /*HAVE_PANEL_SIZE*/
+
+
+/***************************************************************
+**
+** Initialize GNOME stuff
+**
+****************************************************************/
+
+gint InitAppletMgr( int argc, char *argv[] ){
+	GtkWidget *vbox;
+	
+	GtkStyle *label_style;
+	GdkFont *label_font = NULL;
+
+        applet_widget_init("GAIM",VERSION,argc,argv,NULL,0,NULL);
+        
+        /*init imlib for graphics*/ 
+        gdk_imlib_init();
+        gtk_widget_push_visual(gdk_imlib_get_visual());
+        gtk_widget_push_colormap(gdk_imlib_get_colormap());
+        
+        applet=applet_widget_new("gaim_applet");
+        if(!applet) g_error(_("Can't create GAIM applet!"));
+        
+        button=gtk_button_new();
+        
+        
+        gtk_widget_set_usize( button, 48,48 );
+        
+	
+	/*load offline icon*/
+	load_applet_icon( GAIM_GNOME_OFFLINE_ICON, 
+							 32, 32, &icon_offline_pm, &icon_offline_bm );
+ 
+ 	/*load connecting icon*/
+ 	load_applet_icon( GAIM_GNOME_CONNECT_ICON, 
+							 32, 32, &icon_connect_pm, &icon_connect_bm );
+							 
+	/*load online icon*/
+	load_applet_icon( GAIM_GNOME_ONLINE_ICON, 
+							 32, 32, &icon_online_pm, &icon_online_bm );
+ 	
+ 	/*icon_away and icon_msg_pennding need to be implemented*/		
+		
+	icon=gtk_pixmap_new(icon_offline_pm,icon_offline_bm);
+	
+	gtk_timeout_add( 1500, (GtkFunction)update_applet, NULL );
+	
+	vbox = gtk_vbox_new(FALSE,0);
+	
+	gtk_box_pack_start(GTK_BOX(vbox), icon, FALSE, TRUE, 0);
+	
+	status_label = gtk_label_new("Offline");
+	/*set this label's font*/
+	label_style = gtk_widget_get_style( status_label );
+	
+	label_font = gdk_font_load( _MSG_FONT_ );
+	         
+	
+	if( label_font != NULL ){
+		label_style->font = label_font; 
+		gtk_widget_set_style( status_label, label_style );
+	} else {
+		sprintf(debug_buff, "Font does not exist" );
+		debug_print(debug_buff);
+	}
+	
+#ifdef  HAVE_PANEL_SIZE 
+        	gtk_signal_connect(GTK_OBJECT(applet),"change_size",
+                           GTK_SIGNAL_FUNC(applet_change_size),
+                           NULL);
+#endif /*HAVE_PANEL_SIZE*/      
+	
+	gtk_box_pack_start(GTK_BOX(vbox), status_label, FALSE, TRUE, 0);
+	
+	gtk_container_add( GTK_CONTAINER(button), vbox );
+	applet_widget_add(APPLET_WIDGET(applet), button);
+	
+	gtk_widget_show( status_label );
+	gtk_widget_show( vbox );
+	gtk_widget_show( button );
+	        
+	applet_widget_set_tooltip(APPLET_WIDGET(applet),"GAIM");
+
+	applet_widget_register_stock_callback(APPLET_WIDGET(applet),
+					      "about",
+					      GNOME_STOCK_MENU_ABOUT,
+					      _("About..."),
+					      applet_show_about,
+					      NULL);
+					      
+	gtk_signal_connect( GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC( AppletClicked), NULL);
+
+        gtk_widget_show(icon);
+        gtk_widget_show(applet);
+        return 0;
+}
+
+void setUserState( enum gaim_user_states state ){
+	MRI_user_status = state; 
+	update_applet( (gpointer *)applet );
+}
+
+void setTotalBuddies( gint num ){
+	total_num_of_buddies = num;
+}
+
+void setNumBuddiesOnline( gint num ){
+	num_of_buddies_online=num;
+}
+
+enum gaim_user_states getUserState(){
+	return MRI_user_status;
+}
+
+gint getTotalBuddies(){
+	return total_num_of_buddies;
+}
+
+gint getNumBuddiesOnline(){
+	return num_of_buddies_online;
+}
+
+void set_applet_draw_open(){
+	applet_draw_open = TRUE;
+}
+
+void set_applet_draw_closed(){
+	applet_draw_open = FALSE;
+}
+
+#endif /*USE_APPLET*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gnome_applet_mgr.h	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,96 @@
+/**************************************************************
+**
+** GaimGnomeAppletMgr
+** Author - Quinticent (John Palmieri: johnp@martianrock.com)
+**
+** Purpose - Takes over the task of managing the GNOME applet
+**           code and provides a centralized codebase for
+**	     GNOME integration for Gaim.
+**
+** Legal Stuff -
+**
+** gaim 
+**
+** Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+**
+** 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.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+**
+**************************************************************/
+#ifndef _GAIMGNOMEAPPLETMGR_H_
+#define _GAIMGNOMEAPPLETMGR_H_
+#ifdef USE_APPLET
+
+#include <gnome.h>
+#include <gtk/gtk.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <applet-widget.h>
+
+enum gaim_user_states {
+	offline = 0,
+	signing_on,
+	online,
+	unread_message_pending,
+	away
+};
+
+
+#define _MSG_OFFLINE_ "Offline"
+#define _MSG_CONNECT_ "Connecting"
+#define _MSG_ONLINE_ "Online"
+#define _MSG_FONT_ "-adobe-helvetica-medium-r-normal-*-*-80-*-*-p-*-iso8859-1"
+
+#define GAIM_GNOME_PIXMAP_DIR "/usr/share/pixmaps/gaim/gnome/"
+
+/*this should be configurable instead of hard coded.*/
+#if 0
+#define GAIM_GNOME_OFFLINE_ICON "devil-offline.png"
+#define GAIM_GNOME_CONNECT_ICON "devil-connect.png"
+#define GAIM_GNOME_ONLINE_ICON "devil-online.png"
+
+#else 
+#define GAIM_GNOME_OFFLINE_ICON "penguin-offline.png"
+#define GAIM_GNOME_CONNECT_ICON "penguin-connect.png"
+#define GAIM_GNOME_ONLINE_ICON "penguin-online.png"
+#endif
+
+gint InitAppletMgr();                                              /* Initializes and creates applet */
+
+void setUserState( enum gaim_user_states state );    /* Set the state the user is in (Online, Offline, etc.) */
+
+void setTotalBuddies( gint num );						    /* For future use to display the total number of buddies within the applet */
+
+void setNumBuddiesOnline( gint num );					/* For future use to display the total number of buddies currently online, within the applet */ 
+
+enum gaim_user_states getUserState();					/* Returns the current state the user is in */
+
+gint getTotalBuddies();											/* Returns the total number of buddys set by setTotalBuddies */
+
+gint getNumBuddiesOnline();									/* Returns the total number of buddys set by setNumBuddiesOnline */
+
+void AppletCancelLogon();                                   /* Used to cancel a logon and reset the applet	*/ 
+
+void set_applet_draw_open();								/* Indicates that the code has a window open that can be controlled by clicking on the applet */
+
+void set_applet_draw_closed();								/* indicates that the code has closed the window that is controled by clicking on the applet */
+
+void show_away_mess( AppletWidget *widget, gpointer data );
+
+
+
+#endif /*USE_APPLET*/
+#endif /*_GAIMGNOMEAPPLETMGR_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gtkhtml.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,3574 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gtk/gtk.h>
+#include <gdk/gdkprivate.h>
+#include <gdk/gdkx.h>
+#include <gdk/gdkkeysyms.h>
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+
+#include "gaim.h"
+#include "gtkhtml.h"
+
+#define MAX_SIZE                 7
+#define MIN_HTML_WIDTH_LINES     20
+#define MIN_HTML_HEIGHT_LINES    10
+#define BORDER_WIDTH             2
+#define SCROLL_TIME              100
+#define SCROLL_PIXELS            5
+#define KEY_SCROLL_PIXELS        10
+
+int font_sizes[] = { 80, 100, 120, 140, 200, 300, 400 };
+
+GdkFont *fixed_font[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
+GdkFont *fixed_bold_font[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
+GdkFont *fixed_italic_font[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
+GdkFont *fixed_bold_italic_font[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
+GdkFont *prop_font[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
+GdkFont *prop_bold_font[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
+GdkFont *prop_italic_font[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
+GdkFont *prop_bold_italic_font[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
+
+struct font_state {
+        int size;
+        int owncolor;
+        int ownbg;
+        GdkColor *color;
+        GdkColor *bgcol;
+        struct font_state *next;
+};
+
+struct font_state *push_state(struct font_state *current)
+{
+        struct font_state *tmp;
+	tmp = (struct font_state *)g_new0(struct font_state, 1);
+	tmp->next = current;
+	tmp->color = current->color;
+	tmp->bgcol = current->bgcol;
+	tmp->size = current->size;
+	tmp->owncolor = 0;
+	tmp->ownbg = 0;
+	return tmp;
+}
+
+enum {
+  ARG_0,
+  ARG_HADJUSTMENT,
+  ARG_VADJUSTMENT,
+};
+
+
+enum {
+  TARGET_STRING,
+  TARGET_TEXT,
+  TARGET_COMPOUND_TEXT
+};
+
+
+static void gtk_html_class_init     (GtkHtmlClass   *klass);
+static void gtk_html_set_arg        (GtkObject      *object,
+                                     GtkArg         *arg,
+                                     guint           arg_id);
+static void gtk_html_get_arg        (GtkObject      *object,
+                                     GtkArg         *arg,
+                                     guint           arg_id);
+static void gtk_html_init           (GtkHtml        *html);
+static void gtk_html_destroy        (GtkObject      *object);
+static void gtk_html_finalize       (GtkObject      *object);
+static void gtk_html_realize        (GtkWidget      *widget);
+static void gtk_html_unrealize      (GtkWidget      *widget);
+static void gtk_html_style_set      (GtkWidget      *widget,
+                                     GtkStyle       *previous_style);
+static void gtk_html_draw_focus     (GtkWidget      *widget);
+static void gtk_html_size_request   (GtkWidget      *widget,
+                                     GtkRequisition *requisition);
+static void gtk_html_size_allocate  (GtkWidget      *widget,
+                                     GtkAllocation  *allocation);
+static void gtk_html_adjustment     (GtkAdjustment  *adjustment,
+                                     GtkHtml        *html);
+static void gtk_html_disconnect     (GtkAdjustment  *adjustment,
+                                     GtkHtml        *html);
+static void gtk_html_add_seperator  (GtkHtml        *html);
+static void gtk_html_add_pixmap     (GtkHtml        *html,
+                                     GdkPixmap *pm,
+                                     gint fit);
+static void gtk_html_add_text       (GtkHtml        *html,
+                                     GdkFont        *font,
+                                     GdkColor       *fore,
+                                     GdkColor       *back,
+                                     gchar          *chars,
+                                     gint           length,
+                                     gint           uline,
+                                     gint           strike,
+                                     gchar          *url);
+static void gtk_html_draw_bit       (GtkHtml        *html,
+                                     GtkHtmlBit     *htmlbit,
+                                     gint           redraw);
+static void gtk_html_selection_get  (GtkWidget *widget,
+                                     GtkSelectionData  *selection_data,
+                                     guint sel_info,
+                                     guint32 time);
+static gint gtk_html_selection_clear (GtkWidget *widget,
+				      GdkEventSelection *event);
+static gint gtk_html_visibility_notify (GtkWidget *widget,
+				      GdkEventVisibility *event);
+
+
+/* Event handlers */
+static void gtk_html_draw           (GtkWidget      *widget,
+                                     GdkRectangle   *area);
+static gint gtk_html_expose         (GtkWidget      *widget,
+                                     GdkEventExpose *event);
+static gint gtk_html_button_press   (GtkWidget      *widget,
+                                     GdkEventButton *event);
+static gint gtk_html_button_release (GtkWidget      *widget,
+                                     GdkEventButton *event);
+static gint gtk_html_motion_notify  (GtkWidget      *widget,
+                                     GdkEventMotion *event);
+static gint gtk_html_key_press      (GtkWidget      *widget,
+				     GdkEventKey    *event);
+static gint gtk_html_leave_notify   (GtkWidget      *widget,
+				     GdkEventCrossing *event);
+
+static gint gtk_html_tooltip_timeout(gpointer data);
+
+
+static void clear_area              (GtkHtml *html,
+                                     GdkRectangle *area);
+static void expose_html             (GtkHtml *html,
+                                     GdkRectangle *area,
+                                     gboolean cursor);
+static void scroll_down             (GtkHtml *html,
+                                     gint diff0);
+static void scroll_up               (GtkHtml *html,
+                                     gint diff0);
+
+static void adjust_adj              (GtkHtml *html,
+				     GtkAdjustment *adj);
+static void resize_html             (GtkHtml *html);
+static gint html_bit_is_onscreen    (GtkHtml *html, GtkHtmlBit *hb);
+static void draw_cursor             (GtkHtml *html);
+static void undraw_cursor           (GtkHtml *html);
+
+static GtkWidgetClass *parent_class = NULL;
+
+GtkType gtk_html_get_type(void)
+{
+        static GtkType html_type = 0;
+
+        if (!html_type) {
+                static const GtkTypeInfo html_info = {
+                        "GtkHtml",
+                        sizeof(GtkHtml),
+                        sizeof(GtkHtmlClass),
+                        (GtkClassInitFunc) gtk_html_class_init,
+                        (GtkObjectInitFunc) gtk_html_init,
+                        NULL,
+                        NULL,
+                        NULL,
+                };
+                html_type = gtk_type_unique (GTK_TYPE_WIDGET, &html_info);
+        }
+        return html_type;
+}
+
+
+static void gtk_html_class_init (GtkHtmlClass *class)
+{
+        GtkObjectClass *object_class;
+        GtkWidgetClass *widget_class;
+
+        object_class = (GtkObjectClass *) class;
+        widget_class = (GtkWidgetClass *) class;
+        parent_class = gtk_type_class (GTK_TYPE_WIDGET);
+
+
+        gtk_object_add_arg_type("GtkHtml::hadjustment",
+                                GTK_TYPE_ADJUSTMENT,
+                                GTK_ARG_READWRITE | GTK_ARG_CONSTRUCT,
+                                ARG_HADJUSTMENT);
+        
+        gtk_object_add_arg_type("GtkHtml::vadjustment",
+                                GTK_TYPE_ADJUSTMENT,
+                                GTK_ARG_READWRITE | GTK_ARG_CONSTRUCT,
+                                ARG_VADJUSTMENT);
+
+        object_class->set_arg = gtk_html_set_arg;
+        object_class->get_arg = gtk_html_get_arg;
+        object_class->destroy = gtk_html_destroy;
+        object_class->finalize = gtk_html_finalize;
+
+        widget_class->realize = gtk_html_realize;
+        widget_class->unrealize = gtk_html_unrealize;
+        widget_class->style_set = gtk_html_style_set;
+        widget_class->draw_focus = gtk_html_draw_focus;
+        widget_class->size_request = gtk_html_size_request;
+        widget_class->size_allocate = gtk_html_size_allocate;
+        widget_class->draw = gtk_html_draw;
+        widget_class->expose_event = gtk_html_expose;
+        widget_class->button_press_event = gtk_html_button_press;
+        widget_class->button_release_event = gtk_html_button_release;
+	widget_class->motion_notify_event = gtk_html_motion_notify;
+	widget_class->leave_notify_event = gtk_html_leave_notify;
+        widget_class->selection_get = gtk_html_selection_get;
+	widget_class->selection_clear_event = gtk_html_selection_clear;
+	widget_class->key_press_event = gtk_html_key_press;
+	widget_class->visibility_notify_event = gtk_html_visibility_notify;
+	
+
+        widget_class->set_scroll_adjustments_signal =
+                gtk_signal_new ("set_scroll_adjustments",
+                                GTK_RUN_LAST,
+                                object_class->type,
+                                GTK_SIGNAL_OFFSET (GtkHtmlClass, set_scroll_adjustments),
+                                gtk_marshal_NONE__POINTER_POINTER,
+                                GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
+
+
+        class->set_scroll_adjustments = gtk_html_set_adjustments;
+
+}
+
+static void gtk_html_set_arg (GtkObject *object,
+                              GtkArg *arg,
+                              guint arg_id)
+{
+        GtkHtml *html;
+
+        html = GTK_HTML (object);
+
+        switch (arg_id) {
+        case ARG_HADJUSTMENT:
+                gtk_html_set_adjustments (html,
+                                          GTK_VALUE_POINTER (*arg),
+                                          html->vadj);
+                break;
+        case ARG_VADJUSTMENT:
+                gtk_html_set_adjustments (html,
+                                          html->hadj,
+                                          GTK_VALUE_POINTER (*arg));
+                break;
+        default:
+                break;
+        }
+}
+
+static void gtk_html_get_arg (GtkObject *object,
+                              GtkArg *arg,
+                              guint arg_id)
+{
+        GtkHtml *html;
+
+        html = GTK_HTML(object);
+
+        switch (arg_id) {
+        case ARG_HADJUSTMENT:
+                GTK_VALUE_POINTER (*arg) = html->hadj;
+                break;
+        case ARG_VADJUSTMENT:
+                GTK_VALUE_POINTER (*arg) = html->vadj;
+                break;
+        default:
+                arg->type = GTK_TYPE_INVALID;
+                break;
+        }
+}
+
+static void gtk_html_init (GtkHtml *html)
+{
+        static const GtkTargetEntry targets[] = {
+                { "STRING", 0, TARGET_STRING },
+                { "TEXT",   0, TARGET_TEXT },
+                { "COMPOUND_TEXT", 0, TARGET_COMPOUND_TEXT }
+        };
+
+        static const gint n_targets = sizeof(targets) / sizeof(targets[0]);
+
+        GTK_WIDGET_SET_FLAGS(html, GTK_CAN_FOCUS);
+
+        html->html_area = NULL;
+        html->hadj = NULL;
+        html->vadj = NULL;
+	html->current_x = 0;
+	html->current_y = 0;
+        html->start_sel = html->end_sel = NULL;
+        html->start_sel_x = html->start_sel_y = -1;
+        html->num_end = html->num_start = -1;
+        
+	html->html_bits = NULL;
+	html->urls = NULL;
+	html->selected_text = NULL;
+	html->tooltip_hb = NULL;
+	html->tooltip_timer = -1;
+	html->tooltip_window = NULL;
+        html->cursor_hb = NULL;
+	html->cursor_pos = 0;
+
+	html->pm = NULL;
+
+	html->editable = 0;
+	html->transparent = 0;
+
+        html->frozen = 0;
+	
+        gtk_selection_add_targets (GTK_WIDGET (html), GDK_SELECTION_PRIMARY,
+                                   targets, n_targets);
+
+
+        
+}
+
+
+GtkWidget *gtk_html_new (GtkAdjustment *hadj,
+                         GtkAdjustment *vadj)
+{
+        GtkWidget *html;
+
+        if (hadj)
+                g_return_val_if_fail (GTK_IS_ADJUSTMENT (hadj), NULL);
+        if (vadj)
+                g_return_val_if_fail (GTK_IS_ADJUSTMENT (vadj), NULL);
+
+        html = gtk_widget_new (GTK_TYPE_HTML,
+                               "hadjustment", hadj,
+                               "vadjustment", vadj,
+                               NULL);
+
+        return html;
+}
+
+
+void gtk_html_set_editable (GtkHtml *html,
+                            gboolean is_editable)
+{
+        g_return_if_fail (html != NULL);
+        g_return_if_fail (GTK_IS_HTML (html));
+  
+
+        html->editable = (is_editable != FALSE);
+
+        if (is_editable)
+                draw_cursor(html);
+        else
+                undraw_cursor(html);
+
+}
+
+void gtk_html_set_transparent( GtkHtml *html,
+                              gboolean is_transparent)
+{
+        GdkRectangle rect;
+        gint width, height;
+        GtkWidget *widget;
+
+        g_return_if_fail (html != NULL);
+        g_return_if_fail (GTK_IS_HTML (html));
+  
+
+        widget = GTK_WIDGET(html);
+        html->transparent = (is_transparent != FALSE);
+
+        if (!GTK_WIDGET_REALIZED(widget))
+                return;
+
+        html->bg_gc = NULL;
+        gdk_window_get_size (widget->window, &width, &height);
+        rect.x = 0;
+        rect.y = 0;
+        rect.width = width;
+        rect.height = height;
+        gdk_window_clear_area (widget->window, rect.x, rect.y, rect.width, rect.height);
+
+        expose_html (html, &rect, FALSE);
+        gtk_html_draw_focus ( (GtkWidget *) html);
+}
+
+
+void gtk_html_set_adjustments (GtkHtml       *html,
+                               GtkAdjustment *hadj,
+                               GtkAdjustment *vadj)
+{
+        g_return_if_fail (html != NULL);
+        g_return_if_fail (GTK_IS_HTML (html));
+        if (hadj)
+                g_return_if_fail (GTK_IS_ADJUSTMENT (hadj));
+        else
+                hadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
+        if (vadj)
+                g_return_if_fail (GTK_IS_ADJUSTMENT (vadj));
+        else
+                vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
+  
+        if (html->hadj && (html->hadj != hadj)) {
+                gtk_signal_disconnect_by_data (GTK_OBJECT (html->hadj), html);
+                gtk_object_unref (GTK_OBJECT (html->hadj));
+        }
+  
+        if (html->vadj && (html->vadj != vadj)) {
+                gtk_signal_disconnect_by_data (GTK_OBJECT (html->vadj), html);
+                gtk_object_unref (GTK_OBJECT (html->vadj));
+        }
+
+        if (html->hadj != hadj) {
+                html->hadj = hadj;
+                gtk_object_ref (GTK_OBJECT (html->hadj));
+                gtk_object_sink (GTK_OBJECT (html->hadj));
+      
+                gtk_signal_connect (GTK_OBJECT (html->hadj), "changed",
+                                    (GtkSignalFunc) gtk_html_adjustment,
+                                    html);
+                gtk_signal_connect (GTK_OBJECT (html->hadj), "value_changed",
+                                    (GtkSignalFunc) gtk_html_adjustment,
+                                    html);
+                gtk_signal_connect (GTK_OBJECT (html->hadj), "disconnect",
+                                    (GtkSignalFunc) gtk_html_disconnect,
+                                    html);
+                gtk_html_adjustment (hadj, html);
+        }
+  
+        if (html->vadj != vadj) {
+                html->vadj = vadj;
+                gtk_object_ref (GTK_OBJECT (html->vadj));
+                gtk_object_sink (GTK_OBJECT (html->vadj));
+
+                gtk_signal_connect (GTK_OBJECT (html->vadj), "changed",
+                                    (GtkSignalFunc) gtk_html_adjustment,
+                                    html);
+                gtk_signal_connect (GTK_OBJECT (html->vadj), "value_changed",
+                                    (GtkSignalFunc) gtk_html_adjustment,
+                                    html);
+                gtk_signal_connect (GTK_OBJECT (html->vadj), "disconnect",
+                                    (GtkSignalFunc) gtk_html_disconnect,
+                                    html);
+                gtk_html_adjustment (vadj, html);
+        }
+}
+
+
+
+GdkColor *get_color(int colorv, GdkColormap *map)
+{
+	GdkColor *color;
+#if 0	
+	fprintf(stdout,"color is %x\n",colorv);
+#endif									
+	color = (GdkColor *)g_new0(GdkColor, 1);
+	color->red = ((colorv & 0xff0000) >> 16) * 256;
+	color->green = ((colorv & 0xff00) >> 8) * 256;
+	color->blue = ((colorv & 0xff)) * 256;
+#if 0
+	fprintf(stdout,"Colors are %d, %d, %d\n",color->red, color->green, color->blue);
+#endif
+	gdk_color_alloc(map, color);
+	return color;
+}
+
+
+
+GdkFont *font_load(char *fmt, int size)
+{
+	char buf[256];
+	g_snprintf(buf, sizeof(buf), fmt, font_sizes[size]);
+	sprintf(debug_buff,"loading font %s\n",buf);
+	debug_print(debug_buff);
+	return gdk_font_load(buf);
+}
+
+
+GdkFont *getfont(int bold, int italic, int fixed, int size)
+{
+	if (size > MAX_SIZE) size = MAX_SIZE;
+	if (size < 1) size=1;
+	size--;
+	if (fixed) {
+		if (bold) {
+			if (italic) {
+				if (!fixed_bold_italic_font[size])
+					fixed_bold_italic_font[size] = font_load(FIXED_BOLD_ITALIC_FONT,size);
+				return fixed_bold_italic_font[size];
+					
+			} else {
+				if (!fixed_bold_font[size])
+					fixed_bold_font[size] = font_load (FIXED_BOLD_FONT,size);
+				return fixed_bold_font[size];
+			}
+		} else if (italic) {
+			if (!fixed_italic_font[size])
+				fixed_italic_font[size] = font_load(FIXED_ITALIC_FONT,size);
+				
+			return fixed_italic_font[size];
+		} else {
+			if (!fixed_font[size]) 
+				fixed_font[size] = font_load(FIXED_FONT,size);
+			return fixed_font[size];
+		}
+	} else {
+		if (bold) {
+			if (italic) {
+				if (!prop_bold_italic_font[size])
+					prop_bold_italic_font[size] = font_load(PROP_BOLD_ITALIC_FONT,size);
+				return prop_bold_italic_font[size];
+					
+			} else {
+				if (!prop_bold_font[size])
+					prop_bold_font[size] = font_load (PROP_BOLD_FONT,size);
+				return prop_bold_font[size];
+			}
+		} else if (italic) {
+			if (!prop_italic_font[size])
+				prop_italic_font[size] = font_load(PROP_ITALIC_FONT,size);
+				
+			return prop_italic_font[size];
+		} else {
+			if (!prop_font[size]) 
+				prop_font[size] = font_load(PROP_FONT,size);
+			return prop_font[size];
+		}
+	}
+}
+
+
+
+
+/* 'Borrowed' from ETerm */
+GdkWindow *get_desktop_window(GtkWidget *widget)
+{
+	GdkAtom prop, type, prop2;
+        int format;
+        gint length;
+        guchar *data;
+	GtkWidget *w;
+
+        prop = gdk_atom_intern("_XROOTPMAP_ID", 1);
+        prop2 = gdk_atom_intern("_XROOTCOLOR_PIXEL", 1);
+
+        if (prop == None && prop2 == None) {
+                return NULL;
+        }
+
+
+	
+	for (w = widget; w; w = w->parent) {
+
+		if (prop != None) {
+			gdk_property_get(w->window, prop, AnyPropertyType, 0L, 1L, 0,
+					 &type, &format, &length, &data);
+		} else if (prop2 != None) {
+			gdk_property_get(w->window, prop2, AnyPropertyType, 0L, 1L, 0,
+					 &type, &format, &length, &data);
+		} else {
+			continue;
+		}
+		if (type != None) {
+			return (w->window);
+		}
+	}
+
+	return NULL;
+
+}
+
+
+
+GdkPixmap *get_desktop_pixmap(GtkWidget *widget)
+{
+        GdkPixmap *p;
+        GdkAtom prop, type, prop2;
+        int format;
+        gint length;
+        guint32 id;
+        guchar *data;
+
+        prop = gdk_atom_intern("_XROOTPMAP_ID", 1);
+        prop2 = gdk_atom_intern("_XROOTCOLOR_PIXEL", 1);
+
+
+        if (prop == None && prop2 == None) {
+                return NULL;
+        }
+
+        if (prop != None) {
+                gdk_property_get(get_desktop_window(widget), prop, AnyPropertyType, 0L, 1L, 0,
+                                 &type, &format, &length, &data);
+                if (type == XA_PIXMAP) {
+			id = data[0];
+			id += data[1] << 8;
+			id += data[2] << 16;
+			id += data[3] << 24;
+                        p = gdk_pixmap_foreign_new(id);
+                        return p;
+                }
+        }
+        if (prop2 != None) {
+/*                XGetWindowProperty(Xdisplay, desktop_window, prop2, 0L, 1L, False, AnyPropertyType,
+                                   &type, &format, &length, &after, &data);*/
+/*                if (type == XA_CARDINAL) {*/
+                        /*     D_PIXMAP(("  Solid color not yet supported.\n"));*/
+/*                        return NULL;
+                }*/
+        }
+        /*        D_PIXMAP(("No suitable attribute found.\n"));*/
+        return NULL;
+}
+
+
+static void clear_focus_area (GtkHtml *html,
+                              gint area_x,
+                              gint area_y,
+                              gint area_width,
+                              gint area_height)
+{
+        GtkWidget *widget = GTK_WIDGET (html);
+	gint x, y;
+  
+        gint ythick = BORDER_WIDTH + widget->style->klass->ythickness;
+        gint xthick = BORDER_WIDTH + widget->style->klass->xthickness;
+  
+        gint width, height;
+        
+        if (html->frozen > 0)
+        	return;
+
+	if (html->transparent) {
+		if (html->pm == NULL)
+			html->pm = get_desktop_pixmap(widget);
+
+                if (html->pm == NULL)
+                        return;
+
+		if (html->bg_gc == NULL) {
+			GdkGCValues values;
+
+                        values.tile = html->pm;
+                        values.fill = GDK_TILED;
+
+                        html->bg_gc = gdk_gc_new_with_values (html->html_area, &values,
+                                                       GDK_GC_FILL | GDK_GC_TILE);
+
+                }
+
+                gdk_window_get_deskrelative_origin(widget->window, &x, &y);
+
+		gdk_draw_pixmap(widget->window, html->bg_gc, html->pm,
+				x + area_x, y + area_y, area_x, area_y, area_width,
+				area_height);
+
+		
+        } else {
+                gdk_window_get_size (widget->style->bg_pixmap[GTK_STATE_NORMAL], &width, &height);
+
+                gdk_gc_set_ts_origin (html->bg_gc,
+                                      (- html->xoffset + xthick) % width,
+                                      (- html->yoffset + ythick) % height);
+
+                gdk_draw_rectangle (widget->window, html->bg_gc, TRUE,
+                                    area_x, area_y, area_width, area_height);
+        }
+}
+
+static void gtk_html_draw_focus (GtkWidget *widget)
+{
+        GtkHtml *html;
+        gint width, height;
+        gint x, y;
+
+        g_return_if_fail (widget != NULL);
+        g_return_if_fail (GTK_IS_HTML (widget));
+  
+        html = GTK_HTML (widget);
+  
+        if (GTK_WIDGET_DRAWABLE (widget)) {
+                gint ythick = widget->style->klass->ythickness;
+                gint xthick = widget->style->klass->xthickness;
+                gint xextra = BORDER_WIDTH;
+                gint yextra = BORDER_WIDTH;
+      
+                x = 0;
+                y = 0;
+                width = widget->allocation.width;
+                height = widget->allocation.height;
+      
+                if (GTK_WIDGET_HAS_FOCUS (widget)) {
+                        x += 1;
+                        y += 1;
+                        width -=  2;
+                        height -= 2;
+                        xextra -= 1;
+                        yextra -= 1;
+
+                        gtk_paint_focus (widget->style, widget->window,
+                                         NULL, widget, "text",
+                                         0, 0,
+                                         widget->allocation.width - 1,
+                                         widget->allocation.height - 1);
+                }
+
+                gtk_paint_shadow (widget->style, widget->window,
+                                  GTK_STATE_NORMAL, GTK_SHADOW_IN,
+                                  NULL, widget, "text",
+                                  x, y, width, height);
+
+                x += xthick;
+                y += ythick;
+                width -= 2 * xthick;
+                height -= 2 * ythick;
+
+
+                if (widget->style->bg_pixmap[GTK_STATE_NORMAL] || html->transparent) {
+                        /* top rect */
+                        clear_focus_area (html, x, y, width, yextra);
+                        /* left rect */
+                        clear_focus_area (html, x, y + yextra,
+                                          xextra, y + height - 2 * yextra);
+                        /* right rect */
+                        clear_focus_area (html, x + width - xextra, y + yextra,
+                                          xextra, height - 2 * ythick);
+                        /* bottom rect */
+                        clear_focus_area (html, x, x + height - yextra, width, yextra);
+                }
+        }
+}
+
+static void gtk_html_size_request (GtkWidget      *widget,
+                                   GtkRequisition *requisition)
+{
+        gint xthickness;
+        gint ythickness;
+        gint char_height;
+        gint char_width;
+
+        g_return_if_fail (widget != NULL);
+        g_return_if_fail (GTK_IS_HTML (widget));
+        g_return_if_fail (requisition != NULL);
+  
+        xthickness = widget->style->klass->xthickness + BORDER_WIDTH;
+        ythickness = widget->style->klass->ythickness + BORDER_WIDTH;
+  
+        char_height = MIN_HTML_HEIGHT_LINES * (widget->style->font->ascent +
+                                               widget->style->font->descent);
+  
+        char_width = MIN_HTML_WIDTH_LINES * (gdk_text_width (widget->style->font,
+                                                             "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
+                                                             26) / 26);
+  
+        requisition->width  = char_width  + xthickness * 2;
+        requisition->height = char_height + ythickness * 2;
+}
+
+static void gtk_html_size_allocate (GtkWidget     *widget,
+                                    GtkAllocation *allocation)
+{
+        GtkHtml *html;
+  
+        g_return_if_fail (widget != NULL);
+        g_return_if_fail (GTK_IS_HTML (widget));
+        g_return_if_fail (allocation != NULL);
+
+	html = GTK_HTML(widget);
+
+        widget->allocation = *allocation;
+        if (GTK_WIDGET_REALIZED (widget)) {
+                gdk_window_move_resize (widget->window,
+                                        allocation->x, allocation->y,
+                                        allocation->width, allocation->height);
+      
+                gdk_window_move_resize (html->html_area,
+                              widget->style->klass->xthickness + BORDER_WIDTH,
+                              widget->style->klass->ythickness + BORDER_WIDTH,
+                                        MAX (1, (gint)widget->allocation.width -
+                                             (gint)(widget->style->klass->xthickness +
+                                                    (gint)BORDER_WIDTH) * 2),
+                                        MAX (1, (gint)widget->allocation.height -
+                                             (gint)(widget->style->klass->ythickness +
+                                                    (gint)BORDER_WIDTH) * 2));
+
+                resize_html(html);
+        }
+}
+
+static void gtk_html_draw (GtkWidget    *widget,
+                           GdkRectangle *area)
+{
+        g_return_if_fail (widget != NULL);
+        g_return_if_fail (GTK_IS_HTML (widget));
+        g_return_if_fail (area != NULL);
+  
+        if (GTK_WIDGET_DRAWABLE (widget))
+        {
+                expose_html (GTK_HTML(widget), area, TRUE);
+                gtk_widget_draw_focus (widget);
+        }
+}
+
+
+static gint gtk_html_expose (GtkWidget *widget,
+                             GdkEventExpose *event)
+{
+        GtkHtml *html;
+        
+        g_return_val_if_fail (widget != NULL, FALSE);
+        g_return_val_if_fail (GTK_IS_HTML (widget), FALSE);
+        g_return_val_if_fail (event != NULL, FALSE);
+
+        html = GTK_HTML(widget);
+  
+        if (event->window == html->html_area) {
+                expose_html(html, &event->area, TRUE);
+        } else if (event->count == 0) {
+                gtk_widget_draw_focus (widget);
+        }
+  
+        return FALSE;
+
+}
+
+
+static gint gtk_html_selection_clear (GtkWidget         *widget,
+                                      GdkEventSelection *event)
+{
+        GtkHtml *html;
+        
+        g_return_val_if_fail (widget != NULL, FALSE);
+        g_return_val_if_fail (GTK_IS_HTML (widget), FALSE);
+        g_return_val_if_fail (event != NULL, FALSE);
+  
+        /* Let the selection handling code know that the selection
+         * has been changed, since we've overriden the default handler */
+        if (!gtk_selection_clear (widget, event))
+                return FALSE;
+  
+        html = GTK_HTML (widget);
+  
+        if (event->selection == GDK_SELECTION_PRIMARY) {
+                if (html->selected_text) {
+                        GList *hbits = html->html_bits;
+                        GtkHtmlBit *hb;
+                        
+			g_free(html->selected_text);
+			html->selected_text = NULL;
+			html->start_sel = NULL;
+			html->end_sel = NULL;
+			html->num_start = 0;
+			html->num_end = 0;
+			while(hbits) {
+				hb = (GtkHtmlBit *)hbits->data;
+				if (hb->was_selected)
+					gtk_html_draw_bit(html, hb, 1);
+				hbits = hbits->prev;
+			}
+			hbits = g_list_last(html->html_bits);
+		}
+        }
+
+        return TRUE;
+}
+
+
+
+static void gtk_html_selection_get (GtkWidget *widget,
+                                    GtkSelectionData  *selection_data,
+                                    guint sel_info,
+                                    guint32 time)
+{
+	gchar *str;
+        gint len;
+        GtkHtml *html;
+
+        g_return_if_fail (widget != NULL);
+        g_return_if_fail (GTK_IS_HTML (widget));
+
+        html = GTK_HTML(widget);
+
+        
+	if (selection_data->selection != GDK_SELECTION_PRIMARY)
+		return;
+
+	str = html->selected_text;
+
+	if (!str)
+		return;
+	
+	len = strlen(str);
+
+	if (sel_info == TARGET_STRING) {
+		gtk_selection_data_set(selection_data,
+				       GDK_SELECTION_TYPE_STRING,
+				       8*sizeof(gchar), (guchar *)str, len);
+	} else if ((sel_info == TARGET_TEXT) || (sel_info == TARGET_COMPOUND_TEXT)) {
+		guchar *text;
+		GdkAtom encoding;
+		gint format;
+		gint new_length;
+
+		gdk_string_to_compound_text (str, &encoding, &format, &text, &new_length);
+		gtk_selection_data_set (selection_data, encoding, format, text, new_length);
+		gdk_free_compound_text (text);
+	}
+
+
+
+}
+
+static void do_select(GtkHtml *html,
+                      int x,
+                      int y)
+{
+	GList *hbits = g_list_last(html->html_bits);
+	int epos, spos;
+	GtkHtmlBit *hb;
+	
+	if (!hbits)
+		return;
+	
+        hb = (GtkHtmlBit *)hbits->data;
+
+        while (hbits) {
+                hb = (GtkHtmlBit *)hbits->data;
+                if (hb->type == HTML_BIT_TEXT)
+			break;
+		hbits = hbits->prev;
+        }
+        
+	if (!hb)
+                return;
+
+
+	if (y > hb->y) {
+		html->num_end = strlen(hb->text) - 1;
+		html->end_sel = hb;
+	} else if (y < 0) {
+		html->num_end = 0;
+		html->end_sel = (GtkHtmlBit *)html->html_bits->data;
+	} else 	while(hbits) {
+		hb = (GtkHtmlBit *)hbits->data;
+		if ((y < hb->y && y > (hb->y - hb->height)) &&
+		    (x > hb->x + hb->width)) {
+			if (hb->type != HTML_BIT_TEXT) {
+				html->num_end = 0;
+				html->end_sel = hb;
+				break;
+			}
+
+			html->num_end = strlen(hb->text) - 1;
+			html->end_sel = hb;
+			break;
+		} else if ((x > hb->x && x < (hb->x + hb->width)) &&
+			   (y < hb->y && y > (hb->y - hb->height))) {
+			int i, len;
+			int w = x - hb->x;
+
+			if (hb->type != HTML_BIT_TEXT) {
+				html->num_end = 0;
+				html->end_sel = hb;
+				break;
+			}
+
+                        len = strlen(hb->text);
+                        
+			for (i=1; i<=len; i++) {
+				if (gdk_text_measure(hb->font, hb->text, i) > w) {
+					html->num_end = i - 1;
+					html->end_sel = hb;
+					break;
+				}
+			}
+			break;
+		}
+		hbits = hbits->prev;
+	}
+
+	if (html->end_sel == NULL)
+		return;
+	if (html->start_sel == NULL) {
+		html->start_sel = html->end_sel;
+		html->num_start = html->num_end;
+	}
+	
+	epos = g_list_index(html->html_bits, html->end_sel);
+	spos = g_list_index(html->html_bits, html->start_sel);
+	g_free(html->selected_text);
+	html->selected_text = NULL;
+
+	if (epos == spos) {
+		char *str;
+		if (html->start_sel->type != HTML_BIT_TEXT) {
+			html->selected_text = NULL;
+			return;
+		}
+		if (html->num_end == html->num_start) {
+			str = g_malloc(2);
+                        if (strlen(html->start_sel->text))
+				str[0] = html->start_sel->text[html->num_end];
+			else
+                                str[0] = 0;
+			str[1] = 0;
+			gtk_html_draw_bit(html, html->start_sel, 0);
+			html->selected_text = str;
+		} else {
+			int st, en;
+			char *str;
+			if (html->num_end > html->num_start) {
+				en = html->num_end;
+				st = html->num_start;
+			} else {
+				en = html->num_start;
+				st = html->num_end;
+			}
+
+			str = g_malloc(en - st + 2);
+			strncpy(str, html->start_sel->text + st, (en - st + 1));
+			str[en - st + 1] = 0;
+                        gtk_html_draw_bit(html, html->start_sel, 0);
+			html->selected_text = str;
+			
+		}
+	} else {
+		GtkHtmlBit *shb, *ehb;
+		int en, st;
+		int len, nlen;
+		char *str;
+		if (epos > spos) {
+			shb = html->start_sel;
+			ehb = html->end_sel;
+			en = html->num_end;
+			st = html->num_start;
+		} else {
+			shb = html->end_sel;
+			ehb = html->start_sel;
+			en = html->num_start;
+			st = html->num_end;
+		}
+		
+		hbits = g_list_find(html->html_bits, shb);
+
+		if (!hbits)
+			return;
+		
+		if (shb->type == HTML_BIT_TEXT) {
+			len = strlen(shb->text) - st + 1;
+			str = g_malloc(len);
+			strcpy(str, shb->text + st);
+			str[len - 1] = 0;
+			gtk_html_draw_bit(html, shb, 0);
+			if (shb->newline) {
+				len+= 1;
+				str = g_realloc(str, len);
+				str[len - 2] = '\n';
+				str[len - 1] = 0;
+			}
+		} else {
+			len = 1;
+			str = g_malloc(1);
+			str[0] = 0;
+		}
+		if (hbits->next == NULL) {
+			html->selected_text = str;
+			return;
+		}
+
+		
+                hbits = hbits->next;
+		while(1) { /* Yah I know is dangerous :P */
+			hb = (GtkHtmlBit *)hbits->data;
+			if (hb->type != HTML_BIT_TEXT) {
+				if (hb == ehb)
+					break;
+				hbits = hbits->next;
+				continue;
+			}
+			if (hb != ehb) {
+				nlen = len + strlen(hb->text);
+				str = g_realloc(str, nlen);
+				strcpy(str + (len - 1), hb->text);
+				len = nlen;
+				str[len - 1] = 0;
+				gtk_html_draw_bit(html, hb, 0);
+				if (hb->newline) {
+					len+= 1;
+					str = g_realloc(str, len);
+					str[len - 2] = '\n';
+					str[len - 1] = 0;
+				}
+			} else {
+				nlen = len + en + 1;
+				str = g_realloc(str, nlen);
+				strncpy(str + (len - 1), hb->text, en + 1);
+				len = nlen;
+				str[len - 1] = 0;
+				
+				gtk_html_draw_bit(html, hb, 0);
+				if (hb->newline && en == strlen(hb->text)) {
+					len+= 1;
+					str = g_realloc(str, len);
+					str[len - 2] = '\n';
+					str[len - 1] = 0;
+				}
+				break;
+			}
+			hbits = hbits->next;
+		}
+		html->selected_text = str;
+	}
+
+}
+
+static gint
+scroll_timeout(GtkHtml *html)
+{
+        GdkEventMotion event;
+        gint x, y;
+        GdkModifierType mask;
+
+	html->timer = 0;
+	gdk_window_get_pointer (html->html_area, &x, &y, &mask);
+  
+	if (mask & GDK_BUTTON1_MASK)
+	{
+		event.is_hint = 0;
+		event.x = x;
+		event.y = y;
+		event.state = mask;
+
+                gtk_html_motion_notify (GTK_WIDGET (html), &event);
+	}
+
+	return FALSE;
+
+}
+
+
+static gint gtk_html_tooltip_paint_window(GtkHtml *html)
+{
+	GtkStyle *style;
+	gint y, baseline_skip, gap;
+
+	style = html->tooltip_window->style;
+
+	gap = (style->font->ascent + style->font->descent) / 4;
+	if (gap < 2)
+		gap = 2;
+	baseline_skip = style->font->ascent + style->font->descent + gap;
+
+	if (!html->tooltip_hb)
+		return FALSE;
+
+	gtk_paint_flat_box(style, html->tooltip_window->window,
+			   GTK_STATE_NORMAL, GTK_SHADOW_OUT,
+			   NULL, GTK_WIDGET(html->tooltip_window), "tooltip",
+			   0, 0, -1, -1);
+
+	y = style->font->ascent + 4;
+
+	gtk_paint_string (style, html->tooltip_window->window,
+			  GTK_STATE_NORMAL,
+			  NULL, GTK_WIDGET(html->tooltip_window), "tooltip",
+			  4, y, "HTML Link:");
+	y += baseline_skip;
+	gtk_paint_string (style, html->tooltip_window->window,
+			  GTK_STATE_NORMAL,
+			  NULL, GTK_WIDGET(html->tooltip_window), "tooltip",
+			  4, y, html->tooltip_hb->url);
+	
+	return FALSE;
+
+
+}
+
+static gint gtk_html_tooltip_timeout(gpointer data)
+{
+	GtkHtml *html = (GtkHtml *)data;
+
+	
+	GDK_THREADS_ENTER();
+
+	if (html->tooltip_hb && GTK_WIDGET_DRAWABLE(GTK_WIDGET(html))) {
+		GtkWidget *widget;
+		GtkStyle *style;
+		gint gap, x, y, w, h, scr_w, scr_h, baseline_skip;
+
+		if (html->tooltip_window)
+			gtk_widget_destroy(html->tooltip_window);
+		
+		html->tooltip_window = gtk_window_new (GTK_WINDOW_POPUP);
+		gtk_widget_set_app_paintable (html->tooltip_window, TRUE);
+		gtk_window_set_policy (GTK_WINDOW (html->tooltip_window), FALSE, FALSE, TRUE);
+		gtk_widget_set_name (html->tooltip_window, "gtk-tooltips");
+		gtk_signal_connect_object (GTK_OBJECT (html->tooltip_window),
+					   "expose_event",
+					   GTK_SIGNAL_FUNC (gtk_html_tooltip_paint_window),
+					   GTK_OBJECT (html));
+		gtk_signal_connect_object (GTK_OBJECT (html->tooltip_window),
+					   "draw",
+					   GTK_SIGNAL_FUNC (gtk_html_tooltip_paint_window),
+					   GTK_OBJECT (html));
+		
+		gtk_widget_ensure_style (html->tooltip_window);
+		style = html->tooltip_window->style;
+  
+		widget = GTK_WIDGET(html);
+
+		scr_w = gdk_screen_width ();
+		scr_h = gdk_screen_height ();
+
+		gap = (style->font->ascent + style->font->descent) / 4;
+		if (gap < 2)
+			gap = 2;
+		baseline_skip = style->font->ascent + style->font->descent + gap;
+
+		w = 8 + MAX(gdk_string_width(style->font, "HTML Link:"),
+			    gdk_string_width(style->font, html->tooltip_hb->url));
+					     ;
+		h = 8 - gap;
+      		h += (baseline_skip * 2);
+
+		gdk_window_get_pointer (NULL, &x, &y, NULL);
+		/*gdk_window_get_origin (widget->window, NULL, &y);*/
+		if (GTK_WIDGET_NO_WINDOW (widget))
+			y += widget->allocation.y;
+
+		x -= ((w >> 1) + 4);
+
+		if ((x + w) > scr_w)
+			x -= (x + w) - scr_w;
+		else if (x < 0)
+			x = 0;
+
+		if ((y + h + 4) > scr_h)
+			y = y - html->tooltip_hb->font->ascent + html->tooltip_hb->font->descent;
+		else
+			y = y + html->tooltip_hb->font->ascent + html->tooltip_hb->font->descent;
+
+		gtk_widget_set_usize (html->tooltip_window, w, h);
+		gtk_widget_popup (html->tooltip_window, x, y);
+		
+	}
+
+	html->tooltip_timer = -1;
+	
+	GDK_THREADS_LEAVE();
+
+	return FALSE;
+}
+
+
+static gint gtk_html_leave_notify (GtkWidget      *widget,
+                                    GdkEventCrossing *event)
+{
+       GtkHtml *html;
+
+       html = GTK_HTML(widget);
+
+       if (html->tooltip_timer != -1)
+	       gtk_timeout_remove(html->tooltip_timer);
+       if (html->tooltip_window) {
+	       gtk_widget_destroy(html->tooltip_window);
+	       html->tooltip_window = NULL;
+       }
+
+
+       html->tooltip_hb = NULL;
+       return TRUE;
+}
+
+
+static gint gtk_html_motion_notify (GtkWidget *widget,
+                                    GdkEventMotion *event)
+{
+        int x, y;
+        gint width, height;
+        GdkModifierType state;
+        int realx, realy;
+        GtkHtml *html = GTK_HTML(widget);
+
+        if (event->is_hint)
+                gdk_window_get_pointer (event->window, &x, &y, &state);
+        else
+        {
+                x = event->x;
+                y = event->y;
+                state = event->state;
+        }
+
+        gdk_window_get_size(html->html_area, &width, &height);
+        
+	realx = x;
+	realy = y + html->yoffset;
+
+
+	if (state & GDK_BUTTON1_MASK) {
+		if (realx != html->start_sel_x || realy != html->start_sel_y) {
+			char *tmp = NULL;
+
+			if (y < 0 || y > height) {
+				int diff;
+				if (html->timer == 0) {
+					html->timer = gtk_timeout_add(100,
+								    (GtkFunction)scroll_timeout,
+								    html);
+					if (y < 0)
+						diff = y / 2;
+					else
+						diff = (y - height) / 2;
+
+					if (html->vadj->value + diff >
+					    html->vadj->upper - height + 20)
+						gtk_adjustment_set_value(html->vadj,
+									 html->vadj->upper - height + 20);
+					else
+						gtk_adjustment_set_value(html->vadj,
+									 html->vadj->value + diff);
+
+				}
+			}
+			
+			if (html->selected_text != NULL)
+				tmp = g_strdup(html->selected_text);
+			do_select(html, realx, realy);
+			if (tmp) {
+				if (!html->selected_text || strcmp(tmp, html->selected_text)) {
+					GtkHtmlBit *hb;
+					GList *hbits = html->html_bits;
+					while(hbits) {
+						hb = (GtkHtmlBit *)hbits->data;
+						if (hb->was_selected)
+							gtk_html_draw_bit(html, hb, 0);
+						hbits = hbits->next;
+					}
+				}
+				g_free(tmp);
+			}
+		}
+	} else {
+		GtkHtmlBit *hb;
+		GList *urls;
+
+		urls = html->urls;
+		while(urls) {
+                        hb = (GtkHtmlBit *)urls->data;
+			if ((realx > hb->x && realx < (hb->x + hb->width)) &&
+			    (realy < hb->y && realy > (hb->y - hb->height))) {
+				if (html->tooltip_hb != hb) {
+					html->tooltip_hb = hb;
+					if (html->tooltip_timer != -1)
+						gtk_timeout_remove(html->tooltip_timer);
+					if (html->tooltip_window) {
+						gtk_widget_destroy(html->tooltip_window);
+						html->tooltip_window = NULL;
+					}
+					html->tooltip_timer = gtk_timeout_add(HTML_TOOLTIP_DELAY, gtk_html_tooltip_timeout, html);
+				}
+				gdk_window_set_cursor(html->html_area, gdk_cursor_new(GDK_HAND2));
+				return TRUE;
+			}
+                        urls = urls->next;
+		}
+		if (html->tooltip_timer != -1)
+			gtk_timeout_remove(html->tooltip_timer);
+		if (html->tooltip_window) {
+			gtk_widget_destroy(html->tooltip_window);
+			html->tooltip_window = NULL;
+		}
+			
+			
+                html->tooltip_hb = NULL;
+		gdk_window_set_cursor(html->html_area, NULL);
+
+
+	}
+
+	return TRUE;
+}
+
+static gint gtk_html_button_release (GtkWidget *widget,
+                                     GdkEventButton *event)
+{
+        GtkHtml *html;
+
+        html = GTK_HTML(widget);
+
+        if (html->frozen > 0)
+                return TRUE;
+        
+        if (event->button == 1) {
+                int realx, realy;
+                GtkHtmlBit *hb;
+                GList *urls = html->urls;
+
+                realx = event->x;
+                realy = event->y + html->yoffset;
+                if (realx != html->start_sel_x || realy != html->start_sel_y) {
+			if (gtk_selection_owner_set (widget,
+						 GDK_SELECTION_PRIMARY,
+                                                     event->time)) {
+                        } else {
+                        }
+		} else {
+			if (gdk_selection_owner_get(GDK_SELECTION_PRIMARY) == widget->window)
+				gtk_selection_owner_set(NULL, GDK_SELECTION_PRIMARY,
+					 event->time);
+
+		
+			while(urls) {
+				hb = (GtkHtmlBit *)urls->data;
+				if ((realx > hb->x && realx < (hb->x + hb->width)) &&
+                                    (realy < hb->y && realy > (hb->y - hb->height))) {
+                                        if (web_browser == BROWSER_NETSCAPE &&
+                                           (general_options & OPT_GEN_BROWSER_POPUP))
+                                                open_url_nw(NULL, hb->url);
+                                        else
+                                                open_url(NULL, hb->url);
+					break;
+				}
+				urls = urls->next;
+			}
+		}
+	}
+	return TRUE;
+}
+
+
+
+static gint gtk_html_button_press (GtkWidget *widget,
+                            GdkEventButton *event)
+{
+        GtkHtml *html;
+        gfloat value;
+
+
+        html = GTK_HTML(widget);
+        value = html->vadj->value;
+
+        if (html->frozen > 0)
+                return TRUE;
+	
+	if (event->button == 4) {
+		value -= html->vadj->step_increment;
+		if (value < html->vadj->lower)
+			value = html->vadj->lower;
+		gtk_adjustment_set_value(html->vadj,
+					 value);
+	} else if (event->button == 5) {
+		value += html->vadj->step_increment;
+		if (value > html->vadj->upper)
+			value = html->vadj->upper;
+		gtk_adjustment_set_value(html->vadj,
+					 value);
+
+        } else if (event->button == 1) {
+                GList *hbits = g_list_last(html->html_bits);
+		int realx, realy;
+		GtkHtmlBit *hb;
+
+		realx = event->x;
+		realy = event->y + html->yoffset;
+
+		html->start_sel_x = realx;
+		html->start_sel_y = realy;
+
+		if (!hbits)
+			return TRUE;
+
+		if (html->selected_text) {
+			g_free(html->selected_text);
+			html->selected_text = NULL;
+			html->start_sel = NULL;
+			html->end_sel = NULL;
+			html->num_start = 0;
+			html->num_end = 0;
+			while(hbits) {
+				hb = (GtkHtmlBit *)hbits->data;
+				if (hb->was_selected)
+					gtk_html_draw_bit(html, hb, 1);
+				hbits = hbits->prev;
+			}
+			hbits = g_list_last(html->html_bits);
+		}
+
+                hb = (GtkHtmlBit *)hbits->data;
+		if (realy > hb->y) {
+			if (hb->text)
+				html->num_start = strlen(hb->text) - 1;
+			else
+                                html->num_start = 0;
+			html->start_sel = hb;
+		} else 	while(hbits) {
+			hb = (GtkHtmlBit *)hbits->data;
+			if ((realy < hb->y && realy > (hb->y - hb->height)) &&
+			    (realx > hb->x + hb->width)) {
+				if (hb->type != HTML_BIT_TEXT) {
+					html->num_end = 0;
+					html->end_sel = hb;
+					break;
+				}
+
+                                if (hb->text)
+					html->num_start = strlen(hb->text) - 1;
+				else
+                                        html->num_start = 0;
+                                
+				html->start_sel = hb;
+				break;
+			} else if ((realx > hb->x && realx < (hb->x + hb->width)) &&
+				   (realy < hb->y && realy > (hb->y - hb->height))) {
+				int i, len;
+				int w = realx - hb->x;
+
+				if (hb->type != HTML_BIT_TEXT) {
+					html->num_end = 0;
+					html->end_sel = hb;
+					break;
+				}
+
+				if (hb->text)
+					len = strlen(hb->text);
+				else
+					len = 0;
+				
+				for (i=1; i<=len; i++) {
+					if (gdk_text_measure(hb->font, hb->text, i) > w) {
+						html->num_start = i - 1;
+						html->start_sel = hb;
+						break;
+					}
+				}
+				break;
+			}
+			hbits = hbits->prev;
+                }
+	} else if (event->button == 3 && event->type == GDK_BUTTON_PRESS) {
+		GtkHtmlBit *hb = NULL;
+		int realx, realy;
+	        GList *urls;
+	                                
+		realx = event->x;
+		realy = event->y + html->yoffset;
+		                                                                
+		urls = html->urls;
+		while(urls) {
+                        hb = (GtkHtmlBit *)urls->data;
+			if ((realx > hb->x && realx < (hb->x + hb->width)) &&
+			    (realy < hb->y && realy > (hb->y - hb->height))) {
+				break;
+			}
+                        urls = urls->next;
+			hb = NULL;
+		}
+		
+		if (hb != NULL) {
+		        GtkWidget *menu, *button;
+	
+        	        menu = gtk_menu_new();
+
+                        if (web_browser == BROWSER_NETSCAPE) {
+                        
+                                button = gtk_menu_item_new_with_label("Open URL in existing window");
+                                gtk_signal_connect(GTK_OBJECT(button), "activate",
+                                                   GTK_SIGNAL_FUNC(open_url), hb->url);
+                                gtk_menu_append(GTK_MENU(menu), button);
+                                gtk_widget_show(button);
+
+                        }
+
+	
+                        button = gtk_menu_item_new_with_label("Open URL in new window");
+                        gtk_signal_connect(GTK_OBJECT(button), "activate",
+                                           GTK_SIGNAL_FUNC(open_url_nw), hb->url);
+                        gtk_menu_append(GTK_MENU(menu), button);
+                        gtk_widget_show(button);
+
+                        if (web_browser == BROWSER_NETSCAPE) {
+
+                                button = gtk_menu_item_new_with_label("Add URL as bookmark");
+                                gtk_signal_connect(GTK_OBJECT(button), "activate",
+                                                   GTK_SIGNAL_FUNC(add_bookmark), hb->url);
+                                gtk_menu_append(GTK_MENU(menu), button);
+                                gtk_widget_show(button);
+
+                        }
+                	
+	                gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
+                                       event->button, event->time);                	
+		}		
+	}
+	
+	return TRUE;
+}
+
+
+static void gtk_html_draw_bit(GtkHtml *html,
+                              GtkHtmlBit *hb,
+                              int redraw)
+{
+        int mypos, epos, spos;
+        GdkGC *gc = html->gc;
+	int shift;
+        GtkStateType selected_state;
+        GtkWidget *widget = GTK_WIDGET(html);
+	GdkRectangle area;
+
+	if (html->frozen > 0)
+		return;
+
+	if (hb->type == HTML_BIT_TEXT) {
+
+		if (!strlen(hb->text))
+			return;
+		
+		mypos = g_list_index(html->html_bits, hb);
+		epos = g_list_index(html->html_bits, html->end_sel);
+		spos = g_list_index(html->html_bits, html->start_sel);
+
+                if (((html->end_sel == NULL) || (html->start_sel == NULL)) ||
+                    ((epos < mypos) && (spos < mypos)) ||
+                    ((epos > mypos) && (spos > mypos))) {
+                        selected_state = GTK_STATE_NORMAL;
+		} else {
+			selected_state = GTK_STATE_SELECTED;
+		}
+
+
+		gdk_text_extents(hb->font, hb->text, 1, &shift, NULL, NULL, NULL, NULL);
+
+                if (selected_state == GTK_STATE_SELECTED) {
+                        int schar = 0, echar = 0;
+			int startx = 0, xwidth = 0;
+
+                        if (epos > spos ||
+                            (epos == spos && html->num_end >= html->num_start)) {
+				if (mypos == epos) {
+					echar = html->num_end;
+					xwidth = gdk_text_measure(hb->font, hb->text, html->num_end + 1);
+				} else {
+					echar = strlen(hb->text);
+					xwidth = hb->width;
+				}
+				if (mypos == spos) {
+					schar = html->num_start;
+					startx = gdk_text_measure(hb->font, hb->text, html->num_start);
+					xwidth -= startx;
+				}
+			} else {
+				if (mypos == spos) {
+					echar = html->num_start;
+					xwidth = gdk_text_measure(hb->font, hb->text, html->num_start + 1);
+				} else {
+					echar = strlen(hb->text);
+					xwidth = hb->width;
+				}
+				if (mypos == epos) {
+					schar = html->num_end;
+					startx = gdk_text_measure(hb->font, hb->text, html->num_end);
+					xwidth -= startx;
+				}
+			}
+
+			if (!redraw && echar == hb->sel_e && schar == hb->sel_s)
+				return;
+				
+			hb->sel_e = echar;
+			hb->sel_s = schar;
+			
+			startx += hb->x;
+
+
+                        area.x = hb->x - html->xoffset;
+                        area.y = hb->y - hb->height + 3 - html->yoffset;
+                        area.width = hb->width+2;
+                        area.height = hb->height;
+                        clear_area (html, &area);
+
+			gtk_paint_flat_box (widget->style, html->html_area,
+					    selected_state, GTK_SHADOW_NONE,
+					    NULL, widget, "text",
+					    startx,
+					    hb->y - hb->height + 3 - html->yoffset,
+					    xwidth+2, hb->height);
+                        hb->was_selected = 1;
+                } else if (hb->was_selected) {
+                        area.x = hb->x - html->xoffset;
+                        area.y = hb->y - hb->height + 3 - html->yoffset;
+                        area.width = hb->width+2;
+                        area.height = hb->height;
+                        clear_area (html, &area);
+
+                        hb->sel_e = -1;
+                        hb->sel_s = -1;
+			
+			hb->was_selected = 0;
+		}
+		
+		
+
+
+                if (selected_state == GTK_STATE_SELECTED && (mypos == epos
+		   || mypos == spos)) {
+			char *s = hb->text;
+			int num = 0, width = 0, fsel = 0, esel = strlen(hb->text);
+			int lbearing, rbearing, w;
+			
+                        if (epos > spos ||
+                            (epos == spos && html->num_end >= html->num_start)) {
+				if (mypos == epos)
+					esel = html->num_end;
+				if (mypos == spos)
+					fsel = html->num_start;
+			} else {
+				if (mypos == spos)
+					esel = html->num_start;
+                                if (mypos == epos)
+                                        fsel = html->num_end;
+			}
+
+			while(*s) {
+
+				if (num < fsel || num > esel)
+					selected_state = GTK_STATE_NORMAL;
+				else
+					selected_state = GTK_STATE_SELECTED;
+				if (hb->fore != NULL)
+					gdk_gc_set_foreground(gc, hb->fore);
+				else
+					gdk_gc_set_foreground(gc, &widget->style->text[selected_state]);
+				if (hb->back != NULL)
+					gdk_gc_set_background(gc, hb->back);
+				else
+					gdk_gc_set_background(gc, &widget->style->bg[selected_state]);
+
+
+				gdk_gc_set_font(gc, hb->font);
+
+				gdk_text_extents(hb->font, s, 1, &lbearing, &rbearing, &w, NULL, NULL);
+
+                                gdk_draw_text(html->html_area, hb->font, gc, shift + hb->x  + width, hb->y - html->yoffset, s, 1);
+
+                                if (hb->uline)
+					gdk_draw_line(html->html_area, gc, shift + hb->x  + width, hb->y - html->yoffset, shift + hb->x + width + w, hb->y - html->yoffset);
+
+				if (hb->strike)
+					gdk_draw_line(html->html_area, gc, shift + hb->x  + width, hb->y - html->yoffset - (hb->height / 3), shift + hb->x + width + w, hb->y - html->yoffset - (hb->height / 3));
+
+				width += w;
+				
+				s++;
+				num++;
+			}
+
+
+		} else {
+
+			if (hb->fore != NULL)
+				gdk_gc_set_foreground(gc, hb->fore);
+			else
+				gdk_gc_set_foreground(gc, &widget->style->text[selected_state]);
+			if (hb->back != NULL)
+				gdk_gc_set_background(gc, hb->back);
+			else
+				gdk_gc_set_background(gc, &widget->style->bg[selected_state]);
+
+
+			gdk_gc_set_font(gc, hb->font);
+
+			gdk_draw_string(html->html_area, hb->font, gc, shift + hb->x , hb->y - html->yoffset, hb->text);
+			if (hb->uline)
+				gdk_draw_line(html->html_area, gc, shift + hb->x , hb->y - html->yoffset, hb->x + gdk_string_measure(hb->font, hb->text), hb->y - html->yoffset);
+
+			if (hb->strike)
+				gdk_draw_line(html->html_area, gc, shift + hb->x , hb->y - html->yoffset - (hb->height / 3), hb->x + gdk_string_measure(hb->font, hb->text), hb->y - html->yoffset - (hb->height / 3));
+
+		}
+	} else if (hb->type == HTML_BIT_SEP) {
+
+		gdk_draw_line(html->html_area, gc, hb->x + 2 , hb->y - html->yoffset - (hb->height / 2 - 1), hb->x + hb->width, hb->y - html->yoffset - (hb->height / 2 - 1));
+
+	} else if (hb->type == HTML_BIT_PIXMAP) {
+		gdk_gc_set_background(gc, &widget->style->base[GTK_STATE_NORMAL]);
+		gdk_draw_pixmap(html->html_area, gc, hb->pm, 0, 0, hb->x , hb->y - html->yoffset - (hb->height) + 4, hb->width, hb->height - 2);
+	}
+}
+
+
+
+gint compare_types(GtkHtmlBit *hb, GtkHtmlBit *hb2)
+{
+	/* In this function, it's OK to accidently return a
+	 * 0, but will cause problems on an accidental 1 */
+
+	if (!hb || !hb2)
+		return 0;
+	
+	
+	if (hb->uline != hb2->uline)
+		return 0;
+	if (hb->strike != hb2->strike)
+                return 0;
+	if (hb->font && hb2->font) {
+		if (!gdk_font_equal(hb->font, hb2->font))
+			return 0;
+	} else if (hb->font && !hb2->font) {
+		return 0;
+	} else if (!hb->font && hb2->font) {
+		return 0;
+	}
+	if (hb->type != hb2->type)
+		return 0;
+	
+	if (hb->fore && hb2->fore) {
+		if (!gdk_color_equal(hb->fore, hb2->fore))
+			return 0;
+	} else if (hb->fore && !hb2->fore) {
+		return 0;
+	} else if (!hb->fore && hb2->fore) {
+		return 0;
+	}
+
+	if (hb->back && hb2->back) {
+		if (!gdk_color_equal(hb->back, hb2->back))
+			return 0;
+	} else if (hb->back && !hb2->back) {
+		return 0;
+	} else if (!hb->back && hb2->back) {
+		return 0;
+	}
+
+	if ((hb->url != NULL && hb2->url == NULL) ||
+	    (hb->url == NULL && hb2->url != NULL))
+		return 0;
+	
+        if (hb->url != NULL && hb2->url != NULL)
+		if (strcasecmp(hb->url, hb2->url))
+			return 0;
+	
+	return 1;
+}
+
+static gint html_bit_is_onscreen(GtkHtml *html, GtkHtmlBit *hb)
+{
+	gint width, height;
+
+	gdk_window_get_size(html->html_area, &width, &height);
+	
+	if (hb->y < html->yoffset) {
+		return 0;
+	}
+
+	if ((hb->y - hb->height) > (html->yoffset + height)) {
+		return 0;
+	}
+	return 1;
+}
+
+static void draw_cursor(GtkHtml *html)
+{
+	if (
+	    html->editable &&
+	    html->cursor_hb &&
+	    GTK_WIDGET_DRAWABLE(html) &&
+	    html_bit_is_onscreen(html, html->cursor_hb)) {
+		gint x, y;
+		gint width;
+
+		GdkFont *font = html->cursor_hb->font;
+
+		gdk_text_extents(font, html->cursor_hb->text, html->cursor_pos, NULL, NULL, &width, NULL, NULL);
+
+		gdk_gc_set_foreground(html->gc, &GTK_WIDGET(html)->style->text[GTK_STATE_NORMAL]);
+
+		y = html->cursor_hb->y - html->yoffset;
+		x = html->cursor_hb->x + width;
+
+
+		gdk_draw_line (html->html_area, html->gc, x,
+			       y, x, y - font->ascent);
+
+	}
+}
+
+static void undraw_cursor(GtkHtml *html)
+{
+	if (
+	    html->editable &&
+	    html->cursor_hb &&
+	    GTK_WIDGET_DRAWABLE(html) &&
+	    html_bit_is_onscreen(html, html->cursor_hb)) {
+		gint x, y;
+		gint width;
+                GdkRectangle area;
+		
+		GdkFont *font = html->cursor_hb->font;
+
+		gdk_text_extents(font, html->cursor_hb->text, html->cursor_pos, NULL, NULL, &width, NULL, NULL);
+
+		y = html->cursor_hb->y - html->yoffset;
+		x = html->cursor_hb->x + width;
+
+		area.x = x;
+		area.y = y - font->ascent;
+		area.height = font->ascent + 1;
+		area.width = 1;
+
+
+		clear_area (html, &area);
+
+		gtk_html_draw_bit(html, html->cursor_hb, 1);
+		
+
+	    }
+}
+
+
+static void expose_html(GtkHtml *html,
+                        GdkRectangle *area,
+                        gboolean cursor)
+{
+        GList *hbits;
+        GtkHtmlBit *hb;
+        gint width, height;
+        gint realy;
+
+        
+        if (html->frozen > 0)
+        	return;
+
+        
+        hbits = html->html_bits;
+
+	gdk_window_get_size(html->html_area, &width, &height);
+
+        realy = area->y + html->yoffset;
+
+        clear_area (html, area);
+
+        while(hbits) {
+                
+                hb = (GtkHtmlBit *)hbits->data;
+
+		if (html_bit_is_onscreen(html, hb))
+                        gtk_html_draw_bit(html, hb, 1);
+
+
+                hbits = hbits->next;
+        }
+}
+
+static void resize_html(GtkHtml *html)
+{
+	GList *hbits = html->html_bits;
+	GList *html_bits = html->html_bits;
+	GtkHtmlBit *hb, *hb2;
+	char *str;
+	gint height;
+
+        if(!hbits)
+                return;
+        
+        
+        html->html_bits = NULL;
+
+        html->current_x = 0;
+	html->current_y = 0;
+
+        html->vadj->upper = 0;
+	
+        gtk_html_freeze(html);
+	
+	while(hbits) {
+		hb = (GtkHtmlBit *)hbits->data;
+		if (hb->type == HTML_BIT_SEP) {
+			
+			gtk_html_add_seperator(html);
+
+			g_free(hb);
+
+			hbits = hbits->next;
+			continue;
+		}
+		if (hb->type == HTML_BIT_PIXMAP) {
+
+			gtk_html_add_pixmap(html, hb->pm, hb->fit);
+
+			g_free(hb);
+
+			hbits = hbits->next;
+			continue;
+		}
+		
+		if (hb->newline) {
+			int i;
+
+			if (!hb->text) {
+				hb->text = g_malloc(1);
+				hb->text[0] = 0;
+			}
+			for (i=0; i<hb->newline; i++) {
+                                str = hb->text;
+				hb->text = g_strconcat(str, "\n", NULL);
+				g_free(str);
+			}
+		}
+
+		if (hbits->next) {
+			hb2 = (GtkHtmlBit *)hbits->next->data;
+                } else {
+                        hb2 = NULL;
+                }
+
+
+		
+		if (!hb->newline && compare_types(hb, hb2)) {
+			str = hb2->text;
+			hb2->text = g_strconcat(hb->text, hb2->text, NULL);
+			g_free(str);
+			hb2 = NULL;
+		} else if (hb->text) {
+			gtk_html_add_text(html, hb->font, hb->fore, hb->back,
+				 hb->text, strlen(hb->text), hb->uline, hb->strike, hb->url);
+		}
+
+		
+
+		/* Font stays, so do colors (segfaults if I free) */
+		if (hb->fore)
+			gdk_color_free(hb->fore);
+		if (hb->back)
+			gdk_color_free(hb->back);
+		if (hb->text)
+			g_free(hb->text);
+		if (hb->url)
+			g_free(hb->url);
+
+                g_free(hb);
+
+		hbits = hbits->next;
+	}
+
+        g_list_free(html_bits);
+
+
+        gtk_html_thaw(html);
+        
+	gdk_window_get_size(html->html_area, NULL, &height);
+        gtk_adjustment_set_value(html->vadj, html->vadj->upper - height);
+
+}
+
+static GdkGC *create_bg_gc (GtkHtml *html)
+{
+        GdkGCValues values;
+
+        values.tile = GTK_WIDGET (html)->style->bg_pixmap[GTK_STATE_NORMAL];
+        values.fill = GDK_TILED;
+
+        return gdk_gc_new_with_values (html->html_area, &values,
+                                       GDK_GC_FILL | GDK_GC_TILE);
+}
+
+static void clear_area (GtkHtml *html,
+                        GdkRectangle *area)
+{
+	GtkWidget *widget = GTK_WIDGET (html);
+	gint x, y;
+	
+	
+	if (html->transparent) {
+		if (html->pm == NULL)
+			html->pm = get_desktop_pixmap(widget);
+
+                if (html->pm == NULL)
+                        return;
+
+                if (html->bg_gc == NULL) {
+                        GdkGCValues values;
+
+                        values.tile = html->pm;
+                        values.fill = GDK_TILED;
+
+                        html->bg_gc = gdk_gc_new_with_values (html->html_area, &values,
+                                                       GDK_GC_FILL | GDK_GC_TILE);
+
+                }
+                        
+		gdk_window_get_deskrelative_origin(html->html_area, &x, &y);
+
+                gdk_draw_pixmap(html->html_area, html->bg_gc, html->pm,
+                                x + area->x, y + area->y, area->x, area->y, area->width,
+                                area->height);
+
+		return;
+
+	}
+        if (html->bg_gc) {
+
+                gint width, height;
+      
+                gdk_window_get_size (widget->style->bg_pixmap[GTK_STATE_NORMAL], &width, &height);
+      
+                gdk_gc_set_ts_origin (html->bg_gc,
+                                      (- html->xoffset) % width,
+                                      (- html->yoffset) % height);
+
+                gdk_draw_rectangle (html->html_area, html->bg_gc, TRUE,
+                                    area->x, area->y, area->width, area->height);
+        }
+        else
+                gdk_window_clear_area (html->html_area, area->x, area->y, area->width, area->height);
+}
+
+
+
+
+static void gtk_html_destroy (GtkObject *object)
+{
+        GtkHtml *html;
+
+        g_return_if_fail(object != NULL);
+        g_return_if_fail(GTK_IS_HTML (object));
+
+        html = (GtkHtml *)object;
+
+
+        gtk_signal_disconnect_by_data (GTK_OBJECT (html->hadj), html);
+        gtk_signal_disconnect_by_data (GTK_OBJECT (html->vadj), html);
+
+        if (html->timer) {
+                gtk_timeout_remove (html->timer);
+                html->timer = 0;
+	}
+
+	if (html->tooltip_timer) {
+		gtk_timeout_remove (html->tooltip_timer);
+		html->tooltip_timer = -1;
+	}
+
+        
+        GTK_OBJECT_CLASS(parent_class)->destroy(object);
+        
+}
+
+static void gtk_html_finalize (GtkObject *object)
+{
+        GList *hbits;
+        GtkHtml *html;
+	GtkHtmlBit *hb;
+
+
+        g_return_if_fail (object != NULL);
+        g_return_if_fail (GTK_IS_HTML (object));
+
+        html = (GtkHtml *)object;
+
+        gtk_object_unref (GTK_OBJECT (html->hadj));
+        gtk_object_unref (GTK_OBJECT (html->vadj));
+
+        hbits = html->html_bits;
+        
+        while (hbits) {
+                hb = (GtkHtmlBit *)hbits->data;
+                if (hb->fore)
+                        gdk_color_free(hb->fore);
+                if (hb->back)
+                        gdk_color_free(hb->back);
+                if (hb->text)
+                        g_free(hb->text);
+                if (hb->url)
+                        g_free(hb->url);
+                if (hb->pm)
+                        gdk_pixmap_unref(hb->pm);
+		
+                g_free(hb);
+                hbits = hbits->next;
+        }
+        if (html->html_bits)
+                g_list_free(html->html_bits);
+
+        if (html->urls)
+                g_list_free(html->urls);
+
+        if (html->selected_text)
+                g_free(html->selected_text);
+
+        if (html->gc)
+                gdk_gc_destroy(html->gc);
+
+        if (html->bg_gc)
+                gdk_gc_destroy(html->bg_gc);
+
+	if (html->tooltip_window)
+		gtk_widget_destroy(html->tooltip_window);
+        
+        GTK_OBJECT_CLASS(parent_class)->finalize (object);
+}
+
+static void gtk_html_realize (GtkWidget *widget)
+{
+        GtkHtml *html;
+        GdkWindowAttr attributes;
+        gint attributes_mask;
+  
+        g_return_if_fail (widget != NULL);
+        g_return_if_fail (GTK_IS_HTML (widget));
+  
+        html = GTK_HTML (widget);
+        GTK_WIDGET_SET_FLAGS (html, GTK_REALIZED);
+  
+        attributes.window_type = GDK_WINDOW_CHILD;
+        attributes.x = widget->allocation.x;
+        attributes.y = widget->allocation.y;
+        attributes.width = widget->allocation.width;
+        attributes.height = widget->allocation.height;
+        attributes.wclass = GDK_INPUT_OUTPUT;
+        attributes.visual = gtk_widget_get_visual (widget);
+        attributes.colormap = gtk_widget_get_colormap (widget);
+        attributes.event_mask = gtk_widget_get_events (widget);
+        attributes.event_mask |= (GDK_EXPOSURE_MASK |
+                                  GDK_BUTTON_PRESS_MASK |
+                                  GDK_BUTTON_RELEASE_MASK |
+                                  GDK_BUTTON_MOTION_MASK |
+                                  GDK_ENTER_NOTIFY_MASK |
+                                  GDK_LEAVE_NOTIFY_MASK |
+                                  GDK_POINTER_MOTION_MASK |
+                                  GDK_POINTER_MOTION_HINT_MASK |
+                                  GDK_VISIBILITY_NOTIFY_MASK |
+                                  GDK_KEY_PRESS_MASK);
+        
+        attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+  
+        widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask);
+        gdk_window_set_user_data (widget->window, html);
+  
+        attributes.x = (widget->style->klass->xthickness + BORDER_WIDTH);
+        attributes.y = (widget->style->klass->ythickness + BORDER_WIDTH);
+        attributes.width = MAX (1, (gint)widget->allocation.width - (gint)attributes.x * 2);
+        attributes.height = MAX (1, (gint)widget->allocation.height - (gint)attributes.y * 2);
+  
+        html->html_area = gdk_window_new (widget->window, &attributes, attributes_mask);
+        gdk_window_set_user_data (html->html_area, html);
+  
+        widget->style = gtk_style_attach (widget->style, widget->window);
+  
+        /* Can't call gtk_style_set_background here because it's handled specially */
+        gdk_window_set_background (widget->window, &widget->style->base[GTK_STATE_NORMAL]);
+        gdk_window_set_background (html->html_area, &widget->style->base[GTK_STATE_NORMAL]);
+
+        if (widget->style->bg_pixmap[GTK_STATE_NORMAL])
+                html->bg_gc = create_bg_gc(html);
+  
+        html->gc = gdk_gc_new (html->html_area);
+        gdk_gc_set_exposures (html->gc, TRUE);
+        gdk_gc_set_foreground (html->gc, &widget->style->text[GTK_STATE_NORMAL]);
+  
+        gdk_window_show(html->html_area);
+
+}
+
+static void gtk_html_style_set(GtkWidget      *widget,
+                               GtkStyle       *previous_style)
+{
+        GtkHtml *html;
+  
+        g_return_if_fail (widget != NULL);
+        g_return_if_fail (GTK_IS_HTML (widget));
+  
+        html = GTK_HTML (widget);
+        if (GTK_WIDGET_REALIZED (widget)) {
+                gdk_window_set_background (widget->window, &widget->style->base[GTK_STATE_NORMAL]);
+                gdk_window_set_background (html->html_area, &widget->style->base[GTK_STATE_NORMAL]);
+      
+                if (html->bg_gc) {
+                        gdk_gc_destroy (html->bg_gc);
+                        html->bg_gc = NULL;
+                }
+
+                if (widget->style->bg_pixmap[GTK_STATE_NORMAL]) {
+                        html->bg_gc = create_bg_gc(html);
+                }
+
+        }
+}
+
+static void gtk_html_unrealize (GtkWidget *widget)
+{
+        GtkHtml *html;
+  
+        g_return_if_fail (widget != NULL);
+        g_return_if_fail (GTK_IS_HTML (widget));
+  
+        html = GTK_HTML (widget);
+
+        gdk_window_set_user_data (html->html_area, NULL);
+        gdk_window_destroy (html->html_area);
+        html->html_area = NULL;
+  
+        gdk_gc_destroy (html->gc);
+        html->gc = NULL;
+
+        if (html->bg_gc)
+        {
+                gdk_gc_destroy (html->bg_gc);
+                html->bg_gc = NULL;
+        }
+
+        if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+                (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
+}
+
+
+
+
+
+static void gtk_html_add_pixmap(GtkHtml *html,
+                                GdkPixmap *pm,
+                                int fit)
+{
+        GtkHtmlBit *last_hb;
+        GtkHtmlBit *hb = g_new0(GtkHtmlBit, 1);
+        GdkWindowPrivate *private = (GdkWindowPrivate *)pm;
+
+        last_hb = (GtkHtmlBit *)g_list_last(html->html_bits)->data;
+
+	hb->fit = fit;
+	hb->x = html->current_x;
+	hb->y = html->current_y;
+        if (fit)
+		hb->height = last_hb->height;
+	else
+		hb->height = private->height;
+	hb->type = HTML_BIT_PIXMAP;
+	hb->width = private->width;
+	hb->text = NULL;
+	hb->url = NULL;
+	hb->fore = NULL;
+	hb->back = NULL;
+	hb->font = NULL;
+        hb->uline = 0;
+        hb->strike = 0;
+	hb->was_selected = 0;
+        hb->newline = 0;
+        hb->pm = pm;
+
+        if (html->current_x == BORDER_WIDTH) {
+		html->current_y += hb->height;
+		hb->y += hb->height;
+	}
+
+
+        html->current_x += hb->width;
+	
+	gtk_html_draw_bit(html, hb, 1);
+
+	html->html_bits = g_list_append(html->html_bits, hb);
+
+
+}
+
+static void gtk_html_add_seperator(GtkHtml *html)
+{
+        GtkHtmlBit *hb = g_new0(GtkHtmlBit, 1);
+        gint width, height;
+	
+	html->current_x = 0;
+	html->current_y += 5;
+
+        gdk_window_get_size(html->html_area, &width, &height);
+        
+	hb->x = html->current_x;
+	hb->y = html->current_y;
+	hb->height = 5;
+	hb->type = HTML_BIT_SEP;
+	hb->width = width - GTK_SCROLLED_WINDOW(GTK_WIDGET(html)->parent)->vscrollbar->allocation.width - 10;
+	hb->text = NULL;
+	hb->url = NULL;
+	hb->fore = NULL;
+	hb->back = NULL;
+	hb->font = NULL;
+        hb->uline = 0;
+        hb->strike = 0;
+	hb->was_selected = 0;
+        hb->newline = 0;
+        hb->pm = NULL;
+
+	gtk_html_draw_bit(html, hb, 1);
+
+	html->html_bits = g_list_append(html->html_bits, hb);
+
+}
+
+
+static void gtk_html_add_text (GtkHtml *html,
+                               GdkFont *cfont,
+                               GdkColor *fore,
+                               GdkColor *back,
+                               char *chars,
+                               gint length,
+                               gint uline,
+                               gint strike,
+                               char *url)
+{
+        char *nextline = NULL, *c, *text, *tmp;
+        GdkGC *gc;
+        int nl = 0, nl2 = 0;
+        int maxwidth;
+        gint lb;
+        GList *hbits;
+        int num = 0, i, height;
+        GtkHtmlBit *hb;
+        gint hwidth, hheight;
+
+        if (length == 1 && chars[0] == '\n') {
+                GtkHtmlBit *h;
+                hbits = g_list_last(html->html_bits);
+                if (!hbits)
+                        return;
+                /* I realize this loses a \n sometimes
+                 * if it's the first thing in the widget.
+                 * so fucking what. */
+
+                h = (GtkHtmlBit *)hbits->data;
+                h->newline++;
+                if (html->current_x > 0)
+                        html->current_x = 0;
+                else
+                        html->current_y += gdk_string_height(cfont, "yG") + 2;
+                return;
+        }
+
+
+	
+        c = text = g_malloc(length + 2);
+        strncpy(text, chars, length);
+        text[length] = 0;
+
+
+        gc = html->gc;
+
+        if (gc == NULL)
+                gc = html->gc = gdk_gc_new(html->html_area);
+
+        gdk_gc_set_font(gc, cfont);
+
+
+        while(*c) {
+                if (*c == '\n') {
+                        if (*(c+1) == '\0') {
+                                nl = 1;
+                                length--;
+                                c[0] = '\0';
+                                break;
+                        }
+                        if (*c) {
+                                gtk_html_add_text(html, cfont, fore, back, text, num + 1, uline, strike, url);
+                                tmp = text;
+                                length -= (num+1);
+                                text = g_malloc(length+2);
+                                strncpy(text, (c+1), length);
+                                text[length] = 0;
+                                c = text;
+                                num = 0;
+                                g_free(tmp);
+				continue;
+                        }
+                }
+
+                num++;
+                c++;
+        }
+
+        /* Note, yG is chosen because G is damn high, and y is damn low, */
+        /* it should be just fine. :) */
+
+        gdk_window_get_size(html->html_area, &hwidth, &hheight);
+        
+        num = strlen(text);
+
+        while(GTK_WIDGET(html)->allocation.width < 20) {
+		while(gtk_events_pending())
+			gtk_main_iteration();
+	}
+
+        maxwidth = (hwidth - html->current_x - 8);
+                    /*HTK_SCROLLED_WINDOW(GTK_WIDGET(layout)->parent)->vscrollbar->allocation.width) - 8; */
+
+        while(gdk_text_measure(cfont, text, num) > maxwidth) {
+                if (num > 1)
+                        num--;
+                else {
+
+                        html->current_x = 0;
+                        if (nl) {
+				text[length] = '\n';
+                                length++;
+			}
+			gtk_html_add_text(html, cfont, fore, back, text, length, uline, strike, url);
+			g_free(text);
+			return;
+		}
+
+	}
+
+	height = gdk_string_height(cfont, "yG") + 2;
+
+        
+        if ((int)(html->vadj->upper - html->current_y) < (int)(height * 2)) {
+                int val;
+                val = (height * 2) + html->current_y;
+                html->vadj->upper = val;
+                adjust_adj(html, html->vadj);
+	}
+
+	
+	if (html->current_x == 0) {
+                html->current_y += height;
+                gdk_text_extents(cfont, text, 1, &lb, NULL, NULL, NULL, NULL);
+                html->current_x += (2 - lb);
+	} else if ((hbits = g_list_last(html->html_bits)) != NULL) {
+	        int diff, y;
+		hb = (GtkHtmlBit *)hbits->data;
+		if (height > hb->height) {
+			diff = height - hb->height;
+			y = hb->y;
+			html->current_y += diff;
+			while(hbits) {
+				hb = (GtkHtmlBit *)hbits->data;
+				if (hb->y != y)
+                                        break;
+                                hb->height = height;
+                                hb->y += diff;
+
+                                hbits = hbits->prev;
+			}
+		}
+	}
+
+
+
+
+	if (num != strlen(text)) {
+		/* This is kinda cheesy but it may make things
+		 * much better lookin */
+		for (i=2; i<15; i++) {
+			if ((num - i) < 0) {
+				html->current_x = 0;
+				gtk_html_add_text(html, cfont, fore, back, text, strlen(text), uline, strike, url);
+                                return;
+			} else if (text[num - i] == ' ') {
+				num = num - (i-1);
+				nl2 = 1;
+				break;
+			}
+		}
+
+		nextline = g_malloc(length - num + 2);
+		strncpy(nextline, (char *)(text + num), length - num);
+		nextline[length - num] = 0;
+		if (nl) {
+			nextline[length - num] = '\n';
+			nextline[length - num + 1] = 0;
+			nl = 0;
+		}
+
+
+		text[num] = 0;
+	}
+
+
+	if (url != NULL)
+		fore = get_color(3355647, gdk_window_get_colormap(html->html_area));
+
+
+	hb = g_new0(GtkHtmlBit, 1);
+
+	hb->text = g_strdup(text);
+
+        if (fore)
+		hb->fore = gdk_color_copy(fore);
+	else
+		hb->fore = NULL;
+
+	if (back)
+		hb->back = gdk_color_copy(back);
+	else
+		hb->back = NULL;
+	hb->font = cfont;
+	hb->uline = uline;
+	hb->strike = strike;
+	hb->height = height;
+	gdk_text_extents(cfont, text, num, &lb, NULL, &hb->width, NULL, NULL);
+	hb->x = html->current_x;
+	hb->y = html->current_y;
+        hb->type = HTML_BIT_TEXT;
+        hb->pm = NULL;
+	if (url != NULL) {
+		uline = 1;
+		hb->uline = 1;
+		hb->url = g_strdup(url);
+	} else {
+		hb->url = NULL;
+	}
+	html->current_x += hb->width;
+
+	html->html_bits = g_list_append(html->html_bits, hb);
+        if (url != NULL) {
+                html->urls = g_list_append(html->urls, hb);
+        }
+
+
+
+        gtk_html_draw_bit(html, hb, 1);
+
+        if (nl || nl2) {
+                if (nl)
+                        hb->newline = 1;
+                html->current_x = 0;
+        } else
+                hb->newline = 0;
+
+
+        if (nextline != NULL) {
+                gtk_html_add_text(html, cfont, fore, back, nextline, strlen(nextline), uline, strike, url);
+                g_free(nextline);
+        }
+
+        g_free(text);
+
+
+}
+
+
+void gtk_html_append_text (GtkHtml *html,
+			   char *text,
+			   gint options)
+{
+        GdkColormap *map;
+	GdkFont *cfont;
+        GdkRectangle area;
+        char ws[BUF_LONG], tag[BUF_LONG], *c, *url = NULL;
+        gint intag=0,wpos=0, tpos=0, colorv, bold=0, italic=0, fixed=0, uline=0, strike=0, title=0;
+        gint height;
+        struct font_state *current, *tmp;
+        struct font_state def_state = { 3, 0, 0, NULL, NULL, NULL };
+
+        current = &def_state;
+        map = gdk_window_get_colormap(html->html_area);
+        cfont = getfont(bold, italic, fixed, current->size);
+	c = text;
+
+
+        while(*c) {
+                if (*c == '<') {
+                        if (!intag) {
+                                ws[wpos]=0;
+                                if (wpos) {
+                                        if (title) {
+                                                if (html->title)
+                                                        g_free(html->title);
+                                                html->title = g_strdup(ws);
+                                        } else
+                                                gtk_html_add_text(html, cfont, current->color, current->bgcol, ws, strlen(ws), uline, strike, url);
+                                }
+                                wpos=0;
+                                intag=1;
+                        } else {
+                                /* Assuming you NEVER have nested tags
+                                 * (and I mean <tag <tag>> by this, not
+                                 * <tag><tag2></tag2><tag>..*/
+                                tag[tpos] = 0;
+				gtk_html_add_text(html, cfont, current->color, current->bgcol, "<", 1, 0, 0, NULL);
+				gtk_html_add_text(html, cfont, current->color, current->bgcol, tag, strlen(tag), 0, 0, NULL);
+				tpos = 0;
+ 
+				tag[0]=*c;
+			}
+		} else if (*c == '>') {
+			if (intag) {
+				tag[tpos]=0;
+				if (!strcasecmp(tag, "B"))
+					bold = 1;
+				else if (!strcasecmp(tag, "STRIKE"))
+					strike = 1;
+				else if (!strcasecmp(tag, "I"))
+					italic = 1;
+				else if (!strcasecmp(tag, "U"))
+					uline = 1;
+				else if (!strcasecmp(tag, "PRE"))
+					fixed = 1;
+				else if (!strcasecmp(tag, "HR"))
+					gtk_html_add_seperator(html);
+				else if (!strcasecmp(tag, "/B"))
+					bold = 0;
+				else if (!strcasecmp(tag, "/STRIKE"))
+					strike = 0;
+				else if (!strcasecmp(tag, "/I"))
+					italic = 0;
+				else if (!strcasecmp(tag, "/U"))
+					uline = 0;
+				else if (!strcasecmp(tag, "/PRE"))
+					fixed = 0;
+				else if (!strcasecmp(tag, "TITLE"))
+					title = 1;
+				else if (!strcasecmp(tag, "/TITLE"))
+					title = 0;
+				else if (!strncasecmp(tag, "IMG", 3)) {
+					
+				} else if (!strcasecmp(tag, "H3")) {
+					current = push_state(current);
+					current->size = 4;
+                                } else if (!strcasecmp(tag, "/H3")) {
+					gtk_html_add_text(html, cfont, current->color, current->bgcol, "\n", 1, 0, 0, NULL);
+
+					if (current->next) {
+						if (current->ownbg)
+							g_free(current->bgcol);
+						if (current->owncolor)
+							g_free(current->color);
+                                                tmp=current;
+						current=current->next;
+                                                g_free(tmp);
+					}
+				} else if (!strcasecmp(tag, "TABLE")) {
+                                } else if (!strcasecmp(tag, "/TABLE")) {
+				} else if (!strcasecmp(tag, "TR")) {
+				} else if (!strcasecmp(tag, "/TR")) {
+				} else if (!strcasecmp(tag, "/TD")) {
+				} else if (!strcasecmp(tag, "TD")){
+					gtk_html_add_text(html, cfont, current->color, current->bgcol, "  ", 2, 0, 0, NULL);
+				} else if (!strncasecmp(tag, "A ", 2)) {
+					char *d;
+					char *temp = d = g_strdup(tag);
+					int flag = 0;
+					strtok(tag," ");
+                                        while((d=strtok(NULL," "))) {
+						if (strlen(d) < 7)
+							break;
+						if (!strncasecmp(d, "HREF=\"", strlen("HREF=\""))) {
+							d+= strlen("HREF=\"");
+							d[strlen(d) - 1] = 0;
+							url = g_malloc(strlen(d) + 1);
+							strcpy(url, d);
+							flag = 1;
+                                                }
+                                        }
+					g_free(temp);
+					if (!flag) {
+						gtk_html_add_text(html, cfont, current->color, current->bgcol, "<", 1, 0, 0, NULL);
+						gtk_html_add_text(html, cfont, current->color, current->bgcol, tag, strlen(tag), 0, 0, NULL);
+						gtk_html_add_text(html, cfont, current->color, current->bgcol, ">", 1, 0, 0, NULL);
+					}
+				} else if (!strcasecmp(tag, "/A")) {
+					if (url) {
+						g_free(url);
+						url = NULL;
+					}
+				} else if (!strncasecmp(tag,"FONT", strlen("FONT"))) {
+                                        char *d;
+					/* Push a new state onto the stack, based on the old state */
+                                        current = push_state(current);
+					strtok(tag," ");
+                                        while((d=strtok(NULL," "))) {
+                                                if (!strncasecmp(d,"COLOR=",strlen("COLOR="))) {
+                                                        d+=strlen("COLOR=");
+                                                        if (*d == '\"') d++;
+                                                        if (*d == '#') d++;
+                                                        if (d[strlen(d) - 1] == '\"')
+                                                                d[strlen(d) - 1] = 0;
+                                                        if (sscanf(d, "%x", &colorv) && !(options & HTML_OPTION_NO_COLOURS)) {
+								current->color = get_color(colorv, map);
+								current->owncolor = 1;
+							} else {
+								sprintf(debug_buff,"didn't find color in '%s'\n",d);
+								debug_print(debug_buff);
+							}
+						} else 
+						if (!strncasecmp(d,"BACK=",strlen("BACK="))) {
+							d+=strlen("BACK=");
+							if (*d == '\"') d++;
+							if (*d == '#') d++;
+							if (d[strlen(d) - 1] == '\"')
+								d[strlen(d) - 1] = 0;
+							if (sscanf(d, "%x", &colorv) && !(options & HTML_OPTION_NO_COLOURS)) {
+								current->bgcol = get_color(colorv, map);
+								current->ownbg = 1;
+							} else {
+								sprintf(debug_buff,"didn't find color in '%s'\n",d);
+								debug_print(debug_buff);
+							}
+						} else if (!strncasecmp(d,"SIZE=",strlen("SIZE="))) {
+                                                        d+=strlen("SIZE=");
+                                                        if (*d == '\"') d++;
+                                                        if (*d == '+') d++;
+                                                        if (sscanf(d, "%d", &colorv)) {
+                                                                current->size = colorv;
+                                                        } else {
+								sprintf(debug_buff,"didn't find size in '%s'\n",d);
+								debug_print(debug_buff);
+                                                        }
+                                                } else if (strncasecmp(d,"PTSIZE=", strlen("PTSIZE="))) {
+                                                }
+                                        }
+                                } else if (!strncasecmp(tag,"BODY BGCOLOR", strlen("BODY BGCOLOR"))) {
+
+                                        /* Ditch trailing \" */
+                                        tag[strlen(tag)-1]=0;
+                                        if (sscanf(tag + strlen("BODY BGCOLOR=\"#"), "%x", &colorv) && !(options & HTML_OPTION_NO_COLOURS)) {
+                                                current->bgcol = get_color(colorv, map);
+                                                current->ownbg = 1;
+                                        }
+                                } else if (!strncasecmp(tag, "/FONT", strlen("/FONT"))) {
+                                        /* Pop a font state off the list if possible, freeing
+                                         any resources it used */
+                                        if (current->next) {
+                                                if (current->ownbg)
+                                                        g_free(current->bgcol);
+                                                if (current->owncolor)
+                                                        g_free(current->color);
+                                                tmp=current;
+                                                current=current->next;
+                                                g_free(tmp);
+					}
+
+				} else if (!strcasecmp(tag, "/BODY")) {
+					if (current->next) {
+						if (current->ownbg)
+							g_free(current->bgcol);
+						if (current->owncolor)
+							g_free(current->color);
+						tmp=current;
+						current=current->next;
+						g_free(tmp);
+					}	/* tags we ignore below */
+				} else if (!strncasecmp(tag, "BR", 2)) {
+					gtk_html_add_text(html, cfont, current->color, current->bgcol, "\n", 1, 0, 0, NULL);
+				} else if (strncasecmp(tag, "HTML", 4) && strncasecmp(tag, "/HTML", 5) &&
+					   strncasecmp(tag, "BODY", 4) && strncasecmp(tag, "/BODY", 5) &&
+					   strncasecmp(tag, "P", 1) && strncasecmp(tag, "/P", 2) &&
+					   strncasecmp(tag, "HEAD", 4) && strncasecmp(tag, "/HEAD", 5)) {
+					if (tpos) {
+						gtk_html_add_text(html, cfont, current->color, current->bgcol, "<", 1, 0, 0, NULL);
+						gtk_html_add_text(html, cfont, current->color, current->bgcol, tag, strlen(tag), 0, 0, NULL);
+						gtk_html_add_text(html, cfont, current->color, current->bgcol, ">", 1, 0, 0, NULL);
+
+					}
+				}
+				cfont = getfont(bold,italic,fixed,current->size);
+				tpos=0;
+				intag = 0;
+			} else {
+				ws[wpos++]=*c;
+			}
+		} else if (!intag && *c == '&') {
+                if (!strncasecmp(c, "&amp;", 5)) {
+				ws[wpos++] = '&';
+				c+=4;
+			} else if (!strncasecmp(c, "&lt;", 4)) {
+				ws[wpos++] = '<';
+				c+=3;
+			} else if (!strncasecmp(c, "&gt;", 4)) {
+				ws[wpos++] = '>';
+                                c+=3;
+                        } else if (!strncasecmp(c, "&nbsp;", 6)) {
+				ws[wpos++] = ' ';
+				c+=5;
+			} else {
+				ws[wpos++] = *c;
+			}
+                } else {
+			if (intag) {
+				tag[tpos++]=*c;
+			} else {
+				ws[wpos++]=*c;
+			}
+		}
+		c++;
+	}
+	while(current->next) {
+		if (current->ownbg)
+			g_free(current->bgcol);
+		if (current->owncolor)
+			g_free(current->color);
+		tmp = current;
+		current = current->next;
+		g_free(tmp);
+	}
+	ws[wpos]=0;
+	tag[tpos]=0;
+	if (wpos) {
+		gtk_html_add_text(html, cfont, current->color, current->bgcol, ws, strlen(ws), uline, strike, url);
+	}
+	if (tpos) {
+		gtk_html_add_text(html, cfont, current->color, current->bgcol, "<", 1, 0, 0, NULL);
+		gtk_html_add_text(html, cfont, current->color, current->bgcol, tag, strlen(tag), 0, 0, NULL);
+		gtk_html_add_text(html, cfont, current->color, current->bgcol, ">", 1, 0, 0, NULL);
+	}
+
+
+	
+        gdk_window_get_size(html->html_area, NULL, &height);
+        area.height = height;
+	gtk_adjustment_set_value(html->vadj, html->vadj->upper - area.height);
+
+        return;
+}
+
+
+static void adjust_adj (GtkHtml *html,
+                        GtkAdjustment *adj)
+{
+        gint height;
+  
+        gdk_window_get_size (html->html_area, NULL, &height);
+  
+        adj->step_increment = MIN (adj->upper, (float) SCROLL_PIXELS);
+        adj->page_increment = MIN (adj->upper, height - (float) KEY_SCROLL_PIXELS);
+        adj->page_size      = MIN (adj->upper, height);
+        adj->value          = MIN (adj->value, adj->upper - adj->page_size);
+        adj->value          = MAX (adj->value, 0.0);
+  
+        gtk_signal_emit_by_name (GTK_OBJECT (adj), "changed");
+}
+
+
+static void scroll_down (GtkHtml* html,
+                         gint diff0)
+{
+        GdkRectangle rect;
+        gint width, height;
+  
+        html->yoffset += diff0;
+  
+	gdk_window_get_size (html->html_area, &width, &height);
+
+	if (html->transparent) {
+		rect.x = 0;
+		rect.y = 0;
+		rect.width = width;
+		rect.height = height;
+	} else {
+		
+
+		if (height > diff0 && !html->transparent)
+			gdk_draw_pixmap (html->html_area,
+					 html->gc,
+					 html->html_area,
+					 0,
+					 diff0,
+					 0,
+					 0,
+					 width,
+					 height - diff0);
+
+		rect.x      = 0;
+		rect.y      = MAX (0, height - diff0);
+		rect.width  = width;
+		rect.height = MIN (height, diff0);
+	}
+		
+        expose_html (html, &rect, FALSE);
+        gtk_html_draw_focus ( (GtkWidget *) html);
+
+}
+
+static void scroll_up (GtkHtml* html,
+                         gint diff0)
+{
+        GdkRectangle rect;
+        gint width, height;
+  
+	html->yoffset -= diff0;
+
+
+	gdk_window_get_size (html->html_area, &width, &height);
+
+	if (html->transparent) {
+		rect.x = 0;
+		rect.y = 0;
+		rect.width = width;
+		rect.height = height;
+	} else {
+  
+		if (height > diff0)
+			gdk_draw_pixmap (html->html_area,
+					 html->gc,
+					 html->html_area,
+					 0,
+					 0,
+					 0,
+					 diff0,
+					 width,
+					 height - diff0);
+
+		rect.x      = 0;
+		rect.y      = 0;
+		rect.width  = width;
+		rect.height = MIN (height, diff0);
+	}
+
+        expose_html (html, &rect, FALSE);
+        gtk_html_draw_focus ( (GtkWidget *) html);
+
+}
+
+
+
+static void gtk_html_adjustment (GtkAdjustment *adjustment,
+                                 GtkHtml       *html)
+{
+        g_return_if_fail (adjustment != NULL);
+        g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
+        g_return_if_fail (html != NULL);
+        g_return_if_fail (GTK_IS_HTML (html));
+
+        /* Just ignore it if we haven't been size-allocated and realized yet */
+        if (html->html_area == NULL)
+                return;
+  
+        if (adjustment == html->hadj) {
+                g_warning ("horizontal scrolling not implemented");
+        } else {
+                gint diff = ((gint)adjustment->value) - html->last_ver_value;
+      
+                if (diff != 0) {
+                        /*undraw_cursor (text, FALSE);*/
+          
+                        if (diff > 0) {
+                                scroll_down (html, diff);
+                        } else {/* if (diff < 0) */
+                                scroll_up (html, -diff);
+                        }
+                        /*draw_cursor (text, FALSE); */
+
+                        html->last_ver_value = adjustment->value;
+                }
+        }
+}
+ 
+static gint gtk_html_visibility_notify (GtkWidget *widget,
+                                        GdkEventVisibility *event)
+{
+	GtkHtml *html;
+	GdkRectangle rect;
+        gint width, height;
+
+	g_return_val_if_fail (widget != NULL, FALSE);
+        g_return_val_if_fail (GTK_IS_HTML (widget), FALSE);
+
+        html = GTK_HTML(widget);
+        
+        if (GTK_WIDGET_REALIZED (widget) && html->transparent) {
+                gdk_window_get_size (html->html_area, &width, &height);
+                rect.x = 0;
+                rect.y = 0;
+                rect.width = width;
+                rect.height = height;
+                expose_html (html, &rect, FALSE);
+                gtk_html_draw_focus ( (GtkWidget *) html);
+        } else {
+	}
+
+
+        return FALSE;
+}
+
+
+
+static void gtk_html_disconnect (GtkAdjustment *adjustment,
+                                 GtkHtml       *html)
+{
+        g_return_if_fail (adjustment != NULL);
+        g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
+        g_return_if_fail (html != NULL);
+        g_return_if_fail (GTK_IS_HTML (html));
+
+        if (adjustment == html->hadj)
+                gtk_html_set_adjustments (html, NULL, html->vadj);
+        if (adjustment == html->vadj)
+                gtk_html_set_adjustments (html, html->hadj, NULL);
+}
+
+static void move_cursor_ver(GtkHtml *html, int count)
+{
+	GList *hbits = g_list_find(html->html_bits, html->cursor_hb);
+	GtkHtmlBit *hb = NULL, *hb2 = NULL;
+	gint y;
+        gint len, len2 = 0;
+	
+	undraw_cursor(html);
+
+	if (!html->html_bits)
+		return;
+	
+	if (!html->cursor_hb)
+		html->cursor_hb = (GtkHtmlBit *)html->html_bits->data;
+
+	hb = html->cursor_hb;
+
+	len = html->cursor_pos;
+	hbits = hbits->prev;
+	while(hbits) {
+		hb2 = (GtkHtmlBit *)hbits->data;
+
+		if (hb2->y != hb->y)
+			break;
+
+                len += strlen(hb2->text);
+		
+		hbits = hbits->prev;
+	}
+
+        hbits = g_list_find(html->html_bits, html->cursor_hb);
+	
+	if (count < 0) {
+		while(hbits) {
+			hb2 = (GtkHtmlBit *)hbits->data;
+
+			if (hb2->y != hb->y)
+				break;
+			
+			hbits = hbits->prev;
+		}
+		if (!hbits) {
+			draw_cursor(html);
+			return;
+		}
+		y = hb2->y;
+		hb = hb2;
+		while(hbits) {
+			hb2 = (GtkHtmlBit *)hbits->data;
+
+			if (hb2->y != y)
+				break;
+
+			hb = hb2;
+			
+			hbits = hbits->prev;
+		}
+		hbits = g_list_find(html->html_bits, hb);
+		while(hbits) {
+			hb2 = (GtkHtmlBit *)hbits->data;
+
+			if (hb->y != hb2->y) {
+				html->cursor_hb = hb;
+				html->cursor_pos = strlen(hb->text);
+                                break;
+			}
+
+
+			if (len < len2 + strlen(hb2->text)) {
+				html->cursor_hb = hb2;
+				html->cursor_pos = len - len2;
+				break;
+			}
+
+			len2 += strlen(hb2->text);
+
+			hb = hb2;
+
+                        hbits = hbits->next;
+		}
+	} else {
+		while(hbits) {
+			hb2 = (GtkHtmlBit *)hbits->data;
+
+			if (hb2->y != hb->y)
+				break;
+			
+			hbits = hbits->next;
+		}
+		if (!hbits) {
+			draw_cursor(html);
+			return;
+		}
+		hb = hb2;
+		while(hbits) {
+			hb2 = (GtkHtmlBit *)hbits->data;
+
+			if (hb->y != hb2->y) {
+				html->cursor_hb = hb;
+				html->cursor_pos = strlen(hb->text);
+                                break;
+			}
+
+
+			if (len < len2 + strlen(hb2->text)) {
+				html->cursor_hb = hb2;
+				html->cursor_pos = len - len2;
+				break;
+			}
+
+			len2 += strlen(hb2->text);
+
+			hb = hb2;
+
+                        hbits = hbits->next;
+		}
+	}
+
+	draw_cursor(html);
+
+}
+
+static void move_cursor_hor(GtkHtml *html, int count)
+{
+	GList *hbits = g_list_find(html->html_bits, html->cursor_hb);
+	GtkHtmlBit *hb, *hb2;
+
+	undraw_cursor(html);
+
+	if (!html->html_bits)
+		return;
+	
+	if (!html->cursor_hb)
+		html->cursor_hb = (GtkHtmlBit *)html->html_bits->data;
+
+	html->cursor_pos+=count;
+	
+	if (html->cursor_pos < 0) {
+		if (hbits->prev) {
+			gint diff;
+			hb = html->cursor_hb;
+			hb2 = (GtkHtmlBit *)hbits->prev->data;
+			diff = html->cursor_pos + strlen(hb2->text) + 1;
+			if (hb->y == hb2->y)
+				--diff;
+			
+			html->cursor_pos = diff;
+			
+                        html->cursor_hb = (GtkHtmlBit *)hbits->prev->data;
+		} else {
+			html->cursor_pos = 0;
+		}
+	} else if (html->cursor_pos > strlen(html->cursor_hb->text)) {
+		if (hbits->next) {
+			gint diff;
+			hb = html->cursor_hb;
+			hb2 = (GtkHtmlBit *)hbits->next->data;
+
+			diff = html->cursor_pos - strlen(html->cursor_hb->text) - 1;
+			if (hb->y == hb2->y)
+                                ++diff;
+			html->cursor_pos = diff;
+                        html->cursor_hb = (GtkHtmlBit *)hbits->next->data;
+		} else {
+			html->cursor_pos = strlen(html->cursor_hb->text);
+		}
+
+	}
+
+	draw_cursor(html);
+}
+
+static void move_beginning_of_line(GtkHtml *html)
+{
+	GList *hbits = g_list_find(html->html_bits, html->cursor_hb);
+	GtkHtmlBit *hb = NULL;
+        gint y;
+	
+	undraw_cursor(html);
+
+	if (!html->html_bits)
+		return;
+
+	if (!html->cursor_hb)
+		html->cursor_hb = (GtkHtmlBit *)html->html_bits->data;
+
+	y = html->cursor_hb->y;
+	
+	while(hbits) {
+		hb = (GtkHtmlBit *)hbits->data;
+
+		if (y != hb->y) {
+			hb = (GtkHtmlBit *)hbits->next->data;
+			break;
+		}
+		
+		hbits = hbits->prev;
+	}
+	if (!hbits)
+		html->cursor_hb = (GtkHtmlBit*)html->html_bits->data;
+	else
+		html->cursor_hb = hb;
+
+	html->cursor_pos = 0;
+
+
+	draw_cursor(html);
+
+
+}
+
+static void move_end_of_line(GtkHtml *html)
+{
+	GList *hbits = g_list_find(html->html_bits, html->cursor_hb);
+	GtkHtmlBit *hb = NULL;
+        gint y;
+	
+	undraw_cursor(html);
+
+	if (!html->html_bits)
+		return;
+
+	if (!html->cursor_hb)
+		html->cursor_hb = (GtkHtmlBit *)html->html_bits->data;
+
+	y = html->cursor_hb->y;
+	
+	while(hbits) {
+		hb = (GtkHtmlBit *)hbits->data;
+
+		if (y != hb->y) {
+			hb = (GtkHtmlBit *)hbits->prev->data;
+			break;
+		}
+		
+		hbits = hbits->next;
+	}
+	if (!hbits)
+		html->cursor_hb = (GtkHtmlBit*)g_list_last(html->html_bits)->data;
+	else
+		html->cursor_hb = hb;
+
+	html->cursor_pos = strlen(html->cursor_hb->text);
+
+
+	draw_cursor(html);
+
+
+}
+
+
+
+static gint
+gtk_html_key_press (GtkWidget   *widget,
+                    GdkEventKey *event) 
+{
+	GtkHtml *html;
+	gchar key;
+	gint return_val;
+  
+	g_return_val_if_fail (widget != NULL, FALSE);
+	g_return_val_if_fail (GTK_IS_HTML (widget), FALSE);
+	g_return_val_if_fail (event != NULL, FALSE);
+  
+	return_val = FALSE;
+  
+	html = GTK_HTML (widget);
+  
+	key = event->keyval;
+	return_val = TRUE;
+
+
+	if (html->editable == FALSE) {
+                /*
+		switch (event->keyval) {
+		case GDK_Home:
+			if (event->state & GDK_CONTROL_MASK)
+				scroll_int (text, -text->vadj->value);
+			else
+				return_val = FALSE;
+			break;
+		case GDK_End:
+			if (event->state & GDK_CONTROL_MASK)
+				scroll_int (text, +text->vadj->upper);
+			else
+				return_val = FALSE;
+			break;
+		case GDK_Page_Up:   scroll_int (text, -text->vadj->page_increment); break;
+		case GDK_Page_Down: scroll_int (text, +text->vadj->page_increment); break;
+		case GDK_Up:        scroll_int (text, -KEY_SCROLL_PIXELS); break;
+		case GDK_Down:      scroll_int (text, +KEY_SCROLL_PIXELS); break;
+		case GDK_Return:
+			if (event->state & GDK_CONTROL_MASK)
+				gtk_signal_emit_by_name (GTK_OBJECT (text), "activate");
+			else
+				return_val = FALSE;
+			break;
+		default:
+			return_val = FALSE;
+			break;
+		}
+		*/
+	} else {
+      
+		switch (event->keyval) {
+		case GDK_Home:
+			move_beginning_of_line (html);
+			break;
+                case GDK_End:
+			move_end_of_line (html);
+			break;
+			/*
+		case GDK_Page_Up:
+			move_cursor_page_ver (html, -1);
+			break;
+		case GDK_Page_Down:
+			move_cursor_page_ver (html, +1);
+			break;*/
+          /* CUA has Ctrl-Up/Ctrl-Down as paragraph up down */
+		case GDK_Up:
+			move_cursor_ver (html, -1);
+			break;
+		case GDK_Down:
+			move_cursor_ver (html, +1);
+			break;
+		case GDK_Left:
+			move_cursor_hor (html, -1);
+			break;
+		case GDK_Right:
+			move_cursor_hor (html, +1);
+			break;
+#if 0
+		case GDK_BackSpace:
+			if (event->state & GDK_CONTROL_MASK)
+				gtk_text_delete_backward_word (text);
+			else
+				gtk_text_delete_backward_character (text);
+			break;
+		case GDK_Clear:
+			gtk_text_delete_line (text);
+			break;
+		case GDK_Insert:
+			if (event->state & GDK_SHIFT_MASK)
+			{
+				extend_selection = FALSE;
+				gtk_editable_paste_clipboard (editable);
+			}
+			else if (event->state & GDK_CONTROL_MASK)
+			{
+				gtk_editable_copy_clipboard (editable);
+			}
+			else
+			{
+				/* gtk_toggle_insert(text) -- IMPLEMENT */
+			}
+			break;
+		case GDK_Delete:
+			if (event->state & GDK_CONTROL_MASK)
+				gtk_text_delete_forward_word (text);
+			else if (event->state & GDK_SHIFT_MASK)
+			{
+				extend_selection = FALSE;
+				gtk_editable_cut_clipboard (editable);
+			}
+			else
+				gtk_text_delete_forward_character (text);
+			break;
+		case GDK_Tab:
+			position = text->point.index;
+			gtk_editable_insert_text (editable, "\t", 1, &position);
+			break;
+		case GDK_Return:
+			if (event->state & GDK_CONTROL_MASK)
+				gtk_signal_emit_by_name (GTK_OBJECT (text), "activate");
+			else
+			{
+				position = text->point.index;
+				gtk_editable_insert_text (editable, "\n", 1, &position);
+			}
+			break;
+		case GDK_Escape:
+			/* Don't insert literally */
+			return_val = FALSE;
+			break;
+#endif
+		default:
+			return_val = FALSE;
+
+#if 0
+			if (event->state & GDK_CONTROL_MASK) {
+				if ((key >= 'A') && (key <= 'Z'))
+					key -= 'A' - 'a';
+
+				if ((key >= 'a') && (key <= 'z') && control_keys[(int) (key - 'a')])
+				{
+					(* control_keys[(int) (key - 'a')]) (editable, event->time);
+					return_val = TRUE;
+				}
+
+				break;
+			}
+			else if (event->state & GDK_MOD1_MASK)
+			{
+				if ((key >= 'A') && (key <= 'Z'))
+					key -= 'A' - 'a';
+
+				if ((key >= 'a') && (key <= 'z') && alt_keys[(int) (key - 'a')])
+				{
+					(* alt_keys[(int) (key - 'a')]) (editable, event->time);
+					return_val = TRUE;
+				}
+				break;
+			}
+#endif
+			/*
+			 if (event->length > 0) {
+			 html->cursor_pos++;
+			 gtk_editable_insert_text (editable, event->string, event->length, &position);
+
+			 return_val = TRUE;
+			 }
+			 else
+			 return_val = FALSE;
+			*/
+		}
+
+	}
+
+	return return_val;
+}
+ 
+void
+gtk_html_freeze (GtkHtml *html)
+{
+	g_return_if_fail (html != NULL);
+	g_return_if_fail (GTK_IS_HTML (html));
+
+	html->frozen++;
+}
+
+void
+gtk_html_thaw (GtkHtml *html)
+{
+	GdkRectangle area;
+	
+	g_return_if_fail (html != NULL);
+	g_return_if_fail (GTK_IS_HTML (html));
+
+	html->frozen--;
+
+	if (html->frozen < 0)
+                html->frozen = 0;
+
+	if (html->frozen == 0) {
+                if (html->html_area) {
+                        gint width, height;
+			area.x = 0;
+			area.y = 0;
+
+			gdk_window_get_size(html->html_area, &width, &height);
+
+                        area.width = width;
+                        area.height = height;
+                        
+			expose_html(html, &area, TRUE);
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gtkhtml.h	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,161 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef __GTK_HTML_H__
+#define __GTK_HTML_H__
+
+#include <gdk/gdk.h>
+#include <gtk/gtkwidget.h>
+
+#ifdef __cplusplus
+/*extern "C" {*/
+#endif /* __cplusplus */
+
+#define GTK_TYPE_HTML            (gtk_html_get_type())
+#define GTK_HTML(obj)            (GTK_CHECK_CAST ((obj), GTK_TYPE_HTML, GtkHtml))
+#define GTK_HTML_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HTML, GtkHtmlClass))
+#define GTK_IS_HTML(obj)         (GTK_CHECK_TYPE ((obj), GTK_TYPE_HTML))
+#define GTK_IS_HTML_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HTML)
+        
+typedef struct _GtkHtml          GtkHtml;
+typedef struct _GtkHtmlClass     GtkHtmlClass;
+typedef struct _GtkHtmlBit       GtkHtmlBit;
+
+
+struct _GtkHtmlBit {
+	int type;
+	GdkColor *fore;
+	GdkColor *back;
+	GdkFont *font;
+        int uline;
+        int strike;
+        int width, height;
+	int x, y;
+	char *url;
+	int was_selected;
+	int sel_s, sel_e;
+	int newline;
+        char *text;
+	GdkPixmap *pm;
+        int fit;
+};
+
+
+struct _GtkHtml {
+	GtkWidget widget;
+	
+	GdkWindow *html_area;
+
+	GtkAdjustment *hadj;
+	GtkAdjustment *vadj;
+
+	gint xoffset;
+	gint yoffset;
+	
+	int current_x;
+	int current_y;
+        GdkGC *gc;
+        GdkGC *bg_gc;
+	GList *html_bits;
+	GList *urls;
+	int start_sel_x, start_sel_y;
+	GtkHtmlBit *start_sel, *end_sel;
+	int num_start, num_end;
+	char *selected_text;
+        gint editable;
+        gint transparent;
+	gint timer;
+	gint last_ver_value;
+        char *title;
+        gint frozen;
+        GtkHtmlBit *cursor_hb;
+        GtkWidget *tooltip_window;
+        GtkHtmlBit *tooltip_hb;
+        int tooltip_timer;
+        int cursor_pos;
+        GdkPixmap *pm;
+        
+};
+
+
+struct _GtkHtmlClass {
+	GtkWidgetClass parent_class;
+
+	void  (*set_scroll_adjustments)   (GtkHtml        *html,
+					   GtkAdjustment  *hadjustment,
+					   GtkAdjustment  *vadjustment);
+
+};
+
+
+#define HTML_BIT_TEXT 0
+#define HTML_BIT_PIXMAP 1
+#define HTML_BIT_SEP 2
+
+
+#define HTML_OPTION_NO_COLOURS   0x01
+#define HTML_OPTION_NO_FONTS     0x02
+
+#define STYLE_ITALIC 0x01000000
+#define STYLE_BOLD 0x020000000
+
+#define FIXED_FONT "-*-courier-medium-r-*-*-*-%d-*-*-*-*-*-*"
+#define FIXED_BOLD_FONT "-*-courier-bold-r-*-*-*-%d-*-*-*-*-*-*"
+#define FIXED_ITALIC_FONT "-*-courier-medium-o-*-*-*-%d-*-*-*-*-*-*"
+#define FIXED_BOLD_ITALIC_FONT "-*-courier-bold-o-*-*-*-%d-*-*-*-*-*-*"
+#define PROP_FONT "-*-helvetica-medium-r-*-*-*-%d-*-*-*-*-*-*"
+#define PROP_BOLD_FONT "-*-helvetica-bold-r-*-*-*-%d-*-*-*-*-*-*"
+#define PROP_ITALIC_FONT "-*-helvetica-medium-o-*-*-*-%d-*-*-*-*-*-*"
+#define PROP_BOLD_ITALIC_FONT "-*-helvetica-bold-o-*-*-*-%d-*-*-*-*-*-*"
+
+
+
+#define HTML_TOOLTIP_DELAY 500
+
+        
+
+GtkType    gtk_html_get_type         (void);
+GtkWidget* gtk_html_new              (GtkAdjustment *hadj,
+				      GtkAdjustment *vadj);
+void       gtk_html_set_editable     (GtkHtml *html,
+                                      gboolean is_editable);
+void       gtk_html_set_transparent  (GtkHtml *html,
+                                      gboolean is_transparent);
+void       gtk_html_set_adjustments  (GtkHtml       *html,
+                                      GtkAdjustment *hadj,
+				      GtkAdjustment *vadj);
+void       gtk_html_append_text      (GtkHtml      *html,
+                                      char *text,
+                                      gint options);
+void       gtk_html_freeze           (GtkHtml      *html);
+void       gtk_html_thaw             (GtkHtml      *html);
+
+
+
+
+#ifdef __cplusplus
+/*}*/
+#endif /* __cplusplus */
+
+#endif /* __GTK_HTML_H__ */
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/html.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,221 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <gtk/gtk.h>
+#include <gdk/gdkprivate.h>
+#include <gdk/gdkx.h>
+#include "gaim.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+
+gchar * strip_html(gchar * text)
+{
+	int i, j;
+	int visible = 1;
+	gchar *text2 = g_malloc(strlen(text) + 1);
+	
+	strcpy(text2, text);
+	for (i = 0, j = 0;text2[i]; i++)
+	{
+		if(text2[i]=='<')
+		{	
+			visible = 0;
+			continue;
+		}
+		else if(text2[i]=='>')
+		{
+			visible = 1;
+			continue;
+		}
+		if(visible)
+		{
+			text2[j++] = text2[i];
+		}
+	}
+	text2[j] = '\0';
+	return text2;
+}
+
+struct g_url parse_url(char *url)
+{
+	struct g_url test;
+	char scan_info[255];
+	char port[5];
+	int f;
+
+	if (strstr(url, "http://"))
+		g_snprintf(scan_info, sizeof(scan_info), "http://%%[A-Za-z0-9.]:%%[0-9]/%%[A-Za-z0-9.~_-/&%%?]");
+	else
+		g_snprintf(scan_info, sizeof(scan_info), "%%[A-Za-z0-9.]:%%[0-9]/%%[A-Za-z0-9.~_-/&%%?]");
+	f = sscanf(url, scan_info, test.address, port, test.page);
+	if (f == 1) {
+		if (strstr(url, "http://"))
+			g_snprintf(scan_info, sizeof(scan_info), "http://%%[A-Za-z0-9.]/%%[A-Za-z0-9.~_-/&%%?]");
+		else
+			g_snprintf(scan_info, sizeof(scan_info), "%%[A-Za-z0-9.]/%%[A-Za-z0-9.~_-/&%%?]");
+        f = sscanf(url, scan_info, test.address, test.page);
+        g_snprintf(port, sizeof(test.port), "80");
+        port[2] = 0;
+	}
+	if (f == 1) {
+		if (strstr(url, "http://"))
+			g_snprintf(scan_info, sizeof(scan_info), "http://%%[A-Za-z0-9.]");
+        else
+		g_snprintf(scan_info, sizeof(scan_info), "%%[A-Za-z0-9.]");
+		f = sscanf(url, scan_info, test.address);
+		g_snprintf(test.page, sizeof(test.page), "%c", '\0');
+	}
+
+	sscanf(port, "%d", &test.port);
+	return test;
+}
+
+char *grab_url(char *url)
+{
+	struct g_url website;
+	char *webdata = NULL;
+        int sock;
+        int len;
+	int datalen = 0;
+	struct hostent *host;
+	struct sockaddr_in site;
+	char buf[256];
+	char data;
+        FILE *sockfile;
+        int startsaving = 0;
+        GtkWidget *pw = NULL, *pbar = NULL, *label;
+
+        website = parse_url(url);
+
+	host = gethostbyname(website.address);
+	if (!host) { return g_strdup("g001: Error resolving host\n"); }
+
+	site.sin_family = AF_INET;
+	site.sin_addr.s_addr = *(long *)(host->h_addr);
+	site.sin_port = htons(website.port);
+
+	sock = socket(AF_INET, SOCK_STREAM, 0);
+	if (sock < 0) { return g_strdup("g002: Socket Error\n"); }
+
+	if (connect(sock, (struct sockaddr *)&site, sizeof(site)))
+		return g_strdup("g003: Error opening connection.\n");
+
+	sockfile = fdopen(sock, "r+");
+
+	g_snprintf(buf, sizeof(buf), "GET /%s HTTP/1.0\n\n", website.page);
+	g_snprintf(debug_buff, sizeof(debug_buff), "Request: %s\n", buf);
+	debug_print(debug_buff);
+	fputs(buf, sockfile);
+
+        webdata = NULL;
+        len = 0;
+	
+	while ((data = fgetc(sockfile)) != -1) {
+		if (!data)
+			continue;
+		
+		if (!startsaving && data == '<') {
+#ifdef HAVE_STRSTR
+			char *cs = strstr(webdata, "Content-Length");
+			if (cs) {
+				char tmpbuf[1024];
+				sscanf(cs, "Content-Length: %d", &datalen);
+
+                                g_snprintf(tmpbuf, 1024, "Getting %d bytes from %s", datalen, url);
+                                pw = gtk_dialog_new();
+
+				label = gtk_label_new(tmpbuf);
+				gtk_widget_show(label);
+				gtk_box_pack_start(GTK_BOX(GTK_DIALOG(pw)->vbox),
+						   label, FALSE, FALSE, 5);
+				
+				pbar = gtk_progress_bar_new();
+				gtk_box_pack_start(GTK_BOX(GTK_DIALOG(pw)->action_area),
+						   pbar, FALSE, FALSE, 5);
+                                gtk_widget_show(pbar);
+                                
+                                gtk_window_set_title(GTK_WINDOW(pw), "Getting Data");
+                                
+                                gtk_widget_realize(pw);
+                                aol_icon(pw->window);
+
+                                gtk_widget_show(pw);
+                        } else
+				datalen = 0;
+#else
+			datalen = 0;
+#endif
+			g_free(webdata);
+			webdata = NULL;
+			len = 0;
+			startsaving = 1;
+		}
+
+		len++;
+		webdata = g_realloc(webdata, len);
+		webdata[len - 1] = data;
+
+		if (pbar)
+			gtk_progress_bar_update(GTK_PROGRESS_BAR(pbar),
+                                                ((100 * len) / datalen) / 100.0);
+		
+		while (gtk_events_pending())
+			gtk_main_iteration();
+	}
+
+        webdata = g_realloc(webdata, len+1);
+        webdata[len] = 0;
+
+
+        g_snprintf(debug_buff, sizeof(debug_buff), "Receieved: '%s'\n", webdata);
+        debug_print(debug_buff);
+
+        if (pw)
+                gtk_widget_destroy(pw);
+
+	close(sock);
+	return webdata;
+}
+
+char *fix_url(gchar *buf)
+{
+	char *new,*tmp;
+	int size;
+
+	size=8;
+	size+=strlen(quad_addr);
+	tmp=strchr(strchr(buf,':')+1,':');
+	size+=strlen(tmp);
+	new=g_malloc(size);
+	strcpy(new,"http://");
+	strcat(new,quad_addr);
+	strcat(new,tmp);
+	return(new);
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/idle.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,648 @@
+#if 0
+//----------------------------------------------------------------------------
+// This is a somewhat modified kscreensaver.
+// The original copyright notice follows
+//
+//----------------------------------------------------------------------------
+//
+// KDE screensavers
+//
+// This module is a heavily modified xautolock.
+// The orignal copyright notice follows
+//
+
+/*****************************************************************************
+ *
+ * xautolock
+ * =========
+ *
+ * Authors   :  S. De Troch (SDT) + M. Eyckmans (MCE)
+ *
+ * Date      :  22/07/90
+ *
+ * ---------------------------------------------------------------------------
+ *
+ * Copyright 1990, 1992-1995 by S. De Troch and MCE.
+ *
+ * Permission to use, copy, modify and distribute this software and the
+ * supporting documentation without fee is hereby granted, provided that
+ *
+ *  1 : Both the above copyright notice and this permission notice
+ *      appear in all copies of both the software and the supporting
+ *      documentation.
+ *  2 : No financial profit is made out of it.
+ *
+ * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
+ * EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
+ * OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ *****************************************************************************/
+
+
+
+/*
+ *  Have a guess what this does...
+ *  ==============================
+ *
+ *  Warning for swm & tvtwm users : xautolock should *not* be compiled
+ *  with vroot.h, because it needs to know the real root window.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#if defined(hpux) || defined (__hpux)
+#ifndef _HPUX_SOURCE
+#define _HPUX_SOURCE
+#endif /* _HPUX_SOURCE */
+#endif /* hpux || __hpux */
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+
+#ifdef VMS
+#include <ssdef.h>    
+#include <processes.h>  /* really needed? */
+#endif /* VMS */
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/Xresource.h>
+
+#include <time.h>
+#include <signal.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+
+#ifdef HAVE_SYS_M_WAIT_H
+#include <sys/m_wait.h>
+#endif 
+
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+
+#include <gdk/gdkx.h>
+#include <gtk/gtk.h>
+#include "gaim.h"
+
+void initAutoLock();
+void cleanupAutoLock();
+
+/*
+ *  Usefull macros and customization stuff
+ *  ======================================
+ */
+#define PP(x)                      x
+
+#ifdef VMS
+#define ALL_OK                     1       /* for use by exit ()           */
+#define PROBLEMS                   SS$_ABORT 
+                                           /* for use by exit ()           */
+#else /* VMS */
+#define ALL_OK                     0       /* for use by exit ()           */
+#define PROBLEMS                   1       /* for use by exit ()           */
+#endif /* VMS */
+
+
+#define CREATION_DELAY             30      /* should be > 10 and
+                                              < min (45,(MIN_MINUTES*30))  */
+#define TIME_CHANGE_LIMIT         120      /* if the time changes by more
+                                              than x secs then we will
+                                              assume someone has changed
+                                              date or machine has suspended */
+
+
+#ifndef HasVFork
+#define vfork                      fork
+#endif /* HasVFork */
+
+#define Error0(str)                fprintf (stderr, str)
+#define SetTrigger(delta)          trigger = time ((time_t*) NULL) + delta
+
+static caddr_t                     ch_ptr;  /* this is dirty */
+#define Skeleton(t,s)              (ch_ptr = (Caddrt) malloc ((Unsigned) s), \
+                                      (ch_ptr == (Caddrt) NULL)              \
+                                    ? (Error0 ("Out of memory.\n"),          \
+                                       exit (PROBLEMS),                      \
+                                       /*NOTREACHED*/ (t*) NULL              \
+                                      )                                      \
+                                    : (t*) ch_ptr                            \
+                                   )                                         \
+
+#define New(tp)                    Skeleton (tp, sizeof (tp))
+
+
+
+/*
+ *  New types
+ *  =========
+ */
+#if defined (apollo) || defined (news1800) 
+typedef int                        (*XErrorHandler) PP((Display*,
+                                                        XErrorEvent*));
+#endif /* apollo || news1800 */
+
+#if defined (news1800) || defined (sun386) 
+typedef int                        pid_t;
+#endif /* news1800  || sun386*/
+
+#ifdef VMS
+typedef long                       pid_t;
+#endif /* VMS */
+
+#define Void                       void     /* no typedef because of VAX */
+typedef int                        Int;
+typedef char                       Char;
+typedef char*                      String;
+typedef int                        Boolean;
+typedef caddr_t                    Caddrt;
+typedef unsigned int               Unsigned;
+typedef unsigned long              Huge;
+
+typedef struct QueueItem_
+        {
+          Window                   window;        /* as it says          */
+          time_t                   creationtime;  /* as it says          */
+          struct QueueItem_*       next;          /* as it says          */
+          struct QueueItem_*       prev;          /* as it says          */
+        } aQueueItem, *QueueItem;
+
+typedef struct Queue_
+        {
+          struct QueueItem_*       head;          /* as it says          */
+          struct QueueItem_*       tail;          /* as it says          */
+        } aQueue, *Queue;
+
+
+/*
+ *  Function declarations
+ *  =====================
+ */
+#if defined(news1800) 
+extern Void*    malloc                PP((Unsigned));
+#endif /* news1800 */
+ 
+static int      EvaluateCounter       PP((Display*));
+static int      QueryPointer          PP((Display*, int));
+static int      ProcessEvents         PP((Display*, Queue, int));
+static Queue    NewQueue              PP((Void));
+static Void     AddToQueue            PP((Queue, Window));
+static Void     ProcessQueue          PP((Queue, Display*, time_t));
+static Void     SelectEvents          PP((Display*, Window, Boolean));
+
+
+/*
+ *  Global variables
+ *  ================
+ */
+static time_t        trigger = 0;            /* as it says                 */
+static time_t        time_limit = IDLE_REPORT_TIME;   /* as it says */
+
+/*
+ *  Functions related to the window queue
+ *  =====================================
+ *
+ *  Function for creating a new queue
+ *  ---------------------------------
+ */
+static Queue  NewQueue ()
+
+{
+  Queue  queue;  /* return value */
+
+  queue = New (aQueue);
+  queue->tail = New (aQueueItem);
+  queue->head = New (aQueueItem);
+
+  queue->tail->next = queue->head;
+  queue->head->prev = queue->tail;
+  queue->tail->prev = queue->head->next = (QueueItem) NULL;
+
+  return queue;
+}
+
+
+/*
+ *  Function for adding an item to a queue
+ *  --------------------------------------
+ */
+static Void  AddToQueue (Queue queue, Window window)
+{
+  QueueItem  newq;  /* new item */
+
+  newq = New (aQueueItem);
+
+  newq->window = window;
+  newq->creationtime = time ((time_t*) NULL);
+  newq->next = queue->tail->next;
+  newq->prev = queue->tail;
+  queue->tail->next->prev = newq;
+  queue->tail->next = newq;
+}
+
+/*
+ *  Function for processing those entries that are old enough
+ *  ---------------------------------------------------------
+ */
+static Void  ProcessQueue (Queue queue, Display *d, time_t age)
+{
+  QueueItem  current;  /* as it says */
+  time_t     now;      /* as it says */
+
+  time (&now);
+  current = queue->head->prev;
+
+  while ( current->prev && current->creationtime + age < now )
+  {
+    SelectEvents (d, current->window, False);
+    current = current->prev;
+    free (current->next);
+  }
+
+  current->next = queue->head;
+  queue->head->prev = current;
+}
+
+
+static Void  FreeQueue( Queue queue )
+{
+  QueueItem  current;  /* as it says */
+
+  current = queue->head->prev;
+
+  while ( current->prev )
+  {
+	  current = current->prev;
+	  free(current->next);
+  }
+
+  free(current);
+  free(queue);
+}
+
+
+/*
+ *  Functions related to (the lack of) user activity
+ *  ================================================
+ *
+ *  Function for processing the event queue
+ *  ---------------------------------------
+ */
+static int  ProcessEvents (Display *d, Queue queue, int until_idle)
+{
+  XEvent  event;  /* as it says */
+
+ /*
+  *  Read whatever is available for reading.
+  */
+  while (XPending (d))
+  {
+    if (XCheckMaskEvent (d, SubstructureNotifyMask, &event))
+    {
+      if ((event.type == CreateNotify) && until_idle)
+      {
+        AddToQueue (queue, event.xcreatewindow.window);
+      }
+    }
+    else
+    {
+      XNextEvent (d, &event);
+    }
+
+
+   /*
+    *  Reset the counter if and only if the event is a KeyPress
+    *  event *and* was not generated by XSendEvent ().
+    */
+    if ( event.type == KeyPress && !event.xany.send_event )
+    {
+      if (!until_idle)    /* We've become un-idle */
+	return 1;
+      SetTrigger (time_limit);
+    }
+  }
+
+
+ /*
+  *  Check the window queue for entries that are older than
+  *  CREATION_DELAY seconds.
+  */
+  ProcessQueue (queue, d, (time_t) CREATION_DELAY);
+  return 0;
+}
+
+
+/*
+ *  Function for monitoring pointer movements
+ *  -----------------------------------------
+ */
+static int  QueryPointer (Display *d, int until_idle)
+{
+  Window           dummy_w;            /* as it says                    */
+  Int              dummy_c;            /* as it says                    */
+  Unsigned         mask;               /* modifier mask                 */
+  Int              root_x;             /* as it says                    */
+  Int              root_y;             /* as it says                    */
+  Int              i;                  /* loop counter                  */
+  static Window    root;               /* root window the pointer is on */
+  static Screen*   screen;             /* screen the pointer is on      */
+  static Unsigned  prev_mask = 0;      /* as it says                    */
+  static Int       prev_root_x = -1;   /* as it says                    */
+  static Int       prev_root_y = -1;   /* as it says                    */
+  static Boolean   first_call = TRUE;  /* as it says                    */
+  
+  
+  /*
+   *  Have a guess...
+   */
+  if (first_call)
+    {
+      first_call = FALSE;
+      root = DefaultRootWindow (d);
+      screen = ScreenOfDisplay (d, DefaultScreen (d));
+    }
+  
+  
+  /*
+   *  Find out whether the pointer has moved. Using XQueryPointer for this
+   *  is gross, but it also is the only way never to mess up propagation
+   *  of pointer events.
+   *
+   *  Remark : Unlike XNextEvent(), XPending () doesn't notice if the
+   *           connection to the server is lost. For this reason, earlier
+   *           versions of xautolock periodically called XNoOp (). But
+   *           why not let XQueryPointer () do the job for us, since
+   *           we now call that periodically anyway?
+   */
+  if (!XQueryPointer (d, root, &root, &dummy_w, &root_x, &root_y,
+                      &dummy_c, &dummy_c, &mask))
+    {
+      /*
+       *  Pointer has moved to another screen, so let's find out which one.
+       */
+      for (i = -1; ++i < ScreenCount (d); ) 
+	{
+	  if (root == RootWindow (d, i)) 
+	    {
+	      screen = ScreenOfDisplay (d, i);
+	      break;
+	    }
+	}
+    }
+  
+  if (   root_x != prev_root_x
+	 || root_y != prev_root_y
+	 || mask != prev_mask
+	 )
+    {
+      prev_root_x = root_x;
+      prev_root_y = root_y;
+      prev_mask = mask;
+      SetTrigger (time_limit);
+      if (!until_idle)
+	return 1;
+    }
+  
+  return 0;
+  
+}
+
+/*
+ *  Function for deciding whether to lock
+ *  -------------------------------------
+ */
+static int  EvaluateCounter (Display *d)
+{
+  time_t         now = 0;                /* as it says  */
+
+ /*
+  *  Now trigger the notifier if required. 
+  */
+  time (&now);
+
+ /*
+  *  Finally fire up the locker if time has come. 
+  */
+  if (now >= trigger)
+  {
+      SetTrigger (time_limit);
+	  return TRUE;
+  }
+
+  return FALSE;
+}
+
+/*
+ *  Function for selecting events on a tree of windows
+ *  --------------------------------------------------
+ */
+static Void  SelectEvents (Display *d, Window window, Boolean substructure_only)
+{
+  Window             root;              /* root window of this window */
+  Window             parent;            /* parent of this window      */
+  Window*            children;          /* children of this window    */
+  Unsigned           nof_children = 0;  /* number of children         */
+  Unsigned           i;                 /* loop counter               */
+  XWindowAttributes  attribs;           /* attributes of the window   */
+
+
+ /*
+  *  Start by querying the server about parent and child windows.
+  */
+  if (!XQueryTree (d, window, &root, &parent, &children, &nof_children))
+  {
+    return;
+  }
+
+
+ /*
+  *  Build the appropriate event mask. The basic idea is that we don't
+  *  want to interfere with the normal event propagation mechanism if
+  *  we don't have to.
+  */
+  if (substructure_only)
+  {
+    XSelectInput (d, window, SubstructureNotifyMask);
+  }
+  else
+  {
+    if (parent == None)  /* the *real* rootwindow */
+    {
+      attribs.all_event_masks = 
+        attribs.do_not_propagate_mask = KeyPressMask;
+    }
+    else if (XGetWindowAttributes (d, window, &attribs) == 0)
+    {
+      return;
+    }
+
+    XSelectInput (d, window,   SubstructureNotifyMask
+                             | (  (  attribs.all_event_masks
+                                   | attribs.do_not_propagate_mask)
+                                & KeyPressMask));
+  }
+
+
+ /*
+  *  Now do the same thing for all children.
+  */
+  for (i = 0; i < nof_children; ++i)
+  {
+    SelectEvents (d, children[i], substructure_only);
+  }
+
+  if (nof_children) XFree ((Char*) children);
+}
+
+
+int catchFalseAlarms( Display *d, XErrorEvent *x )
+{
+	return 0;
+}
+
+Queue  windowQueue;
+Window hiddenWin;        /* hidden window    */
+
+void initAutoLock()
+{
+  Display*              d;          /* display pointer  */
+  Window                r;          /* root window      */
+  Int                   s;          /* screen index     */
+  XSetWindowAttributes  attribs;    /* for dummy window */
+  int (*oldHandler)(Display *, XErrorEvent *);
+
+  d = GDK_DISPLAY();
+
+  oldHandler = XSetErrorHandler( catchFalseAlarms );
+  XSync (d, 0);
+
+  windowQueue = NewQueue ();
+
+  for (s = -1; ++s < ScreenCount (d); )
+  {
+    AddToQueue (windowQueue, r = RootWindowOfScreen (ScreenOfDisplay (d, s)));
+    SelectEvents (d, r, True);
+  }
+
+ /*
+  *  Get ourselves a dummy window in order to allow display and/or
+  *  session managers etc. to use XKillClient() on us (e.g. xdm when
+  *  not using XDMCP).
+  * 
+  *  I'm not sure whether the window needs to be mapped for xdm, but
+  *  the default set up Sun uses for OpenWindows and olwm definitely
+  *  requires it to be mapped.
+  */
+  attribs.override_redirect = True;
+  hiddenWin = XCreateWindow (d, DefaultRootWindow (d), -100, -100, 1, 1, 0,
+                CopyFromParent, InputOnly, CopyFromParent, CWOverrideRedirect,
+				&attribs);
+
+  XMapWindow (d, hiddenWin );
+
+  XSetErrorHandler( oldHandler );
+}
+
+/*  I don't think this should be needed, but leaving the code here
+    in case I change my mind. */
+/*
+void cleanupAutoLock()
+{
+  int (*oldHandler)(Display *, XErrorEvent *);
+  oldHandler = XSetErrorHandler( catchFalseAlarms );
+
+  FreeQueue( windowQueue );
+  XDestroyWindow( GDK_DISPLAY(), hiddenWin );
+  XSetErrorHandler( oldHandler );
+}
+*/
+
+/*
+ *  Main function
+ *  -------------
+ */
+void waitIdle( int timeout, int until_idle )
+{
+  Display*              d;          /* display pointer  */
+  int (*oldHandler)(Display *, XErrorEvent *);
+  time_t now, prev;
+
+  time_limit = timeout;
+
+  d = GDK_DISPLAY();
+
+  oldHandler = XSetErrorHandler( catchFalseAlarms );
+
+  SetTrigger (time_limit);
+
+  time(&prev);
+
+ /*
+  *  Main event loop.
+  */
+  while ( 1 )
+  {
+    if (ProcessEvents (d, windowQueue, until_idle))
+      break;
+    if (QueryPointer (d, until_idle))
+      break;
+    
+    if (until_idle) {
+      time(&now);
+      
+      if ((now > prev && now - prev > TIME_CHANGE_LIMIT) ||
+	  (prev > now && prev - now > TIME_CHANGE_LIMIT+1))
+	{
+	  /* the time has changed in one large jump.  This could be because the
+	     date was changed, or the machine was suspended.  We'll just
+	     reset the triger. */
+	  SetTrigger (time_limit);
+	}
+      
+      prev = now;
+      
+      if ( EvaluateCounter (d) )
+	break;
+    }
+
+    /*
+     *  It seems that, on some operating systems (VMS to name just one),
+     *  sleep () can be vastly inaccurate: sometimes 60 calls to sleep (1)
+     *  add up to only 30 seconds or even less of sleeping. Therefore,
+     *  as of patchlevel 9 we no longer rely on it for keeping track of
+     *  time. The only reason why we still call it, is to make  xautolock
+     *  (which after all uses a busy-form-of-waiting algorithm), less
+     *  processor hungry.
+     */
+    sleep (1);
+  }
+
+  XSetErrorHandler( oldHandler );
+
+}
+
+void idle_main(pid_t gaimpid) {
+  initAutoLock();
+  while (1) {
+    waitIdle(IDLE_REPORT_TIME, 1);
+    kill(gaimpid, SIGALRM);
+    sleep(1);                /* Just to be safe */
+    waitIdle(1, 0);
+    kill(gaimpid, SIGALRM);
+  }
+}
+
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/network.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,67 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <netdb.h>
+#include <gtk/gtk.h>
+#include <unistd.h>
+#include <errno.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <sys/socket.h>
+#include "gaim.h"
+#include "proxy.h"
+#include "gnome_applet_mgr.h"
+
+unsigned int *get_address(char *hostname)
+{
+	struct hostent *hp;
+	unsigned int *sin=NULL;
+	if ((hp = proxy_gethostbyname(hostname))) {
+		sin = (unsigned int *)g_new0(struct sockaddr_in, 1);
+		memcpy(sin, hp->h_addr, hp->h_length);
+	}
+	return sin;
+}
+
+int connect_address(unsigned int addy, unsigned short port)
+{
+        int fd;
+	struct sockaddr_in sin;
+
+	sin.sin_addr.s_addr = addy;
+	sin.sin_family = AF_INET;
+	sin.sin_port = htons(port);
+	
+	fd = socket(AF_INET, SOCK_STREAM, 0);
+	
+	if (fd > -1) {
+		quad_addr=strdup(inet_ntoa(sin.sin_addr));
+		if (proxy_connect(fd, (struct sockaddr *)&sin, sizeof(sin)) > -1) {
+			return fd;
+		}
+	}
+	return -1;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/oscar.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,399 @@
+/*
+ * gaim
+ *
+ * Some code copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ * libfaim code copyright 1998, 1999 Adam Fritzler <afritz@auk.cx>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifdef USE_OSCAR
+
+#include <netdb.h>
+#include <gtk/gtk.h>
+#include <unistd.h>
+#include <errno.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include "gaim.h"
+#include <aim.h>
+#include "gnome_applet_mgr.h"
+
+struct aim_conn_t *gaim_conn = NULL;
+static int inpa = -1;
+
+int gaim_auth_failure(struct command_rx_struct *command, ...);
+int gaim_auth_success(struct command_rx_struct *command, ...);
+int gaim_serverready_handle(struct command_rx_struct *command, ...);
+int gaim_redirect_handle(struct command_rx_struct *command, ...);
+int gaim_im_handle(struct command_rx_struct *command, ...);
+
+rxcallback_t gaim_callbacks[] = {
+        gaim_im_handle,                 /* incoming IM */
+        NULL,/*gaim_buddy_coming,               oncoming buddy */
+        NULL,/*gaim_buddy_going,                offgoing buddy */
+        NULL,                           /* last IM was missed 1 */
+        NULL,                           /* last IM was missed 2 */
+        NULL,                   /* UNUSED */
+        NULL,                   /* UNUSED */
+        NULL,                   /* UNUSED */
+        gaim_serverready_handle,        /* server ready */
+        NULL,                   /* UNUSED */
+        NULL,                   /* UNUSED */
+        NULL,                   /* UNUSED */
+        NULL,                   /* UNUSED */
+        NULL,                   /* UNUSED */
+        NULL,                   /* UNUSED */
+        gaim_redirect_handle,           /* redirect */
+        NULL,                           /* last command bad */
+        NULL,                           /* missed some messages */
+        NULL,                           /* completely unknown command */
+        NULL, /*gaim_userinfo_handler,           User Info Response */
+        NULL,                           /* Address search response */
+        NULL,                           /* Name search response */
+        NULL,                           /* User Search fail */
+        gaim_auth_failure,              /* auth error */
+        gaim_auth_success,              /* auth success */
+        NULL,                           /* auth server ready */
+        NULL,                           /* ? */
+        NULL,                           /* password change done */
+        gaim_serverready_handle,        /* server ready */
+        0x00
+};
+
+struct client_info_s cinfo;
+
+
+void oscar_close()
+{
+#ifdef USE_APPLET
+	setUserState(offline);
+#endif /* USE_APPLET */
+        set_state(STATE_OFFLINE);
+        aim_conn_close(gaim_conn);
+        if (inpa > 0)
+                gdk_input_remove(inpa);
+	inpa=-1;
+}
+
+
+void oscar_callback(gpointer data, gint source, GdkInputCondition condition)
+{
+        if (aim_get_command() < 0) {
+                signoff();
+                hide_login_progress("Connection Closed");
+                return;
+        } else
+                aim_rxdispatch();
+
+}
+
+int oscar_login(char *username, char *password)
+{
+        char buf[256];
+        struct timeval timeout;
+        time_t lastcycle=0;
+        
+        aim_connrst();
+        aim_register_callbacks(gaim_callbacks);
+
+        aim_conn_getnext()->fd = STDIN_FILENO;
+
+        set_login_progress(1, "Looking up " login_host);
+
+        gaim_conn = aim_newconn(AIM_CONN_TYPE_AUTH, login_host);
+
+        if (!gaim_conn) {
+#ifdef USE_APPLET
+                setUserState(offline);
+#endif /* USE_APPLET */
+                set_state(STATE_OFFLINE);
+                hide_login_progress("Unable to login to AIM");
+                return -1;
+        } else if (gaim_conn->fd == -1) {
+#ifdef USE_APPLET
+                setUserState(offline);
+#endif /* USE_APPLET */
+                set_state(STATE_OFFLINE);
+                
+                if (gaim_conn->status & AIM_CONN_STATUS_RESOLVERR) {
+                        hide_login_progress("Unable to lookup " login_host);
+                } else if (gaim_conn->status & AIM_CONN_STATUS_CONNERR) {
+                        hide_login_progress("Unable to connect to " login_host);
+                }
+                return -1;
+        }
+
+        g_snprintf(buf, sizeof(buf), "Signon: %s",username);
+	
+        set_login_progress(2, buf);
+
+        strcpy(cinfo.clientstring, "libfaim/GAIM, jimduchek@ou.edu, see at http://www.marko.net/gaim");
+        cinfo.major = 0;
+        cinfo.minor = 9;
+        cinfo.build = 7;
+        strcpy(cinfo.country, "us");
+        strcpy(cinfo.lang, "en");
+
+        aim_send_login(gaim_conn, username, password, &cinfo);
+
+        if (!current_user) {
+                current_user = g_new0(struct aim_user, 1);
+                g_snprintf(current_user->username, sizeof(current_user->username), DEFAULT_INFO);
+                aim_users = g_list_append(aim_users, current_user);
+        }
+
+        g_snprintf(current_user->username, sizeof(current_user->username), "%s", username);
+        g_snprintf(current_user->password, sizeof(current_user->password), "%s", password);
+
+        save_prefs();
+
+        inpa = gdk_input_add(gaim_conn->fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, oscar_callback, NULL);
+
+        return 0;
+}
+
+int gaim_auth_success(struct command_rx_struct *command, ...)
+{
+        va_list ap;
+        struct login_phase1_struct *logininfo;
+        struct aim_conn_t *bosconn = NULL;
+        char buf[128];
+
+        va_start(ap, command);
+        logininfo = va_arg(ap, struct login_phase1_struct *);
+        va_end(ap);
+
+        g_snprintf(buf, sizeof(buf), "Auth successful, logging in to %s:", logininfo->BOSIP);
+        set_login_progress(3, buf);
+        
+        printf("          Screen name: %s\n", logininfo->screen_name);
+        printf("       Email addresss: %s\n", logininfo->email);
+        printf("  Registration status: %02i\n", logininfo->regstatus);
+        printf("Connecting to %s, closing auth connection.\n",
+                logininfo->BOSIP);
+
+        aim_conn_close(command->conn);
+
+        gdk_input_remove(inpa);
+
+        if ((bosconn = aim_newconn(AIM_CONN_TYPE_BOS, logininfo->BOSIP))
+            == NULL) {
+#ifdef USE_APPLET
+                setUserState(offline);
+#endif /* USE_APPLET */
+                set_state(STATE_OFFLINE);
+
+                hide_login_progress("Could not connect to BOS: internal error");
+                return(-1);
+        } else if (bosconn->status != 0) {
+#ifdef USE_APPLET
+                setUserState(offline);
+#endif /* USE_APPLET */
+                set_state(STATE_OFFLINE);
+
+                hide_login_progress("Could not connect to BOS");
+                return(-1);
+        } else {
+                aim_auth_sendcookie(bosconn, logininfo->cookie);
+                inpa = gdk_input_add(bosconn->fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, oscar_callback, NULL);
+                set_login_progress(4, "BOS connection established, cookie sent.");
+                return(1);
+        }
+}
+
+int gaim_auth_failure(struct command_rx_struct *command, ...)
+{
+        va_list ap;
+        struct login_phase1_struct      *logininfo;
+        char    *errorurl;
+        short   errorcode;
+
+        va_start(ap, command);
+        logininfo = va_arg(ap, struct login_phase1_struct *);
+        printf("Screen name: %s\n", logininfo->screen_name);
+        errorurl = va_arg(ap, char *);
+        printf("Error URL: %s\n", errorurl);
+        errorcode = va_arg(ap, short);
+        printf("Error code: 0x%02x\n", errorcode);
+        va_end(ap);
+#ifdef USE_APPLET
+        setUserState(offline);
+#endif /* USE_APPLET */
+        set_state(STATE_OFFLINE);
+        hide_login_progress("Authentication Failed");
+
+        aim_conn_close(aim_getconn_type(AIM_CONN_TYPE_AUTH));
+
+        return 1;
+}
+
+int gaim_serverready_handle(struct command_rx_struct *command, ...)
+{
+        switch (command->conn->type) {
+        case AIM_CONN_TYPE_BOS:
+                aim_bos_reqrate(command->conn);
+                aim_bos_ackrateresp(command->conn);
+                aim_bos_setprivacyflags(command->conn, 0x00000003);
+                aim_bos_reqservice(command->conn, AIM_CONN_TYPE_ADS);
+                aim_bos_setgroupperm(NULL, 0x1f);
+                break;
+        case AIM_CONN_TYPE_CHATNAV:
+		break;
+        default:
+		printf("Unknown connection type on serverready\n");
+		break;
+        }
+        return(1);
+
+}
+
+int gaim_redirect_handle(struct command_rx_struct *command, ...)
+{
+        va_list ap;
+        int     serviceid;
+        char    *ip, *cookie;
+
+        va_start(ap, command);
+        serviceid = va_arg(ap, int);
+        ip = va_arg(ap, char *);
+        cookie = va_arg(ap, char *);
+        va_end(ap);
+
+        switch(serviceid) {
+        case 0x0005: {
+                char *buf;
+                char *buf2;
+                char *first = g_malloc(64);
+                char file[1024];
+                FILE *f;
+
+                g_snprintf(file, sizeof(file), "%s/.gaimbuddy", getenv("HOME"));
+        
+                if (!(f = fopen(file,"r"))) {
+                } else {
+                        buf = g_malloc(BUF_LONG);
+                        fread(buf, BUF_LONG, 1, f);
+
+                        parse_toc_buddy_list(buf);
+
+                        build_edit_tree();
+                        build_permit_tree();
+        
+
+                        g_free(buf);
+                }
+                
+
+
+                aim_bos_clientready(command->conn);
+
+		set_login_progress(5, "Logged in.\n");
+#ifdef USE_APPLET
+		if (applet_buddy_auto_show) {
+			show_buddy_list();
+			refresh_buddy_window();
+		} else {
+		}
+
+		set_applet_draw_closed();
+		setUserState(online);
+#else
+		gtk_widget_hide(mainwindow);
+		show_buddy_list();
+		refresh_buddy_window();
+#endif
+		serv_finish_login();
+		gaim_conn = command->conn;
+
+                break;
+        }
+	case 0x0007: {
+		struct aim_conn_t       *tstconn;
+
+		tstconn = aim_newconn(AIM_CONN_TYPE_AUTH, ip);
+		if ((tstconn == NULL) ||
+		    (tstconn->status >= AIM_CONN_STATUS_RESOLVERR)) {
+#ifdef USE_APPLET
+			setUserState(offline);
+#endif /* USE_APPLET */
+			set_state(STATE_OFFLINE);
+			hide_login_progress("Unable to reconnect to authorizer");
+		} else
+			aim_auth_sendcookie(tstconn, cookie);
+		break;
+	}
+	case 0x000d: {
+		struct aim_conn_t       *tstconn;
+
+		tstconn = aim_newconn(AIM_CONN_TYPE_CHATNAV, ip);
+		if ((tstconn == NULL) ||
+		    (tstconn->status >= AIM_CONN_STATUS_RESOLVERR))
+			printf("Unable to connect to chatnav server\n");
+		else
+			aim_auth_sendcookie(
+					    aim_getconn_type(AIM_CONN_TYPE_CHATNAV),
+					    cookie);
+		break;
+	}
+	case 0x000e:
+		printf("CHAT is not yet supported :(\n");
+		break;
+	default:
+		printf("Unknown redirect %#04X\n", serviceid);
+		break;
+	}
+	return(1);
+		
+}
+
+
+
+int gaim_im_handle(struct command_rx_struct *command, ...)
+{
+        time_t  t = 0;
+        char    *screenname, *msg;
+        int     warninglevel, class, idletime, isautoreply;
+        ulong   membersince, onsince;
+        va_list ap;
+
+        va_start(ap, command);
+	screenname = va_arg(ap, char *);
+	msg = va_arg(ap, char *);
+	warninglevel = va_arg(ap, int);
+	class = va_arg(ap, int);
+        membersince = va_arg(ap, ulong);
+        onsince = va_arg(ap, ulong);
+        idletime = va_arg(ap, int);
+        isautoreply = va_arg(ap, int);
+        va_end(ap);
+
+        printf("'%s'\n", msg);
+        
+        serv_got_im(screenname, msg, isautoreply);
+
+        return(1);
+
+
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/plugins.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,95 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * ----------------
+ * The Plug-in plug
+ *
+ * Plugin support is currently being maintained by Mike Saraf
+ * msaraf@dwc.edu
+ *
+ */
+
+#include <string.h>
+#include <sys/time.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include "gaim.h"
+
+/* ------------------ Local Variables -------------------------*/
+
+static GtkWidget *plugins=NULL;
+
+/* --------------- Function Declarations -------------------- */
+
+static void destroy_plugins();
+       void do_plugins(GtkWidget *, void *);
+/* ------------------ Code Below ---------------------------- */
+
+void show_plugins()
+{
+ char *buf = g_malloc(BUF_LEN);
+ 
+ if (!plugins) 
+    {
+     plugins = gtk_file_selection_new("Gaim - Plugin List");
+
+     gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(plugins));
+
+     if(getenv("PLUGIN_DIR") == NULL)
+        {
+         g_snprintf(buf, BUF_LEN - 1, "%s/", getenv("HOME"));
+        }
+     else
+        {
+         g_snprintf(buf, BUF_LEN - 1, "%s/", getenv("PLUGIN_DIR"));
+        }
+
+     gtk_file_selection_set_filename(GTK_FILE_SELECTION(plugins), buf);
+     gtk_signal_connect(GTK_OBJECT(plugins), "destroy",
+                        GTK_SIGNAL_FUNC(destroy_plugins), plugins);
+
+    gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(plugins)->ok_button),
+                       "clicked", GTK_SIGNAL_FUNC(do_plugins), NULL);
+    
+    gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(plugins)->cancel_button),
+                       "clicked", GTK_SIGNAL_FUNC(destroy_plugins),plugins );
+
+   }
+
+ gtk_widget_show(plugins);
+ gdk_window_raise(plugins->window);   
+}
+
+void do_plugins(GtkWidget *w, void *dummy)
+{
+}
+
+static void destroy_plugins()
+{
+ if (plugins)
+    gtk_widget_destroy(plugins);
+
+ plugins = NULL;
+}                  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/prefs.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,1050 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <string.h>
+#include <sys/time.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include "gaim.h"
+#include "proxy.h"
+
+struct prefs_data *pd = NULL;
+struct debug_window *dw = NULL;
+
+GtkWidget *debugbutton;
+
+struct chat_page {
+	GtkWidget *list1;
+	GtkWidget *list2;
+};
+
+
+char debug_buff[BUF_LONG];
+
+void do_chat_page(GtkWidget *page);
+
+void list_clicked( GtkWidget *widget, struct away_message *a);
+void list_unclicked( GtkWidget *widget, struct away_message *a);
+
+
+void remove_away_message(GtkWidget *widget, void *dummy)
+{
+	GList *i;
+	struct away_message *a;
+
+	i = GTK_LIST(pd->away_list)->selection;
+
+	a = gtk_object_get_user_data(GTK_OBJECT(i->data));
+
+	rem_away_mess(NULL, a);
+}
+
+void away_list_clicked( GtkWidget *widget, struct away_message *a)
+{
+	gchar buffer[2048];
+	guint text_len;
+
+	pd->cur_message = a;
+
+	/* Get proper Length */
+	text_len = gtk_text_get_length(GTK_TEXT(pd->away_text));
+	pd->edited_message = gtk_editable_get_chars(GTK_EDITABLE(pd->away_text), 0, text_len);
+
+	/* Clear the Box */
+	gtk_text_set_point(GTK_TEXT(pd->away_text), 0 );
+	gtk_text_forward_delete (GTK_TEXT(pd->away_text), text_len); 
+
+	/* Fill the text box with new message */
+	strcpy(buffer, a->message);
+	gtk_text_insert(GTK_TEXT(pd->away_text), NULL, NULL, NULL, buffer, -1);
+
+
+}
+
+void away_list_unclicked( GtkWidget *widget, struct away_message *a)
+{
+        if (pd == NULL)
+                return;
+	strcpy(a->message, pd->edited_message);
+	save_prefs();
+}
+
+
+void set_option(GtkWidget *w, int *option)
+{
+	*option = !(*option);
+}
+
+void set_display_option(GtkWidget *w, int *option)
+{
+        display_options = display_options ^ (int)option;
+	save_prefs();
+}
+
+void set_sound_option(GtkWidget *w, int *option)
+{
+	sound_options = sound_options ^ (int)option;
+	save_prefs();
+}
+
+void set_font_option(GtkWidget *w, int *option)
+{
+	font_options = font_options ^ (int)option;
+
+	update_font_buttons();	
+
+	save_prefs();
+}
+
+void set_general_option(GtkWidget *w, int *option)
+{
+	general_options = general_options ^ (int)option;
+
+       	if ((int)option == OPT_GEN_SHOW_LAGMETER)
+       		update_lagometer(-1);
+       	if ((int)option == OPT_GEN_LOG_ALL)
+       		update_log_convs();
+	save_prefs();
+
+	/*
+        if (data == &show_grp_nums)
+		update_num_groups();
+	if (data == &showidle || data == &showpix)
+		update_show_idlepix();
+	if (data == &button_pix)
+                update_button_pix();
+        if (data == &transparent)
+                update_transparency();
+          */
+        
+}
+
+
+static gint debug_delete(GtkWidget *w, GdkEvent *event, void *dummy)
+{
+	if(debugbutton && (general_options & OPT_GEN_DEBUG))
+	{
+		gtk_button_clicked(GTK_BUTTON(debugbutton));
+	}
+	g_free(dw);
+	dw=NULL;
+	return FALSE;
+
+}
+
+static gint handle_delete(GtkWidget *w, GdkEvent *event, void *dummy)
+{
+	guint text_len;
+	struct away_message *a;
+
+
+        if (pd->cur_message) {
+        
+		a = pd->cur_message;
+
+
+		/* Get proper Length and grab data */
+		text_len = gtk_text_get_length(GTK_TEXT(pd->away_text));
+		pd->edited_message = gtk_editable_get_chars(GTK_EDITABLE(pd->away_text), 0, text_len);
+
+		/* Store the data for later use */
+		strcpy(a->message, pd->edited_message);
+
+	}
+	
+	save_prefs();
+
+	if (event == NULL)
+	{
+		gtk_widget_destroy(pd->window);
+		debugbutton=NULL;
+	}
+	g_free(pd);
+	pd = NULL;
+
+	
+        return FALSE;
+}
+
+static int
+manualentry_key_pressed(GtkWidget *w, GdkEvent *event, void *dummy)
+{
+        g_snprintf(web_command, sizeof(web_command), "%s", gtk_entry_get_text(GTK_ENTRY(pd->browser_entry)));
+        save_prefs();
+	return TRUE;
+}
+
+static int
+connection_key_pressed(GtkWidget *w, GdkEvent *event, void *dummy)
+{
+	g_snprintf(aim_host, sizeof(aim_host), "%s", gtk_entry_get_text(GTK_ENTRY(pd->aim_host_entry)));
+	sscanf(gtk_entry_get_text(GTK_ENTRY(pd->aim_port_entry)), "%d", &aim_port);
+	g_snprintf(proxy_host, sizeof(proxy_host), "%s", gtk_entry_get_text(GTK_ENTRY(pd->http_proxy_host_entry)));
+	sscanf(gtk_entry_get_text(GTK_ENTRY(pd->http_proxy_port_entry)), "%d", &proxy_port);
+
+	g_snprintf(login_host, sizeof(login_host), "%s", gtk_entry_get_text(GTK_ENTRY(pd->login_host_entry)));
+	sscanf(gtk_entry_get_text(GTK_ENTRY(pd->login_port_entry)), "%d", &login_port);	
+	save_prefs();
+	return TRUE;
+}
+
+
+
+                   
+static void set_browser(GtkWidget *w, int *data)
+{
+	web_browser = (int)data;
+        if (web_browser != BROWSER_MANUAL) {
+                if (pd->browser_entry)
+                        gtk_widget_set_sensitive(pd->browser_entry, FALSE);
+        } else {
+                if (pd->browser_entry)
+                        gtk_widget_set_sensitive(pd->browser_entry, TRUE);
+        }
+        
+        if (web_browser != BROWSER_NETSCAPE) {
+                if (pd->nwbutton)
+                        gtk_widget_set_sensitive(pd->nwbutton, FALSE);
+        } else {
+                if (pd->nwbutton)
+                        gtk_widget_set_sensitive(pd->nwbutton, TRUE);
+        }
+        
+
+        save_prefs();
+}
+
+static void set_connect(GtkWidget *w, int *data)
+{
+	proxy_type = (int)data;
+	if (proxy_type == PROXY_HTTP) {
+                if (pd->http_proxy_host_entry)
+                        gtk_widget_set_sensitive(pd->http_proxy_host_entry, TRUE);
+		if (pd->http_proxy_port_entry)
+			gtk_widget_set_sensitive(pd->http_proxy_port_entry, TRUE);
+
+	} else {
+                if (pd->http_proxy_host_entry)
+                        gtk_widget_set_sensitive(pd->http_proxy_host_entry, FALSE);
+		if (pd->http_proxy_port_entry)
+			gtk_widget_set_sensitive(pd->http_proxy_port_entry, FALSE);
+
+	}
+        
+        save_prefs();
+}
+
+static void set_idle(GtkWidget *w, int *data)
+{
+	report_idle = (int)data;
+        save_prefs();
+}
+
+
+GtkWidget *gaim_button(const char *text, int *options, int option, GtkWidget *page)
+{
+	GtkWidget *button;
+	button = gtk_check_button_new_with_label(text);
+	gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (*options & option));
+	gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0);
+
+	if (options == &font_options)
+		gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_font_option), (int *)option);
+
+	if (options == &sound_options)
+		gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_sound_option), (int *)option);
+	if (options == &display_options)
+		gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_display_option), (int *)option);
+
+	if (options == &general_options)
+		gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_general_option), (int *)option);
+	gtk_widget_show(button);
+
+	return button;
+}
+
+
+void build_prefs()
+{
+	GtkWidget *bbox;
+	GtkWidget *vbox;
+	GtkWidget *hbox;
+        GtkWidget *hbox2;
+        GtkWidget *idlebox;
+        GtkWidget *idleframe;
+        GtkWidget *genbox;
+	GtkWidget *fontbox;
+	GtkWidget *fontframe;
+	GtkWidget *appbox;
+	GtkWidget *away_topbox;
+	GtkWidget *away_botbox;
+	GtkWidget *add_away;
+	GtkWidget *remove_away;
+	GtkWidget *close;
+	GtkWidget *notebook;
+	GtkWidget *sound_page;
+	/* GtkWidget *debug_page; */
+	GtkWidget *general_page;
+	GtkWidget *appearance_page;
+	GtkWidget *chat_page;
+        GtkWidget *browser_page;
+        GtkWidget *connection_page;
+        GtkWidget *label;
+        GtkWidget *browseropt;
+        GtkWidget *connectopt;
+        GtkWidget *idleopt;
+	        
+        GList *awy = away_messages;
+        struct away_message *a;
+        GtkWidget *sw;
+	GtkWidget *sw2;
+	GtkWidget *away_page;
+
+	GtkWidget *list_item;
+
+	gchar buffer[64];
+
+
+	if (!pd)
+                pd = g_new0(struct prefs_data, 1);
+
+	pd->window = gtk_window_new(GTK_WINDOW_DIALOG);
+        gtk_widget_realize(pd->window);
+	aol_icon(pd->window->window);
+	gtk_container_border_width(GTK_CONTAINER(pd->window), 10);
+	gtk_window_set_title(GTK_WINDOW(pd->window), "Gaim - Preferences");
+	
+        vbox = gtk_vbox_new(FALSE, 5);
+        gtk_container_add(GTK_CONTAINER(pd->window), vbox);
+
+	/* Notebooks */
+	notebook = gtk_notebook_new();
+	gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 5);
+
+
+	/* General page */
+	general_page = gtk_hbox_new(FALSE, 0);
+	label = gtk_label_new("General");
+	gtk_widget_show(label);
+        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), general_page, label);
+
+        genbox = gtk_vbox_new(FALSE, 5);
+        idleframe = gtk_frame_new("Idle");
+        idlebox = gtk_vbox_new(FALSE, 5);
+
+        gtk_box_pack_start(GTK_BOX(general_page), genbox, TRUE, TRUE, 5);
+        gtk_box_pack_start(GTK_BOX(general_page), idleframe, TRUE, TRUE, 5);
+        gtk_container_add(GTK_CONTAINER(idleframe), idlebox);
+
+        
+	gaim_button("Enter sends message", &general_options, OPT_GEN_ENTER_SENDS, genbox);
+	gaim_button("Auto-login", &general_options, OPT_GEN_AUTO_LOGIN, genbox);
+	gaim_button("Log All Conversations", &general_options, OPT_GEN_LOG_ALL, genbox);
+	gaim_button("Strip HTML from log files", &general_options, OPT_GEN_STRIP_HTML, genbox);
+#ifdef USE_APPLET
+	gaim_button("Automatically Show Buddy List", &applet_buddy_auto_show, genbox);
+#endif
+	gaim_button("Raise windows when message recieved", &general_options, OPT_GEN_POPUP_WINDOWS, genbox);
+        gaim_button("Send URLs as links", &general_options, OPT_GEN_SEND_LINKS, genbox);
+	gaim_button("Show Lag-O-Meter", &general_options, OPT_GEN_SHOW_LAGMETER, genbox);
+        gaim_button("Save some window size/positions", &general_options, OPT_GEN_SAVED_WINDOWS, genbox);
+        gaim_button("Ignore new conversations when away", &general_options, OPT_GEN_DISCARD_WHEN_AWAY, genbox);
+        debugbutton = gaim_button("Enable debug mode", &general_options, OPT_GEN_DEBUG, genbox);
+
+
+        idleopt = gtk_radio_button_new_with_label(NULL, "No Idle");
+        gtk_box_pack_start(GTK_BOX(idlebox), idleopt, FALSE, FALSE, 0);
+        gtk_signal_connect(GTK_OBJECT(idleopt), "clicked", GTK_SIGNAL_FUNC(set_idle), (void *)IDLE_NONE);
+	gtk_widget_show(idleopt);
+        if (report_idle == IDLE_NONE)
+                gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(idleopt), TRUE);
+
+        idleopt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(idleopt)), "GAIM Use");
+        gtk_box_pack_start(GTK_BOX(idlebox), idleopt, FALSE, FALSE, 0);
+        gtk_signal_connect(GTK_OBJECT(idleopt), "clicked", GTK_SIGNAL_FUNC(set_idle), (void *)IDLE_GAIM);
+	gtk_widget_show(idleopt);
+        if (report_idle == IDLE_GAIM)
+                gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(idleopt), TRUE);
+
+/*        idleopt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(idleopt)), "X Use");
+        gtk_box_pack_start(GTK_BOX(idlebox), idleopt, FALSE, FALSE, 0);
+        gtk_signal_connect(GTK_OBJECT(idleopt), "clicked", GTK_SIGNAL_FUNC(set_idle), (void *)IDLE_SYSTEM);
+	gtk_widget_show(idleopt);
+        if (report_idle == IDLE_SYSTEM)
+                gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(idleopt), TRUE);
+*/
+        
+        gtk_widget_show(general_page);
+        gtk_widget_show(genbox);
+        gtk_widget_show(idlebox);
+        gtk_widget_show(idleframe);
+
+
+//        gtk_signal_connect_object( GTK_OBJECT(debugbutton), "clicked", GTK_SIGNAL_FUNC(show_debug), NULL);
+
+        /* Connection */
+        
+        connection_page = gtk_vbox_new(FALSE, 0);
+        label = gtk_label_new("Connection");
+        gtk_widget_show(label);
+	gtk_notebook_append_page(GTK_NOTEBOOK(notebook), connection_page, label);
+
+	hbox = gtk_hbox_new(FALSE, 0);
+	label = gtk_label_new("TOC Host:");
+	gtk_widget_show(label);
+	gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
+        pd->aim_host_entry = gtk_entry_new();
+        gtk_widget_show(pd->aim_host_entry);
+	gtk_box_pack_start(GTK_BOX(hbox), pd->aim_host_entry, FALSE, FALSE, 0);
+
+	label = gtk_label_new("Port:");
+	gtk_widget_show(label);
+	gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
+        pd->aim_port_entry = gtk_entry_new();
+        gtk_widget_show(pd->aim_port_entry);
+	gtk_box_pack_start(GTK_BOX(hbox), pd->aim_port_entry, FALSE, FALSE, 0);
+	gtk_widget_show(hbox);
+	
+	gtk_box_pack_start(GTK_BOX(connection_page), hbox, FALSE, FALSE, 0);
+	gtk_entry_set_text(GTK_ENTRY(pd->aim_host_entry), aim_host);
+
+	g_snprintf(buffer, sizeof(buffer), "%d", aim_port);
+	gtk_entry_set_text(GTK_ENTRY(pd->aim_port_entry), buffer);
+        
+        hbox2 = gtk_hbox_new(FALSE, 0);
+        label = gtk_label_new("Login Host:");
+        gtk_widget_show(label);
+        gtk_box_pack_start(GTK_BOX(hbox2), label, FALSE, FALSE, 5);
+        pd->login_host_entry = gtk_entry_new();
+        gtk_widget_show(pd->login_host_entry);
+        gtk_box_pack_start(GTK_BOX(hbox2), pd->login_host_entry, FALSE, FALSE, 0);
+
+        label = gtk_label_new("Port:");
+        gtk_widget_show(label);
+        gtk_box_pack_start(GTK_BOX(hbox2), label, FALSE, FALSE, 5);
+        pd->login_port_entry = gtk_entry_new();
+        gtk_widget_show(pd->login_port_entry);
+        gtk_box_pack_start(GTK_BOX(hbox2), pd->login_port_entry, FALSE, FALSE, 0);
+        gtk_widget_show(hbox2);
+
+        gtk_box_pack_start(GTK_BOX(connection_page), hbox2, FALSE, FALSE, 0);
+        gtk_entry_set_text(GTK_ENTRY(pd->login_host_entry), login_host);
+
+        g_snprintf(buffer, sizeof(buffer), "%d", login_port);
+        gtk_entry_set_text(GTK_ENTRY(pd->login_port_entry), buffer);
+
+        connectopt = gtk_radio_button_new_with_label(NULL, "No Proxy");
+        gtk_box_pack_start(GTK_BOX(connection_page), connectopt, FALSE, FALSE, 0);
+        gtk_signal_connect(GTK_OBJECT(connectopt), "clicked", GTK_SIGNAL_FUNC(set_connect), (void *)PROXY_NONE);
+	gtk_widget_show(connectopt);
+        if (proxy_type == PROXY_NONE)
+                gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(connectopt), TRUE);
+
+        connectopt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(connectopt)), "HTTP Proxy");
+        gtk_box_pack_start(GTK_BOX(connection_page), connectopt, FALSE, FALSE, 0);
+        gtk_signal_connect(GTK_OBJECT(connectopt), "clicked", GTK_SIGNAL_FUNC(set_connect), (void *)PROXY_HTTP);
+	gtk_widget_show(connectopt);
+	if (proxy_type == PROXY_HTTP)
+                gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(connectopt), TRUE);
+
+
+	hbox = gtk_hbox_new(FALSE, 0);
+	label = gtk_label_new("Proxy Host:");
+	gtk_widget_show(label);
+	gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
+        pd->http_proxy_host_entry = gtk_entry_new();
+        gtk_widget_show(pd->http_proxy_host_entry);
+	gtk_box_pack_start(GTK_BOX(hbox), pd->http_proxy_host_entry, FALSE, FALSE, 0);
+
+	label = gtk_label_new("Port:");
+	gtk_widget_show(label);
+	gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
+        pd->http_proxy_port_entry = gtk_entry_new();
+        gtk_widget_show(pd->http_proxy_port_entry);
+	gtk_box_pack_start(GTK_BOX(hbox), pd->http_proxy_port_entry, FALSE, FALSE, 0);
+	gtk_widget_show(hbox);
+	
+	gtk_box_pack_start(GTK_BOX(connection_page), hbox, FALSE, FALSE, 0);
+	gtk_entry_set_text(GTK_ENTRY(pd->http_proxy_host_entry), proxy_host);
+
+	g_snprintf(buffer, sizeof(buffer), "%d", proxy_port);
+	gtk_entry_set_text(GTK_ENTRY(pd->http_proxy_port_entry), buffer);
+
+
+	gtk_widget_show(connection_page);
+
+
+	if (proxy_type == PROXY_HTTP) {
+                if (pd->http_proxy_host_entry)
+                        gtk_widget_set_sensitive(pd->http_proxy_host_entry, TRUE);
+		if (pd->http_proxy_port_entry)
+			gtk_widget_set_sensitive(pd->http_proxy_port_entry, TRUE);
+
+	} else {
+                if (pd->http_proxy_host_entry)
+                        gtk_widget_set_sensitive(pd->http_proxy_host_entry, FALSE);
+		if (pd->http_proxy_port_entry)
+			gtk_widget_set_sensitive(pd->http_proxy_port_entry, FALSE);
+
+	}
+
+	
+
+	gtk_signal_connect(GTK_OBJECT(pd->aim_host_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL);
+        gtk_signal_connect(GTK_OBJECT(pd->aim_port_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL);
+	gtk_signal_connect(GTK_OBJECT(pd->login_host_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL);
+	gtk_signal_connect(GTK_OBJECT(pd->login_port_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL);
+	gtk_signal_connect(GTK_OBJECT(pd->http_proxy_host_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL);
+        gtk_signal_connect(GTK_OBJECT(pd->http_proxy_port_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL);
+
+	
+	/* Away */
+	
+        a = awaymessage;
+        pd->cur_message = NULL;
+        pd->nwbutton = NULL;
+        pd->browser_entry = NULL;
+        
+	away_page = gtk_vbox_new(FALSE, 0);
+	away_topbox = gtk_hbox_new(FALSE, 0);
+	away_botbox = gtk_hbox_new(FALSE, 0);
+
+	label = gtk_label_new("Away");
+	gtk_widget_show(label);
+	gtk_notebook_append_page(GTK_NOTEBOOK(notebook), away_page, label);
+	gtk_widget_show(away_page);
+
+	sw2 = gtk_scrolled_window_new(NULL, NULL);
+    	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2),
+				       GTK_POLICY_AUTOMATIC,
+				       GTK_POLICY_AUTOMATIC);
+	gtk_widget_show(sw2);
+
+	pd->away_list = gtk_list_new();
+	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw2), pd->away_list);
+	gtk_box_pack_start(GTK_BOX(away_topbox), sw2, TRUE, TRUE, 0);
+
+	sw = gtk_scrolled_window_new(NULL, NULL);
+    	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
+				       GTK_POLICY_AUTOMATIC,
+				       GTK_POLICY_AUTOMATIC);
+	gtk_widget_show(sw);
+    
+	pd->away_text = gtk_text_new(NULL, NULL);
+	gtk_container_add(GTK_CONTAINER(sw), pd->away_text);
+	gtk_box_pack_start(GTK_BOX(away_topbox), sw, TRUE, TRUE, 0);
+	gtk_text_set_word_wrap(GTK_TEXT(pd->away_text), TRUE);
+	gtk_text_set_editable(GTK_TEXT(pd->away_text), TRUE );
+
+	add_away = gtk_button_new_with_label("Create Message");
+	gtk_signal_connect(GTK_OBJECT(add_away), "clicked", GTK_SIGNAL_FUNC(create_away_mess), NULL);
+	gtk_box_pack_start(GTK_BOX(away_botbox), add_away, TRUE, FALSE, 5);
+
+	remove_away = gtk_button_new_with_label("Remove Message");
+	gtk_signal_connect(GTK_OBJECT(remove_away), "clicked", GTK_SIGNAL_FUNC(remove_away_message), NULL);
+	gtk_box_pack_start(GTK_BOX(away_botbox), remove_away, TRUE, FALSE, 5);
+
+	gtk_box_pack_start(GTK_BOX(away_page), away_topbox, TRUE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX(away_page), away_botbox, FALSE, FALSE, 0);
+
+	gtk_widget_show(add_away);
+	gtk_widget_show(remove_away);
+	gtk_widget_show(pd->away_list);
+	gtk_widget_show(pd->away_text);
+	gtk_widget_show(away_topbox);
+	gtk_widget_show(away_botbox);
+    
+	if (awy != NULL) {
+		a = (struct away_message *)awy->data;
+		g_snprintf(buffer, sizeof(buffer), "%s", a->message);
+		gtk_text_insert(GTK_TEXT(pd->away_text), NULL, NULL, NULL, buffer, -1);
+	}
+
+        while(awy) {
+		a = (struct away_message *)awy->data;
+		label = gtk_label_new(a->name);
+		list_item = gtk_list_item_new();
+		gtk_container_add(GTK_CONTAINER(list_item), label);
+		gtk_signal_connect(GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(away_list_clicked), a);
+		gtk_signal_connect(GTK_OBJECT(list_item), "deselect", GTK_SIGNAL_FUNC(away_list_unclicked), a);
+		gtk_object_set_user_data(GTK_OBJECT(list_item), a);
+               
+		gtk_widget_show(label);
+		gtk_container_add(GTK_CONTAINER(pd->away_list), list_item);
+		gtk_widget_show(list_item);
+	
+		awy = awy->next;
+
+	}
+       
+	/* Sound */
+	sound_page = gtk_vbox_new(FALSE, 0);
+	label = gtk_label_new("Sounds");
+	gtk_widget_show(label);
+	gtk_notebook_append_page(GTK_NOTEBOOK(notebook), sound_page, label);
+        gaim_button("Sound when buddy logs in", &sound_options, OPT_SOUND_LOGIN, sound_page);
+	gaim_button("Sound when buddy logs out", &sound_options, OPT_SOUND_LOGOUT, sound_page);
+        gaim_button("Sound when message is received", &sound_options, OPT_SOUND_RECV, sound_page);
+	gaim_button("Sound when message is sent", &sound_options, OPT_SOUND_SEND, sound_page);
+        gaim_button("Sound when first message is received", &sound_options, OPT_SOUND_FIRST_RCV, sound_page);
+        gaim_button("Sound when message is received if away", &sound_options, OPT_SOUND_WHEN_AWAY, sound_page);
+        gtk_widget_show(sound_page);
+
+
+        /* Browser */
+        browser_page = gtk_vbox_new(FALSE, 0);
+
+        label = gtk_label_new("Browser");
+        gtk_widget_show(label);
+        
+
+        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), browser_page, label);
+        browseropt = gtk_radio_button_new_with_label(NULL, "Netscape");
+        gtk_box_pack_start(GTK_BOX(browser_page), browseropt, FALSE, FALSE, 0);
+        gtk_signal_connect(GTK_OBJECT(browseropt), "clicked", GTK_SIGNAL_FUNC(set_browser), (void *)BROWSER_NETSCAPE);
+	gtk_widget_show(browseropt);
+        if (web_browser == BROWSER_NETSCAPE)
+                gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(browseropt), TRUE);
+
+        browseropt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(browseropt)), "KFM (The KDE browser)");
+        gtk_box_pack_start(GTK_BOX(browser_page), browseropt, FALSE, FALSE, 0);
+        gtk_signal_connect(GTK_OBJECT(browseropt), "clicked", GTK_SIGNAL_FUNC(set_browser), (void *)BROWSER_KFM);
+	gtk_widget_show(browseropt);
+	if (web_browser == BROWSER_KFM)
+                gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(browseropt), TRUE);
+
+
+        browseropt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(browseropt)), "Internal HTML widget (Quite likely a bad idea!)");
+        gtk_box_pack_start(GTK_BOX(browser_page), browseropt, FALSE, FALSE, 0);
+        gtk_signal_connect(GTK_OBJECT(browseropt), "clicked", GTK_SIGNAL_FUNC(set_browser), (void *)BROWSER_INTERNAL);
+	gtk_widget_show(browseropt);
+	if (web_browser == BROWSER_INTERNAL)
+                gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(browseropt), TRUE);
+
+        
+        browseropt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(browseropt)), "Manual");
+        gtk_box_pack_start(GTK_BOX(browser_page), browseropt, FALSE, FALSE, 0);
+        gtk_signal_connect(GTK_OBJECT(browseropt), "clicked", GTK_SIGNAL_FUNC(set_browser), (void *)BROWSER_MANUAL);
+        gtk_widget_show(browseropt);
+	if (web_browser == BROWSER_MANUAL)
+                gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(browseropt), TRUE);
+
+
+        pd->browser_entry = gtk_entry_new();
+        gtk_widget_show(pd->browser_entry);
+
+        gtk_box_pack_start(GTK_BOX(browser_page), pd->browser_entry, FALSE, FALSE, 0);
+        gtk_entry_set_text(GTK_ENTRY(pd->browser_entry), web_command);
+
+	pd->nwbutton = gaim_button("Pop up new window by default", &general_options, OPT_GEN_BROWSER_POPUP, browser_page);
+	gtk_widget_show(browser_page);
+
+        gtk_signal_connect(GTK_OBJECT(pd->browser_entry), "focus_out_event", GTK_SIGNAL_FUNC(manualentry_key_pressed), NULL);
+
+        
+
+        if (web_browser != BROWSER_MANUAL) {
+                gtk_widget_set_sensitive(pd->browser_entry, FALSE);
+        } else {
+                gtk_widget_set_sensitive(pd->browser_entry, TRUE);
+        }
+        
+        if (web_browser != BROWSER_NETSCAPE) {
+                gtk_widget_set_sensitive(pd->nwbutton, FALSE);
+        } else {
+                gtk_widget_set_sensitive(pd->nwbutton, TRUE);
+        }
+        
+
+
+
+	/* Appearance */
+	appearance_page = gtk_hbox_new(FALSE, 0);
+        label = gtk_label_new("Appearance");
+        gtk_widget_show(label);
+	gtk_notebook_append_page(GTK_NOTEBOOK(notebook), appearance_page, label);
+	appbox = gtk_vbox_new(FALSE, 5);
+	fontframe = gtk_frame_new("Font Properties");
+	fontbox = gtk_vbox_new(FALSE, 5);
+
+	gtk_box_pack_start(GTK_BOX(appearance_page), appbox, TRUE, TRUE, 5);
+	gtk_box_pack_start(GTK_BOX(appearance_page), fontframe, TRUE, TRUE, 5);
+	gtk_container_add(GTK_CONTAINER(fontframe), fontbox);
+
+	gaim_button("Show time on messages", &display_options, OPT_DISP_SHOW_TIME, appbox);
+	gaim_button("Show numbers in groups", &display_options, OPT_DISP_SHOW_GRPNUM, appbox );
+	gaim_button("Show buddy-type pixmaps", &display_options, OPT_DISP_SHOW_PIXMAPS, appbox );
+	gaim_button("Show idle times", &display_options, OPT_DISP_SHOW_IDLETIME, appbox );
+	gaim_button("Show button pixmaps", &display_options, OPT_DISP_SHOW_BUTTON_XPM, appbox );
+	gaim_button("Ignore incoming colours", &display_options, OPT_DISP_IGNORE_COLOUR, appbox );
+#if 0
+	gaim_button("Transparent text window (experimental)", &transparent, appbox );
+#endif
+	gaim_button("Show logon/logoffs in conversation windows", &display_options, OPT_DISP_SHOW_LOGON, appbox );
+	
+	
+	gaim_button("Bold Text", &font_options, OPT_FONT_BOLD, fontbox);
+	gaim_button("Italics Text", &font_options, OPT_FONT_ITALIC, fontbox);
+	gaim_button("Underlined Text", &font_options, OPT_FONT_UNDERLINE, fontbox);
+	gaim_button("Strike Text", &font_options, OPT_FONT_STRIKE, fontbox);
+
+	gtk_widget_show(appearance_page);
+	gtk_widget_show(fontbox);
+	gtk_widget_show(fontframe);
+	gtk_widget_show(appbox);	
+
+
+	/* Buddy Chats */
+	chat_page = gtk_vbox_new(FALSE, 0);
+	label = gtk_label_new("Buddy Chats");
+
+	gtk_widget_show(label);
+	gtk_notebook_append_page(GTK_NOTEBOOK(notebook), chat_page, label);
+	
+	do_chat_page(chat_page);
+	gtk_widget_show(chat_page);
+	
+	bbox = gtk_hbox_new(FALSE, 5);
+	close = gtk_button_new_with_label("Close");
+	
+	/* Pack the button(s) in the button box */
+	gtk_box_pack_end(GTK_BOX(bbox), close, FALSE, FALSE, 5);
+	gtk_box_pack_start(GTK_BOX(vbox),bbox, FALSE, FALSE, 5);
+
+	gtk_widget_show(notebook);
+        gtk_widget_show(close);
+
+	gtk_widget_show(bbox);
+	gtk_widget_show(vbox);
+
+	gtk_signal_connect(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(handle_delete), NULL);
+        gtk_signal_connect(GTK_OBJECT(pd->window),"delete_event", GTK_SIGNAL_FUNC(handle_delete), NULL);
+
+}
+
+void show_prefs()
+{
+	if (!pd || !pd->window)
+		build_prefs();
+	gtk_widget_show(pd->window);
+}
+void add_chat(GtkWidget *w, struct chat_page *cp)
+{
+	GList *sel = GTK_LIST(cp->list1)->selection;
+	struct chat_room *cr, *cr2;
+	GList *crs = chat_rooms;
+        GtkWidget *item;
+
+	if (sel) {
+		cr = (struct chat_room *)gtk_object_get_user_data(GTK_OBJECT(sel->data));
+	} else
+		return;
+
+	while(crs) {
+		cr2 = (struct chat_room *)crs->data;
+		if (!strcasecmp(cr->name, cr2->name))
+                        return;
+                crs = crs->next;
+	}
+	item = gtk_list_item_new_with_label(cr->name);
+	cr2 = g_new0(struct chat_room, 1);
+	strcpy(cr2->name, cr->name);
+	cr2->exchange = cr->exchange;
+	gtk_object_set_user_data(GTK_OBJECT(item), cr2);
+	gtk_widget_show(item);
+	sel = g_list_append(NULL, item);
+	gtk_list_append_items(GTK_LIST(cp->list2), sel);
+	chat_rooms = g_list_append(chat_rooms, cr2);
+
+	setup_buddy_chats();
+	save_prefs();
+	
+
+}
+
+void remove_chat(GtkWidget *w, struct chat_page *cp)
+{
+	GList *sel = GTK_LIST(cp->list2)->selection;
+	struct chat_room *cr;
+	GList *crs;
+	GtkWidget *item;
+	
+	if (sel) {
+		item = (GtkWidget *)sel->data;
+		cr = (struct chat_room *)gtk_object_get_user_data(GTK_OBJECT(item));
+	} else
+		return;
+
+	chat_rooms = g_list_remove(chat_rooms, cr);
+
+
+	gtk_list_clear_items(GTK_LIST(cp->list2), 0, -1);
+
+	if (g_list_length(chat_rooms) == 0)
+		chat_rooms = NULL;
+
+	crs = chat_rooms;
+
+	while(crs) {
+		cr = (struct chat_room *)crs->data;
+		item = gtk_list_item_new_with_label(cr->name);
+		gtk_object_set_user_data(GTK_OBJECT(item), cr);
+		gtk_widget_show(item);
+		gtk_list_append_items(GTK_LIST(cp->list2), g_list_append(NULL, item));
+
+		
+		crs = crs->next;
+	}
+
+	setup_buddy_chats();
+        save_prefs();
+}
+
+void refresh_list(GtkWidget *w, struct chat_page *cp)
+{
+	char *text = grab_url("http://www.aol.com/community/chat/allchats.html");
+	char *c;
+	int len = strlen(text);
+	GtkWidget *item;
+	GList *items = GTK_LIST(cp->list1)->children;
+	struct chat_room *cr;
+	c = text;
+
+	while(items) {
+		g_free(gtk_object_get_user_data(GTK_OBJECT(items->data)));
+		items = items->next;
+	}
+
+	items = NULL;
+
+        gtk_list_clear_items(GTK_LIST(cp->list1), 0, -1);
+	
+	item = gtk_list_item_new_with_label("Gaim Chat");
+	cr = g_new0(struct chat_room, 1);
+	strcpy(cr->name, "Gaim Chat");
+	cr->exchange = 4;
+	gtk_object_set_user_data(GTK_OBJECT(item), cr);
+	gtk_widget_show(item);
+
+        items = g_list_append(NULL, item);
+	
+	while(c) {
+		if (c - text > len - 30)
+			break; /* assume no chat rooms 30 from end, padding */
+		if (!strncasecmp(AOL_SRCHSTR, c, strlen(AOL_SRCHSTR))) {
+			char *t;
+			int len=0;
+			int exchange;
+			char *name = NULL;
+			
+			c += strlen(AOL_SRCHSTR);
+                        t = c;
+			while(t) {
+				len++;
+				name = g_realloc(name, len);
+				if (*t == '+')
+					name[len - 1] = ' ';
+				else if (*t == '&') {
+					name[len - 1] = 0;
+					sscanf(t, "&Exchange=%d", &exchange);
+					c = t + strlen("&Exchange=x");
+					break;
+				} else
+					name[len - 1] = *t;
+				t++;
+			}
+			cr = g_new0(struct chat_room, 1);
+			strcpy(cr->name, name);
+			cr->exchange = exchange;
+			item = gtk_list_item_new_with_label(name);
+			gtk_widget_show(item);
+			items = g_list_append(items, item);
+			gtk_object_set_user_data(GTK_OBJECT(item), cr);
+                        g_free(name);
+		}
+		c++;
+	}
+	gtk_list_append_items(GTK_LIST(cp->list1), items);
+	g_free(text);
+}
+
+
+
+void do_chat_page(GtkWidget *page)
+{
+	GtkWidget *table;
+	GtkWidget *rem_button, *add_button, *ref_button;
+	GtkWidget *list1, *list2;
+	GtkWidget *label;
+	GtkWidget *sw1, *sw2;
+	GtkWidget *item;
+	struct chat_page *cp = g_new0(struct chat_page, 1);
+	GList *crs = chat_rooms;
+	GList *items = NULL;
+	struct chat_room *cr;
+
+	table = gtk_table_new(4, 2, FALSE);
+	gtk_widget_show(table);
+	
+
+	gtk_box_pack_start(GTK_BOX(page), table, TRUE, TRUE, 0);
+
+
+	list1 = gtk_list_new();
+	list2 = gtk_list_new();
+	sw1 = gtk_scrolled_window_new(NULL, NULL);
+	sw2 = gtk_scrolled_window_new(NULL, NULL);
+	ref_button = gtk_button_new_with_label("Refresh");
+	add_button = gtk_button_new_with_label("Add");
+	rem_button = gtk_button_new_with_label("Remove");
+	gtk_widget_show(list1);
+	gtk_widget_show(sw1);
+	gtk_widget_show(list2);
+	gtk_widget_show(sw2);
+	gtk_widget_show(ref_button);
+	gtk_widget_show(add_button);
+	gtk_widget_show(rem_button);
+
+	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw1), list1);
+	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw2), list2);
+
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw1),
+				       GTK_POLICY_AUTOMATIC,GTK_POLICY_ALWAYS);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2),
+				       GTK_POLICY_AUTOMATIC,GTK_POLICY_ALWAYS);
+
+	cp->list1 = list1;
+	cp->list2 = list2;
+
+	gtk_signal_connect(GTK_OBJECT(ref_button), "clicked",
+			   GTK_SIGNAL_FUNC(refresh_list), cp);
+	gtk_signal_connect(GTK_OBJECT(rem_button), "clicked",
+			   GTK_SIGNAL_FUNC(remove_chat), cp);
+	gtk_signal_connect(GTK_OBJECT(add_button), "clicked",
+			   GTK_SIGNAL_FUNC(add_chat), cp);
+
+
+	
+	label = gtk_label_new("List of available chats");
+	gtk_widget_show(label);
+
+	gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
+			 GTK_SHRINK, GTK_SHRINK, 0, 0);
+	gtk_table_attach(GTK_TABLE(table), ref_button, 0, 1, 1, 2,
+			 GTK_SHRINK, GTK_SHRINK, 0, 0);
+	gtk_table_attach(GTK_TABLE(table), sw1, 0, 1, 2, 3,
+			 GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
+			 5, 5);
+	gtk_table_attach(GTK_TABLE(table), add_button, 0, 1, 3, 4,
+			 GTK_SHRINK, GTK_SHRINK, 0, 0);
+
+	
+	label = gtk_label_new("List of subscribed chats");
+	gtk_widget_show(label);
+	
+	gtk_table_attach(GTK_TABLE(table), label, 1, 2, 0, 1,
+			 GTK_SHRINK, GTK_SHRINK, 0, 0);
+	gtk_table_attach(GTK_TABLE(table), sw2, 1, 2, 2, 3,
+			 GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
+			 5, 5);
+	gtk_table_attach(GTK_TABLE(table), rem_button, 1, 2, 3, 4,
+			 GTK_SHRINK, GTK_SHRINK, 0, 0);
+
+
+	item = gtk_list_item_new_with_label("Gaim Chat");
+	cr = g_new0(struct chat_room, 1);
+	strcpy(cr->name, "Gaim Chat");
+	cr->exchange = 4;
+	gtk_object_set_user_data(GTK_OBJECT(item), cr);
+	gtk_widget_show(item);
+        gtk_list_append_items(GTK_LIST(list1), g_list_append(NULL, item));
+
+	
+	while(crs) {
+		cr = (struct chat_room *)crs->data;
+		item = gtk_list_item_new_with_label(cr->name);
+		gtk_object_set_user_data(GTK_OBJECT(item), cr);
+		gtk_widget_show(item);
+		items = g_list_append(items, item);
+
+		crs = crs->next;
+	}
+
+	gtk_list_append_items(GTK_LIST(list2), items);
+}
+
+
+	
+
+
+void debug_print(char *chars)
+{
+	if(general_options & OPT_GEN_DEBUG)
+            gtk_text_insert(GTK_TEXT(dw->entry),NULL, NULL, NULL, chars, strlen(chars));
+#ifdef DEBUG
+        printf("%s\n", chars);
+#endif
+}
+
+
+void build_debug()
+{
+	GtkWidget *scroll;
+	GtkWidget *box;
+	if (!dw)
+		dw = g_new0(struct debug_window, 1);
+
+	box = gtk_hbox_new(FALSE,0);
+	dw->window = gtk_window_new(GTK_WINDOW_DIALOG);
+	gtk_window_set_title(GTK_WINDOW(dw->window), "GAIM debug output window");
+	gtk_container_add(GTK_CONTAINER(dw->window), box);
+	dw->entry = gtk_text_new(NULL,NULL);
+	gtk_widget_set_usize(dw->entry, 500, 200);
+	scroll = gtk_vscrollbar_new(GTK_TEXT(dw->entry)->vadj);
+	gtk_box_pack_start(GTK_BOX(box), dw->entry, TRUE,TRUE,0);
+	gtk_box_pack_end(GTK_BOX(box), scroll,FALSE,FALSE,0);
+	gtk_widget_show(dw->entry);
+	gtk_widget_show(scroll);
+	gtk_widget_show(box);
+	gtk_signal_connect(GTK_OBJECT(dw->window),"delete_event", GTK_SIGNAL_FUNC(debug_delete), NULL);
+	gtk_widget_show(dw->window);
+}
+
+
+
+void show_debug(GtkObject * object)
+{
+	if((general_options & OPT_GEN_DEBUG)) {
+                if(!dw || !dw->window)
+                        build_debug();
+                gtk_widget_show(dw->window);
+        } else {
+                gtk_widget_destroy(dw->window);
+                dw->window = NULL;
+	}
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/proxy.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,187 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+/* this is a little piece of code to handle proxy connection */
+/* it is intended to : 1st handle http proxy, using the CONNECT command
+ , 2nd provide an easy way to add socks support */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <gtk/gtk.h>
+#include "gaim.h"
+#include "proxy.h"
+
+
+static int proxy_inited=0;
+int proxy_type = 0;
+char proxy_host[256];
+int proxy_port = 3128;
+char *proxy_realhost = NULL;
+
+/* this code is borrowed from cvs 1.10 */
+static int
+proxy_recv_line (int sock, char **resultp)
+{
+    int c;
+    char *result;
+    size_t input_index = 0;
+    size_t result_size = 80;
+
+    result = (char *) malloc (result_size);
+
+    while (1)
+    {
+	char ch;
+	if (recv (sock, &ch, 1, 0) < 0)
+	    fprintf (stderr, "recv() error from  proxy server\n");
+	c = ch;
+
+	if (c == EOF)
+	{
+	    free (result);
+
+	    /* It's end of file.  */
+	    fprintf(stderr, "end of file from  server\n");
+	}
+
+	if (c == '\012')
+	    break;
+
+	result[input_index++] = c;
+	while (input_index + 1 >= result_size)
+	{
+	    result_size *= 2;
+	    result = (char *) realloc (result, result_size);
+	}
+    }
+
+    if (resultp)
+	*resultp = result;
+
+    /* Terminate it just for kicks, but we *can* deal with embedded NULs.  */
+    result[input_index] = '\0';
+
+    if (resultp == NULL)
+	free (result);
+    return input_index;
+}
+
+
+struct hostent *proxy_gethostbyname(char *host)
+{
+    
+        if (proxy_type == PROXY_NONE)
+                return (gethostbyname(host));
+
+        if (proxy_realhost != NULL)
+                g_free(proxy_realhost);
+
+        /* we keep the real host name for the Connect command */
+        proxy_realhost = (char *) strdup(host);
+        
+        return (gethostbyname(proxy_host));
+    
+}
+
+
+int proxy_connect(int  sockfd, struct sockaddr *serv_addr, int
+                  addrlen )
+{
+        struct sockaddr_in name;
+        int ret;
+
+        switch (proxy_type) {
+        case PROXY_NONE:
+                /* normal use */
+                return (connect(sockfd,serv_addr,addrlen));
+                break;
+        case PROXY_HTTP:  /* Http proxy */
+                /* do the  tunneling */
+                /* step one : connect to  proxy */
+                {
+                        struct hostent *hostinfo;
+                        unsigned short shortport = proxy_port;
+
+                        memset (&name, 0, sizeof (name));
+                        name.sin_family = AF_INET;
+                        name.sin_port = htons (shortport);
+                        hostinfo = gethostbyname (proxy_host);
+                        if (hostinfo == NULL) {
+                                fprintf (stderr, "Unknown host %s.\n", proxy_host);
+                                return (-1);
+                        }
+                        name.sin_addr = *(struct in_addr *) hostinfo->h_addr;
+                }
+                sprintf(debug_buff,"Trying to connect ...\n");
+                debug_print(debug_buff);
+                if ((ret = connect(sockfd,(struct sockaddr *)&name,sizeof(name)))<0)
+                        return(ret);
+    
+                /* step two : do  proxy tunneling init */
+                {
+                        char cmd[80];
+                        char *inputline;
+                        unsigned short realport=ntohs(((struct sockaddr_in *)serv_addr)->sin_port);
+                        sprintf(cmd,"CONNECT %s:%d HTTP/1.1\n\r\n\r",proxy_realhost,realport);
+                        sprintf(debug_buff,"<%s>\n",cmd);
+                        debug_print(debug_buff);
+                        if (send(sockfd,cmd,strlen(cmd),0)<0)
+                                return(-1);
+                        if (proxy_recv_line(sockfd,&inputline) < 0) {
+                                return(-1);
+                        }
+                        sprintf(debug_buff,"<%s>\n",inputline);
+                        debug_print(debug_buff);
+                        if (memcmp("HTTP/1.0 200 Connection established",inputline,35))
+                                if (memcmp("HTTP/1.1 200 Connection established",inputline,35)) {
+                                        free(inputline);
+                                        return(-1);
+                                }
+
+                        while (strlen(inputline)>1) {
+                                free(inputline);
+                                if (proxy_recv_line(sockfd,&inputline) < 0) {
+                                        return(-1);
+                                }
+                                sprintf(debug_buff,"<%s>\n",inputline);
+                                debug_print(debug_buff);
+                        }
+                        free(inputline);
+                }
+	        
+                return ret;
+                break;
+        case PROXY_SOCKS:
+                fprintf(stderr,"Socks proxy is not yet implemented.\n");
+                return(-1);
+                break;
+        default:
+                fprintf(stderr,"Unknown proxy type : %d.\n",proxy_type);
+                break;
+        }
+        return(-1);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/proxy.h	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,50 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+/* this is the export part of the proxy.c file. it does a little
+   prototype-ing stuff and redefine some net function to mask them
+   with some kind of transparent layer */ 
+
+#ifndef _INC_PROXY_H
+#define _INC_PROXY_H
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+
+#define PROXY_NONE 0
+#define PROXY_HTTP 1
+#define PROXY_SOCKS 2		/* Not Implemented !! */
+
+/* masking gethostbyname function */
+extern struct hostent * proxy_gethostbyname(char *host) ;
+
+/* masking connect function */
+extern int proxy_connect(int  sockfd, struct sockaddr *serv_addr, int
+			 addrlen ) ;
+
+extern int proxy_type;
+extern char proxy_host[256];
+extern int proxy_port;
+extern char *proxy_realhost;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/server.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,764 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <time.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <gtk/gtk.h>
+#ifdef USE_OSCAR
+#include "../libfaim/aim.h"
+#endif
+#include "gaim.h"
+
+static int idle_timer = -1;
+static time_t lastsent = 0;
+static time_t login_time = 0;
+static struct timeval lag_tv;
+static int is_idle = 0;
+
+int correction_time = 0;
+
+int serv_login(char *username, char *password)
+{
+#ifndef USE_OSCAR
+        return toc_login(username, password);
+#else
+	return oscar_login(username, password);
+#endif
+}
+
+void serv_close()
+{
+#ifndef USE_OSCAR
+	toc_close();
+#else
+        oscar_close();
+#endif
+        gtk_timeout_remove(idle_timer);
+        idle_timer = -1;
+}
+
+
+void serv_touch_idle()
+{
+	/* Are we idle?  If so, not anymore */
+	if (is_idle > 0) {
+		is_idle = 0;
+                serv_set_idle(0);
+        }
+        time(&lastsent);
+}
+
+
+static gint check_idle()
+{
+	time_t t;
+
+        /* Not idle, really...  :) */
+        update_all_buddies();
+
+	time(&t);
+
+        gettimeofday(&lag_tv, NULL);
+	serv_send_im(current_user->username, LAGOMETER_STR, 1);
+
+	if (report_idle != IDLE_GAIM)
+                return TRUE;
+
+	
+	if (is_idle)
+		return TRUE;
+
+	if ((t - lastsent) > 600) { /* 15 minutes! */
+		serv_set_idle((int)t - lastsent);
+		is_idle = 1;
+        }
+
+        
+	return TRUE;
+
+}
+
+
+void serv_finish_login()
+{
+        char *buf;
+
+	if (strlen(current_user->user_info)) {
+		buf = g_malloc(strlen(current_user->user_info) * 2);
+		strcpy(buf, current_user->user_info);
+		escape_text(buf);
+		serv_set_info(buf);
+		g_free(buf);
+	}
+
+        if (idle_timer != -1)
+                gtk_timeout_remove(idle_timer);
+        
+        idle_timer = gtk_timeout_add(20000, (GtkFunction)check_idle, NULL);
+        serv_touch_idle();
+
+        time(&login_time);
+
+        serv_add_buddy(current_user->username);
+        
+	if (!(general_options & OPT_GEN_REGISTERED))
+	{
+		show_register_dialog();
+		save_prefs();
+	}
+}
+
+
+
+void serv_send_im(char *name, char *message, int away)
+{
+	char buf[MSG_LEN - 7];
+#ifndef USE_OSCAR
+        g_snprintf(buf, MSG_LEN - 8, "toc_send_im %s \"%s\"%s", normalize(name),
+                   message, ((away) ? " auto" : ""));
+	sflap_send(buf, strlen(buf), TYPE_DATA);
+#else
+	aim_send_im(NULL, normalize(name), ((away) ? AIM_IMFLAGS_AWAY : 0), message);
+#endif
+        if (!away)
+                serv_touch_idle();
+}
+
+void serv_get_info(char *name)
+{
+#ifndef USE_OSCAR
+        char buf[MSG_LEN];
+        g_snprintf(buf, MSG_LEN, "toc_get_info %s", normalize(name));
+        sflap_send(buf, -1, TYPE_DATA);
+#endif
+}
+
+void serv_get_dir(char *name)
+{
+#ifndef USE_OSCAR
+        char buf[MSG_LEN];
+        g_snprintf(buf, MSG_LEN, "toc_get_dir %s", normalize(name));
+        sflap_send(buf, -1, TYPE_DATA);
+#endif
+}
+
+void serv_set_dir(char *first, char *middle, char *last, char *maiden,
+		  char *city, char *state, char *country, int web)
+{
+#ifndef USE_OSCAR
+	char buf2[BUF_LEN], buf[BUF_LEN];
+	g_snprintf(buf2, sizeof(buf2), "%s:%s:%s:%s:%s:%s:%s:%s", first,
+		   middle, last, maiden, city, state, country,
+		   (web == 1) ? "Y" : "");
+	escape_text(buf2);
+	g_snprintf(buf, sizeof(buf), "toc_set_dir %s", buf2);
+	sflap_send(buf, -1, TYPE_DATA);
+#endif
+}
+
+void serv_dir_search(char *first, char *middle, char *last, char *maiden,
+		     char *city, char *state, char *country, char *email)
+{
+#ifndef USE_OSCAR
+	char buf[BUF_LONG];
+	g_snprintf(buf, sizeof(buf)/2, "toc_dir_search %s:%s:%s:%s:%s:%s:%s:%s", first, middle, last, maiden, city, state, country, email);
+	sprintf(debug_buff,"Searching for: %s,%s,%s,%s,%s,%s,%s\n", first, middle, last, maiden, city, state, country);
+	debug_print(debug_buff);
+	sflap_send(buf, -1, TYPE_DATA);
+#endif
+}
+
+
+void serv_set_away(char *message)
+{
+#ifndef USE_OSCAR
+        char buf[MSG_LEN];
+        if (message)
+                g_snprintf(buf, MSG_LEN, "toc_set_away \"%s\"", message);
+        else
+                g_snprintf(buf, MSG_LEN, "toc_set_away");
+	sflap_send(buf, -1, TYPE_DATA);
+#endif
+}
+
+void serv_set_info(char *info)
+{
+	char buf[MSG_LEN];
+#ifndef USE_OSCAR
+	g_snprintf(buf, sizeof(buf), "toc_set_info \"%s\n\"", info);
+	sflap_send(buf, -1, TYPE_DATA);
+#else
+	g_snprintf(buf, sizeof(buf), "%s\n", info);
+	aim_bos_setprofile(gaim_conn, buf);
+#endif
+}
+
+void serv_add_buddy(char *name)
+{
+#ifndef USE_OSCAR
+	char buf[1024];
+	g_snprintf(buf, sizeof(buf), "toc_add_buddy %s", normalize(name));
+	sflap_send(buf, -1, TYPE_DATA);
+#endif
+}
+
+void serv_add_buddies(GList *buddies)
+{
+	char buf[MSG_LEN];
+        int n, num = 0;
+#ifndef USE_OSCAR
+	
+        n = g_snprintf(buf, sizeof(buf), "toc_add_buddy");
+        while(buddies) {
+                if (num == 20) {
+                        sflap_send(buf, -1, TYPE_DATA);
+                        n = g_snprintf(buf, sizeof(buf), "toc_add_buddy");
+                        num = 0;
+                }
+                ++num;
+                n += g_snprintf(buf + n, sizeof(buf) - n, " %s", normalize(buddies->data));
+                buddies = buddies->next;
+        }
+	sflap_send(buf, -1, TYPE_DATA);
+#else
+	while(buddies) {
+		if (num == 20) {
+                        aim_bos_setbuddylist(gaim_conn, buf);
+                        num = 0;
+                }
+                ++num;
+                n += g_snprintf(buf + n, sizeof(buf) - n, "%s&", normalize(buddies->data));
+                buddies = buddies->next;
+	}
+	aim_bos_setbuddylist(gaim_conn, buf);
+#endif
+}
+
+
+void serv_remove_buddy(char *name)
+{
+#ifndef USE_OSCAR
+	char buf[1024];
+	g_snprintf(buf, sizeof(buf), "toc_remove_buddy %s", normalize(name));
+	sflap_send(buf, -1, TYPE_DATA);
+#endif
+}
+
+void serv_add_permit(char *name)
+{
+#ifndef USE_OSCAR
+	char buf[1024];
+	g_snprintf(buf, sizeof(buf), "toc_add_permit %s", normalize(name));
+	sflap_send(buf, -1, TYPE_DATA);
+#endif
+}
+
+
+
+void serv_add_deny(char *name)
+{
+#ifndef USE_OSCAR
+	char buf[1024];
+	g_snprintf(buf, sizeof(buf), "toc_add_deny %s", normalize(name));
+	sflap_send(buf, -1, TYPE_DATA);
+#endif
+}
+
+
+
+void serv_set_permit_deny()
+{
+#ifndef USE_OSCAR
+	char buf[MSG_LEN];
+	int at;
+	GList *list;
+        /* FIXME!  We flash here. */
+        if (permdeny == 1 || permdeny == 3) {
+        	g_snprintf(buf, sizeof(buf), "toc_add_permit");
+                sflap_send(buf, -1, TYPE_DATA);
+        } else {
+                g_snprintf(buf, sizeof(buf), "toc_add_deny");
+                sflap_send(buf, -1, TYPE_DATA);
+        }
+
+
+	at = g_snprintf(buf, sizeof(buf), "toc_add_permit");
+	list = permit;
+	while(list) {
+                at += g_snprintf(&buf[at], sizeof(buf) - at, " %s", normalize(list->data));
+                list = list->next;
+	}
+	buf[at] = 0;
+	sflap_send(buf, -1, TYPE_DATA);
+
+	at = g_snprintf(buf, sizeof(buf), "toc_add_deny");
+	list = deny;
+	while(list) {
+                at += g_snprintf(&buf[at], sizeof(buf) - at, " %s", normalize(list->data));
+		list = list->next;
+	}
+	buf[at] = 0;
+	sflap_send(buf, -1, TYPE_DATA);
+
+
+
+#endif
+}
+
+void serv_set_idle(int time)
+{
+#ifndef USE_OSCAR
+	char buf[256];
+	g_snprintf(buf, sizeof(buf), "toc_set_idle %d", time);
+	sflap_send(buf, -1, TYPE_DATA);
+#endif
+}
+
+
+void serv_warn(char *name, int anon)
+{
+#ifndef USE_OSCAR
+	char *send = g_malloc(256);
+	g_snprintf(send, 255, "toc_evil %s %s", name,
+		   ((anon) ? "anon" : "norm"));
+	sflap_send(send, -1, TYPE_DATA);
+	g_free(send);
+#endif
+}
+
+
+void serv_save_config()
+{
+#ifndef USE_OSCAR
+	char *buf = g_malloc(BUF_LONG);
+	char *buf2 = g_malloc(MSG_LEN);
+	toc_build_config(buf, BUF_LONG / 2);
+	g_snprintf(buf2, MSG_LEN, "toc_set_config {%s}", buf);
+        sflap_send(buf2, -1, TYPE_DATA);
+	g_free(buf2);
+	g_free(buf);
+#else
+	FILE *f;
+	char *buf = g_malloc(BUF_LONG);
+	char file[1024];
+
+	g_snprintf(file, sizeof(file), "%s/.gaimbuddy", getenv("HOME"));
+
+        if ((f = fopen(file,"w"))) {
+                build_config(buf, BUF_LONG - 1);
+                fprintf(f, "%s\n", buf);
+                fclose(f);
+                chmod(buf, S_IRUSR | S_IWUSR);
+        } else {
+                g_snprintf(buf, BUF_LONG / 2, "Error writing file %s", file);
+                do_error_dialog(buf, "Error");
+        }
+        
+        g_free(buf);
+
+#endif
+	
+}
+
+
+void serv_accept_chat(int i)
+{
+#ifndef USE_OSCAR
+        char *buf = g_malloc(256);
+        g_snprintf(buf, 255, "toc_chat_accept %d",  i);
+        sflap_send(buf, -1, TYPE_DATA);
+        g_free(buf);
+#endif
+}
+
+void serv_join_chat(int exchange, char *name)
+{
+#ifndef USE_OSCAR
+        char buf[BUF_LONG];
+        g_snprintf(buf, sizeof(buf)/2, "toc_chat_join %d \"%s\"", exchange, name);
+        sflap_send(buf, -1, TYPE_DATA);
+#endif
+}
+
+void serv_chat_invite(int id, char *message, char *name)
+{
+#ifndef USE_OSCAR
+        char buf[BUF_LONG];
+        g_snprintf(buf, sizeof(buf)/2, "toc_chat_invite %d \"%s\" %s", id, message, normalize(name));
+        sflap_send(buf, -1, TYPE_DATA);
+#endif
+}
+
+void serv_chat_leave(int id)
+{
+#ifndef USE_OSCAR
+        char *buf = g_malloc(256);
+        g_snprintf(buf, 255, "toc_chat_leave %d",  id);
+        sflap_send(buf, -1, TYPE_DATA);
+        g_free(buf);
+#endif
+}
+
+void serv_chat_whisper(int id, char *who, char *message)
+{
+#ifndef USE_OSCAR
+        char buf2[MSG_LEN];
+        g_snprintf(buf2, sizeof(buf2), "toc_chat_whisper %d %s \"%s\"", id, who, message);
+        sflap_send(buf2, -1, TYPE_DATA);
+#endif
+}
+
+void serv_chat_send(int id, char *message)
+{
+#ifndef USE_OSCAR
+        char buf[MSG_LEN];
+        g_snprintf(buf, sizeof(buf), "toc_chat_send %d \"%s\"",id, message);
+        sflap_send(buf, -1, TYPE_DATA);
+#endif
+}
+
+
+
+
+void serv_got_im(char *name, char *message, int away)
+{
+	struct conversation *cnv;
+        int is_idle = -1;
+        int new_conv = 0;
+	char *nname;
+
+	nname = g_strdup(normalize(name));
+
+	if (!strcasecmp(normalize(name), nname)) {
+		if (!strcmp(message, LAGOMETER_STR)) {
+			struct timeval tv;
+                        int ms;
+
+			gettimeofday(&tv, NULL);
+
+			ms = 1000000 * (tv.tv_sec - lag_tv.tv_sec);
+
+			ms += tv.tv_usec - lag_tv.tv_usec;
+
+                        update_lagometer(ms);
+			g_free(nname);
+                        return;
+		}
+
+	}
+	g_free(nname);
+	
+        cnv = find_conversation(name);
+
+	if (awaymessage != NULL) {
+		if (!(general_options & OPT_GEN_DISCARD_WHEN_AWAY)) {
+			if (cnv == NULL) {
+				new_conv = 1;
+				cnv = new_conversation(name);
+			}
+		}
+		if (cnv != NULL) {
+			if (sound_options & OPT_SOUND_WHEN_AWAY)
+				play_sound(AWAY);
+			write_to_conv(cnv, message, WFLAG_AUTO | WFLAG_RECV);
+		}
+
+	} else {
+		if (cnv == NULL) {
+			new_conv = 1;
+			cnv = new_conversation(name);
+		}
+		if (new_conv && (sound_options & OPT_SOUND_FIRST_RCV)) {
+			play_sound(FIRST_RECEIVE);
+		} else {
+			if (cnv->makesound && (sound_options & OPT_SOUND_RECV))
+				play_sound(RECEIVE);
+		}
+		write_to_conv(cnv, message, WFLAG_RECV);
+	}
+
+
+
+
+        if (awaymessage != NULL) {
+                time_t t;
+
+                time(&t);
+
+
+                if ((cnv == NULL) || (t - cnv->sent_away) < 120)
+                        return;
+
+                cnv->sent_away = t;
+
+                if (is_idle)
+                        is_idle = -1;
+
+                serv_send_im(name, awaymessage->message, 1);
+
+                if (is_idle == -1)
+			is_idle = 1;
+		
+                if (cnv != NULL)
+			write_to_conv(cnv, awaymessage->message, WFLAG_SEND | WFLAG_AUTO);
+        }
+}
+
+
+
+void serv_got_update(char *name, int loggedin, int evil, time_t signon, time_t idle, int type)
+{
+        struct buddy *b;
+        char *nname;
+                     
+        b = find_buddy(name);
+
+        nname = g_strdup(normalize(name));
+        if (!strcasecmp(nname, normalize(current_user->username))) {
+                correction_time = (int)(signon - login_time);
+                update_all_buddies();
+                if (!b)
+                        return;
+        }
+
+        
+        if (!b) {
+                sprintf(debug_buff,"Error, no such person\n");
+				debug_print(debug_buff);
+                return;
+        }
+
+        /* This code will 'align' the name from the TOC */
+        /* server with what's in our record.  We want to */
+        /* store things how THEY want it... */
+        if (strcmp(name, b->name)) {
+                GList  *cnv = conversations;
+                struct conversation *cv;
+
+                char *who = g_malloc(80);
+
+                strcpy(who, normalize(name));
+
+                while(cnv) {
+                        cv = (struct conversation *)cnv->data;
+                        if (!strcasecmp(who, normalize(cv->name))) {
+                                g_snprintf(cv->name, sizeof(cv->name), "%s", name);
+                                if (find_log_info(name) || (general_options & OPT_GEN_LOG_ALL))
+                                        g_snprintf(who, 63, LOG_CONVERSATION_TITLE, name);
+                                else
+                                        g_snprintf(who, 63, CONVERSATION_TITLE, name);
+                                gtk_window_set_title(GTK_WINDOW(cv->window), who);
+                                /* no free 'who', set_title needs it.
+                                 */
+                                break;
+                        }
+                        cnv = cnv->next;
+                }
+                g_snprintf(b->name, sizeof(b->name), "%s", name);
+                /*gtk_label_set_text(GTK_LABEL(b->label), b->name);*/
+
+                /* okay lets save the new config... */
+
+        }
+
+        b->idle = idle;
+        b->evil = evil;
+        b->uc = type;
+        
+        b->signon = signon;
+
+        if (loggedin) {
+                if (!b->present) {
+                        b->present = 1;
+                        do_pounce(b->name);
+                }
+        } else
+                b->present = 0;
+
+        set_buddy(b);
+}
+
+static
+void close_warned(GtkWidget *w, GtkWidget *w2)
+{
+        gtk_widget_destroy(w2);
+}
+
+
+
+void serv_got_eviled(char *name, int lev)
+{
+        char *buf2 = g_malloc(1024);
+        GtkWidget *d, *label, *close;
+
+
+        g_snprintf(buf2, 1023, "You have just been warned by %s.\nYour new warning level is %d./%%",
+                   ((name == NULL) ? "an anonymous person" : name) , lev);
+
+
+        d = gtk_dialog_new();
+        gtk_widget_realize(d);
+        aol_icon(d->window);
+
+        label = gtk_label_new(buf2);
+        gtk_widget_show(label);
+        close = gtk_button_new_with_label("Close");
+        gtk_widget_show(close);
+        gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->vbox),
+                           label, FALSE, FALSE, 5);
+        gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->action_area),
+                           close, FALSE, FALSE, 5);
+
+        gtk_window_set_title(GTK_WINDOW(d), "Warned");
+        gtk_signal_connect(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(close_warned), d);
+        gtk_widget_show(d);
+}
+
+
+
+static void close_invite(GtkWidget *w, GtkWidget *w2)
+{
+	gtk_widget_destroy(w2);
+}
+
+static void chat_invite_callback(GtkWidget *w, GtkWidget *w2)
+{
+        int i = (int)gtk_object_get_user_data(GTK_OBJECT(w2));
+        serv_accept_chat(i);
+	gtk_widget_destroy(w2);
+}
+
+
+
+void serv_got_chat_invite(char *name, int id, char *who, char *message)
+{
+        GtkWidget *d;
+        GtkWidget *label;
+        GtkWidget *yesbtn;
+        GtkWidget *nobtn;
+
+        char buf2[BUF_LONG];
+
+
+        g_snprintf(buf2, sizeof(buf2), "User '%s' invites you to buddy chat room: '%s'\n%s", who, name, message);
+
+        d = gtk_dialog_new();
+        gtk_widget_realize(d);
+        aol_icon(d->window);
+
+
+        label = gtk_label_new(buf2);
+        gtk_widget_show(label);
+        yesbtn = gtk_button_new_with_label("Yes");
+        gtk_widget_show(yesbtn);
+        nobtn = gtk_button_new_with_label("No");
+        gtk_widget_show(nobtn);
+        gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->vbox),
+                           label, FALSE, FALSE, 5);
+        gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->action_area),
+                           yesbtn, FALSE, FALSE, 5);
+        gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->action_area),
+                           nobtn, FALSE, FALSE, 5);
+
+
+        /*		gtk_widget_set_usize(d, 200, 110); */
+        gtk_object_set_user_data(GTK_OBJECT(d), (void *)id);
+
+
+        gtk_window_set_title(GTK_WINDOW(d), "Buddy chat invite");
+        gtk_signal_connect(GTK_OBJECT(nobtn), "clicked", GTK_SIGNAL_FUNC(close_invite), d);
+        gtk_signal_connect(GTK_OBJECT(yesbtn), "clicked", GTK_SIGNAL_FUNC(chat_invite_callback), d);
+
+
+        gtk_widget_show(d);
+}
+
+void serv_got_joined_chat(int id, char *name)
+{
+        struct buddy_chat *b;
+
+        b = (struct buddy_chat *)g_new0(struct buddy_chat, 1);
+        buddy_chats = g_list_append(buddy_chats, b);
+
+        b->ignored = NULL;
+        b->in_room = NULL;
+        b->id = id;
+        g_snprintf(b->name, 80, "%s", name);
+        show_new_buddy_chat(b);
+}
+
+void serv_got_chat_left(int id)
+{
+        GList *bcs = buddy_chats;
+        struct buddy_chat *b = NULL;
+
+
+        while(bcs) {
+                b = (struct buddy_chat *)bcs->data;
+                if (id == b->id) {
+                        break;
+                        }
+                b = NULL;
+                bcs = bcs->next;
+        }
+
+        if (!b)
+                return;
+
+        if (b->window)
+                gtk_widget_destroy(GTK_WIDGET(b->window));
+
+        buddy_chats = g_list_remove(buddy_chats, b);
+
+        g_free(b);
+}
+
+void serv_got_chat_in(int id, char *who, int whisper, char *message)
+{
+        int w;
+        GList *bcs = buddy_chats;
+        struct buddy_chat *b = NULL;
+
+        while(bcs) {
+                b = (struct buddy_chat *)bcs->data;
+                if (id == b->id)
+                        break;
+                bcs = bcs->next;
+                b = NULL;
+
+        }
+        if (!b)
+                return;
+        
+        if (whisper)
+                w = WFLAG_WHISPER;
+        else
+                w = 0;
+
+        chat_write(b, who, w, message);
+}
+        
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/sound.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,281 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <gtk/gtk.h>
+#include <fcntl.h>
+#include <sys/wait.h>
+#include <sys/signal.h>
+
+#ifdef ESD_SOUND
+#include <esd.h>
+#endif
+
+#ifdef NAS_SOUND
+#include <audio/audiolib.h>
+#endif
+
+#include "gaim.h"
+#include "sounds/BuddyArrive.h"
+#include "sounds/BuddyLeave.h"
+#include "sounds/Send.h"
+#include "sounds/Receive.h"
+
+
+static void play_audio(char *data, int size)
+{
+        int fd;
+        
+        fd = open("/dev/audio", O_WRONLY | O_EXCL);
+        if (fd < 0)
+                return;
+        write(fd, data, size);
+        close(fd);
+}
+
+static int can_play_audio()
+{
+        /* FIXME check for write access and such. */
+        return 1;
+
+}
+
+
+#ifdef ESD_SOUND
+/*
+** This routine converts from ulaw to 16 bit linear.
+**
+** Craig Reese: IDA/Supercomputing Research Center
+** 29 September 1989
+**
+** References:
+** 1) CCITT Recommendation G.711  (very difficult to follow)
+** 2) MIL-STD-188-113,"Interoperability and Performance Standards
+**     for Analog-to_Digital Conversion Techniques,"
+**     17 February 1987
+**
+** Input: 8 bit ulaw sample
+** Output: signed 16 bit linear sample
+** Z-note -- this is from libaudiofile.  Thanks guys!
+*/
+
+int _af_ulaw2linear (unsigned char ulawbyte)
+{
+  static int exp_lut[8] = {0,132,396,924,1980,4092,8316,16764};
+  int sign, exponent, mantissa, sample;
+
+  ulawbyte = ~ulawbyte;
+  sign = (ulawbyte & 0x80);
+  exponent = (ulawbyte >> 4) & 0x07;
+  mantissa = ulawbyte & 0x0F;
+  sample = exp_lut[exponent] + (mantissa << (exponent + 3));
+  if (sign != 0) sample = -sample;
+
+  return(sample);
+}
+
+
+
+static int play_esd(unsigned char *data, int size)
+{
+        int fd, i;
+	esd_format_t format = ESD_BITS16 | ESD_STREAM | ESD_PLAY | ESD_MONO;
+        guint16 *lineardata = g_malloc(size * 2);
+	
+	
+        fd = esd_play_stream(format, 8012, NULL, "gaim");
+
+        if (fd < 0)
+                return 0;
+
+	for (i=0; i<size; i++)
+		lineardata[i] = _af_ulaw2linear(data[i]);
+	
+	write(fd, lineardata, size * 2);
+
+	close(fd);
+	g_free(lineardata);
+
+        return 1;
+
+}
+
+static int can_play_esd()
+{
+        return 1;
+}
+
+#endif
+
+#ifdef NAS_SOUND
+
+char nas_server[] = "localhost";
+AuServer *nas_serv = NULL;
+
+static AuBool
+NasEventHandler(AuServer *aud, AuEvent *ev, AuEventHandlerRec *handler)
+{
+        AuElementNotifyEvent *event = (AuElementNotifyEvent *) ev;
+
+        if (ev->type == AuEventTypeElementNotify) {
+                switch (event->kind) {
+                case AuElementNotifyKindState:
+                        switch (event->cur_state) {
+                        case AuStateStop:
+                                _exit(0);
+                        }
+                        break;
+                }
+        }
+        return AuTrue;
+}
+
+
+static int play_nas(unsigned char *data, int size)
+{
+        AuDeviceID device = AuNone;
+        AuFlowID flow;
+        AuElement elements[3];
+        int i, n, w;
+
+        /* look for an output device */
+        for (i = 0; i < AuServerNumDevices(nas_serv); i++) {
+                if ((AuDeviceKind(AuServerDevice(nas_serv, i)) ==
+                     AuComponentKindPhysicalOutput) &&
+                    AuDeviceNumTracks(AuServerDevice(nas_serv, i)) == 1) {
+                        device = AuDeviceIdentifier(AuServerDevice(nas_serv, i));
+                        break;
+                }
+        }
+
+        if (device == AuNone)
+                return 0;
+
+        if (!(flow = AuCreateFlow(nas_serv, NULL)))
+                return 0;
+
+
+        AuMakeElementImportClient(&elements[0], 8012, AuFormatULAW8,
+                                  1, AuTrue, size, size/2, 0, NULL);
+        AuMakeElementExportDevice(&elements[1], 0, device, 8012,
+                                  AuUnlimitedSamples, 0, NULL);
+        AuSetElements(nas_serv, flow, AuTrue, 2, elements, NULL);
+
+        AuStartFlow(nas_serv, flow, NULL);
+
+        AuWriteElement(nas_serv, flow, 0, size, data, AuTrue, NULL);
+
+        AuRegisterEventHandler(nas_serv, AuEventHandlerIDMask, 0, flow,
+                               NasEventHandler, NULL);
+        
+        while(1) {
+                AuHandleEvents(nas_serv);
+        }
+
+        return 1;
+}
+
+static int can_play_nas()
+{
+        if ((nas_serv = AuOpenServer(NULL, 0, NULL, 0, NULL, NULL)))
+                return 1;
+        return 0;
+}
+
+#endif
+
+static void play(unsigned char *data, int size)
+{
+        int pid;
+
+#ifdef _WIN32
+        return;
+#endif
+        
+	pid = fork();
+	
+	if (pid < 0)
+		return;
+        else if (pid == 0) {
+#ifdef ESD_SOUND
+                /* ESD is our player of choice.  Are we OK to
+                 * go there? */
+                if (can_play_esd()) {
+                        if (play_esd(data, size))
+                                _exit(0);
+                }
+#endif
+
+#ifdef NAS_SOUND
+                /* NAS is our second choice setup. */
+                if (can_play_nas()) {
+                        if (play_nas(data, size))
+                                _exit(0);
+                }
+#endif
+
+                /* Lastly, we can try just plain old /dev/audio */
+                if (can_play_audio()) {
+                        play_audio(data, size);
+                        _exit(0);
+                }
+        } else {
+                gtk_timeout_add(100, (GtkFunction)clean_pid, NULL);
+        }
+}
+
+
+
+void play_sound(int sound)
+{
+
+	switch(sound) {
+	case BUDDY_ARRIVE:
+		if (sound_options & OPT_SOUND_LOGIN)
+			play(BuddyArrive, sizeof(BuddyArrive));
+		break;
+	case BUDDY_LEAVE:
+		if (sound_options & OPT_SOUND_LOGOUT)
+			play(BuddyLeave, sizeof(BuddyLeave));
+		break;
+	case SEND:
+		if (sound_options & OPT_SOUND_SEND)
+			play(Send, sizeof(Send));
+		break;
+        case FIRST_RECEIVE:
+		if (sound_options & OPT_SOUND_FIRST_RCV)
+			play(Receive, sizeof(Receive));
+		break;
+        case RECEIVE:
+		if (sound_options & OPT_SOUND_RECV)
+			play(Receive, sizeof(Receive));
+		break;
+	case AWAY:
+		if (sound_options & OPT_SOUND_WHEN_AWAY)
+			play(Receive, sizeof(Receive));
+		break;
+       }
+
+			
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/toc.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,833 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+
+
+#include <netdb.h>
+#include <gtk/gtk.h>
+#include <unistd.h>
+#include <errno.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <sys/socket.h>
+#include "gaim.h"
+#include "gnome_applet_mgr.h"
+
+
+
+/* descriptor for talking to TOC */
+static int toc_fd;
+static int seqno;
+static unsigned int peer_ver=0;
+static int state;
+static int inpa=-1;
+#ifdef _WIN32
+static int win32_r;
+#endif
+
+int toc_signon(char *username, char *password);
+
+
+
+int toc_login(char *username, char *password)
+{
+	char *config;
+        struct in_addr *sin;
+        struct aim_user *u;
+	char buf[80];
+	char buf2[2048];
+
+	g_snprintf(buf, sizeof(buf), "Looking up %s", aim_host);	
+	set_login_progress(1, buf);
+
+	sin = (struct in_addr *)get_address(aim_host);
+	if (!sin) {
+	        
+#ifdef USE_APPLET
+		setUserState(offline);
+#endif /* USE_APPLET */
+                set_state(STATE_OFFLINE);
+		g_snprintf(buf, sizeof(buf), "Unable to lookup %s", aim_host);
+		hide_login_progress(buf);
+		return -1;
+	}
+	
+	g_snprintf(toc_addy, sizeof(toc_addy), "%s", inet_ntoa(*sin));
+	g_snprintf(buf, sizeof(buf), "Connecting to %s", inet_ntoa(*sin));
+	
+	set_login_progress(2, buf);
+
+
+	
+	toc_fd = connect_address(sin->s_addr, aim_port);
+
+        if (toc_fd < 0) {
+#ifdef USE_APPLET
+		setUserState(offline);
+#endif /* USE_APPLET */
+                set_state(STATE_OFFLINE);
+		g_snprintf(buf, sizeof(buf), "Connect to %s failed",
+			 inet_ntoa(*sin));
+		hide_login_progress(buf);
+		return -1;
+        }
+
+        g_free(sin);
+	
+	g_snprintf(buf, sizeof(buf), "Signon: %s",username);
+	
+	set_login_progress(3, buf);
+	
+	if (toc_signon(username, password) < 0) {
+#ifdef USE_APPLET
+		setUserState(offline);
+#endif /* USE_APPLET */
+                set_state(STATE_OFFLINE);
+		hide_login_progress("Disconnected.");
+		return -1;
+	}
+
+	g_snprintf(buf, sizeof(buf), "Waiting for reply...");
+	set_login_progress(4, buf);
+	if (toc_wait_signon() < 0) {
+#ifdef USE_APPLET
+		setUserState(offline);
+#endif /* USE_APPLET */
+                set_state(STATE_OFFLINE);
+		hide_login_progress("Authentication Failed");
+		return -1;
+	}
+
+        u = find_user(username);
+
+        if (!u) {
+                u = g_new0(struct aim_user, 1);
+                g_snprintf(u->user_info, sizeof(u->user_info), DEFAULT_INFO);
+                aim_users = g_list_append(aim_users, u);
+        }
+
+        current_user = u;
+        
+	g_snprintf(current_user->username, sizeof(current_user->username), "%s", username);
+	g_snprintf(current_user->password, sizeof(current_user->password), "%s", password);
+
+	save_prefs();
+
+	g_snprintf(buf, sizeof(buf), "Retrieving config...");
+	set_login_progress(5, buf);
+        if ((config=toc_wait_config()) == NULL) {
+		hide_login_progress("No Configuration");
+		set_state(STATE_OFFLINE);
+		return -1;
+
+	}
+
+        
+#ifdef USE_APPLET
+ 	if (applet_buddy_auto_show) {
+                make_buddy();
+                parse_toc_buddy_list(config);
+                refresh_buddy_window();
+                set_applet_draw_open();
+        } else {
+                make_buddy();
+                gnome_buddy_hide();
+                parse_toc_buddy_list(config);
+                set_applet_draw_closed();
+        }
+
+       
+	setUserState(online);
+#else
+        gtk_widget_hide(mainwindow);
+	show_buddy_list();
+        parse_toc_buddy_list(config);
+        refresh_buddy_window();
+#endif
+        
+        
+	g_snprintf(buf2, sizeof(buf2), "toc_init_done");
+	sflap_send(buf2, -1, TYPE_DATA);
+
+#if 0
+	g_snprintf(buf2, sizeof(buf2), "toc_set_caps %s",
+		   FILETRANS_UID);
+	sflap_send(buf2, -1, TYPE_DATA);
+#endif
+        
+        serv_finish_login();
+	return 0;
+}
+
+void toc_close()
+{
+#ifdef USE_APPLET
+	setUserState(offline);
+#endif /* USE_APPLET */
+        seqno = 0;
+        state = STATE_OFFLINE;
+        if (inpa > 0)
+		gdk_input_remove(inpa);
+	close(toc_fd);
+	toc_fd=-1;
+	inpa=-1;
+}
+
+unsigned char *roast_password(char *pass)
+{
+	/* Trivial "encryption" */
+	static char rp[256];
+	static char *roast = ROAST;
+	int pos=2;
+	int x;
+	strcpy(rp, "0x");
+	for (x=0;(x<150) && pass[x]; x++) 
+		pos+=sprintf(&rp[pos],"%02x", pass[x] ^ roast[x % strlen(roast)]);
+	rp[pos]='\0';
+        return rp;
+}
+
+
+char *print_header(void *hdr_v)
+{
+	static char s[80];
+	struct sflap_hdr *hdr = (struct sflap_hdr *)hdr_v;
+	g_snprintf(s,sizeof(s), "[ ast: %c, type: %d, seqno: %d, len: %d ]",
+		hdr->ast, hdr->type, ntohs(hdr->seqno), ntohs(hdr->len));
+	return s;
+}
+
+void print_buffer(char *buf, int len)
+{
+#if 0
+	int x;
+	printf("[ ");
+	for (x=0;x<len;x++) 
+		printf("%d ", buf[x]);
+	printf("]\n");
+	printf("[ ");
+	for (x=0;x<len;x++)
+		printf("%c ", buf[x]);
+	printf("]\n");
+#endif
+}
+
+int sflap_send(char *buf, int olen, int type)
+{
+	int len;
+	int slen=0;
+	struct sflap_hdr hdr;
+	char obuf[MSG_LEN];
+
+        /* One _last_ 2048 check here!  This shouldn't ever
+         * get hit though, hopefully.  If it gets hit on an IM
+         * It'll lose the last " and the message won't go through,
+         * but this'll stop a segfault. */
+        if (strlen(buf) > (MSG_LEN - sizeof(hdr))) {
+                buf[MSG_LEN - sizeof(hdr) - 3] = '"';
+                buf[MSG_LEN - sizeof(hdr) - 2] = '\0';
+        }
+
+        sprintf(debug_buff,"%s [Len %d]\n", buf, strlen(buf));
+		debug_print(debug_buff);
+        
+
+	
+	if (olen < 0)
+		len = escape_message(buf);
+	else
+		len = olen;
+	hdr.ast = '*';
+	hdr.type = type;
+	hdr.seqno = htons(seqno++ & 0xffff);
+        hdr.len = htons(len + (type == TYPE_SIGNON ? 0 : 1));
+
+    sprintf(debug_buff,"Escaped message is '%s'\n",buf);
+	debug_print(debug_buff);
+
+	memcpy(obuf, &hdr, sizeof(hdr));
+	slen += sizeof(hdr);
+	memcpy(&obuf[slen], buf, len);
+	slen += len;
+	if (type != TYPE_SIGNON) {
+		obuf[slen]='\0';
+		slen += 1;
+	}
+	print_buffer(obuf, slen);
+
+	return write(toc_fd, obuf, slen);
+}
+
+
+int wait_reply(char *buffer, int buflen)
+{
+        int res=6;
+	struct sflap_hdr *hdr=(struct sflap_hdr *)buffer;
+        char *c;
+
+        while((res = read(toc_fd, buffer, 1))) {
+		if (res < 0)
+			return res;
+		if (buffer[0] == '*')
+                        break;
+
+	}
+
+	res = read(toc_fd, buffer+1, sizeof(struct sflap_hdr) - 1);
+
+        if (res < 0)
+		return res;
+
+	res += 1;
+	
+        
+	sprintf(debug_buff, "Rcv: %s %s\n",print_header(buffer), "");
+	debug_print(debug_buff);
+
+
+
+        while (res < (sizeof(struct sflap_hdr) + ntohs(hdr->len))) {
+		res += read(toc_fd, buffer + res, (ntohs(hdr->len) + sizeof(struct sflap_hdr)) - res);
+		while(gtk_events_pending())
+			gtk_main_iteration();
+	}
+        
+        if (res >= sizeof(struct sflap_hdr)) 
+		buffer[res]='\0';
+	else
+		return res - sizeof(struct sflap_hdr);
+		
+	switch(hdr->type) {
+	case TYPE_SIGNON:
+		memcpy(&peer_ver, buffer + sizeof(struct sflap_hdr), 4);
+		peer_ver = ntohl(peer_ver);
+		seqno = ntohs(hdr->seqno);
+		state = STATE_SIGNON_REQUEST;
+		break;
+	case TYPE_DATA:
+		if (!strncasecmp(buffer + sizeof(struct sflap_hdr), "SIGN_ON:", strlen("SIGN_ON:")))
+			state = STATE_SIGNON_ACK;
+		else if (!strncasecmp(buffer + sizeof(struct sflap_hdr), "CONFIG:", strlen("CONFIG:"))) {
+			state = STATE_CONFIG;
+		} else if (state != STATE_ONLINE && !strncasecmp(buffer + sizeof(struct sflap_hdr), "ERROR:", strlen("ERROR:"))) {
+			c = strtok(buffer + sizeof(struct sflap_hdr) + strlen("ERROR:"), ":");
+			show_error_dialog(c);
+		}
+
+		sprintf(debug_buff, "Data: %s\n",buffer + sizeof(struct sflap_hdr));
+		debug_print(debug_buff);
+
+		break;
+	default:
+			sprintf(debug_buff, "Unknown/unimplemented packet type %d\n",hdr->type);
+			debug_print(debug_buff);
+	}
+        return res;
+}
+
+
+
+void toc_callback( gpointer          data,
+                   gint              source,
+                   GdkInputCondition condition )
+{
+        char *buf;
+	char *c;
+        char *l;
+
+        buf = g_malloc(BUF_LONG);
+        if (wait_reply(buf, BUF_LONG) < 0) {
+                signoff();
+                hide_login_progress("Connection Closed");
+                g_free(buf);
+		return;
+        }
+                         
+        
+	c=strtok(buf+sizeof(struct sflap_hdr),":");	/* Ditch the first part */
+	if (!strcasecmp(c,"UPDATE_BUDDY")) {
+		char *uc;
+		int logged, evil, idle, type = 0;
+                time_t signon;
+                time_t time_idle;
+		
+		c = strtok(NULL,":"); /* c is name */
+
+		l = strtok(NULL,":"); /* l is T/F logged status */
+       	
+		sscanf(strtok(NULL, ":"), "%d", &evil);
+		
+		sscanf(strtok(NULL, ":"), "%ld", &signon);
+		
+		sscanf(strtok(NULL, ":"), "%d", &idle);
+		
+                uc = strtok(NULL, ":");
+
+
+		if (!strncasecmp(l,"T",1))
+			logged = 1;
+		else
+			logged = 0;
+
+
+		if (uc[0] == 'A')
+			type |= UC_AOL;
+		
+		switch(uc[1]) {
+		case 'A':
+			type |= UC_ADMIN;
+			break;
+		case 'U':
+			type |= UC_UNCONFIRMED;
+			break;
+		case 'O':
+			type |= UC_NORMAL;
+			break;
+		default:
+			break;
+		}
+
+                switch(uc[2]) {
+		case 'U':
+			type |= UC_UNAVAILABLE;
+			break;
+		default:
+			break;
+		}
+
+                if (idle) {
+                        time(&time_idle);
+                        time_idle -= idle*60;
+                } else
+                        time_idle = 0;
+		
+                serv_got_update(c, logged, evil, signon, time_idle, type);
+
+	} else if (!strcasecmp(c, "ERROR")) {
+		c = strtok(NULL,":");
+		show_error_dialog(c);
+	} else if (!strcasecmp(c, "NICK")) {
+		c = strtok(NULL,":");
+		g_snprintf(current_user->username, sizeof(current_user->username), "%s", c);
+	} else if (!strcasecmp(c, "IM_IN")) {
+		char *away, *message;
+                int a = 0;
+                
+		c = strtok(NULL,":");
+		away = strtok(NULL,":");
+
+		message = away;
+
+                while(*message && (*message != ':'))
+                        message++;
+
+                message++;
+
+		if (!strncasecmp(away, "T", 1))
+			a = 1;
+                serv_got_im(c, message, a);
+		
+	} else if (!strcasecmp(c, "GOTO_URL")) {
+		char *name;
+		char *url;
+
+		char tmp[256];
+		
+		name = strtok(NULL, ":");
+		url = strtok(NULL, ":");
+
+
+		g_snprintf(tmp, sizeof(tmp), "http://%s:%d/%s", toc_addy, aim_port, url);
+/*		fprintf(stdout, "Name: %s\n%s\n", name, url);
+		printf("%s", grab_url(tmp));*/
+		g_show_info(tmp);
+        } else if (!strcasecmp(c, "EVILED")) {
+                int lev;
+		char *name = NULL;
+
+                sscanf(strtok(NULL, ":"), "%d", &lev);
+                name = strtok(NULL, ":");
+
+                sprintf(debug_buff,"%s | %d\n", name, lev);
+				debug_print(debug_buff);
+
+		serv_got_eviled(name, lev);
+		
+        } else if (!strcasecmp(c, "CHAT_JOIN")) {
+                char *name;
+                int id;
+                
+
+		sscanf(strtok(NULL, ":"), "%d", &id);
+                name = strtok(NULL, ":");
+                serv_got_joined_chat(id, name);
+
+	} else if (!strcasecmp(c, "DIR_STATUS")) {
+	} else if (!strcasecmp(c, "CHAT_UPDATE_BUDDY")) {
+		int id;
+		char *in;
+		char *buddy;
+                GList *bcs = buddy_chats;
+		struct buddy_chat *b = NULL;
+		
+		sscanf(strtok(NULL, ":"), "%d", &id);
+
+		in = strtok(NULL, ":");
+
+		while(bcs) {
+			b = (struct buddy_chat *)bcs->data;
+			if (id == b->id)
+				break;	
+			bcs = bcs->next;
+                        b = NULL;
+		}
+		
+		if (!b)
+			return;
+
+		
+		if (!strcasecmp(in, "T")) {
+			while((buddy = strtok(NULL, ":")) != NULL) {
+				add_chat_buddy(b, buddy);
+			}
+		} else {
+			while((buddy = strtok(NULL, ":")) != NULL) {
+				remove_chat_buddy(b, buddy);
+			}
+		}
+
+	} else if (!strcasecmp(c, "CHAT_LEFT")) {
+		int id;
+
+
+                sscanf(strtok(NULL, ":"), "%d", &id);
+
+                serv_got_chat_left(id);
+
+
+	} else if (!strcasecmp(c, "CHAT_IN")) {
+
+		int id, w;
+		char *m;
+		char *who, *whisper;
+
+	
+		sscanf(strtok(NULL, ":"), "%d", &id);
+		who = strtok(NULL, ":");
+		whisper = strtok(NULL, ":");
+		m = whisper;
+                while(*m && (*m != ':')) m++;
+                m++;
+
+                if (!strcasecmp(whisper, "T"))
+			w = 1;
+		else
+			w = 0;
+
+		serv_got_chat_in(id, who, w, m);
+
+
+	} else if (!strcasecmp(c, "CHAT_INVITE")) {
+		char *name;
+		char *who;
+		char *message;
+                int id;
+
+               
+		name = strtok(NULL, ":");
+		sscanf(strtok(NULL, ":"), "%d", &id);
+		who = strtok(NULL, ":");
+                message = strtok(NULL, ":");
+
+                serv_got_chat_invite(name, id, who, message);
+
+
+#if 0
+        } else if (!strcasecmp(c, "RVOUS_PROPOSE")) {
+                /* File trans.  Yummy. */
+                char *user;
+                char *uuid;
+                char *cookie;
+                int seq;
+                char *rip, *pip, *vip;
+                int port;
+                int unk[4];
+                char *messages[4];
+                int subtype, files, totalsize;
+                char *name;
+                char *tmp;
+                int i;
+                struct file_transfer *ft;
+                
+
+                user = strtok(NULL, ":");
+                uuid = strtok(NULL, ":");
+                cookie = strtok(NULL, ":");
+                sscanf(strtok(NULL, ":"), "%d", &seq);
+                rip = strtok(NULL, ":");
+                pip = strtok(NULL, ":");
+                vip = strtok(NULL, ":");
+                sscanf(strtok(NULL, ":"), "%d", &port);
+                for (i=0; i<4; i++) {
+                        sscanf(strtok(NULL, ":"), "%d", &unk[i]);
+                        if (unk[i] == 10001)
+                                break;
+                        messages[i] = frombase64(strtok(NULL, ":"));
+                }
+                
+                tmp = frombase64(strtok(NULL, ":"));
+
+                subtype = tmp[1];
+                files = tmp[3]; /* These are fine */
+
+                totalsize = (tmp[4] << 24 & 0xff) |
+                        (tmp[5] << 16 & 0xff) |
+                        (tmp[6] << 8 & 0xff) |
+                        (tmp[7] & 0xff);
+
+                name = tmp + 8;
+
+                ft = g_new0(struct file_transfer, 1);
+
+                ft->cookie = g_strdup(cookie);
+                ft->ip = g_strdup(pip);
+                ft->port = port;
+                if (i)
+                        ft->message = g_strdup(messages[0]);
+                else
+                        ft->message = NULL;
+                ft->filename = g_strdup(name);
+                ft->user = g_strdup(user);
+                ft->size = totalsize;
+                
+                g_free(tmp);
+
+                for (i--; i >= 0; i--)
+                        g_free(messages[i]);
+                
+                accept_file_dialog(ft);
+#endif
+	} else {
+		sprintf(debug_buff,"don't know what to do with %s\n", c);
+		debug_print(debug_buff);
+	}
+        g_free(buf);
+}
+
+
+int toc_signon(char *username, char *password)
+{
+	char buf[BUF_LONG];
+	int res;
+	struct signon so;
+
+        sprintf(debug_buff,"State = %d\n", state);
+	debug_print(debug_buff);
+
+	if ((res = write(toc_fd, FLAPON, strlen(FLAPON))) < 0)
+		return res;
+	/* Wait for signon packet */
+
+	state = STATE_FLAPON;
+
+	if ((res = wait_reply(buf, sizeof(buf)) < 0))
+		return res;
+	
+	if (state != STATE_SIGNON_REQUEST) {
+			sprintf(debug_buff, "State should be %d, but is %d instead\n", STATE_SIGNON_REQUEST, state);
+			debug_print(debug_buff);
+			return -1;
+	}
+	
+	/* Compose a response */
+	
+	g_snprintf(so.username, sizeof(so.username), "%s", username);
+	so.ver = ntohl(1);
+	so.tag = ntohs(1);
+	so.namelen = htons(strlen(so.username));	
+	
+	sflap_send((char *)&so, ntohs(so.namelen) + 8, TYPE_SIGNON);
+	
+	g_snprintf(buf, sizeof(buf), 
+		"toc_signon %s %d %s %s %s \"%s\"",
+		login_host, login_port, normalize(username), roast_password(password), LANGUAGE, REVISION);
+
+        sprintf(debug_buff,"Send: %s\n", buf);
+		debug_print(debug_buff);
+
+	return sflap_send(buf, -1, TYPE_DATA);
+}
+
+int toc_wait_signon()
+{
+	/* Wait for the SIGNON to be approved */
+	char buf[BUF_LEN];
+	int res;
+	res = wait_reply(buf, sizeof(buf));
+	if (res < 0)
+		return res;
+	if (state != STATE_SIGNON_ACK) {
+			sprintf(debug_buff, "State should be %d, but is %d instead\n",STATE_SIGNON_ACK, state);
+			debug_print(debug_buff);
+		return -1;
+	}
+	return 0;
+}
+
+#ifdef _WIN32
+gint win32_read()
+{
+        int ret;
+        struct fd_set fds;
+        struct timeval tv;
+
+        FD_ZERO(&fds);
+
+        tv.tv_sec = 0;
+        tv.tv_usec = 200;
+
+        FD_SET(toc_fd, &fds);
+
+        ret = select(toc_fd + 1, &fds, NULL, NULL, &tv);
+
+        if (ret == 0) {
+                return TRUE;
+        }
+
+        toc_callback(NULL, 0, (GdkInputCondition)0);
+        return TRUE;
+}
+#endif
+
+
+char *toc_wait_config()
+{
+	/* Waits for configuration packet, returning the contents of the packet */
+	static char buf[BUF_LEN];
+	int res;
+        res = wait_reply(buf, sizeof(buf));
+	if (res < 0)
+		return NULL;
+	if (state != STATE_CONFIG) {
+        sprintf(debug_buff , "State should be %d, but is %d instead\n",STATE_CONFIG, state);
+		debug_print(debug_buff);
+		return NULL;
+	}
+	/* At this point, it's time to setup automatic handling of incoming packets */
+        state = STATE_ONLINE;
+#ifdef _WIN32
+        win32_r = gtk_timeout_add(1000, (GtkFunction)win32_read, NULL);
+#else
+        inpa = gdk_input_add(toc_fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, toc_callback, NULL);
+#endif
+	return buf;
+}
+
+
+void toc_build_config(char *s, int len)
+{
+    GList *grp = groups;
+    GList *mem;
+    struct group *g;
+        struct buddy *b;
+        GList *plist = permit;
+        GList *dlist = deny;
+
+    int pos=0;
+
+    if (!permdeny)
+                permdeny = 1;
+    pos += g_snprintf(&s[pos], len - pos, "m %d\n", permdeny);
+    while(grp) {
+        g = (struct group *)grp->data;
+        pos += g_snprintf(&s[pos], len - pos, "g %s\n", g->name);
+        mem = g->members;
+        while(mem) {
+            b = (struct buddy *)mem->data;
+            pos += g_snprintf(&s[pos], len - pos, "b %s\n", b->name);
+            mem = mem->next;
+        }
+        grp = grp ->next;
+        }
+        while(plist) {
+                pos += g_snprintf(&s[pos], len - pos, "p %s\n", (char *)plist->data);
+                plist=plist->next;
+
+        }
+        while(dlist) {
+                pos += g_snprintf(&s[pos], len - pos, "d %s\n", (char *)dlist->data);
+                dlist=dlist->next;
+        }
+}
+
+void parse_toc_buddy_list(char *config)
+{
+	char *c;
+        char current[256];
+	char *name;
+	GList *bud;
+        /* Clean out the permit/deny list!*/
+        g_list_free(permit);
+        g_list_free(deny);
+        permit = NULL;
+	deny = NULL;
+	bud = NULL;
+
+        
+        /* skip "CONFIG:" (if it exists)*/
+
+        c = strncmp(config + sizeof(struct sflap_hdr),"CONFIG:",strlen("CONFIG:"))?
+			strtok(config, "\n"):
+			strtok(config + sizeof(struct sflap_hdr)+strlen("CONFIG:"), "\n");
+     do {
+		if (c == NULL) 
+			break;
+		if (*c == 'g') {
+			strncpy(current,c+2, sizeof(current));
+			add_group(current);
+		} else if (*c == 'b') {
+			add_buddy(current, c+2);
+			bud = g_list_append(bud, c+2);
+        } else if (*c == 'p') {
+            name = g_malloc(strlen(c+2) + 2);
+            g_snprintf(name, strlen(c+2) + 1, "%s", c+2);
+            permit = g_list_append(permit, name);
+        } else if (*c == 'd') {
+            name = g_malloc(strlen(c+2) + 2);
+            g_snprintf(name, strlen(c+2) + 1, "%s", c+2);
+            deny = g_list_append(deny, name);
+        } else if (*c == 'm') {
+        	sscanf(c + strlen(c) - 1, "%d", &permdeny);
+        	if (permdeny == 0)
+			permdeny = 1;
+	   	}
+	}while((c=strtok(NULL,"\n"))); 
+#if 0
+	fprintf(stdout, "Sending message '%s'\n",buf);
+#endif
+       
+	serv_add_buddies(bud);
+        serv_set_permit_deny();
+ }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/util.c	Thu Mar 23 03:13:54 2000 +0000
@@ -0,0 +1,692 @@
+/*
+ * gaim
+ *
+ * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <unistd.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <gtk/gtk.h>
+#include <pixmaps/aimicon.xpm>
+#include "gaim.h"
+
+static GdkPixmap *icon_pm = NULL;
+static GdkBitmap *icon_bm = NULL;
+static int state;
+
+gint badchar(char c)
+{
+        if (c == ' ')
+                return 1;
+        if (c == ',')
+                return 1;
+        if (c == ')')
+                return 1;
+        if (c == '(')
+                return 1;
+        if (c == 0)
+                return 1;
+        if (c == '\n')
+                return 1;
+        return 0;
+
+
+}
+
+
+char *sec_to_text(int sec)
+{
+        int hrs, min;
+        char minutes[64];
+        char hours[64];
+        char sep[16];
+        char *ret = g_malloc(256);
+        
+        hrs = sec / 3600;
+        min = sec % 3600;
+
+        min = min / 60;
+        sec = min % 60;
+
+        if (min) {
+                if (min == 1)
+                        g_snprintf(minutes, sizeof(minutes), "%d minute.", min);
+                else
+                        g_snprintf(minutes, sizeof(minutes), "%d minutes.", min);
+                sprintf(sep, ", ");
+        } else {
+                if (!hrs)
+                        g_snprintf(minutes, sizeof(minutes), "%d minutes.", min);
+                else {
+                        minutes[0] = '.';
+                        minutes[1] = '\0';
+                }
+                sep[0] = '\0';
+        }
+
+        if (hrs) {
+                if (hrs == 1)
+                        g_snprintf(hours, sizeof(hours), "%d hour%s", hrs, sep);
+                else
+                        g_snprintf(hours, sizeof(hours), "%d hours%s", hrs, sep);
+        } else
+                hours[0] = '\0';
+
+        
+        g_snprintf(ret, 256, "%s%s", hours, minutes);
+
+        return ret;
+}
+
+gint linkify_text(char *text)
+{
+        char *c, *t;
+        char cpy[BUF_LONG];
+        char url_buf[512];
+        int cnt=0;
+        /* Assumes you have a buffer able to cary at least BUF_LEN * 2 bytes */
+
+        strncpy(cpy, text, strlen(text));
+        cpy[strlen(text)] = 0;
+        c = cpy;
+        while(*c) {
+                if (!strncasecmp(c, "<A", 2)) {
+                        while(1) {
+                                if (!strncasecmp(c, "/A>", 3)) {
+                                        break;
+                                }
+                                text[cnt++] = *c;
+                                c++;
+                                if (!(*c))
+                                        break;
+                        }
+                } else if (!strncasecmp(c, "http://", 7)) {
+                        t = c;
+                        while(1) {
+                                if (badchar(*t)) {
+                                        if (*(t-1) == '.')
+                                                t--;
+                                        strncpy(url_buf, c, t-c);
+                                        url_buf[t-c] = 0;
+                                        cnt += g_snprintf(&text[cnt++], 1024, "<A HREF=\"%s\">%s</A>", url_buf, url_buf);
+                                        cnt--;
+                                        c = t;
+                                        break;
+                                }
+                                if (!t)
+                                        break;
+                                t++;
+
+                        }
+                } else if (!strncasecmp(c, "www.", 4)) {
+                        if (strncasecmp(c, "www..", 5)) {
+                        t = c;
+                        while(1) {
+                                if (badchar(*t)) {
+                                        if (t-c == 4) {
+                                                break;
+                                        }
+                                        if (*(t-1) == '.')
+                                                t--;
+                                        strncpy(url_buf, c, t-c);
+                                        url_buf[t-c] = 0;
+                                        cnt += g_snprintf(&text[cnt++], 1024, "<A HREF=\"http://%s\">%s</A>", url_buf, url_buf);
+                                        cnt--;
+                                        c = t;
+                                        break;
+                                }
+                                if (!t)
+                                        break;
+                                t++;
+                        }
+                 }
+                } else if (!strncasecmp(c, "ftp://", 6)) {
+                        t = c;
+                        while(1) {
+                                if (badchar(*t)) {
+                                        if (*(t-1) == '.')
+                                                t--;
+                                        strncpy(url_buf, c, t-c);
+                                        url_buf[t-c] = 0;
+                                        cnt += g_snprintf(&text[cnt++], 1024, "<A HREF=\"%s\">%s</A>", url_buf, url_buf);
+                                        cnt--;
+                                        c = t;
+                                        break;
+                                }
+                                if (!t)
+                                        break;
+                                t++;
+
+                        }
+                } else if (!strncasecmp(c, "ftp.", 4)) {
+                        t = c;
+                        while(1) {
+                                if (badchar(*t)) {
+                                        if (t-c == 4) {
+                                                break;
+                                        }
+                                        if (*(t-1) == '.')
+                                                t--;
+                                        strncpy(url_buf, c, t-c);
+                                        url_buf[t-c] = 0;
+                                        cnt += g_snprintf(&text[cnt++], 1024, "<A HREF=\"ftp://%s\">%s</A>", url_buf, url_buf);
+                                        cnt--; 
+                                        c = t;
+                                        break;
+                                }
+                                if (!t)
+                                        break;
+                                t++;
+                        }
+                } else if (!strncasecmp(c, "mailto:", 7)) {
+                        t = c;
+                        while(1) {
+                                if (badchar(*t)) {
+                                        if (*(t-1) == '.')
+                                                t--;
+                                        strncpy(url_buf, c, t-c);
+                                        url_buf[t-c] = 0;
+                                        cnt += g_snprintf(&text[cnt++], 1024, "<A HREF=\"%s\">%s</A>", url_buf, url_buf);
+                                        cnt--;
+                                        c = t;
+                                        break;
+                                }
+                                if (!t)
+                                        break;
+                                t++;
+
+                        }
+                } else if (!strncasecmp(c, "@", 1)) {
+                        char *tmp;
+                        int flag;
+                        int len=0;
+                        url_buf[0] = 0;
+
+                        if (*(c-1) == ' ' || *(c+1) == ' ')
+                                flag = 0;
+                        else
+                                flag = 1;
+
+                        t = c;
+                        while(flag) {
+                                if (badchar(*t)) {
+                                        cnt -= (len - 1);
+                                        break;
+                                } else {
+                                        len++;
+                                        tmp = g_malloc(len + 1);
+                                        tmp[len] = 0;
+                                        tmp[0] = *t;
+                                        strncpy(tmp + 1, url_buf, len - 1);
+                                        strcpy(url_buf, tmp);
+                                        url_buf[len] = 0;
+                                        g_free(tmp);
+                                        t--;
+                                        if (t < cpy) {
+                                                cnt = 0;
+                                                break;
+                                        }
+                                }
+                        }
+
+
+                        t = c + 1;
+
+                        while(flag) {
+                                if (badchar(*t)) {
+                                        if (*(t-1) == '.')
+                                                t--;
+                                        cnt += g_snprintf(&text[cnt++], 1024, "<A HREF=\"mailto:%s\">%s</A>", url_buf, url_buf);
+                                        text[cnt]=0;
+
+
+                                        cnt--;
+                                        c = t;
+
+                                        break;
+                                } else {
+                                        strncat(url_buf, t, 1);
+                                        len++;
+                                        url_buf[len] = 0;
+                                }
+
+                                t++;
+
+                        }
+
+
+                }
+
+                if (*c == 0)
+                        break;
+
+                text[cnt++] = *c;
+                c++;
+
+        }
+        text[cnt]=0;
+        return cnt; 
+}
+
+
+FILE *open_log_file (struct conversation *c)
+{
+        char *buf = g_malloc(BUF_LONG);
+        char *buf2 = g_malloc(BUF_LONG);
+        char log_all_file[256];
+        struct log_conversation *l;
+        struct stat st;
+        int flag = 0;
+        FILE *fd;
+        int res;
+
+        if (!(general_options & OPT_GEN_LOG_ALL)) {
+
+                l = find_log_info(c->name);
+                if (!l)
+                        return NULL;
+
+                if (stat(l->filename, &st) < 0)
+                        flag = 1;
+
+                fd = fopen(l->filename, "a");
+
+                if (flag) { /* is a new file */
+                        fprintf(fd, "<HTML><HEAD><TITLE>" );
+                        fprintf(fd, "IM Sessions with %s", c->name );
+                        fprintf(fd, "</TITLE></HEAD><BODY BGCOLOR=\"ffffff\">\n" );
+                }
+
+                return fd;
+        }
+
+        /*  Dont log yourself */
+        g_snprintf(log_all_file, 256, "%s/.gaim", getenv("HOME"));
+
+        stat(log_all_file, &st);
+        if (!S_ISDIR(st.st_mode))
+                unlink(log_all_file);
+
+        fd = fopen(log_all_file, "r");
+
+        if (!fd) {
+                res = mkdir(log_all_file, S_IRUSR | S_IWUSR | S_IXUSR);
+                if (res < 0) {
+                        g_snprintf(buf, BUF_LONG, "Unable to make directory %s for logging", log_all_file);
+                        do_error_dialog(buf, "Error!");
+                        g_free(buf);
+                        g_free(buf2);
+                        return NULL;
+                }
+        } else
+                fclose(fd);
+
+        g_snprintf(log_all_file, 256, "%s/.gaim/%s", getenv("HOME"), current_user->username);
+
+        if (stat(log_all_file, &st) < 0)
+                flag = 1;
+        if (!S_ISDIR(st.st_mode))
+                unlink(log_all_file);
+
+        fd = fopen(log_all_file, "r");
+        if (!fd) {
+                res = mkdir(log_all_file, S_IRUSR | S_IWUSR | S_IXUSR);
+                if (res < 0) {
+                        g_snprintf(buf, BUF_LONG, "Unable to make directory %s for logging", log_all_file);
+                        do_error_dialog(buf, "Error!");
+                        g_free(buf);
+                        g_free(buf2);
+                        return NULL;
+                }
+        } else
+                fclose(fd);
+
+        
+        g_snprintf(log_all_file, 256, "%s/.gaim/%s/%s.log", getenv("HOME"), current_user->username, normalize(c->name));
+
+        if (stat(log_all_file, &st) < 0)
+                flag = 1;
+
+        sprintf(debug_buff,"Logging to: \"%s\"\n", log_all_file);
+        debug_print(debug_buff);
+
+        fd = fopen(log_all_file, "a");
+
+        if (flag) { /* is a new file */
+		fprintf(fd, "<HTML><HEAD><TITLE>" );
+		fprintf(fd, "IM Sessions with %s", c->name );
+		fprintf(fd, "</TITLE></HEAD><BODY BGCOLOR=\"ffffff\">\n" );
+        }
+        return fd;
+}
+
+
+int escape_message(char *msg)
+{
+	char *c, *cpy;
+	int cnt=0;
+	/* Assumes you have a buffer able to cary at least BUF_LEN * 2 bytes */
+	if (strlen(msg) > BUF_LEN) {
+		sprintf(debug_buff, "Warning:  truncating message to 2048 bytes\n");
+		debug_print(debug_buff);
+		msg[2047]='\0';
+	}
+	
+	cpy = g_strdup(msg);
+	c = cpy;
+	while(*c) {
+		switch(*c) {
+		case '$':
+		case '[':
+		case ']':
+		case '(':
+		case ')':
+		case '#':
+			msg[cnt++]='\\';
+			/* Fall through */
+		default:
+			msg[cnt++]=*c;
+		}
+		c++;
+	}
+	msg[cnt]='\0';
+	g_free(cpy);
+	return cnt;
+}
+
+int escape_text(char *msg)
+{
+	char *c, *cpy;
+	int cnt=0;
+	/* Assumes you have a buffer able to cary at least BUF_LEN * 2 bytes */
+	if (strlen(msg) > BUF_LEN) {
+		fprintf(stderr, "Warning:  truncating message to 2048 bytes\n");
+		msg[2047]='\0';
+	}
+	
+	cpy = g_strdup(msg);
+	c = cpy;
+	while(*c) {
+                switch(*c) {
+                case '\n':
+                        msg[cnt++] = '<';
+                        msg[cnt++] = 'B';
+                        msg[cnt++] = 'R';
+                        msg[cnt++] = '>';
+                        break;
+		case '{':
+		case '}':
+		case '\\':
+		case '"':
+			msg[cnt++]='\\';
+			/* Fall through */
+		default:
+			msg[cnt++]=*c;
+		}
+		c++;
+	}
+	msg[cnt]='\0';
+	g_free(cpy);
+	return cnt;
+}
+
+char * escape_text2(char *msg)
+{
+        char *c, *cpy;
+	char *woo;
+        int cnt=0;
+        /* Assumes you have a buffer able to cary at least BUF_LEN * 2 bytes */
+        if (strlen(msg) > BUF_LEN) {
+                fprintf(stderr, "Warning:  truncating message to 2048 bytes\n");
+                msg[2047]='\0';
+        }
+
+	woo = (char *)malloc(strlen(msg) * 2); 
+        cpy = g_strdup(msg);
+        c = cpy;
+        while(*c) {
+                switch(*c) {
+                case '\n':
+                        woo[cnt++] = '<';
+                        woo[cnt++] = 'B';
+                        woo[cnt++] = 'R';
+                        woo[cnt++] = '>';
+                        break;
+                case '{':
+                case '}':
+                case '\\':
+                case '"':
+                        woo[cnt++]='\\';
+                        /* Fall through */
+                default:
+                        woo[cnt++]=*c;
+                }
+                c++;
+        }
+        woo[cnt]='\0';
+        return woo;
+}
+
+
+char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
+                  "0123456789+/";
+                  
+
+char *tobase64(char *text)
+{
+	char *out = NULL;
+	char *c;
+	unsigned int tmp = 0;
+	int len = 0, n = 0;
+	
+	c = text;
+	
+	while(c) {
+		tmp = tmp << 8;
+		tmp += *c;
+		n++;
+
+		if (n == 3) {
+			out = g_realloc(out, len+4);
+			out[len] = alphabet[(tmp >> 18) & 0x3f];
+			out[len+1] = alphabet[(tmp >> 12) & 0x3f];
+			out[len+2] = alphabet[(tmp >> 6) & 0x3f];
+			out[len+3] = alphabet[tmp & 0x3f];
+			len += 4;
+			tmp = 0;
+			n = 0;
+		}
+		c++;
+	}
+	switch(n) {
+	
+	case 2:
+	        out = g_realloc(out, len+5);
+	        out[len] = alphabet[(tmp >> 12) & 0x3f];
+	        out[len+1] = alphabet[(tmp >> 6) & 0x3f];
+	        out[len+2] = alphabet[tmp & 0x3f];
+	        out[len+3] = '=';
+	        out[len+4] = 0;
+	        break;
+	case 1:
+	        out = g_realloc(out, len+4);
+	        out[len] = alphabet[(tmp >> 6) & 0x3f];
+	        out[len+1] = alphabet[tmp & 0x3f];
+	        out[len+2] = '=';
+	        out[len+3] = 0;
+	        break;
+	case 0:
+		out = g_realloc(out, len+2);
+		out[len] = '=';
+		out[len+1] = 0;
+		break;
+	}
+	return out;
+}
+
+
+char *frombase64(char *text)
+{
+        char *out = NULL;
+        char tmp = 0;
+        char *c;
+        gint32 tmp2 = 0;
+        int len = 0, n = 0;
+        
+        c = text;
+        
+        while(*c) {
+                if (*c >= 'A' && *c <= 'Z') {
+                        tmp = *c - 'A';
+                } else if (*c >= 'a' && *c <= 'z') {
+                        tmp = 26 + (*c - 'a');
+                } else if (*c >= '0' && *c <= 57) {
+                        tmp = 52 + (*c - '0');
+                } else if (*c == '+') {
+                        tmp = 62;
+                } else if (*c == '/') {
+                	tmp = 63;
+                } else if (*c == '=') {
+                        if (n == 3) {
+                                out = g_realloc(out, len + 2);
+                                out[len] = (char)(tmp2 >> 10) & 0xff;
+                                len++;
+                                out[len] = (char)(tmp2 >> 2) & 0xff;
+                                len++;
+                        } else if (n == 2) {
+                                out = g_realloc(out, len + 1);
+                                out[len] = (char)(tmp2 >> 4) & 0xff;
+                                len++;
+                        }
+                        break;
+                }
+                tmp2 = ((tmp2 << 6) | (tmp & 0xff));
+                n++;
+                if (n == 4) {
+                        out = g_realloc(out, len + 3);
+                        out[len] = (char)((tmp2 >> 16) & 0xff);
+                        len++;
+                        out[len] = (char)((tmp2 >> 8) & 0xff);
+                        len++;
+                        out[len] = (char)(tmp2 & 0xff);
+                        len++;
+                        tmp2 = 0;
+                        n = 0;
+                }
+                c++;
+        }
+
+        g_realloc(out, len+1);
+        out[len] = 0;
+        
+        return out;
+}
+
+
+char *normalize(const char *s)
+{
+	static char buf[BUF_LEN];
+        char *t, *u;
+        int x=0;
+
+        u = t = g_malloc(strlen(s) + 1);
+
+        strcpy(t, s);
+        g_strdown(t);
+        
+	while(*t) {
+		if (*t != ' ') {
+			buf[x] = *t;
+			x++;
+		}
+		t++;
+	}
+        buf[x]='\0';
+        g_free(u);
+	return buf;
+}
+
+int query_state()
+{
+        return state;
+}
+
+void set_state(int i)
+{
+        state = i;
+}
+
+char *date()
+{
+	static char date[80];
+	time_t tme;
+	time(&tme);
+	strftime(date, sizeof(date), "%H:%M:%S", localtime(&tme));
+	return date;
+}
+
+
+gint clean_pid(void *dummy)
+{
+	int status;
+	pid_t pid;
+
+	pid = waitpid(-1, &status, WNOHANG);
+
+	if (pid == 0)
+		return TRUE;
+
+	return FALSE;
+}
+
+void aol_icon(GdkWindow *w)
+{
+#ifndef _WIN32
+	if (icon_pm == NULL) {
+		icon_pm = gdk_pixmap_create_from_xpm_d(w, &icon_bm,
+						       NULL, (gchar **)aimicon_xpm);
+	}
+	gdk_window_set_icon(w, NULL, icon_pm, icon_bm);
+        gdk_window_set_group(w, mainwindow->window);
+#endif
+}
+
+struct aim_user *find_user(const char *name)
+{
+        char *who = g_strdup(normalize(name));
+        GList *usr = aim_users;
+        struct aim_user *u;
+
+        while(usr) {
+                u = (struct aim_user *)usr->data;
+                if (!strcmp(normalize(u->username), who)) {
+                        g_free(who);
+                        return u;
+                }
+                usr = usr->next;
+        }
+        g_free(who);
+        return NULL;
+}