Importing Liece 1.4.3. liece-1_4_3 start
authorueno <ueno>
Tue, 4 Apr 2000 01:45:43 +0000 (01:45 +0000)
committerueno <ueno>
Tue, 4 Apr 2000 01:45:43 +0000 (01:45 +0000)
103 files changed:
AUTHORS [new file with mode: 0644]
COPYING [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
INSTALL [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
NEWS [new file with mode: 0644]
README [new file with mode: 0644]
acinclude.m4 [new file with mode: 0644]
bootstrap [new file with mode: 0755]
configure.in [new file with mode: 0644]
contrib/plum-support.el [new file with mode: 0644]
dcc/Makefile.am [new file with mode: 0644]
dcc/dcc.c [new file with mode: 0644]
dcc/dcc.ml [new file with mode: 0644]
dcc/getaddrinfo.c [new file with mode: 0644]
dcc/getaddrinfo.h [new file with mode: 0644]
dcc/getopt.c [new file with mode: 0644]
dcc/getopt.h [new file with mode: 0644]
dcc/getopt1.c [new file with mode: 0644]
dcc/naddr.ml [new file with mode: 0644]
dcc/naddr.mli [new file with mode: 0644]
dcc/tcp.c [new file with mode: 0644]
doc/Makefile.am [new file with mode: 0644]
doc/liece-ja.texi [new file with mode: 0644]
doc/sample.dot.liece.in [new file with mode: 0644]
doc/texinfo.tex [new file with mode: 0644]
etc/Emacs.ad [new file with mode: 0644]
etc/Makefile.am [new file with mode: 0644]
etc/icons/back.xpm [new file with mode: 0644]
etc/icons/ball.blank.xpm [new file with mode: 0644]
etc/icons/ball.gray.xpm [new file with mode: 0644]
etc/icons/ball.red.xpm [new file with mode: 0644]
etc/icons/crypt.xpm [new file with mode: 0644]
etc/icons/encrypt.xpm [new file with mode: 0644]
etc/icons/forward.xpm [new file with mode: 0644]
etc/icons/home.xpm [new file with mode: 0644]
etc/icons/icons.gif [new file with mode: 0644]
etc/icons/icons.xpm [new file with mode: 0644]
etc/icons/key.xpm [new file with mode: 0644]
etc/icons/liece-pointer.xbm [new file with mode: 0644]
etc/icons/liece-pointer.xpm [new file with mode: 0644]
etc/icons/location.xpm [new file with mode: 0644]
etc/icons/naruto.blank.xpm [new file with mode: 0644]
etc/icons/naruto.gray.xpm [new file with mode: 0644]
etc/icons/naruto.red.xpm [new file with mode: 0644]
etc/icons/pindown.xpm [new file with mode: 0644]
etc/icons/print.xpm [new file with mode: 0644]
etc/icons/reload.xpm [new file with mode: 0644]
etc/icons/search.xpm [new file with mode: 0644]
etc/icons/stop.xpm [new file with mode: 0644]
etc/po/ja.po [new file with mode: 0644]
etc/styles/bottom [new file with mode: 0644]
etc/styles/middle [new file with mode: 0644]
etc/styles/top [new file with mode: 0644]
lisp/.cvsignore [new file with mode: 0644]
lisp/ChangeLog [new file with mode: 0644]
lisp/Makefile [new file with mode: 0644]
lisp/Makefile.am [new file with mode: 0644]
lisp/bitmap-stipple.el [new file with mode: 0644]
lisp/gettext.el [new file with mode: 0644]
lisp/liece-000.el [new file with mode: 0644]
lisp/liece-200.el [new file with mode: 0644]
lisp/liece-300.el [new file with mode: 0644]
lisp/liece-400.el [new file with mode: 0644]
lisp/liece-500.el [new file with mode: 0644]
lisp/liece-channel.el [new file with mode: 0644]
lisp/liece-clfns.el [new file with mode: 0644]
lisp/liece-coding.el [new file with mode: 0644]
lisp/liece-commands.el [new file with mode: 0644]
lisp/liece-compat.el [new file with mode: 0644]
lisp/liece-config.el [new file with mode: 0644]
lisp/liece-crypt.el [new file with mode: 0644]
lisp/liece-ctcp.el [new file with mode: 0644]
lisp/liece-dcc.el [new file with mode: 0644]
lisp/liece-emacs.el [new file with mode: 0644]
lisp/liece-filter.el [new file with mode: 0644]
lisp/liece-globals.el [new file with mode: 0644]
lisp/liece-handle.el [new file with mode: 0644]
lisp/liece-handler.el [new file with mode: 0644]
lisp/liece-hilit.el [new file with mode: 0644]
lisp/liece-inlines.el [new file with mode: 0644]
lisp/liece-intl.el [new file with mode: 0644]
lisp/liece-mail.el [new file with mode: 0644]
lisp/liece-make.el [new file with mode: 0644]
lisp/liece-menu.el [new file with mode: 0644]
lisp/liece-message.el [new file with mode: 0644]
lisp/liece-minibuf.el [new file with mode: 0644]
lisp/liece-misc.el [new file with mode: 0644]
lisp/liece-modules.el [new file with mode: 0644]
lisp/liece-nick.el [new file with mode: 0644]
lisp/liece-q-ccl.el [new file with mode: 0644]
lisp/liece-q-el.el [new file with mode: 0644]
lisp/liece-tcp.el [new file with mode: 0644]
lisp/liece-url.el [new file with mode: 0644]
lisp/liece-vars.el [new file with mode: 0644]
lisp/liece-version.el [new file with mode: 0644]
lisp/liece-window.el [new file with mode: 0644]
lisp/liece-x-face.el [new file with mode: 0644]
lisp/liece-xemacs.el [new file with mode: 0644]
lisp/liece.el [new file with mode: 0644]
lisp/liece.xbm [new file with mode: 0644]
lisp/liece.xpm [new file with mode: 0644]
lisp/queue-m.el [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..071acdb
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,8 @@
+-*- mode: text; left-margin: 2; fill-column: 70; -*-
+
+  Liece is mainly written by Daiki Ueno <ueno@ueda.info.waseda.ac.jp>.
+  
+  This package based on Irchat (version 3.01) which has been
+  distributed under GPL1 or later.
+  
+  Original author of Irchat is Tor Lillqvist <tml@hemuli.atk.vtt.fi>
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..a3f6b12
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                          59 Temple Place - Suite 330, Boston, MA
+                          02111-1307, USA.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+       Appendix: How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    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.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..467ae8b
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,95 @@
+-*- mode: text; left-margin: 2; fill-column: 70; -*-
+
+  This program is in very early developing stage. Please use at your
+  own risk.
+  
+* Requirements
+
+  Liece works under following environment at least.
+  
+  - Emacs 20.6
+  - XEmacs 21.2 with MULE extension
+  
+  This package uses following external libraries.
+  
+  - APEL 10.2 or later (stands for - "A Portable Emacs Library")
+       ftp://ftp.m17n.org/pub/mule/apel/
+  - FLIM 1.12 or later
+       ftp://ftp.m17n.org/pub/mule/flim/
+  
+  If you does not have installed copy of above, please try to specify 
+  `--enable-apel' option at configure time.
+  (After configuration, Liece will use local copy of APEL.)
+
+* Quick installation
+
+  (Install APEL, then)
+  % ./configure
+  % make
+  % su
+  Password: ultrasecret
+  # make install
+  
+  If you are not able to become super-user, you may specify local
+  directory to install.
+  
+  % ./configure --prefix=~/ --with-lispdir=~/elisp
+
+* Configuration and running
+  
+** Setting up your ~/.emacs   
+  
+  If you are using Emacs or Mule, please add directory of APEL and
+  Liece to load-path.  If you install by default setting you can write
+  subdirs.el for example:
+  
+  ex:
+  (normal-top-level-add-to-load-path '("apel" "liece"))
+
+  If you are using Emacs 20.3 or XEmacs, prepare `subdirs.el' with
+  following contents, Emacs will find and append each substantial
+  directory to `load-path' automagically.
+
+  ex:
+  (normal-top-level-add-subdirs-to-load-path)
+
+  If you are using Emacs 19 or earlier version of Emacsen, 
+  you have to write more complicated path-setting in your `~/.emacs'.
+  
+  ex: 
+  (setq load-path 
+        (append 
+         (list "/usr/local/lib/mule/site-lisp/apel"
+              "/usr/local/lib/mule/site-lisp/liece")
+         load-path))
+  
+  For more details, please read `README' file come along with APEL.
+
+  If you have never been using liece and/or its variants, 
+  add an autoload setting into your `~/.emacs'.
+
+  ex:
+  (autoload 'liece "liece" nil t)
+
+** Setting up your ~/.liece
+  
+  If you have never run Liece, and quite unsure to configure startup
+  files in Emacs Lisp, please copy `sample.dot.liece' file in `doc'
+  directory to `~/.liece'.
+
+  Please read ducuments under `doc' directory.
+  (`README-styles' to configure window splitting)
+  
+* Optional packages
+
+  Following packages are optional. If install script of this package
+  found them, it would use various functionality provided in them.
+  
+  custom
+       http://www.dina.kvl.dk/~abraham/custom/
+
+  X-Face utility
+       ftp://ftp.jpl.org/pub/elisp/
+
+  bitmap-mule
+       ftp://ftp.jpl.org/pub/elisp/bitmap/ (for GNU Emacs only)
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..7547883
--- /dev/null
@@ -0,0 +1,69 @@
+SUBDIRS = . dcc doc etc lisp 
+
+CVSROOT = :pserver:anonymous@cvs.m17n.org:/cvs/root
+if USE_TM
+ALL_LOCAL_TARGET = all-tm
+INSTALL_LOCAL_TARGET = install-tm
+CLEAN_LOCAL_TARGET = clean-tm
+else
+ALL_LOCAL_TARGET = 
+INSTALL_LOCAL_TARGET = 
+CLEAN_LOCAL_TARGET =
+endif
+
+if USE_PACKAGE
+ALL_TM_TARGET = package
+INSTALL_TM_TARGET = install-package
+else
+ALL_TM_TARGET = 
+INSTALL_TM_TARGET = install 
+endif
+
+CLEAN_TM_TARGET = clean
+
+if USE_CUSTOM_LISPDIR
+INSTALL_TM_MAKEFLAGS = LISPDIR=$(lispdir) VERSION_SPECIFIC_LISPDIR=$(lispdir)
+else
+INSTALL_TM_MAKEFLAGS = 
+endif
+
+if USE_CUSTOM_PACKAGEDIR
+INSTALL_TM_MAKEFLAGS = PACKAGEDIR=$(packagedir)
+endif
+
+all-local: $(ALL_LOCAL_TARGET)
+
+install-data-local: $(INSTALL_LOCAL_TARGET) 
+
+clean-local: $(CLEAN_LOCAL_TARGET) 
+
+all-tm:
+       @if grep ${CVSROOT} ${HOME}/.cvspass; then :; else \
+       echo "${CVSROOT} A" >> ${HOME}/.cvspass; fi; \
+       target=`echo $@ | sed s/-recursive//`; \
+       if test -d apel; then :; else \
+               cvs -d ${CVSROOT} -z3 checkout apel; fi; \
+       if test -d flim; then :; else \
+               cvs -d ${CVSROOT} -z3 checkout -r flim-1_13 flim; fi; \
+       list='apel flim'; for subdir in $$list; do \
+               echo "Making $$target in $$subdir"; \
+               ( cd $$subdir && \
+               $(MAKE) $(AM_MAKEFLAGS) $(ALL_TM_TARGET) ) ; \
+       done
+
+install-tm: all-tm
+       @target=`echo $@ | sed s/-recursive//`; \
+       list='apel flim'; for subdir in $$list; do \
+               echo "Making $$target in $$subdir"; \
+               ( cd $$subdir && \
+               $(MAKE) $(INSTALL_TM_MAKEFLAGS) $(INSTALL_TM_TARGET) ) ; \
+       done
+
+clean-tm:
+       @target=`echo $@ | sed s/-recursive//`; \
+       list='apel flim'; for subdir in $$list; do \
+               echo "Making $$target in $$subdir"; \
+               ( cd $$subdir && \
+               $(MAKE) $(AM_MAKEFLAGS) $(CLEAN_TM_TARGET) ) ; \
+       done
+
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..be1a1ce
--- /dev/null
+++ b/README
@@ -0,0 +1,42 @@
+-*- mode: text; left-margin: 2; fill-column: 70; -*-
+
+* Directory tree
+  
+  This package contains following directories:
+  
+  lisp/ - Emacs Lisp files.
+  
+  dcc/  - DCC external program source.
+  
+  doc/  - Documentation, info files, sample configuration, etc.
+  
+  etc/  - Miscellaneous files which decorate this program.
+  
+  Please read documentation under `doc' directory.
+
+* Bug reports
+  
+  If you write bug reports and/or suggestions for improvement, 
+  please send them to me :-)
+
+* CVS
+  
+  Development of Liece uses CVS, Concurrent Versions System.
+  Latest developing version is available at CVS.
+  
+(0) logging in to anonymous CVS server.
+  
+    % cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root login
+
+    CVS password: [CR] # NULL string
+  
+(1) checkout modules
+  
+    % cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root checkout liece
+  
+  Specify revision tag in front of the module name.
+
+(2) bootstrapping
+  
+  % cd liece
+  % ./bootstrap
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644 (file)
index 0000000..b0b8238
--- /dev/null
@@ -0,0 +1,79 @@
+AC_DEFUN(AM_PATH_LISPDIR,
+ [dnl #
+  dnl # Check Emacs
+  dnl #
+  AC_ARG_WITH(emacs,
+    [  --with-emacs=EMACS      compile with EMACS [EMACS=emacs, xemacs...]],
+    [case "${withval}" in
+       yes)    EMACS= ;;
+       no)     AC_MSG_ERROR([emacs is not available]) ;;
+       *)      EMACS=${withval} ;;
+     esac], EMACS=)
+  if test "x$EMACS" = "xt" -o "x$EMACS" = x; then
+    AC_PATH_PROGS(EMACS, emacs xemacs mule, no)
+  else
+    AC_MSG_CHECKING(for emacs)
+    AC_MSG_RESULT($EMACS)
+  fi
+  dnl # 
+  dnl # Check Emacs directories
+  dnl #
+  AC_ARG_WITH(emacsdir,
+    [  --with-emacsdir=EDIR    Emacs program/data files in EDIR [guessed]],
+    [case "${withval}" in
+       yes)    emacsdir=NONE ;;
+       no)     AC_MSG_ERROR(emacsdir is not available) ;;
+       *)      emacsdir=${withval} ;;
+     esac], emacsdir=NONE)
+  AC_MSG_CHECKING([where emacs files are in])
+  AC_MSG_RESULT($emacsdir)
+  AC_SUBST(emacsdir)
+  dnl # 
+  dnl # Check Emacs site-lisp directories
+  dnl #
+  ac_cv_lispdir=no
+  AC_ARG_WITH(lispdir,
+    [  --with-lispdir=DIR      emacs lisp files in DIR [EDIR/site-lisp]],
+    [case "${withval}" in
+       yes)    lispdir=NONE ;;
+       no)     AC_MSG_ERROR(lispdir is not available) ;;
+       *)      lispdir=${withval} ; ac_cv_lispdir=yes ;;
+     esac], lispdir=NONE)
+  AC_MSG_CHECKING([where .elc files should go])
+  AC_MSG_RESULT($lispdir)
+  AC_SUBST(lispdir)
+  AM_CONDITIONAL(USE_CUSTOM_LISPDIR, test x$ac_cv_lispdir = xyes)
+  dnl #
+  dnl # Check whether install as XEmacs package
+  dnl #
+  AC_ARG_ENABLE(package,
+    [  --enable-package        install as XEmacs package [default=no]],,
+    enable_package=no)
+  AC_MSG_CHECKING([whether install as XEmacs package])
+  if test "x$enable_package" = "xyes"; then
+    AC_MSG_RESULT(yes)
+    EMACS=xemacs
+    dnl # 
+    dnl # Check XEmacs package directories 
+    dnl #
+    ac_cv_packagedir=no
+    AC_ARG_WITH(packagedir,
+      [  --with-packagedir=DIR   XEmacs package files in DIR [EDIR/packages]],
+      [case "${withval}" in
+         yes)  packagedir=NONE ;;
+         no)   AC_MSG_ERROR(packagedir is not available) ;;
+         *)    packagedir=${withval} ; ac_cv_packagedir=yes ;;
+       esac], packagedir=NONE)
+    AC_MSG_CHECKING([where package files should go])
+    if test "x$packagedir" = "xNONE"; then
+      eval `$EMACS -batch -q -no-site-file -l ./lisp/liece-make.el \
+        -f config-liece-package-directory`
+      packagedir=$PACKAGEDIR
+    fi
+    AC_MSG_RESULT($packagedir)
+    AC_SUBST(packagedir)
+    AM_CONDITIONAL(USE_CUSTOM_PACKAGEDIR, test x$ac_cv_packagedir = xyes)
+  else 
+    AC_MSG_RESULT(no)
+  fi
+  AM_CONDITIONAL(USE_PACKAGE, test x$enable_package = xyes)])
diff --git a/bootstrap b/bootstrap
new file mode 100755 (executable)
index 0000000..c67fa95
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+aclocal
+automake --gnu --add-missing
+autoconf
+
+exit 0
diff --git a/configure.in b/configure.in
new file mode 100644 (file)
index 0000000..a3ae353
--- /dev/null
@@ -0,0 +1,62 @@
+AC_INIT(lisp/liece.el)
+AM_INIT_AUTOMAKE(liece, 1.4.3)
+
+AM_PATH_LISPDIR
+
+AC_PROG_CC
+AC_ISC_POSIX
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+
+AC_CHECK_HEADERS(sys/select.h libgen.h socks.h netinet6/in6.h)
+AC_CHECK_FUNCS(strtoul memmove basename getaddrinfo)
+
+AC_CHECK_LIB(nsl, gethostbyname)
+AC_CHECK_LIB(socket, socket)
+
+AC_CHECK_TYPE(fd_set, int)
+
+dnl checking if the system supports ipv6 address space or not
+AC_CACHE_CHECK([for struct in6_addr], ac_cv_struct_in6_addr,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet6/in6.h>], [struct in6_addr v6; v6.s6_addr32[3];],
+ac_cv_struct_in6_addr=yes, ac_cv_struct_in6_addr=no)])
+test "x$ac_cv_struct_in6_addr" = "xyes" && AC_DEFINE(HAVE_IN6_ADDR)
+
+dnl checking if the system supports tcp over ipv6 support or not
+AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_struct_sockaddr_in6,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet6/in6.h>], [struct sockaddr_in6 v6; v6.sin6_addr;],
+ac_cv_struct_sockaddr_in6=yes, ac_cv_struct_sockaddr_in6=no)])
+test "x$ac_cv_struct_sockaddr_in6" = "xyes" && AC_DEFINE(HAVE_SOCKADDR_IN6)
+
+# Check compile with IPv6 support
+AC_MSG_CHECKING(whether we compile with IPv6)
+AC_ARG_ENABLE(ipv6, \
+ [ --enable-ipv6           compile with IPv6 [default=no]],, \
+    enable_ipv6=no)
+test "x$enable_ipv6" = "xyes" && AC_DEFINE(INET6)
+AC_MSG_RESULT($enable_ipv6)
+
+# Check whether to retrieve APEL/FLIM distribution.
+AC_MSG_CHECKING(whether we retrieve APEL/FLIM distribution via CVS)
+AC_ARG_ENABLE(tm, \
+ [ --enable-tm             retrieve APEL/FLIM distribution via CVS [default=no]],, \
+    enable_tm=no)
+if test "x$enable_tm" = "xyes"; then
+    AC_MSG_RESULT(yes)
+else 
+    AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(USE_TM, test x$enable_tm = xyes)
+
+AC_OUTPUT(Makefile \
+lisp/Makefile \
+dcc/Makefile \
+doc/Makefile \
+etc/Makefile)
diff --git a/contrib/plum-support.el b/contrib/plum-support.el
new file mode 100644 (file)
index 0000000..9697fbc
--- /dev/null
@@ -0,0 +1,150 @@
+;;; plum-support.el --- pirc support for plum
+;; Copyright (C) 1999 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+;; See file irchat-copyright.el for original change log and copyright info.
+
+;; Author: Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+;; Created: 1999-05-06
+;; Revised: 1999-05-06
+;; Keywords: IRC, irchat, pirc
+
+;; This file is not part of any package.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Code:
+
+(require 'custom)
+
+(defcustom plum-recent-header "plum"
+  "String added in front of each recent logged message"
+  :type 'string
+  :group 'irchat-support)
+
+(defconst plum-recent-time-header-regexp "[0-9][0-9]:[0-9][0-9]"
+  "Regexp for timestamp preceding in message body")
+
+(defconst plum-recent-privmsg-header-regexp
+  "[<>(=]\\([^ <>)=]*\\)[<>)=]"
+  "Regexp for whole message line (privmsg)")
+
+(defconst plum-recent-join-header-regexp
+  "\\+ [@+]?[^ ]* [^ ]* to \\([^ ]*\\)"
+  "Regexp for whole message line (join)")
+
+(defconst plum-recent-part-header-regexp
+  "- [^ ]* from \\([^ ]*\\)"
+  "Regexp for whole message line (part)")
+
+(defconst plum-recent-kick-header-regexp
+  "- [^ ]* by [^ ]* from \\([^ ]*\\) .*"
+  "Regexp for whole message line (kick)")
+
+(defconst plum-recent-mode-header-regexp
+  "Mode by [^:]*: \\([^ ]*\\) .*"
+  "Regexp for whole message line (mode)")
+
+(defconst plum-recent-topic-header-regexp
+  "Topic of channel \\([^ ]*\\) by [^:]*: .*"
+  "Regexp for whole message line (nick)")
+
+(defconst plum-recent-message-header-regexp
+  (concat "^\\(" plum-recent-time-header-regexp "\\)? *"
+         plum-recent-privmsg-header-regexp))
+
+(defconst plum-recent-channel-header-regexp
+  (concat "^\\(" plum-recent-time-header-regexp "\\)? *"
+         (mapconcat (function identity) 
+                    (list plum-recent-join-header-regexp
+                          plum-recent-part-header-regexp
+                          plum-recent-kick-header-regexp
+                          plum-recent-mode-header-regexp
+                          plum-recent-topic-header-regexp)
+                    "\\|")))
+
+(defconst plum-recent-generic-header-regexp
+  (concat "^\\(" plum-recent-time-header-regexp "\\)? *"))
+
+(defvar plum-recent-log-buffer " *plum recent log")
+
+(defun plum-parse-recent-after ()
+  "Parse text after point as recent log message, then returns components"
+  (save-excursion
+    (let (time lparen rparen chnl nick)
+      (cond
+       ((looking-at plum-recent-message-header-regexp)
+       (setq time (match-string 1))
+       (goto-char (match-beginning 2))
+       (setq lparen (char-before))
+       (goto-char (match-end 2))
+       (setq rparen (char-after))
+       (skip-chars-backward "^: ") 
+       (skip-chars-forward "=")
+       (setq nick (buffer-substring (point) (match-end 2)))
+       (backward-char)
+       (setq chnl (buffer-substring (match-beginning 2) (point)))
+       (goto-char (match-end 0))
+       (forward-char)
+       (list 'message time lparen rparen chnl nick 
+             (buffer-substring (point) (line-end-position))))
+       ((looking-at plum-recent-channel-header-regexp)
+       (setq time (match-string 1)
+             chnl (match-string 2))
+       (goto-char (match-end 1))
+       (forward-char)
+       (list 'channel time chnl 
+             (buffer-substring (point) (line-end-position))))
+       ((looking-at plum-recent-generic-header-regexp)
+       (setq time (match-string 1))
+       (goto-char (match-end 0))
+       (list 'generic time (buffer-substring (point) (line-end-position)))))
+      )))
+
+(add-hook 'irchat-notice-hook 'plum-recent-add)
+(add-hook 'irchat-002-hook 
+         (function 
+          (lambda (header rest)
+            (remove-hook 'irchat-notice-hook 'plum-recent-add) )))
+
+(defun plum-recent-add (header rest)
+  "Add recent log line into `plum-recent-log-buffer'."
+  (let (fun from to body component type)
+    (if header 
+       nil
+      (and rest (string-match "^[^ ]* +:\\(.*\\)" rest)
+          (with-temp-buffer 
+            (insert (match-string 1 rest) ?\n)
+            (goto-char (point-min))
+            (setq component (plum-parse-recent-after)
+                  type (pop component))
+            (cond
+             ((eq type 'message)
+              (setq from (nth 4 component)
+                    to (cond 
+                        ((eq (nth 1 component) ?=)
+                         (irchat-current-nickname))
+                        ((eq (nth 1 component) ?<)
+                         (irchat-channel-real (nth 3 component))))
+                    body (concat "(" plum-recent-header " " (car component) 
+                                 ") " (nth 5 component))
+                    fun (llhandler-lookup "irchat-handle-privmsg-msg"))
+              (funcall fun from (concat to " :" body))
+              t)
+             (t nil)))))))
+              
+
+(provide 'plum-support)
+
+;;; plum-support.el ends here.
\ No newline at end of file
diff --git a/dcc/Makefile.am b/dcc/Makefile.am
new file mode 100644 (file)
index 0000000..9c54399
--- /dev/null
@@ -0,0 +1,34 @@
+## Process this file with automake to produce Makefile.in
+
+DEFS = -I$(srcdir) -I$(top_srcdir) $(CFLAGS) @DEFS@
+LIBS = -L. -ldcc @LIBS@
+CLEANFILES = ldcc ltcp
+
+noinst_LIBRARIES = libdcc.a
+bin_PROGRAMS = ldcc ltcp
+
+libdcc_a_SOURCES = getopt1.c getopt.c getaddrinfo.c
+noinst_HEADERS = getopt.h getaddrinfo.h
+
+ltcp_SOURCES = tcp.c 
+ldcc_SOURCES = dcc.c
+
+#MLHDRS = naddr.mli
+#MLSRCS = naddr.ml dcc.ml
+#MLOBJS = $(MLSRCS:.ml=.cmo) 
+#MLINTF = $(MLHDRS:.mli=.cmi) 
+#EXTRA_ldcc_SOURCES = $(MLHDRS) $(MLSRCS)
+#ldcc_SOURCES = $(MLSRCS)
+#ldcc_COMPILE = @OCAMLC@
+#ldcc_LINK = $(OCAMLC) -custom unix.cma nums.cma str.cma 
+#ldcc_LDFLAGS = -cclib -lunix -cclib -lnums -cclib -lstr -o ldcc
+
+#SUFFIXES = .ml .mli .cmo .cmi
+
+#$(MLOBJS): $(MLINTF)
+
+#.mli.cmi:
+#      $(OCAMLC) -c $<
+
+#.ml.cmo:
+#      $(OCAMLC) -c $<
diff --git a/dcc/dcc.c b/dcc/dcc.c
new file mode 100644 (file)
index 0000000..7671cc0
--- /dev/null
+++ b/dcc/dcc.c
@@ -0,0 +1,505 @@
+/* This file is part of Liece.                                          
+   Copyright (C) 1998 Daiki Ueno <daiki@kake.info.waseda.ac.jp>         
+
+   Author: Daiki Ueno <daiki@kake.info.waseda.ac.jp>                    
+   Created: 1998-09-28                                                  
+   Revised: 1999-01-28                                                  
+   Keywords: IRC, liece, DCC                                           
+
+   This file is part of Liece.                                          
+
+   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, 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 GNU Emacs; see the file COPYING.  If not, write to the    
+   Free Software Foundation, Inc., 59 Temple Place - Suite 330,         
+   Boston, MA 02111-1307, USA.                                          
+*/
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/socket.h>
+#include <sys/file.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <netdb.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <netinet/in.h>
+#define _GNU_SOURCE
+#include <getopt.h>
+
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 31
+#endif
+
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+
+#ifdef HAVE_MEMMOVE
+# ifdef HAVE_LIBGEN_H
+#  include <libgen.h>
+#  ifdef basename
+#   undef basename
+#  endif
+# endif
+# include <string.h>
+#else
+# define memmove(x,y,z) bcopy((y), (x), (z))
+#endif
+
+#ifndef HAVE_BASENAME
+# define basename(path) (rindex((path), '/') + 1)
+#endif
+
+static void usage();
+static int prepare_listen_port();
+static int prepare_connect_port();
+
+static int receive_file();
+static int send_file();
+static int select_loop();
+static int chat_listen();
+static int chat_connect();
+
+static u_long primary_address_of();
+static u_long extract_addr_of_string();
+static u_long get_address_externally();
+
+static char *progname;
+
+void version () {
+       printf("%s (Liece) 1.4.0\n"
+                                "Copyright (C) 1998, 1999 Daiki Ueno\n"
+                                "This is free software; see the source for copying conditions.  There is NO\n"
+                                "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n", 
+                                progname);
+}
+
+void usage() {
+  printf("Usage: %s [global-options] command [command-options-and-arguments]\n"
+                                "where global-options are -v, -h, etc.\n"
+                                "where command is one of send, receive, chat, resolve.\n"
+                                "where command-options-and-arguments depend on the specific command.\n\n"
+                                "send <host> <port> <filename>\n"
+                                "receive <host> <port> <size> <filename>\n"
+                                "chat listen <port>\n"
+                                "chat connect <host> <port>\n"
+                                "resolve [hosts ...]\n",
+                                progname);
+}
+
+int prepare_listen_port (int ip_port) {
+  int sock, tries;
+  int opt = 1;
+  static struct sockaddr_in server;
+
+  
+  if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
+    perror("opening stream socket");
+    exit(1);
+  }
+
+#ifdef SO_REUSEADDR
+  if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, 
+                (char *)&opt, sizeof (opt)) < 0) {
+    perror ("setsockopt SO_REUSEADDR");
+  }
+#endif
+
+  /* Bind a port to listen for new connections */
+
+  server.sin_family = AF_INET;
+  server.sin_addr.s_addr = INADDR_ANY;
+  server.sin_port = htons (ip_port);
+  for (tries = 0; tries < 10; tries++) {
+    if (bind (sock, (struct sockaddr *) &server, sizeof (server))) {
+      if (tries >= 9) {
+       perror ("binding stream socket");
+       exit (1);
+      }
+      perror ("binding stream socket. retry in 20 seconds");
+      sleep (20);              /* wait 20 seconds and try again */
+    } else
+      break;
+  }
+  listen (sock, 64);
+  return (sock);
+}
+
+u_long get_address_externally(char *ircserver) {
+  int i, len, dummy;
+  u_long addr;
+  struct hostent *hp;
+  struct sockaddr_in server, client;
+
+  addr = 0xc6290004;                          /* dummy addr --- rootA */
+  if (ircserver && (hp = gethostbyname(ircserver)) != NULL) {
+    addr = ntohl(((struct in_addr *)hp->h_addr_list[0])->s_addr);
+  }
+  if ((dummy = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+    perror("opening stream socket");
+    return -1;
+  }
+  server.sin_family = AF_INET;
+  server.sin_addr.s_addr = htonl(addr);
+  server.sin_port = htons(7);                 /* dummy port --- echo */
+  for (i = 0; i < 8; i++) {
+    server.sin_zero[i] = 0;
+  }
+  if (connect(dummy, (struct sockaddr *)&server, sizeof(server)) < 0) {
+    perror ("connecting remote socket");
+    return -1;
+  }
+  len = sizeof(client);
+  if (getsockname(dummy, (struct sockaddr *)&client, &len) < 0) 
+    return -1;
+  close(dummy);
+  return ntohl(client.sin_addr.s_addr);
+}
+
+\f
+/*
+ * send_file(int port, char *ifile)
+ * listens to connections to port, and when connection established
+ * sends ifile to that socket
+ */
+int send_file (int port, char *ifile) {
+  int sock, ifd, ofd, len;
+  u_long addr, bytessent = 0;
+  char buf[ BUFSIZ * 8 ];
+  fd_set readfds, writefds, fdset;
+  struct stat statbuf;
+  char namebuf[ MAXHOSTNAMELEN ];
+  struct hostent *hp;
+  struct sockaddr_in sin;
+
+  if ((ifd = open (ifile, O_RDONLY)) < 0) { 
+    /* error in opening file to send */
+    close(ofd);
+    return 1;
+  }
+
+  gethostname(namebuf, sizeof (namebuf));
+  fstat (ifd, &statbuf);
+
+  sock = prepare_listen_port(port);
+  len = sizeof (struct sockaddr_in);
+  if (getsockname(sock, (struct sockaddr *)&sin, &len) == 0) 
+    port = ntohs(sin.sin_port);
+       if ((addr = get_address_externally (NULL)) < 0) {
+               gethostname(namebuf, sizeof (namebuf));
+               if (hp = gethostbyname(namebuf)) 
+                       addr = ((struct in_addr *) (hp->h_addr_list)[0])->s_addr;
+               else
+                       return 2;
+       }
+
+       printf ("DCC send %s %d %u %d\n", ifile, port, addr, statbuf.st_size);
+  
+  ofd = accept(sock, (struct sockaddr *) 0, (int *) 0);
+  
+  while ((len = read (ifd, buf, sizeof (buf))) > 0) {
+    write (ofd, buf, len);     
+    bytessent += len;
+    while ((len = read (ofd, buf, sizeof (u_long))) &&
+          ntohl (*(u_long *) buf) != bytessent);
+  }
+  close (ofd);
+  close (ifd);
+  printf ("*** DCC file %s sent\n", ifile);
+
+  return 0;
+}
+
+/*
+ * receive_file(u_long host, int port, char *ifile)
+ * connects to (host,port) and reads everything send from there
+ * for every packet received gives back how much actually got
+ * puts everything in ifile
+ */
+int receive_file (u_long host, int port, int size, char *ifile) {
+  int sock, ifd, ofd, len, bytesreceived = 0, toread, prev = 0;
+  char buf[ BUFSIZ * 8 ];
+  fd_set readfds, writefds, fdset;
+  u_long netsize;
+    
+  if ((ofd = open(ifile, O_WRONLY|O_CREAT|O_TRUNC, 0600)) < 0) {
+    fprintf(stderr, "open: opening file: %s\n", ifile);
+    return 1;
+  }
+  ifd = prepare_connect_port (host, port);
+  if ((toread = sizeof (buf)) > size)
+    toread = size;
+  while (bytesreceived < size && (len = read (ifd, buf, toread)) > 0) {
+    write (ofd, buf, len);
+    bytesreceived += len;
+    netsize = htonl (bytesreceived);
+    lseek (ifd, 0, 2);
+    write (ifd, &netsize, 4);
+    lseek (ifd, 0, 2);
+    if (toread > size - bytesreceived)
+      toread = size - bytesreceived;
+    if (bytesreceived - prev > size / 5) {
+      printf ("DCC %s %d%% (%d/%d bytes) received\n", ifile,
+             100 * bytesreceived / size, bytesreceived, size);
+      prev = bytesreceived;
+    }
+  }
+  printf ("*** DCC file %s received\n", ifile);
+  close (ifd);
+  close (ofd);
+
+  return 0;
+}
+
+/*
+ * select_loop(int sfd)
+ * listens fd given, reads stdin and sends it to socket 
+ * anything read from socket is send to stdout
+ */
+int select_loop (int sfd) {
+  int ofd, len, bytesreceived = 0;
+  char buf[ BUFSIZ * 8 ];
+  fd_set readfds, writefds, fdset;
+
+  for (;;) {
+    FD_ZERO (&readfds);
+    FD_SET (sfd, &readfds);
+    FD_SET (0, &readfds);
+    if (select (32, &readfds, 0, 0, 0) < 0) {
+      perror ("select");
+      close (sfd);
+      return 1;
+    }
+       
+    if (FD_ISSET (sfd, &readfds)) {
+      if ((len = read(sfd, buf, sizeof (buf))) == 0) {
+       close (sfd);
+       return 0;
+      }
+      write (1, buf, len);
+      FD_CLR (sfd, &readfds);
+    }
+    if (FD_ISSET (0, &readfds))        {
+      if ((len = read (0, buf, sizeof (buf))) == 0) {
+       close (sfd);
+       return 0;
+      }
+      write(sfd, buf, len);
+      FD_CLR (ofd, &readfds);
+    }
+  }
+}
+
+int prepare_connect_port (u_long host, int port) {
+  int sock;
+  static struct hostent *hp;
+  static struct sockaddr_in server;
+    
+  sock = socket (AF_INET, SOCK_STREAM, 0);
+  if (sock < 0) {
+    perror ("opening stream socket");
+    exit (1);
+  }
+  server.sin_family = AF_INET;
+  
+  server.sin_addr.s_addr = ntohl (host);
+  server.sin_port = htons (port);
+    
+  if (connect(sock, (struct sockaddr *) &server, sizeof (server)) < 0) {
+    perror ("connecting remote socket");
+    return 0;
+  }
+  
+  return sock;
+}
+
+u_long extract_addr_of_string (char *str) {
+  u_long result = 0;
+
+#ifndef HAVE_STRTOUL
+  while (*str++) 
+    result = result * 10 + *str - '0';
+#else /* !HAVE_STRTOUL */
+  result = strtoul(str, NULL, 10);
+#endif /* HAVE_STRTOUL */
+  return result;
+}
+
+u_long primary_address_of (char *host) {   
+  struct hostent *hp;
+  u_long addr;
+  
+  if ((hp = gethostbyname(host)) == NULL)
+    addr = inet_addr(host);
+  else
+    memmove(&addr, hp->h_addr_list[ 0 ], 4);
+  
+  return ntohl(addr);
+}
+
+int chat_listen(int port) {
+  struct sockaddr_in sin;
+  struct hostent *hp;
+       u_long addr;
+  int sock, len;
+  char namebuf[ MAXHOSTNAMELEN ];
+    
+  sock = prepare_listen_port (port);
+  
+  len = sizeof (struct sockaddr_in);
+  if (getsockname(sock, (struct sockaddr *)&sin, &len) == 0) 
+    port = ntohs(sin.sin_port);
+
+       if ((addr = get_address_externally (NULL)) < 0) {
+               gethostname(namebuf, sizeof (namebuf));
+               if (hp = gethostbyname(namebuf)) 
+                       addr = ((struct in_addr *) (hp->h_addr_list)[0])->s_addr;
+               else
+                       return 2;
+       }
+
+       printf("DCC chat %u %d\n", addr, port);
+  
+  if ((sock = accept(sock, (struct sockaddr *) 0, (int *) 0)) > -1) {
+               printf("DCC chat established\n");
+    return select_loop(sock);
+       }
+  
+  return 1;
+}
+
+int chat_connect(u_long host, int port) {
+  int sock;
+  
+  if ((sock = prepare_connect_port(host, port)) > -1) {
+    printf("DCC chat established\n");
+    return select_loop(sock);
+  }
+  
+  return 1;
+}
+
+\f
+int main (int argc, char **argv) {
+  char *host = "localhost";
+  char *action;
+  int c, status = 0;
+
+  progname = (char *)basename(argv[ 0 ]);
+
+       while (1)       {
+               int this_option_optind = optind ? optind : 1;
+               int option_index = 0;
+               static struct option long_options[] =   {
+                       {"version", 0, 0, 'v'},
+                       {"help", 0, 0, 'h'},
+                       {0, 0, 0, 0}
+               };
+                       
+               c = getopt_long (argc, argv, "vh", long_options, &option_index);
+               if (c == -1)
+                       break;
+               
+               switch (c) {
+               case 'v':
+                       version();
+                       exit(1);
+                       break;
+               case 'h':
+                       usage();
+                       exit(1);
+                       break;
+               default:
+                       break;
+               }
+       }
+
+  if (argc > 1) {
+    action = argv[ 1 ];
+  } else {
+    usage();
+    exit(1);
+  }
+
+  if (!strcmp(action, "resolve")) {
+    if (argc < 3) {
+      usage();
+      exit(1);
+    } else {
+      u_long i, addr;
+      for (i = 2; i < argc; i++) {
+       addr = primary_address_of(argv[i]);
+       if (addr != -1)
+         printf("%u\n", addr);
+       else
+         printf("0\n");
+      }
+      status = 0;
+    }
+  }
+
+  if (!strcmp(action, "send")) {
+    if (argc != 4) {
+      usage();
+      exit(1);
+    }
+    status = send_file (atoi(argv[ 2 ]), argv[ 3 ]);
+  } else if (!strcmp(action, "receive")) {
+    if (argc != 6) {
+      usage();
+      exit(1);
+    }
+    status = 
+      receive_file (extract_addr_of_string(argv[ 2 ]),
+                   atoi(argv[ 3 ]), atoi(argv[ 4 ]), argv[ 5 ]);
+  } else if (!strcmp(action, "chat")) {
+    if (argc > 3) {
+      if (!strcmp(argv[ 2 ], "listen")) {
+       if (argc != 4) {
+         usage();
+         exit(1);
+       }
+       status = chat_listen(atoi(argv[ 3 ]));
+      } else if (!strcmp(argv[ 2 ], "connect")) {
+       if (argc != 5) {
+         usage();
+         exit(1);
+       }
+       status = chat_connect(extract_addr_of_string(argv[ 3 ]), 
+                             atoi(argv[ 4 ]));
+      } else {
+       usage();
+       exit(1);
+      }        
+    }
+  } else {
+    usage();
+    exit(1);
+  }
+
+  return status;
+}
+
+/*
+ * Local variables:
+ *  compile-command: "gcc -DHAVE_STRTOUL -Wall -O6 -o dcc dcc.c"
+ *  c-indent-level: 2
+ *  c-basic-offset: 2
+ *  tab-width: 2
+ * End:
+ */
diff --git a/dcc/dcc.ml b/dcc/dcc.ml
new file mode 100644 (file)
index 0000000..0b852dc
--- /dev/null
@@ -0,0 +1,248 @@
+(* DCC module.
+
+This file is part of Liece.                                          
+
+Author: Daiki Ueno <daiki@kake.info.waseda.ac.jp>                    
+Created: 1998-09-28                                               
+Revised: 1999-01-28                                               
+Keywords: IRC, liece, DCC                                        
+
+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, 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 GNU Emacs; see the file COPYING.  If not, write to the    
+Free Software Foundation, Inc., 59 Temple Place - Suite 330,         
+Boston, MA 02111-1307, USA.  *)
+
+open Unix
+
+let usage prefix progname = 
+  String.concat "\n"
+    (List.map (fun x -> (Printf.sprintf "%s: %s %s" prefix progname x))
+       [ "send <port> <filename>";
+        "receive <host> <port> <size> <filename>";
+         "chat listen <port>"; 
+         "chat connect <host> <port>" ])
+
+let buff = String.create 1024
+
+let print_exc exc =
+  match exc with
+    Unix_error (err, fun_name, arg) ->
+      prerr_string "\"";
+      prerr_string fun_name;
+      prerr_string "\" failed";
+      if String.length arg > 0 then
+        begin
+          prerr_string " on \""; prerr_string arg; prerr_string "\""; ()
+        end;
+      prerr_string ": ";
+      prerr_endline (error_message err);
+      flush Pervasives.stderr; ()
+  | _ ->
+      try Printexc.print raise exc with
+        _ -> ()
+
+let accept_connection f s =
+  let (t, addr) = accept s in
+  f t; close t; ()
+       
+let write_file filename size t =
+  let fd =
+    try openfile filename [ O_RDONLY ] 0 with
+      _ -> Printf.eprintf "Open failed.\n"; flush Pervasives.stderr; exit 1
+  in
+  let (len, rlen) = ref 0, ref 0 in
+  while len := read fd buff 0 (String.length buff); !len <> 0
+  do
+    let rec loop i =
+      let j = i + write t buff i (!len - i) in 
+      if j == !len then () else loop j
+    in
+    loop 0;
+    flush (out_channel_of_descr t);
+    rlen := !rlen + !len;
+    Printf.printf "DCC %s %d%% (%d/%d bytes) sent.\n"
+      filename (100 * !rlen / size) !rlen size;
+    flush Pervasives.stdout
+  done;
+  close fd; close t; ()
+
+let send_file port filename =
+  try
+    let host = gethostbyname (gethostname ()) in
+    let haddr = string_of_inet_addr host.h_addr_list.(0) in
+    let s = socket PF_INET SOCK_STREAM 0 in
+    setsockopt s SO_REUSEADDR true;
+    bind s (ADDR_INET (inet_addr_any, port));
+    let port =
+      match (getsockname s) with
+       ADDR_INET (addr, port) -> port
+      | _ -> port
+    in
+    listen s 1;
+    let fd =
+      try openfile filename [ O_RDONLY ] 0 with
+       _ -> Printf.eprintf "Open failed.\n"; flush Pervasives.stderr; exit 1
+    in
+    let size = (fstat fd).st_size in
+    close fd;
+    Printf.printf "DCC send %s %d %s %d\n"
+      (Filename.basename filename) port (Naddr.encode haddr) size;
+    flush Pervasives.stdout;
+    accept_connection (fun t -> write_file filename size t) s;
+  with
+    exc -> print_exc exc
+
+let read_file filename size t =
+  let fd =
+    try openfile filename [ O_WRONLY; O_CREAT ] 0o600 with
+      _ -> Printf.eprintf "Open failed.\n"; flush Pervasives.stderr; exit 1
+  in
+  let (len, rlen) = ref 0, ref 0 in
+  while len := read t buff 0 (String.length buff); !len <> 0
+  do
+    let _ = write fd buff 0 !len in
+    flush (out_channel_of_descr fd);
+    rlen := !rlen + !len;
+    Printf.printf "DCC %s %d%% (%d/%d bytes) received.\n"
+      filename (100 * !rlen / size) !rlen size;
+    flush Pervasives.stdout
+  done;
+  close fd; close t
+
+let receive_file host port size filename =
+  let s = socket PF_INET SOCK_STREAM 0 in
+  connect s (ADDR_INET (inet_addr_of_string (Naddr.decode host), port));
+  read_file filename size s; ()
+
+let chat_loop s =
+  let sel = ref [s; stdin] in
+  while !sel <> [] do
+    let (l, _, _) =
+    try
+      select !sel [] [] (-1.0) 
+    with 
+      _ -> exit 0
+    in
+    List.iter
+      (fun x -> 
+       let (rfd, wfd) =
+         if x == s then 
+           (s, stdout)
+         else if x == stdin then 
+           (stdin, s)
+         else 
+           (stdin, stdout)
+       in
+       let len = ref 0 
+       in
+       len := read rfd buff 0 (String.length buff); 
+       if !len == 0 then 
+         begin try shutdown wfd SHUTDOWN_SEND; () with
+           _ -> exit 0
+         end
+       else
+         begin
+           let rec loop i =
+             let j = i + write wfd buff i (!len - i) in 
+             if j == !len then () else loop j
+           in
+           loop 0;
+           flush (out_channel_of_descr wfd)
+         end;
+       ())
+      l
+  done
+
+let chat_listen port =
+  let host = gethostbyname (gethostname ()) in
+  let haddr = string_of_inet_addr host.h_addr_list.(0) in
+  let s = socket PF_INET SOCK_STREAM 0 in
+  setsockopt s SO_REUSEADDR true;
+  bind s (ADDR_INET (inet_addr_any, port));
+  let port =
+    match (getsockname s) with
+      ADDR_INET (addr, port) -> port
+    | _ -> port
+  in
+  listen s 1;
+  Printf.printf "DCC chat %s %d\n" (Naddr.encode haddr) port;
+  flush Pervasives.stdout;
+  accept_connection 
+    (fun t -> 
+      Printf.printf "DCC chat established\n";
+      flush Pervasives.stdout; 
+      chat_loop t) s; ()
+
+let chat_connect host port =
+  let s = socket PF_INET SOCK_STREAM 0 in
+  connect s (ADDR_INET (inet_addr_of_string (Naddr.decode host), port));
+  Printf.printf "DCC chat established\n";
+  flush Pervasives.stdout;
+  chat_loop s; ()
+  
+let getaddr_ext server =
+  let addr =
+    try (gethostbyname server).h_addr_list.(0) with
+      _ -> inet_addr_of_string "198.41.0.4"
+  and port = 7 in 
+  let s = socket PF_INET SOCK_DGRAM 0 in
+  connect s (ADDR_INET (addr, port));
+  match (getsockname s) with
+    ADDR_INET (addr, port) -> addr
+  | _ -> raise Not_found
+  
+let main () =
+  let a = ref [] in
+  let usage = usage "Usage" (Filename.basename Sys.argv.(0)) in
+  let speclist = [] in
+  Arg.parse speclist (fun x -> a := !a @ [x]) usage;
+  begin match !a with
+    "send" :: [ port; filename ] -> 
+      let port = 
+       try int_of_string port with
+         _ -> Arg.usage speclist usage; exit 1
+      in
+      send_file port filename;
+      exit 0; ()
+  | "receive" :: [ host; port; size; filename ] ->
+      let (port, size) = 
+       try 
+         int_of_string port, 
+         int_of_string size
+       with
+         _ -> Arg.usage speclist usage; exit 1
+      in
+      receive_file host port size filename;
+      exit 0; ()
+  | "chat" :: [ "listen"; port ] ->
+      let port =
+       try
+         int_of_string port
+       with
+         _ -> Arg.usage speclist usage; exit 1
+      in
+      chat_listen port;
+      exit 0; ()
+  | "chat" :: [ "connect"; host; port ] ->
+      let port =
+       try
+         int_of_string port
+       with
+         _ -> Arg.usage speclist usage; exit 1
+      in
+      chat_connect host port;
+      exit 0; ()
+  | _ -> Arg.usage speclist usage; exit 1
+  end
+
+let _ = Printexc.catch main ()
diff --git a/dcc/getaddrinfo.c b/dcc/getaddrinfo.c
new file mode 100644 (file)
index 0000000..18eeccf
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * getaddrinfo(2) emulation.
+ * Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
+
+ * Author: Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+This file is not part of any package.
+
+GNU Emacs 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, or (at your option)
+any later version.
+
+GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+ */
+
+#ifndef HAVE_GETADDRINFO
+
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+
+#ifdef HAVE_NETINET6_IN6_H
+# include <netinet6/in6.h>
+#endif /* HAVE_NETINET6_IN6_H */
+
+#include "getaddrinfo.h"
+
+int getaddrinfo (hostname, servname, hints, res)
+  const char *hostname;
+  const char *servname;
+  const struct addrinfo *hints;
+  struct addrinfo **res;
+{
+  struct hostent *host = NULL;
+  struct servent *serv = NULL;
+  struct protoent *proto;
+  int port = 0;
+
+#if (defined (HAVE_SOCKADDR_IN6) && defined (INET6))
+  struct sockaddr_in6 *sin =
+    (struct sockaddr_in6 *) calloc (1, sizeof (struct sockaddr_in6));
+#else /* (defined (HAVE_SOCKADDR_IN6) && defined (INET6)) */
+  struct sockaddr_in *sin =
+    (struct sockaddr_in *) calloc (1, sizeof (struct sockaddr_in));
+#endif /* !(defined (HAVE_SOCKADDR_IN6) && defined (INET6)) */
+
+  struct addrinfo *ai = *res = 
+    (struct addrinfo *) calloc (1, sizeof (struct addrinfo));
+  
+  if ((~ hints->ai_flags & AI_PASSIVE) && hostname && 
+      (host = gethostbyname (hostname)) == NULL) {
+    perror ("gethostbyname");
+    return EAI_NONAME;
+  }
+
+  if (hints->ai_protocol && 
+      (proto = getprotobynumber (hints->ai_protocol)) == NULL) {
+    perror ("getprotobynumber");
+    return EAI_NONAME;
+  }
+
+  if (servname) 
+    if (isdigit (servname[0]))
+      port = atoi (servname);
+    else {
+      if ((serv = getservbyname (servname, proto->p_name)) == NULL) {
+       perror ("getservbyname");
+       return EAI_NONAME;
+      }
+      port = serv->s_port;
+    }
+  
+#if (defined (HAVE_SOCKADDR_IN6) && defined (INET6))
+  if (host)
+    memcpy (&sin->sin6_addr, host->h_addr, host->h_length);
+  sin->sin6_port = htons (port);
+#else /* (defined (HAVE_SOCKADDR_IN6) && defined (INET6)) */
+  if (host)
+    memcpy (&sin->sin_addr, host->h_addr, host->h_length);
+  sin->sin_port = htons (port);
+#endif /* !(defined (HAVE_SOCKADDR_IN6) && defined (INET6)) */
+
+  if (hints->ai_family == AF_UNSPEC)
+    ai->ai_family = host->h_addrtype;
+  else
+    ai->ai_family = hints->ai_family;
+#if (defined (HAVE_SOCKADDR_IN6) && defined (INET6))
+  sin->sin6_family = ai->ai_family;
+#else /* (defined (HAVE_SOCKADDR_IN6) && defined (INET6)) */
+  sin->sin_family = ai->ai_family;
+#endif /* !(defined (HAVE_SOCKADDR_IN6) && defined (INET6)) */
+
+  ai->ai_protocol = hints->ai_protocol;
+  ai->ai_socktype = hints->ai_socktype;
+  ai->ai_addrlen = sizeof (*sin);
+  ai->ai_addr = (struct sockaddr *)sin;
+
+  return 0;
+}
+
+void freeaddrinfo (ai)
+     struct addrinfo *ai;
+{
+  struct addrinfo *p;
+
+  while (ai != NULL) {
+    p = ai;
+    ai = ai->ai_next;
+    free (p);
+  }
+}
+
+#endif /* HAVE_GETADDRINFO */
diff --git a/dcc/getaddrinfo.h b/dcc/getaddrinfo.h
new file mode 100644 (file)
index 0000000..d88883f
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * getaddrinfo(2) emulation.
+ * Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
+
+ * Author: Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+This file is not part of any package.
+
+GNU Emacs 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, or (at your option)
+any later version.
+
+GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+ */
+
+struct addrinfo {
+  int ai_flags;
+  int ai_family;
+  int ai_socktype;
+  int ai_protocol;
+  size_t ai_addrlen;
+  char *ai_canonname;
+  struct sockaddr *ai_addr;
+  struct addrinfo *ai_next; 
+};
+
+/* Possible values for `ai_flags' field in `addrinfo' structure.  */
+# define AI_PASSIVE     1       /* Socket address is intended for `bind'.  */
+# define AI_CANONNAME   2       /* Request for canonical name.  */
+# define AI_NUMERICHOST 3       /* Don't use name resolution.  */
+
+/* Error values for `getaddrinfo' function.  */
+#define EAI_BADFLAGS   -1      /* Invalid value for `ai_flags' field.  */
+#define EAI_NONAME     -2      /* NAME or SERVICE is unknown.  */
+#define EAI_AGAIN      -3      /* Temporary failure in name resolution.  */
+#define EAI_FAIL       -4      /* Non-recoverable failure in name res.  */
+#define EAI_NODATA     -5      /* No address associated with NAME.  */
+#define EAI_FAMILY     -6      /* `ai_family' not supported.  */
+#define EAI_SOCKTYPE   -7      /* `ai_socktype' not supported.  */
+#define EAI_SERVICE    -8      /* SERVICE not supported for `ai_socktype'.  */
+#define EAI_ADDRFAMILY -9      /* Address family for NAME not supported.  */
+#define EAI_MEMORY     -10     /* Memory allocation failure.  */
+#define EAI_SYSTEM     -11     /* System error returned in `errno'.  */
+
+#define NI_MAXHOST      1025
+#define NI_MAXSERV      32
+
+#define NI_NUMERICHOST 1       /* Don't try to look up hostname.  */
+#define NI_NUMERICSERV 2       /* Don't convert port number to name.  */
+#define NI_NOFQDN      4       /* Only return nodename portion.  */
+#define NI_NAMEREQD    8       /* Don't return numeric addresses.  */
+#define NI_DGRAM       16      /* Look up UDP service rather than TCP.  */
+
+extern int getaddrinfo (const char *, const char *, const struct addrinfo *, 
+                       struct addrinfo **);
+
+extern void freeaddrinfo (struct addrinfo *ai);
+
+
+
diff --git a/dcc/getopt.c b/dcc/getopt.c
new file mode 100644 (file)
index 0000000..b5caccd
--- /dev/null
@@ -0,0 +1,755 @@
+/* Getopt for GNU.
+   NOTE: getopt is now part of the C library, so if you don't know what
+   "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
+   before changing it!
+
+   Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94
+       Free Software Foundation, Inc.
+
+   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, 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.  */
+\f
+/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
+   Ditto for AIX 3.2 and <stdlib.h>.  */
+#ifndef _NO_PROTO
+#define _NO_PROTO
+#endif
+
+#ifdef HAVE_CONFIG_H
+#if defined (emacs) || defined (CONFIG_BROKETS)
+/* We use <config.h> instead of "config.h" so that a compilation
+   using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
+   (which it would do because it found this file in $srcdir).  */
+#include <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
+#ifndef __STDC__
+/* This is a separate conditional since some stdc systems
+   reject `defined (const)'.  */
+#ifndef const
+#define const
+#endif
+#endif
+
+#include <stdio.h>
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+   actually compiling the library itself.  This code is part of the GNU C
+   Library, but also included in many other GNU distributions.  Compiling
+   and linking in this code is a waste when using the GNU C library
+   (especially if it is a shared library).  Rather than having every GNU
+   program understand `configure --with-gnu-libc' and omit the object files,
+   it is simpler to just do this in the source for each such file.  */
+
+#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
+
+
+/* This needs to come after some library #include
+   to get __GNU_LIBRARY__ defined.  */
+#ifdef __GNU_LIBRARY__
+/* Don't include stdlib.h for non-GNU C libraries because some of them
+   contain conflicting prototypes for getopt.  */
+#include <stdlib.h>
+#endif /* GNU C library.  */
+
+/* This version of `getopt' appears to the caller like standard Unix `getopt'
+   but it behaves differently for the user, since it allows the user
+   to intersperse the options with the other arguments.
+
+   As `getopt' works, it permutes the elements of ARGV so that,
+   when it is done, all the options precede everything else.  Thus
+   all application programs are extended to handle flexible argument order.
+
+   Setting the environment variable POSIXLY_CORRECT disables permutation.
+   Then the behavior is completely standard.
+
+   GNU application programs can use a third alternative mode in which
+   they can distinguish the relative order of options and other arguments.  */
+
+#include "getopt.h"
+
+/* For communication from `getopt' to the caller.
+   When `getopt' finds an option that takes an argument,
+   the argument value is returned here.
+   Also, when `ordering' is RETURN_IN_ORDER,
+   each non-option ARGV-element is returned here.  */
+
+char *optarg = NULL;
+
+/* Index in ARGV of the next element to be scanned.
+   This is used for communication to and from the caller
+   and for communication between successive calls to `getopt'.
+
+   On entry to `getopt', zero means this is the first call; initialize.
+
+   When `getopt' returns EOF, this is the index of the first of the
+   non-option elements that the caller should itself scan.
+
+   Otherwise, `optind' communicates from one call to the next
+   how much of ARGV has been scanned so far.  */
+
+/* XXX 1003.2 says this must be 1 before any call.  */
+int optind = 0;
+
+/* The next char to be scanned in the option-element
+   in which the last option character we returned was found.
+   This allows us to pick up the scan where we left off.
+
+   If this is zero, or a null string, it means resume the scan
+   by advancing to the next ARGV-element.  */
+
+static char *nextchar;
+
+/* Callers store zero here to inhibit the error message
+   for unrecognized options.  */
+
+int opterr = 1;
+
+/* Set to an option character which was unrecognized.
+   This must be initialized on some systems to avoid linking in the
+   system's own getopt implementation.  */
+
+int optopt = '?';
+
+/* Describe how to deal with options that follow non-option ARGV-elements.
+
+   If the caller did not specify anything,
+   the default is REQUIRE_ORDER if the environment variable
+   POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+   REQUIRE_ORDER means don't recognize them as options;
+   stop option processing when the first non-option is seen.
+   This is what Unix does.
+   This mode of operation is selected by either setting the environment
+   variable POSIXLY_CORRECT, or using `+' as the first character
+   of the list of option characters.
+
+   PERMUTE is the default.  We permute the contents of ARGV as we scan,
+   so that eventually all the non-options are at the end.  This allows options
+   to be given in any order, even with programs that were not written to
+   expect this.
+
+   RETURN_IN_ORDER is an option available to programs that were written
+   to expect options and other ARGV-elements in any order and that care about
+   the ordering of the two.  We describe each non-option ARGV-element
+   as if it were the argument of an option with character code 1.
+   Using `-' as the first character of the list of option characters
+   selects this mode of operation.
+
+   The special argument `--' forces an end of option-scanning regardless
+   of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
+   `--' can cause `getopt' to return EOF with `optind' != ARGC.  */
+
+static enum
+{
+  REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+} ordering;
+
+/* Value of POSIXLY_CORRECT environment variable.  */
+static char *posixly_correct;
+\f
+#ifdef __GNU_LIBRARY__
+/* We want to avoid inclusion of string.h with non-GNU libraries
+   because there are many ways it can cause trouble.
+   On some systems, it contains special magic macros that don't work
+   in GCC.  */
+#include <string.h>
+#define        my_index        strchr
+#else
+
+/* Avoid depending on library functions or files
+   whose names are inconsistent.  */
+
+char *getenv ();
+
+static char *
+my_index (str, chr)
+     const char *str;
+     int chr;
+{
+  while (*str)
+    {
+      if (*str == chr)
+       return (char *) str;
+      str++;
+    }
+  return 0;
+}
+
+/* If using GCC, we can safely declare strlen this way.
+   If not using GCC, it is ok not to declare it.  */
+#ifdef __GNUC__
+/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
+   That was relevant to code that was here before.  */
+#ifndef __STDC__
+/* gcc with -traditional declares the built-in strlen to return int,
+   and has done so at least since version 2.4.5. -- rms.  */
+extern int strlen (const char *);
+#endif /* not __STDC__ */
+#endif /* __GNUC__ */
+
+#endif /* not __GNU_LIBRARY__ */
+\f
+/* Handle permutation of arguments.  */
+
+/* Describe the part of ARGV that contains non-options that have
+   been skipped.  `first_nonopt' is the index in ARGV of the first of them;
+   `last_nonopt' is the index after the last of them.  */
+
+static int first_nonopt;
+static int last_nonopt;
+
+/* Exchange two adjacent subsequences of ARGV.
+   One subsequence is elements [first_nonopt,last_nonopt)
+   which contains all the non-options that have been skipped so far.
+   The other is elements [last_nonopt,optind), which contains all
+   the options processed since those non-options were skipped.
+
+   `first_nonopt' and `last_nonopt' are relocated so that they describe
+   the new indices of the non-options in ARGV after they are moved.  */
+
+static void
+exchange (argv)
+     char **argv;
+{
+  int bottom = first_nonopt;
+  int middle = last_nonopt;
+  int top = optind;
+  char *tem;
+
+  /* Exchange the shorter segment with the far end of the longer segment.
+     That puts the shorter segment into the right place.
+     It leaves the longer segment in the right place overall,
+     but it consists of two parts that need to be swapped next.  */
+
+  while (top > middle && middle > bottom)
+    {
+      if (top - middle > middle - bottom)
+       {
+         /* Bottom segment is the short one.  */
+         int len = middle - bottom;
+         register int i;
+
+         /* Swap it with the top part of the top segment.  */
+         for (i = 0; i < len; i++)
+           {
+             tem = argv[bottom + i];
+             argv[bottom + i] = argv[top - (middle - bottom) + i];
+             argv[top - (middle - bottom) + i] = tem;
+           }
+         /* Exclude the moved bottom segment from further swapping.  */
+         top -= len;
+       }
+      else
+       {
+         /* Top segment is the short one.  */
+         int len = top - middle;
+         register int i;
+
+         /* Swap it with the bottom part of the bottom segment.  */
+         for (i = 0; i < len; i++)
+           {
+             tem = argv[bottom + i];
+             argv[bottom + i] = argv[middle + i];
+             argv[middle + i] = tem;
+           }
+         /* Exclude the moved top segment from further swapping.  */
+         bottom += len;
+       }
+    }
+
+  /* Update records for the slots the non-options now occupy.  */
+
+  first_nonopt += (optind - last_nonopt);
+  last_nonopt = optind;
+}
+
+/* Initialize the internal data when the first call is made.  */
+
+static const char *
+_getopt_initialize (optstring)
+     const char *optstring;
+{
+  /* Start processing options with ARGV-element 1 (since ARGV-element 0
+     is the program name); the sequence of previously skipped
+     non-option ARGV-elements is empty.  */
+
+  first_nonopt = last_nonopt = optind = 1;
+
+  nextchar = NULL;
+
+  posixly_correct = getenv ("POSIXLY_CORRECT");
+
+  /* Determine how to handle the ordering of options and nonoptions.  */
+
+  if (optstring[0] == '-')
+    {
+      ordering = RETURN_IN_ORDER;
+      ++optstring;
+    }
+  else if (optstring[0] == '+')
+    {
+      ordering = REQUIRE_ORDER;
+      ++optstring;
+    }
+  else if (posixly_correct != NULL)
+    ordering = REQUIRE_ORDER;
+  else
+    ordering = PERMUTE;
+
+  return optstring;
+}
+\f
+/* Scan elements of ARGV (whose length is ARGC) for option characters
+   given in OPTSTRING.
+
+   If an element of ARGV starts with '-', and is not exactly "-" or "--",
+   then it is an option element.  The characters of this element
+   (aside from the initial '-') are option characters.  If `getopt'
+   is called repeatedly, it returns successively each of the option characters
+   from each of the option elements.
+
+   If `getopt' finds another option character, it returns that character,
+   updating `optind' and `nextchar' so that the next call to `getopt' can
+   resume the scan with the following option character or ARGV-element.
+
+   If there are no more option characters, `getopt' returns `EOF'.
+   Then `optind' is the index in ARGV of the first ARGV-element
+   that is not an option.  (The ARGV-elements have been permuted
+   so that those that are not options now come last.)
+
+   OPTSTRING is a string containing the legitimate option characters.
+   If an option character is seen that is not listed in OPTSTRING,
+   return '?' after printing an error message.  If you set `opterr' to
+   zero, the error message is suppressed but we still return '?'.
+
+   If a char in OPTSTRING is followed by a colon, that means it wants an arg,
+   so the following text in the same ARGV-element, or the text of the following
+   ARGV-element, is returned in `optarg'.  Two colons mean an option that
+   wants an optional arg; if there is text in the current ARGV-element,
+   it is returned in `optarg', otherwise `optarg' is set to zero.
+
+   If OPTSTRING starts with `-' or `+', it requests different methods of
+   handling the non-option ARGV-elements.
+   See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
+
+   Long-named options begin with `--' instead of `-'.
+   Their names may be abbreviated as long as the abbreviation is unique
+   or is an exact match for some defined option.  If they have an
+   argument, it follows the option name in the same ARGV-element, separated
+   from the option name by a `=', or else the in next ARGV-element.
+   When `getopt' finds a long-named option, it returns 0 if that option's
+   `flag' field is nonzero, the value of the option's `val' field
+   if the `flag' field is zero.
+
+   The elements of ARGV aren't really const, because we permute them.
+   But we pretend they're const in the prototype to be compatible
+   with other systems.
+
+   LONGOPTS is a vector of `struct option' terminated by an
+   element containing a name which is zero.
+
+   LONGIND returns the index in LONGOPT of the long-named option found.
+   It is only valid when a long-named option has been found by the most
+   recent call.
+
+   If LONG_ONLY is nonzero, '-' as well as '--' can introduce
+   long-named options.  */
+
+int
+_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
+     int argc;
+     char *const *argv;
+     const char *optstring;
+     const struct option *longopts;
+     int *longind;
+     int long_only;
+{
+  optarg = NULL;
+
+  if (optind == 0)
+    optstring = _getopt_initialize (optstring);
+
+  if (nextchar == NULL || *nextchar == '\0')
+    {
+      /* Advance to the next ARGV-element.  */
+
+      if (ordering == PERMUTE)
+       {
+         /* If we have just processed some options following some non-options,
+            exchange them so that the options come first.  */
+
+         if (first_nonopt != last_nonopt && last_nonopt != optind)
+           exchange ((char **) argv);
+         else if (last_nonopt != optind)
+           first_nonopt = optind;
+
+         /* Skip any additional non-options
+            and extend the range of non-options previously skipped.  */
+
+         while (optind < argc
+                && (argv[optind][0] != '-' || argv[optind][1] == '\0'))
+           optind++;
+         last_nonopt = optind;
+       }
+
+      /* The special ARGV-element `--' means premature end of options.
+        Skip it like a null option,
+        then exchange with previous non-options as if it were an option,
+        then skip everything else like a non-option.  */
+
+      if (optind != argc && !strcmp (argv[optind], "--"))
+       {
+         optind++;
+
+         if (first_nonopt != last_nonopt && last_nonopt != optind)
+           exchange ((char **) argv);
+         else if (first_nonopt == last_nonopt)
+           first_nonopt = optind;
+         last_nonopt = argc;
+
+         optind = argc;
+       }
+
+      /* If we have done all the ARGV-elements, stop the scan
+        and back over any non-options that we skipped and permuted.  */
+
+      if (optind == argc)
+       {
+         /* Set the next-arg-index to point at the non-options
+            that we previously skipped, so the caller will digest them.  */
+         if (first_nonopt != last_nonopt)
+           optind = first_nonopt;
+         return EOF;
+       }
+
+      /* If we have come to a non-option and did not permute it,
+        either stop the scan or describe it to the caller and pass it by.  */
+
+      if ((argv[optind][0] != '-' || argv[optind][1] == '\0'))
+       {
+         if (ordering == REQUIRE_ORDER)
+           return EOF;
+         optarg = argv[optind++];
+         return 1;
+       }
+
+      /* We have found another option-ARGV-element.
+        Skip the initial punctuation.  */
+
+      nextchar = (argv[optind] + 1
+                 + (longopts != NULL && argv[optind][1] == '-'));
+    }
+
+  /* Decode the current option-ARGV-element.  */
+
+  /* Check whether the ARGV-element is a long option.
+
+     If long_only and the ARGV-element has the form "-f", where f is
+     a valid short option, don't consider it an abbreviated form of
+     a long option that starts with f.  Otherwise there would be no
+     way to give the -f short option.
+
+     On the other hand, if there's a long option "fubar" and
+     the ARGV-element is "-fu", do consider that an abbreviation of
+     the long option, just like "--fu", and not "-f" with arg "u".
+
+     This distinction seems to be the most useful approach.  */
+
+  if (longopts != NULL
+      && (argv[optind][1] == '-'
+         || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
+    {
+      char *nameend;
+      const struct option *p;
+      const struct option *pfound = NULL;
+      int exact = 0;
+      int ambig = 0;
+      int indfound;
+      int option_index;
+
+      for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
+       /* Do nothing.  */ ;
+
+      /* Test all long options for either exact match
+        or abbreviated matches.  */
+      for (p = longopts, option_index = 0; p->name; p++, option_index++)
+       if (!strncmp (p->name, nextchar, nameend - nextchar))
+         {
+           if (nameend - nextchar == (int) strlen (p->name))
+             {
+               /* Exact match found.  */
+               pfound = p;
+               indfound = option_index;
+               exact = 1;
+               break;
+             }
+           else if (pfound == NULL)
+             {
+               /* First nonexact match found.  */
+               pfound = p;
+               indfound = option_index;
+             }
+           else
+             /* Second or later nonexact match found.  */
+             ambig = 1;
+         }
+
+      if (ambig && !exact)
+       {
+         if (opterr)
+           fprintf (stderr, "%s: option `%s' is ambiguous\n",
+                    argv[0], argv[optind]);
+         nextchar += strlen (nextchar);
+         optind++;
+         return '?';
+       }
+
+      if (pfound != NULL)
+       {
+         option_index = indfound;
+         optind++;
+         if (*nameend)
+           {
+             /* Don't test has_arg with >, because some C compilers don't
+                allow it to be used on enums.  */
+             if (pfound->has_arg)
+               optarg = nameend + 1;
+             else
+               {
+                 if (opterr)
+                   {
+                     if (argv[optind - 1][1] == '-')
+                       /* --option */
+                       fprintf (stderr,
+                                "%s: option `--%s' doesn't allow an argument\n",
+                                argv[0], pfound->name);
+                     else
+                       /* +option or -option */
+                       fprintf (stderr,
+                            "%s: option `%c%s' doesn't allow an argument\n",
+                            argv[0], argv[optind - 1][0], pfound->name);
+                   }
+                 nextchar += strlen (nextchar);
+                 return '?';
+               }
+           }
+         else if (pfound->has_arg == 1)
+           {
+             if (optind < argc)
+               optarg = argv[optind++];
+             else
+               {
+                 if (opterr)
+                   fprintf (stderr, "%s: option `%s' requires an argument\n",
+                            argv[0], argv[optind - 1]);
+                 nextchar += strlen (nextchar);
+                 return optstring[0] == ':' ? ':' : '?';
+               }
+           }
+         nextchar += strlen (nextchar);
+         if (longind != NULL)
+           *longind = option_index;
+         if (pfound->flag)
+           {
+             *(pfound->flag) = pfound->val;
+             return 0;
+           }
+         return pfound->val;
+       }
+
+      /* Can't find it as a long option.  If this is not getopt_long_only,
+        or the option starts with '--' or is not a valid short
+        option, then it's an error.
+        Otherwise interpret it as a short option.  */
+      if (!long_only || argv[optind][1] == '-'
+         || my_index (optstring, *nextchar) == NULL)
+       {
+         if (opterr)
+           {
+             if (argv[optind][1] == '-')
+               /* --option */
+               fprintf (stderr, "%s: unrecognized option `--%s'\n",
+                        argv[0], nextchar);
+             else
+               /* +option or -option */
+               fprintf (stderr, "%s: unrecognized option `%c%s'\n",
+                        argv[0], argv[optind][0], nextchar);
+           }
+         nextchar = (char *) "";
+         optind++;
+         return '?';
+       }
+    }
+
+  /* Look at and handle the next short option-character.  */
+
+  {
+    char c = *nextchar++;
+    char *temp = my_index (optstring, c);
+
+    /* Increment `optind' when we start to process its last character.  */
+    if (*nextchar == '\0')
+      ++optind;
+
+    if (temp == NULL || c == ':')
+      {
+       if (opterr)
+         {
+           if (posixly_correct)
+             /* 1003.2 specifies the format of this message.  */
+             fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c);
+           else
+             fprintf (stderr, "%s: invalid option -- %c\n", argv[0], c);
+         }
+       optopt = c;
+       return '?';
+      }
+    if (temp[1] == ':')
+      {
+       if (temp[2] == ':')
+         {
+           /* This is an option that accepts an argument optionally.  */
+           if (*nextchar != '\0')
+             {
+               optarg = nextchar;
+               optind++;
+             }
+           else
+             optarg = NULL;
+           nextchar = NULL;
+         }
+       else
+         {
+           /* This is an option that requires an argument.  */
+           if (*nextchar != '\0')
+             {
+               optarg = nextchar;
+               /* If we end this ARGV-element by taking the rest as an arg,
+                  we must advance to the next element now.  */
+               optind++;
+             }
+           else if (optind == argc)
+             {
+               if (opterr)
+                 {
+                   /* 1003.2 specifies the format of this message.  */
+                   fprintf (stderr, "%s: option requires an argument -- %c\n",
+                            argv[0], c);
+                 }
+               optopt = c;
+               if (optstring[0] == ':')
+                 c = ':';
+               else
+                 c = '?';
+             }
+           else
+             /* We already incremented `optind' once;
+                increment it again when taking next ARGV-elt as argument.  */
+             optarg = argv[optind++];
+           nextchar = NULL;
+         }
+      }
+    return c;
+  }
+}
+
+int
+getopt (argc, argv, optstring)
+     int argc;
+     char *const *argv;
+     const char *optstring;
+{
+  return _getopt_internal (argc, argv, optstring,
+                          (const struct option *) 0,
+                          (int *) 0,
+                          0);
+}
+
+#endif /* _LIBC or not __GNU_LIBRARY__.  */
+\f
+#ifdef TEST
+
+/* Compile with -DTEST to make an executable for use in testing
+   the above definition of `getopt'.  */
+
+int
+main (argc, argv)
+     int argc;
+     char **argv;
+{
+  int c;
+  int digit_optind = 0;
+
+  while (1)
+    {
+      int this_option_optind = optind ? optind : 1;
+
+      c = getopt (argc, argv, "abc:d:0123456789");
+      if (c == EOF)
+       break;
+
+      switch (c)
+       {
+       case '0':
+       case '1':
+       case '2':
+       case '3':
+       case '4':
+       case '5':
+       case '6':
+       case '7':
+       case '8':
+       case '9':
+         if (digit_optind != 0 && digit_optind != this_option_optind)
+           printf ("digits occur in two different argv-elements.\n");
+         digit_optind = this_option_optind;
+         printf ("option %c\n", c);
+         break;
+
+       case 'a':
+         printf ("option a\n");
+         break;
+
+       case 'b':
+         printf ("option b\n");
+         break;
+
+       case 'c':
+         printf ("option c with value `%s'\n", optarg);
+         break;
+
+       case '?':
+         break;
+
+       default:
+         printf ("?? getopt returned character code 0%o ??\n", c);
+       }
+    }
+
+  if (optind < argc)
+    {
+      printf ("non-option ARGV-elements: ");
+      while (optind < argc)
+       printf ("%s ", argv[optind++]);
+      printf ("\n");
+    }
+
+  exit (0);
+}
+
+#endif /* TEST */
diff --git a/dcc/getopt.h b/dcc/getopt.h
new file mode 100644 (file)
index 0000000..c872f41
--- /dev/null
@@ -0,0 +1,125 @@
+/* Declarations for getopt.
+   Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+
+   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, 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.  */
+
+#ifndef _GETOPT_H
+#define _GETOPT_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* For communication from `getopt' to the caller.
+   When `getopt' finds an option that takes an argument,
+   the argument value is returned here.
+   Also, when `ordering' is RETURN_IN_ORDER,
+   each non-option ARGV-element is returned here.  */
+
+extern char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+   This is used for communication to and from the caller
+   and for communication between successive calls to `getopt'.
+
+   On entry to `getopt', zero means this is the first call; initialize.
+
+   When `getopt' returns EOF, this is the index of the first of the
+   non-option elements that the caller should itself scan.
+
+   Otherwise, `optind' communicates from one call to the next
+   how much of ARGV has been scanned so far.  */
+
+extern int optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+   for unrecognized options.  */
+
+extern int opterr;
+
+/* Set to an option character which was unrecognized.  */
+
+extern int optopt;
+
+/* Describe the long-named options requested by the application.
+   The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+   of `struct option' terminated by an element containing a name which is
+   zero.
+
+   The field `has_arg' is:
+   no_argument         (or 0) if the option does not take an argument,
+   required_argument   (or 1) if the option requires an argument,
+   optional_argument   (or 2) if the option takes an optional argument.
+
+   If the field `flag' is not NULL, it points to a variable that is set
+   to the value given in the field `val' when the option is found, but
+   left unchanged if the option is not found.
+
+   To have a long-named option do something other than set an `int' to
+   a compiled-in constant, such as set a value from `optarg', set the
+   option's `flag' field to zero and its `val' field to a nonzero
+   value (the equivalent single-letter option character, if there is
+   one).  For long options that have a zero `flag' field, `getopt'
+   returns the contents of the `val' field.  */
+
+struct option
+{
+#if    __STDC__
+  const char *name;
+#else
+  char *name;
+#endif
+  /* has_arg can't be an enum because some compilers complain about
+     type mismatches in all the code that assumes it is an int.  */
+  int has_arg;
+  int *flag;
+  int val;
+};
+
+/* Names for the values of the `has_arg' field of `struct option'.  */
+
+#define        no_argument             0
+#define required_argument      1
+#define optional_argument      2
+
+#if __STDC__
+#if defined(__GNU_LIBRARY__)
+/* Many other libraries have conflicting prototypes for getopt, with
+   differences in the consts, in stdlib.h.  To avoid compilation
+   errors, only prototype getopt for the GNU C library.  */
+extern int getopt (int argc, char *const *argv, const char *shortopts);
+#else /* not __GNU_LIBRARY__ */
+extern int getopt ();
+#endif /* not __GNU_LIBRARY__ */
+extern int getopt_long (int argc, char *const *argv, const char *shortopts,
+                       const struct option *longopts, int *longind);
+extern int getopt_long_only (int argc, char *const *argv,
+                            const char *shortopts,
+                            const struct option *longopts, int *longind);
+
+/* Internal only.  Users should not call this directly.  */
+extern int _getopt_internal (int argc, char *const *argv,
+                            const char *shortopts,
+                            const struct option *longopts, int *longind,
+                            int long_only);
+#else /* not __STDC__ */
+extern int getopt ();
+extern int getopt_long ();
+extern int getopt_long_only ();
+
+extern int _getopt_internal ();
+#endif /* not __STDC__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GETOPT_H */
diff --git a/dcc/getopt1.c b/dcc/getopt1.c
new file mode 100644 (file)
index 0000000..a4f1976
--- /dev/null
@@ -0,0 +1,183 @@
+/* getopt_long and getopt_long_only entry points for GNU getopt.
+   Copyright (C) 1987, 88, 89, 90, 91, 92, 1993
+       Free Software Foundation, Inc.
+
+   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, 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.  */
+\f
+#ifdef HAVE_CONFIG_H
+#if defined (emacs) || defined (CONFIG_BROKETS)
+/* We use <config.h> instead of "config.h" so that a compilation
+   using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
+   (which it would do because it found this file in $srcdir).  */
+#include <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
+#include "getopt.h"
+
+#ifndef __STDC__
+/* This is a separate conditional since some stdc systems
+   reject `defined (const)'.  */
+#ifndef const
+#define const
+#endif
+#endif
+
+#include <stdio.h>
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+   actually compiling the library itself.  This code is part of the GNU C
+   Library, but also included in many other GNU distributions.  Compiling
+   and linking in this code is a waste when using the GNU C library
+   (especially if it is a shared library).  Rather than having every GNU
+   program understand `configure --with-gnu-libc' and omit the object files,
+   it is simpler to just do this in the source for each such file.  */
+
+#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
+
+
+/* This needs to come after some library #include
+   to get __GNU_LIBRARY__ defined.  */
+#ifdef __GNU_LIBRARY__
+#include <stdlib.h>
+#else
+char *getenv ();
+#endif
+
+#ifndef        NULL
+#define NULL 0
+#endif
+
+int
+getopt_long (argc, argv, options, long_options, opt_index)
+     int argc;
+     char *const *argv;
+     const char *options;
+     const struct option *long_options;
+     int *opt_index;
+{
+  return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
+}
+
+/* Like getopt_long, but '-' as well as '--' can indicate a long option.
+   If an option that starts with '-' (not '--') doesn't match a long option,
+   but does match a short option, it is parsed as a short option
+   instead.  */
+
+int
+getopt_long_only (argc, argv, options, long_options, opt_index)
+     int argc;
+     char *const *argv;
+     const char *options;
+     const struct option *long_options;
+     int *opt_index;
+{
+  return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
+}
+
+
+#endif /* _LIBC or not __GNU_LIBRARY__.  */
+\f
+#ifdef TEST
+
+#include <stdio.h>
+
+int
+main (argc, argv)
+     int argc;
+     char **argv;
+{
+  int c;
+  int digit_optind = 0;
+
+  while (1)
+    {
+      int this_option_optind = optind ? optind : 1;
+      int option_index = 0;
+      static struct option long_options[] =
+      {
+       {"add", 1, 0, 0},
+       {"append", 0, 0, 0},
+       {"delete", 1, 0, 0},
+       {"verbose", 0, 0, 0},
+       {"create", 0, 0, 0},
+       {"file", 1, 0, 0},
+       {0, 0, 0, 0}
+      };
+
+      c = getopt_long (argc, argv, "abc:d:0123456789",
+                      long_options, &option_index);
+      if (c == EOF)
+       break;
+
+      switch (c)
+       {
+       case 0:
+         printf ("option %s", long_options[option_index].name);
+         if (optarg)
+           printf (" with arg %s", optarg);
+         printf ("\n");
+         break;
+
+       case '0':
+       case '1':
+       case '2':
+       case '3':
+       case '4':
+       case '5':
+       case '6':
+       case '7':
+       case '8':
+       case '9':
+         if (digit_optind != 0 && digit_optind != this_option_optind)
+           printf ("digits occur in two different argv-elements.\n");
+         digit_optind = this_option_optind;
+         printf ("option %c\n", c);
+         break;
+
+       case 'a':
+         printf ("option a\n");
+         break;
+
+       case 'b':
+         printf ("option b\n");
+         break;
+
+       case 'c':
+         printf ("option c with value `%s'\n", optarg);
+         break;
+
+       case 'd':
+         printf ("option d with value `%s'\n", optarg);
+         break;
+
+       case '?':
+         break;
+
+       default:
+         printf ("?? getopt returned character code 0%o ??\n", c);
+       }
+    }
+
+  if (optind < argc)
+    {
+      printf ("non-option ARGV-elements: ");
+      while (optind < argc)
+       printf ("%s ", argv[optind++]);
+      printf ("\n");
+    }
+
+  exit (0);
+}
+
+#endif /* TEST */
diff --git a/dcc/naddr.ml b/dcc/naddr.ml
new file mode 100644 (file)
index 0000000..24179a9
--- /dev/null
@@ -0,0 +1,77 @@
+(* Network address handling module.
+
+This file is part of Liece.                                          
+
+Author: Daiki Ueno <daiki@kake.info.waseda.ac.jp>                    
+Created: 1998-09-28                                               
+Revised: 1999-01-28                                               
+Keywords: IRC, liece, DCC                                        
+
+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, 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 GNU Emacs; see the file COPYING.  If not, write to the    
+Free Software Foundation, Inc., 59 Temple Place - Suite 330,         
+Boston, MA 02111-1307, USA.  *)
+
+open Num
+open Big_int
+open Str
+
+let encode str =
+  let _ = string_match 
+      (regexp "\([0-9]+\)\.\([0-9]+\)\.\([0-9]+\)\.\([0-9]+\)") str 0 in
+  let (a1, a2, a3, a4) = 
+    try 
+      int_of_string (matched_group 1 str), 
+      int_of_string (matched_group 2 str), 
+      int_of_string (matched_group 3 str), 
+      int_of_string (matched_group 4 str)
+    with
+      _ -> 
+       Printf.eprintf "Invalid address\n"; flush Pervasives.stdout; exit 1;
+  in
+  let (s1, s2, s3, s4) =
+    Int (1 lsl 24), 
+    Int (1 lsl 16), 
+    Int (1 lsl 8), 
+    Int 1
+  in
+  let ul =
+    ((Int a1) */ s1) +/ ((Int a2) */ s2) +/ ((Int a3) */ s3) +/ (Int a4)
+  in
+  string_of_num ul
+
+let decode str =
+  let ul = 
+    try
+      num_of_string str 
+    with
+      _ ->
+       Printf.eprintf "Invalid address\n"; flush Pervasives.stdout; exit 1;
+  in
+  let (s1, s2, s3, s4) =
+    Int (1 lsl 24), 
+    Int (1 lsl 16), 
+    Int (1 lsl 8), 
+    Int 1
+  in
+  let (a1, a2, a3, a4) = 
+    floor_num (ul // s1), 
+    floor_num ((mod_num ul s1) // s2), 
+    floor_num ((mod_num (mod_num ul s1) s2) // s3), 
+    (mod_num (mod_num (mod_num ul s1) s2) s3)
+  in
+  Printf.sprintf "%s.%s.%s.%s" 
+    (string_of_num a1) 
+    (string_of_num a2) 
+    (string_of_num a3) 
+    (string_of_num a4)
diff --git a/dcc/naddr.mli b/dcc/naddr.mli
new file mode 100644 (file)
index 0000000..0c9917a
--- /dev/null
@@ -0,0 +1,31 @@
+(* Network address handling module.
+
+This file is part of Liece.                                          
+
+Author: Daiki Ueno <daiki@kake.info.waseda.ac.jp>                    
+Created: 1998-09-28                                               
+Revised: 1999-01-28                                               
+Keywords: IRC, liece, DCC                                        
+
+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, 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 GNU Emacs; see the file COPYING.  If not, write to the    
+Free Software Foundation, Inc., 59 Temple Place - Suite 330,         
+Boston, MA 02111-1307, USA.  *)
+
+val encode : string -> string;;
+    (* [Naddr.encode s] encodes the XXX.XXX.XXX.XXX address [s] into
+       another string packed by network byte order. *)
+
+val decode : string -> string;;
+    (* [Naddr.decode s] does the inverse job than [Naddr.encode],
+       restoring initial expression of address. *)
diff --git a/dcc/tcp.c b/dcc/tcp.c
new file mode 100644 (file)
index 0000000..266b1ad
--- /dev/null
+++ b/dcc/tcp.c
@@ -0,0 +1,229 @@
+/*
+ * TCP/IP stream emulation for GNU Emacs.
+ * Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
+
+ * Author: Masanobu Umeda <umerin@mse.kyutech.ac.jp>
+ *         Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+This file is part of GNU Emacs.
+
+GNU Emacs 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, or (at your option)
+any later version.
+
+GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+ */
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/socket.h>
+#include <sys/file.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <netdb.h>
+#include <stdio.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <netinet/in.h>
+#define _GNU_SOURCE
+#include <getopt.h>
+
+#ifdef HAVE_SOCKS_H
+#include <socks.h>
+#endif 
+
+#ifndef HAVE_GETADDRINFO
+#include "getaddrinfo.h"
+#endif /* !HAVE_GETADDRINFO */
+
+#ifdef HAVE_BASENAME
+# ifdef HAVE_LIBGEN_H
+#  include <libgen.h>
+#  ifdef basename
+#   undef basename
+#  endif
+# endif
+# include <string.h>
+#else
+# define basename(path) (rindex((path), '/') + 1)
+#endif
+
+#ifndef NI_MAXHOST
+# define NI_MAXHOST 1025
+#endif
+
+static char *progname;
+
+void version () {
+       printf("%s (Liece) 1.4.0\n"
+              "Copyright (C) 1998, 1999 Daiki Ueno\n"
+              "This is free software; see the source for copying conditions.  There is NO\n"
+              "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n", 
+              progname);
+}
+
+void usage() {
+  printf("Usage: %s [options] host [service]\n", progname);
+}
+
+\f
+main (argc, argv)
+  int argc;
+  char *argv[];
+{
+  struct protoent *proto;
+
+  struct addrinfo *in, hints;
+
+  char *hostname = NULL, *service = "ircd";
+  int family, port;
+  fd_set *readfds, *writefds;
+  int server, emacsIn = fileno (stdin), emacsOut = fileno (stdout); 
+  char buffer[1024], *retry;
+  int nbuffer, wret, false = 0;
+  int c;
+  
+  progname = (char *) basename (argv[0]);
+
+  while (1) {
+    int this_option_optind = optind ? optind : 1;
+    int option_index = 0;
+    static struct option long_options[] =      {
+      {"version", 0, 0, 'v'},
+      {"help", 0, 0, 'h'},
+      {0, 0, 0, 0}
+    };
+    
+    c = getopt_long (argc, argv, "vh", long_options, &option_index);
+    if (c == -1)
+      break;
+    
+    switch (c) {
+    case 'v':
+      version();
+      exit(1);
+      break;
+    case 'h':
+      usage();
+      exit(1);
+      break;
+    default:
+      break;
+    }
+  }
+  
+  if (argc < 2)
+    {
+      usage();
+      exit (1);
+    }
+  if (argc >= 2)
+    hostname = argv[1];
+  if (argc >= 3)
+    service = argv[2];
+  
+  if ((proto = getprotobyname ("tcp")) == NULL) {
+    perror ("getprotobyname");
+    exit (1);
+  }
+  
+  memset (&hints, 0, sizeof (hints));
+  hints.ai_family = AF_UNSPEC;
+  hints.ai_socktype = SOCK_STREAM;
+  hints.ai_protocol = proto->p_proto;
+  if (getaddrinfo (hostname, service, &hints, &in) < 0) {
+    perror ("getaddrinfo");
+    exit (1);
+  }
+
+  if ((server = socket (in->ai_family, in->ai_socktype, 0)) < 0) {
+    perror ("socket");
+    exit (1);
+  }
+
+  if (setsockopt (server, SOL_SOCKET, SO_REUSEADDR, 
+                 (const char *) &false, sizeof (false))) {
+    perror ("setsockopt");
+    exit (1);
+  }
+
+  if (connect (server, in->ai_addr, in->ai_addrlen) < 0) {
+    perror ("connect");
+    close (server);
+    exit (1);
+  }
+
+#ifdef O_NDELAY
+  fcntl (server, F_SETFL, O_NDELAY);
+#endif /* O_NDELAY */
+
+  /* Connection established. */
+
+  readfds = (fd_set *) calloc(server + 1, sizeof (fd_mask));
+  writefds = (fd_set *) calloc(server + 1, sizeof (fd_mask));
+
+  while (1)
+    {
+      FD_SET (server, readfds);
+      FD_SET (emacsIn, readfds);
+      if (select (server+1, readfds, NULL, NULL, NULL) == -1)
+       {
+         perror ("select");
+         exit (1);
+       }
+      if (FD_ISSET (emacsIn, readfds))
+       {
+         /* From Emacs */
+         nbuffer = read (emacsIn, buffer, sizeof buffer -1);
+
+          if (nbuffer == 0)
+           goto finish;
+         for (retry = buffer; nbuffer > 0; nbuffer -= wret, retry += wret)
+           {
+             FD_SET (server, writefds);
+             if (select (server+1, NULL, writefds, NULL, NULL) == -1)
+               {
+                 perror ("select");
+                 exit (1);
+               }
+             wret = write (server, retry, nbuffer);
+             if (wret < 0) goto finish;
+           }
+       }
+      if (FD_ISSET (server, readfds))
+       {
+         /* From NNTP server */
+         nbuffer = read (server, buffer, sizeof buffer -1);
+         if (nbuffer == 0)
+           goto finish;
+         for (retry = buffer; nbuffer > 0; nbuffer -= wret, retry += wret)
+           {
+             FD_SET (emacsOut, writefds);
+             if (select (emacsOut+1, NULL, writefds, NULL, NULL) == -1)
+               {
+                 perror ("select");
+                 exit (1);
+               }
+             wret = write (emacsOut, retry, nbuffer);
+             if (wret < 0) goto finish;
+           }
+       }
+    }
+
+  /* End of communication. */
+ finish:
+  close (server);
+  close (emacsIn);
+  close (emacsOut);
+  exit (0);
+}
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644 (file)
index 0000000..b01a4b6
--- /dev/null
@@ -0,0 +1,33 @@
+info_TEXINFOS = liece-ja.texi
+EXTRA_DIST = sample.dot.liece.in
+CLEANFILES = *~
+DISTCLEANFILES = sample.dot.liece liece-ja.info 
+
+if USE_PACKAGE
+icondir = $(packagedir)/etc/$(PACKAGE)/icons
+catalogdir = $(packagedir)/etc/$(PACKAGE)/po
+styledir = $(packagedir)/etc/$(PACKAGE)/styles
+infodir = $(packagedir)/info
+else
+icondir = $(pkgdatadir)/icons
+catalogdir = $(pkgdatadir)/po
+styledir = $(pkgdatadir)/styles
+infodir = $(prefix)/info
+endif
+
+SUFFIXES = .texi .info
+
+all: liece-ja.info sample.dot.liece
+
+.texi.info:
+       $(EMACS) -batch -q -no-site-file \
+               -l $(top_srcdir)/lisp/liece-make.el \
+               -f make-liece-info-files $<
+
+sample.dot.liece: sample.dot.liece.in
+       @$(INSTALL_DATA) sample.dot.liece.in sample.dot.liece
+       @$(EMACS) -batch -q -no-site-file \
+               -l $(top_srcdir)/lisp/liece-make.el \
+               -f make-liece-sample-files \
+               $@ $(bindir)/dcc $(icondir) $(catalogdir) $(styledir)
+
diff --git a/doc/liece-ja.texi b/doc/liece-ja.texi
new file mode 100644 (file)
index 0000000..228cdb4
--- /dev/null
@@ -0,0 +1,719 @@
+\input texinfo @c -*-texinfo -*- coding: iso-2022-jp -*-
+@setfilename liece-ja.info
+@settitle Liece -- IRC Client On Emacsen
+@synindex pg cp
+@finalout
+
+@direntry
+* Liece-ja: (liece-ja).  IRC Client On Emacsen
+@end direntry
+
+@titlepage
+@title Liece \e$B@bL@=q\e(B
+@author \e$B>eLn\e(B \e$BG55#\e(B <ueno@@unixuser.org>
+@subtitle 2000/04/04
+@end titlepage
+
+@ifinfo
+@node Top, Overview, (dir), (dir)
+@top Liece \e$B@bL@=q\e(B
+
+@ifinfo
+\e$B$3$NJ8=q$G$O\e(B Liece \e$B%P!<%8%g%s\e(B 1.4 \e$B$K$D$$$F2r@b$7$^$9!#\e(B
+Liece \e$B$K4X$9$k<gMW$J>pJs$O\e(B Liece \e$B$N8x<0%[!<%`%Z!<%8\e(B 
+(http://www.unixuser.org/~ueno/liece/) 
+\e$B$KH?1G$5$l$k$3$H$G$7$g$&!#\e(B
+@end ifinfo
+
+@menu
+* Overview::                    \e$B$O$8$a$K\e(B
+* Working environments::        \e$BF0:n4D6-\e(B
+* Getting source::              \e$BF~<jJ}K!\e(B
+* Installation::                \e$BF3F~J}K!\e(B
+* Using Liece::                 \e$B;HMQJ}K!\e(B
+* Customization::               \e$B%+%9%?%^%$%:\e(B
+* Appendix::                    \e$BIUO?\e(B
+* Concept Index::               \e$B35G0:w0z\e(B
+* Function Index::              \e$B4X?t:w0z\e(B
+* Variable Index::              \e$BJQ?t:w0z\e(B
+@end menu
+
+@node Overview, Working environments, Top, Top
+@chapter \e$B$O$8$a$K\e(B
+
+Liece \e$B$O\e(B GNU Emacs \e$B>e$GF0:n$9$k\e(B IRC (Internet Relay Chat, RFC 1459)\e$B$N%/\e(B
+\e$B%i%$%"%s%H<BAu$G$9!#\e(B@refill
+
+Liece \e$B$N<g$JFCD'$O0J2<$NDL$j$G$9!#\e(B
+
+@itemize @bullet
+@item
+CHOCOA 1.0 \e$B$K;w$?A`:n46\e(B
+@item
+\e$B3F\e(B Emacs \e$BKh$K:GE,2=$5$l$?7Z2w$JF0:n\e(B
+@item
+\e$B6/NO$J%f!<%6Jd=u\e(B
+@item
+\e$B4JC1$J@_Dj$H!"K-IY$J\e(B API
+@item
+\e$B%/%i%$%"%s%H\e(B - \e$B%/%i%$%"%s%H4V$N0E9f2=5!G=\e(B
+@item
+\e$BF0E*$KJQ992DG=$J!"%9%?%$%k%Y!<%9$N%&%#%s%I%&9=@.5!G=\e(B
+@item
+\e$BF0E*$KJQ99$5$l$?@_Dj$N<+F0J]B85!G=\e(B
+@item
+\e$B<+F0E*$KOC<T$NF08~$rD4::$9$k5<;w%"%&%'%"%M%95!G=\e(B
+@item
+URL \e$B$N<+F0<}=85!G=\e(B
+@end itemize
+
+
+@node Working environments, Getting source, Overview, Top
+@chapter \e$BF0:n4D6-\e(B
+
+\e$B8=:_$N%P!<%8%g%s\e(B(1.4)\e$B$NF0:n$,3NG'$5$l$F$$$k4D6-$O0J2<$NDL$j$G$9!#\e(B
+
+@itemize @bullet
+@item
+Standard Emacs 20.6 :-)
+@item
+XEmacs 21.2 (beta32)
+@item
+Mule 2.3 (based on Emacs 19.34) with new custom package
+@end itemize
+
+
+@node Getting source, Installation, Working environments, Top
+@chapter \e$BF~<jJ}K!\e(B
+
+Liece \e$B$N3+H/$K$O\e(B CVS (Concurrent Versions System) \e$B$,MQ$$$i$l$F$$$^$9!#\e(B
+\e$B$7$P$7$PBg5,LO$JJQ99$,$J$5$l$?>l9g$K$N$_!"%j%j!<%9$NG[I[$,9T$o$l$^$9!#\e(B
+\e$BG[I[$O\e(B HTTP \e$B$K$h$j<hF@$9$k$3$H$,$G$-$^$9!#\e(B
+
+@section \e$B%j%j!<%9$NF~<jJ}K!\e(B
+
+@itemize @bullet
+@item
+http://www.unixuser.org/~ueno/liece/liece-VERSION.tar.gz
+@end itemize
+
+@section CVS \e$B$G$N%U%!%$%k$NF~<jJ}K!\e(B
+
+@subsection \e$BF?L>\e(B CVS \e$B%5!<%P$X$N%m%0%$%s\e(B
+
+@example
+% cvs -d :pserver:anonymous@@cvs.m17n.org:/cvs/root login
+
+CVS password: [CR] # NULL string
+@end example
+
+@subsection \e$B%b%8%e!<%k$N\e(B checkout
+
+@example
+% cvs -d :pserver:anonymousl@@cvs.m17n.org:/cvs/root checkout liece
+@end example
+
+@node Installation, Using Liece, Getting source, Top
+@chapter \e$BF3F~J}K!\e(B
+
+@menu
+* Prerequirements::             \e$B=`Hw\e(B
+* Compilation::                 \e$B%3%s%Q%$%k\e(B
+* Setting .emacs::              .emacs \e$B$N@_Dj\e(B
+* Setting .liece::              .liece/init.el \e$B$N@_Dj\e(B
+@end menu
+
+@node Prerequirements, Compilation, Installation, Installation
+@section \e$B=`Hw\e(B
+
+@noindent
+Liece \e$B$N%$%s%9%H!<%k$K$O0J2<$NG[I[$,JLESI,MW$K$J$j$^$9!#\e(B
+
+@table @samp
+@item APEL (A Portable Emacs Library)
+ftp://ftp.m17n.org/pub/mule/apel/
+
+@item custom
+http://www.dina.kvl.dk/~abraham/custom/
+
+@end table
+
+custom \e$B$O!":G6a$N\e(B Emacs \e$B$NG[I[$K4^$^$l$F$$$^$9!#\e(B
+APEL \e$B$K4X$7$F$O!":G?7$N%P!<%8%g%s$N$4MxMQ$r$*4+$a$7$^$9!#\e(B
+(\e$B%j%j!<%9$NG[I[$K$O!"$=$N;~E@$GBP1~$9$k:G?7$N\e(B APEL \e$B$,4^$^$l$F$$$^$9!#\e(B)
+
+@node Compilation, Setting .emacs, Prerequirements, Installation
+@section \e$B%3%s%Q%$%k\e(B
+
+\e$B%3%s%Q%$%k$N<j=g$r4JC1$K@bL@$7$^$9!#\e(B
+\e$B>\$7$/$OF1:-$N\e(B @file{INSTALL} \e$B$r;2>H$7$F$/$@$5$$!#\e(B
+
+@example
+% ./configure
+% make
+% su
+Password: ultrasecret
+# make install 
+@end example
+
+
+XEmacs \e$B$N\e(B package \e$B$H$7$F%$%s%9%H!<%k$9$k$K$O!"0J2<$N$h$&$K$7$^$9!#\e(B
+
+@example
+% ./configure --enable-package --with-emacs=xemacs
+% make
+% su
+Password:
+# make install 
+@end example
+
+@noindent
+@strong{[\e$B%3%s%Q%$%k;~$N7Y9p$K$D$$$F\e(B]}
+@quotation
+\e$B%3%s%Q%$%k;~$K\e(B `... not found' \e$B$d\e(B `BROKEN FACILITY DETECTED:'
+\e$B$J$I$N7Y9p$,I=<($5$l$k>l9g$,$"$j$^$9$,!"FC$KLdBj$O$"$j$^$;$s!#\e(B
+@end quotation
+
+@node Setting .emacs, Setting .liece, Compilation, Installation
+@section .emacs \e$B$N@_Dj\e(B
+
+(XEmacs \e$B$N\e(B package \e$B$H$7$F%$%s%9%H!<%k$7$?>l9g$K$O!"\e(B
+\e$B2?$b5-=R$9$kI,MW$O$"$j$^$;$s!#$3$N@a$OFI$_Ht$P$7$F2<$5$$!#\e(B)
+
+Emacs \e$B$b$7$/$O\e(B Mule \e$B$r$*;H$$$J$i!"\e(BAPEL \e$B5Z$S\e(B Liece \e$B$r\e(B
+install \e$B$7$?>l=j$r\e(B subdirs.el \e$B$K0J2<$N$h$&$K;XDj$7$F2<$5$$!#\e(B
+@lisp
+(normal-top-level-add-to-load-path '("apel" "liece"))
+@end lisp
+
+Emacs 20.3 \e$B0J9_$N\e(B Emacs\e$B!"$b$7$/$O\e(B XEmacs \e$B$r$*;H$$$J$i!"\e(B
+@lisp
+(normal-top-level-add-subdirs-to-load-path)
+@end lisp
+
+\e$B$H=q$/$@$1$GNI$$$G$7$g$&!#\e(B
+
+Emacs 19 \e$B0JA0$N%P!<%8%g%s$N\e(B Emacs \e$B$G;HMQ$9$k>l9g$K$O!"\e(B
+\e$B$h$jD>@\E*$J%Q%9$N;XDj$,I,MW$K$J$j$^$9!#\e(B
+
+\e$B:G8e$K!"0J2<$N0l9T$r2C$($F2<$5$$!#\e(B
+@lisp
+(autoload 'liece "liece" nil t)
+@end lisp
+
+
+@node Setting .liece,  , Setting .emacs, Installation
+@section ~/.liece \e$B$N@_Dj\e(B
+
+\e$BG[I[Cf$N\e(B @file{doc} \e$B%G%#%l%/%H%j$+$i\e(B
+@file{sample.dot.liece} \e$B$r\e(B @file{~/.liece/init.el}
+\e$B$H$7$F%3%T!<$7$FJT=8$7$^$9!#\e(B
+
+\e$B3F<o@_Dj$N2r@b$O%5%s%W%k%U%!%$%k$N%3%a%s%H$r;2>H$7$F$/$@$5$$!#\e(B
+\e$B$[$H$s$I$N@_Dj9`L\$O!"\e(B@kbd{M-x customize} \e$B$K$h$j@_Dj$9$k$3$H$b$G$-$^$9!#\e(B
+
+\e$B%3%^%s%I%i%$%s%*%W%7%g%s$K$h$jJ#?t$N@_Dj%U%!%$%k$r;H$$J,$1$k$K$O!"\e(B
+\e$B0J2<$N$h$&$K$7$^$9!#\e(B
+
+@example
+% emacs -f liece ~/.liece.local
+@end example
+
+@node Using Liece, Customization, Installation, Top
+@chapter \e$B;HMQJ}K!\e(B
+
+\e$B4{$K\e(B CHOCOA \e$B$d\e(B liece \e$B$r$*;H$$$K$J$i$l$?$3$H$N$"$kJ}$O!"\e(B
+\e$BBgBN$NA`:n$O$*J,$+$j$@$H;W$$$^$9!#\e(B
+
+\e$BA`:n$O>/$7$:$D0[$J$j$^$9$,!"\e(Birchat \e$B$N;H$$J}\e(B
+@samp{http://irc.kyoto-u.ac.jp/irchat.html} \e$B$,;29M$K$J$k$+$bCN$l$^$;$s!#\e(B
+
+@section \e$B5/F0$H@\B3\e(B
+
+Emacs \e$B$rN)$A>e$2$?$i!"\e(B@kbd{M-x liece} \e$B$H%?%$%W$7$F\e(B Liece \e$B$r5/F0$7$^$9!#\e(B
+
+\e$B@\B3@h$N%5!<%P!"<+J,$N%K%C%/%M!<%`!"<+8J>R2p$J$I$N@\B3$KI,MW$J>pJs$,\e(B
+@file{.liece}\e$B$K@_Dj$5$l$F$$$J$1$l$P!":G=i$K$$$/$D$+$N<ALd$r$5$l$^$9!#\e(B
+
+@defvar liece-server
+\e$B@\B3@h%5!<%P\e(B (\e$BJ8;zNs$^$?$O\e(B plist) Connection types (@ref{Connection types})
+@end defvar
+
+@defvar liece-service
+\e$B%G%#%U%)%k%H$N%]!<%HHV9f\e(B(\e$B@0?tCM\e(B)\e$B$^$?$O%5!<%S%9L>\e(B(\e$BJ8;zNs\e(B)\e$BDL>o$O\e(B 
+@var{liece-server} \e$B$N@_Dj$K$h$j>e=q$-$5$l$k\e(B
+@end defvar
+
+@defvar liece-nickname
+\e$B%K%C%/%M!<%`\e(B(\e$BJ8;zNs\e(B)
+@end defvar
+
+@defvar liece-name
+WHOIS \e$B$GI=<($5$l$k%f!<%6L>\e(B(\e$BJ8;zNs\e(B) (\e$BNc\e(B: "Daiki Ueno")
+@end defvar
+
+@defvar liece-connection-timeout
+\e$B@\B3;~$N%?%$%`%"%&%H!#C10L$OIC!#\e(B
+@end defvar
+
+@menu
+* Friends::                     \e$B5sF0$r4F;k$9$k\e(B
+* Window styles::               \e$B%&%#%s%I%&%9%?%$%k\e(B
+* Commands::                    \e$B%3%^%s%I$NMxMQJ}K!\e(B
+@end menu
+
+@node Friends, Window styles, Using Liece, Using Liece
+@section \e$B5sF0$r4F;k$9$k\e(B
+
+\e$B$"$kFCDj$N%f!<%6$K$D$$$F$=$N5sF0$r4F;k$9$k$3$H$,$G$-$^$9!#\e(B@refill
+
+@table @kbd
+@item @key{C-c C-i a (@code{liece-command-activate-friends})}
+\e$B4F;k5!G=$rM-8z$K$7!"F1;~$KBP>]%f!<%60lMw$X$NEPO?$r9T$&\e(B
+
+@item @key{C-c C-i d (@code{liece-command-deactivate-friends})}
+\e$B4F;k5!G=$rL58z2=$9$k\e(B
+
+@item @key{C-c C-i s (@code{liece-command-display-friends})}
+\e$B8=:_$NIT:_>u67$rI=<(\e(B
+
+@end table
+
+@node Window styles, Commands, Friends, Using Liece
+@section \e$B%&%#%s%I%&%9%?%$%k\e(B
+
+Liece \e$B$G$O%&%#%s%I%&$NJ,3d$r%&%#%s%I%&%9%?%$%k$H8F$P$l$k5!9=$K$h$j=@Fp$K\e(B
+\e$B%+%9%?%^%$%:$G$-$^$9!#\e(B@refill
+
+\e$B%&%#%s%I%&%9%?%$%k<+BN$O\e(B
+@lisp
+liece-window-style-directory
+@end lisp
+
+\e$B$G;XDj$5$l$k%G%#%l%/%H%jFb$K4^$^$l$k%U%!%$%k$G$"$j!"$=$NCf?H$O35$M\e(B emacs
+lisp \e$B$G=q$+$l$F$$$^$9!#\e(B@refill
+
+\e$B;XDj$9$k:]$K$O!">e=R$N%G%#%l%/%H%j$K4^$^$l$k%U%!%$%kL>$H$7$F;XDj$9$k;v$K\e(B
+\e$B$J$j$^$9!#\e(B@refill
+
+@lisp
+(setq liece-window-default-style "middle") 
+@end lisp
+ @refill
+
+@menu
+* Writing window styles::       \e$B%&%#%s%I%&%9%?%$%k$N5-=R\e(B
+@end menu
+
+@node Writing window styles,  , Window styles, Window styles
+@subsection \e$B%&%#%s%I%&%9%?%$%k$N5-=R\e(B
+
+\e$B9%$_$N%&%#%s%I%&%9%?%$%k$r:n@.$9$k$K$O!"$b$H$K$J$kE,Ev$J%&%#%s%I%&%9%?%$\e(B
+\e$B%k$r7h$a!"JL$N%U%!%$%kL>$K%3%T!<$9$k$3$H$+$i;O$a$k$HNI$$$G$7$g$&!#\e(B(\e$BNc\e(B:
+"mystyle")@refill
+
+\e$B$3$N%U%!%$%k$O\e(B elisp \e$B$N%^%/%m$r4^$`9=J8$G=q$-$^$9!#\e(B
+\e$B%^%/%m\e(B 
+@lisp
+liece-window-add-style
+@end lisp
+
+\e$B$O?75,$K>uBVIU$-%P%C%U%!J,3d$rDj5A$7$^$9!#\e(B@refill
+
+\e$BI8=`$GDj5A$5$l$F$$$k>uBVJQ?t$O!"0J2<$N\e(B 4\e$B$D$G$9!#\e(B
+@table @samp
+@item command-buffer-mode
+\e$B%A%c%s%M%k\e(B/\e$B%W%i%$%Y!<%H\e(B
+
+@item channel-buffer-mode
+\e$B%A%c%s%M%k%P%C%U%!$NI=<(\e(B/\e$BHsI=<(\e(B
+
+@item nick-buffer-mode
+\e$B%K%C%/0lMw%P%C%U%!$NI=<(\e(B/\e$BHsI=<(\e(B    
+
+@item channel-list-buffer-mode
+\e$B%A%c%s%M%k0lMw%P%C%U%!$NI=<(\e(B/\e$BHsI=<(\e(B
+
+@end table
+
+\e$B>uBV;XDj$NNc$H$7$F0J2<$N@_Dj$r<($7$^$9!#\e(B
+@lisp
+(command-buffer-mode . any)
+(channel-buffer-mode . t) 
+(nick-buffer-mode . t)
+(channel-list-buffer-mode . nil)
+@end lisp
+
+\e$B$3$NNc$G$O!"0J2<$N>uBV$G$N%&%#%s%I%&9=@.$rDj5A$9$k$3$H$r\e(B
+\e$B<($7$^$9!#\e(B
+@itemize @bullet
+@item
+\e$B%W%i%$%Y!<%H%b!<%I$N>uBV$OLd$o$:!"\e(B
+@item
+\e$B%A%c%s%M%k%P%C%U%!$r;HMQ$7!"\e(B
+@item
+\e$B%K%C%/0lMw%P%C%U%!$r;HMQ$7!"\e(B
+@item
+\e$B%A%c%s%M%k0lMw%P%C%U%!$r;HMQ$7$J$$\e(B
+@end itemize
+
+@menu
+* Reconfiguration predicates::  \e$B%&%#%s%I%&:FJT@.=R8l\e(B
+* Window configuration::        \e$B%&%#%s%I%&9=@.\e(B
+@end menu
+
+@node Reconfiguration predicates, Window configuration, Writing window styles, Writing window styles
+@subsubsection \e$B%&%#%s%I%&:FJT@.=R8l\e(B
+
+\e$B%&%#%s%I%&9=@.$r:F7W;;$7$?7k2L$,8=:_$N%&%#%s%I%&9=@.$HA4$/F1$8>l9g!"%&%#\e(B
+\e$B%s%I%&$N:FJ,3d$K$O7Z;k$G$-$J$$%3%9%H$,$+$+$j$^$9!#\e(B@refill
+
+\e$B$=$3$G!"%&%#%s%I%&$N:FJT@.$,I,MW$G$"$k$+$rD4$Y$k%,!<%I$r\e(B
+\e$B>uBVJQ?t$HF1Ns$K;XDj$9$k$3$H$,$G$-$^$9!#\e(B
+@lisp
+(reconfiguration-predicate . func)
+@end lisp
+
+\e$B$3$NNc$G;XDj$5$l$?\e(B @code{func}\e$B$O\e(B 0\e$B0z?t$N4X?t$G$"$j!"\e(B
+@code{liece-window-define-reconfiguration-predicate}\e$B$K$h$jDj5A$,$J$5$l\e(B
+\e$B$^$9!#$3$NDj5A$O%9%?%$%k%U%!%$%k$KD>@\=q$/;v$,$G$-$^$9!#\e(B@refill
+
+@node Window configuration,  , Reconfiguration predicates, Writing window styles
+@subsubsection \e$B%&%#%s%I%&9=@.\e(B
+
+\e$BNc$H$7$F0lHVC1=c$JJ,3d\e(B
+(\e$B%@%$%"%m%0%P%C%U%!$H%3%^%s%I%P%C%U%!$N$_\e(B) \e$B$N\e(B
+\e$B5-=R$r<($7$^$9!#\e(B
+@lisp
+(configuration (vertical 1.0 (dialogue 1.0) (command 3 point)))
+@end lisp
+
+\e$B$3$NNc$G$O0J2<$N%&%#%s%I%&9=@.$rDj5A$7$?$3$H$K$J$j$^$9!#\e(B
+@enumerate
+@item
+\e$B%&%#%s%I%&A4BN$r?bD>$K\e(B(vertical)2\e$B$D$KJ,3d$7!"\e(B
+@item
+\e$B%@%$%"%m%0%P%C%U%!$r>eJ}$K:n@.$7!"\e(B
+command \e$B%P%C%U%!$r<h$j5n$C$?;D$j$N%5%$%:$r3dEv$F$k!#\e(B
+@item
+\e$B$=$N2<$K!"\e(B3\e$B9T\e(B(\e$B<B:]$K$O\e(B2\e$B9T\e(B)\e$B$N%3%^%s%I%P%C%U%!$rMQ0U\e(B
+\e$B$7!":G=*E*$K%+!<%=%k$r$=$N%P%C%U%!$K0\F0$9$k\e(B(point)\e$B!#\e(B
+@end enumerate
+
+\e$B$3$N%&%#%s%I%&%9%?%$%k$rA*Br$9$k$H!"\e(B
+\e$B2hLL>e$G$O0J2<$N9=@.$K$J$j$^$9!#\e(B
+@example
++----------------+
+|                |
+| \e$B%@%$%"%m%0\e(B     |
+|                |
++----------------+
+| \e$B%3%^%s%I\e(B(3\e$B9T\e(B)  | \e$B"+\e(B \e$B%+!<%=%k\e(B
++----------------+
+@end example
+
+\e$B%5%$%:$N;XDj$O0J2<$N\e(B3\e$B<oN`$G2DG=$G$9!#\e(B
+@itemize @bullet
+@item
+\e$B3d9g\e(B       (\e$BNc\e(B: 0.25)
+@item
+\e$B9T\e(B(\e$B7e\e(B)\e$B?t\e(B   (\e$BNc\e(B: 3)
+@item
+\e$BJQ?t$N;2>H\e(B (\e$BNc\e(B: liece-command-buffer-rows)
+@end itemize
+
+             
+\e$BJXMx$J?t;z\e(B 1.0 \e$B$rI,$:0lEY$O\e(B \e$B;HMQ$7$J$/$F$O$J$j$^$;$s!#%5%$%:$K\e(B 1.0 \e$B$r;X\e(B
+\e$BDj$7$?>l9g!";D$j$NNN0h$r3d$jEv$F$k;v$r0UL#$7$^$9!#\e(B@refill
+
+\e$B0J2<$K\e(B BNF \e$B$K$h$k%P%C%U%!J,3d$NJ8K!$r:\$;$^$9!#\e(B
+@example
+split       = horizontal | vertical | buffer | form
+horizontal  = "(horizontal " size *split ")"
+vertical    = "(vertical " size *split ")"
+buffer      = "(" buffer-name " " size *[ "point" ] ")"
+size        = number
+buffer-name = command | channel | channel-list | nick ...
+@end example
+
+@node Commands,  , Window styles, Using Liece
+@section \e$B%3%^%s%I$NMxMQJ}K!\e(B
+
+@menu
+* Dialogue mode::               \e$B%@%$%"%m%0%b!<%I\e(B
+* Internal naming spaces::      \e$BFbIt$G;H$o$l$kL?L>5,B'\e(B
+* Private conversation::        \e$B%W%i%$%Y!<%H%b!<%I\e(B
+@end menu
+
+@node Dialogue mode, Internal naming spaces, Commands, Commands
+@subsection \e$B%@%$%"%m%0%b!<%I\e(B
+
+\e$B%@%$%"%m%0%b!<%I$H$O!"%A%c%s%M%k$G$N2qOC$,I=<($5$l$k\e(B
+\e$B%P%C%U%!\e(B(@code{liece-dialogue-buffer})
+\e$B$G$N<g%b!<%I$G$9!#\e(B
+Liece \e$B$OB?$/$N\e(B Emacs \e$B>e$GF0:n$9$k\e(B IRC \e$B%/%i%$%"%s%H$HF1MM$K\e(B
+
+@node Internal naming spaces, Private conversation, Dialogue mode, Commands
+@subsection \e$BFbIt$G;H$o$l$kL?L>5,B'\e(B
+
+Liece \e$B$N5sF0$r3F%3%^%s%I$K4XO"IU$1$kA0$K!"FbIt$GMQ$$$i$l$kL>A06u4V$r4JC1\e(B
+\e$B$K2r@b$7$^$9!#\e(B@refill
+
+\e$B%A%c%s%M%kL>$NI=8=$K$O%G!<%?7?$H$7$F$NFbItI=8=$H\e(BIRC \e$B$N@$3&$G<B:]$K$d$j$H\e(B
+\e$B$j$5$l$k30ItI=8=$N\e(B2\e$B$D$,$"$j$^$9!#$3$l$i$O\e(B(\e$B8=:_$O\e(B)\e$B!"$I$A$i$bJ8;zNsI=8=$G\e(B
+\e$B$"$j!"MxMQ<T$O%3%^%s%I$NH/9T$rDL$8$FAPJ}$K%"%/%;%9$9$k$3$H$,$G$-$^$9!#\e(B
+@refill
+
+liece \e$B$G$O=P2q$&L>A0A4$F$r0l$D$NBg$-$JO"A[%j%9%H\e(B
+(@code{liece-nick-alist})\e$B$KJ]B8$7$F$$$^$9!#$3$NJ}K!$OHs>o$K8zN($,0-$/!"\e(B
+\e$BJd40F~NO$N8uJd$rI=<($9$k0J30$NLr3d$K$OMxMQ$G$-$^$;$s!#\e(B@refill
+
+\e$B$3$l$KBP$7!"\e(BLiece \e$B$G$OJ#?t$N>.$5$J%O%C%7%eI=$rMQ0U$7$F$$$^$9!#\e(B@refill
+
+\e$B%A%c%s%M%k$NFbItI=8=$O\e(B Liece \e$B$NFbIt$GMQ$$$i$l$k%O%C%7%eI=$N%-!<$G$b$"$j!"\e(B
+\e$BFCDj$N%A%c%s%M%k$K4X$9$k>pJs$O%7%s%\%k$N%W%m%Q%F%#$H$7$FJ]B8$^$?$O99?7$5\e(B
+\e$B$l$^$9!#\e(B@refill
+
+@node Private conversation,  , Internal naming spaces, Commands
+@subsection \e$B%W%i%$%Y!<%H%b!<%I\e(B
+
+Liece \e$B$G$O!"%A%c%s%M%k$4$H$N2qOCAj<j$H!"%W%i%$%Y!<%H%b!<%I$G$NBPOCAj<j$r\e(B
+\e$BJL!9$NL>A06u4V$G4IM}$7$F$$$^$9!#$3$NJ}?K$K$OH?BP0U8+$b$"$j!"$=$N0l$D$K$O\e(B
+\e$B%7%g!<%H%+%C%H$K$h$jBPOCAj<j$r@Z$jBX$($k:]$KB?$/$N%9%H%m!<%/$rMW$9$k$3$H\e(B
+\e$B$,5s$2$i$l$^$9!#\e(B@refill
+
+\e$B$7$+$7!"B??t$N%A%c%s%M%k$K;22C$7$F$$$k>l9g$KFCDj$N%A%c%s%M%k$X$N@Z$jBX$(\e(B
+\e$B$NJ}$,%W%i%$%Y!<%H%b!<%I$G$NBPOCAj<j$N@Z$jBX$($h$jIQHK$K@8$8$k$H$$$&$N$O\e(B
+\e$B7P83E*$KL@$i$+$G$9!#\e(B@refill
+
+\e$B$^$?!"$3$l$i$r0l854IM}$7$?>l9g$K!"%W%i%$%Y!<%H%b!<%I$H%A%c%s%M%k$G$NH/8@\e(B
+\e$B$N%_%9$,5/$3$j$d$9$$E@$b9MN8$KF~$l$^$7$?!#\e(B(\e$BN"$G0BA4$K0-8}$,8@$($^$9!#\e(B
+^_^;;)@refill
+
+\e$B<B:]$K!"\e(BIRC\e$B0J30$N<B;~4V2q5D7O$G$O$3$l$i$NL>A06u4V$rL@<(E*$KJ,3d$7$F$$$k\e(B
+\e$B>l9g$,B?$/!"$3$l$i$H$NO"7H$r9M$($?>l9g$KET9g$,NI$$$H$$$&$N$b$"$j$^$9!#\e(B
+@refill
+
+@menu
+* Operations in private conversation::  \e$B%W%i%$%Y!<%H%b!<%I$G$NBPOC$NJ}K!\e(B
+@end menu
+
+@node Operations in private conversation,  , Private conversation, Private conversation
+@subsubsection \e$B%W%i%$%Y!<%H%b!<%I$G$NBPOC$NJ}K!\e(B
+
+\e$B%W%i%$%Y!<%H%b!<%I$K@Z$j49$($k$K$O\e(B@kbd{C-c P}
+(@code{liece-command-toggle-private})\e$B$r%?%$%W$7$^$9!#;vA0$KBPOCAj<j$,7h\e(B
+\e$BDj$7$F$$$k$N$G$"$l$P\e(B@kbd{C-c j} (@code{liece-command-join})\e$B$GAj<j$r;XDj\e(B
+\e$B$9$k$@$1$G$b9=$$$^$;$s!#\e(B@refill
+
+\e$B0l;~E*$K%W%i%$%Y!<%H%b!<%I$+$iDL>o$N2qOC$KLa$k$K$O!"$b$&0lEY\e(B @kbd{C-c P} 
+\e$B$H%?%$%W$7$^$9!#\e(B@refill
+
+\e$B%W%i%$%Y!<%H%b!<%I$G$NA`:n$O$O!"%A%c%s%M%kFb$G$N2qOC$H$[$\F1MM$G$9!#\e(B
+
+@kbd{C-c \e$B?t;z\e(B} (@code{liece-switch-to-channel-no-\e$B?t;z\e(B})
+
+@defvar liece-default-partner-binding
+
+\e$BBPOCAj<j$rFCDj$NHV9f$K3dEv$F$k\e(B
+@end defvar
+
+
+@node Customization, Appendix, Using Liece, Top
+@chapter \e$B%+%9%?%^%$%:\e(B
+
+
+@menu
+* Connection types::            \e$B@\B3J}K!$N;XDj\e(B
+* Timers::                      \e$B%?%$%^JQ?t\e(B
+* Programming hooks::           
+@end menu
+
+@node Connection types, Timers, Customization, Customization
+@section \e$B@\B3J}K!$N;XDj\e(B
+
+
+Liece \e$B$G$OJ#?t$N@\B3J}K!$r%5%]!<%H$7$F$$$^$9!#\e(B
+"\e$B%5!<%PL>\e(B:\e$B%]!<%HHV9f\e(B:\e$B%Q%9%o!<%I\e(B" \e$B$H$$$C$?J8;zNsI=8=$NB>$K!"\e(B
+plist \e$B$rMQ$$$?!"$h$j>\:Y$J@\B3%Q%i%a%?$r;XDj$9$k$3$H$,$G$-$^$9!#\e(B
+@var{liece-server} \e$B$K;XDj$G$-$k%-!<$O0J2<$NDL$j$G$9!#\e(B
+
+@table @samp
+@item :host
+\e$B@\B3@h%[%9%HL>\e(B(\e$BJ8;zNs\e(B)
+
+@item :service
+\e$B%5!<%S%9%(%s%H%j\e(B(\e$B@0?t$^$?$OJ8;zNs\e(B)
+
+@item :password
+\e$B%Q%9%o!<%I\e(B(\e$BJ8;zNs\e(B)
+
+@item :type
+\e$B@\B3J}K!\e(B (network, program, ssl, rlogin \e$B$N$$$:$l$+\e(B)
+
+@item :prescript
+\e$B@\B3A0=hM}%3%^%s%I\e(B (\e$B4X?t$^$?$O\e(B shell command \e$BJ8;zNs\e(B)
+
+@item :relay
+\e$BCf7Q%[%9%HL>\e(B (\e$BJ8;zNs\e(B)
+
+@end table
+
+
+@menu
+* Connect via external program::  \e$B30It%W%m%0%i%`$r2p$7$?@\B3\e(B
+* Connect via SSL::             SSL \e$B$r2p$7$?@\B3\e(B
+* Connect via rlogin::          rlogin \e$B$r2p$7$?@\B3\e(B
+@end menu
+
+@node Connect via external program, Connect via SSL, Connection types, Connection types
+@subsection \e$B30It%W%m%0%i%`$r2p$7$?@\B3\e(B
+
+IPv6 \e$B7PM3$N@\B3$r9T$$$?$$!"\e(Bsocks \e$B1[$7$K@\B3$7$?$$\e(B
+\e$B$J$I$N2?$i$+$NM}M3$G\e(B Emacs \e$B$N%M%C%H%o!<%/5!G=$rMxMQ$7$?$/$J$$>l9g!"\e(B
+Liece \e$B$G$O30It%W%m%0%i%`$K$h$k@\B3$,2DG=$G$9!#\e(B
+
+\e$B$3$NJ}K!$G@\B3$r9T$&$?$a$K$O!"30It%W%m%0%i%`$H$7$F\e(B Liece \e$B$NG[I[$KImB0$9$k\e(B
+"tcp" \e$B$,I,MW$H$J$j$^$9!#\e(B
+
+@code{liece-server} \e$B$N\e(B :type \e$B%Q%i%a%?$K\e(B program \e$B$r;XDj$9$k$+!"\e(B
+\e$B$b$7$/$O0J2<$NJQ?t$r@_Dj$9$k$3$H$K$h$j!"$3$NJ}K!$,MQ$$$i$l$^$9!#\e(B
+
+@defvar liece-tcp-default-connection-type
+
+\e$B%G%#%U%)%k%H$N@\B3J}K!$r;XDj$9$k\e(B
+@end defvar
+
+
+@defvar liece-tcp-program-name
+
+\e$B30It%W%m%0%i%`$rL@<(E*$K;XDj$9$k\e(B
+@end defvar
+
+
+@node Connect via SSL, Connect via rlogin, Connect via external program, Connection types
+@subsection SSL \e$B$r2p$7$?@\B3\e(B
+
+
+SSLeay \e$B$^$?$O\e(B OpenSSL \e$B$KImB0$9$k\e(B s_client \e$B$rMxMQ$7$F@\B3$r9T$&J}K!$bMQ\e(B
+\e$B0U$5$l$F$$$^$9!#\e(B
+
+\e$B$3$NJ}K!$G@\B3$r9T$&$?$a$K$O!"30It%i%$%V%i%j$H$7$F\e(B Emacs/W3 \e$B$KImB0$9$k\e(B
+ssl.el \e$B$,I,MW$K$J$j$^$9!#\e(B
+
+@defvar liece-tcp-ssl-protocol-version
+
+SSL \e$B%W%m%H%3%k$N%P!<%8%g%s$r;XDj$7$^$9!#\e(Bliece-tcp-ssl-protocol-version 
+\e$B$,\e(B "2" \e$B$G$J$$$J$i$P!":G=i$K\e(B SSL \e$B%W%m%H%3%k$N%P!<%8%g%s\e(B 3 \e$B$G@\B3$r;n$_!"\e(B
+\e$B<:GT$7$?>l9g$K$O\e(BSSL \e$B%W%m%H%3%k$N%P!<%8%g%s\e(B 2 \e$B$G@\B3$r;n$_$^$9!#\e(B
+@end defvar
+
+
+@node Connect via rlogin,  , Connect via SSL, Connection types
+@subsection rlogin \e$B$r2p$7$?@\B3\e(B
+
+
+@defvar liece-tcp-rlogin-program
+rlogin (rsh, ssh) \e$B$rMQ$$$?%j%l!<@\B3;~$K;HMQ$9$k%W%m%0%i%`\e(B
+@end defvar
+
+
+@defvar liece-tcp-rlogin-user-name
+rlogin (rsh, ssh) \e$B$rMQ$$$?%j%l!<@\B3;~$K;HMQ$9$k%f!<%6L>\e(B
+@end defvar
+
+
+@node Timers, Programming hooks, Connection types, Customization
+@section \e$B%?%$%^JQ?t\e(B
+
+@defvar liece-keepalive-interval
+IRC \e$B%5!<%P$KBP$7$FDj4|E*$K\e(B PING \e$B$rAw$k4V3V\e(B
+@end defvar
+
+@defvar liece-poll-names-interval
+\e$B;22C$7$F$$$k%A%c%s%M%k$KBP$7!"Dj4|E*$KL>A00lMw$r<hF@$9$k4V3V\e(B
+@end defvar
+
+@defvar liece-poll-friends-interval
+
+@var{liece-friends} \e$B$K;XDj$7$?%f!<%6$KBP$7!"Dj4|E*$KB8:_3NG'$r9T$&4V3V\e(B
+@end defvar
+
+
+@node Programming hooks,  , Timers, Customization
+@section Programming hooks
+
+
+Liece \e$B$G$OJ#;($J\e(B hook \e$B$r=q$/$?$a$N%^%/%m$rMQ0U$7$F$$$^$9!#\e(B
+
+@defun liece-current-nickname
+\e$B8=:_$N<+J,$N%K%C%/%M!<%`$r<hF@\e(B
+@end defun
+
+@defun liece-current-channel
+\e$B8=:_2qOCCf$N%A%c%s%M%kL>$r<hF@\e(B
+@end defun
+
+@defun liece-current-channels
+\e$B;22C$7$F$$$k%A%c%s%M%k$N%j%9%H$r<hF@\e(B
+@end defun
+
+@defun liece-current-chat-partner
+\e$B8=:_2qOCCf$NBPOCAj<j$r<hF@\e(B
+@end defun
+
+@defun liece-current-chat-partners
+\e$B2qOCCf$NBPOCAj<j$N%j%9%H$r<hF@\e(B
+@end defun
+
+@defun liece-channel-get-nicks &optional chnl
+CHNL \e$B$N%a%s%P0lMw$r<hF@\e(B
+@end defun
+
+@defun liece-channel-get-operators &optional chnl
+CHNL \e$B$N%A%c%s%M%k4IM}<T%j%9%H$r<hF@\e(B
+@end defun
+
+@defun liece-channel-get-voices &optional chnl
+CHNL \e$B$GH/8@8"$N$"$k%a%s%P$N%j%9%H$r<hF@\e(B
+@end defun
+
+@defun liece-channel-get-topic &optional chnl
+CHNL \e$B$N%H%T%C%/$r<hF@\e(B
+@end defun
+
+@defun liece-channel-get-modes &optional chnl
+CHNL \e$B$N%b!<%I$r<hF@\e(B
+@end defun
+
+@defun liece-channel-get-bans &optional chnl
+CHNL \e$B$N\e(B ban \e$B%j%9%H$r<hF@\e(B
+@end defun
+
+@defun liece-channel-get-exceptions &optional chnl
+CHNL \e$B$N\e(B ban \e$BNc30%j%9%H$r<hF@\e(B
+@end defun
+
+@defun liece-channel-get-invites &optional chnl
+CHNL \e$B$N>7BT<T%j%9%H$r<hF@\e(B
+@end defun
+
+@node Appendix, Concept Index, Customization, Top
+@chapter \e$BIUO?\e(B
+
+@node Concept Index, Function Index, Appendix, Top
+@chapter \e$B35G0:w0z\e(B
+
+@printindex cp
+
+@node Function Index, Variable Index, Concept Index, Top
+@chapter \e$B4X?t:w0z\e(B
+
+@printindex fn
+
+@node Variable Index,  , Function Index, Top
+@chapter \e$BJQ?t:w0z\e(B
+
+@summarycontents
+@contents
+@bye
diff --git a/doc/sample.dot.liece.in b/doc/sample.dot.liece.in
new file mode 100644 (file)
index 0000000..e706695
--- /dev/null
@@ -0,0 +1,91 @@
+;;; -*- mode: emacs-lisp -*- -*- coding: iso-2022-jp -*-
+
+;; IRC Servers
+;(setq liece-server "irc.kyoto.wide.ad.jp")
+;(setq liece-server "irc.rcac.tdi.co.jp")    
+;(setq liece-server "irc.race.u-tokyo.ac.jp")
+;(setq liece-server "irc.huie.hokudai.ac.jp")
+;(setq liece-server "irc.karrn.ad.jp")
+;(setq liece-server "irc.tohoku.ac.jp")
+;(setq liece-server "irc.dti.ne.jp")    
+;(setq liece-server "irc.tokyo.wide.ad.jp")
+
+;; Port number of IRC Servers (default: 6667)
+;(setq liece-service 6667)
+
+;; Private information of user.
+;(setq liece-name "")
+;(setq liece-nickname "")      
+
+;; Customization to change Look & Feel.
+;; If non-nil, channel buffer would be displayed.
+(setq liece-channel-buffer-mode t)
+;; If non-nil, nick buffer would be displayed.
+(setq liece-nick-buffer-mode t)
+;; If non-nil, channel list buffer would be displayed.
+(setq liece-channel-list-buffer-mode t)
+
+;; Window splitting parameters.
+(setq liece-nick-window-width-percent 18)
+(setq liece-channel-list-window-width-percent 24)
+
+;; Path settings
+;; If you have installed as XEmacs package please set them to nil.
+(setq liece-intl-catalogue-directory "@CATALOGDIR@")
+(setq liece-window-style-directory "@STYLEDIR@")
+
+(setq liece-window-default-style "middle")
+
+;; Highlighten IRC buffers.
+(setq liece-highlight-mode t)
+;; If `liece-highlight-mode' is non-nil, strings which matches 
+;; following regular expression would be emphasized by colouring.
+;(setq liece-highlight-pattern 
+;      (regexp-opt 
+;       '("foo" "bar" "baz.*")))
+
+;; Channels we want to join startup time.
+;(setq liece-startup-channel-list
+;      '("#foo" "#bar"))
+;; Channel bindings to its numerical expression.
+;; Each element of list are bound to n-th.
+;(setq liece-default-channel-binding 
+;      '("#foo" nil "#baz" "#bar"))
+
+;; DCC external programs.
+;; When this is not specified, we search `dcc' executable in exec-path.
+(setq liece-dcc-program             
+      (expand-file-name "@DCCPATH@"))
+;; Don't receive any files automatically.
+(setq liece-dcc-receive-direct nil) 
+
+;;; XEmacs specific features
+;; Normal position of toolbar icons.
+(setq liece-icon-directory          
+      (expand-file-name "@ICONDIR@"))
+;; Default toolbar position.
+;(setq liece-toolbar-position 'top) 
+;; Display smiley mark.
+;(setq liece-use-smiley t)          
+
+;;; URL browsing.
+;; Specify browser name. To see available browser names, 
+;; refer docstring of `liece-url-browser-function'.
+(setq liece-url-browser-name "netscape") 
+
+;;; Encryption
+(setq liece-crypt-known-keys '("foo" "bar"))
+(setq liece-crypt-default-keys '(("#foo" . "bar")))
+
+;;; Automatic invisible.
+;(add-hook 'liece-after-001-hook
+;                (function (lambda (prefix rest)
+;                    (liece-send
+;                     "MODE %s +i" liece-real-nickname)
+;                    nil)))
+
+;;; Converting codings.
+;; Detect coding automatically.
+;(setq liece-detect-coding-system t)
+;; Convert deprecated hankaku kana to zenkaku kana.
+;(setq liece-convert-hankaku-katakana t)
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/etc/Emacs.ad b/etc/Emacs.ad
new file mode 100644 (file)
index 0000000..07ca652
--- /dev/null
@@ -0,0 +1,58 @@
+! -*- mode: xrdb; coding: euc-jp -*-
+!
+! XEmacs ¤Ç¤ÏÆüËܸì¥á¥Ë¥å¡¼¤òɽ¼¨²Äǽ¤Ç¤¹¤¬¡¢Emacs Lisp ¤Î¥³¡¼¥É¤ÇÆüËܸìʸ»úÎó¤ò
+! »ØÄꤷ¤Æ¤âÀµ¤·¤¯É½¼¨¤Ç¤­¤Þ¤»¤ó¡£¤·¤«¤· X ¤Î¥ê¥½¡¼¥¹¤Ë°Ê²¼¤Î¤è¤¦¤Êµ­½Ò¤òÄɲä¹
+! ¤ë¤³¤È¤Ç¡¢SKK ¤Î¥á¥Ë¥å¡¼¤òÆüËܸ첽¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
+! ¶ñÂÎŪ¤Ë¤Ï¡¢°Ê²¼¤ÎÆâÍƤò locale ¥Ñ¥Ã¥±¡¼¥¸¤ËÉÕ°¤Î¥ê¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Ë½ñ¤­²Ã¤¨¤Þ
+! ¤¹¡£XEmacs ¤òɸ½àŪ¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¤¤ì¤Ð¡¢¤³¤Î¥Õ¥¡¥¤¥ë¤Ï
+!
+! /usr/local/lib/xemacs/mule-packages/etc/app-defaults/ja/Emacs
+!
+! ¤Ë¤¢¤ë¤³¤È¤¬Í½ÁÛ¤µ¤ì¤Þ¤¹¡£¤Þ¤¿¡¢°Ê²¼¤Î³Æ¹Ô¤Ë "XEmacs" ¤È¤¤¤¦ prefix ¤òÉÕ¤±¤Æ¡¢
+! ~/.Xresources ¤Ë½ñ¤­¤³¤à¡¢¤È¤¤¤¦¼ê¤â¤¢¤ë¤Ç¤·¤ç¤¦¡£
+
+*XlwMenu.sendFile.labelString: ¥Õ¥¡¥¤¥ë¤òÁ÷¿®
+*XlwMenu.receiveFile.labelString: ¥Õ¥¡¥¤¥ë¤ò¼õ¿®
+*XlwMenu.sendChatRequest.labelString: DCC CHATÍ×µá
+*XlwMenu.acceptChatRequest.labelString: DCC CHAT³«»Ï
+*XlwMenu.listDCCRequest.labelString: DCCÍ×µá°ìÍ÷
+*XlwMenu.dispatchStackedDCCRequests.labelString: DCCÍ×µá¤ò¾å¤«¤é½ç¤Ë½èÍý
+*XlwMenu.crypt.labelString: °Å¹æ²½
+*XlwMenu.toggleCryptMode.labelString: °Å¹æ²½ÀÚÂØ
+*XlwMenu.setDefaultKeyOfThisChannel.labelString: ÈëÌ©¸°¤ÎÀßÄê
+*XlwMenu.setDefaultKeyForThisChannel.labelString: ÈëÌ©¸°¤ÎÀßÄê
+*XlwMenu.addNewKeyToKeyring.labelString: ÈëÌ©¸°¤ÎÄɲÃ
+*XlwMenu.removeKeyFromKeyring.labelString: ÈëÌ©¸°¤Îºï½ü
+*XlwMenu.private.labelString: ¸Ä¿ÍŪ
+*XlwMenu.togglePrivateConversation.labelString: 1ÂÐ1²ñÏÃ
+*XlwMenu.registerFriends.labelString: Í§¿ÍÅÐÏ¿¤ÎÄɲÃ
+*XlwMenu.unregisterFriends.labelString: Í§¿ÍÅÐÏ¿¤Îºï½ü
+*XlwMenu.displayUserhost.labelString: ¥æ¡¼¥¶¥Û¥¹¥È̾¤Îɽ¼¨
+*XlwMenu.ignoreNicksRegexp.labelString: ¥Ë¥Ã¥¯/Àµµ¬É½¸½¤ò̵»ë
+*XlwMenu.composeMail.labelString: ¥á¡¼¥ë¤ò½ñ¤¯
+*XlwMenu.channel.labelString: ¥Á¥ã¥ó¥Í¥ë
+*XlwMenu.joinChannel.labelString: ¥Á¥ã¥ó¥Í¥ë¤Ë»²²Ã
+*XlwMenu.partChannel.labelString: ¥Á¥ã¥ó¥Í¥ë¤òΥæ
+*XlwMenu.goToNextChannel.labelString: ¼¡¤Î¥Á¥ã¥ó¥Í¥ë
+*XlwMenu.goToPreviousChannel.labelString: Á°¤Î¥Á¥ã¥ó¥Í¥ë
+*XlwMenu.rotateLeftChannels.labelString: ¥Á¥ã¥ó¥Í¥ë°ìÍ÷¤òº¸²ó¤ê¤Ë²óž
+*XlwMenu.rotateRightChannels.labelString: ¥Á¥ã¥ó¥Í¥ë°ìÍ÷¤ò±¦²ó¤ê¤Ë²óž
+*XlwMenu.inviteToThisChannel.labelString: ¤³¤Î¥Á¥ã¥ó¥Í¥ë¤Ë¾·ÂÔ
+*XlwMenu.kickOutFromThisChannel.labelString: ¤³¤Î¥Á¥ã¥ó¥Í¥ë¤«¤é½³¤ê½Ð¤¹
+*XlwMenu.setModeOfThisChannel.labelString: ¥Á¥ã¥ó¥Í¥ë¥â¡¼¥É¤ÎÀßÄê
+*XlwMenu.setTopicOfThisChannel.labelString: ¥Á¥ã¥ó¥Í¥ë¥È¥Ô¥Ã¥¯¤ÎÀßÄê
+*XlwMenu.listChannel.labelString: ¥Á¥ã¥ó¥Í¥ë°ìÍ÷¤òɽ¼¨
+*XlwMenu.displayNamesOfChannel.labelString: ¥á¥ó¥Ð¤Îɽ¼¨(¥Ë¥Ã¥¯¥Í¡¼¥à¤Î¤ß)
+*XlwMenu.displayWhoAreOnTheChannel.labelString: ¥á¥ó¥Ð¤Îɽ¼¨
+*XlwMenu.loadVariablesFile.labelString: ÀßÄê¤ÎÆɹþ
+*XlwMenu.saveVariablesFile.labelString: ÀßÄê¤ÎÊݸ
+*XlwMenu.changeWindowStyle.labelString: ¥¦¥£¥ó¥É¥¦¥¹¥¿¥¤¥ë¤ÎÊѹ¹
+*XlwMenu.reloadStyleFile.labelString: ¥¦¥£¥ó¥É¥¦¥¹¥¿¥¤¥ë¤ÎºÆÆɹþ
+*XlwMenu.reconfigureWindows.labelString: ¥¦¥£¥ó¥É¥¦ºÆÇÛÃÖ
+*XlwMenu.toggleChannelBufferDisplayState.labelString: ¥Á¥ã¥ó¥Í¥ë¥Ð¥Ã¥Õ¥¡¤Îɽ¼¨ÀÚÂØ
+*XlwMenu.toggleNickBufferDisplayState.labelString: ¥Ë¥Ã¥¯¥Ð¥Ã¥Õ¥¡¤Îɽ¼¨ÀÚÂØ
+*XlwMenu.freezeBuffer.labelString: ¥Ð¥Ã¥Õ¥¡¤Î¸ÇÄê
+*XlwMenu.ownFreezeBuffer.labelString: ¥Ð¥Ã¥Õ¥¡¤Î°ì»þ¸ÇÄê
+*XlwMenu.enterDebugMode.labelString: ¥Ç¥Ð¥Ã¥°¥â¡¼¥É
+*XlwMenu.quitIRC.labelString: IRC¤ò¤ä¤á¤ë
+
diff --git a/etc/Makefile.am b/etc/Makefile.am
new file mode 100644 (file)
index 0000000..0f662a1
--- /dev/null
@@ -0,0 +1,90 @@
+ICONS = \
+       icons/back.xpm \
+       icons/ball.blank.xpm \
+       icons/ball.gray.xpm \
+       icons/ball.red.xpm \
+       icons/naruto.blank.xpm \
+       icons/naruto.gray.xpm \
+       icons/naruto.red.xpm \
+       icons/crypt.xpm \
+       icons/encrypt.xpm \
+       icons/forward.xpm \
+       icons/home.xpm \
+       icons/icons.gif \
+       icons/icons.xpm \
+       icons/liece-pointer.xbm \
+       icons/liece-pointer.xpm \
+       icons/key.xpm \
+       icons/location.xpm \
+       icons/pindown.xpm \
+       icons/print.xpm \
+       icons/reload.xpm \
+       icons/search.xpm \
+       icons/stop.xpm
+CATALOGS = po/ja.po
+STYLES = \
+       styles/bottom \
+       styles/middle \
+       styles/top
+TARGETS = $(ICONS) $(CATALOGS) $(STYLES)
+
+if USE_PACKAGE
+icondir = $(packagedir)/etc/$(PACKAGE)/icons
+catalogdir = $(packagedir)/etc/$(PACKAGE)/po
+styledir = $(packagedir)/etc/$(PACKAGE)/styles
+else
+icondir = $(pkgdatadir)/icons
+catalogdir = $(pkgdatadir)/po
+styledir = $(pkgdatadir)/styles
+endif
+
+disticondir = $(distdir)/icons
+distcatalogdir = $(distdir)/po
+diststyledir = $(distdir)/styles
+
+install-data-local: $(TARGETS)
+       for d in $(pkgdatadir) $(icondir) $(catalogdir) $(styledir); do \
+               $(top_srcdir)/mkinstalldirs $$d; \
+       done
+       @list="$(ICONS)"; for p in $$list; do \
+         if test -f $$p; then \
+           echo " $(INSTALL_DATA) $$p $(icondir)/"; \
+             $(INSTALL_DATA) $$p $(icondir)/; \
+          else :; fi; \
+        done
+       @list="$(CATALOGS)"; for p in $$list; do \
+         if test -f $$p; then \
+           echo " $(INSTALL_DATA) $$p $(catalogdir)/"; \
+             $(INSTALL_DATA) $$p $(catalogdir)/; \
+          else :; fi; \
+        done
+       @list="$(STYLES)"; for p in $$list; do \
+         if test -f $$p; then \
+           echo " $(INSTALL_DATA) $$p $(styledir)/"; \
+             $(INSTALL_DATA) $$p $(styledir)/; \
+          else :; fi; \
+        done
+
+dist-hook:
+       for d in $(distpkgdatadir) $(disticondir) $(distcatalogdir) \
+       $(diststyledir); do \
+               $(top_srcdir)/mkinstalldirs $$d; \
+       done
+       @list="$(ICONS)"; for p in $$list; do \
+         if test -f $$p; then \
+           echo " $(INSTALL_DATA) $$p $(disticondir)/"; \
+             $(INSTALL_DATA) $$p $(disticondir)/; \
+          else :; fi; \
+        done
+       @list="$(CATALOGS)"; for p in $$list; do \
+         if test -f $$p; then \
+           echo " $(INSTALL_DATA) $$p $(distcatalogdir)/"; \
+             $(INSTALL_DATA) $$p $(distcatalogdir)/; \
+          else :; fi; \
+        done
+       @list="$(STYLES)"; for p in $$list; do \
+         if test -f $$p; then \
+           echo " $(INSTALL_DATA) $$p $(diststyledir)/"; \
+             $(INSTALL_DATA) $$p $(diststyledir)/; \
+          else :; fi; \
+        done
diff --git a/etc/icons/back.xpm b/etc/icons/back.xpm
new file mode 100644 (file)
index 0000000..6c23254
--- /dev/null
@@ -0,0 +1,58 @@
+/* XPM */
+static char *back[] = {
+/* width height num_colors chars_per_pixel */
+"    28    28       23            1",
+/* colors */
+". c #000000",
+"# c #000080",
+"a c #0000f8",
+"b c #003438",
+"c c #008000",
+"d c #008080",
+"e c #00fc00",
+"f c #202020",
+"g c #303060",
+"h c #4098a0",
+"i c #6064c8",
+"j c #800000",
+"k c #808000",
+"l c #808080",
+"m c #980060",
+"n c #9898f8",
+"o c #b2b2b2  s backgroundToolBarColor",
+"p c #e8e8e8",
+"q c #f80000",
+"r c #f86430",
+"s c #f864c8",
+"t c #f8fc00",
+"u c #f8fcf8",
+/* pixels */
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooelooooooooooooo",
+"ooooooooooooeudooooooooooooo",
+"oooooooooooeuocloooooooooooo",
+"ooooooooooeuoecboooooooooooo",
+"oooooooooeuoeocblooooooooooo",
+"ooooooooeuoeoecfdooooooooooo",
+"oooooooeuoeoeocffloooooooooo",
+"ooooooeuoeoeoeoeoboooooooooo",
+"oooooeuoeoeoeoeoedbooooooooo",
+"oooohuoeoeoeoeoeoffooooooooo",
+"oooohueoeoeoeoeoeffooooooooo",
+"ooooocdddddddddddfbooooooooo",
+"oooooochcdcdcccccfbooooooooo",
+"ooooooochchccccccbdooooooooo",
+"oooooooochchcccccblooooooooo",
+"ooooooooochcccffffoooooooooo",
+"ooooooolllchccbbbdlllloooooo",
+"oooooooolllbhcbblllllllooooo",
+"oooooooooollbhbblllllloooooo",
+"ooooooooooollbbllllooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo"
+};
diff --git a/etc/icons/ball.blank.xpm b/etc/icons/ball.blank.xpm
new file mode 100644 (file)
index 0000000..4bfd945
--- /dev/null
@@ -0,0 +1,16 @@
+/* XPM */
+static char * ball_blank_xpm[] = {
+"12 12 1 1",
+"      c None",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            "};
diff --git a/etc/icons/ball.gray.xpm b/etc/icons/ball.gray.xpm
new file mode 100644 (file)
index 0000000..68cb382
--- /dev/null
@@ -0,0 +1,25 @@
+/* XPM */
+static char * ball_gray_xpm[] = {
+"12 12 10 1",
+"      c None",
+".     c #000000",
+"+     c #999999",
+"@     c #666666",
+"#     c #FFFFFF",
+"$     c #CCCCCC",
+"%     c #888888",
+"&     c #555555",
+"*     c #BBBBBB",
+"=     c #333333",
+"    ....    ",
+"   .+++@.   ",
+"  .+#$%@&.  ",
+" .+*#*%@&=. ",
+" .++++@&==. ",
+" .+++@@&=.. ",
+" .@@@@&==.. ",
+" .@@&&==... ",
+"  .====.=.  ",
+"   .=....   ",
+"    ....    ",
+"            "};
diff --git a/etc/icons/ball.red.xpm b/etc/icons/ball.red.xpm
new file mode 100644 (file)
index 0000000..79ee137
--- /dev/null
@@ -0,0 +1,21 @@
+/* XPM */
+static char * ball_red_xpm[] = {
+"12 12 6 1",
+"      c None",
+".     c #000000",
+"+     c #FF9999",
+"@     c #FF3333",
+"#     c #FFFFFF",
+"$     c #660000",
+"            ",
+"    ....    ",
+"   .+++@.   ",
+"  .+#+@@$.  ",
+" .++#++@@$. ",
+" .@+@+@$$$. ",
+" .+@+@@@$.. ",
+" .@@@@$$$.. ",
+" .@@$@$$... ",
+"  .$$$$.$.  ",
+"   .$....   ",
+"    ....    "};
diff --git a/etc/icons/crypt.xpm b/etc/icons/crypt.xpm
new file mode 100644 (file)
index 0000000..1e73f16
--- /dev/null
@@ -0,0 +1,58 @@
+/* XPM */
+static char *crypt[] = {
+/* width height num_colors chars_per_pixel */
+"    28    28       23            1",
+/* colors */
+". c #000000",
+"# c #000080",
+"a c #0000f8",
+"b c #003438",
+"c c #008000",
+"d c #008080",
+"e c #00fc00",
+"f c #202020",
+"g c #303060",
+"h c #4098a0",
+"i c #6064c8",
+"j c #800000",
+"k c #808000",
+"l c #808080",
+"m c #980060",
+"n c #9898f8",
+"o c #b2b2b2  s backgroundToolBarColor",
+"p c #e8e8e8",
+"q c #f80000",
+"r c #f86430",
+"s c #f864c8",
+"t c #f8fc00",
+"u c #f8fcf8",
+/* pixels */
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooijiiinooooooo",
+"ooooooooooooooiouokkiioooooo",
+"oooooooooooooikkjiiksioooooo",
+"oooooooooooooik.oooik.oooooo",
+"oooooooooooooikjooornjoooooo",
+"oooooooooooooik#ooon..oooooo",
+"oooooiiniiiiijkijooooooooooo",
+"ooooi#n.kkkkin.ji#oooooooooo",
+"ooooiaooouuookki#.oooooooooo",
+"ooooikokkkkkkkii#.oooooooooo",
+"ooooimommmmmmmmi#.oooooooooo",
+"ooooikokkkkkkkki#.oooooooooo",
+"ooooimommmmmmmji#.lllllooooo",
+"ooooikokkkkkkkki#.iiillooooo",
+"ooooimommmmmmjjj#.lilooooooo",
+"ooooikkkkkkkkkki#.lloooooooo",
+"oooooiijjjjj.....ooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo"
+};
diff --git a/etc/icons/encrypt.xpm b/etc/icons/encrypt.xpm
new file mode 100644 (file)
index 0000000..3a2beff
--- /dev/null
@@ -0,0 +1,54 @@
+/* XPM */
+static char *encrypt[] = {
+/* width height num_colors chars_per_pixel */
+"    28    28       19            1",
+/* colors */
+". c #000000",
+"# c #000080",
+"a c #003438",
+"b c #008000",
+"c c #008080",
+"d c #00fc00",
+"e c #202020",
+"f c #303060",
+"g c #4098a0",
+"h c #6064c8",
+"i c #808000",
+"j c #808080",
+"k c #9898f8",
+"l c #c0c0c0  s backgroundToolBarColor",
+"m c #e8e8e8",
+"n c #f86430",
+"s c #f864c8",
+"p c #f8fc00",
+"q c #f8fcf8",
+/* pixels */
+"llllllllllllllllllllllllllll",
+"llllllllllllllllllllllllllll",
+"llllllllllllllllllllllllllll",
+"llllllllllllllllllllllllllll",
+"llllllllllppppppllllllllllll",
+"llllllllpphhhhhpplllllllllll",
+"lllllllpphqqllkhfpllllllllll",
+"lllllllphql###lkhfplllllllll",
+"lllllllphqepll#lheplllllllll",
+"lllllllphlepll#kheplllllllll",
+"llllllpphleppp#kheppllllllll",
+"lllllppehkhjhffkhefpllllllll",
+"lllllphkhffkkkkefhh.plllllll",
+"lllllphklqqqllllkhf.plllllll",
+"lllllphkqhhhhhhhhef.plllllll",
+"lllllphkqlllllllkhf.plllllll",
+"lllllphkqhhhhhhhhff.plllllll",
+"lllllphkqlllllllkhf.plllllll",
+"lllllphkqhhhhhhhhef.jjjjjlll",
+"lllllphkqlllllllkhf.phhjllll",
+"lllllphkhhhhhhhhhf#.jpllllll",
+"lllllpph#fffffefe..pppllllll",
+"llllllppppppppppppplllllllll",
+"llllllllllllllllllllllllllll",
+"llllllllllllllllllllllllllll",
+"llllllllllllllllllllllllllll",
+"llllllllllllllllllllllllllll",
+"llllllllllllllllllllllllllll"
+};
diff --git a/etc/icons/forward.xpm b/etc/icons/forward.xpm
new file mode 100644 (file)
index 0000000..6f49a34
--- /dev/null
@@ -0,0 +1,58 @@
+/* XPM */
+static char *forward[] = {
+/* width height num_colors chars_per_pixel */
+"    28    28       23            1",
+/* colors */
+". c #000000",
+"# c #000080",
+"a c #0000f8",
+"b c #003438",
+"c c #008000",
+"d c #008080",
+"e c #00fc00",
+"f c #202020",
+"g c #303060",
+"h c #4098a0",
+"i c #6064c8",
+"j c #800000",
+"k c #808000",
+"l c #808080",
+"m c #980060",
+"n c #9898f8",
+"o c #b2b2b2  s backgroundToolBarColor",
+"p c #e8e8e8",
+"q c #f80000",
+"r c #f86430",
+"s c #f864c8",
+"t c #f8fc00",
+"u c #f8fcf8",
+/* pixels */
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"ooooooooedhooooooooooooooooo",
+"ooooooooeechoooooooooooooooo",
+"oooooooohuochooooooooooooooo",
+"oooooooohoeochoooooooooooooo",
+"oooooooohuoeochooooooooooooo",
+"oooooooohoeoeochoooooooooooo",
+"ooooeeeeeuoeoeoccooooooooooo",
+"oooohououoeoeoeodcoooooooooo",
+"oooohueeoeoeoeoeodcooooooooo",
+"oooohoeoeoeoeoeoeodcoooooooo",
+"oooohueeoeoeoeoeoecdoooooooo",
+"oooohodddddddddddbbdoooooooo",
+"oooohuchchccccccbbdooooooooo",
+"ooooeohchccccccbbdoooooooooo",
+"ooooeechchccccbbdooooooooooo",
+"oooocbbbbhcccbbdlllllllooooo",
+"oooooooochccbgdllllllloooooo",
+"ooooolllchcbgdlllllooooooooo",
+"oooooollccbgdllloooooooooooo",
+"ooooooollbgdoooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo"
+};
diff --git a/etc/icons/home.xpm b/etc/icons/home.xpm
new file mode 100644 (file)
index 0000000..74d75ad
--- /dev/null
@@ -0,0 +1,58 @@
+/* XPM */
+static char *home[] = {
+/* width height num_colors chars_per_pixel */
+"    28    28       23            1",
+/* colors */
+". c #000000",
+"# c #000080",
+"a c #0000f8",
+"b c #003438",
+"c c #008000",
+"d c #008080",
+"e c #00fc00",
+"f c #202020",
+"g c #303060",
+"h c #4098a0",
+"i c #6064c8",
+"j c #800000",
+"k c #808000",
+"l c #808080",
+"m c #980060",
+"n c #9898f8",
+"o c #b2b2b2  s backgroundToolBarColor",
+"p c #e8e8e8",
+"q c #f80000",
+"r c #f86430",
+"s c #f864c8",
+"t c #f8fc00",
+"u c #f8fcf8",
+/* pixels */
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"ooooooooooooooooungioooooooo",
+"ooooooooooonnnnnungioooooooo",
+"oooooooooooiiiiiongioooooooo",
+"ooooooooooiuiiiiongioooooooo",
+"oooooooooifguiiiongioooooooo",
+"ooooooooifinguiiinggoooooooo",
+"oooooooifinoniuiiigigooooooo",
+"ooooooifinononioiiigiioooooo",
+"oooooiginonononioiiiigiooooo",
+"ooooiginonononongoiiiiiioooo",
+"oooigfnononononongnffgggoooo",
+"oooooiononiigsononibbgiooooo",
+"oooooononoiiilnonoifggoooooo",
+"ooooooononiiilononiggioooooo",
+"oooooononoiiisnonoigiioooooo",
+"ooooooononiigsononiinioooooo",
+"oooooononoigglnonoiniioooooo",
+"oooohhononggglononinlhoooooo",
+"oollchnhnonkkrkkilhllhlooooo",
+"oollchclllkkrkllhhhchhhhhooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo"
+};
diff --git a/etc/icons/icons.gif b/etc/icons/icons.gif
new file mode 100644 (file)
index 0000000..df01fab
--- /dev/null
@@ -0,0 +1,59 @@
+/* XPM */
+static char *icons[] = {
+/* width height num_colors chars_per_pixel */
+"   454    29       23            1",
+/* colors */
+". c #000000",
+"# c #000080",
+"a c #0000f8",
+"b c #003438",
+"c c #008000",
+"d c #008080",
+"e c #00fc00",
+"f c #202020",
+"g c #303060",
+"h c #4098a0",
+"i c #6064c8",
+"j c #800000",
+"k c #808000",
+"l c #808080",
+"m c #980060",
+"n c #9898f8",
+"o c #c0c0c0",
+"p c #e8e8e8",
+"q c #f80000",
+"r c #f86430",
+"s c #f864c8",
+"t c #f8fc00",
+"u c #f8fcf8",
+/* pixels */
+"pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp",
+"pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"poooooooooooooooooooooooooelooooooooooooooooooooooooooooooooooooooooooedhooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooiiiiiiiiiiilooooooooooooooooooo",
+"pooooooooooooooooooooooooeudooogggggooooooooooooooooooooooooooooooooooeechoooooogggggooooooooooooooooooooooooooooooooooiiiiiiiigoooooooooooooooooooooooooooooooooooooooooooooooooooungiooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooniiigoooooogggggooooooooooooooooooooooooooooooooooooouuuuuuuuuloooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooonllnlnlnlnligooooooooooooooooooo",
+"poooooooooooooooooooooooeuoclooogggooooooooooooooooooooooooooooooooooohuochoooooogggooooooooooooooooooooooooooooooooooiuininiif#ggoooooooooooooooooooooooooooooooooooooooooooonnnnnungiooooooooooooooooooooooooooooooooooooooooooouououoooooooooooooooooooooooooooooooooooooonuoigooooooogggoooooooooooooooooooooooooooooooooooooouuuouououloooooooooooooooooooooooooooooooooooooooooooooooijiiinooooooooooooooooooooooooooooooooooogninnlg.glolol...goooooooooooooooo",
+"pooooooooooooooooooooooeuoecboooogoooooooooooooooooooooooooooooooooooohoeochoooooogooooooooooooooooooooooooooooooooooiunnnnnifff#ggoooooooooooooooooooooooooooooooooooooooooooiiiiiongioooooooooooooooooooooooooooooooooooooooooouououououooooooooooooooooooooooooooooooooooonogigoooooooogooooooooooooooooooooooooooooooooooooooouuuuououulooooooooooooooooooooooooooooooooooooooooooooooiouokkiioooooooooooooooooooooooooooooooooogoioljjjj.lnogli.goooooooooooooooo",
+"poooooooooooooooooooooeuoeocbloooooooooooooooooooooooooooooooooooooooohuoeochooooooooooooooooooooooooooooooooooooiuoooononononnniffgoooooooooooooooooooooooooooooooooooooooooiuiiiiongiooooooooooooooooooooooooooooooooooooooooououuuuuuuouooooooooooooooooooooooooooooooooonoggi.oooooooooooooooooooooooooooooooooooooooooooooooouuuuuuuuuloooooooooooooooooooooooooooooooooooooooooooooikkjiiksiooooooooooooooooooooooooooooooooooogiojjqjjg.loli.j.oooooooooooooooo",
+"pooooooooooooooooooooeuoeoecfdoooooooooooooooooooooooooooooooooooooooohoeoeochooooooooooooooooooooooooooooooooooooiuoonononononfffggooooooooooooooooooooooooooooooooooooooooifguiiiongioooooooooooooooooooooooooooooooooooooooououuuuuuuottoooooooooooooooooooooooooooooooonogggi.oooooooooooooooooooooooooooooooooooooooooooooooouuuuuuuuulggingooooooooooooooooooooooooooooooooooooooooik.oooik.ooooooooooooooooooooooooooooooooooogiooqqqjg.noiojjooooooooooooooooo",
+"poooooooooooooooooooeuoeoeocffloooooooooooooooooooooooooooooooooooeeeeeuoeoeoccooooooooooooooooooooooooooooooooooooiuoononononfg##ggoooooooooooooooooooooooooooooooooooooooifinguiiinggooooooooooooooooooooooooooooooooooooooooouuuutuuuttouoooooooooooooooooooooooooooooonogiggi.oooooooooooooooooooooooooooooooooooooooooooooooouoooooooolgingoooooooooooooooooooooooooooooooooooooooooikjooornjooooooooooooooooooooooooooooooooooooioooqqjg.lolgjjooooooooooooooooo",
+"pooooooooooooooooooeuoeoeoeoeobooooooooooooooooooooooooooooooooooohououoeoeoeodcooooooooooooooooooooooooooooooooooooiuooooooifg###ggooooooooooooooooooooooooooooooooooooooifinoniuiiigigooooooooooooooooooooooooooooooooooooooouooootttutouoooooooooooooooooooooooooooooonoiigggi.ooooooooooooooooooooooooooooooooooooooooooooooooououououlgingooooooooooooooooooooooooooooooooooooooooooik#ooon..ooooooooooooooooooooooooooooooooooooionoqjf.fnoigojooooooooooooooooo",
+"poooooooooooooooooeuoeoeoeoeoedboooooooooooooooooooooooooooooooooohueeoeoeoeoeodcooooooooooooooooooooooooooooooooooooiuooooifg####ggoooooooooooooooooooooooooooooooooooooifinononioiiigiiooooooooooooooooooooooooooooooooooooooniiiintttuuouoooooooooooooooooooooooooooonunigig.igggiiiiiiiooooooooooooooooooooooooooooooooooooonououououoliggoooooooooooooooooooooooooooooooooooiiniiiiijkijoooooooooooooooooooooooooooooooooooooooglionnffffilogggggoooooooooooooooo",
+"poooooooooooooooohuoeoeoeoeoeoffoooooooooooooooooooooooooooooooooohoeoeoeoeoeoeodcooooooooooooooooooooooooooooooooooooiuooifgi####ggooooooooooooooooooooooooooooooooooooiginonononioiiiigioooooooooooooooooooooooooooooooooooooinoiifntuuuuooooooooooooooooooooooooooooonuniigg.noooooooooogooooooooooooooooooooooooooooooooooiinnniiiiiiiiiiggiooooooooooooooooooooooooooooooooi#n.kkkkin.ji#oooooooooooooooooooooooooooooooooooooognion....ignoili.goooooooooooooooo",
+"poooooooooooooooohueoeoeoeoeoeffoooooooooooooooooooooooooooooooooohueeoeoeoeoeoecdoooooooooooooooooooooooooooooooooooooiuifgoi####ggoooooooooooooooooooooooooooooooooooiginonononongoiiiiiioooooooooooooooooooooooooooooooooooinoniigfotutouoooooooooooooooooooooooooooonunigi.iinnnnnnnnnnogooooooooooooooooooooooooooooooooiuuoouonniiinniggiiooooooooooooooooooooooooooooooooiaooouuookki#.ooooooooooooooooooooooooooooooooooooooogiolggiiggloli.ggoooooooooooooooo",
+"pooooooooooooooooocdddddddddddfboooooooooooooooooooooooooooooooooohodddddddddddbbdoooooooooooooooooooooooooooooooooooooogggooi###fggooooooooooooooooooooooooooooooooooigfnononononongnffgggooooooooooooooooooooooooooooooooggofiiiggigoutuuooooooooooooooooooooooooooooonuiii.niinnnnnnnnnnngooooooooooooooooooooooooooooooooiooooouuuuoniiggigiooooooooooooooooooooooooooooooooikokkkkkkkii#.ooooooooooooooooooooooooooooooooooooooooio.llggggnoioggooooooooooooooooo",
+"poooooooooooooooooochcdcdcccccfboooooooooooooooooooooooooooooooooohuchchccccccbbdooooooooooooooooooooooooooooooooooooooooooooi###fggolooooooooooooooooooooooooooooooooooiononiigsononibbgioooooooooooooooooooooooooooooooofoiiooggggigottouoooooooooooooooooooooooooooooigg..ioiinnnnnnnnnnngooooooooooooooooooooooooooooooooionooooooooooogggiiglooooooooooooooooooooooooooooooimommmmmmmmi#.ooooooooooooooooooooooooooooooooooooooooio.llggfllolgggooooooooooooooooo",
+"pooooooooooooooooooochchccccccbdooooooooooooooooooooooooooooooooooeohchccccccbbdooooooooooooooooooooooooooooooooooooooooooooonn#ffggolloooooooooooooooooooooooooooooooooononoiiilnonoifggoooooooooooooooooooooooooooooooooiinoongfgfgiouououoooooooooooooooooooooooooooooooooioiinnnnnnnnnngoooooooooooooooooooooooooooooooooionnnnnnnnnnnngggigfggoooooooooooooooooooooooooooooikokkkkkkkki#.oooooooooooooooooooooooooooooooooooooognionlggggnlolggg.oooooooooooooooo",
+"poooooooooooooooooooochchcccccblooooooooooooooooooooooooooooooooooeechchccccbbdoooooooooooooooooooooooooooooooooooooonnnnnnnnnif#fgglllooooooooooooooooooooooooooooooooooononiiilononiggiooooooooooooooooooooooooooooooooinooniigffgiluououooooooooooooooooooooooooooooooooooioigggggggggggooooooooooooooooooooooooooooooooooionnononononnnggiggfgloooooooooooooooooooooooooooooimommmmmmmji#.lllllooooooooooooooooooooooooooooooooogniol....flnogli.goooooooooooooooo",
+"pooooooooooooooooooooochcccffffooooooooooooooooooooooooooooooooooocbbbbhcccbbdllllllloooooooooooooooooooooooooooooooonnnnnnnnnifffggiiooooooooooooooooooooooooooooooooooononoiiisnonoigiiooooooooooooooooooooooooooooooiiooniiigfillloonlnlnoooooooooooooooooooooooooooooooooioig.oooooooooooooooooooooooooooooooooooooooooooiinononononecnggggfglooooooooooooooooooooooooooooooikokkkkkkkki#.iiillooooooooooooooooooooooooooooooooolgio.ffff.gloii.ggoooooooooooooooo",
+"pooooooooooooooooooolllchccbbbdllllooooooooooooooooooooooooooooooooooochccbgdlllllllooooooooooooooooooooooooooooooooonininininiifgigiloooooooooooooooooooooooooooooooooooononiigsononiinioooooooooooooooooooooooooooooinoniiigfiooooonillllloooooooooooooooooooooooooooooooooioiggligigiiiillooooooooooooooooooooooooooooooooolliiiiiiiiinngggfgloooooooooooooooooooooooooooooooimommmmmmjjj#.liloooooooooooooooooooooooooooooooooooogio.gggfg.noilggooooooooooooooooo",
+"poooooooooooooooooooolllbhcbblllllllooooooooooooooooooooooooooooooolllchcbgdlllllooooooooooooooooooooooooooooooooooooniiiiiiiiiiiigillooooooooooooooooooooooooooooooooooononoigglnonoiniioooooooooooooooooooooooooooooggiiigfiooooniiiiiillnoooooooooooooooooooooooooooooooooioiggigigigilllooooooooooooooooooooooooooooooooooooooolliigggggffglooooooooooooooooooooooooooooooooikkkkkkkkkki#.llooooooooooooooooooooooooooooooooooooooiooggfgf.loigggllloooooooooooooo",
+"poooooooooooooooooooooollbhbbllllllooooooooooooooooooooooooooooooooollccbgdlllooooooooooooooooooooooooooooooooooooooooniiggggg#gggilloooooooooooooooooooooooooooooooooohhononggglononinlhoooooooooooooooooooooooooooooiggigillonliiillnooooooooooooooooooooooooooooooooooooooioiggliloooooooooooooooooooooooooooooooooooooooooooooooooooolgfgooooooooooooooooooooooooooooooooooooiijjjjj.....oooooooooooooooooooooooooooooooooooooooooinnnfffglnlifllllooooooooooooooo",
+"pooooooooooooooooooooooollbbllllooooooooooooooooooooooooooooooooooooollbgdooooooooooooooooooooooooooooooooooooooooooooooolllllllllllooooooooooooooooooooooooooooooooollchnhnonkkrkkilhllhloooooooooooooooooooooooooooonfgflllllllnoooooooooooooooooooooooooooooooooooooooooooioigllooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogggiiiiigi.llloooooooooooooooo",
+"poooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooollchclllkkrkllhhhchhhhhoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo"
+};
diff --git a/etc/icons/icons.xpm b/etc/icons/icons.xpm
new file mode 100644 (file)
index 0000000..df01fab
--- /dev/null
@@ -0,0 +1,59 @@
+/* XPM */
+static char *icons[] = {
+/* width height num_colors chars_per_pixel */
+"   454    29       23            1",
+/* colors */
+". c #000000",
+"# c #000080",
+"a c #0000f8",
+"b c #003438",
+"c c #008000",
+"d c #008080",
+"e c #00fc00",
+"f c #202020",
+"g c #303060",
+"h c #4098a0",
+"i c #6064c8",
+"j c #800000",
+"k c #808000",
+"l c #808080",
+"m c #980060",
+"n c #9898f8",
+"o c #c0c0c0",
+"p c #e8e8e8",
+"q c #f80000",
+"r c #f86430",
+"s c #f864c8",
+"t c #f8fc00",
+"u c #f8fcf8",
+/* pixels */
+"pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp",
+"pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"poooooooooooooooooooooooooelooooooooooooooooooooooooooooooooooooooooooedhooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooiiiiiiiiiiilooooooooooooooooooo",
+"pooooooooooooooooooooooooeudooogggggooooooooooooooooooooooooooooooooooeechoooooogggggooooooooooooooooooooooooooooooooooiiiiiiiigoooooooooooooooooooooooooooooooooooooooooooooooooooungiooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooniiigoooooogggggooooooooooooooooooooooooooooooooooooouuuuuuuuuloooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooonllnlnlnlnligooooooooooooooooooo",
+"poooooooooooooooooooooooeuoclooogggooooooooooooooooooooooooooooooooooohuochoooooogggooooooooooooooooooooooooooooooooooiuininiif#ggoooooooooooooooooooooooooooooooooooooooooooonnnnnungiooooooooooooooooooooooooooooooooooooooooooouououoooooooooooooooooooooooooooooooooooooonuoigooooooogggoooooooooooooooooooooooooooooooooooooouuuouououloooooooooooooooooooooooooooooooooooooooooooooooijiiinooooooooooooooooooooooooooooooooooogninnlg.glolol...goooooooooooooooo",
+"pooooooooooooooooooooooeuoecboooogoooooooooooooooooooooooooooooooooooohoeochoooooogooooooooooooooooooooooooooooooooooiunnnnnifff#ggoooooooooooooooooooooooooooooooooooooooooooiiiiiongioooooooooooooooooooooooooooooooooooooooooouououououooooooooooooooooooooooooooooooooooonogigoooooooogooooooooooooooooooooooooooooooooooooooouuuuououulooooooooooooooooooooooooooooooooooooooooooooooiouokkiioooooooooooooooooooooooooooooooooogoioljjjj.lnogli.goooooooooooooooo",
+"poooooooooooooooooooooeuoeocbloooooooooooooooooooooooooooooooooooooooohuoeochooooooooooooooooooooooooooooooooooooiuoooononononnniffgoooooooooooooooooooooooooooooooooooooooooiuiiiiongiooooooooooooooooooooooooooooooooooooooooououuuuuuuouooooooooooooooooooooooooooooooooonoggi.oooooooooooooooooooooooooooooooooooooooooooooooouuuuuuuuuloooooooooooooooooooooooooooooooooooooooooooooikkjiiksiooooooooooooooooooooooooooooooooooogiojjqjjg.loli.j.oooooooooooooooo",
+"pooooooooooooooooooooeuoeoecfdoooooooooooooooooooooooooooooooooooooooohoeoeochooooooooooooooooooooooooooooooooooooiuoonononononfffggooooooooooooooooooooooooooooooooooooooooifguiiiongioooooooooooooooooooooooooooooooooooooooououuuuuuuottoooooooooooooooooooooooooooooooonogggi.oooooooooooooooooooooooooooooooooooooooooooooooouuuuuuuuulggingooooooooooooooooooooooooooooooooooooooooik.oooik.ooooooooooooooooooooooooooooooooooogiooqqqjg.noiojjooooooooooooooooo",
+"poooooooooooooooooooeuoeoeocffloooooooooooooooooooooooooooooooooooeeeeeuoeoeoccooooooooooooooooooooooooooooooooooooiuoononononfg##ggoooooooooooooooooooooooooooooooooooooooifinguiiinggooooooooooooooooooooooooooooooooooooooooouuuutuuuttouoooooooooooooooooooooooooooooonogiggi.oooooooooooooooooooooooooooooooooooooooooooooooouoooooooolgingoooooooooooooooooooooooooooooooooooooooooikjooornjooooooooooooooooooooooooooooooooooooioooqqjg.lolgjjooooooooooooooooo",
+"pooooooooooooooooooeuoeoeoeoeobooooooooooooooooooooooooooooooooooohououoeoeoeodcooooooooooooooooooooooooooooooooooooiuooooooifg###ggooooooooooooooooooooooooooooooooooooooifinoniuiiigigooooooooooooooooooooooooooooooooooooooouooootttutouoooooooooooooooooooooooooooooonoiigggi.ooooooooooooooooooooooooooooooooooooooooooooooooououououlgingooooooooooooooooooooooooooooooooooooooooooik#ooon..ooooooooooooooooooooooooooooooooooooionoqjf.fnoigojooooooooooooooooo",
+"poooooooooooooooooeuoeoeoeoeoedboooooooooooooooooooooooooooooooooohueeoeoeoeoeodcooooooooooooooooooooooooooooooooooooiuooooifg####ggoooooooooooooooooooooooooooooooooooooifinononioiiigiiooooooooooooooooooooooooooooooooooooooniiiintttuuouoooooooooooooooooooooooooooonunigig.igggiiiiiiiooooooooooooooooooooooooooooooooooooonououououoliggoooooooooooooooooooooooooooooooooooiiniiiiijkijoooooooooooooooooooooooooooooooooooooooglionnffffilogggggoooooooooooooooo",
+"poooooooooooooooohuoeoeoeoeoeoffoooooooooooooooooooooooooooooooooohoeoeoeoeoeoeodcooooooooooooooooooooooooooooooooooooiuooifgi####ggooooooooooooooooooooooooooooooooooooiginonononioiiiigioooooooooooooooooooooooooooooooooooooinoiifntuuuuooooooooooooooooooooooooooooonuniigg.noooooooooogooooooooooooooooooooooooooooooooooiinnniiiiiiiiiiggiooooooooooooooooooooooooooooooooi#n.kkkkin.ji#oooooooooooooooooooooooooooooooooooooognion....ignoili.goooooooooooooooo",
+"poooooooooooooooohueoeoeoeoeoeffoooooooooooooooooooooooooooooooooohueeoeoeoeoeoecdoooooooooooooooooooooooooooooooooooooiuifgoi####ggoooooooooooooooooooooooooooooooooooiginonononongoiiiiiioooooooooooooooooooooooooooooooooooinoniigfotutouoooooooooooooooooooooooooooonunigi.iinnnnnnnnnnogooooooooooooooooooooooooooooooooiuuoouonniiinniggiiooooooooooooooooooooooooooooooooiaooouuookki#.ooooooooooooooooooooooooooooooooooooooogiolggiiggloli.ggoooooooooooooooo",
+"pooooooooooooooooocdddddddddddfboooooooooooooooooooooooooooooooooohodddddddddddbbdoooooooooooooooooooooooooooooooooooooogggooi###fggooooooooooooooooooooooooooooooooooigfnononononongnffgggooooooooooooooooooooooooooooooooggofiiiggigoutuuooooooooooooooooooooooooooooonuiii.niinnnnnnnnnnngooooooooooooooooooooooooooooooooiooooouuuuoniiggigiooooooooooooooooooooooooooooooooikokkkkkkkii#.ooooooooooooooooooooooooooooooooooooooooio.llggggnoioggooooooooooooooooo",
+"poooooooooooooooooochcdcdcccccfboooooooooooooooooooooooooooooooooohuchchccccccbbdooooooooooooooooooooooooooooooooooooooooooooi###fggolooooooooooooooooooooooooooooooooooiononiigsononibbgioooooooooooooooooooooooooooooooofoiiooggggigottouoooooooooooooooooooooooooooooigg..ioiinnnnnnnnnnngooooooooooooooooooooooooooooooooionooooooooooogggiiglooooooooooooooooooooooooooooooimommmmmmmmi#.ooooooooooooooooooooooooooooooooooooooooio.llggfllolgggooooooooooooooooo",
+"pooooooooooooooooooochchccccccbdooooooooooooooooooooooooooooooooooeohchccccccbbdooooooooooooooooooooooooooooooooooooooooooooonn#ffggolloooooooooooooooooooooooooooooooooononoiiilnonoifggoooooooooooooooooooooooooooooooooiinoongfgfgiouououoooooooooooooooooooooooooooooooooioiinnnnnnnnnngoooooooooooooooooooooooooooooooooionnnnnnnnnnnngggigfggoooooooooooooooooooooooooooooikokkkkkkkki#.oooooooooooooooooooooooooooooooooooooognionlggggnlolggg.oooooooooooooooo",
+"poooooooooooooooooooochchcccccblooooooooooooooooooooooooooooooooooeechchccccbbdoooooooooooooooooooooooooooooooooooooonnnnnnnnnif#fgglllooooooooooooooooooooooooooooooooooononiiilononiggiooooooooooooooooooooooooooooooooinooniigffgiluououooooooooooooooooooooooooooooooooooioigggggggggggooooooooooooooooooooooooooooooooooionnononononnnggiggfgloooooooooooooooooooooooooooooimommmmmmmji#.lllllooooooooooooooooooooooooooooooooogniol....flnogli.goooooooooooooooo",
+"pooooooooooooooooooooochcccffffooooooooooooooooooooooooooooooooooocbbbbhcccbbdllllllloooooooooooooooooooooooooooooooonnnnnnnnnifffggiiooooooooooooooooooooooooooooooooooononoiiisnonoigiiooooooooooooooooooooooooooooooiiooniiigfillloonlnlnoooooooooooooooooooooooooooooooooioig.oooooooooooooooooooooooooooooooooooooooooooiinononononecnggggfglooooooooooooooooooooooooooooooikokkkkkkkki#.iiillooooooooooooooooooooooooooooooooolgio.ffff.gloii.ggoooooooooooooooo",
+"pooooooooooooooooooolllchccbbbdllllooooooooooooooooooooooooooooooooooochccbgdlllllllooooooooooooooooooooooooooooooooonininininiifgigiloooooooooooooooooooooooooooooooooooononiigsononiinioooooooooooooooooooooooooooooinoniiigfiooooonillllloooooooooooooooooooooooooooooooooioiggligigiiiillooooooooooooooooooooooooooooooooolliiiiiiiiinngggfgloooooooooooooooooooooooooooooooimommmmmmjjj#.liloooooooooooooooooooooooooooooooooooogio.gggfg.noilggooooooooooooooooo",
+"poooooooooooooooooooolllbhcbblllllllooooooooooooooooooooooooooooooolllchcbgdlllllooooooooooooooooooooooooooooooooooooniiiiiiiiiiiigillooooooooooooooooooooooooooooooooooononoigglnonoiniioooooooooooooooooooooooooooooggiiigfiooooniiiiiillnoooooooooooooooooooooooooooooooooioiggigigigilllooooooooooooooooooooooooooooooooooooooolliigggggffglooooooooooooooooooooooooooooooooikkkkkkkkkki#.llooooooooooooooooooooooooooooooooooooooiooggfgf.loigggllloooooooooooooo",
+"poooooooooooooooooooooollbhbbllllllooooooooooooooooooooooooooooooooollccbgdlllooooooooooooooooooooooooooooooooooooooooniiggggg#gggilloooooooooooooooooooooooooooooooooohhononggglononinlhoooooooooooooooooooooooooooooiggigillonliiillnooooooooooooooooooooooooooooooooooooooioiggliloooooooooooooooooooooooooooooooooooooooooooooooooooolgfgooooooooooooooooooooooooooooooooooooiijjjjj.....oooooooooooooooooooooooooooooooooooooooooinnnfffglnlifllllooooooooooooooo",
+"pooooooooooooooooooooooollbbllllooooooooooooooooooooooooooooooooooooollbgdooooooooooooooooooooooooooooooooooooooooooooooolllllllllllooooooooooooooooooooooooooooooooollchnhnonkkrkkilhllhloooooooooooooooooooooooooooonfgflllllllnoooooooooooooooooooooooooooooooooooooooooooioigllooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogggiiiiigi.llloooooooooooooooo",
+"poooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooollchclllkkrkllhhhchhhhhoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo"
+};
diff --git a/etc/icons/key.xpm b/etc/icons/key.xpm
new file mode 100644 (file)
index 0000000..5475976
--- /dev/null
@@ -0,0 +1,29 @@
+/* XPM */
+static char * mini_lock_xpm[] = {
+"22 22 4 1",
+"      c None  s backgroundToolBarColor",
+".     c #82077DF77DF7",
+"X     c #000000000000",
+"o     c #FFFFFFFFFFFF",
+"                      ",
+"                      ",
+"                      ",
+"                      ",
+"        .XXX.         ",
+"        .ooo.X        ",
+"      ..oXXXo..       ",
+"      XoX...XoX       ",
+"      XoX.  XoX.      ",
+"      XoX.  XoX.      ",
+"     XXXXXXXXXXX      ",
+"     X         X.     ",
+"     X ....... X.     ",
+"     X ooooooo X.     ",
+"     X ....... X.     ",
+"     X         X.     ",
+"     XXXXXXXXXXX.     ",
+"      ...........     ",
+"                      ",
+"                      ",
+"                      ",
+"                      "};
diff --git a/etc/icons/liece-pointer.xbm b/etc/icons/liece-pointer.xbm
new file mode 100644 (file)
index 0000000..f31481f
--- /dev/null
@@ -0,0 +1,7 @@
+#define irchat-pointer_width 18
+#define irchat-pointer_height 13
+static unsigned char irchat-pointer_bits[] = {
+   0x00, 0x00, 0xfc, 0x00, 0x70, 0xfc, 0x00, 0x70, 0xfc, 0x00, 0xbc, 0xfc,
+   0x00, 0x3f, 0xfc, 0x00, 0x06, 0xfc, 0x40, 0x03, 0xfc, 0x88, 0x00, 0xfc,
+   0xfc, 0x00, 0xfd, 0xf2, 0x83, 0xfd, 0x94, 0xff, 0xfc, 0x00, 0x3e, 0xfc,
+   0x00, 0x00, 0xfc};
diff --git a/etc/icons/liece-pointer.xpm b/etc/icons/liece-pointer.xpm
new file mode 100644 (file)
index 0000000..9c49a04
--- /dev/null
@@ -0,0 +1,74 @@
+/* XPM */
+static char * irchat_pointer_xpm[] = {
+"18 13 58 1",
+"      c None",
+".     c #943D51",
+"+     c #8F243B",
+"@     c #943E51",
+"#     c #84132C",
+"$     c #6A031A",
+"%     c #99364C",
+"&     c #9B3D52",
+"*     c #8E1731",
+"=     c #72031C",
+"-     c #670319",
+";     c #993E52",
+">     c #AC324D",
+",     c #981632",
+"'     c #81041F",
+")     c #77031D",
+"!     c #82162E",
+"~     c #9A3D51",
+"{     c #951834",
+"]     c #9E3C52",
+"^     c #A73750",
+"/     c #973D51",
+"(     c #A73E55",
+"_     c #AB2B47",
+":     c #9A1130",
+"<     c #8B0422",
+"[     c #8F0F2A",
+"}     c #9F2B44",
+"|     c #89384A",
+"1     c #943F51",
+"2     c #A74056",
+"3     c #A2364E",
+"4     c #88112A",
+"5     c #76031D",
+"6     c #750820",
+"7     c #993248",
+"8     c #923D50",
+"9     c #933F52",
+"0     c #954154",
+"a     c #9F4156",
+"b     c #A04156",
+"c     c #9F4256",
+"d     c #9D3C51",
+"e     c #7E172E",
+"f     c #5F0317",
+"g     c #590316",
+"h     c #70192C",
+"i     c #8C3146",
+"j     c #92394D",
+"k     c #8F394C",
+"l     c #7F3041",
+"m     c #923E51",
+"n     c #983E51",
+"o     c #8E3045",
+"p     c #701D30",
+"q     c #66192A",
+"r     c #772839",
+"s     c #8F3A4D",
+"                  ",
+"            .+@   ",
+"            #$%   ",
+"          &*=-;   ",
+"        >,')!~    ",
+"         {]       ",
+"        ^/        ",
+"       (          ",
+"  _:<[}|        1 ",
+" 2  345678     90 ",
+"  abc defghijklm  ",
+"        nopqrs    ",
+"                  "};
diff --git a/etc/icons/location.xpm b/etc/icons/location.xpm
new file mode 100644 (file)
index 0000000..50ffcf4
--- /dev/null
@@ -0,0 +1,58 @@
+/* XPM */
+static char *location[] = {
+/* width height num_colors chars_per_pixel */
+"    28    28       23            1",
+/* colors */
+". c #000000",
+"# c #000080",
+"a c #0000f8",
+"b c #003438",
+"c c #008000",
+"d c #008080",
+"e c #00fc00",
+"f c #202020",
+"g c #303060",
+"h c #4098a0",
+"i c #6064c8",
+"j c #800000",
+"k c #808000",
+"l c #808080",
+"m c #980060",
+"n c #9898f8",
+"o c #b2b2b2  s backgroundToolBarColor",
+"p c #e8e8e8",
+"q c #f80000",
+"r c #f86430",
+"s c #f864c8",
+"t c #f8fc00",
+"u c #f8fcf8",
+/* pixels */
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooniiigoooooooooooooooo",
+"ooooooonuoigoooooooooooooooo",
+"ooooooonogigoooooooooooooooo",
+"oooooonoggi.oooooooooooooooo",
+"ooooonogggi.oooooooooooooooo",
+"oooonogiggi.oooooooooooooooo",
+"ooonoiigggi.oooooooooooooooo",
+"oonunigig.igggiiiiiiiooooooo",
+"oonuniigg.noooooooooogoooooo",
+"oonunigi.iinnnnnnnnnnogooooo",
+"oonuiii.niinnnnnnnnnnngooooo",
+"ooigg..ioiinnnnnnnnnnngooooo",
+"oooooooioiinnnnnnnnnngoooooo",
+"oooooooioigggggggggggooooooo",
+"oooooooioig.oooooooooooooooo",
+"oooooooioiggligigiiiillooooo",
+"oooooooioiggigigigillloooooo",
+"oooooooioigglilooooooooooooo",
+"oooooooioigllooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo"
+};
diff --git a/etc/icons/naruto.blank.xpm b/etc/icons/naruto.blank.xpm
new file mode 100644 (file)
index 0000000..ac050ae
--- /dev/null
@@ -0,0 +1,25 @@
+/* XPM */
+static char *naruto_blank_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"    16    16        2            1",
+/* colors */
+". c #000000",
+"# c None",
+/* pixels */
+"################",
+"################",
+"################",
+"################",
+"################",
+"################",
+"################",
+"################",
+"################",
+"################",
+"################",
+"################",
+"################",
+"################",
+"################",
+"################"
+};
diff --git a/etc/icons/naruto.gray.xpm b/etc/icons/naruto.gray.xpm
new file mode 100644 (file)
index 0000000..dad9b67
--- /dev/null
@@ -0,0 +1,27 @@
+/* XPM */
+static char *naruto_gray_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"    16    16        4            1",
+/* colors */
+". c None",
+"# c #fffab5",
+"a c #8e8e8e",
+"b c #000000",
+/* pixels */
+".......#####....",
+".......#####....",
+"......#aaaab##..",
+"......#aaaab##..",
+"...####aaaab###.",
+"...####aaaab###.",
+"###aaaaaaaaaaaa#",
+"###aaaaaaaaaaaa#",
+"...####aaaab###.",
+"...####aaaab###.",
+"......#aaaab##..",
+"......#aaaab##..",
+"......#aaaab##..",
+"......#aaaab##..",
+"......#aaaab##..",
+"......#aaaab##.."
+};
diff --git a/etc/icons/naruto.red.xpm b/etc/icons/naruto.red.xpm
new file mode 100644 (file)
index 0000000..870e759
--- /dev/null
@@ -0,0 +1,116 @@
+/* XPM */
+static char * naruto_red_xpm[] = {
+"16 16 97 2",
+"      c None",
+".     c #0F0F0F",
+"+     c #363636",
+"@     c #434343",
+"#     c #232323",
+"$     c #000000",
+"%     c #333333",
+"&     c #EAEAEA",
+"*     c #4A4A4A",
+"=     c #555555",
+"-     c #212121",
+";     c #393939",
+">     c #F6F6F6",
+",     c #FFFFFF",
+"'     c #E7E7E7",
+")     c #F3F3F3",
+"!     c #FFFAFA",
+"~     c #F0EAEA",
+"{     c #D1D1D1",
+"]     c #444444",
+"^     c #7A7A7A",
+"/     c #FFFCFC",
+"(     c #FFC2C2",
+"_     c #FFA3A3",
+":     c #FFAAAA",
+"<     c #FFC6C6",
+"[     c #E4E4E4",
+"}     c #030303",
+"|     c #565656",
+"1     c #E4E2E2",
+"2     c #FFD4D4",
+"3     c #B9B9B9",
+"4     c #0D0D0D",
+"5     c #AEAEAE",
+"6     c #FFC8C8",
+"7     c #FFCDCD",
+"8     c #5E5E5E",
+"9     c #929292",
+"0     c #FDF9F9",
+"a     c #FFA1A1",
+"b     c #FFFEFE",
+"c     c #FFD7D7",
+"d     c #FFCCCC",
+"e     c #FFF8F8",
+"f     c #B5B5B5",
+"g     c #141414",
+"h     c #7E6161",
+"i     c #FFD1D1",
+"j     c #FFB9B9",
+"k     c #FFD3D3",
+"l     c #FFA2A2",
+"m     c #DFDFDF",
+"n     c #818181",
+"o     c #101010",
+"p     c #E2C7C7",
+"q     c #FFBFBF",
+"r     c #FFEAEA",
+"s     c #FFF9F9",
+"t     c #FFCECE",
+"u     c #525252",
+"v     c #ACACAC",
+"w     c #FFFDFD",
+"x     c #FFA0A0",
+"y     c #9E9E9E",
+"z     c #606060",
+"A     c #FFE0E0",
+"B     c #FFA7A7",
+"C     c #FFF3F3",
+"D     c #FFDADA",
+"E     c #FEFEFE",
+"F     c #323232",
+"G     c #020202",
+"H     c #282828",
+"I     c #656565",
+"J     c #FFE9E9",
+"K     c #FFC3C3",
+"L     c #FFF7F7",
+"M     c #ABABAB",
+"N     c #1F1F1F",
+"O     c #898989",
+"P     c #383838",
+"Q     c #999999",
+"R     c #B3B3B3",
+"S     c #040404",
+"T     c #2B2B2B",
+"U     c #FBFBFB",
+"V     c #7B7B7B",
+"W     c #070707",
+"X     c #CDCDCD",
+"Y     c #DDDDDD",
+"Z     c #0C0C0C",
+"`     c #191919",
+" .    c #C7C7C7",
+"..    c #2D2D2D",
+"+.    c #1B1B1B",
+"@.    c #DEDEDE",
+"#.    c #131313",
+"              .                 ",
+"    + @ # $ % & *   # = -       ",
+"    ; > , ' ) ! ~ { , , ]       ",
+"      ^ / ( _ : : < , [ }       ",
+"    | 1 : 2 , , , , , 3 }       ",
+"4 5 , 6 7 , , , , , , , ' 8     ",
+"  9 0 a b , b c d e , , , , f g ",
+"    h ( , , i j k l ! , , m n . ",
+"  o p q , , r s , t i , u       ",
+"  v w x ! , , , , t i , y       ",
+"z , , A B C , w D _ ! , E F     ",
+"G H I , J B _ _ K L , , , M     ",
+"    N , , , > , , , O P Q R S   ",
+"    T , U V W X , Y Z           ",
+"    `  ...    +.@.;             ",
+"      S         #.              "};
diff --git a/etc/icons/pindown.xpm b/etc/icons/pindown.xpm
new file mode 100644 (file)
index 0000000..7f5c4f1
--- /dev/null
@@ -0,0 +1,27 @@
+/* XPM */
+static char *pindown[] = {
+/* width height num_colors chars_per_pixel */
+"    16    16        4            1",
+/* colors */
+". c #000000",
+"# c #c0c0c0",
+"a c #ffffff  s backgroundToolBarColor",
+"b c #808080",
+/* pixels */
+"aaaaaaaaaaaaaaaa",
+"aaaaaaaaaaaaaaaa",
+"aaaaaaaa....aaaa",
+"aaaaaa..#a#a.aaa",
+"aaaa...#a#a#b.aa",
+"aaaa.a.a#a#ab.aa",
+"aaa.a#.#a#ab..aa",
+"aaa.#a.b#abb..aa",
+"aaa.b#b......aaa",
+"aaa.bbbbb....aaa",
+"aaaa.bbb....baaa",
+"aaaa.......baaaa",
+"aaa.bb...bbaaaaa",
+"aaaaaaaaaaaaaaaa",
+"aaaaaaaaaaaaaaaa",
+"aaaaaaaaaaaaaaaa"
+};
diff --git a/etc/icons/print.xpm b/etc/icons/print.xpm
new file mode 100644 (file)
index 0000000..14dfae6
--- /dev/null
@@ -0,0 +1,58 @@
+/* XPM */
+static char *print[] = {
+/* width height num_colors chars_per_pixel */
+"    28    28       23            1",
+/* colors */
+". c #000000",
+"# c #000080",
+"a c #0000f8",
+"b c #003438",
+"c c #008000",
+"d c #008080",
+"e c #00fc00",
+"f c #202020",
+"g c #303060",
+"h c #4098a0",
+"i c #6064c8",
+"j c #800000",
+"k c #808000",
+"l c #808080",
+"m c #980060",
+"n c #9898f8",
+"o c #b2b2b2  s backgroundToolBarColor",
+"p c #e8e8e8",
+"q c #f80000",
+"r c #f86430",
+"s c #f864c8",
+"t c #f8fc00",
+"u c #f8fcf8",
+/* pixels */
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"ooooooooouuuuuuuuulooooooooo",
+"ooooooooouuuouououlooooooooo",
+"ooooooooouuuuououulooooooooo",
+"ooooooooouuuuuuuuulooooooooo",
+"ooooooooouuuuuuuuulggingoooo",
+"ooooooooouoooooooolgingooooo",
+"oooooooooououououlgingoooooo",
+"ooooooonououououoliggooooooo",
+"oooooiinnniiiiiiiiiiggiooooo",
+"ooooiuuoouonniiinniggiiooooo",
+"ooooiooooouuuuoniiggigiooooo",
+"ooooionooooooooooogggiiglooo",
+"ooooionnnnnnnnnnnngggigfggoo",
+"ooooionnononononnnggiggfgloo",
+"ooooiinononononecnggggfglooo",
+"ooooolliiiiiiiiinngggfgloooo",
+"oooooooooolliigggggffglooooo",
+"oooooooooooooooolgfgoooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo"
+};
diff --git a/etc/icons/reload.xpm b/etc/icons/reload.xpm
new file mode 100644 (file)
index 0000000..5cc5d9b
--- /dev/null
@@ -0,0 +1,58 @@
+/* XPM */
+static char *reload[] = {
+/* width height num_colors chars_per_pixel */
+"    28    28       23            1",
+/* colors */
+". c #000000",
+"# c #000080",
+"a c #0000f8",
+"b c #003438",
+"c c #008000",
+"d c #008080",
+"e c #00fc00",
+"f c #202020",
+"g c #303060",
+"h c #4098a0",
+"i c #6064c8",
+"j c #800000",
+"k c #808000",
+"l c #808080",
+"m c #980060",
+"n c #9898f8",
+"o c #b2b2b2  s backgroundToolBarColor",
+"p c #e8e8e8",
+"q c #f80000",
+"r c #f86430",
+"s c #f864c8",
+"t c #f8fc00",
+"u c #f8fcf8",
+/* pixels */
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"ooooooooiiiiiiiigooooooooooo",
+"oooooooiuininiif#ggooooooooo",
+"ooooooiunnnnnifff#ggoooooooo",
+"ooiuoooononononnniffgooooooo",
+"oooiuoonononononfffggooooooo",
+"ooooiuoononononfg##ggooooooo",
+"oooooiuooooooifg###ggooooooo",
+"ooooooiuooooifg####ggooooooo",
+"oooooooiuooifgi####ggooooooo",
+"ooooooooiuifgoi####ggooooooo",
+"ooooooooogggooi###fggooooooo",
+"ooooooooooooooi###fggolooooo",
+"oooooooooooooonn#ffggolloooo",
+"oooooonnnnnnnnnif#fggllloooo",
+"oooooonnnnnnnnnifffggiiooooo",
+"oooooonininininiifgigilooooo",
+"ooooooniiiiiiiiiiiigillooooo",
+"oooooooniiggggg#gggilloooooo",
+"oooooooooolllllllllllooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo"
+};
diff --git a/etc/icons/search.xpm b/etc/icons/search.xpm
new file mode 100644 (file)
index 0000000..813b425
--- /dev/null
@@ -0,0 +1,58 @@
+/* XPM */
+static char *search[] = {
+/* width height num_colors chars_per_pixel */
+"    28    28       23            1",
+/* colors */
+". c #000000",
+"# c #000080",
+"a c #0000f8",
+"b c #003438",
+"c c #008000",
+"d c #008080",
+"e c #00fc00",
+"f c #202020",
+"g c #303060",
+"h c #4098a0",
+"i c #6064c8",
+"j c #800000",
+"k c #808000",
+"l c #808080",
+"m c #980060",
+"n c #9898f8",
+"o c #b2b2b2  s backgroundToolBarColor",
+"p c #e8e8e8",
+"q c #f80000",
+"r c #f86430",
+"s c #f864c8",
+"t c #f8fc00",
+"u c #f8fcf8",
+/* pixels */
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"ooooooooooooooouououoooooooo",
+"oooooooooooooouououououooooo",
+"ooooooooooooououuuuuuuouoooo",
+"oooooooooooououuuuuuuottoooo",
+"ooooooooooooouuuutuuuttouooo",
+"oooooooooooouooootttutouoooo",
+"ooooooooooooniiiintttuuouooo",
+"ooooooooooooinoiifntuuuuoooo",
+"oooooooooooinoniigfotutouooo",
+"ooooooooggofiiiggigoutuuoooo",
+"ooooooofoiiooggggigottouoooo",
+"oooooooiinoongfgfgiouououooo",
+"ooooooinooniigffgiluououoooo",
+"ooooiiooniiigfillloonlnlnooo",
+"oooinoniiigfiooooonilllllooo",
+"oooggiiigfiooooniiiiiillnooo",
+"oooiggigillonliiillnoooooooo",
+"ooonfgflllllllnooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo"
+};
diff --git a/etc/icons/stop.xpm b/etc/icons/stop.xpm
new file mode 100644 (file)
index 0000000..7219d7e
--- /dev/null
@@ -0,0 +1,58 @@
+/* XPM */
+static char *stop[] = {
+/* width height num_colors chars_per_pixel */
+"    28    28       23            1",
+/* colors */
+". c #000000",
+"# c #000080",
+"a c #0000f8",
+"b c #003438",
+"c c #008000",
+"d c #008080",
+"e c #00fc00",
+"f c #202020",
+"g c #303060",
+"h c #4098a0",
+"i c #6064c8",
+"j c #800000",
+"k c #808000",
+"l c #808080",
+"m c #980060",
+"n c #9898f8",
+"o c #b2b2b2  s backgroundToolBarColor",
+"p c #e8e8e8",
+"q c #f80000",
+"r c #f86430",
+"s c #f864c8",
+"t c #f8fc00",
+"u c #f8fcf8",
+/* pixels */
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"ooooooooiiiiiiiiiiiloooooooo",
+"ooooooonllnlnlnlnligoooooooo",
+"ooooogninnlg.glolol...gooooo",
+"ooooogoioljjjj.lnogli.gooooo",
+"oooooogiojjqjjg.loli.j.ooooo",
+"oooooogiooqqqjg.noiojjoooooo",
+"oooooooioooqqjg.lolgjjoooooo",
+"oooooooionoqjf.fnoigojoooooo",
+"oooooglionnffffilogggggooooo",
+"ooooognion....ignoili.gooooo",
+"oooooogiolggiiggloli.ggooooo",
+"oooooooio.llggggnoioggoooooo",
+"oooooooio.llggfllolgggoooooo",
+"ooooognionlggggnlolggg.ooooo",
+"ooooogniol....flnogli.gooooo",
+"ooooolgio.ffff.gloii.ggooooo",
+"oooooogio.gggfg.noilggoooooo",
+"oooooooiooggfgf.loiggglllooo",
+"oooooooinnnfffglnliflllloooo",
+"ooooooooogggiiiiigi.lllooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooo"
+};
diff --git a/etc/po/ja.po b/etc/po/ja.po
new file mode 100644 (file)
index 0000000..5599d75
--- /dev/null
@@ -0,0 +1,415 @@
+# Copyright (C) 1998 Free Software Foundation, Inc.
+# Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>, 1998.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Liece 1.2.8\n"
+"PO-Revision-Date: 1998-12-30 18:09 +0900\n"
+"Last-Translator: Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>\n"
+"Language-Team: Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=euc-japan\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "IRC error: %s"
+msgstr "IRC ¥¨¥é¡¼: %s"
+
+msgid "%s is now known as %s\n"
+msgstr "%s ¤Ï %s ¤Ë¥Ë¥Ã¥¯¤òÊѹ¹¤·¤Þ¤·¤¿\n"
+
+msgid "IRCHAT: A private message has arrived from %s"
+msgstr "IRCHAT: %s ¤«¤é¥×¥é¥¤¥Ù¡¼¥È¥á¥Ã¥»¡¼¥¸¤¬ÅþÃ夷¤Þ¤·¤¿"
+
+msgid " (has|have) left IRC%s" 
+msgstr " ¤Ï IRC ¤«¤éÎ¥¤ì¤Þ¤·¤¿ %s"
+
+msgid "%s has left IRC%s\n"
+msgstr "%s ¤Ï IRC ¤«¤éÎ¥¤ì¤Þ¤·¤¿ %s\n"
+
+msgid ", %s have left IRC%s"
+msgstr "¡¢%s ¤Ï IRC ¤«¤éÎ¥¤ì¤Þ¤·¤¿ %s"
+
+msgid "New topic on channel %s set by %s: %s\n" 
+msgstr "¥Á¥ã¥ó¥Í¥ë %s ¤Ë %s ¤Ë¤è¤ê¿·¤·¤¤¥È¥Ô¥Ã¥¯¤¬ÀßÄꤵ¤ì¤Þ¤·¤¿: %s\n"
+
+msgid "^%s%sNew mode for %s set by %s: " 
+msgstr "^%s%s %s ¤Ë %s ¤Ë¤è¤ê¿·¤·¤¤¥â¡¼¥É¤¬ÀßÄꤵ¤ì¤Þ¤·¤¿: "
+
+msgid "New mode for %s set by %s: %s\n"
+msgstr "%s ¤Ë %s ¤Ë¤è¤ê¿·¤·¤¤¥â¡¼¥É¤¬ÀßÄꤵ¤ì¤Þ¤·¤¿: %s\n"
+
+msgid "You were kicked off channel %s by %s (%s).\n"
+msgstr "¤¢¤Ê¤¿¤Ï¥Á¥ã¥ó¥Í¥ë %s ¤«¤é %s ¤Ë¤è¤ê½³¤ê½Ð¤µ¤ì¤Þ¤·¤¿: (%s)\n"
+
+msgid "%s has come back as (%s)\n"
+msgstr "%s ¤Ï (%s) ¤È¤·¤Æµ¢¤Ã¤ÆÍè¤Þ¤·¤¿\n"
+
+msgid " (has|have) joined channel %s"
+msgstr " ¤¬ ¥Á¥ã¥ó¥Í¥ë %s ¤Ë»²²Ã¤·¤Þ¤·¤¿"
+
+msgid "%s (%s) has joined channel %s\n"
+msgstr "%s (%s) ¤¬¥Á¥ã¥ó¥Í¥ë %s ¤Ë»²²Ã¤·¤Þ¤·¤¿\n"
+
+msgid ", %s (%s) have joined channel %s"
+msgstr "¡¢%s (%s) ¤¬¥Á¥ã¥ó¥Í¥ë %s ¤Ë»²²Ã¤·¤Þ¤·¤¿"
+
+msgid " (has|have) left channel %s"
+msgstr " ¤Ï ¥Á¥ã¥ó¥Í¥ë %s ¤«¤éÎ¥¤ì¤Þ¤·¤¿"
+
+msgid "%s has left channel %s\n"
+msgstr "%s ¤Ï ¥Á¥ã¥ó¥Í¥ë %s ¤«¤éÎ¥¤ì¤Þ¤·¤¿\n"
+
+msgid ", %s have left channel %s"
+msgstr "¡¢%s ¤Ï ¥Á¥ã¥ó¥Í¥ë %s ¤«¤éÎ¥¤ì¤Þ¤·¤¿"
+
+msgid "%s is now known as %s\n"
+msgstr "%s ¤Ï %s ¤Ë¥Ë¥Ã¥¯¤òÊѹ¹¤·¤Þ¤·¤¿\n"
+
+msgid " \\(has\\|have\\) left IRC%s" 
+msgstr " ¤Ï IRC ¤«¤éÎ¥¤ì¤Þ¤·¤¿ %s"
+
+msgid "%s has left IRC%s\n"
+msgstr "%s ¤Ï IRC ¤«¤éÎ¥¤ì¤Þ¤·¤¿ %s\n"
+
+msgid "%s%s has left IRC%s\n"
+msgstr "%s%s ¤Ï IRC ¤«¤éÎ¥¤ì¤Þ¤·¤¿ %s\n"
+
+msgid "New topic on channel %s set by %s: %s\n"
+msgstr "¥Á¥ã¥ó¥Í¥ë %s ¤Ë %s ¤Ë¤è¤ê¿·¤·¤¤¥È¥Ô¥Ã¥¯¤¬ÀßÄꤵ¤ì¤Þ¤·¤¿: %s\n"
+
+msgid "New mode for %s set by %s: %s\n"
+msgstr "¥Á¥ã¥ó¥Í¥ë %s ¤Ë %s ¤Ë¤è¤ê¿·¤·¤¤¥â¡¼¥É¤¬ÀßÄꤵ¤ì¤Þ¤·¤¿: %s\n"
+
+msgid "%sNew mode for %s set by %s: %s\n"
+msgstr "%s¥Á¥ã¥ó¥Í¥ë %s ¤Ë %s ¤Ë¤è¤ê¿·¤·¤¤¥â¡¼¥É¤¬ÀßÄꤵ¤ì¤Þ¤·¤¿: %s\n"
+
+msgid "You were kicked off channel %s by %s (%s).\n"
+msgstr "¤¢¤Ê¤¿¤Ï¥Á¥ã¥ó¥Í¥ë %s ¤«¤é %s ¤Ë¤è¤ê½³¤ê½Ð¤µ¤ì¤Þ¤·¤¿: (%s)\n"
+
+msgid "%s has come back as (%s)\n"
+msgstr "%s ¤Ï (%s) ¤È¤·¤Æµ¢¤Ã¤ÆÍè¤Þ¤·¤¿\n"
+
+msgid " \\(has\\|have\\) joined channel %s"
+msgstr " ¤¬ ¥Á¥ã¥ó¥Í¥ë %s ¤Ë»²²Ã¤·¤Þ¤·¤¿"
+
+msgid "%s (%s) has joined channel %s\n"
+msgstr "%s (%s) ¤¬¥Á¥ã¥ó¥Í¥ë %s ¤Ë»²²Ã¤·¤Þ¤·¤¿\n"
+
+msgid "%s%s (%s) has joined channel %s\n"
+msgstr "%s%s (%s) ¤¬¥Á¥ã¥ó¥Í¥ë %s ¤Ë»²²Ã¤·¤Þ¤·¤¿\n"
+
+msgid " \\(has\\|have\\) left channel %s"
+msgstr " ¤Ï ¥Á¥ã¥ó¥Í¥ë %s ¤«¤éÎ¥¤ì¤Þ¤·¤¿"
+
+msgid "%s has left channel %s\n"
+msgstr "%s ¤Ï ¥Á¥ã¥ó¥Í¥ë %s ¤«¤éÎ¥¤ì¤Þ¤·¤¿\n"
+
+msgid "%s%s has left channel %s\n"
+msgstr "%s%s ¤Ï ¥Á¥ã¥ó¥Í¥ë %s ¤«¤éÎ¥¤ì¤Þ¤·¤¿\n"
+
+msgid "Quit IRCHAT? "
+msgstr "Liece ¤ò½ªÎ»¤·¤Þ¤¹¤«¡©"
+
+msgid "Start private conversation with: "
+msgstr "²ñÏäò»Ï¤á¤ëÁê¼ê: "
+
+msgid "Join channel: "
+msgstr "»²²Ã¤¹¤ë¥Á¥ã¥ó¥Í¥ë: "
+
+msgid "Key for channel %s: "
+msgstr "¥Á¥ã¥ó¥Í¥ë %s ¤Î¥­¡¼: "
+
+msgid "End private conversation with: "
+msgstr "²ñÏäò½ªÎ»¤¹¤ëÁê¼ê: "
+
+msgid "Part channel: "
+msgstr "Î¥¤ì¤ë¥Á¥ã¥ó¥Í¥ë: "
+
+msgid "Part Message: "
+msgstr "Υæ¥á¥Ã¥»¡¼¥¸: "
+
+msgid "Ignore nickname or regexp: " 
+msgstr "̵»ë¤¹¤ë¥Ë¥Ã¥¯¥Í¡¼¥à¤â¤·¤¯¤ÏÀµµ¬É½¸½: "
+
+msgid "Currently ignoring:"
+msgstr "¸½ºß¤Î̵»ë¥ê¥¹¥È:"
+
+msgid " (%d min)"
+msgstr " (%d ÉÃ)"
+
+msgid " expired"
+msgstr "´ü¸ÂÀÚ¤ì"
+
+msgid "No longer ignoring: %s.\n"
+msgstr "%s ¤ò¤â¤Ï¤ä̵»ë¤·¤Þ¤»¤ó\n"
+
+msgid "Ignoring %s"
+msgstr "%s ¤ò̵»ë¤·¤Æ¤¤¤Þ¤¹"
+
+msgid "To whom: "
+msgstr "ï¤Ë: "
+
+msgid "Send file"
+msgstr "¥Õ¥¡¥¤¥ë¤òÁ÷¿®"
+
+msgid "Receive file"
+msgstr "¥Õ¥¡¥¤¥ë¤ò¼õ¿®"
+
+msgid "Send chat request"
+msgstr "DCC CHATÍ×µá"
+
+msgid "Accept chat request"
+msgstr "DCC CHAT³«»Ï"
+
+msgid "List DCC request"
+msgstr "DCCÍ×µá°ìÍ÷"
+
+msgid "Dispatch stacked DCC requests"
+msgstr "DCCÍ×µá¤ò¾å¤«¤é½ç¤Ë½èÍý"
+
+msgid "Toggle crypt mode"
+msgstr "°Å¹æ²½ on/off"
+
+msgid "Set default key for this channel"
+msgstr "ÈëÌ©¸°¤ÎÀßÄê"
+
+msgid "Add new key to keyring"
+msgstr "ÈëÌ©¸°¤ÎÄɲÃ"
+
+msgid "Remove key from keyring"
+msgstr "ÈëÌ©¸°¤Îºï½ü"
+
+msgid "Toggle private conversation" 
+msgstr "1ÂÐ1ÂÐÏÃ" 
+
+msgid "Start IsON timer"
+msgstr "IsON¥¿¥¤¥Þ³«»Ï"
+
+msgid "Cancel IsON timer"
+msgstr "IsON¥¿¥¤¥Þºï½ü"
+
+msgid "Display userhost"
+msgstr "¥Û¥¹¥È̾¤Îɽ¼¨"
+
+msgid "Ignore nicks / regexp"
+msgstr "¥Ë¥Ã¥¯/Àµµ¬É½¸½¤ò̵»ë"
+
+msgid "Compose mail"
+msgstr "¥á¥¤¥ë¤ÎºîÀ®"
+
+msgid "Join channel"
+msgstr "»²²Ã"
+
+msgid "Part channel"
+msgstr "Υæ"
+
+msgid "Go to next channel"
+msgstr "¼¡¤Î¥Á¥ã¥ó¥Í¥ë"
+
+msgid "Go to previous channel"
+msgstr "Á°¤Î¥Á¥ã¥ó¥Í¥ë"
+
+msgid "Rotate left channels"
+msgstr "¥Á¥ã¥ó¥Í¥ë¥ê¥¹¥È¤òº¸²ó¤ê¤Ë²óž"
+
+msgid "Rotate right channels"
+msgstr "¥Á¥ã¥ó¥Í¥ë¥ê¥¹¥È¤ò±¦²ó¤ê¤Ë²óž"
+
+msgid "Invite to this channel"
+msgstr "¤³¤Î¥Á¥ã¥ó¥Í¥ë¤Ë¾·ÂÔ" 
+
+msgid "Kick out from this channel"
+msgstr "¤³¤Î¥Á¥ã¥ó¥Í¥ë¤«¤é½³¤ê½Ð¤¹" 
+
+msgid "Set mode of this channel"
+msgstr "¥â¡¼¥É¤ÎÀßÄê"
+
+msgid "Set topic of this channel"
+msgstr "¥È¥Ô¥Ã¥¯¤ÎÀßÄê"
+
+msgid "List channel"
+msgstr "¥Á¥ã¥ó¥Í¥ë°ìÍ÷"
+
+msgid "Display names of channel"
+msgstr "¥á¥ó¥Ð¤Îɽ¼¨(¥Ë¥Ã¥¯¤Î¤ß)" 
+
+msgid "Display who are on the channel"
+msgstr "¥á¥ó¥Ð¤Îɽ¼¨"
+
+msgid "Toggle crypt mode"
+msgstr "°Å¹æ²½ on/off"
+
+msgid "Set default key of this channel"
+msgstr "ÈëÌ©¸°¤ÎÀßÄê"
+
+msgid "Request X-Face"
+msgstr "X-Face¤òÍ×µá" 
+
+msgid "Set my X-Face"
+msgstr "¼«Ê¬¤ÎX-Face¤òÀßÄê"
+
+msgid "Strange %s reply"
+msgstr "´ñ̯¤Ê %s ±þÅú¤Ç¤¹"
+
+msgid "Welcome to the Internet Relay Chat world. Your nick is %s.\n"
+msgstr "¤è¤¦¤³¤½ Internet Relay Chat ¤ÎÀ¤³¦¤Ø¡£¤¢¤Ê¤¿¤Î¥Ë¥Ã¥¯¤Ï %s ¤Ç¤¹\n"
+
+msgid "Your server is %s (version %s).\n"
+msgstr "¥µ¡¼¥Ð¤Ï %s (¥Ð¡¼¥¸¥ç¥ó %s) ¤Ç¤¹\n"
+
+msgid "Your client version is %s.\n"
+msgstr "¥¯¥é¥¤¥¢¥ó¥È¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï %s ¤Ç¤¹\n"
+
+msgid "Your server was created %s\n"
+msgstr "¥µ¡¼¥Ð¤Ï %s ¤ËºîÀ®¤µ¤ì¤Þ¤·¤¿\n"
+
+msgid "%s Trying to connect to %s (class %s)\n"
+msgstr "%s %s (¥¯¥é¥¹ %s) ¤ËÀܳ¤ò»î¤ß¤Æ¤¤¤Þ¤¹\n"
+
+msgid "%s Handshaking with %s (class: %s)\n"
+msgstr "%s %s (¥¯¥é¥¹ %s) ¤È°®¼ê¤ò¤·¤Æ¤¤¤Þ¤¹\n"
+
+msgid "Mode for you is %s\n"
+msgstr "¤¢¤Ê¤¿¤Î¥â¡¼¥É¤Ï %s ¤Ç¤¹\n"
+
+msgid "Channels: %s\n"
+msgstr "¥Á¥ã¥ó¥Í¥ë: %s\n"
+
+msgid "Channel"
+msgstr "¥Á¥ã¥ó¥Í¥ë"
+
+msgid "Users"
+msgstr "¥æ¡¼¥¶¿ô"
+
+msgid "Topic"
+msgstr "¥È¥Ô¥Ã¥¯"
+
+msgid "Mode for %s is %s\n"
+msgstr "%s ¤Î¥â¡¼¥É¤Ï %s ¤Ç¤¹\n"
+
+msgid "No topic is set\n"
+msgstr "¥È¥Ô¥Ã¥¯¤ÏÀßÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó\n"
+
+msgid "Topic: %s\n"
+msgstr "¥È¥Ô¥Ã¥¯: %s\n"
+
+msgid "Topic for %s: %s\n"
+msgstr "%s ¤Î¥È¥Ô¥Ã¥¯¤Ï: %s\n"
+
+msgid "Inviting user %s\n"
+msgstr "¥æ¡¼¥¶ %s ¤ò¾·ÂÔ¤·¤Æ¤¤¤Þ¤¹\n"
+
+msgid "Inviting user %s to channel %s\n"
+msgstr "¥æ¡¼¥¶ %s ¤ò¥Á¥ã¥ó¥Í¥ë %s ¤Ë¾·ÂÔ¤·¤Æ¤¤¤Þ¤¹\n"
+
+msgid "Machine %s is running IRC version %s (%s)\n"
+msgstr "¥Û¥¹¥È %s ¤Ç¤Ï¥Ð¡¼¥¸¥ç¥ó %s (%s) ¤ÎIRC¥µ¡¼¥Ð¤¬Æ°¤¤¤Æ¤¤¤Þ¤¹\n"
+
+msgid "You just KILLED %s. %s\n"
+msgstr "¤¢¤Ê¤¿¤Ï¤¿¤Ã¤¿º£ %s ¤òKILL¤·¤Þ¤·¤¿ (%s)\n"
+
+msgid "%s has been banned on %s\n"
+msgstr "%s ¤Ï ¥Á¥ã¥ó¥Í¥ë %s ¤Ç ban ¤µ¤ì¤Æ¤¤¤Þ¤¹\n"
+
+msgid "Server time: %s\n"
+msgstr "¥µ¡¼¥Ð¤Î»þ´Ö: %s\n"
+
+msgid "No such user %s"
+msgstr "¥æ¡¼¥¶ %s ¤Ï¸ºß¤·¤Þ¤»¤ó"
+
+msgid "No text to send"
+msgstr "Á÷¤ë¤Ù¤­Ê¸¾Ï¤¬¤¢¤ê¤Þ¤»¤ó"
+
+msgid "Erroneous nickname %s.  Choose a new one with %s."
+msgstr "%s ¤ÏÉÔÀµ¤Ê¥Ë¥Ã¥¯¤Ç¤¹¡£%s ¤È¥¿¥¤¥×¤·¤Æ ¿·¤·¤¤¥Ë¥Ã¥¯¤òÁª¤ó¤Ç²¼¤µ¤¤"
+
+msgid "Nickname %s already in use.  Choose a new one with %."
+msgstr "¥Ë¥Ã¥¯ %s ¤Ï´û¤Ë»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£%s ¤È¥¿¥¤¥×¤·¤Æ ¿·¤·¤¤¥Ë¥Ã¥¯¤òÁª¤ó¤Ç²¼¤µ¤¤"
+
+msgid "Password incorrect from %s. Try again with password."
+msgstr "%s ¤Î¥Ñ¥¹¥ï¡¼¥É¤¬ÉÔÀµ¤Ç¤¹¡£¥Ñ¥¹¥ï¡¼¥É¤òºÆÅÙÆþÎϤ·¤Æ²¼¤µ¤¤"
+
+msgid "You are not a channel operator"
+msgstr "¤¢¤Ê¤¿¤Ï¥Á¥ã¥ó¥Í¥ë¥ª¥Ú¥ì¡¼¥¿¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó"
+
+msgid "Style file load failed."
+msgstr "¥¹¥¿¥¤¥ë¥Õ¥¡¥¤¥ë¤ÎÆɤ߹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿"
+
+msgid "Encrypt message with key [RET for none]: "
+msgstr "¥á¥Ã¥»¡¼¥¸¤ò°Å¹æ²½¤¹¤ë¸°¤òÆþÎϤ·¤Æ²¼¤µ¤¤ [RET for none]: "
+
+msgid "Kick out nickname: "
+msgstr "½³¤ê½Ð¤¹¥Ë¥Ã¥¯: "
+
+msgid "Kick Message: "
+msgstr "Íýͳ: "
+
+msgid "LIST channel: "
+msgstr "LIST ¥Á¥ã¥ó¥Í¥ë: "
+
+msgid "Channel: "
+msgstr "¥Á¥ã¥ó¥Í¥ë: "
+
+msgid "Mode for channel %s [%s]: "
+msgstr "¥Á¥ã¥ó¥Í¥ë %s ¤Î¥â¡¼¥É [%s]: "
+
+msgid "Set Operator for"
+msgstr "¤Ê¤ë¤È¤òÉÕ¤±¤ëÁê¼ê"
+
+msgid "Unset Operator for"
+msgstr "¤Ê¤ë¤È¤ò³°¤¹Áê¼ê"
+
+msgid "Set Voice for"
+msgstr "½½»ú²Í¤òÉÕ¤±¤ëÁê¼ê"
+
+msgid "Unset Voice for"
+msgstr "½½»ú²Í¤ò³°¤¹Áê¼ê"
+
+msgid "Private message to: "
+msgstr "¥×¥é¥¤¥Ù¡¼¥È¥á¥Ã¥»¡¼¥¸¤òÁ÷¤ëÁê¼ê: "
+
+msgid "Private message to %s: "
+msgstr "%s ¤Ø¤Î¥á¥Ã¥»¡¼¥¸: "
+
+msgid "To whom: "
+msgstr "ï¤Ë: "
+
+msgid "Names on channel: "
+msgstr "NAMES¤ò¼è¤ë¥Á¥ã¥ó¥Í¥ë: "
+
+msgid "WHO expression: "
+msgstr "WHOɽ¸½: "
+
+msgid "Wait for: "
+msgstr "ÂÔ¤ÄÁê¼ê: "
+
+msgid "Message to send %s upon entering: "
+msgstr "%s ¤ËÁ÷¤ë¥á¥Ã¥»¡¼¥¸: "
+
+msgid "Finger whom: "
+msgstr "¿È¸µ¤òÄ´¤Ù¤ëÁê¼ê: "
+
+msgid "Invite channel: "
+msgstr "¾·ÂÔ¤¹¤ë¥Á¥ã¥ó¥Í¥ë: "
+
+msgid "Invite whom: " 
+msgstr "¾·ÂÔ¤¹¤ëÁê¼ê: "
+
+msgid "Signoff message: "
+msgstr "½ªÎ»¥á¥Ã¥»¡¼¥¸: "
+
+msgid "Whose client: "
+msgstr "ï¤Î¥¯¥é¥¤¥¢¥ó¥È: "
+
+msgid "What info: "
+msgstr "Á÷¤ëCTCP: "
+
+msgid "New userinfo: "
+msgstr "¿·µ¬¥æ¡¼¥¶¾ðÊó: "
+
+msgid "New X-Face: "
+msgstr "¿·µ¬ X-Face: "
+
+msgid "Really SEND from Yank Buffer?"
+msgstr "ËÜÅö¤Ë¥Ð¥Ã¥Õ¥¡¤ÎÆâÍƤòÁ÷¤ê¤Þ¤¹¤«¡©"
+
diff --git a/etc/styles/bottom b/etc/styles/bottom
new file mode 100644 (file)
index 0000000..e335817
--- /dev/null
@@ -0,0 +1,101 @@
+;; -*- emacs-lisp -*-
+;;; bottom --- Window configuration style spec for `bottom'.
+;; Copyright (C) 1998 Daiki Ueno <daiki@kake.info.waseda.ac.jp>
+;; See file liece-copyright.el for original change log and copyright info.
+
+;; Author: Daiki Ueno <daiki@kake.info.waseda.ac.jp>
+;; Created: 1999-01-08
+;; Revised: 1999-01-08
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Code:
+
+(liece-window-add-style
+ (command-buffer-mode . any)
+ (channel-buffer-mode . t) 
+ (nick-buffer-mode . t)
+ (channel-list-buffer-mode . t)
+ (configuration 
+  (vertical
+   1.0
+   (horizontal
+    1.0
+    (others 1.0)
+    (channel-list 
+     liece-channel-list-window-width-percent))
+   (horizontal
+    liece-channel-window-height-percent   
+    (channel 1.0)
+    (nick liece-nick-window-width-percent))
+   (command 4 point))))
+
+(liece-window-add-style
+ (command-buffer-mode . any)
+ (channel-buffer-mode . t) 
+ (nick-buffer-mode . nil)
+ (channel-list-buffer-mode . t)
+ (configuration 
+  (vertical
+   1.0
+   (horizontal 
+    1.0
+    (others 1.0)
+    (channel-list 
+     liece-channel-list-window-width-percent))
+   (channel liece-channel-window-height-percent)
+   (command 4 point))))
+
+(liece-window-add-style
+ (command-buffer-mode . any)
+ (channel-buffer-mode . t) 
+ (nick-buffer-mode . t)
+ (channel-list-buffer-mode . nil)
+ (configuration 
+  (vertical
+   1.0
+   (others 1.0)
+   (horizontal
+    liece-channel-window-height-percent   
+    (channel 1.0)
+    (nick liece-nick-window-width-percent))
+   (command 4 point))))
+
+(liece-window-add-style
+ (command-buffer-mode . any)
+ (channel-buffer-mode . t) 
+ (nick-buffer-mode . nil)
+ (channel-list-buffer-mode . nil)
+ (configuration 
+  (vertical
+   1.0
+   (others 1.0)
+   (channel liece-channel-window-height-percent)
+   (command 4 point))))
+
+(liece-window-add-style
+ (command-buffer-mode . any)
+ (channel-buffer-mode . nil) 
+ (nick-buffer-mode . any)
+ (channel-list-buffer-mode . any)
+ (configuration 
+  (vertical
+   1.0
+   (dialogue 1.0)
+   (command 4 point))))
diff --git a/etc/styles/middle b/etc/styles/middle
new file mode 100644 (file)
index 0000000..278615c
--- /dev/null
@@ -0,0 +1,87 @@
+;; -*- emacs-lisp -*-
+;;; middle --- Window configuration style spec for `middle'.
+;; Copyright (C) 1998 Daiki Ueno <daiki@kake.info.waseda.ac.jp>
+;; See file liece-copyright.el for original change log and copyright info.
+
+;; Author: Daiki Ueno <daiki@kake.info.waseda.ac.jp>
+;; Created: 1999-01-08
+;; Revised: 1999-01-08
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Code:
+
+(liece-window-add-style
+ (command-buffer-mode . any)
+ (channel-buffer-mode . t) 
+ (nick-buffer-mode . t)
+ (channel-list-buffer-mode . t)
+ (configuration 
+  (horizontal
+   1.0
+   (vertical
+    1.0
+    (channel liece-channel-window-height-percent)
+    (command 3 point)
+    (others 1.0))
+   (vertical
+    liece-nick-window-width-percent
+    (nick 0.5)
+    (channel-list 1.0)))))
+
+(liece-window-add-style
+ (command-buffer-mode . any)
+ (channel-buffer-mode . t) 
+ (nick-buffer-mode . nil)
+ (channel-list-buffer-mode . t)
+ (configuration 
+  (vertical
+   1.0
+   (horizontal 
+    1.0
+    (others 1.0)
+    (channel-list 
+     liece-channel-list-window-width-percent))
+   (horizontal
+    liece-channel-window-height-percent
+    (channel 1.0))
+   (command 3 point))))
+
+(liece-window-add-style
+ (command-buffer-mode . any)
+ (channel-buffer-mode . t) 
+ (nick-buffer-mode . nil)
+ (channel-list-buffer-mode . nil)
+ (configuration 
+  (vertical
+   1.0
+   (others 1.0)
+   (channel liece-channel-window-height-percent)
+   (command 3 point))))
+
+(liece-window-add-style
+ (command-buffer-mode . any)
+ (channel-buffer-mode . nil) 
+ (nick-buffer-mode . any)
+ (channel-list-buffer-mode . any)
+ (configuration 
+  (vertical
+   1.0
+   (dialogue 1.0)
+   (command 3 point))))
diff --git a/etc/styles/top b/etc/styles/top
new file mode 100644 (file)
index 0000000..e013760
--- /dev/null
@@ -0,0 +1,103 @@
+;;; top --- Window configuration style spec for `top'. -*- emacs-lisp -*-
+;; Copyright (C) 1998 Daiki Ueno <daiki@kake.info.waseda.ac.jp>
+;; See file liece-copyright.el for original change log and copyright info.
+
+;; Author: Daiki Ueno <daiki@kake.info.waseda.ac.jp>
+;; Created: 1999-01-08
+;; Revised: 1999-01-08
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Code:
+
+(liece-window-add-style
+ (command-buffer-mode . any)
+ (channel-buffer-mode . t) 
+ (nick-buffer-mode . t)
+ (channel-list-buffer-mode . t)
+ (configuration 
+  (vertical
+   1.0
+   (command 4 point)
+   (horizontal
+    liece-channel-window-height-percent   
+    (channel 1.0)
+    (nick liece-nick-window-width-percent))
+   (horizontal
+    1.0
+    (others 1.0)
+    (channel-list 
+     liece-channel-list-window-width-percent)))))
+
+(liece-window-add-style
+ (command-buffer-mode . any)
+ (channel-buffer-mode . t) 
+ (nick-buffer-mode . nil)
+ (channel-list-buffer-mode . t)
+ (configuration 
+  (vertical
+   1.0
+   (command 4 point)
+   (horizontal
+    liece-channel-window-height-percent
+    (channel 1.0))
+   (horizontal 
+    1.0
+    (others 1.0)
+    (channel-list 
+     liece-channel-list-window-width-percent)))))
+
+(liece-window-add-style
+ (command-buffer-mode . any)
+ (channel-buffer-mode . t) 
+ (nick-buffer-mode . t)
+ (channel-list-buffer-mode . nil)
+ (configuration 
+  (vertical
+   1.0
+   (command 4 point)
+   (horizontal
+    liece-channel-window-height-percent   
+    (channel 1.0)
+    (nick liece-nick-window-width-percent))
+   (others 1.0))))
+
+(liece-window-add-style
+ (command-buffer-mode . any)
+ (channel-buffer-mode . t) 
+ (nick-buffer-mode . nil)
+ (channel-list-buffer-mode . nil)
+ (configuration 
+  (vertical
+   1.0
+   (command 4 point)
+   (channel liece-channel-window-height-percent)
+   (others 1.0))))
+
+(liece-window-add-style
+ (command-buffer-mode . any)
+ (channel-buffer-mode . nil) 
+ (nick-buffer-mode . any)
+ (channel-list-buffer-mode . any)
+ (configuration 
+  (vertical
+   1.0
+   (command 4 point)
+   (dialogue 1.0))))
+
diff --git a/lisp/.cvsignore b/lisp/.cvsignore
new file mode 100644 (file)
index 0000000..a992c3f
--- /dev/null
@@ -0,0 +1 @@
+irchat-setup.el
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
new file mode 100644 (file)
index 0000000..24b5528
--- /dev/null
@@ -0,0 +1,3691 @@
+2000-04-04   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-vars.el
+       (liece-ctcp-userinfo): Rename from `liece-client-userinfo'.
+       (liece-ctcp-x-face): Ditto.
+
+       * liece-ctcp.el (liece-ctcp-message): Abolish macro.
+       (liece-ctcp-file-message): Ditto.
+
+2000-03-28   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-emacs.el: Require `derived'.
+
+2000-03-24   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-inlines.el (liece-locate-path): Use
+       `liece-locate-data-directory' instead of `locate-data-directory'.
+
+2000-03-23   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-q-ccl.el (ccl-set-register-right): Abolish.
+       (liece-quote-ccl-decode): Simplified.
+
+       * liece-compat.el (liece-suppress-mode-line-format): Copy original
+       `mode-line-format' before modification.
+       (locate-data-directory): Abolish.
+       (liece-locate-data-directory): New function.
+
+       * liece-xemacs.el (liece-xemacs-suppress-modeline-format): Ditto.
+       (liece-locate-data-directory): Override with `locate-data-directory'.
+
+       * liece.el
+       (liece-command-mode): Define `mode-line-format' as buffer local.
+       (liece-dialogue-mode): Exchange `mode-line-modified' position.
+       (liece-clear-system): Check buffer status.
+
+       * liece-ctcp.el (liece-ctcp-xyzzy-message): Abolish.
+       (liece-command-send-file): Don't narrowing buffer.
+       (liece-ctcp-file-save-directory): Default to `liece-directory'.
+       (liece-register-file-handler): New macro.
+       (liece-ctcp-notice): Rewrite.
+       (liece-ctcp-message): Rewrite.
+       (liece-query-client-insert-to-generic): Abolish.
+       (liece-query-client-version): Abolish.
+       (liece-query-client-userinfo): Abolish.
+       (liece-query-client-help): Abolish.
+       (liece-query-client-clientinfo): Abolish.
+       (liece-query-client-ping): Abolish.
+       (liece-query-client-time): Abolish.
+       (liece-query-client-x-face): Abolish.
+       (liece-query-client-last-command): Rename from
+       `liece-query-client-lastcommand'.
+       (liece-query-client-alist): Abolish.
+       (liece-ctcp-last-nick): Rename from `liece-query-client-nick'.
+       (liece-command-ctcp-x-face-from-minibuffer): Abolish.
+       (liece-command-ctcp-x-face-from-commandbuffer): Abolish.
+       (liece-command-ctcp-userinfo-from-commandbuffer): Abolish.
+
+2000-03-22   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-xemacs.el (liece-xemacs-icon-path): Abolish.
+       (liece-toolbar-position): Default to `default-toolbar-position'.
+       (liece-xemacs-setup-toolbar): Remove directory checking.
+       (liece-xemacs-modeline-glyph): Suppress glyph specs.
+       (liece-xemacs-create-nick-glyph): Ditto.
+
+       * liece-emacs.el (liece-emacs-icon-path): Abolish.
+
+       * liece-intl.el (liece-intl-load-catalogue): Rewrite with
+       `liece-locate-path'; remove local binding.
+
+       * liece-window.el (liece-window-load-style-file): Rewrite with
+       `liece-locate-path'; remove local binding.
+
+       * liece-compat.el (locate-data-directory): New function.
+
+       * liece-inlines.el (liece-find-data-directory): Abolish.
+       (liece-locate-path): Rename from `liece-find-path'; use
+       `locate-data-directory'; reorder arguments.
+       (liece-locate-icon-file): New function.
+
+2000-03-20   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-globals.el
+       (liece-command-buffer,liece-dialogue-buffer,liece-private-buffer,
+       liece-others-buffer,liece-channel-buffer,
+       liece-channel-buffer-format,liece-channel-list-buffer,
+       liece-nick-buffer,liece-nick-buffer-format,
+       liece-KILLS-buffer,liece-IGNORED-buffer,liece-WALLOPS-buffer,
+       liece-CRYPT-buffer,liece-server-buffer): Remove preceding `*IRC*'.
+
+       * liece-xemacs.el
+       (liece-xemacs-splash-at-point): Bind
+       `liece-insert-environment-version' to nil.
+       (liece-xemacs-splash): Ditto.
+       (liece-xemacs-suppress-modeline-format): New function.
+       (liece-suppress-mode-line-format): Override with
+       `liece-xemacs-suppress-modeline-format'.
+       (liece-xemacs-mode-line-buffer-identification): Decorate 1st
+       element and modify whole identification by side effect.
+
+       * liece-compat.el (current-language-environment): Abolish.
+       (frame-title-format): Abolish.
+       (enable-multibyte-characters): Abolish.
+       (liece-suppress-mode-line-format): New function.
+
+       * liece-version.el: Use product.el.
+       (liece-version): New function.
+       (liece-user-interface-product): Abolish.
+       (liece-product-name): Abolish.
+       (liece-product-version): Abolish.
+       (liece-product-code-name): Abolish.
+       (liece-user-agent-value): Abolish.
+       (liece-command-version): Abolish.
+       (liece-environment-version): Rename from
+       `liece-emacs-user-agent-value'.
+
+       * bitmap-stipple.el
+       (bitmap-stipple-insert-pixmap): Don't set point to `point-min'.
+
+       * liece-xbm.el: Update.
+
+       * liece-emacs.el (liece-emacs-splash): Display version number;
+       bind `liece-insert-environment-version' to nil.
+       (liece-emacs-mode-line-buffer-identification): Decorate 1st
+       element and modify whole identification by side effect.
+
+       * liece-vars.el (liece-nick-max-length): New variable.
+       (liece-insert-environment-version): New variable.
+
+       * liece.el (liece-truncate-nickname): Abolish.
+       (liece-client-query-keys,liece-dialogue-keys,
+       liece-select-keys,liece-crypt-keys): Define as a plist.
+       (liece-local-set-keys): New function borrowed from gnus-util.el.
+       (liece-define-keys): Ditto.
+       (liece-define-keys-safe): Ditto.
+       (liece-define-keys-1): Ditto.
+       (liece-command-map): Bind "\C-m" to liece-command-modec.
+       (liece-command-mode): Don't set `mode-line-format' directly;
+       exchange `mode-line-modified' position;
+       (liece-dialogue-mode): Ditto.
+       (liece-others-mode): Ditto.
+       (liece-channel-mode): Ditto.
+       (liece-nick-mode): Ditto.
+       (liece-channel-list-mode): Ditto.
+
+2000-03-19   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * gettext.el (bind-text-domain): Don't refer "PATHNAME/DOMAIN.mo"
+       directly.
+
+       * bitmap-stipple.el,gettext.el,liece-000.el,liece-200.el,
+       liece-300.el,liece-400.el,liece-500.el,liece-commands.el,
+       liece-config.el,liece-crypt.el,liece-ctcp.el,liece-dcc.el,
+       liece-filter.el,liece-globals.el,liece-handle.el,liece-hilit.el,
+       liece-inlines.el,liece-intl.el,liece-mail.el,liece-make.el,
+       liece-menu.el,liece-message.el,liece-minibuf.el,liece-misc.el,
+       liece-nick.el,liece-q-ccl.el,liece-q-el.el,liece-tcp.el,
+       liece-version.el,liece-window.el,liece-x-face.el: Checkdoc.
+
+       * liece-menu.el (liece-nick-popup-menu): Use copy-sequence instead
+       of copy-tree.
+
+       * liece-modules.el (liece-modules-to-compile): Modify for
+       `liece-clfns' and `liece-handler'.
+
+       * liece-handler.el: Rename from llunf.el.
+
+       * liece-clfns.el: New file.
+
+       * liece-channel.el (liece-channel-add-buttons): Fix regexp.
+       (liece-channel-add-ban): Use add-to-list instead of pushnew.
+
+       * liece-coding.el
+       (liece-default-coding-system): Abolish.
+       (liece-mime-charset-for-write): Rename from
+       `liece-default-mime-charset'.
+       (liece-mime-charset-for-read): Rename from
+       `liece-default-mime-charset-for-read'.
+
+       * liece.el (liece-client-query-map,liece-dcc-map,
+       liece-crypt-map,liece-friends-map,liece-channel-list-mode-map,
+       liece-nick-mode-map,): Use make-sparse-keymap when initialising.
+       (liece-command-mode): Don't set liece-display-frame-title to nil.
+       (liece-dialogue-mode-map): Bind `L' to liece-command-load-vars
+       instead of `C-l'; bind `S' to liece-command-save-vars instead of
+       `s'; bind `M' to liece-command-modec instead of `C-m'; bind `O' to
+       liece-dialogue-own-freeze instead of `M'.
+       (liece-buffer-last-check-time): Rename from
+       `liece-last-checkbuffer-time'.
+       (liece-check-buffers): Define as function.
+       (liece-check-buffers-if-interval-expired): Simplified.
+
+       * liece-vars.el
+       (liece-buffer-max-size): Rename from `liece-buffer-maxsize'.
+       (liece-buffer-default-size): Rename from `liece-buffer-defsize'.
+       (liece-buffer-check-interval): Rename from
+       `liece-checkbuffer-interval'.
+
+       * liece-emacs.el (liece-emacs-widget-button-click): Don't use
+       `event-buffer'.
+
+       * liece-xemacs.el
+       (liece-xemacs-get-buffer-window-list): Abolish.
+       (liece-xemacs-run-at-time): Abolish.
+       (liece-xemacs-put-text-property): Abolish.
+       (liece-xemacs-add-text-property): Abolish.
+
+       * liece-minibuf.el (liece-minibuffer-map): Use `set-keymap-parent'
+       instead of `liece-set-keymap-parents'.
+
+       * liece-compat.el: Don't require emu, broken, alist.
+       (remassoc): Abolish.
+       (remassq): Abolish.
+       (liece-run-at-time): Abolish.
+       (liece-cancel-timer): Abolish.
+       (with-timeout): Abolish.
+       (with-timeout-handler): Abolish.
+       (liece-get-buffer-window-list): Abolish.
+       (liece-set-keymap-parents): Abolish.
+       (event-buffer): Abolish.
+       (event-point): Abolish.
+       (truncate-string-to-width): Abolish.
+       (plist-get): Abolish.
+       (read-passwd): Abolish.
+       (colon-keyword-usable): Abolish.
+       (turn-on-font-lock): Abolish.
+       (liece-make-overlay): Abolish.
+       (liece-delete-overlay): Abolish.
+       (liece-overlay-put): Abolish.
+       (liece-move-overlay): Abolish.
+       (liece-overlay-end): Abolish.
+       (liece-overlay-get): Abolish.
+       (liece-overlays-at): Abolish.
+       (liece-put-text-property): Abolish.
+       (liece-add-text-property): Abolish.
+       (buffer-disable-undo): Abolish.
+       (valid-plist-p): Abolish.
+
+       * liece-url.el (liece-url-browser-netscape): Abolish.
+
+2000-03-08   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-compat.el (liece-get-buffer-window): Search all frames.
+
+2000-02-28   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece.el (liece-command-mode): Set frame-title-format when
+       running on window-system environment.
+
+2000-02-18   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-emacs.el (liece-emacs-splash): Use `frame-char-width' and
+       `frame-char-height' when calculating logo centering.
+
+2000-02-17   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-400.el (liece-handle-443-message): Check channel name.
+
+2000-02-13   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-coding.el
+       (liece-coding-encode-charset-region): Define as function.
+       (liece-coding-encode-charset-string): Define as function.
+
+       * liece-dcc.el
+       (liece-dcc-chat-send): Switch to liece-command-buffer.
+       (liece-dcc-enqueue-request): Rename.
+       (liece-dcc-dequeue-request): Ditto.
+
+       * liece-misc.el (liece-send-as-binary): Abolish.
+       (liece-repair-crlf): Abolish.
+       (liece-send): Switch to liece-command-buffer.
+
+       * liece-emacs.el (liece-emacs-splash): Use `font-info' if 'font
+       parameter of the selected frame is not a fontset name.
+
+       * liece.el (liece-open-server-internal): Set process-buffer of
+       open-network-stream as unibyte.
+
+2000-02-10   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-xemacs.el (liece-toolbar-icon-convert-1): New function.
+       (liece-toolbar-icon-states): New variable.
+
+       * liece-emacs.el (liece-emacs-widget-button-click): Don't preserve
+       previously selected window.
+
+2000-01-23   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-emacs.el: Require `image' when compiling.
+       (create-image): Add optional argument `data-p'.
+
+2000-01-22   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-message.el (liece-message-empty-predicate): New variable.
+
+       * liece-commands.el
+       (liece-command-message): Use `liece-message-empty-predicate'.
+
+2000-01-16   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-modules.el (liece-modules): Don't install `queue-m'.
+
+       * liece-dcc.el: Don't require `queue-m' at runtime.
+
+       * liece-hilit.el:
+       Add autoload setting for `liece-channel-add-buttons' and
+       `liece-nick-add-buttons'.
+       (liece-highlight-maybe-turn-on-font-lock): Activate
+       `liece-channel-add-buttons' and `liece-nick-add-buttons' when
+       inserting every line.
+
+       * liece-compat.el (liece-map-overlays): New function.
+       (liece-kill-all-overlays): Use it.
+
+       * liece-xemacs.el (liece-xemacs-map-extents): New function.
+       (liece-xemacs-kill-all-overlays): Use it.
+       (liece-map-overlays): New alias to `liece-xemacs-map-extents'.
+
+       * liece-nick.el (liece-nick-redisplay-buffer): New function.
+       (liece-nick-add-buttons): New function.
+
+       * liece-channel.el
+       (liece-channel-redisplay-buffer): New function.
+       (liece-channel-list-redisplay-buffer): New function.
+       (liece-channel-buffer-invisible-p): Remove redundant cond.
+       (liece-channel-part-internal): Remove redundant `function'.
+       (liece-channel-list-add-button): Rename from
+       `liece-channel-add-button'.
+       (liece-channel-push-button-action): Use `liece-command-join'
+       instead of `liece-switch-to-channel'.
+
+       * liece-commands.el (liece-switch-to-channel-1): Abolish.
+       (liece-redisplay-buffer-functions): New variable.
+
+2000-01-07   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-commands.el
+       (liece-command-next-channel): Traverse channel list circularly.
+       (liece-command-previous-channel): Likewise.
+
+1999-12-26   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-commands.el
+       (liece-command-previous-channel): Remove nil from channel list.
+       (liece-command-next-channel): Ditto.
+
+1999-12-24   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-emacs.el (liece-emacs-splash): Check whether logo height
+       is larger than frame height.
+
+       * liece-crypt.el (liece-crypt-maybe-encrypt-message): Simplified.
+
+       * liece-commands.el
+       (liece-command-enter-message-encrypted): Abolish.
+       (liece-command-enter-message-cleartext): Abolish.
+       (liece-command-enter-message-opposite-crypt-mode): Abolish.
+       (liece-command-enter-message-with-key): Abolish.
+
+1999-12-23   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-version.el (liece-user-agent-value): Add APEL version.
+
+       * liece-inlines.el (liece-next-line): New macro.
+
+       * liece-ctcp.el
+       (liece-command-client-action): Use `liece-next-line'.
+       (liece-command-client-userinfo-from-commandbuffer): Ditto.
+
+       * liece-channel.el (liece-channel-member): Use `member-if' instead
+       of `find-if'.
+
+       * liece.el (liece): Don't use `liece-command-describe-briefly'.
+       (liece-command-mode): Don't bind `next-line-add-newlines'.
+       (liece-dialogue-keys): Don't bind `C-u'.
+
+       * liece-commands.el (liece-command-topic): If called with prefix
+       argument insert the current topic as default.
+       (liece-command-finger): Add documentation about optional 2nd
+       argument.
+       (liece-command-describe-briefly): Abolish.
+       (liece-enter-message): Abolish local variable `message'.
+       (liece-command-join-channel): Fix paren style.
+       (liece-command-join-partner): Ditto.
+       (liece-command-join): Ditto.
+       (liece-command-part): Ditto.
+       (liece-switch-to-channel-no): Ditto.
+       (liece-command-complete): Ditto.
+       (liece-command-next-channel): Rewrite with using
+       `liece-channel-member'.
+       (liece-command-previous-channel):
+       (liece-command-push): Abolish local variable `rest-sym' and
+       `item'; don't use `liece-channel-remove'.
+       (liece-command-pop): Abolish local variable `rest-sym'.
+       (liece-command-tag-region): Don't create temp buffer.
+
+1999-12-21   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-misc.el (liece-set-channel-indicator): Switch to
+       `liece-command-buffer' when updating modeline.
+
+1999-12-19   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-minibuf.el (liece-minibuffer-map): Don't use
+       `set-keymap-parents'.
+
+       * liece-compat.el (liece-set-keymap-parents): Rename from
+       `set-keymap-parents'.
+       (turn-on-font-lock,event-buffer,event-point,region-active-p,
+       remassoc,remassq,valid-plist-p,plist-get): Add document.
+
+1999-12-14   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece.el (liece-insert-internal): Don't bind `tab-stop-list'.
+       (liece-dialogue-mode): Declare `tab-stop-list' as buffer local.
+
+1999-12-01   Daiki Ueno  <ueno@unixuser.org>
+
+       * liece-message.el (liece-message-parent-buffer): Add condtion.
+
+1999-11-13   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece.el (liece-read-variables-files): Make the `~/.liece/'
+       directory if there is no initialization file.
+
+1999-11-10   Kenichi OKADA  <okada@opaopa.org>
+
+       * liece-xemacs.el (liece-xemacs-splash-at-point): Calculate
+       horizontal position of the splash logo.
+
+1999-11-10   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-emacs.el (liece-emacs-splash): Check the number of
+       the arguments of `insert-image'.
+
+1999-11-07   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-coding.el (detect-coding-string): Remove.
+       (liece-detect-coding-string): Don't define if
+       `detect-coding-string' does not exist.
+
+1999-11-05   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-url.el (liece-url-add-buttons): Accept optional arguments
+       `start' and `end'.
+
+       * liece.el (liece-save-point): New macro; borrowed from SKK.
+       (liece-before-insert-hook): New variable.
+       (liece-insert-internal): Refine.
+
+1999-11-01   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-misc.el (liece-get-buffer-create): Use memq instead of
+       member to search over buffers list.
+
+1999-10-29  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-handle.el (liece-handle-ping-message): Return the
+       argument correctly.
+
+       * liece.el (liece-insert-internal): Remove `inline'.
+
+1999-10-27  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-commands.el (liece-command-nick-scroll-down): Fix
+       argument list.
+       (liece-command-nick-scroll-up): Ditto.
+
+       * liece-hilit.el (liece-highlight-turn-on-font-lock): Set
+       `liece-highlight-maybe-play-jingle' as local hook.
+       (liece-highlight-font-lock-keywords): Undo last change.
+
+1999-10-26   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece.el (liece-refresh-windows): Remove.
+       (liece-refresh-buffer-window): New function `liece-refresh-windows'.
+       (liece-insert-internal): Preserve old point unconditionally when
+       the buffer is frozen.
+
+1999-10-21   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-misc.el (liece-freeze): Rename from `liece-freeze-toggle'.
+       (liece-own-freeze): Rename from `liece-own-freeze-toggle'.
+
+       * liece.el: Add autoload for `liece-command-submit-bug-report'.
+       (liece-overriding-command-keys): Rename.
+       (liece-dialogue-keys): Bind `liece-command-submit-bug-report'.
+
+       * liece-commands.el (liece-command-scroll-down): Use
+       `scroll-other-window'; accept prefix value.
+       (liece-command-scroll-up): Ditto.
+       (liece-command-nick-scroll-down): Ditto.
+       (liece-command-nick-scroll-up): Ditto.
+       (liece-command-freeze): Accept prefix argument.
+       (liece-command-own-freeze): Ditto.
+       (liece-command-quit): Refine.
+
+1999-10-20   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-commands.el (liece-command-display-friends): Remove
+       `save-excursion'.
+
+       * liece.el (liece-read-variables-files): Prepare startup
+       directory if it does not exist.
+
+       * liece-vars.el (liece-directory): New variable.
+       (liece-variables-file): Relocate under `liece-directory'.
+
+       * liece-ctcp.el (liece-ctcp-version-message): Refer
+       `liece-user-agent-value'.
+
+       * liece-menu.el: Check features about menubars.
+
+       * liece-xemacs.el (liece-xemacs-hide-scrollbars): Set
+       `scrollbar-height' to 0 if `horizontal-scrollbar-visible-p' is not
+       available.
+
+       * liece-mail.el (liece-command-submit-bug-report): New function.
+       (liece-maintainer-address): New variable.
+
+       * gettext.el (gettext-load-message-catalogue): Enclose with
+       `as-binary-input-file' instead of using `set-buffer-multibyte' twice.
+       (gettext-load-portable-message-catalogue): Likewise.
+       (dgettext): Check the cdr of catalogue entry.
+       (gettext-gmo-read-32bit-word): Mask each byte with 255.
+
+       * liece-compat.el (truncate-string-to-width): New alias.
+
+       * liece.el (liece-server-keyword-bind): Quote colon keywords.
+
+       * liece-make.el (make-liece-info-files): Check if
+       `set-language-environment' exists.
+
+       * liece-misc.el (liece-server-host): Quote colon keyword.
+
+1999-10-19   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-hilit.el (liece-highlight-font-lock-keywords): Undo last
+       change; accept partial matcher as the value of
+       `liece-highlight-pattern'.
+       (liece-highlight-maybe-play-jingle): New function.
+       (liece-highlight-maybe-turn-on-font-lock): Add
+       `liece-highlight-maybe-play-jingle' to `after-change-functions'.
+
+1999-10-14   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * gettext.el (gettext-load-message-catalogue): Use hashtable.
+       (gettext-load-portable-message-catalogue): Likewise.
+
+1999-10-13  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-misc.el (next-visible-point): Don't advise.
+       (liece-remove-properties-region): Enclose by `save-restriction'.
+
+1999-10-12   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-commands.el (liece-command-send-action): Remove.
+
+       * liece-ctcp.el (liece-command-client-action): Move from
+       `liece-commands.el'; mark `liece-command-send-action' as obsolete.
+       (liece-client-x-face-notice): Remove whitespaces.
+
+       * liece-handle.el (liece-handle-kick-message): Fix message.
+
+1999-10-11  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * gettext.el (gettext-default-mime-charset): New variable.
+       (gettext-parse-Content-Type): Use it.
+
+1999-10-07  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-misc.el (liece-message): Fix message prefix.
+
+       * liece-compat.el (liece-find-data-directory): Move to
+       `liece-inlines'.
+
+       * liece-xemacs.el (liece-xemacs-icon-path): Use `liece-find-path'.
+
+       * liece-emacs.el (liece-emacs-icon-path): Use `liece-find-path'.
+
+       * liece-inlines.el (liece-find-path): New function.
+
+1999-10-05  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-version.el (liece-user-interface-product): Renamed from
+       `liece-client-product'.
+       (liece-client-version-major): Abolish.
+       (liece-client-version-minor): Abolish.
+       (liece-client-version-beta): Abolish.
+       (liece-client-version-alpha): Abolish.
+       (liece-client-version-codename): Abolish.
+       (liece-product-name): New macro.
+       (liece-product-version): New macro.
+       (liece-product-code-name): New macro.
+
+1999-10-03   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-hilit.el (liece-highlight-jingle-function): New variable.
+       (liece-highlight-font-lock-keywords): If liece-highlight-pattern
+       matches, play jingle.
+
+1999-10-01   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-message.el (liece-message-parent-buffer): Check the
+       message direction in private conversation.
+
+1999-09-28   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-version.el (liece-emacs-user-agent-value): Include
+       `emacs-patch-level'.  It exists in XEmacs 21.1.1 or later.
+
+1999-09-22  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece.el (liece-channel-mode): Make `truncate-lines' local.
+       (liece-others-mode): Ditto.
+       (liece-channel-list-mode): Ditto.
+       (liece-nick-mode): Ditto.
+
+1999-09-18   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece.el (liece-open-server): Set `liece-status-message-string'
+       when timeout is expired.
+
+1999-09-14   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-menu.el (liece-use-localized-menu): New variable.
+       (liece-command-define-menus): Use it.
+       (liece-command-define-menus-1): New function; to raverse menu
+       items recursively.
+
+       * liece.el (liece): Call `liece-intl-load-catalogue' before switch
+       to the command buffer.
+
+       * liece-dcc.el: Refine.
+
+       * liece-ctcp.el (liece-client-x-face-notice): Do not decode empty
+       `X-Face'.
+
+1999-09-11   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-vars.el (liece-dcc-program): Rename to `ldcc'.
+
+       * liece-tcp.el (liece-tcp-program): Rename to `ltcp'.
+
+       * gettext.el (gettext-parse-Content-Type): Require `path-util'.
+
+       * liece-x-face.el: Require `path-util'.
+
+1999-09-10   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * Makefile.am (SOURCES): Add `gettext.el'.
+
+       * liece-modules.el (liece-modules-to-compile): Add `gettext.el'.
+
+       * liece-intl.el: Use `gettext.el'.
+       (liece-intl-domains-alist): Abolish.
+       (liece-intl-domain-to-mime-charset-alist): Abolish.
+       (liece-intl-prepare-prefix): Abolish.
+       (liece-intl-parse-Content-Type): Abolish.
+       (liece-intl-convert-string): Abolish.
+       (liece-intl-catalogue-path): Abolish.
+
+       * gettext.el: New file.
+
+       * liece-ctcp.el: Add autoload setting for `liece-ctcp-dcc-message'.
+
+       * liece.el (liece): Save window splitting only when called
+       interactively.
+       (liece-clear-system): Do not restore window splitting.
+       (liece-command-mode): Set syntax table explicitly; make
+       `frame-title-format' buffer local.
+
+       * liece-window.el (liece-window-configuration-push): Do not save
+       `frame-title-format'.
+       (liece-window-configuration-pop): Likewise.
+
+       * liece-commands.el (liece-command-quit): Restore window splitting
+       only when called interactively.
+
+1999-09-09   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece.el (liece-server-keyword-map): New variable.
+       (liece-server-keyword-bind): New macro modified version of
+       `mail-source-bind' from `mail-source.el'.
+       (liece-server-parse-string): New function.
+       (liece-open-server): Use them.
+
+1999-09-08   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece-300.el (liece-handle-353-message): Reverse reply list.
+
+       * All files are renamed from `irchat-*' to `liece-*'.
+       All symbols are renamed too.
+
+       * irchat-vars.el (irchat-connection-timeout): Default to 60.
+
+       * irchat-nick.el (irchat-nick-insert): Handle reverse order
+       sorting.
+
+1999-09-07  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat.el (irchat): Call `irchat-command-mode' just once.
+       (irchat-initialize-buffers): Likewise.
+
+       * irchat-channel.el (irchat-channel-buffer-create): Call
+       `irchat-channel-mode' just once.
+
+       * irchat-nick.el (irchat-nick-buffer-create): Call
+       `irchat-nick-mode' just once.
+
+       * irchat-message.el (irchat-message-parent-buffer): Fix condition.
+
+1999-09-06  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-nick.el (irchat-nick-sort-nicks): New variable.
+
+       * irchat-intl.el (irchat-intl-load-catalogue): Ignore all errors
+       when reading catalogue file.
+
+       * irchat-menu.el: Do not require `irchat-ctcp'; add autoload
+       settings for `irchat-menu-callback-ctcp-version',
+       `irchat-menu-callback-ctcp-userinfo',
+       `irchat-menu-callback-ctcp-help',
+       `irchat-menu-callback-ctcp-clientinfo' and
+       `irchat-menu-callback-ctcp-ping'; add `irchat-menu-add-url' to
+       `irchat-url-add-hook'.
+
+       * irchat-url.el (irchat-url-add-buttons): Enclose with
+       `save-excursion'; run `irchat-url-add-hook'.
+
+1999-09-06  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * Liece 1.3.7.
+
+       * irchat-xemacs.el (irchat-xemacs-setup-menu): Abolish.
+
+       * irchat-intl.el (irchat-intl-get-msgstr-if): Abolish.
+
+       * irchat-vars.el: Remove defconst for colon keyword.
+
+1999-09-05  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-menu.el: All the menu specs are expanded immediately.
+       (irchat-menu-prepare-menus): Abolish.
+       (irchat-menu-define): New function.
+       (irchat-menu-alist): New variable.
+
+       * irchat-handle.el (irchat-handle-topic-message): Check empty
+       topic line.
+
+       * irchat.el (irchat): When `irchat-startup-channel-list' contains
+       list element send cadr as a channel key.
+
+       * irchat-emacs.el (irchat-emacs-widget-convert-button): Make the
+       keymap `irchat-widget-keymap' parented from current local map.
+
+       * irchat-nick.el (irchat-nick-sort-predicate): New variable.
+       (irchat-nick-update): Sort nicknames with
+       `irchat-nick-sort-predicate'.
+       (irchat-nick-insert): Search sorted position before insertion.
+       (irchat-nick-replace): Call `irchat-nick-insert' when
+       `irchat-nick-sort-predicate' is valid.
+
+       * irchat-message.el (irchat-message-parent-buffer): Add condition
+       for private conversation.
+
+       * irchat-make.el (make-irchat-info-files): Set language
+       environment to `Japanese'.
+
+       * irchat-dcc.el (irchat-dcc-channel-representation-format):
+       Remove.
+
+       * irchat-minibuf.el (irchat-minibuffer-complete-channel-modes):
+       Use `string-list-member-ignore-case' instead of
+       `string-list-ci-member'.
+
+       * irchat-url.el: Remove `irchat-insert-hook'.
+
+       * irchat-hilit.el (irchat-highlight-maybe-turn-on-font-lock):
+       Add `irchat-url-add-buttons' to `irchat-insert-hook'.
+
+       * irchat.el (irchat-initialize-buffers): Fix last change.
+
+       * irchat-300.el: Enclose autoloads by `eval-and-compile'.
+
+       * irchat-channel.el: Declare variable
+       `irchat-dcc-channel-representation-format'.
+
+1999-09-04  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * Liece 1.3.6.
+
+       * irchat.el: Add autoload for `irchat-command-browse-url'; do not
+       require `irchat-url' and `irchat-dcc'; add autoload for
+       `irchat-command-mail-compose'.
+       (irchat-initialize-timers): Rewrite with `dolist'; do
+       not check `irchat-timers-list-initialized-p'.
+       (irchat-truncate-nickname): Use `truncate-string-to-width' instead
+       of `truncate-string'.
+       (irchat-buffer-mode-alist): New variable.
+       (irchat-dialogue-setup-buffer): Abolish.
+       (irchat-others-setup-buffer): Abolish.
+       (irchat-channel-list-setup-buffer): Abolish.
+       (irchat-private-setup-buffer): Abolish.
+       (irchat-KILLS-setup-buffer): Abolish.
+       (irchat-IGNORED-setup-buffer): Abolish.
+       (irchat-WALLOPS-setup-buffer): Abolish.
+       (irchat-CRYPT-setup-buffer): Abolish.
+       (irchat-initialize-buffers): Rewrite.
+
+       * irchat-ctcp.el (irchat-client-version-insert): Do not indent
+       explicitly.
+       (irchat-client-message-no-lf): Abolish.
+
+       * irchat-300.el, irchat-xemacs.el, irchat-commands.el: Do not
+       require `irchat-dcc' and `irchat-mail'.
+
+       * irchat-dcc.el (irchat-command-dcc-send): Remove autoload cookie.
+
+1999-09-03  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-inlines.el (forward-line): Do not advise.
+
+       * irchat-intl.el: Do not require `alist'; require `mcharset',
+       `static' and `cl' during compilation.
+       (irchat-intl-msgid-regexp): Fix regexp.
+       (irchat-intl-msgstr-regexp): Ditto.
+       (irchat-intl-set-msgstr): Abolish.
+       (irchat-intl-load-catalogue): Optimize with side-effects.
+
+       * irchat.el (irchat): Load message catalogue only once.
+
+1999-08-31  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat.el (irchat-close-server-internal): Use
+       `irchat-server-opened'.
+
+       * irchat-hilit.el (irchat-highlight-maybe-turn-on-widget):
+       Abolish.
+
+       * irchat-channel.el (irchat-channel-add-button): Use
+       `irchat-widget-convert-button'.
+
+       * irchat-nick.el (irchat-nick-insert): Use
+       `irchat-widget-convert-button'.
+       (irchat-nick-replace): Ditto.
+
+       * irchat-compat.el (irchat-widget-convert-button): New alias.
+       (irchat-widget-button-click): Alias to `widget-button-click'.
+
+       * irchat-emacs.el (irchat-widget-keymap): New variable.
+       (irchat-emacs-widget-convert-button): New function.
+       (irchat-emacs-widget-button-click): New function.
+       (irchat-widget-convert-button): Redefine here.
+       (irchat-widget-button-click): Redefine here.
+
+       * irchat-url.el (irchat-url-add-buttons): Use
+       `irchat-widget-convert-button'.
+
+1999-08-23  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-emacs.el (irchat-emacs-splash): Use `fontset-pixel-size'.
+
+1999-08-22  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-compat.el: Do not require `wid-browse' during
+       compilation.
+       (irchat-widget-button-click): New function.
+
+       * irchat-emacs.el: Enclose autoloads with `eval-and-compile'.
+       (irchat-emacs-create-mode-line-image): Specify
+       `:ascent' property when creating the image.
+       (irchat-emacs-create-nick-image): Ditto.
+
+1999-08-22  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * Makefile.am (EXTRA_DIST): Add `irchat-emacs.el'.
+
+       * irchat-xemacs.el (irchat-xemacs-glyph-nick-buffer): Abolish.
+       (irchat-xemacs-glyph-nick-region): Remove interactive spec.
+
+       * irchat-intl.el: Do not require `mime-parse'.
+
+       * irchat-tcp.el: Bind `ssl-program-arguments'.
+
+1999-08-22  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-modules.el (irchat-modules-to-compile): Add
+       `irchat-emacs'.
+
+       * irchat-xemacs.el (irchat-xemacs-glyph-nick-buffer): Refine.
+
+       * irchat-vars.el (irchat-icon-directory): Move from
+       `irchat-xemacs.el'.; To be used under FSF Emacs 20.4.91.
+       (irchat-nick-image-alist): Move from `irchat-xemacs.el'.
+
+       * irchat-emacs.el: New file.; Most of FSF Emacs specific routines
+       are stored here.
+       (irchat-emacs-icon-path): New macro.
+       (irchat-emacs-mode-line-buffer-identification): New function.
+       (irchat-emacs-mode-line-buffer-identification): New variable.
+
+1999-08-20  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece.xpm: Reduce colors.
+
+1999-08-20  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-x-face.el (irchat-x-face-insert-function): Don't use
+       `eval-when-compile' while checking bitmap-mule.
+
+1999-08-20  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat.el (irchat-splash-pixmap): Renamed from
+       `irchat-stipple-pixmap'; use the XPM data under FSF Emacs 20.4.91.
+       (irchat-x-splash): Likewise.
+
+       * irchat-channel.el (irchat-channel-virtual): Undo last change.
+
+1999-08-15  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-400.el (irchat-handle-400-messages): Do not pass empty
+       channel names to `irchat-channel-virtual'.
+
+       * irchat-channel.el (irchat-channel-virtual): Make channel ID for
+       `!' channels invisible from user.
+
+       * irchat-vars.el (irchat-channel-id-length): Default to 5.
+
+1999-08-14  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-300.el (irchat-353-channel): Abolish.
+       (irchat-handle-366-message): Do not use `irchat-353-channel'.
+
+1999-08-13  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-200.el (irchat-handle-218-message): Do not indent
+       explicitly.
+
+1999-08-08  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-compat.el (with-timeout): New macro for compatibility.
+
+       * irchat-xemacs.el: Check `horizontal-scrollbar-visible-p' for
+       XEmacs 20.4.
+
+       * irchat.el (irchat-open-server): Do not truncate trailing `_'.
+
+       * Liece 1.3.5.
+
+       * irchat-handle.el (irchat-handle-mode-message): Handle channel
+       invite list.
+       (irchat-handle-join-message): Pass optional argument to
+       `match-string'.
+
+       * irchat-channel.el (irchat-channel-get-invites): New macro.
+       (irchat-channel-add-invite): New macro.
+       (irchat-channel-remove-invite): New macro.
+       (irchat-channel-set-invite): New macro.
+
+       * irchat-300.el: Handle channel invite list.
+       (irchat-handle-346-message) <RPL_INVITELIST>: New handler.
+       (irchat-handle-347-message) <RPL_ENDOFINVITE>: New handler
+
+1999-08-07  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-200.el: Register 200 handler again.
+       (irchat-handle-200-message): Do not indent explicitly.
+       (irchat-handle-201-message): Likewise.
+       (irchat-handle-213-message): Likewise.
+       (irchat-handle-214-message): Likewise.
+       (irchat-handle-262-message) <RPL_ENDOFTRACE>: New handler.
+
+       * irchat-300.el (irchat-handle-365-message): Turn hops count into
+       string.
+
+       * irchat-xemacs.el (irchat-toolbar-map-button-list): Fix typo.
+
+1999-08-06  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-intl.el (irchat-intl-load-catalogue): Add nil check.
+       (irchat-intl-catalogue-path): Fix last change.
+
+1999-08-06  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-window.el (irchat-window-load-style-file): Cache
+       `irchat-window-style-directory'.
+
+       * irchat-xemacs.el (irchat-xemacs-icon-path): Cache
+       `irchat-icon-directory'.
+
+       * irchat-intl.el (irchat-intl-catalogue-path): New macro.
+       (irchat-intl-load-catalogue): Use it.
+
+       * irchat-make.el (install-update-manifest-file): Fix for data
+       directories.
+       (config-irchat-package-directory): Splitt into
+       `config-irchat-package'.
+
+       * irchat-xemacs.el: Do not require `smiley'.
+       (irchat-xemacs-icon-path): New macro.
+       (irchat-toolbar-icon-plist-get): Use it.
+       (irchat-xemacs-setup-toolbar): Use it.
+       (irchat-xemacs-create-nick-glyph): Use it.
+       (irchat-xemacs-modeline-glyph): Use it.
+
+       * irchat-vars.el (irchat-use-smiley): Abolish.
+
+       * irchat-hilit.el (irchat-maybe-smiley-region): Abolish. If you
+       want to use this functionality, please setup `irchat-insert-hook'.
+
+1999-08-05  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * liece.xpm: New splash logo.
+
+       * irchat-xemacs.el (irchat-xemacs-splash-at-point): Use
+       `glyph-width', `glyph-height' and `window-pixel-height' to
+       calculate position of the splash logo.
+
+1999-08-04  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-compat.el (irchat-find-data-directory): Move from
+       `irchat-misc'.
+
+       * irchat-intl.el: Use new style macros.
+       (irchat-intl-parse-Content-Type): Check statically if
+       `mime-content-type-parameter' is available.
+       (irchat-intl-load-catalogue): Use `irchat-find-data-directory'.
+
+       * irchat.el (irchat-open-server): Add server parameter `relay'.
+
+       * irchat-window.el (irchat-window-set-default-style): Use
+       `irchat-find-data-directory'.
+
+       * irchat-tcp.el: Fix comment string.
+       (irchat-tcp-open-rlogin-stream): New function.
+       (irchat-tcp-open-rlogin-stream-as-binary): New function.
+       (irchat-tcp-default-connection-type): Add rlogin to custom spec.
+       (irchat-tcp-rlogin-program): New variable.
+       (irchat-tcp-relay-host): New variable.
+       (irchat-tcp-rlogin-parameters): New variable.
+       (irchat-tcp-rlogin-user-name): New variable.
+
+1999-08-03  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-config.el (irchat-config-info-file-regexp): New variable.
+
+       * irhcat-hilit.el: Require font-lock during compilation.
+
+       * irchat-vars.el (irchat-tab-stop-list): New variable.
+
+       * irhcat-000.el, irchat-200.el, irchat-300.el, irchat-400.el,
+       irchat-ctcp.el: Do not use `mapcar' when registering handlers.
+
+       * irchat-misc.el (irchat-find-etc-directory): New function.
+
+       * irchat.el: Add autoloads for
+       `bitmap-stipple-xbm-file-to-stipple' and
+       `bitmap-stipple-insert-pixmap'.
+
+       * irchat-xemacs.el (irchat-x-face-insert-with-xemacs): Use xface
+       glyph if this feature has been provided and `console-type' returns
+       'tty or 'pc, or otherwise make string glyph.
+       [Rename from overriding function `irchat-x-face-insert']
+       (irchat-xemacs-create-nick-glyph): Call `console-type' instead of
+       referring `window-system'.
+       (irchat-xemacs-modeline-glyph): Check current console type.
+       (irchat-xemacs-splash-at-point): Ditto.
+       (irchat-find-etc-directory): Advise it.
+
+       * irchat-compat.el (irchat-static-autoload): New macro.
+       (colon-keyword-usable): New facility checking.
+
+       * irchat-x-face.el: Add autoloads for `x-face-encode',
+       `x-face-read-existing-file-name', `bitmap-insert-xbm-buffer',
+       `bitmap-decode-xbm', `bitmap-read-xbm-buffer' and `bitmap-compose'.
+       (irchat-x-face-insert-function): New variable.
+       (irchat-x-face-insert-with-bitmap): Rename from overriding
+       function `irchat-x-face-insert'.
+
+       * irchat-url.el: Do not check with requiring browse-url. Assume
+       that function `browse-url' have already been autoloaded.
+
+1999-08-01  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat.el (irchat-command-mode): Set local value of
+       `next-line-add-newlines' 't.
+       (irchat-wait-for-response): Use `with-timeout'.
+       (irchat): Do not use `make-variable-buffer-local' when
+       `irchat-freeze' and `irchat-own-freeze' are initialized.
+       (irchat-dialogue-mode): Define `irchat-freeze' and
+       `irchat-own-freeze' here.
+
+       * irchat-misc.el (next-line): Abolish.
+
+       * irchat-handle.el (irchat-handle-nick-message): Fix typo.
+
+1999-07-30  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-inlines.el (string-list-modify-ignore-case): Fix typo.
+
+1999-07-29  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-make.el: Generate file `MANIFEST.liece'.
+       (install-update-manifest-file): New function.
+
+1999-07-28  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-commands.el (irchat-command-end-of-buffer): Do not use
+       `set-window-point'.
+
+       * irchat-300.el (irchat-handle-367-message): Use
+       `irchat-channel-add-ban' instead of temp variable.
+       (irchat-367-channel): Abolish.
+       (irchat-367-regexps): Abolish.
+       (irchat-handle-348-message): New handler for handling channel
+       exception list.
+       (irchat-handle-349-message): New handler for handling channel
+       exception list.
+
+1999-07-27  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-handle.el (irchat-handle-mode-message): Handle channel
+       exception list.
+
+       * irchat-channel.el: (irchat-channel-get-exceptions): New macro.
+       (irchat-channel-add-exception): New macro.
+       (irchat-channel-remove-exception): New macro.
+       (irchat-channel-set-exception): New macro.
+
+1999-07-25  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-commands.el (irchat-command-end-of-buffer): Do not use
+       `pop-to-buffer'.
+       (irchat-command-describe-briefly): Do not use backquote.
+
+1999-07-24  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-compat.el: Do not refer `widget-minor-mode-map'.
+
+       * irchat-hilit.el (irchat-highlight-maybe-turn-on-widget): Use
+       `current-local-map' instead of `widget-minor-mode-map'.
+
+       * Liece 1.3.4.
+
+       * irchat-q-ccl.el (irchat-quote-ccl-encode-region): Fix typo.
+
+       * irchat-crypt.el: Add autoload for `crc32-string'.
+       (irchat-crypt-hash-crc32-string): New function.
+       (irchat-crypt-default-hash-function): New variable.
+       (irchat-crypt-key-fingerprint): Rewrite with above functions.
+
+       * irchat-handle.el (irchat-handle-topic-message): Fix argument
+       order of `irchat-channel-set-topic'.
+
+       * irchat-misc.el (irchat-maybe-update-channel-indicator): Abolish.
+       Call `irchat-set-channel-indicator' directly.
+
+       * irchat-nick.el (irchat-nick-replace): Remove widgets.
+
+       * irchat-menu.el (irchat-nick-popup-menu): Move "Kick" menu to the
+       bottom of menu entries.
+
+       * irchat-xemacs.el (irchat-xemacs-setup-menu): Ditto.
+
+1999-07-23  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-globals.el (irchat-frame-title-format-last): Abolish.
+
+       * irchat.el (irchat-accept-response): Call `irchat' with no
+       arguments. Here's the point that take care of growing tail.
+       (irchat): Call `irchat-window-configuration-pop' and
+       `irchat-window-configuration-push' consequently.
+
+       * irchat-commands.el (irchat-command-keepalive): Call `irchat'
+       with no arguments.
+
+       * irchat-filter.el (irchat-sentinel): Call `irchat' with no
+       arguments.
+
+       * irchat-window.el: Add window configuration stack utility.
+       (irchat-window-configuration-push): New function.
+       (irchat-window-configuration-pop): New function.
+       (irchat-window-configuration-stack): New variable.
+
+       * irchat-compat.el: Require wid-edit and wid-browse during
+       compilation.
+       (widget-minor-mode-map): Bind `mouse-button-3'.
+       (irchat-dont-set-event-point): New advice against
+       `widget-button-click' for FSF Emacs.
+       (irchat-save-current-buffer): New advice against
+       `widget-button-click' for FSF Emacs.
+       (remassq): New function.
+
+       * irchat-channel.el (irchat-channel-push-button): Abolish.
+       (irchat-channel-list-insert): Abolish.
+       (irchat-channel-button): New widget.
+       (irchat-channel-add-button): New function.
+       (irchat-channel-button-action): New function.
+
+       * irchat-url.el: Use widget.
+       (irchat-url-link): New widget.
+       (irchat-url-add-button): New function.
+       (irchat-url-iterate-buffer): Abolish.
+       (irchat-url-search-forward): Abolish.
+       (irchat-url-add-to-completion): Abolish
+       (irchat-url-link-action): Renamed from irchat-url-push-button.
+
+       * irchat-hilit.el: Renamed from irchat-hilight.el.
+       (irchat-highlight-overlay-put-mouse-face): Abolish.
+       (irchat-highlight-insert-with-mouse-face): Abolish.
+       (irchat-highlight-insert-line-with-mouse-face): Abolish.
+       (irchat-highlight-with-widget): Abolish.
+       (irchat-url-face): Abolish.
+       (irchat-mouse-face): Abolish.
+       (irchat-highlight-maybe-turn-on-widget): New function.
+       This function turns on `widget-minor-mode' in
+       `irchat-nick-mode', `irchat-channel-list-mode' or
+       `irchat-dialogue-mode'.
+
+1999-07-21  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * Liece 1.3.3.
+
+       * irchat.el (irchat-override-command-keys): Bind "\C-c\C-a" to
+       `irchat-command-previous-channel'.
+
+       * irchat-crypt.el: Add routines for encapsulate cipher algorithms.
+       (irchat-crypt-import-cipher-algorithm): New function.
+       (irchat-crypt-key-fingerprint): New function.
+       (irchat-crypt-build-decryption-key): New function.
+       (irchat-crypt-build-encryption-key): New function.
+       (irchat-crypt-encrypt-string): New function.
+       (irchat-crypt-decrypt-string): New function.
+       (irchat-crypt-algorithm-major-version): New function.
+       (irchat-crypt-algorithm-minor-version): New function.
+       (irchat-crypt-secure-passphrase-read): Abolish.
+       (irchat-crypt-ignore-suspicious): Abolish.
+       (irchat-crypt-ignore-defected): Abolish.
+       (irchat-get-idea-decryption-key): Abolish.
+       (irchat-command-set-default-key): Check if this function was
+       called interactively.
+       (irchat-command-add-decryption-key): Renamed from
+       `irchat-command-add-new-key'.
+       (irchat-command-delete-decryption-key): Renamed from
+       `irchat-command-delete-key'.
+       (irchat-crypt-decryption-keys): Renamed from
+       `irchat-crypt-known-keys'.
+       (irchat-crypt-encryption-keys): Renamed from
+       `irchat-crypt-default-keys'.
+
+       * irchat-coding.el (irchat-default-mime-charset-for-read): New
+       variable. Default to 'x-ctext.
+
+       * irchat-compat.el: Do not require 'defface.
+       (irchat-compat-enable-to-read-multibyte): Abolish.
+
+       * irchat-modules.el (irchat-modules-to-compile): Remove
+       `irchat-ck-*' and `defface'. Use `japanese-zenkaku-*' with hook.
+
+       * irchat-vars.el (irchat-convert-hankaku-katakana): Abolished.
+
+       * irchat-inlines.el: All string functions are rewritten.
+
+1999-07-05  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-ctcp.el: Register ACTION handler.
+
+1999-07-04  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-version.el (irchat-emacs-user-agent-value): Modify for
+       XEmacs UTF-2000-MULE.
+
+       * irchat-crypt.el: Do not use IDEA as the default cipher algorithm.
+       (irchat-crypt-cipher-algorithm): New variable.
+       (irchat-crypt-encrypt-message-format): Add version field of
+       the cipher algorithm.
+       (irchat-crypt-current-keys): Always restore the computed keys into
+       this variable. [Renamed from irchat-default-idea-key-list]
+
+1999-06-26  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-xemacs.el (irchat-use-toolbar): Add custom spec.
+       (irchat-toolbar-toggle-crypt): Check irchat-use-toolbar.
+       (irchat-setup-toolbar): Ditto.
+
+1999-06-14  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * Liece 1.3.2.
+
+       * irchat.el (irchat-define-keys): Rewrite.
+       (irchat-truncate-nickname): Rewrite; rename from irchat-read-nickname.
+
+       * irchat-handle.el, irchat-400.el, irchat-300.el, irchat-200.el,
+       irchat-000.el:
+       Declarations of hook variables are splitted into each file.
+
+       * irchat-300.el: Register 322 reply handler.
+
+1999-06-11  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat.el (irchat-dialogue-mode-map): Bind mouse-button-2 to
+       irchat-url-push-button.
+
+       * irchat-url.el (irchat-url-push-button): Check all overlays
+       around event point.
+
+       * irchat-filter.el (irchat-handle-message): Ignore errors which
+       occurs during hook evaluation.
+
+       * irchat-ctcp.el (irchat-ctcp-message): Ignore errors which
+       occurrs during hook evaluation.
+       (irchat-ctcp-notice): Likewise.
+       (irchat-ctcp-file-notice): Likewise.
+
+       * irchat-channel.el (irchat-channel-push-button): Use
+       irchat-overlays-at instead of overlays-at.
+
+1999-06-10  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-hilight.el (irchat-quoted-colors-mirc):
+       Rename from irchat-quoted-colors.
+       (irchat-quoted-colors-ircle): New color table.
+       (irchat-highlight-maybe-hide-prefix): Fix regexp.
+       (irchat-highlight-colorize-quote): Check vender specific extension.
+
+       * irchat-channel.el (irchat-channel-push-button):
+       Check all overlays under the point.
+
+       * irchat-filter.el: Rename default backend name to "generic".
+
+       * irchat-handle.el: Use multiple values bindings.
+       (irchat-handle-notice-message): Fix argument against
+       irchat-ctcp-notice.
+
+       *irchat-misc.el (irchat-compose-time-string): Use
+       format-time-string. Now only accepts encoded time.
+
+       * irchat-misc.el (irchat-pick-buffer): Check if chnl is string and
+       apropriate buffer does not exist.
+       (irchat-pick-buffer-1): Do not return buffer list.
+
+1999-06-10  Daiki Ueno  <ueno@unixuser.org>
+
+       * irchat.el (irchat-debug-mode-map): Abolish.
+       (irchat-debug-keys): Abolish.
+       (irchat-command-keys): Fix return key code.
+
+       * irchat-window.el (irchat-window-to-buffer):
+       Remove irchat-debug-buffer.
+
+       * irchat-vars.el (irchat-debug-mode-hook): Abolish.
+       (irchat-debug-prefix): Abolish.
+
+       * irchat-nick.el (irchat-nick-equal): New alias to string-ci-equal.
+       (irchat-nick-member): New function.
+       (irchat-command-toggle-nick-buffer-mode): Do not toggle when
+       irchat-nick-buffer has not been created.
+
+       * llhandler.el, irchat-modules.el (irchat-modules-to-compile):
+       Remove llhandler.
+
+       * irchat-misc.el (irchat-split-line): New function.
+       (irchat-split-rest): Abolish.
+       (irchat-with-split-rest): Abolish.
+       (irchat-maybe-update-channel-indicator): Do not use backquote.
+       (irchat-freeze-toggle): Use irchat-nick-equal.
+       (irchat-message-from-ignored): Rename from irchat-msg-from-ignored.
+
+       * irchat-message.el (irchat-message-parent-buffer):
+       Use irchat-nick-equal.
+
+       * irchat-make.el (compile-irchat): Add comments.
+
+       * irchat-intl.el (irchat-intl-prepare-prefix):
+       Do not treat irchat-debug-prefix.
+
+       * irchat-inlines.el (filter-elements): Move from irchat-compat.
+
+       * irchat-globals.el (irchat-debug-buffer): Remove.
+
+       * irchat-crypt.el (irchat-idea-encrypt-message-format): Rename from
+       irchat-idea-encrypt-msg-format.
+       (irchat-crypt-maybe-decrypt-message): Use irchat-nick-equal.
+
+       * irchat-compat.el: Require cl at load time.
+       (buffer-or-string-p): Remove.
+       (irchat-get-buffer-window): Enclose with eval-and-compile.
+       (irchat-get-buffer-window-list): Ditto.
+       (irchat-mode-line-buffer-identification): New alias to 'identity.
+       (mapvector): Remove.
+
+       * irchat-commands.el (irchat-command-debug): Abolished.
+       (irchat-command-join-channel): Use irchat-channel-equal.
+       (irchat-command-join): Use force-mode-line-update.
+       (irchat-command-private-conversation): Ditto.
+       (irchat-command-list): Check if 1st argument is empty string.
+       (irchat-command-who): Ditto.
+       (irchat-command-names): Ditto.
+       (irchat-command-mode+o): Use irchat-nick-member.
+
+       * irchat-channel.el (irchat-command-toggle-channel-buffer-mode):
+       Do not toggle when
+       irchat-channel-buffer has not been created.
+
+       * irchat-handle.el, irchat-filter.el, irchat-dcc.el,
+       irchat-ctcp.el, irchat-500.el, irchat-400.el, irchat-300.el,
+       irchat-200.el, irchat-000.el: Use llunf instead of llhandler.
+
+       * llunf.el: New file.
+
+       * idea.el, b64.el (>>): Move from irchat-compat.
+       (<<): Ditto.
+
+1999-06-06  Daiki Ueno  <ueno@unixuser.org>
+
+       * irchat-misc.el (irchat-freeze-toggle): Use force-mode-line-update.
+       (irchat-own-freeze-toggle): Ditto.
+
+       * irchat-dcc.el: Require irchat-minibuf.el.
+       (irchat-command-dcc-send): Use
+       irchat-minibuffer-completing-default-read.
+       (irchat-command-dcc-chat-listen): Ditto.
+
+1999-06-04  Daiki Ueno  <ueno@unixuser.org>
+
+       * irchat.el (irchat-override-command-keys): Add "\C-v" and "l".
+       (irchat-dialogue-keys): Remove "\C-v" and "\C-f".
+
+       * irchat.el (irchat-override-command-keys):
+       Add "\C-n", "\C-p" and "\C-a".
+       (irchat-dialogue-keys): Remove "\C-n" and "\C-p".
+
+       * irchat-nick.el (irchat-nick-set-user-at-host): New macro.
+       (irchat-nick-mark-as-apart): New macro.
+       (irchat-nick-unmark-as-apart): New macro.
+
+       * irchat-version.el (irchat-emacs-user-agent-value):
+        Ignore parenthesis in
+       `emacs-version' for XEmacs 21.2.15.
+
+1999-06-03  Daiki Ueno  <ueno@unixuser.org>
+
+       * irchat-handle.el, irchat-dcc.el, irchat-500.el, irchat-300.el,
+       irchat-200.el: Do not check "strange" reply.
+
+       * irchat-message.el (irchat-message-parent-buffer):
+       Check if irchat-current-channel exists.
+
+       * irchat-coding.el: Do not require irchat-vars.
+
+       * irchat-menu.el (irchat-nick-popup-menu):
+       Enclose save-selected-window.
+
+       * irchat-misc.el (irchat-get-buffer-create): Do not use unless.
+
+       * irchat-nick.el (irchat-nick-change): Set chnl property internally.
+
+       * irchat-dcc.el (irchat-command-dcc-chat-listen):
+       Use irchat-get-buffer-create instead
+       of get-buffer-create.
+       (irchat-command-dcc-chat-connect): Ditto.
+       (irchat-dcc-compare-hostnames): Ditto.
+
+       * irchat-ctcp.el (irchat-file-start):
+       Use irchat-get-buffer-create instead of
+       get-buffer-create.
+       (irchat-file-cont): Ditto.
+       (irchat-file-end): Ditto.
+       (irchat-ctcp-client-notice): Ditto.
+
+       * irchat.el (irchat-open-server-internal):
+       Use irchat-get-buffer-create instead of
+       get-buffer-create.
+       (irchat-dialogue-setup-buffer): Ditto.
+       (irchat-others-setup-buffer): Ditto.
+       (irchat-channel-list-setup-buffer): Ditto.
+       (irchat-private-setup-buffer): Ditto.
+       (irchat-KILLS-setup-buffer): Ditto.
+
+1999-06-02  Daiki Ueno  <ueno@unixuser.org>
+
+       * irchat-xemacs.el (irchat-xemacs-nick-popup-menu):
+       Remove save-excursion.
+
+       * irchat-channel.el (irchat-channel-push-button):
+       Remove save-excursion, just use save-selected-window instead.
+       (irchat-channel-real): Remove save-match-data.
+
+       * irchat.el (irchat-clear-system):
+       Check irchat-obarray has been initialized.
+
+       * Makefile.am (SOURCES): Add irchat-message.el and irchat-coding.el.
+       (EXTRA_DIST): Add liece.xbm.
+
+1999-06-02  Daiki Ueno  <ueno@unixuser.org>
+
+       * Liece 1.3.1.
+
+       * irchat-url.el (url-irc-liece): New function.
+       [should be called from url-irc.el]
+
+       * Makefile.am (EXTRA_DIST): Add bitmap-stipple.
+
+1999-06-02  Daiki Ueno  <ueno@unixuser.org>
+
+       * irchat-coding.el (irchat-detect-coding-region): New function.
+       (irchat-detect-coding-region-function): Use above.
+
+       * irchat-coding.el (irchat-detect-coding-string): New function.
+       (irchat-detect-coding-string-function): Use above.
+
+       * irchat-channel.el (irchat-channel-push-button):
+       Switch to channel list buffer.
+
+1999-06-02  Daiki Ueno  <ueno@unixuser.org>
+
+       * irchat-nick.el (irchat-nick-update-region): Undo last change.
+
+       * irchat-menu.el (irchat-nick-popup-menu): Switch to nick buffer.
+
+       * irchat-filter.el: fix comments.
+       (irchat-filter): Split multiple lines without string matching.
+       (irchat-handle-message): Renamed from irchat-handle-message-2.
+       (irchat-parse-user-at-host): New function.
+
+       * irchat-coding.el (irchat-detect-coding-region-function): Renamed from
+       irchat-custom-detect-coding-region-function.
+       (irchat-detect-coding-string-function): Renamed from
+       irchat-custom-detect-coding-string-function.
+
+1999-06-01  Daiki Ueno  <ueno@unixuser.org>
+
+       * irchat.el (irchat-command-mode): Do not use mapvector.
+
+       * irchat-handle.el (irchat-handle-notice-msg): Fix arguments against
+       with-irchat-decryption.
+       (irchat-handle-privmsg-msg): Likewise.
+
+       * irchat-commands.el (irchat-command-send-message): Fix arguments of
+       with-irchat-encryption.
+       (irchat-command-message): Likewise.
+
+       * irchat-crypt.el (irchat-crypt-maybe-decrypt-message):
+       Exchange car with cdr in arglist.
+       (with-irchat-encryption): Accept flat arglist.
+       (with-irchat-decryption): Likewise.
+
+       * irchat.el (irchat-nick-mode-map): Define as prefix commands.
+
+       * irchat.el (irchat-channel-mode): Eliminate channel indicator.
+       (irchat-others-mode): Likewise.
+       (irchat-dialogue-mode): Likewise.
+
+       * irchat-misc.el (irchat-set-channel-indicator):
+       Eliminate channel indicator.
+
+       * irchat-ctcp.el (irchat-ctcp-action-msg):
+       Use irchat-display-message.
+
+1999-06-01  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-400.el: Remove redundancies on regexps.
+       (irchat-handle-432-msg) <ERR_ERRONEUSNICKNAME>: Rewrite.
+       (irchat-handle-433-msg) <ERR_NICKNAMEINUSE>: Resend NICK command only
+       if irchat-auto-iterate-nick is non-nil.
+
+       * irchat.el (irchat-command-keys): Add irchat-command-mode+o,
+       irchat-command-mode-o, irchat-command-mode+v, irchat-command-mode-v.
+       XXX: Should be prefixed commands?
+
+1999-05-31  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-message.el (irchat-message-predicate):
+       Normalize irchat-message-blackets-predicate.
+
+       * irchat-inlines.el (irchat-eval-form): New function.
+
+       * irchat-message.el (irchat-message-predicate):
+       Rename specifier typep to type.
+
+       * irchat-misc.el (irchat-own-channel-message):
+       Bind irchat-message-direction 'outgoing.
+       (irchat-own-private-message): Ditto.
+
+       * irchat-message.el (irchat-message-tags): New variable.
+       (irchat-message-tags-function): New function.
+       (irchat-message-private-buffer): Abolished.
+       Use irchat-message-buffer-function.
+
+1999-05-31  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-nick.el (irchat-nick-update-region):
+       Move opening save-excursion.
+
+       * irchat-channel.el (irchat-channel-push-button):
+       Move point to event ocurred position before calling
+       irchat-nick-update-region.
+
+       * irchat-nick.el (irchat-nick-update-region):
+       Remove argument event from arglist.
+
+       * irchat-menu.el (irchat-nick-popup-menu):
+       Move point to event ocurred position before calling
+       irchat-nick-update-region.
+
+       * irchat-xemacs.el (irchat-xemacs-setup-menu):
+       Remove argument event from arglist.
+       (irchat-xemacs-nick-popup-menu): Move point to event ocurred
+       position before calling irchat-nick-update-region.
+
+       * irchat.el: Use modern key sequence expression.
+       (irchat-command-map): New keymap which override
+       irchat-dialogue-keys with prefix command ("\C-c").
+       (irchat-friends-map): New keymap. [prefix command for friends]
+       (irchat-dialogue-keys): Import some useful command keys.
+
+       * irchat-channel.el (irchat-channel-parse-representation):
+       To remove let, construct representation object directly.
+
+       * irchat-channel.el (irchat-channel-list-insert): Remove format.
+
+       * irchat-vars.el: Do not require mcharset.
+
+       * irchat.el (irchat-nick-mode-map): Do not check xemacs.
+
+       * irchat-xemacs.el (irchat-nick-popup-menu): New alias to
+       irchat-xemacs-nick-popup-menu which override original one.
+
+       * irchat-compat.el: Use emu's mouse-button emulation.
+       (irchat-button2): Abolished.
+       (irchat-button3): Abolished.
+
+       * irchat-vars.el (irchat-variables-files): Do not load
+       `~/.irchat3_vars.el' at startup time.
+
+       * irchat-vars.el (irchat-debug-prefix): Clear.
+
+       * irchat.el: Do not check `set-face-stipple' is bound.
+       (irchat-x-splash): Add interactive spec.
+
+1999-05-30  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat.el (irchat-x-splash): Do centering.
+
+       * bitmap-stipple.el (bitmap-stipple-insert-pixmap):
+       Add optional argument center.
+
+       * liece.xbm: New file.
+
+       * irchat.el: Check if liece.xbm exists.
+
+       * irchat.el (irchat-stipple-pixmap): New variable.
+       (irchat-x-splash): New function.
+
+       * bitmap-stipple.el: New file.
+
+       * irchat-modules.el (irchat-modules-to-compile): Add bitmap-stipple.
+
+       * irchat-commands.el (irchat-command-send-action): Fix typo.
+
+       * irchat-hilight.el (irchat-highlight-font-lock-keywords):
+       Fix regexp.
+
+       * irchat-inlines.el (irchat-or): New function.
+       (irchat-and): New function.
+
+       * irchat-filter.el (irchat-handle-msg-msg): Abolished.
+
+       * irchat-crypt.el (irchat-message-encrypted-p): Move into
+       irchat-message.
+       (irchat-message-suspicious-p): Ditto.
+       (irchat-message-garbled-p): Ditto.
+       (irchat-message-fingerprint): Ditto.
+       (irchat-message-timestamp): Ditto.
+
+       * irchat-vars.el: All format strings are removed.
+       (irchat-format-string): Abolished.
+
+       * irchat-modules.el (irchat-modules-to-compile): Add
+       irchat-message.
+
+       * irchat-dcc.el (irchat-dcc-chat-filter): Use
+       irchat-display-message.
+
+       * irchat-commands.el (irchat-command-send-action):
+       Bind irchat-message-type.
+
+       * irchat-handle.el (irchat-handle-privmsg-msg):
+       Use irchat-display-message.
+       (irchat-handle-privmsglike-msg): Abolished.
+
+       * irchat-misc.el (irchat-own-channel-message):
+       Use irchat-display-message.
+       (irchat-own-private-message): Likewise.
+
+       * irchat-message.el: New file.
+
+1999-05-29  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat.el, irchat-vars.el (irchat-before-kill-emacs-hook): New hook.
+
+1999-05-29  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-vars.el (irchat-signoff-message):
+       Renamed from irchat-signoff-msg.
+
+       * irchat.el (irchat-obarray-size): Moved from irchat-globals.el.
+
+       * irchat-globals.el: Remove obsolete variables.
+
+       * irchat-ctcp.el (irchat-client-error-message):
+       Moved from irchat-globals.el.
+
+       * irchat-commands.el (irchat-save-variables-are-dirty): Renamed
+       from irchat-save-vars-is-dirty.
+       (irchat-command-send-action): Add prefix.
+
+       * irchat-400.el (irchat-nickname-last): Renamed from
+       irchat-old-nickname.
+
+       * irchat-000.el (irchat-servername): Abolished.
+
+1999-05-28  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-crypt.el: Do not require 'idea.
+
+       * irchat-commands.el (irchat-command-message): Treat channel target.
+
+       * irchat-300.el (irchat-handle-317-msg) <RPL_WHOISIDLE>:
+       Add argument rest to match-string.
+
+1999-05-28  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * Liece 1.2.8.25.
+
+       * irchat.el (irchat-command-keys): Do not bind lisp-complete-symbol.
+
+       * irchat-commands.el (irchat-command-load-vars): Enclose body with
+       unwind-protect.
+       (irchat-command-complete): Use irchat-minibuffer-finalize-completion.
+       (get-word-left): Abolished.
+       (irchat-switch-to-channel-1): New function.
+       (irchat-switch-to-channel): Use irchat-switch-to-channel-1.
+       (irchat-switch-to-channel-no): Likewise.
+       (irchat-command-message): Check crypt-type.
+
+       * irchat-minibuf.el (irchat-minibuffer-complete-channel-modes):
+       Complete ban patterns.
+       (irchat-minibuffer-parse-modes): Rename property 'uah to 'ban.
+
+       * irchat-handle.el (irchat-handle-mode-msg):
+       Use irchat-channel-set-ban.
+
+       * irchat-channel.el (irchat-channel-add-ban): New macro.
+       (irchat-channel-remove-ban): New macro.
+       (irchat-channel-set-ban): New macro.
+       (irchat-channel-get-bans): New function.
+
+       * irchat-300.el:
+       (irchat-handle-317-msg) <RPL_WHOISIDLE>: Remove condtionals for
+       obsolete servers. [2.5 or 2.6].
+       (irchat-handle-367-msg) <RPL_BANLIST>: Treat it as generic long
+       reply handler.
+       (irchat-367-channel): New variable.
+       (irchat-367-regexps): New variable.
+       (irchat-handle-368-msg) <RPL_ENDOF_BANLIST>: Save ban patterns as
+       'ban property.
+
+1999-05-26  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat.el (irchat-clear-system):
+       Use dotimes when initializing irchat-obarray.
+
+1999-05-26  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat.el (irchat-command-keys):
+       Bind irchat-command-display-friends.
+
+       * irchat-commands.el (irchat-command-display-friends): New command.
+
+       * irchat-vars.el (irchat-display-friends-function): New variable.
+
+       * irchat-300.el (irchat-303-display-friends): New function.
+       (irchat-303-display-all-friends): New function.
+
+       * irchat-minibuf.el (irchat-minibuffer-complete-channel-modes):
+       Complete nickname using operators and voices.
+       (irchat-minibuffer-parse-modes): Likewise.
+       (irchat-minibuffer-finalize-completion): Notice no match found.
+
+       * Makefile.am: New file.
+
+1999-05-25  UENO Daiki  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat.el (irchat-others-mode): Set parent mode explicitly.
+       (irchat-channel-mode): Ditto.
+
+1999-05-24  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-minibuf.el (irchat-minibuffer-parse-modes): Parse ban
+       pattern.
+
+       * irchat-200.el (irchat-handle-206-msg) <RPL_TRACESERVER>:
+       Use multiline display format.
+       (irchat-handle-214-msg) <RPL_STATSNLINE>: Likewise.
+       (irchat-handle-213-msg) <RPL_STATSCLINE>: Likewise.
+
+       * irchat-ctcp.el (irchat-client-insert): Quote format string.
+
+1999-05-23  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * Liece 1.2.8.24.
+
+       * irchat-ctcp.el (irchat-minibuffer-complete-client-query): Use
+       `irchat-minibuffer-finalize-completion'.
+
+       * irchat-minibuf.el (irchat-minibuffer-finalize-completion): New
+       function.
+       (irchat-minibuffer-complete-channel-modes): Use above.
+
+       * irchat.el (irchat-check-buffers): Fix loop condition.
+
+1999-05-23  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-dcc.el (irchat-dcc-message): New function.
+
+       * irchat-nick.el (irchat-nick-join-1): Check dups.
+
+       * irchat-ctcp.el (irchat-client-insert): New function.
+
+       * irchat-commands.el (irchat-command-prepare-message-prefix):
+       Abolished.
+       (irchat-command-prepare-own-message-prefix): Ditto.
+
+       * irchat-misc.el (irchat-own-private-message): Generate prefix
+       string automatically.
+       (irchat-own-channel-message): Likewise.
+
+1999-05-22  Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * irchat-compat.el (run-hook-with-args-until-success): Abolished.
+
+       * irchat.el (irchat-command-mode): Change mode-line-format.
+       (irchat-open-server): Save password.
+       (irchat-insert-internal): Rewrite.
+
+       * irchat-200.el (irchat-handle-215-msg) <RPL_STATSILINE>:
+       Fix regexp.
+       (irchat-handle-242-msg) <RPL_STATSUPTIME>: Cut off preceding `:'.
+       (irchat-handle-205-msg) <RPL_TRACEUSER>: Fix typo.
+       (irchat-handle-218-msg) <RPL_STATSYLINE>: Fix display format.
+
+1999-05-13  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-inlines.el (format-quote): Abolished.
+
+       * irchat-ctcp.el (irchat-ctcp-action-msg): Pass arguments to
+       PRIVMSG handler.
+
+       * irchat-hilight.el (irchat-highlight-turn-on-font-lock): Make
+       `after-change-hook' local.
+
+1999-05-12  sphere      <sphere@pop12.odn.ne.jp>
+
+       * irchat-url.el (irchat-command-browse-url): Fix typo.
+
+1999-05-11  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-crypt.el (irchat-command-set-default-key): Fix typo.
+
+       * irchat-window.el (irchat-command-set-window-style): Fix typo.
+
+       * irchat-url.el (irchat-command-browse-url): Fix typo.
+
+       * irchat-channel.el (irchat-channel-set-voice): Quote regexp.
+
+1999-05-09  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-ctcp.el (irchat-command-client-time): Fix typo.
+
+       * irchat.el (irchat-channel-mode): Explicitly define as
+       it derives from `irchat-dialogue-mode'.
+       (irchat-others-mode): Ditto.
+
+       * irchat-compat.el (irchat-kill-all-overlays): New function.
+
+       * irchat-nick.el (irchat-nick-update): Do not switch to buffer.
+       (irchat-nick-join): Do not check whether nickname has been inserted.
+       (irchat-nick-update): Kill all overlays.
+
+       * irchat-mail.el: Follow the value of `mail-user-agent'.
+       (irchat-mail-pop-to-buffer): Abolished.
+       (irchat-mail-compose-with-mail): Abolished.
+       (irchat-mail-compose-with-gnus): Abolished.
+
+       * irchat-inlines.el (nth1, nth1cdr):Abolished.
+       (matching-substring): Abolished.
+       (irchat-greater-flags): Abolished.
+
+1999-05-08  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-300.el (irchat-353-scan-channels): New macro.
+
+       * irchat-minibuf.el (irchat-minibuffer-completing-default-read):
+       Renamed from `irchat-completing-default-read'.
+       (irchat-minibuffer-completing-sequential-read): Renamed from
+       `irchat-completing-sequential-read'.
+
+       * irchat-channel.el (irchat-channel-set-operator-1): Renamed from
+       `irchat-set-channel-operator' within irchat-misc.el.
+       Restrict its use to internal only.
+       (irchat-channel-set-voice-1): Likewise.
+
+       * irchat-commands.el (irchat-command-wait): Abolished.
+
+       * irchat-nick.el (irchat-nick-update): Assume that the 2nd
+       argument CHNL is one of channels we've already joined.
+
+       * irchat-misc.el (irchat-change-nick-of): Change nicks, opers and
+       voices properties properly.
+       (irchat-change-nick-of-1): New function. Modify nick alist by
+       side effect.
+       (irchat-change-nick-of-2): New function which resembles above,
+       but it acts on singular list.
+       (irchat-greet-user): Abolished.
+       (irchat-user-on-my-channel): Abolished.
+       (irchat-user-on-this-channel): Abolished.
+
+       * irchat-handle.el (irchat-handle-channel-msg): Do not use
+       `irchat-change-nick-of' directly.
+       (irchat-handle-nick-msg): Likewise.
+       (irchat-handle-quit-msg): Likewise.
+
+1999-05-07  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-commands.el (irchat-command-nickname): Do not set
+       `irchat-real-nickname'.
+
+1999-05-06  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * Liece 1.2.8.23.
+
+       * irchat-hilight.el (irchat-quoted-colors): New variable.
+       (irchat-highlight-colorize-quote): New function.
+       (irchat-highlight-turn-on-font-lock): Add buffer locality to
+       some members of `after-change-hook'.
+
+       * Makefile (install): Do not depend on `dcc'.
+
+1999-05-05  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-handle.el (irchat-handle-part-msg): Call
+       `irchat-channel-part' and `irchat-nick-part' exclusively.
+       (irchat-handle-kick-msg): Likewise.
+
+       * irchat-channel.el (irchat-channel-equal): New alias.
+       (irchat-channel-member): Renamed from `irchat-channel-memberp'.
+       (irchat-channel-join-internal): New function.
+       (irchat-channel-part-internal): New function.
+
+       * irchat-ctcp.el (irchat-ctcp-client-msg): Fix reply string.
+
+       * irchat-minibuf.el (irchat-minibuffer-parse-modes): Completion
+       fixed for ban pattern.
+
+       * irchat-nick.el (irchat-nick-normalize): New macro.
+       (irchat-nick-strip): New macro.
+       (irchat-nick-parse-nick-after): New function.
+
+       * irchat-handle.el (irchat-handle-silence-msg): New handler.
+
+1999-05-04  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-handle.el (irchat-handle-part-msg): Fix quotation of part
+       message.
+
+       * irchat-400.el: Fix unconsistent user data returned from pirc.
+       (irchat-handle-442-msg): `ERR_NOTONCHANNEL'.
+       (irchat-handle-443-msg): `ERR_USERONCHANNEL'.
+
+       * irchat-misc.el (irchat-update-thischannel): Abolished.
+
+       * irchat-commands.el (irchat-channel-virtual): Save matched data.
+       (irchat-channel-real): Likewise.
+
+       * irchat-300.el (irchat-handle-364-msg): `RPL_LINKS'. Fix regexp.
+       (irchat-handle-333-msg): New hander for `RPL_TOPICWHOTIME'.
+       (irchat-handle-namereply-msg): Abolished.
+       (irchat-handle-whoreply-msg): Abolished.
+
+       * irchat-000.el (irchat-handle-005-msg): `RPL_MAP'.
+       Support for ircu server mapping facility.
+       (irchat-handle-006-msg): New handler for `RPL_MAPMORE'.
+       (irchat-handle-007-msg): New handler for `RPL_MAPEND'.
+
+1999-05-03  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-handle.el (irchat-handle-part-msg): Handle left message.
+
+       * irchat-custom.el (irchat-connection-timeout): New variable.
+
+       * irchat.el (irchat-accept-response): Add optional arg timeout.
+       (irchat-accept-process-output): New function.
+       (irchat-clear-system): Reset `irchat-timers-list-initialized-p'.
+       (irchat-initialize-timers): Fix secs parameter.
+
+       * irchat-xemacs.el (irchat-xemacs-run-at-time): New function.
+
+       * irchat-compat.el (irchat-run-at-time): New alias.
+       (irchat-cancel-timer): New alias.
+
+       * irchat-commands.el (irchat-command-start-ison-timer): Abolished.
+       (irchat-command-cancel-ison-timer): Abolished.
+
+       * irchat-timer.el: Removed.
+\f
+1999-04-29  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat.el (irchat-initialize-timers): New function.
+
+       * irchat-q-ccl.el (irchat-quote-ccl-decode-region): New function.
+       (irchat-quote-ccl-encode-region): New function.
+
+       * irchat-q-el.el (irchat-quote-el-decode-region): New function.
+       (irchat-quote-el-encode-region): New function.
+
+       * irchat-ctcp.el (irchat-complete-client): New macro.
+       (irchat-complete-query): New macro.
+       (irchat-command-client-time): New command.
+       (irchat-ctcp-client-msg): Rename each *-msg-hook to *-hook.
+       (irchat-minibuffer-complete-client-query): New function.
+
+       * irchat-commands.el (irchat-command-activate-friends): Fix
+       completion.
+
+       * irchat-compat.el (filter-elements): Add `lisp-indent-function'
+       property with value 2.
+
+1999-04-28  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-dcc.el (irchat-dcc-object): Implement as cl-struct.
+
+       * irchat-compat.el (irchat-static-require): New macro.
+       (irchat-static-require-if): New macro.
+       (irchat-static-defun-if): New macro.
+
+       * Liece 1.2.8.22.
+
+1999-04-27  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * README-styles.ja, TODO.ja, sample.dot.liece.ja: Removed.
+
+1999-04-26  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-inlines.el: Require irchat-setup.
+
+       * irchat-x-face.el: Use `static.el'.
+
+       * irchat-handle.el (irchat-handle-join-msg): Set user-at-host
+       information after calling `irchat-nick-join'.
+
+       * irchat-globals.el (irchat-default-channel-candidate): New
+       variable.
+
+1999-04-22  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-handle.el (irchat-handle-324-msg): Fix regexp.
+
+1999-04-16  Daiki Ueno  <ueno@bleu.ueda.info.waseda.ac.jp>
+
+       * irchat-xemacs.el: Add hooks to hide modelines.
+
+1999-04-12  Daiki Ueno  <ueno@bleu.ueda.info.waseda.ac.jp>
+
+       * irchat.el (irchat-refresh-windows): New function.
+
+       * irchat-300.el: Remove all occurrences of `matching-substring'.
+       (irchat-handle-352-msg): Do not pick-up channel buffer.
+
+       * irchat-config.el, irchat-modules.el: New files.
+
+1999-04-07  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat.el (irchat-switch-to-channel-no-*): Use `dotimes' on the
+       definitions of themselves.
+
+       * irchat-vars.el (irchat-ignore-spec-convert): Fix tag.
+
+1999-04-06  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * dcc.c (send_file): Use `get_address_externally'.
+       (chat_listen): Likewise.
+
+1999-04-05  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * getaddrinfo.c: Include `stdlib.h'.
+
+1999-04-04  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * Liece 1.2.8.21.
+
+       * irchat-handle.el (irchat-handle-mode-msg): Fix channel mode parser.
+
+       * irchat-commands.el (irchat-command-ban-kick): New command.
+       (irchat-command-ban): New command.
+
+       * irchat-ctcp.el (irchat-ctcp-version-msg): Eliminate the client
+       version string.
+       (irchat-client-version-notice): Fix regexp.
+       (irchat-client-version-insert): New function.
+
+       * irchat-misc.el (irchat-repair-crlf): Fixed.
+
+1999-04-01  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * tcp.c (NI_MAXHOST): Add check if it has been already defined.
+
+       * irchat.el (irchat-command-keys): Bind `C-c C-j'.
+\f
+1999-03-31  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-handle.el (irchat-handle-mode-msg): Fix regexp.
+
+       * irchat-commands.el (irchat-command-finger): Add prefix arg.
+
+1999-03-30  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-filter.el (irchat-handle-message): Fix regexp.
+
+       * irchat-handle.el (irchat-handle-join-msg): Fix regexp.
+       (irchat-handle-nick-msg): Fix regexp.
+
+1999-03-24  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-commands.el (irchat-command-finger): Specify nick twice.
+
+       * liece-faq.texinfo: Fix URI of APEL's ftp sites.
+
+1999-03-17  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * Liece 1.2.8.20.
+
+       * irchat-crypt.el (with-irchat-encryption): New macro.
+       (with-irchat-decryption): New macro.
+
+       * irchat-compat.el (valid-plist-p): Fixed.
+
+       * irchat-tcp.el (irchat-tcp-default-connection-type): Renamed from
+       `irchat-tcp-connection-type'.
+       (irchat-open-network-stream-as-binary): Add optional arg `type'.
+       (irchat-open-network-stream): Likewise.
+
+       * irchat-vars.el (irchat-server-alist): Add `:prescript' and
+       `:type' keywords.
+
+1999-03-16  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-compat.el: Require `pcustom'.
+       (point-at-bol): Abolished. Use `line-beginning-position'.
+       (point-at-eol): Abolished. Use `line-end-position'.
+
+       * tcp.c: New file.
+
+       * irchat-tcp.el: New file; TCP/IP emulation using external program.
+
+       * irchat-compat.el (read-passwd): New function to keep compatibility.
+       (passwd-echo): New variable to keep compatibility.
+
+       * irchat-commands.el (irchat-command-who): Confirm really send WHO
+       command with no arguments.
+       (irchat-command-list): Likewise.
+       (irchat-command-names): Likewise.
+
+       * irchat-misc.el (irchat-set-crypt-indicator): Activate crypt mode
+       also in private mode.
+       (irchat-read-passwd): Abolished. Use `read-passwd'.
+
+       * irchat-crypt.el (irchat-crypt-maybe-encrypt-message): Renamed
+       from `irchat-crypt-with-encrypt-message'.
+       (irchat-crypt-maybe-decrypt-message): Likewise.
+
+1999-03-15  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-handle.el (irchat-handle-join-msg): Fix regexp.
+
+       * irchat-hilight.el (irchat-highlight-maybe-hide-quote): Fixed.
+
+1999-03-14  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * Liece 1.2.8.19.
+
+       * irchat-commands.el (irchat-command-poll-names): Check if
+       `irchat-server-opened' returns t.
+       (irchat-command-poll-friends): Likewise.
+
+       * irchat-hilight.el (irchat-highlight-turn-on-font-lock): Remove
+       all hooks before calling `turn-on-font-lock'.
+
+       * irchat-compat.el (run-hook-with-args-until-success): Do not use
+       `run-hook-with-args'.
+
+       * irchat-filter.el (irchat-handle-message-2): Use
+       `run-hook-with-args-until-success' instead of
+       `run-hook-with-args'.
+
+       * irchat-handle.el (irchat-handle-with-running-cleartext-hook):
+       Use `run-hook-with-args-until-success' instead of
+       `run-hook-with-args'.
+       (irchat-handle-run-cleartext-hook): Likewise.
+       (irchat-handle-run-hook-with-args): Likewise.
+
+       * irchat-timer.el (irchat-start-timer): Use `run-at-time' with 1st
+       argument 0 instead of nil.
+
+       * irchat-ctcp.el (irchat-query-client-nick-maybe-change): Return
+       with nil explicitly.
+
+       * irchat-vars.el (irchat-service-spec): New widget.
+       (irchat-service-spec-convert): New function; widget-converter.
+       (irchat-server-spec): New widget.
+       (irchat-server-spec-convert): New function; widget-converter.
+       (irchat-ignore-spec): New widget.
+       (irchat-ignore-spec-convert): New function; widget-converter.
+
+       * irchat-url.el (irchat-command-browse-url): Use the URL added
+       most recently, if `current-prefix' equals `-'.
+       (irchat-url-browser-netscape): Do not bind the process buffer.
+
+       * irchat-menu.el (irchat-menu-add-button): Add 3rd argument.
+
+1999-03-13  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-xemacs.el: Use extents instead of overlays.
+       (irchat-xemacs-put-text-property): New function.
+       (irchat-xemacs-get-text-property): New function.
+       (irchat-xemacs-kill-all-overlays): New function.
+       (irchat-xemacs-overlays-at): New function.
+
+       * irchat-compat.el (irchat-make-overlay): New emulation function.
+       (irchat-delete-overlay): Ditto.
+       (irchat-overlay-put): Ditto.
+       (irchat-move-overlay): Ditto.
+       (irchat-overlay-end): Ditto.
+       (irchat-overlay-get): Ditto.
+       (irchat-overlays-at): Ditto.
+       (irchat-kill-all-overlays): Ditto.
+
+1999-03-12  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-xemacs.el (irchat-toolbar-toggle-crypt): New function.
+       (irchat-toolbar-icon-convert): New function; widget-converter.
+       (irchat-toolbar-icon): New widget.
+       (irchat-toolbar-icon-plist-get): New function.
+       (irchat-toolbar-map-button-list): New function.
+       (irchat-xemacs-setup-toolbar): Renamed from
+       `irchat-xemacs-setup-toolbar-list'.
+       (irchat-toolbar-setup-crypt-glyph): New function.
+       (irchat-toolbar-toggle-crypt): New function.
+       (irchat-use-toolbar): New customizable variable.
+
+       * irchat-compat.el (irchat-put-text-property): Implemented as
+       function.
+
+       * irchat.el (irchat-after-load-startup-hook): New hook variable.
+
+       * irchat-hilight.el (irchat-highlight-maybe-turn-on-font-lock):
+       New function.
+
+       * Liece 1.2.8.18.
+
+       * irchat-channel.el (irchat-channel-create-buffer): Use
+       `irchat-format-time-function'.
+
+       * irchat-hilight.el: Use font-lock.el.
+
+1999-03-11  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-debug.el (irchat-debug-enter-handler): Moved from
+       llhandler.el.
+       (irchat-debug-leave-handler): Ditto.
+
+       * llhandler.el (llhandler-debug-enter): Abolished.
+       (llhandler-debug-leave): Abolished.
+
+       * irchat-version.el (irchat-emacs-user-agent-value): New variable
+       imported from `mime-edit-user-agent-value' of SEMI.
+       (irchat-user-agent-value): New variable.
+       (irchat-make-user-agent-string): Abolished.
+       (irchat-make-emacs-user-agent-string): Abolished.
+       (irchat-command-version): New command.
+
+       * irchat-hilight.el (irchat-maybe-highlight-region): New function.
+       (irchat-maybe-smiley-region): New function.
+       (irchat-maybe-highlight-url-region): New function.
+       (irchat-highlight-put-url-properties-region): New function.
+
+       * irchat-ctcp.el: Add hooks in order to let
+       `irchat-query-client-nick' follow the changes.
+       (irchat-query-client-nick-maybe-change): New function.
+       (irchat-query-client-nick-maybe-reset): New function.
+
+       * irchat-url.el (irchat-url-gather-hook): New hook variable.
+       (irchat-command-browse-url): Use `_'.
+       (irchat-url-gather-urls-region): New function.
+       (irchat-url-search-forward): New function.
+
+       * irchat-compat.el (easy-menu-add-item): New alias.
+
+       * irchat-xemacs.el (easy-menu-add-item): New advice.
+
+1999-03-10 Tsunehiko Baba <tbaba@mtl.t.u-tokyo.ac.jp>
+
+       * dcc.c (main): Add cast against return value of basename(3).
+
+1999-03-10  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-menu.el (irchat-menu-url-menu): New variable.
+
+       * Liece 1.2.8.17.
+
+       * irchat-misc.el (irchat-compose-time-string): Renamed from
+       `irchat-compose-servertimestring'.
+
+       * irchat-compat.el (plist-get): New function for compatibility.
+
+       * irchat-ctcp.el (irchat-client-time-notice): New handler.
+       (irchat-ctcp-time-msg): Ditto.
+
+       * irchat-minibuf.el (irchat-minibuffer-complete-channel-modes):
+       Also display candidates when `irchat-minibuffer-parse-modes'
+       returns 'flag.
+
+       * irchat-400.el (irchat-handle-433-msg): `ERR_NICKNAMEINUSE'.
+       Do grow-tail iteration on `irchat-real-nickname' only if
+       `irchat-auto-iterate-nick' is specified.
+
+       * irchat-vars.el (irchat-server-alist): Enable to specify keywords
+       (:host, :service, :password, etc.).
+       (irchat-auto-iterate-nick): New customizable variable.
+
+       * irchat-menu.el (irchat-menu-add-url): New function.
+       (irchat-command-mode-url-menu): New menu entry.
+
+       * irchat.el (irchat): Do not ping to server.
+       (irchat-open-server): Use new format of `irchat-server-alist'.
+
+1999-03-02  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-handle.el (irchat-handle-privmsglike-msg): Define as subst.
+
+       * irchat-make.el (install-just-print-p): New function
+       imported from APEL 9.13's `APEL-MK'.
+       (config-irchat-package): Likewise.
+       (compile-irchat-package): Likewise.
+       (install-irchat-package): Likewise.
+       (install-update-package-files): Likewise.
+       (make-irchat-sample-files): New function imported from packaged
+       version of Liece.
+       (make-irchat-info-files): Ditto.
+
+       * irchat-300.el (irchat-handle-366-msg): Do not update nicks when
+       `irchat-353-nameslist' holds no element.
+
+1999-03-01  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-handle.el (irchat-handle-quit-msg,
+       irchat-handle-mode-msg, irchat-handle-join-msg,
+       irchat-handle-part-msg): Quote regexp.
+
+1999-02-28  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat.el (irchat-clear-system): Fix backquotes.
+
+1999-02-25  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-300.el (irchat-handle-303-msg): Fix. Add check for empty
+       reply.
+
+1999-02-24  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-handle.el (irchat-handle-notice-msg): Fix. Call handler
+       with `funcall'.
+
+       * irchat.el (irchat-channel-mode-map): Make keymap as sparse.
+       (irchat-others-mode-map): Likewise.
+
+       * irchat-commands.el (irchat-command-deactivate-friends):
+       Fix argument.
+
+       * Liece 1.2.8.16.
+
+       * irchat-globals.el (irchat-who-expression): New variable.
+
+       * irchat-misc.el (irchat-toggle-command-buffer-mode): Change
+       `irchat-private-indicator'.
+
+       * irchat-300.el (irchat-handle-315-msg): `RPL_ENDOFWHO'.
+       Display `no matches found' message
+       (irchat-handle-{322,323,353,366}-msg): Count iterations.
+
+       * irchat.el (irchat-command-mode): Do not save
+       `frame-title-format' twice. Use `irchat-current-channel' in place
+       of `irchat-channel-indicator'.
+
+       * llhandler.el (llhandler-debug-enter): New function.
+       (llhandler-debug-leave): New function.
+       (llhandler-define-handler): New macro.
+       (llhandler-eval-args): Abolished.
+
+       * irchat-crypt.el (irchat-encrypt-message): Encode messages.
+       (irchat-decrypt-message): Likewise. Decode messages.
+       (irchat-crypt-with-encrypted-message): Do not encode message which
+       has type `cleartext'.
+
+1999-02-23  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-misc.el (irchat-send-pong): New macro.
+       (irchat-increment-long-reply-count): New macro.
+       (irchat-reset-long-reply-count): New macro.
+       (irchat-check-long-reply-count): New macro.
+
+       * irchat-globals.el (irchat-long-reply-count) New variable.
+       (irchat-long-reply-max): New variable.
+
+       * irchat-commands.el (irchat-command-save-vars): Fix. Set marker
+       at output position.
+
+1999-02-21  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-300.el (irchat-handle-303-msg): Add differential IsON.
+
+       * irchat-commands.el (irchat-command-start-ison-timer,
+       irchat-command-cancel-ison-timer, irchat-command-activate-friends,
+       irchat-command-deactivate-friends): Do completion case
+       insensitively.
+
+       * irchat-vars.el (irchat-saved-forms): Add symbol `irchat-friends'
+       to be saved its value.
+
+1999-02-20  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * Liece 1.2.8.15.
+
+       * irchat-filter.el (irchat-sentinel): Do not throw signal, just
+       clear whole system.
+       (irchat-sentinel-error): Ditto.
+
+       * irchat-vars.el (irchat-friends): New user customizable variable.
+       (irchat-poll-friends-interval): New user customizable variable.
+       (irchat-poll-names-interval): New user customizable variable.
+
+       * irchat-commands.el (irchat-command-poll-names): Renamed from
+       `irchat-command-pollnames'; implemented as function.
+       (irchat-command-keepalive): Implemented as function.
+       (irchat-command-poll-friends): New function.
+       (irchat-command-activate-friends): New command.
+       (irchat-command-deactivate-friends): New command.
+
+       * irchat-300.el (irchat-handle-331-msg): Call
+       `irchat-set-channel-indicator'.
+       (irchat-handle-332-msg): Ditto.
+
+       * irchat-globals.el (irchat-channel-status-indicator): New
+       variable; default value of `frame-title-format'.
+       (irchat-friends-last): New variable.
+       (irchat-frame-title-format-last): New variable.
+
+       * irchat-misc.el (irchat-set-frame-title-format): Do not calculate
+       `frame-title-format' directly.
+       (irchat-maybe-update-channel-indicator): New macro.
+
+1999-02-20  P.F.FrontJr. <pff@softai.co.jp>:
+
+       * irchat-misc.el (irchat-set-channel-indicator): Display channel
+       status on mode line.
+
+       * irchat-vars.el (irchat-display-status-on-channel-indicator):
+       New user customizable variable.
+
+1999-02-15  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat.el (irchat-read-variables-files): Set alternative
+       startup file as primary one.
+
+       * irchat-timer.el (irchat-start-timer): Do not require `timer' or
+       `itimer'; autoload timer functions.
+       (irchat-cancel-timer): Ditto.
+
+1999-02-14  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-ck-ccl (irchat-ck-ccl): Remove.
+       (irchat-ck-ccl-cj-to-ck-string): Use `ccl-execute-on-string'.
+       (irchat-ck-ccl-ck-to-cj-string): Ditto.
+
+       * irchat-xemacs.el (irchat-xemacs-setup-toolbar): New function.
+
+       * irchat-menu.el (irchat-command-add-menus): New function; add
+       menubar menus explicitly.
+
+       * irchat-coding.el (irchat-coding-custom-detect-coding-region):
+       New variable; set user customizable function to detect coding system.
+       (irchat-coding-custom-detect-coding-string): Likewise.
+       (irchat-detect-coding-string-tcljp): Transported from
+       `tclKanjiUtil.c'; trivial encoding detection routine.
+       (irchat-default-coding-system): Moved from `irchat-vars.el'.
+       (irchat-default-mime-charset): Ditto.
+       (irchat-detect-coding-system): Ditto.
+
+       * crc32.el (crc32-region): Remove `mark-active'.
+
+       * irchat-timer.el (irchat-cancel-timer): Fix for XEmacs's
+       `itimer'.
+
+       * Liece 1.2.8.14.
+
+       * irchat-dcc.el (irchat-dcc-requests): Rename from
+       `irchat-dcc-request-list'; implemented as actually a queue.
+
+       * queue-m.el: New file; imported from elib.
+
+       * irchat-filter.el (irchat-filter): Remove checking whether
+       process output line contains LF; remove duplicated LF checking
+       likewise; enclose with `save-match-data'.
+       (irchat-handle-message): Add checking user-at-host cookie with
+       restricted line.
+
+       * irchat-window.el (irchat-window-functionp): Remove; use
+       `irchat-functionp'.
+
+       * irchat-channel.el (irchat-channel-get-nicks): Fix; apply car
+       against each elements.
+
+1999-02-13  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-commands.el (irchat-command-mode+o,
+       irchat-command-mode+v): Build completion list using
+       `filter-elements'.
+
+       * irchat-vars.el (irchat-exit-hook): Rename from
+       `irchat-Exit-hook'.
+
+       * irchat-inlines.el (irchat-functionp): New macro.
+
+       * irchat-compat.el (mapvector): New macro.
+
+       * irchat-misc.el (irchat-greet-author): Remove.
+       (irchat-split-rest): Fix arguments.
+       (irchat-completing-default-read): 3rd and later arguments become
+       optional.
+       (irchat-completing-sequential-read): Evaluate completion table
+       consequently; Add optional argument `multiple-candidate', if this
+       arg is non-nil always create new table with its initial state.
+
+       * llhandler.el (llhandler-define-entry-point): Add debugging
+       triger in frount of function definition.
+       (llhandler-define-with-return): Ditto.
+       (llhandler-define): Ditto.
+       (llhandler-enter-format-string): New constant; for debugging use.
+       (llhandler-leave-format-string): Ditto.
+       (llhandler-eval-args): New macro.
+
+       * irchat.el (irchat-open-server-internal): Use
+       `open-network-stream-as-binary'.
+       (irchat-startup-hook): Rename from `irchat-Startup-hook'.
+
+1999-02-07  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * Liece 1.2.8.13.
+
+       * idea.el (idea-ecb-decrypt-string): Enclose Base64 decoded string
+       with `string-as-unibyte'.
+       (idea-cbc-decrypt-string): Ditto.
+
+       * idea.el: Sync up with Irchat-980625-2.
+
+       * crc32.el: Ditto.
+
+       * irchat-300.el (irchat-handle-303-msg): Fix matched string.
+
+       * irchat-handle.el (irchat-handle-privmsg-msg): Check whether
+       private message has come from entirely outer.
+
+       * irchat-filter.el (irchat-handle-message): Remove all occurence
+       of CR out of inputs :(
+
+1999-02-06  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat.el (irchat-read-variables-files): Save alternatively
+       specified startup file name into `irchat-variables-files'.
+
+1999-02-04  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-dcc.el (irchat-command-dcc-accept): Remove destructive
+       checking.
+
+       * irchat-make.el: Do not use `add-to-list' for Emacs19.
+
+       * irchat-nick.el (irchat-nick-replace): Fixed regexp.
+
+1999-02-03  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-coding.el (irchat-coding-detect-coding-region)
+       (irchat-coding-detect-coding-string): New function.
+       (irchat-coding-decode-mime-charset-region): Use above directly.
+       (irchat-coding-decode-mime-charset-string): Ditto.
+
+1999-02-02  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-commands.el (irchat-command-who): Fixed setting
+       `irchat-channel-alist.
+
+       * Liece 1.2.8.12.
+
+       * irchat-nick.el (irchat-nick-get-user-at-host): New macro.
+
+       * irchat-compat.el (temp-minibuffer-message): New function.
+
+       * irchat-minibuf.el: New file; custom minibuffer completion.
+
+       * irchat.el (irchat-open-server-internal): Add check for dotless
+       IP or IPv6 address representation.
+
+       * irchat-channel.el (irchat-channel-set-voice): Replace with
+       regexp.
+
+1999-02-01  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-300.el (irchat-handle-319-msg): Fixed channel conversion.
+
+       * irchat-commands.el (irchat-command-modec): Fixed completion.
+       (irchat-command-mode-o,irchat-command-mode+v,irchat-command-mode-v):
+       Fix format string.
+
+       * dcc.c (chat_listen): Print connection result.
+
+       * irchat-dcc.el (irchat-command-dcc-chat-listen): Add dummy
+       argument `chat' for compatibility.
+
+       * irchat-channel.el (irchat-channel-remove-mode): Use `delq'.
+       (irchat-nick-remove-mode): Ditto.
+
+       * Liece 1.2.8.11.
+
+       * irchat-menu.el (irchat-menu-popup-menu): Check whether XEmacs or
+       not compile time.
+\f
+1999-01-31  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-compat.el (set-keymap-parents): New macro.
+
+       * irchat-commands.el (irchat-command-join-channel): Add flag
+       whether `irchat-command-buffer-mode' is toggled.
+       (irchat-command-join-partner): Ditto.
+
+       * irchat-300.el (irchat-count-words-from-string): Count postfix
+       white spaces.
+
+       * irchat-q-el.el: Splited from `irchat-ctcp.el'; binary data
+       quotation in emacs-lisp.
+       * irchat-q-ccl.el: Same functionality as above but implemented in
+       Emacs CCL.
+
+       * b64.el (b64-encode-string, b64-decode-string): Add autoload
+       cookie.
+
+       * irchat.el (irchat-channel-list-keys): New variable.
+       (irchat-define-keys): Add lisp-mode indentation.
+       (irchat-channel-mode-map, irchat-others-mode-map): Set
+       `irchat-dialogue-mode-map' as its keymap parent.
+
+1999-01-28  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * Liece 1.2.8.10.
+
+       * dcc.c: Rewritten but this is obsoleted.
+
+       * irchat-commands.el (irchat-command-end-of-buffer): Renamed from
+       `irchat-command-eod-buffer'; this works also in `irchat-{channel,
+       others}-buffer-mode'.
+
+       * dcc.ml (getaddr_ext): New function.
+
+       * irchat-dcc.el (irchat-dcc-send-filter): Fix regexp.
+       (irchat-dcc-add-to-process-alist): Add process key as symbol.
+       (irchat-dcc-get-process-object): Likewise.
+       (irchat-command-dcc-receive): Fixed arguments of
+       `irchat-dcc-add-to-process-alist'.
+       (irchat-command-dcc-send): Likewise.
+       (irchat-command-dcc-accept): Fix typo.
+
+1999-01-27  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat.el (irchat-others-mode-map): Add key binding of
+       `irchat-command-tag-region'
+
+       * irchat-commands.el (irchat-command-join-channel): Use
+       `irchat-channel-memberp'.
+       (irchat-command-modec): Make completion from supported mode list.
+       (irchat-channel-real): Try match with
+       `irchat-channel-conversion-map' case insensitively.
+       (irchat-channel-virtual): Ditto.
+
+1999-01-26  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-globals.el (irchat-supported-channel-mode-alist):
+       (irchat-supported-user-mode-alist): New variable
+
+       * irchat-nick.el (irchat-nick-get-modes): New macro.
+       (irchat-nick-add-mode): New macro.
+       (irchat-nick-remove-mode): New macro.
+       (irchat-nick-set-mode): New macro.
+
+       * irchat-000.el (irchat-handle-004-msg): Save server supported
+       modes.
+
+       * Liece 1.2.8.9.
+
+       * irchat-make.el: Add local copy of APEL to `load-path'.
+       (autoload-irchat): New function to generate autoload file.
+
+       * irchat.el (irchat-command-keys): Add key definition of
+       `irchat-command-set-window-style' (C-c s).
+       (irchat): Parse `irchat-variables-files' specified in command
+       line.
+       (irchat-read-variables-files): Add optional argument `file'.
+
+       * irchat-window.el (irchat-window-set-default-style): Fallback
+       style used when encountered an error at style-file loading time.
+
+       * irchat-handle.el (irchat-handle-mode-msg): Gather channel modes
+       correctly.
+
+       * irchat-channel.el (irchat-channel-get-modes): New macro.
+       (irchat-channel-set-mode): New macro.
+       (irchat-channel-add-mode): New macro.
+       (irchat-channel-remove-mode): New macro.
+
+       * irchat-menu.el (irchat-menu-prepare-menus): Fix typo in
+       `irchat-command-previous-channel'.
+       (irchat-menu-IRC-menu): Add menu items.
+
+1999-01-23  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-misc.el (irchat-change-nick-of): Fixed.
+
+1999-01-22  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * llhandler.el: New file.
+
+       * Liece 1.2.8.8.
+
+       * irchat-handle.el (irchat-handler-defun-*): Abolished.
+       (irchat-handler-defsubst-*): Abolished.
+       (irchat-handler-obarray): New variable.
+       (irchat-handle-error-msg): New handler.
+       Handler API has been rewritten with `irchat-handler-obarray',
+       which enables faster handler lookup from hash.
+
+1999-01-21  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-ctcp.el: Rewritten with new handler API.
+       (irchat-ctcp-file-save-directory): New user variable.
+       (irchat-client-message): New macro.
+       (irchat-client-file-message): New macro.
+
+       * irchat-vars.el (irchat-gather-channel-modes): New user variable.
+       (irchat-*-buffer): Moved into `irchat-globals.el'.
+
+       * irchat-misc.el: Require `invisible'.
+       (irchat-remove-properties-region): Use
+       `next-single-property-change' instead of `next-property-change'.
+       (next-visible-point): Add advice to pass optional argument
+       `limit'.
+       (irchat-change-nick-of): Fixed.
+
+1999-01-20  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-compat.el (filter-elements): Renamed from `filtercar'.
+       Rewritten as macro with referring to `dabbrev-filter-elements'.
+
+       * defface.el (defface-set-face-inverse): New function.
+       (defface-face-inverse): Ditto.
+       (defface-set-face-bold): Abolished. Use `face-set-bold-p'.
+       (defface-face-bold): Abolished. Use `face-bold-p'.
+       (defface-set-face-italic): Abolished. Use `face-set-italic-p'.
+       (defface-face-italic): Abolished. Use `face-italic-p'.
+
+1999-01-19  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-commands.el (irchat-command-tag-region): Renamed from
+       `irchat-dialogue-tag-line'. Add removing 'face and 'invisible
+       properties from text moved into kill ring.
+
+       * sample.dot.liece{,.ja}: Fixed documentation about window
+       configuration.
+
+       * irchat-misc.el (irchat-pick-buffer): Assume that channel names
+       are associated to channel buffers case insensitively.
+       (irchat-remove-properties-region): New macro.
+
+1999-01-18  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-compat.el (keymap-accept-event-array): Abolished.
+
+       * Liece 1.2.8.7.
+
+       * irchat-misc.el (matching-substring): Became an alias for
+       `match-string'.
+
+       * irchat.el (irchat-open-server): Fixed.
+       (irchat-open-server-internal): Fixed.
+       Do not require `smiley'.
+
+1999-01-17  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-300.el (irchat-handle-364-msg): Fixed.
+
+       * irchat-200.el (irchat-handle-213-msg): Fixed.
+
+       * irchat-intl.el (irchat-intl-load-catalogue): Do not bind `lang'
+       to `current-language-environment'.
+
+       * irchat-window.el (irchat-configure-windows): Switch to
+       `irchat-command-buffer' before calling function
+       `irchat-window-configure-frame'.
+
+       * irchat-timer.el: Enclose statement which has newly styled macros
+       with `eval'.
+
+       * irchat-compat.el (run-hook-with-args-until-success): New macro
+       for compatibility.
+
+       * irchat-misc.el (irchat-convert-received-input): New macro.
+       No longer require `irchat-filter'.
+
+1999-01-16  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-caesar.el: Abolished.
+
+       * irchat-compat.el (function-documentation): New macro.
+
+       * irchat-commands.el (irchat-command-point-back-to-command-buffer):
+       New command. Bind key to `c'.
+       (irchat-command-caesar-line): Abolished. Use `mule-caesar-region'.
+
+       * irchat-misc.el (irchat-is-message-ignored): Moved from
+       `irchat.el'.
+       (irchat-maybe-poll): Ditto.
+       (irchat-set-crypt-indicator): Ditto.
+       (irchat-get-buffer-create): Ditto.
+       (irchat-hex-char-to-integer): Imported from `misty1.el'.
+       (irchat-hex-string-to-integer): Ditto.
+
+1999-01-15  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat.el (irchat-read-variables-files): New function.
+       (irchat-command-read-variables-files): New alias to
+       `irchat-read-variables-files'.
+       (irchat-initialize-buffers): New wrapper function.
+       (irchat-replace-internal): New macro.
+       (irchat-insert-internal): New macro.
+
+       * irchat-compat.el (ccl-enable-to-read-multibyte): New broken
+       facility.
+       (buffer-or-string-p): New macro.
+
+       * irchat-misc.el (irchat-send-as-binary): New macro.
+       (irchat-send): Add `string-as-unibyte' while checking length of
+       string.
+       (irchat-replace-in-string): Abolished.
+
+       * irchat-ck-ccl.el: CCL version of `ck' to `cj' converter.
+
+       * irchat-ck-el.el: Renamed from `irchat-hankana.el'.
+
+       * irchat-make.el: irchat-make.el: Add checking whether CCL accepts
+       `read-multibyte-character'.
+
+1999-01-14  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-misc.el (irchat-nickname): New macro.
+
+       * irchat-window.el (irchat-configure-windows): Enclose
+       calling function `irchat-window-configure-frame' with
+       `save-excursion'.
+
+       * irchat-crypt.el (irchat-crypt-with-decrypt-message):
+       Renamed from `irchat-crypt-with-encrypted-message'.
+       (irchat-crypt-with-encrypt-message): New macro.
+
+       * irchat-commands.el (irchat-command-join-partner): Fixed.
+       (irchat-command-timestamp): Fixed.
+       (irchat-command-send-message): Fixed.
+       (irchat-command-message): Fixed.
+       (irchat-command-prepare-message-prefix): New macro.
+       (irchat-command-prepare-own-message-prefix): New macro.
+
+       * Liece 1.2.8.6.
+
+       * irchat-channel.el (irchat-channel-join): Fixed.
+
+       * irchat-url.el (irchat-url-prepare-browser-function): New macro.
+       (irchat-url-command-browse-url): Add checking
+       `irchat-url-browser-name' prior to `irchat-url-browser-function'.
+
+1999-01-13  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * README-styles.ja: New file.
+
+       * irchat-channel.el (irchat-channel-change): Enclose with
+       `save-excursion'.
+
+1999-01-11  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat.el (irchat): Fixed bug in XEmacs toolbar specification.
+
+1999-01-10  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-nick.el (irchat-nick-get-joined-channels): New macro.
+
+       * irchat-channel.el (irchat-channel-get-nicks): New macro.
+       (irchat-channel-get-opers): Ditto.
+       (irchat-channel-get-voices): Ditto.
+       (irchat-channel-get-topic): Ditto.
+
+       * styles/{top,bottom}: Fixed command buffer lines.
+
+       * Liece 1.2.8.5.
+
+       * irchat.el (irchat-insert): Remove checking "(featurep 'custom)".
+
+       * defface.el: New file.
+
+1999-01-09  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-handle.el (irchat-handler-define-entry-point): New alias.
+       (irchat-handler-defun-with-return): New macro.
+       (irchat-handler-defsubst-with-return): New macro.
+
+       * irchat-{000,200,300,400,500}.el: Rewritten with new handler API.
+
+       * irchat-handle.el (irchat-handler-entry-point-defun): New macro.
+       (irchat-handler-entry-point-defsubst): New macro.
+
+       * irchat-handle.el (irchat-handle-with-running-cleartext-hook):
+       Renamed from `irchat-handle-with-cleartext-hook'.
+       (irchat-handle-run-cleartext-hook):
+       Renamed from `irchat-handle-cleartext-hook'.
+
+1999-01-08  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * styles/top: New file.
+
+       * irchat-misc.el (irchat-message): New macro.
+
+       * Liece 1.2.8.4.
+
+       * styles/{bottom,middle}: New file.
+
+       * irchat-window.el (irchat-configure-windows): Moved from
+       `irchat'.
+
+       * irchat-window.el: New file for style-based window configuration.
+
+       * irchat-nick.el (irchat-nick-replace): Fixed moving point to
+       highlight mouse face.
+
+1999-01-05  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-nick.el (irchat-nick-update-region): Set point to mouse
+       clicked position.
+
+       * Liece 1.2.8.3.
+
+       * irchat.el (irchat-nick-mode-map): Add popup menu.
+
+       * irchat-menu.el (irchat-nick-popup-menu): New function.
+       (irchat-menu-popup-menu): New macro.
+
+       * irchat-intl.el (irchat-intl-get-msgstr-if): New macro.
+
+       * irchat-nick.el (irchat-nick-update-region): New function.
+       (irchat-nick-region-nicks): Moved from `irchat-xemacs'.
+       (irchat-nick-region-opers): Ditto.
+       (irchat-nick-region-voices): Ditto.
+
+       * irchat-menu.el (irchat-menu-callback-*): Moved from
+       `irchat-xemacs'.
+       (irchat-menu-define-menus): Moved to defadviced block.
+
+       * irchat-xemacs.el (irchat-xemacs-setup-menu): Shared
+       `irchat-nick-update-region'.
+
+       * irchat-channel.el (irchat-channel-set-operator): Fixed regexp.
+
+       * irchat-nick.el (irchat-nick-replace): Fixed regexp.
+
+1999-01-04  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-nick.el (irchat-nick-replace): Fixed execution order.
+
+       * irchat-nick.el (irchat-nick-replace): Fixed regexp.
+       And enclose `save-restriction'.
+
+       * irchat-menu.el: Add easymenu support.
+
+       * Liece 1.2.8.2.
+
+       * irchat-crypt.el (irchat-crypt-with-encrypted-message):
+       New macro.
+
+       * irchat-handle.el (irchat-handler-defsubst): New macro.
+       (irchat-handler-defun): Ditto.
+       (irchat-handler-return): Ditto.
+       All handler routines are defined with new form.
+       (irchat-handle-with-cleartext-hook): New macro.
+       (irchat-handle-cleartext-hook): Ditto.
+       (irchat-handle-run-hook-with-args): Ditto.
+       Handler code eliminated by global jump.
+       (irchat-handle-set-channel-prefix): New macro.
+       (irchat-handle-set-dialogue-prefix): Ditto.
+       (irchat-handle-set-private-prefix): Ditto.
+
+       * irchat-misc.el (irchat-insert-change): New macro.
+       (irchat-insert-notice): Ditto.
+       (irchat-insert-broadcast): Ditto.
+       (irchat-insert-wallops): Ditto.
+       (irchat-insert-error): Ditto.
+       (irchat-insert-info): Ditto.
+       (irchat-insert-timestamp): Ditto.
+       (irchat-insert-dcc): Ditto.
+       (irchat-insert-client): Ditto.
+
+1999-01-03  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-commands.el (irchat-switch-to-channel-no): Fixed.
+
+       * irchat-hilight.el (irchat-highlight-region): Check
+       `irchat-display-prefix-tag'.
+
+       * irchat-vars.el (irchat-display-prefix-tag): New variable.
+
+       * irchat-hilight.el (irchat-highlight-hide-prefix-region):
+       New function.
+
+       * irchat-version.el (irchat-version-user-agent-style): Abolished.
+       (liece-client-product): New variable.
+       (liece-client-name): New macro.
+       (liece-client-version-major): Ditto.
+       (liece-client-version-minor): Ditto.
+       (liece-client-version-beta): Ditto.
+       (liece-client-version-alpha): Ditto.
+       (liece-client-codename): Ditto.
+
+       * irchat-version.el (irchat-make-emacs-user-agent-string): New
+       function.
+
+       * irchat.el (irchat-insert): Renamed from `irchat-w-insert'.
+       (irchat-replace): Renamed from `irchat-w-replace'.
+
+       * irchat-intl.el (irchat-intl-domain-to-mime-charset-alist): New
+       variable.
+
+       * irchat-intl.el (irchat-intl-parse-Content-Type): Do not use
+       `mime-parse-Content-Type' when `mime-parse' is not loaded.
+
+       * irchat.el: Remove extra calls of `suppress-keymap'.
+
+       * irchat-compat.el: Remove all CL emulation.
+
+       * Liece 1.2.8.1.
+
+       * irchat-intl.el (irchat-intl-use-localized-messages): New
+       variable.
+
+1999-01-02  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-intl.el (irchat-intl-parse-Content-Type): Parse
+       "Content-Type:" header to recognize coding used in PO files.
+
+1999-01-01  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-intl.el (irchat-intl-domains-to-coding-system-alist):
+       Abolished.
+
+       * irchat-commands.el (irchat-command-find-timestamp): Regexp fixed.
+\f
+1998-12-30  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * Add experimental i18n feature.
+
+       * po/ja.po: New file.
+
+       * irchat-intl.el: New file.
+
+       * irchat-ctcp.el (irchat-ctcp-msg): Message format fixed.
+
+       * irchat-channel.el (irchat-channel-join): Fixed.
+       (irchat-channel-create-buffer): Fixed.
+
+1998-12-29  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-commands.el (irchat-switch-to-channel{,-no}):
+       Do not reconfigure windows.
+
+       * TODO.ja: New file.
+
+       * Liece 1.2.6.13/1.2.8.0.
+
+       * irchat-commands.el (irchat-switch-to-channel): Fixed.
+       (irchat-switch-to-channel-no): Fixed.
+
+       * irchat-misc.el (irchat-toggle-command-buffer-mode): When hiding
+       state of nick buffer is toggled, reconfigure windows every time.
+
+       * irchat-handle.el (irchat-handle-join-msg): Check whether joined
+       channel is modeless.
+
+       * irchat-misc.el (irchat-channel-modeless-p): New macro.
+       (irchat-channel-modeless-regexp): New variable.
+
+       * irchat-handle.el (irchat-handle-{join,quit,mode,part}-msg):
+       Compression of changes reworked.
+
+       * irchat-vars.el (irchat-display-time): Rename from
+       `irchat-print-time'.
+       (irchat-time-prefix-regexp): Regexp for time prefix.
+
+       * irchat-mail.el: Add autoloads instead of all requires
+       (`gnus-msg', `sendmail', `mime-edit').
+       (irchat-mail-compose-with-mail): Add evals to silence
+       byte-compiler.
+       (irchat-command-mail-compose): Fix completion.
+
+       * irchat-channel.el (irchat-channel-buffer-create):
+       Rewritten as a macro.
+
+       * irchat-nick.el (irchat-nick-buffer-create): Ditto.
+
+       * irchat-compat.el: `<<' and `>>' are become aliases of lsh.
+
+       * irchat.el: Rename `irchat-Select-keys' to `irchat-select-keys'.
+
+       * sample.liece{,.ja}: Add sample setting of
+       `irchat-startup-channel-list'.
+
+       * irchat.el (irchat-command-keys): Bind `C-c b' and `C-c N b' to
+       `irchat-command{,-nick}-scroll-down' (synced up with irchat-2.4jp24f).
+       (irchat-nick-keys): Bind scrolling functions.
+
+       * irchat.el (irchat-command-mode): Display `minor-mode-alist' on
+       mode-line.
+
+       * irchat-globals.el (irchat-obarray):
+       Set initial array length to 1.
+
+       * irchat.el: Remove preparation code of `irchat-obarray'.
+
+       * liece-faq.texinfo: Change formatting style.
+
+1998-12-10  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-commands.el (irchat-command-nick-scroll-down): Add check
+       whether `irchat-nick-buffer' is visible.
+       (irchat-command-nick-scroll-up): Ditto.
+
+       * irchat-commands.el (irchat-command-scroll-down): Add check
+       whether `irchat-channel-buffer' is visible.
+       (irchat-command-scroll-up): Ditto.
+
+1998-12-09  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-misc.el (irchat-set-channel-indicator): Add check for
+       `irchat-display-frame-title'.
+
+       * irchat.el (irchat-configure-windows): Bind
+       `irchat-channel-buffer-mode' and `irchat-nick-buffer-mode' at the
+       entry point.
+
+       * irchat-channel.el (irchat-channel-switch-to-last): New macro.
+
+       * Liece 1.2.6.12.
+
+       * irchat-commands.el (irchat-channel-real): Fix spelling.
+       (irchat-channel-virtual): Ditto.
+
+       * irchat-channel.el (irchat-channel-switch-to-last): New function.
+
+       * irchat-channel.el (irchat-channel-last): New macro.
+
+       * irchat-misc.el (irchat-change-nick-of): Fixed.
+
+1998-12-04  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-misc.el (irchat-own-channel-message):
+       (ircaht-own-private-message): Remove dialogue buffer from target
+       buffers.
+
+       * liece-faq.texinfo: Fix hook for auto invisible.
+
+1998-12-03  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-handle.el (irchat-pick-buffer): Moved to `irchat-misc.el'.
+
+       * irchat-highlit.el (irchat-highlight-pattern-alist): Fix regexp
+       for DCC chatting line.
+
+       * irchat-commands.el (irchat-command-modec): Select target channel.
+
+       * irchat-dcc.el (irchat-command-dcc-chat-listen):
+       (irchat-command-dcc-chat-listen): Use `as-binary-process'
+       block.
+
+       * irchat.el (irchat-open-server-internal): Ditto.
+
+       * irchat-vars.el (irchat-binary-coding-system): Abolished.
+
+       * irchat.el (irchat-open-server-internal): Bind
+       `file-coding-system-for-{read|write}' for Mule 2.3.
+
+       * irchat.el: `irchat-switch-to-channel-no-*' registered automatically.
+
+1998-12-02  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-vars.el: Require `mcharset'.
+
+       * Liece 1.2.6.11.
+
+       * irchat-vars.el (irchat-default-mime-charset): New variable.
+
+       * irchat-coding.el: Use `mcharset' instead of
+       `{encode|decode}-coding-*'.
+       (irchat-coding-encode-charset-region):
+       (irchat-coding-encode-charset-string): New macro.
+
+       * irchat-dcc.el (irchat-dcc-pop-request-object): Fixed.
+
+       * irchat-compat.el (caar): New macro.
+
+       * irchat-misc.el (irchat-repair-crlf): New function.
+
+       * Liece 1.2.6.10.
+
+       * irchat.el (irchat-dcc-map): New keymap.
+
+       * irchat-dcc.el (irchat-command-dcc-accept): New function.
+       (irchat-dcc-get-*): Access method for request object.
+       (irchat-dcc-pop-request-object): New macro.
+
+       * Liece 1.2.6.9.
+
+       * irchat-dcc.el: Very experimental DCC chat support added.
+       (irchat-command-dcc-chat-listen): New function.
+       (irchat-command-dcc-chat-connect): Ditto.
+       (irchat-dcc-chat-listen-filter): Ditto.
+       (irchat-dcc-chat-connect-filter): Ditto.
+       (irchat-dcc-chat-filter): Ditto.
+       (irchat-dcc-channel-representation-format): New variable.
+
+       * irchat-channel.el: Very experimental multiple server support
+       added.
+       (irchat-default-channel-representation-format): New variable. This
+       is unified channel locater. Set default as
+       "@<server abbreviation>+<channel name>".
+       (irchat-channel-parse-representation): New function.
+       (irchat-channel-prepare-representation): Ditto.
+
+       * irchat-misc.el (irchat-own-channel-message): New function.
+
+       * irchat-misc.el (irchat-own-message): New macro.
+
+       * dcc.ml: Explicitly return with code 0.
+
+       * irchat-dcc.el (irchat-dcc-send-filter): Fixed.
+       (irchat-dcc-receive-filter): Fixed.
+
+1998-12-01  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-vars.el (irchat-dcc-prefix): New variable.
+
+       * irchat-compat.el (cdddr): New macro.
+
+       * irchat-dcc.el (irchat-dcc-add-to-receive-list): New macro.
+       (irchat-dcc-add-to-process-alist): Ditto.
+       (irchat-dcc-get-process-object): Ditto.
+       (irchat-dcc-sentinel): New sentinel function.
+       (irchat-dcc-prepare-directory): New function.
+       (irchat-ctcp-dcc-msg): Add handler for DCC chat.
+       (irchat-command-dcc-send): Rewritten.
+       (irchat-command-dcc-receive): Ditto.
+       (irchat-command-dcc-list): Ditto.
+
+       * Liece 1.2.6.8.
+
+       * dcc.ml: New file.
+
+       * naddr.mli: Ditto.
+
+       * naddr.ml: Ditto.
+
+       * irchat-misc.el (irchat-own-message):
+       (irchat-own-private-message): Add check whether channel buffer has
+       been created.
+
+       * sample.dot.liece: Fix typo.
+
+       * sample.dot.liece.ja: Ditto.
+
+       * irchat-url.el (irchat-url-browser-netscape): Use builtin
+       composer when encounted `mailto:'.
+
+       * irchat-commands.el (irchat-dialogue-insert): Abolished.
+\f
+1998-11-28  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-misc.el (irchat-own-private-message): Check if
+       `irchat-command-buffer-mode' is not 'chat.
+
+       * Liece 1.2.6.7.
+
+       * irchat-channel.el (irchat-channel-prepare-partner):
+       Fixed for setting `irchat-current-chat-partner'.
+
+       * irchat.el: Do not require `irchat-mail'.
+
+1998-11-27  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat.el: Set default `truncate-lines'.
+
+1998-11-26  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-vars.el (irchat-display-frame-title): New variable.
+
+       * Liece 1.2.6.6.
+
+       * irchat-channel.el (irchat-command-toggle-channel-buffer-mode):
+       Remove setting dirty flag.
+
+       * irchat-nick.el (irchat-command-toggle-nick-buffer-mode):
+       Ditto
+
+1998-11-25  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-mail.el: New file.
+
+       * irchat-vars.el (irchat-convert-hankaku-katakana): New variable.
+
+       * irchat-hankana.el: New file.
+
+       * Liece 1.2.6.5.
+
+       * irchat-300.el (irchat-handle-303-msg): Print come back
+       messages for private conversation.
+
+       * irchat-misc.el (irchat-set-channel-indicator): New macro.
+
+       * irchat-handle.el (irchat-handle-nick-msg): Fixed channel indicator.
+
+       * irchat.el (irchat-close-server): Set `irchat-server' to nil.
+
+       * irchat-handle.el (irchat-handle-join-msg): Fixed for private
+       conversation.
+
+       * Add copylefts.
+
+1998-11-23  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-globals.el (irchat-ison-timer): New variable.
+
+       * irchat-vars.el (irchat-ison-interval): New variable.
+
+       * irchat-commands.el (irchat-command-set-ison-timer): New
+       function.
+       (irchat-command-cancel-ison-timer): Ditto.
+
+       * irchat-misc.el (irchat-completing-sequential-read): New function.
+
+       * Liece 1.2.6.4.
+
+       * irchat-compat.el (irchat-button3): Moved into `eval-and-compile'
+       enclosure.
+
+       * irchat.el: Do not require alist.
+
+       * irchat-handle.el (irchat-handle-quit-msg): Rewritten.
+
+       * irchat-handle.el (irchat-handle-nick-msg): Handle nick message
+       and reflect changes to private buffers.
+
+1998-11-21  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * Liece 1.2.6.3.
+
+       * irchat-misc.el (irchat-channel-p): New macro.
+       (irchat-toggle-command-buffer-mode): New wrapper function.
+
+       * irchat.el (irchat-windows-reconfiguration-needed): Fixed
+       predicate for nick buffer mode and channel list mode.
+
+       * irchat.el (irchat-command-keys): Removed duplicated binding of
+       `irchat-command-enter-message'(`\C-j' and `\M-\C-j').
+
+1998-11-19  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-handle.el (irchat-handle-privmsg-msg): Fixed.
+
+       * etc/ball.*.xpm: Remove background color in each XPM file
+       (From Yasushi Shoji <yashi@yashi.com>).
+
+       * sample.dot.liece: Add sample customizations of new feature.
+       `irchat-channel-list-buffer-mode',
+       `irchat-channel-list-window-width-percent',
+       `irchat-auto-join-partner'.
+
+       * irchat-filter.el (irchat-filter): Remove unreferenced binding.
+
+       * irchat-handle.el (irchat-handle-privmsg-msg): Handle private
+       message and join automatically.
+
+       * Liece 1.2.6.2.
+
+       * irchat-vars.el (irchat-auto-join-partner): New variable.
+       (irchat-channel-list-window-width-percent): Ditto.
+
+       * irchat-compat.el (irchat-button3): New variable.
+
+       * irchat-channel.el (irchat-channel-push-button): New handler.
+       (irchat-channel-list-insert): New function.
+       (irchat-channel-prepare-partner): New function.
+
+       * irchat-url.el (irchat-url-push-button): Search URL string around
+       event line.
+
+       * irchat.el (irchat-channel-list-mode): New major mode.
+       (irchat-configure-windows): Fixed for channel list window.
+       (irchat-channel-list-mode-map); New keymap.
+
+       * All irchat-{`Command', `Nick', `Channel', `Others', `Crypt'}-*
+       symbols renamed with uncapitalized one.
+
+1998-11-16  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * Liece 1.2.4.4.
+
+       * irchat-filter.el: Do not require mcharset.
+
+       * irchat-timer.el: Macro expression fixed (for Emacs19).
+
+       * Liece 1.2.4.3/1.2.6.1.
+
+       * irchat-vars.el (irchat-binary-coding-system):
+       New variable.
+
+       * irchat-coding.el: New file.
+
+       * irchat-filter.el (irchat-run-message-hook-types):
+       Abolished.
+       (irchat-handle-message): Rewritten.
+       (irchat-handle-message-2): Rewritten.
+
+1998-11-15  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat.el (irchat-Dialogue-mode-map):
+       (irchat-Channel-mode-map):
+       (irchat-Others-mode-map): Add check whether array style keymap
+       expression is acceptable.
+
+       * liece-faq.texinfo: New FAQ added for older version of emacsen.
+
+       * irchat-handle.el (irchat-handle-privmsg-msg):
+       Rewritten.
+
+       * irchat-200.el (irchat-handle-200-msgs):
+       Channel mask regexp fixed.
+
+       * irchat-300.el (irchat-handle-300-msgs):
+       Ditto.
+
+       * irchat-400.el (irchat-handle-400-msgs):
+       Ditto.
+
+       * sample.dot.liece: Add sample hook for auto invisible.
+
+       * Liece 1.2.3.5.
+
+       * irchat-vars.el (irchat-default-coding-system):
+       Set default to 'iso-2022-jp.
+       (irchat-detect-coding-system): New custom variable.
+
+       * irchat-misc.el (irchat-send): Add code conversion with
+       `encode-coding-region' .
+
+       * irchat-filter.el (irchat-filter): Add coding-system detection.
+
+       * irchat-compat.el (irchat-set-process-coding-system):
+       (irchat-buffer-disable-undo): Abolished.
+       (buffer-disable-undo): New macro.
+
+       * defsubst.el: Removed.
+
+1998-11-14  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-ctcp.el (irchat-ccl-quote-decode): Fixed.
+
+1998-11-13  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-ctcp.el (ccl-cascade-write):
+       (ccl-set-register-right): New broken facility.
+       (irchat-ccl-quote-decode): Rewritten with checking broken CCL
+       facilities.
+
+       * irchat-timer.el (irchat-start-timer):
+       Fixed macro expression for older versions of emacsen.
+
+       * irchat-compat.el (defface): New macro for older versions of
+       emacsen.
+
+1998-11-12  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-ctcp.el: Add CCL usability checking with `ccl-usable'.
+
+1998-11-11  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-version.el (irchat-make-user-agent-string):
+       (irchat-make-version-string):
+       Regexp fixed.
+
+       * irchat-ctcp.el (irchat-ccl-quote-decode):
+       (irchat-ccl-quote-encode): Check if module `pccl' exists.
+
+       * sample.dot.liece: Renamed from sample.irchat3_vars.el.
+
+       * irchat-version.el (liece-client-minor-version):
+       Numbered as 1.2.3.3.
+       (irchat-version-user-agent-style):
+       Declaration revereted to `defvar' from `defcustom'.
+
+       * Makefile: Removed `-lnsl'.
+\f
+1998-10-20  Daiki Ueno  <daiki@kake.info.waseda.ac.jp>
+
+       * irchat-nick.el (irchat-Nick-update): Bug fixed in splitting 353
+       (NAMEREPLY) message.
+
+       * irchat-inlines.el (list-to-assoclist): Rewritten.
+
+1998-10-08  Daiki Ueno  <daiki@dice.cache.waseda.ac.jp>
+
+       * irchat-xemacs.el (irchat-toolbar-spec-list): Replace
+       `irchat-Command-push' and `irchat-Command-pop' with
+       `irchat-Command-previous-channel' and `irchat-Command-next-channel'.
+       (irchat-x-face-face-insert): Evaluate also when loaded.
+
+1998-10-07  Daiki Ueno  <daiki@dice.cache.waseda.ac.jp>
+
+       * irchat-crypt.el (base64-encode-string): Fixed autoload with
+       `mel' to `mel-b' package.
+       (base64-decode-string): Ditto.
+
+1998-10-06  Daiki Ueno  <daiki@dice.cache.waseda.ac.jp>
+
+       * irchat-xemacs.el (irchat-xemacs-splash-logo): Splash screen with
+       "liece.xpm" on every loadup time.
+
+       * irchat-version.el (liece-client-version): Numbered as 1.2.1.
+
+       * irchat-x-face.el (irchat-x-face-face-insert): Display X-Face on
+       each prefix line align middle.
+
+       * irchat-debug.el: New file.
+
+1998-10-02  Daiki Ueno  <daiki@dice.cache.waseda.ac.jp>
+
+       * irchat.el (irchat-Debug-mode): New major mode for
+       `irchat-Command-debug'.
+
+       * liece-faq.texinfo: New file.
+
+       * irchat-commands.el (irchat-Client-query-map): Key binding for
+       `irchat-Command-client-x-face-from-minibuffer' substituted with
+       `irchat-Command-client-x-face-from-xbm-file'.
+
+       * irchat-compat.el (replace-in-string): New function from XEmacs
+       subr.el.
+
+       * irchat-x-face.el: New file.
+       (irchat-x-face-insert): Now works properly with GNU Emacs.
+
+       * irchat-xemacs.el (irchat-x-face-insert): New function.
+       (irchat-x-face-encode): Ditto.
+
+       * irchat-ctcp.el (irchat-ctcp-x-face-msg): X-Face query support.
+       Now it works only with X-Face utility.
+
+       * irchat-version.el (liece-client-version-beta): New variable.
+
+1998-10-01  Daiki Ueno  <daiki@dice.cache.waseda.ac.jp>
+
+       * irchat.el (irchat-clear-system): Restart now reworked.
+
+       * irchat-make.el (config-irchat): Add check wheter APEL version is
+       9.0 or later.
+
+       * irchat-ctcp.el (irchat-ctcp-version-msg): Rewritten with new
+       style version string.
+
+       * irchat-version.el (irchat-version-user-agent-style): New
+       variable.
+       (irchat-make-user-agent-string): New function.
+       (irchat-make-client-version-string): Ditto.
+       (irchat-make-version-string): Ditto.
+
+       * irchat-make.el (config-irchat): Rewritten.
+
+       * irchat-ctcp.el: Renamed from irchat-cta.el.
+       (irchat-ccl-quote-cs): New coding system for file transfer.
+       (irchat-ccl-quote-encode): New CCL program.
+       (irchat-ccl-quote-decode): Ditto.
+       (irchat-ctcp-msg): Hook checking code eliminated.
+       (irchat-ctcp-client-msg): Ditto.
+\f
+1998-09-30  Daiki Ueno  <daiki@dice.cache.waseda.ac.jp>
+
+       * irchat-hilight.el (irchat-highlight-buffer):
+       Add check whether there is point has
+
+       * irchat-compat (irchat-get-text-property):
+       Add signal handler for XEmacs extents.
+
+       * irchat-commands.el: Require `irchat-dcc.el'.
+
+       * Makefile: New rule for .texinfo to .info.
+
+       * irchat-hilight.el (irchat-highlight-buffer): Bug fix for
+       `irchat-highlight-pattern'.
+
+1998-09-29  Daiki Ueno  <daiki@kiss.kake.info.waseda.ac.jp>
+
+       * irchat-make.el (install-irchat): Fixed usage of function
+       install-files.
+
+       * irchat-nick.el: Do not require widget wid-edit.
+
+       * irchat-make.el (irchat-modules-to-compile): Added
+       irchat-channel, irchat-nick to module list.
+
+       * irchat-hilight.el (irchat-highlight-insert-with-mouse-face):
+       Addded check whether function widget-create is bounded.
+
+       * irchat-compat.el: Require cl.
+
+       * Makefile: Require cl. Machine specific option removed.
+
+       * irchat-commands.el (irchat-Command-send-message):
+       New signal handler for `encode-coding-string' with unknown coding
+       system. This encoding is needed when `irchat-crypt-mode-active-p'
+       is non nil.
+
+       * irchat.el: Renamed from irchat-main.el.
+
+       * irchat-main.el: Removed.
+
+1998-09-29  Daiki Ueno  <daiki@dice.cache.waseda.ac.jp>
+
+       * irchat-crypt.el (irchat-read-passphrase): New alias.
+
+1998-09-28  Daiki Ueno  <daiki@dice.cache.waseda.ac.jp>
+
+       * irchat-make.el: New file.
+
+       * irchat-compat.el: New file.
+
+       * irchat-ja.texinfo: New file.
+
+       * setpath.el: Removed.
+
+       * irchat-url.el (irchat-url-button-push): New handler.
+
+       * irchat-main.el (irchat-Select-map): New keymap.
+
+       * irchat-filter.el: Added autoloads for entry points of 000, 200,
+       300, 400, 500 message handlers.
+
+       * irchat-misc.el (irchat-greet-author): Abolished.
+
+       * irchat-channel.el: Splitted from irchat-commands.el.
+
+       * irchat-nick.el: Ditto.
diff --git a/lisp/Makefile b/lisp/Makefile
new file mode 100644 (file)
index 0000000..784f25d
--- /dev/null
@@ -0,0 +1,85 @@
+# -*- makefile -*-
+#
+# Makefile for liece
+#
+# $Id: Makefile,v 1.4 1998/09/29 04:52:47 daiki Exp $
+#
+
+PACKAGE  = liece
+VERSION  = 1.3
+
+EMACS    = emacs
+XEMACS = xemacs
+FLAGS    = -batch -q -no-site-file
+TAR     = tar
+CC       = gcc
+CFLAGS   = -O
+LDFLAGS  = 
+OCAMLC  = ocamlc
+OCAMLOPT = ocamlopt
+OCAMLDEP = ocamldep
+IFLAGS   =
+OBJS     = naddr.cmo dcc.cmo
+
+PREFIX   = NONE
+LISPDIR  = NONE
+PACKAGEDIR = NONE
+VERSION_SPECIFIC_LISPDIR = NONE
+
+GOMI     = liece-setup.el *.elc *.cm[ioxa] dcc *.opt
+
+all: elc
+
+elc: 
+       $(EMACS) $(FLAGS) -l ./liece-make.el -f autoload-liece \
+               $(PREFIX) $(LISPDIR) $(VERSION_SPECIFIC_LISPDIR)
+       $(EMACS) $(FLAGS) -l ./liece-make.el -f compile-liece \
+               $(PREFIX) $(LISPDIR) $(VERSION_SPECIFIC_LISPDIR)
+
+dcc: $(OBJS)
+       ocamlc -custom unix.cma nums.cma str.cma $(OBJS) \
+               -cclib -lunix -cclib -lnums -cclib -lstr -o dcc
+
+install:       elc
+       $(EMACS) $(FLAGS) -l ./liece-make.el -f install-liece \
+               $(PREFIX) $(LISPDIR) $(VERSION_SPECIFIC_LISPDIR)
+
+package:
+       $(XEMACS) $(FLAGS) -l ./liece-make.el -f autoload-liece \
+               $(PREFIX) $(LISPDIR) $(VERSION_SPECIFIC_LISPDIR)
+       $(XEMACS) $(FLAGS) -l ./liece-make.el -f compile-liece-package \
+               $(PACKAGEDIR)
+
+install-package: package
+       $(XEMACS) $(FLAGS) -l ./liece-make.el -f install-liece-package \
+               $(PACKAGEDIR)
+
+tag:
+       sh -c 'cvs tag -RF liece-`echo $(VERSION) | \
+               tr . _`-`date +%Y%m%d%H%m`'
+
+.SUFFIXES: .texinfo .info .mli .cmi .ml .cmo .cmx
+
+.texinfo.info:
+       $(EMACS) -batch -q -no-site-file -eval '(find-file "$<")' \
+               -f texinfo-every-node-update \
+               -f texinfo-format-buffer \
+               -f save-buffer
+
+.mli.cmi:
+       $(OCAMLC) -c $(IFLAGS) $<
+
+.ml.cmo:
+       $(OCAMLC) -c $(IFLAGS) $<
+
+.ml.cmx:
+       $(OCAMLOPT) -c $(IFLAGS) $<
+
+clean: 
+       -rm -f $(GOMI)
+
+depend:
+       $(OCAMLDEP) $(IFLAGS) *.ml* > .depend
+
+-include .depend
+
diff --git a/lisp/Makefile.am b/lisp/Makefile.am
new file mode 100644 (file)
index 0000000..a58a602
--- /dev/null
@@ -0,0 +1,69 @@
+## Process this file with automake to produce Makefile.in
+## We do not use automake's emacs-lisp support.
+
+SOURCES = liece-clfns.el liece-handler.el gettext.el \
+       liece-compat.el liece-version.el \
+       liece-vars.el liece-globals.el liece-inlines.el \
+       liece-filter.el liece-dcc.el liece-menu.el \
+       liece-000.el liece-200.el liece-300.el liece-400.el liece-500.el \
+       liece-nick.el liece-channel.el \
+       liece-commands.el liece-ctcp.el \
+       liece-handle.el liece-hilit.el liece-intl.el liece-mail.el \
+       liece-minibuf.el liece-misc.el liece-url.el liece-message.el \
+       liece-x-face.el liece-tcp.el liece-coding.el \
+       queue-m.el liece-crypt.el liece.el \
+       liece-window.el
+
+EXTRA_DIST = liece-make.el liece-config.el liece-modules.el \
+       liece-emacs.el liece-xemacs.el \
+       liece-q-ccl.el liece-q-el.el \
+       bitmap-stipple.el \
+       liece.xpm liece.xbm
+
+TARGETS = $(SOURCES:.el=.elc)
+
+if USE_CUSTOM_LISPDIR
+LISPDIR  = $(lispdir)
+VERSION_SPECIFIC_LISPDIR = $(lispdir)/emu
+else
+LISPDIR  = NONE
+VERSION_SPECIFIC_LISPDIR = NONE
+endif
+
+if USE_CUSTOM_PACKAGEDIR
+PACKAGEDIR = $(packagedir)
+else
+PACKAGEDIR = NONE
+endif
+
+EMACS_AUTOLOAD_FLAGS = -f autoload-liece 
+
+if USE_PACKAGE
+EMACS_COMPILE_FLAGS = -f compile-liece-package $(PACKAGEDIR)
+EMACS_INSTALL_FLAGS = -f install-liece-package $(PACKAGEDIR)
+else
+EMACS_COMPILE_FLAGS = -f compile-liece \
+       NONE $(LISPDIR) $(VERSION_SPECIFIC_LISPDIR)
+EMACS_INSTALL_FLAGS = -f install-liece \
+       NONE $(LISPDIR) $(VERSION_SPECIFIC_LISPDIR)
+endif
+
+
+all: $(TARGETS)
+
+$(TARGETS): liece-make.el liece-setup.el $(SOURCES)
+       $(EMACS) -batch  -q -no-site-file -l ./liece-make.el \
+               $(EMACS_COMPILE_FLAGS)
+
+liece-setup.el:
+       $(EMACS) -batch -q -no-site-file -l ./liece-make.el \
+               $(EMACS_AUTOLOAD_FLAGS)
+
+install-exec-local: $(TARGETS)
+       $(EMACS) -batch  -q -no-site-file -l ./liece-make.el \
+               $(EMACS_INSTALL_FLAGS)
+
+clean-local:
+       -rm *.elc liece-setup.el
+
+.PHONY: update
diff --git a/lisp/bitmap-stipple.el b/lisp/bitmap-stipple.el
new file mode 100644 (file)
index 0000000..c946ed0
--- /dev/null
@@ -0,0 +1,93 @@
+;;; bitmap-stipple.el --- display bitmap file using stipple.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-05-30
+;; Keywords: bitmap, stipple
+
+;; This file is not part of any package.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(defun bitmap-stipple-xbm-file-to-stipple (file)
+  "Convert xbm FILE into icon format and return the list of spec and buffers."
+  (with-temp-buffer
+    (erase-buffer)
+    (let ((case-fold-search t) width height xbytes right margin)
+      (insert-file-contents file)
+      (goto-char (point-min))
+      (or (re-search-forward "_width[\t ]+\\([0-9]+\\)" nil t)
+         (error "!! Illegal xbm file format" (current-buffer)))
+      (setq width (string-to-int (match-string 1))
+           xbytes (/ (+ width 7) 8))
+      (goto-char (point-min))
+      (or (re-search-forward "_height[\t ]+\\([0-9]+\\)" nil t)
+         (error "!! Illegal xbm file format" (current-buffer)))
+      (setq height (string-to-int (match-string 1)))
+
+      (goto-char (point-min))
+      (re-search-forward "0x[0-9a-f][0-9a-f],")
+      (delete-region (point-min) (match-beginning 0))
+
+      (goto-char (point-min))
+      (while (re-search-forward "[\n\r\t ,;}]" nil t)
+       (replace-match ""))
+      (goto-char (point-min))
+      (while (re-search-forward "0x" nil t)
+       (replace-match "\\x" nil t))
+      (goto-char (point-min))
+      (insert "(" (number-to-string width) " " (number-to-string height) " \"")
+      (goto-char (point-max))
+      (insert "\")")
+      (goto-char (point-min))
+      (read (current-buffer)))))
+
+(defun bitmap-stipple-insert-pixmap (pixmap &optional center)
+  "Insert PIXMAP in the current buffer.
+Optional argument CENTER specified, pixmap will be centered."
+  (let (width height beg i)
+    (or (facep 'bitmap-stipple-splash)
+       (make-face 'bitmap-stipple-splash))
+    (setq width (/ (car pixmap) (frame-char-width))
+         height (/ (cadr pixmap) (frame-char-height)))
+    (set-face-foreground 'bitmap-stipple-splash "red")
+    (set-face-stipple 'bitmap-stipple-splash pixmap)
+    (if center (insert-char ?\n height))
+    (setq i height)
+    (while (> i 0)
+      (setq beg (point))
+      (insert-char ?  width)
+      (set-text-properties beg (point) '(face bitmap-stipple-splash))
+      (insert "\n")
+      (decf i))))
+  
+;;;###autoload
+(defun bitmap-stipple-insert-xbm-file (file)
+  "Insert xbm FILE at point."
+  (interactive "fxbm file: ")
+  (save-excursion
+    (bitmap-stipple-insert-pixmap
+     (bitmap-stipple-xbm-file-to-stipple file))))
+
+(provide 'bitmap-stipple)
+
+;;; bitmap-stipple.el ends here
diff --git a/lisp/gettext.el b/lisp/gettext.el
new file mode 100644 (file)
index 0000000..a23a7d5
--- /dev/null
@@ -0,0 +1,255 @@
+;;; gettext.el --- GNU gettext interface
+;; Copyright (C) 1999 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-09-10
+;; Keywords: i18n
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile (require 'cl))
+
+(require 'mcharset)
+
+(eval-and-compile
+  (autoload 'mime-content-type-parameter "mime-parse")
+  (autoload 'mime-read-Content-Type "mime-parse"))
+
+(defvar gettext-gmo-endian 1234)
+(defvar gettext-message-domain-to-catalog-alist nil)
+(defvar gettext-default-message-domain "emacs")
+(defvar gettext-default-mime-charset default-mime-charset)
+
+(defconst gettext-msgid-regexp "msgid\\s-*\"")
+(defconst gettext-msgstr-regexp "msgstr\\s-*\"")
+
+(defmacro gettext-hex-char-to-integer (character)
+  `(if (and (>= ,character ?0) (<= ,character ?9))
+       (- ,character ?0)
+     (let ((ch (logior ,character 32)))
+       (if (and (>= ch ?a) (<= ch ?f))
+          (- ch (- ?a 10))
+        (error "Invalid hex digit `%c'" ch)))))
+
+(defun gettext-hex-string-to-integer (hex-string)
+  (let ((hex-num 0))
+    (while (not (equal hex-string ""))
+      (setq hex-num (+ (* hex-num 16)
+                      (gettext-hex-char-to-integer
+                       (string-to-char hex-string)))
+           hex-string (substring hex-string 1)))
+    hex-num))
+
+(defun gettext-gmo-read-32bit-word ()
+  (let ((word (string-to-char-list
+              (buffer-substring (point) (+ (point) 4)))))
+    (forward-char 4)
+    (apply #'format "%02x%02x%02x%02x"
+          (mapcar (lambda (ch) (logand 255 ch))
+                  (if (= gettext-gmo-endian 1234)
+                      (nreverse word)
+                    word)))))
+    
+(defmacro gettext-gmo-header-revision (header)
+  `(aref header 0))
+
+(defmacro gettext-gmo-header-nn (header)
+  `(aref header 1))
+
+(defmacro gettext-gmo-header-oo (header)
+  `(aref header 2))
+
+(defmacro gettext-gmo-header-tt (header)
+  `(aref header 3))
+
+(defmacro gettext-gmo-header-ss (header)
+  `(aref header 4))
+
+(defmacro gettext-gmo-header-hh (header)
+  `(aref header 5))
+
+(defmacro gettext-gmo-read-header ()
+  (cons 'vector
+       (make-list 6 '(gettext-hex-string-to-integer
+                      (gettext-gmo-read-32bit-word)))))
+
+(defun gettext-gmo-collect-strings (nn)
+  (let (strings pos len off)
+    (dotimes (i nn)
+      (setq len (gettext-hex-string-to-integer
+                (gettext-gmo-read-32bit-word))
+           off (gettext-hex-string-to-integer
+                (gettext-gmo-read-32bit-word))
+           pos (point))
+      (goto-char (1+ off))
+      (push (buffer-substring (point) (+ (point) len))
+           strings)
+      (goto-char pos))
+    (nreverse strings)))
+
+(defmacro gettext-parse-Content-Type (&optional header)
+  (require 'path-util)
+  (if (module-installed-p 'mime-parse)
+      (list 'with-temp-buffer
+           (list 'insert header)
+           '(mime-content-type-parameter
+             (mime-read-Content-Type)
+             "charset"))
+    'gettext-default-mime-charset))
+
+(defun gettext-mapcar* (function &rest args)
+  "Apply FUNCTION to successive cars of all ARGS.
+Return the list of results."
+  (unless (memq nil args)
+    (cons (apply function (mapcar #'car args))
+         (apply #'gettext-mapcar* function
+                (mapcar #'cdr args)))))
+
+(defun gettext-load-message-catalogue (file)
+  (with-temp-buffer
+    (let (header strings charset gettext-obarray)
+      (as-binary-input-file
+       (insert-file-contents file)
+       (goto-char (point-min))
+       (when (looking-at "\x95\x04\x12\xde")
+        (setq gettext-gmo-endian 4321))
+       (forward-char 4)
+       (setq header (gettext-gmo-read-header)
+            strings
+            (gettext-mapcar* #'cons
+                    (progn
+                      (goto-char (1+ (gettext-gmo-header-oo header)))
+                      (gettext-gmo-collect-strings
+                       (gettext-gmo-header-nn header)))
+                    (progn
+                      (goto-char (1+ (gettext-gmo-header-tt header)))
+                      (gettext-gmo-collect-strings
+                       (gettext-gmo-header-nn header))))
+            charset (or (gettext-parse-Content-Type
+                         (cdr (assoc "" strings)))
+                        'x-ctext)
+            gettext-obarray (make-vector
+                             (* 2 (gettext-gmo-header-nn header))
+                             0)))
+      (dolist (oott strings)
+       (set (intern (car oott) gettext-obarray)
+            (decode-mime-charset-string
+             (cdr oott) charset)))
+      gettext-obarray)))
+
+(defun gettext-load-portable-message-catalogue (file)
+  (with-temp-buffer
+    (let (strings charset msgstr msgid state gettext-obarray)
+      (as-binary-input-file
+       (insert-file-contents file)
+       (goto-char (point-min))
+       (while (not (eobp))
+        (cond
+         ((looking-at gettext-msgid-regexp)
+          (if (eq state 'msgstr)
+              (push (cons msgid msgstr)
+                    strings))
+          (setq msgid (buffer-substring (match-end 0)
+                                        (progn (end-of-line) (point))))
+          (when (string-match "\"\\s-*$" msgid)
+            (setq msgid (substring msgid 0 (match-beginning 0))))
+          (setq state 'msgid))
+         ((looking-at gettext-msgstr-regexp)
+          (setq msgstr (buffer-substring (match-end 0)
+                                         (progn (end-of-line) (point))))
+          (when (string-match "\"\\s-*$" msgstr)
+            (setq msgstr (substring msgstr 0 (match-beginning 0))))
+          (setq state 'msgstr))
+         ((looking-at "\\s-*\"")
+          (let ((line (buffer-substring (match-end 0)
+                                        (progn (end-of-line) (point)))))
+            (when (string-match "\"\\s-*$" line)
+              (setq line (substring line 0 (match-beginning 0))))
+            (set state (concat (symbol-value state) line)))))
+        (beginning-of-line 2))
+       (if (eq state 'msgstr)
+          (push (cons msgid msgstr)
+                strings))
+       ;; Remove quotations
+       (erase-buffer)
+       (goto-char (point-min))
+       (insert "(setq strings '(\n")
+       (dolist (oott strings)
+        (insert (format "(\"%s\" . \"%s\")\n"
+                        (car oott) (cdr oott)))
+        (insert "))"))
+       (ignore-errors (eval-buffer))
+       (setq charset (or (gettext-parse-Content-Type
+                         (cdr (assoc "" strings)))
+                        'x-ctext)))
+      (dolist (oott strings)
+       (set (intern (car oott) gettext-obarray)
+            (decode-mime-charset-string
+             (cdr oott) charset)))
+      gettext-obarray)))
+
+(unless (featurep 'i18n3)
+  (eval-and-compile
+    (defun dgettext (domain string)
+      "Look up STRING in the default message domain and return its translation.
+\[XEmacs I18N level 3 emulating function]"
+      (let ((oott (assoc domain gettext-message-domain-to-catalog-alist)))
+       (when (stringp (cdr oott))
+         (setcdr oott (gettext-load-message-catalogue
+                       (cdr oott))))
+       (or (symbol-value
+            (intern-soft string (or (cdr oott) (make-vector 1 0))))
+           string))))
+  
+  (defun gettext (string)
+    "Look up STRING in the default message domain and return its translation.
+\[XEmacs I18N level 3 emulating function]"
+    (dgettext gettext-default-message-domain string))
+
+  (defun bind-text-domain (domain pathname)
+    "Associate a pathname with a message domain.
+Here's how the path to message files is constructed under SunOS 5.0:
+  {pathname}/{LANG}/LC_MESSAGES/{domain}.mo
+\[XEmacs I18N level 3 emulating function]"
+    (let* ((lang (getenv "LANG"))
+          (file (concat domain ".mo"))
+          (catalog (expand-file-name
+                    file (concat pathname "/" lang "/LC_MESSAGES"))))
+      (when (file-exists-p catalog)
+       ;;(file-exists-p (setq catalog (expand-file-name file pathname)))
+       (push (cons domain catalog) gettext-message-domain-to-catalog-alist))))
+
+  (defun set-domain (domain)
+    "Specify the domain used for translating messages in this source file.
+The domain declaration may only appear at top-level, and should precede
+all function and variable definitions.
+
+The presence of this declaration in a compiled file effectively sets the
+domain of all functions and variables which are defined in that file.
+\[XEmacs I18N level 3 emulating function]"
+    (setq gettext-default-message-domain domain)))
+
+(provide 'gettext)
+
+;;; gettext.el ends here
diff --git a/lisp/liece-000.el b/lisp/liece-000.el
new file mode 100644 (file)
index 0000000..f7cc798
--- /dev/null
@@ -0,0 +1,166 @@
+;;; liece-000.el --- Handler routines for 000 numeric reply.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-01-26
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile (require 'cl))
+
+(eval-when-compile
+  (require 'liece-inlines)
+  (require 'liece-intl)
+  (require 'liece-misc))
+
+(defvar liece-tmp-server-name)
+
+(defun* liece-handle-000-messages (number prefix rest)
+  (setq liece-nick-accepted 'ok)
+  (or (string-match "[^ ]* \\([^ :]*\\) *\\([^ :]*\\) *:\\(.*\\)" rest)
+      (return-from liece-handle-000-messages))
+  (let ((target1 (match-string 1 rest)) (target2 (match-string 2 rest))
+       (msg (match-string 3 rest)))
+    (cond
+     ((string-equal target1 "")
+      (liece-insert liece-000-buffer
+                    (concat liece-info-prefix msg "\n")))
+     ((string-equal target2 "")
+      (liece-insert liece-000-buffer
+                    (format "%s%s (%s)\n" liece-info-prefix msg target1)))
+     (t
+      (liece-insert liece-000-buffer
+                    (format "%s%s %s (%s)\n"
+                            liece-info-prefix target1 msg target2))))))
+
+(defun* liece-handle-001-message (prefix rest)
+  "RPL_WELCOME \"Welcome to the Internet Relay Network <nick>\""
+  (or (< 0 (length (setq rest (liece-split-line rest))))
+      (return-from liece-handle-001-message))
+  (let ((nick (car rest)))
+    (setq liece-tmp-server-name prefix
+         liece-nickname nick
+         liece-real-nickname nick
+         liece-my-userhost nil)
+    (liece-send "USERHOST %s" liece-nickname)
+    (liece-insert-info
+     liece-000-buffer
+     (format
+      (_ "Welcome to the Internet Relay Chat world. Your nick is %s.\n")
+      nick))))
+
+(defun liece-handle-002-message (prefix rest)
+  "RPL_YOURHOST \"Your host is <host>, running version <version>\"."
+  (cond
+   ((string-match "running version \\(.*\\)" rest)
+    (liece-insert-info liece-000-buffer
+                       (format (_ "Your server is %s (version %s).\n")
+                               liece-tmp-server-name (match-string 1 rest))))
+   (t
+    (liece-insert-info liece-000-buffer
+                       (format (_ "Your client version is %s.\n")
+                               (liece-version))))))
+
+(defun liece-handle-003-message (prefix rest)
+  "RPL_CREATED \"This server was created <time>\"."
+  (if (string-match "was created \\(.*\\)" rest)
+      (liece-insert-info liece-000-buffer
+                         (format (_ "Your server was created %s\n")
+                                 (match-string 1 rest)))))
+
+(defmacro char-list-to-string-alist (clist)
+  `(mapcar
+    (lambda (ch) (list (char-to-string ch)))
+    ,clist))
+
+(defun* liece-handle-004-message (prefix rest)
+  "RPL_MYINFO \"<umodes> <chnlmodes>\""
+  (or (string-match "[^ ]* \\(.*\\)" rest)
+      (return-from liece-handle-004-message))
+  (let ((rest (match-string 1 rest)))
+    (cond
+     ((string-match "[^ ]* [^ ]* \\([^ ]+\\) \\(.*\\)" rest)
+      (setq liece-supported-user-mode-alist
+           (char-list-to-string-alist
+            (string-to-char-list (match-string 1 rest)))
+           liece-supported-channel-mode-alist
+           (char-list-to-string-alist
+            (string-to-char-list (match-string 2 rest)))))
+     (t
+      (liece-insert-info liece-000-buffer (concat rest "\n"))))))
+
+\f
+;; Undernet's MAP feature
+(defvar liece-undernet-map nil)
+
+(defun liece-handle-005-message (prefix rest)
+  "RPL_MAP \"<server>\"."
+  (liece-increment-long-reply-count)
+  (liece-check-long-reply-count)
+  (push rest liece-undernet-map))
+
+(defun liece-handle-006-message (prefix rest)
+  "RPL_MAPMORE \"<server> --> *more*\"."
+  (liece-increment-long-reply-count)
+  (liece-check-long-reply-count)
+  (if (string-match " --> \*more\*" rest)
+      (setq rest (concat "[" (substring rest 0 (match-beginning 0)))) "]*")
+  (push rest liece-undernet-map))
+
+(defun liece-handle-007-message (prefix rest)
+  "RPL_MAPEND \"End of /MAP\"."
+  (liece-reset-long-reply-count)
+  (dolist (map liece-undernet-map)
+    (liece-insert-info liece-000-buffer (concat map "\n")))
+  (setq liece-undernet-map nil))
+
+\f
+;;; @ register message handlers
+;;;
+
+(eval-when-compile (require 'liece-handler))
+
+(liece-handler-define-backend "000")
+
+(defmacro liece-register-000-handler (num)
+  `(progn
+     (liece-handler-define-function
+      ,(format "%03d" num) '(prefix require "000")
+      ',(intern (format "liece-handle-%03d-message" num)))
+     (defvar ,(intern (format "liece-%03d-hook" num)) nil)
+     (defvar ,(intern (format "liece-after-%03d-hook" num)) nil)))
+
+(liece-register-000-handler 001)
+(liece-register-000-handler 002)
+(liece-register-000-handler 003)
+(liece-register-000-handler 004)
+(liece-register-000-handler 005)
+(liece-register-000-handler 006)
+(liece-register-000-handler 007)
+
+(provide 'liece-000)
+
+;;; liece-000.el ends here
diff --git a/lisp/liece-200.el b/lisp/liece-200.el
new file mode 100644 (file)
index 0000000..cfdba65
--- /dev/null
@@ -0,0 +1,385 @@
+;;; liece-200.el --- Handler routines for 200 numeric reply.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile
+  (require 'liece-inlines)
+  (require 'liece-intl)
+  (require 'liece-misc)
+  (require 'liece-commands))
+
+(defun* liece-handle-200-messages (number prefix rest)
+  "200 replies"
+  (or (string-match "[^ ]* \\([^ ]*\\) *\\([^ ]*\\) *:\\(.*\\)" rest)
+      (return-from liece-handle-200-messages))
+  (let ((target1 (match-string 1 rest))        (target2 (match-string 2 rest))
+       (msg (match-string 3 rest)))
+    (setq target1 (liece-channel-virtual target1)
+         target2 (liece-channel-virtual target2))
+    (cond ((string-equal target1 "")
+          (liece-insert-info liece-200-buffer (concat msg "\n")))
+         ((string-equal target2 "")
+          (liece-insert-info
+           liece-200-buffer (concat target1 " " msg "\n")))
+         (t
+          (liece-insert-info
+           liece-200-buffer (concat target1 " " msg " (" target2 ")\n"))))))
+
+(defun* liece-handle-200-message (prefix rest)
+  "RPL_TRACELINK \"Link <version & debug level> <destination> <next server>\""
+  (or (string-match "Link \\([^ ]*\\)[ :]*\\([^ ]*\\)[ :]*\\([^ ]*\\)[ :]*\\([^ ]*\\)[ :]*\\([^ ]*\\)[ :]*\\([^ ]*\\)[ :]*\\(.*\\)" rest)
+      (return-from liece-handle-200-message))
+  (let ((version (match-string 1 rest)) (dest (match-string 2 rest))
+       (next (match-string 3 rest)) (ver (match-string 4 rest))
+       (sec (match-string 5 rest))
+       (q1 (match-string 6 rest)) (q2 (match-string 7 rest)))
+    (liece-insert-info liece-200-buffer
+                       (concat prefix
+                               " ("
+                               version (if ver (concat " " ver) "")
+                               ") --- " dest "\n"))
+    (liece-insert-info liece-200-buffer
+                       (concat "\t[" (liece-convert-seconds sec) "]"
+                               (if (not (string= q1 "")) (concat " " q1) "")
+                               (if (not (string= q2 "")) (concat "/" q2) "")
+                               " (next " next ")\n"))))
+    
+(defun* liece-handle-201-message (prefix rest)
+  "RPL_TRACECONNECTING \"Try. <class> <server>\""
+  (or (string-match "[^ ]* [^ ]* \\([0-9]*\\)[ :]*\\(.*\\)" rest)
+      (return-from liece-handle-201-message))
+  (let ((class (match-string 1 rest))
+       (server (match-string 2 rest)))
+    (liece-insert-info liece-200-buffer
+                       (format (_ "%s Trying to connect to %s (class %s)\n")
+                               prefix server class))))
+
+(defun* liece-handle-202-message (prefix rest)
+  "RPL_TRACEHANDSHAKE \"H.S. <class> <server>\""
+  (or (string-match "[^ ]* [^ ]* \\([0-9]*\\)[ :]*\\(.*\\)" rest)
+      (return-from liece-handle-202-message))
+  (let ((class (match-string 1 rest)) (server (match-string 2 rest)))
+    (liece-insert-info liece-200-buffer
+                       (format (_ "%s Handshaking with %s (class: %s)\n")
+                               prefix server class))))
+
+(defun* liece-handle-203-message (prefix rest)
+  "RPL_TRACEUNKNOWN \"???? <class> [<client IP address in dot form>]\""
+  (or (string-match "[^ ]* [^ ]* \\([^ ]*\\)[ :]+\\(.*\\)" rest)
+      (return-from liece-handle-203-message))
+  (let ((class (match-string 1 rest)) (who (match-string 2 rest)))
+    (liece-insert-info liece-200-buffer
+                       (concat "Class " class ": unknown " who "\n"))))
+
+(defun* liece-handle-204-message (prefix rest)
+  "RPL_TRACEOPERATOR \"Oper <class> <nick>\""
+  (or (string-match "[^ ]* [^ ]* \\([^ ]*\\)[ :]+\\(.*\\)" rest)
+      (return-from liece-handle-204-message))
+  (let ((class (match-string 1 rest)) (who (match-string 2 rest)))
+    (liece-insert-info liece-200-buffer
+                       (concat "Class " class ": operator " who "\n"))))
+
+(defun* liece-handle-205-message (prefix rest)
+  "RPL_TRACEUSER \"User <class> <nick>\""
+  (or (string-match "[^ ]* [^ ]* \\([0-9]*\\)[ :]*\\(.*\\)" rest)
+      (return-from liece-handle-205-message))
+  (let ((hops (match-string 1 rest)) (where (match-string 2 rest)))
+    (liece-insert-info liece-200-buffer
+                       (concat "Class " hops ": user " where "\n"))))
+
+(defun* liece-handle-206-message (prefix rest)
+  "RPL_TRACESERVER \"Serv <class> <int>S <int>C <server> <nick!user|*!*>@<host|server>\""
+  (or (string-match "Serv \\([^ ]*\\) \\(.*\\)" rest)
+      (return-from liece-handle-206-message))
+  (let ((class (match-string 1 rest)) (pars (match-string 2 rest)))
+    (cond
+     ((string-match "\\([0-9]*\\)S *\\([0-9]*\\)C *\\([^ ]*\\) *\\([^ ]*\\)[ :]*\\(.*\\)" pars)
+      (let ((servers (match-string 1 pars)) (clients (match-string 2 pars))
+           (next (match-string 3 pars)) (by (match-string 4 pars))
+           (type (match-string 5 pars)))
+       
+       ;; This is automatic connection line
+       (setq by (if (string-match "^AutoConn\\.!" by)
+                    "auto connection"
+                  (concat "by " by)))
+       
+       (liece-insert-info liece-200-buffer
+                           (concat prefix " --- " next "\n"))
+       (liece-insert-info liece-200-buffer
+                           (concat "\t[" clients " clients, "
+                                   servers " servers]"
+                                   " Class " class ", Type " type " " by
+                                   "\n"))))
+     (t
+      (liece-insert-info liece-200-buffer
+                         (format "Class %s: server %s --- %s\n"
+                                 class prefix pars))))))
+
+(defun* liece-handle-207-message (prefix rest)
+  "RPL_TRACESERVICE \"Service <class> <name> <type> <wants>\""
+  (or (string-match "[^ ]* Service \\([0-9]*\\) \\(.*\\)" rest)
+      (return-from liece-handle-207-message))
+  (let ((class (match-string 1 rest)) (service (match-string 2 rest)))
+    (liece-insert-info liece-200-buffer
+                       (concat "Class " class ": service " service "\n"))))
+
+(defun liece-handle-208-message (prefix rest)
+  "RPL_TRACENEWTYPE \"<newtype> 0 <client name>\"."
+  (liece-insert-info liece-200-buffer
+                     (format "%s: RPL_TRACENEWTYPE: Why this?\n" prefix)))
+
+(defun* liece-handle-209-message (prefix rest)
+  "RPL_TRACECLASS \"Class <class> <links>\""
+  (or (string-match "[^ ]* Class \\([0-9]*\\) \\([0-9]*\\)" rest)
+      (return-from liece-handle-209-message))
+  (let ((class (match-string 1 rest)) (entries (match-string 2 rest)))
+    (liece-insert-info liece-200-buffer
+                      (concat "Class " class ": " entries
+                              "entries linked\n"))))
+
+(defun* liece-handle-211-message (prefix rest)
+  "RPL_STATSLINKINF \"<linkname> <sendq> <sent messages> <sent bytes> <received messages> <received bytes> <time open>\""
+  (or (string-match "\\([^ ]*\\) \\([^ ]*\\) \\([^ ]*\\) \\([^ ]*\\) \\([^ ]*\\) \\([^ ]*\\) \\([^ ]*\\)[ :]+\\(.*\\)" rest)
+      (return-from liece-handle-211-message))
+  (let ((link (match-string 2 rest)) (sendq (match-string 3 rest))
+       (sendm (match-string 4 rest)) (sendb (match-string 5 rest))
+       (rcvem (match-string 6 rest)) (rcveb (match-string 7 rest))
+       (open (match-string 8 rest)))
+    (liece-insert-info liece-200-buffer
+                       (format "%-35s %s: %5s%7s%10s%7s%10s %s\n"
+                               link prefix sendq sendm sendb
+                               rcvem rcveb open))))
+
+(defun* liece-handle-212-message (prefix rest)
+  "RPL_STATSCOMMANDS \"<command> <count>\""
+  (or (string-match "[^ ]* \\([^ ]*\\) \\([0-9]*\\)" rest)
+      (return-from liece-handle-212-message))
+  (let ((cmd (match-string 1 rest)) (times (match-string 2 rest)))
+    (liece-insert-info liece-200-buffer
+                       (format "%s has been used %s times after startup\n"
+                               cmd times))))
+
+(defun* liece-handle-213-message (prefix rest)
+  "RPL_STATSCLINE \"C <host> * <name> <port> <class>\""
+  (or (string-match "[^ ]* C \\([^ ]*\\) \\* \\([^ ]*\\) \\([0-9]*\\) \\([0-9]*\\)" rest)
+      (return-from liece-handle-213-message))
+  (let ((canon (match-string 1 rest)) (name (match-string 2 rest))
+       (port (match-string 3 rest)) (class (match-string 4 rest)))
+    (liece-insert-info liece-200-buffer
+                       (concat "Connect to " canon ":" port
+                               (if (not (string= class ""))
+                                   " (Class " class ")" "")
+                               "\n"))
+    (liece-insert-info liece-200-buffer
+                       (concat "\t[" name "]\n"))))
+
+(defun* liece-handle-214-message (prefix rest)
+  "RPL_STATSNLINE \"N <host> * <name> <port> <class>\""
+  (or (string-match "[^ ]* N \\([^ ]*\\) \\* \\([^ ]*\\) \\([0-9]*\\) \\([0-9]*\\)" rest)
+      (return-from liece-handle-214-message))
+  (let ((canon (match-string 1 rest)) (name (match-string 2 rest))
+       (port (match-string 3 rest)) (class (match-string 4 rest)))
+    (liece-insert-info liece-200-buffer
+                       (concat "Accept " canon ":" port
+                               (if (not (string= class ""))
+                                   " (Class " class ")" "")
+                               "\n"))
+    (liece-insert-info liece-200-buffer
+                       (concat "\t[" name "]\n"))))
+
+(defun* liece-handle-215-message (prefix rest)
+  "RPL_STATSILINE \"I <host> * <host> <port> <class>\""
+  (or (string-match "[^ ]* I \\([^ ]*\\) \\(.*\\) \\([^ ]*\\)" rest)
+      (return-from liece-handle-215-message))
+  (let ((domain (match-string 1 rest)) (passwd (match-string 2 rest))
+       (redomain (match-string 3 rest)))
+    (liece-insert-info liece-200-buffer
+                       (format "I:%s:%s:%s\n" domain passwd redomain))))
+
+(defun* liece-handle-216-message (prefix rest)
+  "RPL_STATSKLINE \"K <host> * <username> <port> <class>\""
+  (or (or (string-match
+          "[^ ]* K \\([^ ]*\\) \\(.\\) \\([^ ]*\\) 0 -1" rest)
+         (string-match
+          "[^ ]* K \\([^ ]*\\) \\([^ ]*\\) \\([^ ]*\\) 0 [:]*-1" rest))
+      (return-from liece-handle-216-message))
+  (let ((host (match-string 1 rest)) (pass (match-string 2 rest))
+       (user (match-string 3 rest)))
+    (liece-insert-info liece-200-buffer
+                       (format "K:%s:%s:%s\n" host pass user))))
+
+(defun* liece-handle-217-message (prefix rest)
+  "RPL_STATSQLINE \"Q %s %s %s %d %d\""
+  (or (string-match
+       "[^ ]* Q \\([^ ]*\\) \\(.\\) \\([^ ]*\\) \\(.*\\)" rest)
+      (return-from liece-handle-217-message))
+  (let ((reason (match-string 1 rest)) (star (match-string 2 rest))
+       (host (match-string 3 rest)) (stuff (match-string 4 rest)))
+    (liece-insert-info liece-200-buffer
+                       (format "Q:%s:%s:%s:%s\n" reason star host stuff))))
+
+(defun* liece-handle-218-message (prefix rest)
+  "RPL_STATSYLINE \"Y <class> <ping frequency> <connect  frequency> <max sendq>\""
+  (or (string-match "[^ ]* Y " rest)
+      (return-from liece-handle-218-message))
+  (let* ((args (split-string (substring rest (match-end 0))))
+        (class (pop args)) (pingfreq (pop args)) (confreq (pop args))
+        (maxlinks (pop args)) (qlen (pop args)))
+    (liece-insert-info liece-200-buffer
+                       (concat "Class " class ": \n"))
+    (liece-insert-info liece-200-buffer
+                       (concat "\tPing frequency " pingfreq " (sec)\n"))
+    (liece-insert-info liece-200-buffer
+                       (concat "\tConnection frequency " confreq " (sec)\n"))
+    (liece-insert-info liece-200-buffer
+                       (concat "\tMaximum links " maxlinks "\n"))
+    (when qlen
+      (liece-insert-info liece-200-buffer
+                         (concat "\tMaximum amount of send buffer "
+                                 qlen " (bytes)\n")))))
+
+(defun liece-handle-219-message (prefix rest)
+  "RPL_ENDOFSTATS \"<stats letter> :End of /STATS report\"."
+  nil)
+
+(defun liece-handle-221-message (prefix rest)
+  "RPL_UMODEIS \"<user mode string>\"."
+  (if (string-match "[^ ]* \\(.*\\)" rest)
+      (liece-insert-info liece-200-buffer
+                         (format (_ "Mode for you is %s\n")
+                                 (match-string 1 rest)))))
+
+;;;
+;;; 230 series not implemented as 7/94
+;;;
+(defun liece-handle-231-message (prefix rest)
+  nil)
+
+(defun liece-handle-232-message (prefix rest)
+  nil)
+
+(defun liece-handle-233-message (prefix rest)
+  nil)
+
+(defun liece-handle-234-message (prefix rest)
+  nil)
+
+(defun liece-handle-235-message (prefix rest)
+  nil)
+
+(defun liece-handle-241-message (prefix rest)
+  "RPL_STATSLLINE \"L <hostmask> * <servername> <maxdepth>\"."
+  (if (string-match "[^ ]* \\(.*\\)" rest)
+      (liece-insert-info liece-200-buffer
+                         (concat (match-string 1 rest) "\n"))))
+
+(defun liece-handle-242-message (prefix rest)
+  "RPL_STATSUPTIME \":Server Up %d days %d:%02d:%02d\"."
+  (if (string-match "[^ ]* :\\(.*\\)" rest)
+      (liece-insert-info liece-200-buffer
+                         (concat (match-string 1 rest) "\n"))))
+
+(defun liece-handle-243-message (prefix rest)
+  "RPL_STATSOLINE \"O <hostmask> * <name>\"."
+  (if (string-match "[^ ]* \\(.*\\)" rest)
+      (liece-insert-info liece-200-buffer
+                         (concat (match-string 1 rest) "\n"))))
+
+(defun liece-handle-244-message (prefix rest)
+  "RPL_STATSHLINE \"H <hostmask> * <servername>\"."
+  (if (string-match "[^ ]* \\(.*\\)" rest)
+      (liece-insert-info liece-200-buffer
+                         (concat (match-string 1 rest) "\n"))))
+
+(defun liece-handle-245-message (prefix rest)
+  "RPL_STATSSLINE \"S <hostmask> * <servicename> <servicetype> <class>\"."
+  (if (string-match "[^ ]* \\(.*\\)" rest)
+      (liece-insert-info liece-200-buffer
+                         (concat (match-string 1 rest) "\n"))))
+
+(defun liece-handle-262-message (prefix rest)
+  "RPL_ENDOFTRACE \"<nickname> <target> <version> :End of TRACE\"."
+  nil)
+
+\f
+;;; @ register message handlers
+;;;
+
+(eval-when-compile (require 'liece-handler))
+
+(liece-handler-define-backend "200")
+
+(defmacro liece-register-200-handler (num)
+  `(progn
+     (liece-handler-define-function
+      ,(number-to-string num) '(prefix rest "200")
+      ',(intern (format "liece-handle-%03d-message" num)))
+     (defvar ,(intern (format "liece-%03d-hook" num)) nil)
+     (defvar ,(intern (format "liece-after-%03d-hook" num)) nil)))
+
+(liece-register-200-handler 200)
+(liece-register-200-handler 201)
+(liece-register-200-handler 202)
+(liece-register-200-handler 203)
+(liece-register-200-handler 204)
+(liece-register-200-handler 205)
+(liece-register-200-handler 206)
+(liece-register-200-handler 207)
+(liece-register-200-handler 208)
+(liece-register-200-handler 209)
+
+(liece-register-200-handler 211)
+(liece-register-200-handler 212)
+(liece-register-200-handler 213)
+(liece-register-200-handler 214)
+(liece-register-200-handler 215)
+(liece-register-200-handler 216)
+(liece-register-200-handler 217)
+(liece-register-200-handler 218)
+(liece-register-200-handler 219)
+
+(liece-register-200-handler 221)
+
+(liece-register-200-handler 231)
+(liece-register-200-handler 232)
+(liece-register-200-handler 233)
+(liece-register-200-handler 234)
+(liece-register-200-handler 235)
+
+(liece-register-200-handler 241)
+(liece-register-200-handler 242)
+(liece-register-200-handler 243)
+(liece-register-200-handler 244)
+(liece-register-200-handler 245)
+(liece-register-200-handler 262)
+
+(provide 'liece-200)
+
+;;; liece-200.el ends here
diff --git a/lisp/liece-300.el b/lisp/liece-300.el
new file mode 100644 (file)
index 0000000..93fe292
--- /dev/null
@@ -0,0 +1,646 @@
+;;; liece-300.el --- Handler routines for 300 numeric reply.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile
+  (require 'liece-inlines)
+  (require 'liece-intl)
+  (require 'liece-misc)
+  (require 'liece-commands))
+
+(eval-and-compile
+  (autoload 'liece-dcc-compare-hostnames "liece-dcc"))
+
+(defvar liece-recursing-whois nil)
+(defvar liece-recursing-whowas nil)
+
+(defun* liece-handle-300-messages (number prefix rest)
+  "300 replies"
+  (or (string-match "[^ ]* \\([^ ]*\\) *\\([^ ]*\\) *:\\(.*\\)" rest)
+      (return-from liece-handle-300-messages))
+  (let ((target1 (liece-channel-virtual (match-string 1 rest)))
+       (target2 (liece-channel-virtual (match-string 2 rest)))
+       (msg (match-string 3 rest)))
+    (cond ((string= target1 "")
+          (liece-insert-info liece-300-buffer (concat msg "\n")))
+         ((string= target2 "")
+          (liece-insert-info liece-300-buffer
+                              (format "%s (%s)\n" msg target1)))
+         (t
+          (liece-insert-info liece-300-buffer
+                              (format "%s %s (%s)\n" target1 msg target2))))))
+
+(defun liece-handle-301-message (prefix rest)
+  "RPL_AWAY \"<nickname> :<away message>\"."
+  (if (string-match "^[^ ]+ \\([^ ]+\\) +:\\(.*\\)" rest)
+      (let ((who (match-string 1 rest)) (iswhat (match-string 2 rest)))
+       (or liece-recursing-whois
+           (liece-insert-info liece-300-buffer
+                               (concat who " is marked as being away, "
+                                       "but left the message:\n"
+                                       iswhat "\n"))))))
+
+(defun liece-handle-302-message (prefix rest)
+  "RPL_USERHOST        \":[<reply>{<space><reply>}]\"."
+  (while (string-match
+         "^[^ ]* :[ ]*\\([^*=]+\\)\\([*]*\\)=\\([+-]\\)\\([^ ]+\\)" rest)
+    (let ((nick (match-string 1 rest)) (oper (match-string 2 rest))
+         (away (match-string 3 rest)) (who (match-string 4 rest))
+         (end (match-end 4)))
+      (if (liece-nick-equal nick liece-real-nickname)
+         (setq liece-my-userhost who))
+      (liece-insert-info liece-300-buffer
+                         (format "Nick %s is %s [%s%s, %s%s]\n"
+                                 nick who
+                                 (if (string= oper "") "Not ") "operator"
+                                 (if (string= away "+") "Not ") "away"))
+      (setq rest (concat " :" (substring rest end nil))))))
+
+(defun liece-303-display-friends (nicks)
+  (let ((on (filter-elements nick nicks
+             (not (string-list-member-ignore-case nick liece-friends-last))))
+       (off (filter-elements nick liece-friends-last
+              (not (string-list-member-ignore-case nick nicks)))))
+    (setq liece-friends-last nicks)
+    (if on
+      (liece-insert-info liece-300-buffer
+                         (format (_ "Following people are now on: %s\n")
+                                 (mapconcat 'identity on " "))))
+    (if off
+       (liece-insert-info liece-300-buffer
+                           (format (_ "Following people are now off: %s\n")
+                                   (mapconcat 'identity off " "))))))
+
+(defun* liece-handle-303-message (prefix rest)
+  "RPL_ISON \":[<nickname> {<space><nickname>}]\""
+  (or (string-match "[^ ]+ :\\(.*\\)" rest)
+      (return-from liece-handle-303-message))
+  (setq rest (match-string 1 rest))
+  (or (string= rest "")
+      (setq rest (substring rest 0 -1)))
+  (let ((nicks (split-string rest)))
+    (when (and (null nicks) (null liece-friends))
+      (liece-insert-info liece-300-buffer
+                         (_ "No one you requested is on now.\n"))
+      (return-from liece-handle-303-message))
+    (dolist (nick nicks)
+      (when (and (string-list-member-ignore-case
+                 nick liece-current-chat-partners)
+                (get (intern nick liece-obarray) 'part))
+       (liece-insert-change (liece-pick-buffer nick)
+                             (format (_ "%s has come back\n") nick))
+       (put (intern nick liece-obarray) 'part nil)))
+    (unless liece-friends
+      (liece-insert-info liece-300-buffer
+                         (format (_ "Following people are on: %s\n") rest))
+      (return-from liece-handle-303-message))
+    (if (fboundp liece-display-friends-function)
+       (funcall liece-display-friends-function nicks))))
+       
+(defun* liece-handle-305-message (prefix rest)
+  "RPL_UNAWAY \":You are no longer marked as being away\""
+  (or (string-equal liece-away-indicator "A")
+      (return-from liece-handle-305-message))
+  (setq liece-away-indicator "-")
+  (liece-maybe-poll)
+  (when (string-match "[^:]:\\(.*\\)" rest)
+    (setq rest (match-string 1 rest))
+    (liece-insert-info liece-300-buffer
+                       (format "%s (%s)\n"
+                               rest (funcall liece-format-time-function
+                                             (current-time))))))
+
+(defun liece-handle-306-message (prefix rest)
+  "RPL_NOWAWAY \":You have been marked as being away\"."
+  (setq liece-away-indicator "A")
+  (if (string-match "[^:]:\\(.*\\)" rest)
+      (liece-insert-info liece-300-buffer
+                         (format "%s (%s)\n"
+                                 (match-string 1 rest)
+                                 (funcall liece-format-time-function
+                                          (current-time))))))
+
+(defun liece-handle-311-message (prefix rest)
+  "RPL_WHOISUSER \"<nickname> <user> <host> * :<real name>\"."
+  (and (string-match "[^ ]+ \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) :\\(.*\\)" rest)
+       (not liece-recursing-whois)
+       (liece-insert-info liece-300-buffer
+                          (format "%s is %s (%s@%s)\n"
+                                  (match-string 1 rest) ; nick
+                                  (match-string 5 rest) ; realname
+                                  (match-string 2 rest) ; username
+                                  (match-string 3 rest) ; machine
+                                  ))))
+
+(defun* liece-handle-312-message (prefix rest)
+  "RPL_WHOISSERVER \"<nickname> <server> :<server info>\""
+  (or (string-match "^[^ ]+ \\(\\([^ ]+\\) \\)?\\([^ ]+\\) :\\(.*\\)" rest)
+      (return-from liece-handle-312-message))
+  (let ((who (match-string 2 rest))
+       (server (match-string 3 rest))
+       (real (match-string 4 rest)))
+    (if (and liece-dcc-resolve-server
+            (not (liece-dcc-compare-hostnames server (liece-server-host)))
+            (not liece-recursing-whois)
+            (not liece-recursing-whowas))
+       (progn
+         (setq liece-recursing-whois t)
+         (liece-send "WHOIS %s %s" server who))
+      (setq liece-recursing-whois nil)
+      (liece-insert-info liece-300-buffer
+                         (format "on via server %s (%s)\n" server real)))))
+
+(defun liece-handle-313-message (prefix rest)
+  "RPL_WHOISOPERATOR \"<nickname> :is an IRC operator\"."
+  (if (string-match "^[^ ]+ \\([^ ]+\\) :\\(.*\\)" rest)
+      (or liece-recursing-whois
+         (liece-insert-info liece-300-buffer
+                             (concat (match-string 2 rest)
+                                     " is an IRC operator\n")))))
+
+(defun liece-handle-316-message (prefix rest)
+  "RPL_WHOISCHANOP."
+  (cond ((string-match "^\\([^ ]+\\) :\\(.*\\)" rest)
+        (if (not liece-recursing-whois)
+            (liece-insert-info liece-300-buffer
+                                (concat "Status: "
+                                        (match-string 2 rest) "\n"))))
+       ((string-match "^\\([^ ]+\\) \\([^ ]+\\) :\\(.*\\)" rest)
+        (if (not liece-recursing-whois)
+            (liece-insert-info liece-300-buffer
+                                (concat "Status: "
+                                        (match-string 3 rest) "\n"))))))
+
+(defun* liece-handle-319-message (prefix rest)
+  "RPL_WHOISCHANNELS \"<nickname> :{[@|+]<channel><space>}\""
+  (or (string-match "^\\([^ ]+\\) \\([^ ]+\\) :\\(.*\\)" rest)
+      (return-from liece-handle-319-message))
+  (let ((chnls (split-string (match-string 3 rest)))
+       isonchnls flag)
+    (dolist (chnl chnls)
+      (if (and (or (eq ?@ (string-to-char chnl))
+                  (eq ?+ (string-to-char chnl)))
+              (liece-channel-p (substring chnl 1)))
+         (progn
+           (setq flag (substring chnl 0 1)
+                 chnl (substring chnl 1)))
+       (setq flag ""))
+      (push (concat flag (liece-channel-virtual chnl)) isonchnls))
+    (if (not liece-recursing-whois)
+       (liece-insert-info liece-300-buffer
+                           (format (_ "Channels: %s\n")
+                                   (mapconcat (function identity)
+                                              (nreverse isonchnls) " "))))))
+
+(defun liece-handle-314-message (prefix rest)
+  "RPL_WHOWASUSER \"<nickname> <user> <host> * :<real name>\"."
+  (if (string-match
+       "[^ ]+ \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) :\\(.*\\)"
+       rest)
+      (let ((nick (match-string 1 rest)) (username (match-string 2 rest))
+           (machine (match-string 3 rest)) (chnl (match-string 4 rest))
+           (realname (match-string 5 rest)))
+       (setq liece-recursing-whowas t)
+       (liece-insert-info liece-300-buffer
+                           (format "%s [%s] was %s (%s@%s)\n"
+                                   nick
+                                   (if (string= chnl "*") "Private" chnl)
+                                   realname username machine)))))
+
+(defun liece-handle-315-message (prefix rest)
+  "RPL_ENDOFWHO."
+  (if (zerop liece-long-reply-count)
+      (liece-insert-info liece-300-buffer
+                         (concat "No matches found"
+                                 (if liece-who-expression
+                                     (concat ": " liece-who-expression)
+                                   "")
+                                 "\n")))
+  (setq liece-who-expression nil)
+  (liece-reset-long-reply-count))
+
+(defun liece-handle-317-message (prefix rest)
+  "RPL_WHOISIDLE \"<nickname> <integer> :seconds idle\"."
+  (cond ((string-match "^[^ ]+ [^ ]+ \\([0-9]*\\) :\\(.*\\)" rest)
+        (liece-insert-info liece-300-buffer
+                            (concat "Idle for "
+                                    (liece-convert-seconds
+                                     (match-string 1 rest))
+                                    "\n")))
+       ((string-match "^[^ ]+ \\([0-9]*\\) :\\(.*\\)" rest)
+        (liece-insert-info liece-300-buffer
+                            (concat "Idle for "
+                                    (liece-convert-seconds
+                                     (match-string 1 rest))
+                                    "\n")))))
+
+(defun liece-handle-318-message (prefix rest)
+  "RPL_ENDOFWHOIS \"<nickname> :End of /WHOIS list\"."
+  nil)
+
+(defun liece-handle-321-message (prefix rest)
+  "RPL_LISTSTART \"Channel :Users  Name\"."
+  (liece-insert-info liece-300-buffer
+                     (format "%-10s%6s  %s\n"
+                             (_ "Channel") (_ "Users")  (_ "Topic"))))
+
+(defun* liece-handle-322-message (prefix rest)
+  "RPL_LIST \"<channel> <# visible> :<topic>\""
+  (or (string-match "^\\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) :\\(.*\\)" rest)
+      (return-from liece-handle-322-message))
+  (liece-increment-long-reply-count)
+  (liece-check-long-reply-count)
+  (let ((chnl (match-string 2 rest))
+       (users (match-string 3 rest))
+       (topic (match-string 4 rest)))
+    (when (or (string= liece-channel-filter (downcase chnl))
+             (string= liece-channel-filter "")
+             (and (string= liece-channel-filter "0")
+                  (string= chnl "*")))
+      (setq chnl (liece-channel-virtual chnl))
+      (put (intern chnl liece-obarray) 'topic topic)
+      (liece-insert-info (append (liece-pick-buffer chnl) liece-300-buffer)
+                         (format "%-10s%6s user%s%s%s\n"
+                                 (if (string= chnl "*") "Priv" chnl)
+                                 users
+                                 (if (> (string-to-int users) 1) "s" "")
+                                 (if (string= "" topic) "" ": ")
+                                 topic)))))
+
+(defun liece-handle-323-message (prefix rest)
+  "RPL_LISTEND \":End of /LIST\"."
+  (liece-reset-long-reply-count))
+
+(defun liece-handle-324-message (prefix rest)
+  "RPL_CHANNELMODEIS \"<channel> <mode> <mode params>\"."
+  (if (string-match "[^ ]* \\([^ ]*\\) +\\+\\([^ ]*\\)\\( *[^ ]*\\)" rest)
+      (let ((chnl (match-string 1 rest))
+           (mode (match-string 2 rest))
+           (param (match-string 3 rest)))
+       (setq chnl (liece-channel-virtual chnl))
+       (put (intern chnl liece-obarray) 'mode mode)
+       (liece-insert-info (append (liece-pick-buffer chnl)
+                                   liece-300-buffer)
+                           (format (_ "Mode for %s is %s%s\n")
+                                   chnl mode param))
+       (liece-set-channel-indicator))))
+
+(defun liece-handle-331-message (prefix rest)
+  "RPL_NOTOPIC \"<channel> :No topic is set\"."
+  (if (string-match "[^ ]* \\([^ ]*\\) \\(.*\\)" rest)
+      (let ((chnl (match-string 1 rest)))
+       (setq chnl (liece-channel-virtual chnl))
+       (put (intern chnl liece-obarray) 'topic nil)
+       (liece-insert-info (append (liece-pick-buffer chnl)
+                                   liece-300-buffer)
+                           (_ "No topic is set\n"))
+       (liece-set-channel-indicator))))
+
+(defun liece-handle-332-message (prefix rest)
+  "RPL_TOPIC \"<channel> :<topic>\"."
+  (if (string-match "[^ ]* \\([^ ]*\\) +:\\(.*\\)" rest)
+      (let ((chnl (liece-channel-virtual (match-string 1 rest)))
+           (topic (match-string 2 rest)))
+       (liece-channel-set-topic topic chnl)
+       (liece-insert-info (liece-pick-buffer chnl)
+                           (format (_ "Topic: %s\n") topic))
+       (liece-insert-info liece-300-buffer
+                           (format (_ "Topic for %s: %s\n") chnl topic))
+       (liece-set-channel-indicator))))
+
+(defun liece-handle-333-message (prefix rest)
+  "RPL_TOPICWHOTIME <channel> <nickname> <time>."
+  (if (string-match "[^ ]* \\([^ ]*\\) +\\([^ ]*\\) +\\([^ ]*\\)" rest)
+      (let ((chnl (liece-channel-virtual (match-string 1 rest)))
+           (nick (match-string 2 rest))
+           (time (funcall liece-format-time-function
+                          (liece-seconds-to-time
+                           (string-to-int (match-string 3 rest))))))
+       (liece-insert-info (liece-pick-buffer chnl)
+                           (format (_ "Topic set by %s at %s\n")
+                                   nick time))
+       (liece-insert-info liece-300-buffer
+                           (format (_ "Topic for %s set by %s at %s\n")
+                                   chnl nick time))
+       (liece-set-channel-indicator))))
+
+(defun liece-handle-341-message (prefix rest)
+  "RPL_INVITING \"<channel> <nickname>\"."
+  (if (string-match "^\\([^ ]+\\) +\\([^ ]+\\) +\\([-#&0-9+][^ ]*\\)" rest)
+      (let ((nick (match-string 2 rest))
+           (chnl (liece-channel-virtual (match-string 3 rest))))
+       (liece-insert-info (liece-pick-buffer chnl)
+                           (format (_ "Inviting user %s\n") nick))
+       (liece-insert-info liece-300-buffer
+                           (format (_ "Inviting user %s to channel %s\n")
+                                   nick chnl)))))
+
+(defun liece-handle-346-message (prefix rest)
+  "RPL_INVITELIST \"<channel> <inviteid>\"."
+  (when (string-match "[^ ]* \\([^ ]*\\) \\([^ ]*\\)" rest)
+    (let* ((regexp (match-string 2 rest))
+          (chnl (liece-channel-virtual (match-string 1 rest))))
+      (liece-increment-long-reply-count)
+      (liece-check-long-reply-count)
+      (or (> liece-polling 0)
+         (liece-channel-add-invite regexp chnl)))))
+
+(defun liece-handle-347-message (prefix rest)
+  "RPL_ENDOFINVITELIST \"<channel> :End of Channel Invite List\"."
+  (when (string-match "[^ ]* \\([^ ]*\\)" rest)
+    (let* ((chnl (liece-channel-virtual (match-string 1 rest)))
+          (invites (liece-channel-get-invites chnl)))
+      (liece-reset-long-reply-count)
+      (liece-insert-info liece-300-buffer
+                         (concat "Following users are invited to " chnl
+                                 ": \n"))
+      (dolist (invite invites)
+       (liece-insert-info liece-300-buffer
+                           (concat "\t" invite "\n"))))))
+
+(defun liece-handle-348-message (prefix rest)
+  "RPL_EXCEPTLIST \"<channel> <exceptid>\"."
+  (when (string-match "[^ ]* \\([^ ]*\\) \\([^ ]*\\)" rest)
+    (let* ((regexp (match-string 2 rest))
+          (chnl (liece-channel-virtual (match-string 1 rest))))
+      (liece-increment-long-reply-count)
+      (liece-check-long-reply-count)
+      (or (> liece-polling 0)
+         (liece-channel-add-exception regexp chnl)))))
+  
+(defun liece-handle-349-message (prefix rest)
+  "RPL_ENDOFEXCEPTLIST \"<channel> :End of Channel Exception List\"."
+  (when (string-match "[^ ]* \\([^ ]*\\)" rest)
+    (let* ((chnl (liece-channel-virtual (match-string 1 rest)))
+          (exceptions (liece-channel-get-exceptions chnl)))
+      (liece-reset-long-reply-count)
+      (liece-insert-info liece-300-buffer
+                         (concat "Following users are welcome to " chnl
+                                 ": \n"))
+      (dolist (exception exceptions)
+       (liece-insert-info liece-300-buffer
+                           (concat "\t" exception "\n"))))))
+
+(defun liece-handle-351-message (prefix rest)
+  "RPL_VERSION \"<version>.<debuglevel> <server> :<comments>\"."
+  (if (string-match "[^ ]+ \\([^ ]+\\) :*\\([^ ]+\\)[ :]*\\(.*\\)" rest)
+      (liece-insert-info
+       liece-300-buffer
+       (format (_ "Machine %s is running IRC version %s (%s)\n")
+              (match-string 2 rest) ; machine
+              (match-string 1 rest) ; version
+              (match-string 3 rest) ; comments
+              ))))
+
+(defun liece-handle-352-message (prefix rest)
+  "RPL_WHOREPLY        \"<channel> <user> <host> <server> <nickname> <H|G>[*][@|+] :<hopcount> <real name>\"."
+  (if (string-match "\\([^ ]*\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) :[0-9]* ?\\(.*\\)" rest)
+      (let ((chnl (liece-channel-virtual (match-string 1 rest)))
+           (user (match-string 2 rest)) (host (match-string 3 rest))
+           (nick (match-string 5 rest)) (oper (match-string 6 rest))
+           (name (match-string 7 rest)))
+       (liece-increment-long-reply-count)
+       (liece-check-long-reply-count)
+       (liece-nick-set-user-at-host nick (concat user "@" host))
+       (liece-insert-info liece-300-buffer
+                           (format "%3s %10s %9s %-29s %s\n"
+                                   oper (if (memq (aref chnl 0) '(?* ?0))
+                                            "Private" chnl)
+                                   nick
+                                   (concat "(" user "@"
+                                           (liece-clean-hostname host)
+                                           ")")
+                                   name)))))
+
+(defvar liece-353-names nil)
+
+(defmacro liece-353-scan-channels (chnl)
+  `(or (string-assoc-ignore-case ,chnl liece-channel-alist)
+       (push (list ,chnl) liece-channel-alist)))
+
+(defun liece-handle-353-message (prefix rest)
+  "RPL_NAMREPLY        \"<channel> :[[@|+]<nick> [[@|+]<nick> [...]]]\"."
+  (when (string-match "[^ =*@]?[=*@] \\([^ ]*\\) :\\(.*\\)" rest)
+    (let ((chnl (liece-channel-virtual (match-string 1 rest)))
+         (users (delete "" (split-string (match-string 2 rest)))))
+      (liece-increment-long-reply-count)
+      (liece-check-long-reply-count)
+      (or (> liece-polling 0)
+         (setq liece-353-names
+               (append (nreverse users) liece-353-names )))
+      (liece-353-scan-channels chnl))))
+
+(defun liece-handle-361-message (prefix rest)
+  "RPL_KILLDONE."
+  (if (string-match "[^ ]+ \\([^ ]+\\) +:\\(.*\\)" rest)
+      (let ((who (match-string 1 rest))
+           (message (match-string 2 rest)))
+       (liece-insert-info liece-300-buffer
+                           (format (_ "You just killed %s. %s\n")
+                                   who message)))))
+
+(defstruct liece-364-link from to hop info)
+(defvar liece-364-links nil)
+
+(defun liece-handle-364-message (prefix rest)
+  "RPL_LINKS \"<mask> <server> :<hopcount> <server info>\"."
+  (if (string-match
+       "[^ ]+ \\([^ ]+\\) +\\([^ ]*\\) +:\\(\\(.*\\) +\\(.*\\)\\)" rest)
+      (let ((from (match-string 1 rest)) (to (match-string 2 rest))
+           (hop (string-to-int (match-string 4 rest)))
+           (info (match-string 5 rest)) link)
+       (liece-increment-long-reply-count)
+       (liece-check-long-reply-count)
+       (setq rest (match-string 3 rest)
+             link (make-liece-364-link
+                   :from from :to to :hop hop :info info))
+       (push link liece-364-links))))
+
+(defun liece-handle-365-message (prefix rest)
+  "RPL_ENDOFLINKS \"<mask> :End of /LINKS list\"."
+  (liece-reset-long-reply-count)
+  (dolist (link liece-364-links)
+    (liece-insert-info liece-300-buffer
+                       (concat (liece-364-link-from link)
+                               " --"
+                               (number-to-string (liece-364-link-hop link))
+                               "-- "
+                               (liece-364-link-to link) "\n")))
+  (setq liece-364-links nil))
+
+(defun liece-handle-366-message (prefix rest)
+  "RPL_ENDOFNAME \"<channel> :End of /NAMES list\"."
+  (when (string-match "[^ ]* \\([^ ]*\\)" rest)
+    (let ((level (- liece-polling 1))
+         (users (length liece-353-names))
+         (names (mapconcat #'identity liece-353-names " "))
+         (chnl (liece-channel-virtual (match-string 1 rest))))
+      (liece-reset-long-reply-count)
+      (setq liece-polling (max 0 level))
+      (liece-insert-info (append (liece-pick-buffer chnl)
+                                 liece-300-buffer)
+                         (format "%-10s%6d user%s: %s\n"
+                                 (if (memq chnl '(?* ?0))
+                                     "Private"
+                                   chnl)
+                                 users (if (= users 1) "" "s") names))
+      (and liece-353-names
+          (liece-channel-member chnl liece-current-channels)
+          (liece-nick-update chnl liece-353-names))
+      (setq liece-353-names nil))))
+
+(defun liece-handle-367-message (prefix rest)
+  "RPL_BANLIST \"<channel> <banid>\"."
+  (when (string-match "[^ ]* \\([^ ]*\\) \\([^ ]*\\)" rest)
+    (let* ((regexp (match-string 2 rest))
+          (chnl (liece-channel-virtual (match-string 1 rest))))
+      (liece-increment-long-reply-count)
+      (liece-check-long-reply-count)
+      (or (> liece-polling 0)
+         (liece-channel-add-ban regexp chnl)))))
+
+(defun liece-handle-368-message (prefix rest)
+  "RPL_ENDOFBANLIST \"<channel> :End of channel ban list\"."
+  (when (string-match "[^ ]* \\([^ ]*\\)" rest)
+    (let* ((chnl (liece-channel-virtual (match-string 1 rest)))
+          (bans (liece-channel-get-bans chnl)))
+      (liece-reset-long-reply-count)
+      (liece-insert-info liece-300-buffer
+                         (concat "Following users are banned on " chnl
+                                 ": \n"))
+      (dolist (ban bans)
+       (liece-insert-info liece-300-buffer
+                           (concat "\t" ban "\n"))))))
+
+(defun liece-handle-369-message (prefix rest)
+  "RPL_ENDOFWHOWAS \"<nickname> :End of WHOWAS\"."
+  (setq liece-recursing-whowas nil))
+
+(defun liece-handle-371-message (prefix rest)
+  "RPL_INFO \":<string>\"."
+  (if (string-match "^\\([^ ]+\\) +:?\\(.*\\)" rest)
+      (liece-insert-info liece-300-buffer
+                         (concat (match-string 2 rest) "\n"))))
+
+(defun liece-handle-372-message (prefix rest)
+  "RPL_MOTD \":- <text>\"."
+  (if (string-match "^\\([^ ]+\\) +:?\\(.*\\)" rest)
+      (liece-insert-info liece-300-buffer
+                         (concat (match-string 2 rest) "\n"))))
+
+(defun liece-handle-381-message (prefix rest)
+  "RPL_YOUREOPER \":You are now an IRC operator\"."
+  (if (string-match "^\\([^ ]+\\) +:\\(.*\\)" rest)
+      (liece-insert-info liece-300-buffer
+                         (format "You are now an IRC operator (%s)\n"
+                                 (match-string 2 rest)))))
+
+(defun liece-handle-382-message (prefix rest)
+  "RPL_REHASHING \"<config file> :Rehashing\"."
+  (if (string-match "^\\([^ ]+\\) +:\\(.*\\)" rest)
+      (liece-insert-info liece-300-buffer
+                         (concat (match-string 2 rest) " "
+                                 (match-string 1 rest) "\n"))))
+
+(defun liece-handle-391-message (prefix rest)
+  "RPL_TIME \"<server> :<string showing server's local time>\"."
+  (if (string-match "^\\([^ ]+\\) +\\(.*\\)" rest)
+      (liece-insert-info liece-300-buffer
+                         (format (_ "Server time is %s\n")
+                                 (match-string 2 rest)))))
+
+\f
+;;; @ register message handlers
+;;;
+
+(eval-when-compile (require 'liece-handler))
+
+(liece-handler-define-backend "300")
+
+(defmacro liece-register-300-handler (num)
+  `(progn
+     (liece-handler-define-function
+      ,(number-to-string num) '(prefix rest "300")
+      ',(intern (format "liece-handle-%03d-message" num)))
+     (defvar ,(intern (format "liece-%03d-hook" num)) nil)
+     (defvar ,(intern (format "liece-after-%03d-hook" num)) nil)))
+
+(liece-register-300-handler 301)
+(liece-register-300-handler 302)
+(liece-register-300-handler 303)
+(liece-register-300-handler 305)
+(liece-register-300-handler 306)
+
+(liece-register-300-handler 311)
+(liece-register-300-handler 312)
+(liece-register-300-handler 313)
+(liece-register-300-handler 314)
+(liece-register-300-handler 315)
+(liece-register-300-handler 316)
+(liece-register-300-handler 317)
+(liece-register-300-handler 318)
+(liece-register-300-handler 319)
+
+(liece-register-300-handler 321)
+(liece-register-300-handler 322)
+(liece-register-300-handler 323)
+(liece-register-300-handler 324)
+
+(liece-register-300-handler 331)
+(liece-register-300-handler 332)
+(liece-register-300-handler 333)
+
+(liece-register-300-handler 341)
+(liece-register-300-handler 348)
+(liece-register-300-handler 349)
+
+(liece-register-300-handler 351)
+(liece-register-300-handler 352)
+(liece-register-300-handler 353)
+
+(liece-register-300-handler 361)
+(liece-register-300-handler 364)
+(liece-register-300-handler 365)
+(liece-register-300-handler 366)
+(liece-register-300-handler 367)
+(liece-register-300-handler 368)
+(liece-register-300-handler 369)
+
+(liece-register-300-handler 371)
+(liece-register-300-handler 372)
+
+(liece-register-300-handler 381)
+(liece-register-300-handler 382)
+
+(liece-register-300-handler 391)
+
+(provide 'liece-300)
+
+;;; liece-300.el ends here
diff --git a/lisp/liece-400.el b/lisp/liece-400.el
new file mode 100644 (file)
index 0000000..ab16b3d
--- /dev/null
@@ -0,0 +1,177 @@
+;;; liece-400.el --- Handler routines for 400 numeric reply.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile
+  (require 'liece-inlines)
+  (require 'liece-intl)
+  (require 'liece-misc))
+
+(defun* liece-handle-400-messages (number prefix rest)
+  "400 replies -- ERRORS"
+  (or (string-match "[^ ]* \\([^ ]*\\) *\\([^ ]*\\) *:\\(.*\\)" rest)
+      (return-from liece-handle-400-messages))
+  (let ((target1 (match-string 1 rest)) (target2 (match-string 2 rest))
+       (msg (match-string 3 rest)))
+    (setq target1 (liece-channel-virtual target1)
+         target2 (liece-channel-virtual target2))
+    (cond ((string= target1 "")
+          (liece-insert-error liece-400-buffer
+                               (concat msg "\n")))
+         ((string= target2 "")
+          (liece-insert-error liece-400-buffer
+                               (concat msg " (" target1 ")\n")))
+         (t
+          (liece-insert-error liece-400-buffer
+                               (format"%s %s (%s)\n" target1 msg target2))))))
+
+(defun liece-handle-401-message (prefix rest)
+  "ERR_NOSUCHNICK \"<nickname> :No such nick/channel\"."
+  (if (string-match "[^ ]+ \\([^ ]+\\)" rest)
+      (let ((name (match-string 1 rest)))
+       (liece-nick-change name nil)
+       (liece-send "WHOWAS %s" name))))
+
+(defun liece-handle-406-message (prefix rest)
+  "ERR_WASNOSUCHNICK \"<nickname> :There was no such nickname\"."
+  (if (string-match "[^ ]+ \\([^ ]+\\)" rest)
+      (let ((nick (match-string 1 rest)))
+       (liece-nick-change nick nil)
+       (liece-message (_ "No such user %s") nick))))
+
+(defun liece-handle-412-message (prefix rest)
+  "ERR_NOTEXTTOSEND \":No text to send\"."
+  (liece-message (_ "No text to send")))
+
+(defun liece-iterate-nick (nick)
+  (let* ((fmt (format "%s_" nick))
+        (new (substring fmt 0 (min 9 (length fmt)))))
+    (if (string= nick new)
+       (liece-iterate-nick (format "_%s" nick))
+      new)))
+
+(defun liece-handle-432-message (prefix rest)
+  "ERR_ERRONEUSNICKNAME        \"<nickname> :Erroneous nickname\"."
+  (let ((nick (cond ((string-match "^[^ ]+ +\\([^ ]+\\)" rest)
+                    (match-string 1 rest))
+                   ((string-match "^ *\\([^ ]+\\)" rest)
+                    (match-string 1 rest)))))
+    (with-current-buffer liece-command-buffer
+      (if (eq liece-nick-accepted 'ok)
+         (setq liece-real-nickname liece-nickname-last))
+      (liece-message
+       (_ "Erroneous nickname %s.  Choose a new one with %s.")
+       nick (substitute-command-keys "\\[liece-command-nickname]"))
+      (beep))))
+
+(defun liece-handle-433-message (prefix rest)
+  "ERR_NICKNAMEINUSE \"<nickname> :Nickname is already in use\"."
+  (let ((nick (cond ((string-match "^[^ ]+ +\\([^ ]+\\)" rest)
+                    (match-string 1 rest))
+                   ((string-match "^ *\\([^ ]+\\)" rest)
+                    (match-string 1 rest)))))
+    (cond
+     ((and (not (eq liece-nick-accepted 'ok))
+          liece-auto-iterate-nick)
+      (liece-send "NICK %s" (liece-iterate-nick nick))
+      (setq liece-nick-accepted 'sent))
+     (t
+      (if (eq liece-nick-accepted 'ok)
+         (setq liece-real-nickname liece-nickname-last))
+      (with-current-buffer liece-command-buffer
+       (liece-message
+        (_ "Nickname %s already in use.  Choose a new one with %s.")
+        nick (substitute-command-keys "\\[liece-command-nickname]"))
+       (beep))))))
+
+(defun liece-handle-442-message (prefix rest)
+  "ERR_NOTONCHANNEL \"<channel> :You're not on that channel\"."
+  (if (string-match "[^ ]+ \\([^ ]+\\) +:\\(.*\\)" rest)
+      (let* ((chnl (liece-channel-virtual (match-string 1 rest)))
+            (rest (match-string 2 rest)))
+       (if (liece-channel-member chnl liece-current-channels)
+           (liece-channel-part chnl)
+         (liece-message (_ "You're not on channel %s") chnl)))))
+
+(defun liece-handle-443-message (prefix rest)
+  "ERR_USERONCHANNEL \"<channel> <nickname> :is already on channel\"."
+  (if (string-match "[^ ]+ \\([^ ]+\\) \\([^ ]+\\)" rest)
+      (let ((chnl (match-string 1 rest))
+           (rest (match-string 2 rest)))
+       (when (prog1 (liece-channel-p chnl)
+               (setq chnl (liece-channel-virtual chnl)))
+         (or (liece-channel-member chnl liece-current-channels)
+             (liece-channel-join chnl)))
+       (liece-message (_ "You're already on channel %s") chnl))))
+
+(defun liece-handle-464-message (prefix rest)
+  "ERR_PASSWDMISMATCH \":Password incorrect\"."
+  (liece-message
+   (_ "Password incorrect from %s. Try again with password.") prefix)
+  (setq liece-reconnect-with-password t))
+
+(defun liece-handle-482-message (prefix rest)
+  "ERR_CHANOPRIVSNEEDED        \"<channel> :You're not channel operator\"."
+  (liece-message (_ "You are not a channel operator")))
+
+\f
+;;; @ register message handlers
+;;;
+
+(eval-when-compile (require 'liece-handler))
+
+(liece-handler-define-backend "400")
+
+(defmacro liece-register-400-handler (num)
+  `(progn
+     (liece-handler-define-function
+      ,(number-to-string num) '(prefix require "400")
+      ',(intern (format "liece-handle-%03d-message" num)))
+     (defvar ,(intern (format "liece-%03d-hook" num)) nil)
+     (defvar ,(intern (format "liece-after-%03d-hook" num)) nil)))
+
+(liece-register-400-handler 401)
+(liece-register-400-handler 406)
+
+(liece-register-400-handler 412)
+
+(liece-register-400-handler 432)
+(liece-register-400-handler 433)
+
+(liece-register-400-handler 442)
+(liece-register-400-handler 443)
+
+(liece-register-400-handler 464)
+
+(liece-register-400-handler 482)
+
+(provide 'liece-400)
+
+;;; liece-400.el ends here
diff --git a/lisp/liece-500.el b/lisp/liece-500.el
new file mode 100644 (file)
index 0000000..23e4c20
--- /dev/null
@@ -0,0 +1,54 @@
+;;; liece-500.el --- Handler routines for 500 numeric reply.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile
+  (require 'liece-inlines)
+  (require 'liece-intl)
+  (require 'liece-misc))
+
+(defun* liece-handle-500-messages (number prefix rest)
+  (or (string-match "[^ ]* \\([^ :]*\\) *\\([^ :]*\\) *:\\(.*\\)" rest)
+      (return-from liece-handle-500-messages))
+  (let ((target1 (match-string 1 rest)) (target2 (match-string 2 rest))
+       (msg (match-string 3 rest)))
+    (cond ((string-equal target1 "")
+          (liece-insert-error liece-500-buffer (concat msg "\n")))
+         ((string-equal target2 "")
+          (liece-insert-error liece-500-buffer
+                               (concat msg " (" target1 ")\n")))
+         (t
+          (liece-insert-error liece-500-buffer
+                               (format "%s %s (%s)\n"
+                                       target1 msg target2))))))
+
+(provide 'liece-500)
+
+;;; liece-500.el ends here
diff --git a/lisp/liece-channel.el b/lisp/liece-channel.el
new file mode 100644 (file)
index 0000000..e9dc1a3
--- /dev/null
@@ -0,0 +1,523 @@
+;;; liece-channel.el --- Various facility for channel operation.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1999-05-05
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile (require 'liece-inlines))
+
+(eval-when-compile (require 'liece-clfns))
+
+(defconst liece-channel-regexp "[+&#!]")
+(defconst liece-channel-modeless-regexp "[+!]")
+
+(defvar liece-default-channel-representation-format "%s+%s")
+
+(defconst liece-dcc-channel-representation-format "=%s")
+
+(define-widget 'liece-channel-push-button 'push-button
+  "A channel button."
+  :action 'liece-channel-push-button-action)
+
+(defun liece-channel-push-button-action (widget &optional event)
+  (let ((chnl (liece-channel-virtual (widget-value widget))))
+    (if (or (liece-channel-member chnl liece-current-channels)
+           (y-or-n-p (format "Do you really join %s? " chnl)))
+       (liece-command-join chnl))))
+
+;;; Reader conventions
+(defun liece-channel-p (chnl)
+  (string-match
+   (eval-when-compile
+     (concat "^" liece-channel-regexp))
+   chnl))
+
+(defun liece-channel-modeless-p (chnl)
+  (string-match
+   (eval-when-compile
+     (concat "^" liece-channel-modeless-regexp))
+   chnl))
+
+(defalias 'liece-channel-equal 'string-equal-ignore-case)
+
+(defun liece-channel-member (chnl chnls)
+  "Return non-nil if CHNL is member of CHNLS."
+  (member-if
+   (lambda (item)
+     (and (stringp item) (liece-channel-equal chnl item)))
+   chnls))
+
+(defun liece-channel-get-nicks (&optional chnl)
+  "Return CHNL or current channels's members as list."
+  (get (intern (or chnl liece-current-channel) liece-obarray) 'nick))
+
+(defun liece-channel-get-operators (&optional chnl)
+  "Return CHNL or current channels's operators as list."
+  (get (intern (or chnl liece-current-channel) liece-obarray) 'oper))
+
+(defun liece-channel-get-voices (&optional chnl)
+  "Return CHNL or current channels's voices as list."
+  (get (intern (or chnl liece-current-channel) liece-obarray) 'voice))
+
+(defun liece-channel-get-topic (&optional chnl)
+  "Return CHNL or current channels's topic."
+  (get (intern (or chnl liece-current-channel) liece-obarray) 'topic))
+
+(defun liece-channel-get-modes (&optional chnl)
+  "Return CHNL or current channels's mode."
+  (get (intern (or chnl liece-current-channel) liece-obarray)
+       'mode))
+
+(defun liece-channel-get-bans (&optional chnl)
+  "Return CHNL or current channels's ban list."
+  (get (intern (or chnl liece-current-channel) liece-obarray)
+       'ban))
+
+(defun liece-channel-get-invites (&optional chnl)
+  "Return CHNL or current channels's invite list."
+  (get (intern (or chnl liece-current-channel) liece-obarray)
+       'invite))
+
+(defun liece-channel-get-exceptions (&optional chnl)
+  "Return CHNL or current channels's exception list."
+  (get (intern (or chnl liece-current-channel) liece-obarray)
+       'exception))
+
+;;; Internal functions
+(defun liece-channel-remove (chnl chnls)
+  "Remove CHNL from CHNLS."
+  (remove-if
+   (lambda (item)
+     (and (stringp item) (liece-channel-equal chnl item)))
+   chnls))
+
+(defun liece-channel-delete (chnl chnls)
+  "Delete CHNL from CHNLS."
+  (delete-if
+   (lambda (item)
+     (and (stringp item) (liece-channel-equal chnl item)))
+   chnls))
+
+(defmacro liece-channel-set-topic (topic &optional chnl)
+  "Set CHNL or current channels's topic."
+  `(put (intern (or ,chnl liece-current-channel) liece-obarray)
+       'topic ,topic))
+
+(defmacro liece-channel-add-mode (mode &optional chnl)
+  "Add MODE as char to CHNL."
+  `(let ((modes (string-to-char-list (or (liece-channel-get-modes ,chnl)
+                                        ""))))
+     (pushnew ,mode modes)
+     (put (intern (or ,chnl liece-current-channel) liece-obarray)
+         'mode (mapconcat #'char-to-string modes ""))))
+
+(defmacro liece-channel-remove-mode (mode &optional chnl)
+  "Remove MODE as char to CHNL."
+  `(let ((modes (string-to-char-list (or (liece-channel-get-modes ,chnl)
+                                        ""))))
+     (delq ,mode modes)
+     (put (intern (or ,chnl liece-current-channel) liece-obarray)
+         'mode (mapconcat #'char-to-string modes ""))))
+
+(defmacro liece-channel-set-mode (val mode &optional chnl)
+  "Set character VAL as channel MODE into the CHNL."
+  `(if val
+       (liece-channel-add-mode ,mode ,chnl)
+     (liece-channel-remove-mode ,mode ,chnl)))
+
+(defmacro liece-channel-add-ban (pattern &optional chnl)
+  "Add ban PATTERN as char to CHNL."
+  `(let ((patterns (liece-channel-get-bans ,chnl)))
+     (add-to-list 'patterns ,pattern)
+     (put (intern (or ,chnl liece-current-channel) liece-obarray)
+         'ban patterns)))
+
+(defmacro liece-channel-remove-ban (pattern &optional chnl)
+  "Remove ban PATTERN as char to CHNL."
+  `(let ((patterns (remove-if (lambda (elm) (string-equal ,pattern elm))
+                             (liece-channel-get-bans ,chnl))))
+     (put (intern (or ,chnl liece-current-channel) liece-obarray)
+         'ban patterns)))
+
+(defmacro liece-channel-set-ban (chnl pattern val)
+  "Set ban PATTERN as char to CHNL."
+  `(if val
+       (liece-channel-add-ban ,pattern ,chnl)
+     (liece-channel-remove-ban ,pattern ,chnl)))
+
+(defmacro liece-channel-add-exception (pattern &optional chnl)
+  "Add exception PATTERN as char to CHNL."
+  `(let ((patterns (liece-channel-get-exceptions ,chnl)))
+     (pushnew ,pattern patterns)
+     (put (intern (or ,chnl liece-current-channel) liece-obarray)
+         'exception patterns)))
+
+(defmacro liece-channel-remove-exception (pattern &optional chnl)
+  "Remove exception PATTERN as char to CHNL."
+  `(let ((patterns (remove-if (lambda (elm) (string-equal ,pattern elm))
+                             (liece-channel-get-exceptions ,chnl))))
+     (put (intern (or ,chnl liece-current-channel) liece-obarray)
+         'exception patterns)))
+
+(defmacro liece-channel-set-exception (chnl pattern val)
+  "Set exception PATTERN as char to CHNL."
+  `(if val
+       (liece-channel-add-exception ,pattern ,chnl)
+     (liece-channel-remove-exception ,pattern ,chnl)))
+
+(defmacro liece-channel-add-invite (pattern &optional chnl)
+  "Add invite PATTERN as char to CHNL."
+  `(let ((patterns (liece-channel-get-invites ,chnl)))
+     (pushnew ,pattern patterns)
+     (put (intern (or ,chnl liece-current-channel) liece-obarray)
+         'invite patterns)))
+
+(defmacro liece-channel-remove-invite (pattern &optional chnl)
+  "Remove invite PATTERN as char to CHNL."
+  `(let ((patterns (remove-if (lambda (elm) (string-equal ,pattern elm))
+                             (liece-channel-get-invites ,chnl))))
+     (put (intern (or ,chnl liece-current-channel) liece-obarray)
+         'invite patterns)))
+
+(defmacro liece-channel-set-invite (chnl pattern val)
+  "Set invite PATTERN as char to CHNL."
+  `(if val
+       (liece-channel-add-invite ,pattern ,chnl)
+     (liece-channel-remove-invite ,pattern ,chnl)))
+  
+(defun liece-channel-virtual (chnl)
+  "Convert channel name into internal representation.
+\(For example if CHNL is a string \"#...:*\", it will be converted into
+\"%...\"\)"
+  (let ((mapping liece-channel-conversion-map) match)
+    (while mapping
+      (if (string-equal-ignore-case (caar mapping) chnl)
+         (setq match (cdar mapping)))
+      (pop mapping))
+    (if match
+       match
+      (save-match-data
+       (cond
+        ((and (string-match "^[#+]\\(.*\\):\\(.*\\)$" chnl)
+              (string= (match-string 2 chnl)
+                       liece-channel-conversion-default-mask))
+         (if (eq ?+ (aref chnl 0))
+             (concat "-" (match-string 1 chnl))
+           (concat "%" (match-string 1 chnl))))
+        ((string= "" chnl) chnl)
+;       ((eq ?! (aref chnl 0))
+;        (concat "!" (substring chnl (1+ liece-channel-id-length))))
+        (t chnl))))))
+
+(defun liece-channel-real (chnl)
+  "Convert channel name into external representation.
+\(For example if CHNL is a string \"%...\", it will be converted into
+\"#...:*\"\)"
+  (let ((mapping liece-channel-conversion-map) match)
+    (while mapping
+      (if (string-equal-ignore-case (cdar mapping) chnl)
+         (setq match (caar mapping)))
+      (pop mapping))
+    (cond
+     (match match)
+     ((eq ?% (aref chnl 0))
+      (concat "#" (substring chnl 1) ":"
+             liece-channel-conversion-default-mask))
+     ((eq ?- (aref chnl 0))
+      (concat "+" (substring chnl 1) ":"
+             liece-channel-conversion-default-mask))
+     (t chnl))))
+
+;;;###liece-autoload
+(defun liece-command-toggle-channel-buffer-mode ()
+  "Toggle visibility of channel buffer."
+  (interactive)
+  (if (get-buffer liece-channel-buffer)
+      (setq liece-channel-buffer-mode (not liece-channel-buffer-mode)))
+  (liece-configure-windows))
+
+(defmacro liece-channel-buffer-create (chnl)
+  "Create channel buffer of CHNL."
+  `(with-current-buffer
+       (liece-get-buffer-create (format liece-channel-buffer-format ,chnl))
+     (let (buffer-read-only)
+       (liece-insert-info (current-buffer)
+                          (concat (funcall liece-format-time-function
+                                           (current-time))
+                                  " Created.\n")))
+     (unless (eq major-mode 'liece-channel-mode)
+       (liece-channel-mode))
+     (set-alist 'liece-channel-buffer-alist ,chnl (current-buffer))
+     (current-buffer)))
+
+(defun liece-channel-join-internal (item chnls &optional hints)
+  (let (binding inserted)
+    (if (liece-channel-member item hints)
+       (do ((hint hints (cdr hint)) (chnl chnls (cdr chnl)))
+           ((not (or hint chnl)))
+         (if (and (car hint) (liece-channel-equal (car hint) item))
+             (push item binding)
+           (push (car chnl) binding)))
+      (do ((hint hints (cdr hint)) (chnl chnls (cdr chnl)))
+         ((not (or hint chnl)))
+       (if (and (not inserted)
+                (not (or (car hint) (car chnl))))
+           (progn
+             (push item binding)
+             (setq inserted t))
+         (push (car chnl) binding))))
+    (or (liece-channel-member item binding)
+       (push item binding))
+    (nreverse binding)))
+
+(defun liece-channel-join (chnl &optional nosw)
+  "Initialize channel variables of CHNL.
+If NOSW is non-nil do not switch to newly created channel."
+  (let ((cbuf (cdr (string-assoc-ignore-case chnl liece-channel-buffer-alist)))
+       (nbuf (cdr (string-assoc-ignore-case chnl liece-nick-buffer-alist))))
+    (or cbuf
+       (setq cbuf (liece-channel-buffer-create chnl)))
+    (or nbuf
+       (setq nbuf (liece-nick-buffer-create chnl)))
+    (if (liece-channel-p (liece-channel-real chnl))
+       (setq liece-current-channels
+             (liece-channel-join-internal
+              chnl liece-current-channels liece-default-channel-binding))
+      (setq liece-current-chat-partners
+           (liece-channel-join-internal chnl liece-current-chat-partners
+                                         liece-default-partner-binding)))
+    (unless nosw
+      (liece-switch-to-channel chnl)
+      (setq liece-channel-buffer cbuf
+           liece-nick-buffer nbuf))
+    (liece-channel-change)))
+
+(defun liece-channel-part-internal (item chnls &optional hints)
+  (if hints
+      (mapcar
+       (lambda (chnl)
+        (if (and chnl (liece-channel-equal item chnl)) nil chnl))
+       chnls)
+    (liece-channel-remove item chnls)))
+
+(defun liece-channel-part (chnl &optional nosw)
+  "Finalize channel variables of CHNL.
+If NOSW is non-nil do not switch to newly created channel."
+  (cond
+   ((eq liece-command-buffer-mode 'chat)
+    (setq liece-current-chat-partners
+         (liece-channel-part-internal chnl liece-current-chat-partners
+                                       liece-default-partner-binding))
+    (unless nosw
+      (liece-channel-switch-to-last liece-current-chat-partners)))
+   (t
+    (setq liece-current-channels
+         (liece-channel-part-internal chnl liece-current-channels
+                                      liece-default-channel-binding))
+    (unless nosw
+      (liece-channel-switch-to-last liece-current-channels)))))
+
+(defun liece-channel-last (chnls)
+  (car (last (delq nil (copy-sequence chnls)))))
+
+(defmacro liece-channel-switch-to-last (chnls)
+  `(let ((chnl (liece-channel-last ,chnls)))
+     (if chnl
+        (liece-switch-to-channel chnl))
+     (liece-channel-change)))
+
+(defun liece-channel-change ()
+  (let ((chnls (if (eq liece-command-buffer-mode 'chat)
+                  liece-current-chat-partners
+                liece-current-channels))
+       (string ""))
+    (with-current-buffer liece-channel-list-buffer
+      (let ((n 1) buffer-read-only)
+       (erase-buffer)
+       (dolist (chnl chnls)
+         (when chnl
+           (setq chnl (liece-channel-virtual chnl)
+                 string (format "%s,%d:%s" string n chnl))
+           (liece-channel-list-add-button n chnl))
+         (incf n))))
+    (if (string-equal string "")
+       (cond
+        ((eq liece-command-buffer-mode 'chat)
+         (setq liece-channels-indicator "No partner"
+               liece-current-chat-partner nil))
+        (t
+         (setq liece-channels-indicator "No channel"
+               liece-current-channel nil)))
+      (setq liece-channels-indicator (substring string 1)))
+    (liece-set-channel-indicator)
+    (liece-configure-windows)))
+
+(defsubst liece-channel-set-operator-1 (chnl user val)
+  (let* ((chnl (intern chnl liece-obarray)) (opers (get chnl 'oper)))
+    (if val
+       (or (string-list-member-ignore-case user opers)
+           (put chnl 'oper (cons user opers)))
+      (if (string-list-member-ignore-case user opers)
+         (put chnl 'oper (string-list-remove-ignore-case user opers))))))
+
+(defsubst liece-channel-set-voice-1 (chnl user val)
+  (let* ((chnl (intern chnl liece-obarray)) (voices (get chnl 'voice)))
+    (if val
+       (or (string-list-member-ignore-case user voices)
+           (put chnl 'voice (cons user voices)))
+      (if (string-list-member-ignore-case user voices)
+         (put chnl 'voice (string-list-remove-ignore-case user voices))))))
+
+(defun liece-channel-set-operator (chnl user val)
+  (let ((nbuf (cdr (string-assoc-ignore-case chnl liece-nick-buffer-alist)))
+       (xuser user))
+    (liece-channel-set-operator-1 chnl user val)
+    (liece-channel-set-voice-1 chnl user val)
+    (setq user (concat (if val "@" " ") user)
+         xuser (concat (if val "[ +]" "@") (regexp-quote xuser)))
+    (with-current-buffer nbuf
+      (let (buffer-read-only)
+       (goto-char (point-min))
+       (liece-nick-replace xuser user nil t)))))
+
+(defun liece-channel-set-voice (chnl user val)
+  (let ((nbuf (cdr (string-assoc-ignore-case chnl liece-nick-buffer-alist)))
+       (xuser user))
+    (liece-channel-set-voice-1 chnl user val)
+    (setq user (concat (if val "+" " ") user)
+         xuser (concat (if val " " "\\+") (regexp-quote xuser)))
+    (with-current-buffer nbuf
+      (let (buffer-read-only)
+       (goto-char (point-min))
+       (liece-nick-replace xuser user nil t)))))
+
+(defun liece-channel-prepare-partner (join-channel-var)
+  (setq liece-current-chat-partner
+       (or liece-current-chat-partner join-channel-var))
+  (let ((liece-command-buffer-mode 'chat))
+    (liece-channel-join join-channel-var t))
+  (liece-channel-change))
+
+(defun liece-channel-buffer-invisible-p (chnl mode)
+  (let ((cbuf (liece-pick-buffer chnl)))
+    (or (liece-frozen (car cbuf))
+       (and (eq mode 'chat)
+            (not (and (eq liece-command-buffer-mode 'chat)
+                      liece-current-chat-partner
+                      (string-equal-ignore-case
+                       chnl liece-current-chat-partner))))
+       (not (and (eq liece-command-buffer-mode 'channel)
+                 liece-current-channel
+                 (string-equal-ignore-case
+                  chnl liece-current-channel))))))
+
+(defun liece-channel-prepare-representation (chnl &optional method name)
+  (cond
+   ((eq method 'dcc)
+    (format liece-dcc-channel-representation-format chnl))
+   (name
+    (format liece-default-channel-representation-format name chnl))
+   (t chnl)))
+
+(defun liece-channel-parse-representation (str)
+  (cond
+   ((string-match
+     (format
+      (regexp-quote liece-dcc-channel-representation-format)
+      "\\([^ ]+\\)")
+     str)
+    (vector 'dcc nil (match-string 1 str)))
+   ((string-match
+     (format
+      (regexp-quote liece-default-channel-representation-format)
+      "\\([^ ]+\\)" "\\([^ ]+\\)")
+     str)
+    (vector 'irc (match-string 1 str) (match-string 2 str)))
+   (t (vector 'irc nil str))))
+
+(defun liece-channel-list-add-button (n chnl)
+  (insert (format "%2d: " n))
+  (if liece-highlight-mode
+      (let ((st (point)))
+       (insert chnl)
+       (liece-widget-convert-button
+        'liece-channel-push-button st (point) chnl))
+    (insert chnl))
+  (insert "\n"))
+
+(defun liece-channel-add-buttons (start end)
+  (save-excursion
+    (goto-char start)
+    (while (re-search-forward
+           (eval-when-compile
+             (concat "\\(^\\(" liece-time-prefix-regexp "\\)?"
+                     "[][=<>(-][][=<>(-]?\\|\\s-+[+@]?\\)"
+                     "\\([&#!%][^ :]*\\)"))
+           end t)
+      ;;(re-search-forward "\\s-+\\(\\)\\([-+]\\S-*\\)" end t)
+      (let* ((chnl-start (match-beginning 3))
+            (chnl-end (match-end 3))
+            (chnl (buffer-substring chnl-start chnl-end)))
+       (when liece-highlight-mode
+         (liece-widget-convert-button
+          'liece-channel-push-button chnl-start chnl-end chnl))))))
+
+;;;###liece-autoload
+(defun liece-channel-redisplay-buffer (chnl)
+  (let ((buffer
+        (cdr (string-assoc-ignore-case
+              chnl liece-channel-buffer-alist)))
+       (window (liece-get-buffer-window liece-channel-buffer)))
+    (and buffer window
+        (with-current-buffer buffer
+          (set-window-buffer window buffer)
+          (unless (liece-frozen buffer)
+            (set-window-point window (point-max)))
+          (setq liece-channel-buffer buffer)))))
+
+;;;###liece-autoload
+(defun liece-channel-list-redisplay-buffer (chnl)
+  (let ((window (liece-get-buffer-window liece-channel-list-buffer)))
+    (when window
+      (save-selected-window
+       (select-window window)
+       (goto-char (point-min))
+       (search-forward chnl nil t)
+       (set-window-point window (match-beginning 0))
+       (when liece-highlight-mode
+         (let ((overlay (make-overlay (point)(match-end 0))))
+           (liece-map-overlays
+            (lambda (ovl)
+              (if (overlay-get ovl 'liece-channel)
+                  (delete-overlay ovl))))
+           (overlay-put overlay 'face 'underline)
+           (overlay-put overlay 'liece-channel t)))))))
+
+(provide 'liece-channel)
+
+;;; liece-channel.el ends here
diff --git a/lisp/liece-clfns.el b/lisp/liece-clfns.el
new file mode 100644 (file)
index 0000000..a76ea7a
--- /dev/null
@@ -0,0 +1,123 @@
+;;; liece-clfns.el --- compiler macros for emulating cl functions
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 2000-03-19
+;; Keywords: cl, compile
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+
+;; This file is borrowed from `gnus-clfns.el' from T-gnus.
+;; Avoid cl runtime functions for FSF Emacsen.
+
+;;; Code:
+
+(if (featurep 'xemacs)
+    nil
+  (require 'cl)
+
+  (define-compiler-macro last (&whole form x &optional n)
+    (if (and (fboundp 'last)
+            (subrp (symbol-function 'last)))
+       form
+      (if n
+         `(let* ((x ,x) (n ,n) (m 0) (p x))
+            (while (consp p)
+              (incf m)
+              (pop p))
+            (if (<= n 0)
+                p
+              (if (< n m)
+                  (nthcdr (- m n) x)
+                x)))
+       `(let ((x ,x))
+          (while (consp (cdr x))
+            (pop x))
+          x))))
+
+  (define-compiler-macro member-if (&whole form pred list)
+    (if (and (fboundp 'member-if)
+            (subrp (symbol-function 'member-if)))
+       form
+      `(let ((fn ,pred)
+            (seq ,list))
+        (while (and seq (not (funcall fn (car seq))))
+          (pop seq))
+        seq)))
+
+  (define-compiler-macro member-if-not (&whole form pred list)
+    (if (and (fboundp 'member-if-not)
+            (subrp (symbol-function 'member-if-not)))
+       form
+      `(let ((fn ,pred)
+            (seq ,list))
+        (while (and seq (funcall fn (car seq)))
+          (pop seq))
+        seq)))
+  
+  (define-compiler-macro delete-if (&whole form pred list)
+    (if (and (fboundp 'delete-if)
+            (subrp (symbol-function 'delete-if)))
+       form
+      `(let* ((fn ,pred) (seq ,list) (p seq))
+        (while (and p (not (funcall fn (car p))))
+          (pop p))
+        (if p (delq (car p) seq)))))
+
+  (define-compiler-macro remove-if (&whole form pred list)
+    (if (and (fboundp 'remove-if)
+            (subrp (symbol-function 'remove-if)))
+       form
+      `(let* ((fn ,pred) (seq (copy-sequence ,list)) (p seq))
+        (while (and p (not (funcall fn (car p))))
+          (pop p))
+        (if p (delq (car p) seq) seq))))
+
+  (define-compiler-macro remove-if-not (&whole form pred list)
+    (if (and (fboundp 'remove-if-not)
+            (subrp (symbol-function 'remove-if-not)))
+       form
+      `(let* ((fn ,pred) (seq (copy-sequence ,list)) (p seq))
+        (while (and p (funcall fn (car p)))
+          (pop p))
+        (if p (delq (car p) seq) seq))))
+
+  (define-compiler-macro assoc-if (&whole form pred list)
+    (if (and (fboundp 'assoc-if)
+            (subrp (symbol-function 'assoc-if)))
+       form
+      `(let ((fn ,pred) (seq ,list))
+        (while (and seq (not (funcall fn (caar seq))))
+          (pop seq))
+        (car seq))))
+
+  (define-compiler-macro rassoc-if (&whole form pred list)
+    (if (and (fboundp 'rassoc-if)
+            (subrp (symbol-function 'rassoc-if)))
+       form
+      `(let ((fn ,pred) (seq ,list))
+        (while (and seq (not (funcall fn (cdar seq))))
+          (pop seq))
+        (car seq)))))
+
+(provide 'liece-clfns)
+
+;;; liece-clfns.el ends here
diff --git a/lisp/liece-coding.el b/lisp/liece-coding.el
new file mode 100644 (file)
index 0000000..deee745
--- /dev/null
@@ -0,0 +1,122 @@
+;;; liece-coding.el --- Converting string with apropriate coding system.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1999-06-02
+;; Keywords: IRC, liece, coding-system, MULE
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(require 'poem)
+(require 'mcharset)
+
+(eval-when-compile (require 'liece-compat))
+
+(defgroup liece-coding nil
+  "Code conversion group"
+  :tag "Coding"
+  :prefix "liece-"
+  :group 'liece)
+  
+(defcustom liece-mime-charset-for-write 'iso-2022-jp-2
+  "Charset used in any transferred messages."
+  :type 'mime-charset
+  :group 'liece-coding)
+
+(defcustom liece-mime-charset-for-read 'x-ctext
+  "Charset used in any transferred messages."
+  :type 'mime-charset
+  :group 'liece-coding)
+
+(static-when (featurep 'xemacs)
+  (define-obsolete-variable-alias 'liece-default-mime-charset
+    'liece-mime-charset-for-write)
+  (define-obsolete-variable-alias 'liece-default-mime-charset-for-read
+    'liece-mime-charset-for-read))
+
+(defcustom liece-detect-coding-system nil
+  "Whether use coding system auto detection."
+  :type 'boolean
+  :group 'liece-coding)
+
+(defcustom liece-detect-coding-region-function
+  (function liece-detect-coding-region)
+  "User customizable `detect-coding-region'."
+  :type 'function
+  :group 'liece-coding)
+
+(defcustom liece-detect-coding-string-function
+  (function liece-detect-coding-string)
+  "User customizable detect-coding-string."
+  :type 'function
+  :group 'liece-coding)
+
+(defcustom liece-decode-coding-string-function
+  (function decode-coding-string)
+  "User customizable `decode-coding-string'."
+  :type 'function
+  :group 'liece-coding)
+
+(defun liece-coding-encode-charset-region (start end &optional lbt)
+  (encode-mime-charset-region start end liece-mime-charset-for-write lbt))
+
+(defun liece-coding-decode-charset-region (start end)
+  (let ((cs (if (and liece-detect-coding-system
+                    (fboundp liece-detect-coding-region-function))
+               (funcall liece-detect-coding-region-function start end)
+             (mime-charset-to-coding-system liece-mime-charset-for-read))))
+    (decode-coding-region start end cs)))
+
+(defun liece-detect-coding-region (start end)
+  (let ((cs (detect-coding-region start end)))
+    (if (listp cs)
+       (setq cs (car cs)))
+    (if (featurep 'xemacs)
+       (eval '(setq cs (coding-system-name cs))))
+    cs))
+
+(defun liece-coding-encode-charset-string (str &optional lbt)
+  (encode-mime-charset-string str liece-mime-charset-for-write lbt))
+
+(eval-and-compile
+  (when (fboundp 'detect-coding-string)
+    (defun liece-detect-coding-string (str)
+      (let ((cs (detect-coding-string str)))
+       (if (listp cs)
+           (setq cs (car cs)))
+       (static-if (fboundp 'coding-system-name)
+           (coding-system-name cs)
+         cs)))))
+
+(defun liece-coding-decode-charset-string (str)
+  (let ((cs (or (and liece-detect-coding-system
+                    (fboundp liece-detect-coding-string-function)
+                    (funcall liece-detect-coding-string-function str))
+               (mime-charset-to-coding-system liece-mime-charset-for-read))))
+    (funcall liece-decode-coding-string-function str cs)))
+
+(provide 'liece-coding)
+
+;;; liece-coding.el ends here
diff --git a/lisp/liece-commands.el b/lisp/liece-commands.el
new file mode 100644 (file)
index 0000000..861dcd0
--- /dev/null
@@ -0,0 +1,1264 @@
+;;; liece-commands.el --- Interactive commands in command buffer.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1999-12-24
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile
+   (require 'liece-crypt)
+   (require 'liece-misc))
+
+(require 'liece-channel)
+(require 'liece-nick)
+(require 'liece-coding)
+(require 'liece-intl)
+(require 'liece-minibuf)
+
+(autoload 'liece-dcc-chat-send "liece-dcc")
+(autoload 'liece-window-configuration-pop "liece-window")
+
+(defun liece-command-poll-names ()
+  "Handler for polling NAMES."
+  (when (liece-server-opened)
+    (setq liece-polling
+         (+ liece-polling
+            (length liece-channel-alist)))
+    (dolist (chnl liece-channel-alist)
+      (liece-send "NAMES %s" (car chnl)))))
+
+(defun liece-command-poll-friends ()
+  "Handler for polling ISON."
+  (and liece-friends
+       (liece-server-opened)
+       (liece-send "ISON %s" (mapconcat 'identity liece-friends " "))))
+
+(defun liece-command-find-timestamp ()
+  "Find recent timestamp in dialogue buffer."
+  (interactive)
+  (save-excursion
+    (let ((range "")
+         (regexp (concat "^\\(" liece-time-prefix-regexp "\\)?"
+                         (regexp-quote liece-timestamp-prefix))))
+      (unless (eq 'liece-dialogue-mode (derived-mode-class major-mode))
+       (set-buffer liece-dialogue-buffer)
+       (goto-char (point-max)))
+      (if (re-search-backward regexp (point-min) t)
+         (setq range (concat (buffer-substring (match-end 0)
+                                               (line-end-position))
+                             "   ---   ")))
+      (if (re-search-forward regexp (point-max) t)
+         (setq range (concat range (buffer-substring (match-end 0)
+                                                     (line-end-position)))))
+      (liece-message range))))
+
+(defun liece-command-keepalive ()
+  "Handler for polling server connection."
+  (if (not (liece-server-opened))
+      (liece)
+    (liece-ping-if-idle)))
+
+(defvar liece-last-timestamp-time nil "Last time timestamp was inserted.")
+(defvar liece-last-timestamp-no-cons-p nil "Last timestamp was no-cons.")
+
+(defun liece-command-timestamp-if-interval-expired (&optional no-cons)
+  "If interval timer has expired, insert timestamp into dialogue buffer.
+And save variables into `liece-variable-file' if there are variables to save.
+Optional argument NO-CONS specifies timestamp format is cons cell."
+  (interactive)
+  (when (and (not (and no-cons
+                      liece-last-timestamp-no-cons-p))
+            (numberp liece-timestamp-interval)
+            (> liece-timestamp-interval 0)
+            (or (null liece-last-timestamp-time)
+                (> (liece-time-difference liece-last-timestamp-time
+                                           (current-time))
+                   liece-timestamp-interval)))
+    (if liece-save-variables-are-dirty
+       (liece-command-save-vars))
+    (liece-command-timestamp)
+    (setq liece-last-timestamp-no-cons-p no-cons)))
+
+(defun liece-command-timestamp ()
+  "Insert timestamp into dialogue buffer."
+  (interactive)
+  (let ((stamp (format liece-timestamp-format
+                      (funcall liece-format-time-function (current-time))))
+       (liece-timestamp-interval 0))
+    (liece-insert liece-D-buffer (concat stamp "\n"))
+    (setq liece-last-timestamp-time (current-time))))
+
+(defun liece-command-point-back-to-command-buffer ()
+  "Set point back to command buffer."
+  (interactive)
+  (let ((win (liece-get-buffer-window liece-command-buffer)))
+    (if win (select-window win))))
+
+(defun liece-command-send-message
+  (message &optional arg key)
+  "Send MESSAGE to current chat partner of current channel.
+If argument ARG is non-nil message will be encrypted with KEY."
+  (when arg
+    (setq liece-crypt-mode-active (not liece-crypt-mode-active)))
+  (if (string-equal message "")
+      (progn (liece-message (_ "No text to send")) nil)
+    (let ((addr (if (eq liece-command-buffer-mode 'chat)
+                   liece-current-chat-partner
+                 liece-current-channel))
+         repr method name target
+         (msg message))
+      (with-liece-encryption (msg addr arg key)
+       (cond
+        ((eq liece-command-buffer-mode 'chat)
+         (if (null liece-current-chat-partner)
+             (message
+              (substitute-command-keys
+               "Type \\[liece-command-join] to start private conversation"))
+           (setq repr (liece-channel-parse-representation
+                       liece-current-chat-partner)
+                 method (aref repr 0)
+                 name (aref repr 1)
+                 target (aref repr 2))
+           (cond ((eq method 'dcc)
+                  (liece-dcc-chat-send target msg))
+                 ((eq method 'irc)
+                  (liece-send "PRIVMSG %s :%s"
+                               liece-current-chat-partner msg)))
+           (liece-own-private-message message)))
+        ((not liece-current-channel)
+         (beep t)
+         (message (substitute-command-keys
+                   "Type \\[liece-command-join] to join a channel")))
+        (t
+         (liece-send
+          "PRIVMSG %s :%s"
+          (liece-channel-real liece-current-channel) msg)
+         (liece-own-channel-message message))))
+      t)))
+
+(defun liece-enter-message (&optional arg key)
+  "Enter the current line as an entry in the IRC dialogue.
+If argument ARG is non-nil message will be encrypted with KEY."
+  (beginning-of-line)
+  (if (liece-command-send-message
+       (buffer-substring (point)(progn (end-of-line) (point)))
+       arg key)
+      (liece-next-line 1)))
+
+(defun liece-command-enter-message (&optional arg key)
+  "Enter the current line as an entry in the IRC dialogue.
+If the prefix argument ARG is non-nil, message will be encrypted with KEY."
+  (interactive
+   (let ((completion-ignore-case t))
+     (and (if current-prefix-arg
+             (not liece-crypt-mode-active)
+           liece-crypt-mode-active)
+         (list
+          'encrypt
+          (completing-read
+           (_ "Encrypt message with key [RET for none]: ")
+           (cons (cons "" nil)
+                 liece-crypt-encryption-keys))))))
+  (liece-enter-message arg (if (string-equal key "") nil key)))
+
+(defun liece-dialogue-enter-message ()
+  "Ask for a line as an entry in the IRC dialogue on the current channel."
+  (interactive)
+  (let (message)
+    (while (not (string-equal (setq message (read-string "> ")) ""))
+      (liece-command-send-message message))))
+
+(defun liece-command-inline ()
+  "Send current line as a message to the IRC server."
+  (interactive)
+  (beginning-of-line)
+  (liece-send (buffer-substring (point)(progn (end-of-line) (point))))
+  (liece-next-line 1))
+
+(defun liece-command-join-channel (join-channel-var key)
+  "Join a JOIN-CHANNEL-VAR with KEY."
+  (let ((nicks liece-nick-alist) nick)
+    (while (and nicks
+                (not (and
+                      (car nick)
+                      (liece-channel-equal join-channel-var (car nick)))))
+      (setq nick (pop nicks)))
+    (when nicks
+      (setq join-channel-var
+            (or (car (get (intern (car nick) liece-obarray) 'chnl))
+                join-channel-var)))
+    (if (liece-channel-member join-channel-var liece-current-channels)
+       (progn
+         (setq liece-current-channel join-channel-var)
+         (liece-switch-to-channel liece-current-channel)
+         (liece-channel-change))
+      (liece-send "JOIN %s %s" (liece-channel-real join-channel-var) key))))
+
+(defun liece-command-join-partner (join-channel-var)
+  "Join a JOIN-CHANNEL-VAR."
+  (if (liece-channel-member join-channel-var liece-current-chat-partners)
+      (progn
+       (setq liece-current-chat-partner join-channel-var)
+       (liece-switch-to-channel liece-current-chat-partner))
+    (setq liece-current-chat-partner join-channel-var)
+    (liece-channel-join liece-current-chat-partner))
+  (liece-channel-change))
+
+(defun liece-command-join (join-channel-var &optional key)
+  "Join a JOIN-CHANNEL-VAR with KEY.
+If user nickname is given join the same set of channels as the specified user.
+If command-buffer is in chat-mode, start private conversation
+with specified user."
+  (interactive
+   (let (join-channel-var key (completion-ignore-case t))
+     (setq join-channel-var
+          (if (numberp current-prefix-arg)
+              current-prefix-arg
+            (liece-channel-virtual
+             (if (eq liece-command-buffer-mode 'chat)
+                 (liece-minibuffer-completing-default-read
+                  (_ "Start private conversation with: ")
+                  liece-nick-alist
+                  nil nil liece-privmsg-partner)
+               (liece-minibuffer-completing-default-read
+                (_ "Join channel: ")
+                (append liece-channel-alist liece-nick-alist)
+                nil nil liece-default-channel-candidate)))))
+     (if (and current-prefix-arg
+             (not (numberp current-prefix-arg)))
+        (setq key
+              (if (eq current-prefix-arg '-)
+                  (read-string
+                   (format (_ "Key for channel %s: ") join-channel-var))
+                (let ((passwd-echo ?*))
+                  (read-passwd
+                   (format (_ "Key for channel %s: ") join-channel-var))))))
+     (list join-channel-var key)))
+  (let ((real-chnl (liece-channel-real join-channel-var)))
+    (if (numberp join-channel-var)
+       (liece-switch-to-channel-no join-channel-var)
+      (setq liece-default-channel-candidate nil)
+      (if (liece-channel-p real-chnl)
+         (liece-toggle-command-buffer-mode 'channel)
+       (liece-toggle-command-buffer-mode 'chat))
+      (if (eq liece-command-buffer-mode 'chat)
+         (liece-command-join-partner join-channel-var)
+       (if (null key)
+           (setq key (get (intern join-channel-var liece-obarray) 'key)))
+       (put (intern join-channel-var liece-obarray) 'key key)
+       (if (null key)
+           (setq key ""))
+       (liece-command-join-channel join-channel-var key))
+      (force-mode-line-update))))
+
+(defun liece-command-part (part-channel-var &optional part-msg)
+  "Part a PART-CHANNEL-VAR with PART-MSG."
+  (interactive
+   (let (part-channel-var
+        (completion-ignore-case t)
+        (part-msg "bye..."))
+     (setq part-channel-var
+          (liece-channel-virtual
+           (if (eq liece-command-buffer-mode 'chat)
+               (liece-minibuffer-completing-default-read
+                (_ "End private conversation with: ")
+                (list-to-alist liece-current-chat-partners)
+                nil nil liece-current-chat-partner)
+             (liece-minibuffer-completing-default-read
+              (_ "Part channel: ")
+              (list-to-alist liece-current-channels)
+              nil nil liece-current-channel))))
+     (when current-prefix-arg
+       (setq part-msg (read-string (_ "Part Message: "))))
+     (list part-channel-var part-msg)))
+  (let ((real-chnl (liece-channel-real part-channel-var)))
+    (if (liece-channel-p real-chnl)
+       (progn
+         (if (liece-channel-member part-channel-var liece-current-channels)
+             (setq liece-current-channel part-channel-var))
+         (liece-send "PART %s :%s" real-chnl part-msg)
+         (setq liece-default-channel-candidate part-channel-var))
+      (setq liece-current-chat-partners
+           (liece-channel-remove part-channel-var
+                                 liece-current-chat-partners)
+           liece-current-chat-partner
+           (car liece-current-chat-partners))
+      (liece-set-channel-indicator)
+      (liece-set-crypt-indicator)
+      (liece-channel-part part-channel-var))))
+
+(defun liece-command-kill (kill-nickname-var &optional timeout silent)
+  "Ignore messages from KILL-NICKNAME-VAR.
+Username can be given as case insensitive regular expression of form
+\".*@.*\.sub.domain\".
+If already ignoring him/her, toggle.
+If `liece-variables-file' is defined and the file is writable,
+settings are updated automatically for future sessions.
+Optional argument TIMEOUT says expiration.
+If SILENT is non-nil, don't notify current status."
+  (interactive
+   (let (kill-nickname-var timeout (completion-ignore-case t))
+     (setq kill-nickname-var (completing-read
+                             (_ "Ignore nickname or regexp: ")
+                             (append liece-nick-alist
+                                     liece-kill-nickname)))
+     (or (string-equal "" kill-nickname-var)
+        (string-assoc-ignore-case kill-nickname-var liece-kill-nickname)
+        (setq timeout (string-to-int (read-from-minibuffer
+                                      (_ "Timeout [RET for none]: ")))))
+     (list kill-nickname-var timeout)))
+  ;; empty, just list them
+  (if (string-equal "" kill-nickname-var)
+      (with-current-buffer liece-dialogue-buffer
+       (let ((ignores liece-kill-nickname) (time (current-time))
+             buffer-read-only expire expiretime)
+         (goto-char (point-max))
+         (liece-insert-info liece-D-buffer (_ "Currently ignoring:"))
+         (dolist (ignore ignores)
+           (setq expiretime (if (cdr ignore)
+                                (/ (liece-time-difference time (cdr ignore))
+                                   60))
+                 expire (cond ((not expiretime) "")
+                              ((>= expiretime 0)
+                               (format (_ " (%d min)") expiretime))
+                              ((< expiretime 0)
+                               (_ " expired"))))
+           (liece-insert liece-D-buffer
+                          (concat " " (car ignore) expire "\n")))))
+    ;; else not empty, check if exists
+    (let ((ignore
+          (string-assoc-ignore-case
+           kill-nickname-var liece-kill-nickname)))
+      (if ignore
+         (when (setq ignore (string-assoc-ignore-case
+                             (car ignore) liece-kill-nickname))
+           (setq liece-kill-nickname
+                 (delq ignore liece-kill-nickname))
+           (liece-insert-info liece-D-buffer
+                              (format (_ "No longer ignoring: %s.\n")
+                                      (car ignore))))
+       ;; did not find, add to ignored ones
+       (let ((expire-time (if (> timeout 0)
+                              (liece-time-add (current-time)
+                                               (* timeout 60)))))
+         (and silent (> timeout 0)
+              (setcar (cdr (cdr expire-time)) -1))
+         (setq liece-kill-nickname
+               (cons (cons kill-nickname-var expire-time)
+                     liece-kill-nickname))
+         (unless silent
+           (liece-insert-info liece-D-buffer
+                               (format (_ "Ignoring %s") kill-nickname-var))
+           (liece-insert-info liece-D-buffer
+                               (if (> timeout 0)
+                                   (format " for %d minutes.\n" timeout)
+                                 (format ".\n")))))))
+    (setq liece-save-variables-are-dirty t)))
+
+(defun liece-command-kick (nick &optional msg)
+  "Kick this NICK out with MSG."
+  (interactive
+   (let ((completion-ignore-case t)
+        (nicks (liece-channel-get-nicks)) nick msg)
+     (setq nick (completing-read
+                (_ "Kick out nickname: ")
+                (list-to-alist nicks)))
+     (if current-prefix-arg
+        (setq msg (concat " :" (read-string (_ "Kick Message: ")))))
+     (list nick msg)))
+  (liece-send "KICK %s %s%s"
+              (liece-channel-real liece-current-channel)
+              nick (or msg "")))
+
+(defun liece-command-ban (ban)
+  "BAN this user out."
+  (interactive
+   (let* ((completion-ignore-case t)
+         (nicks (liece-channel-get-nicks))
+         (uahs (mapcar
+                (function
+                 (lambda (nick)
+                   (list
+                    (concat nick "!" (liece-nick-get-user-at-host nick)))))
+                nicks))
+         ban nick msg)
+     (setq ban (liece-minibuffer-completing-default-read
+               (_ "Ban pattern: ") uahs nil nil
+               (concat nick "!" (liece-nick-get-user-at-host nick))))
+     (list ban)))
+  (liece-send "MODE %s :+b %s"
+              (liece-channel-real liece-current-channel) ban))
+   
+(defun liece-command-ban-kick (ban nick &optional msg)
+  "BAN kick this NICK out with MSG."
+  (interactive
+   (let* ((completion-ignore-case t)
+         (nicks (liece-channel-get-nicks))
+         (uahs (mapcar
+                (function
+                 (lambda (nick)
+                   (list
+                    (concat nick "!" (liece-nick-get-user-at-host nick)))))
+                nicks))
+         ban nick msg)
+     (setq nick (completing-read (_ "Kick out nickname: ")
+                                (list-to-alist nicks))
+          ban (liece-minibuffer-completing-default-read
+               (_ "Ban pattern: ") uahs nil nil
+               (concat nick "!" (liece-nick-get-user-at-host nick))))
+     (if current-prefix-arg
+        (setq msg (concat " :" (read-string (_ "Kick Message: "))))
+       (setq msg ""))
+     (list ban nick msg)))
+  (liece-send "MODE %s :+b %s"
+              (liece-channel-real liece-current-channel) ban)
+  (liece-send "KICK %s %s%s"
+              (liece-channel-real liece-current-channel)
+              nick (or msg "")))
+
+(defun liece-command-list (&optional channel)
+  "List the given CHANNEL and its topics.
+If you enter only Control-U as argument, list the current channel.
+With - as argument, list all channels."
+  (interactive
+   (if (or current-prefix-arg (null liece-current-channel))
+       (if (eq current-prefix-arg '-)
+          (list current-prefix-arg))
+     (let ((completion-ignore-case t) channel)
+       (setq channel (liece-minibuffer-completing-default-read
+                     (_ "LIST channel: ")
+                     liece-channel-alist nil nil liece-current-channel))
+       (unless (string-equal "" channel)
+        (list channel)))))
+  
+  (cond ((not channel)
+        (if liece-current-channel
+            (liece-send "LIST %s"
+                         (liece-channel-real liece-current-channel))))
+       ((and (eq channel '-)
+             (y-or-n-p (_ "Do you really query LIST without argument?")))
+        (liece-send "LIST"))
+       ((not (string-equal channel ""))
+        (liece-send "LIST %s" (liece-channel-real channel))
+        )))
+
+(defun liece-command-lusers ()
+  "List the number of users and servers."
+  (interactive)
+  (liece-send "LUSERS"))
+
+(defun liece-command-modec (chnl change)
+  "Send a MODE command to this CHNL.
+Argument CHANGE ."
+  (interactive
+   (let ((completion-ignore-case t)
+        (chnl liece-current-channel)
+        liece-minibuffer-complete-function prompt)
+     (if current-prefix-arg
+        (setq chnl
+              (liece-minibuffer-completing-default-read
+               (_ "Channel/User: ")
+               (append liece-channel-alist liece-nick-alist)
+               nil nil liece-current-channel)))
+     (cond
+      ((liece-channel-p (liece-channel-real chnl))
+       (setq prompt (format
+                    (_ "Mode for channel %s [%s]: ")
+                    chnl (or (liece-channel-get-modes chnl) ""))
+            liece-minibuffer-complete-function
+            (function liece-minibuffer-complete-channel-modes)))
+      (t
+       (setq prompt (format
+                    (_ "Mode for user %s [%s]: ")
+                    chnl (or (liece-nick-get-modes chnl) ""))
+            liece-minibuffer-complete-function
+            (function liece-minibuffer-complete-user-modes))))
+     (list chnl (read-from-minibuffer prompt nil liece-minibuffer-map))))
+  (liece-send "MODE %s %s" (liece-channel-real chnl) change))
+
+(defun liece-command-mode+o (opers)
+  "Send a MODE +o OPERS command."
+  (interactive
+   (let ((opers (liece-channel-get-operators)) oper
+        (nicks (liece-channel-get-nicks))
+        (completion-ignore-case t))
+     (setq nicks (filter-elements
+                  nick nicks
+                  (not (liece-nick-member nick opers)))
+          opers (liece-minibuffer-completing-sequential-read
+                 (_ "Set Operator for") 0
+                 (list-to-alist nicks)))
+     (list opers)))
+  (let (ops)
+    (dolist (oper opers)
+      (push oper ops)
+      (when (= (length ops) liece-compress-mode-length)
+       (liece-send "MODE %s +%s %s"
+                    (liece-channel-real liece-current-channel)
+                    (string-times "o" liece-compress-mode-length)
+                    (string-join ops " "))
+       (setq ops nil)))
+    (if ops
+       (liece-send "MODE %s +%s %s"
+                    (liece-channel-real liece-current-channel)
+                    (string-times "o" (length ops))
+                    (string-join ops " ")))))
+
+(defun liece-command-mode-o (opers)
+  "Send a MODE -o OPERS command."
+  (interactive
+   (let ((completion-ignore-case t)
+        (opers (liece-channel-get-operators)) oper nicks)
+     (setq nicks (liece-minibuffer-completing-sequential-read
+                 (_ "Unset Operator for") 0
+                 (list-to-alist opers)))
+     (list nicks)))
+  (let (ops)
+    (dolist (oper opers)
+      (push oper ops)
+      (when (= (length ops) liece-compress-mode-length)
+       (liece-send "MODE %s -%s %s"
+                    (liece-channel-real liece-current-channel)
+                    (string-times "o" liece-compress-mode-length)
+                    (string-join ops " "))
+       (setq ops nil)))
+    (if ops
+       (liece-send "MODE %s -%s %s"
+                    (liece-channel-real liece-current-channel)
+                    (string-times "o" (length ops))
+                    (string-join ops " ")))))
+
+(defun liece-command-mode+v (voices)
+  "Send a MODE +v VOICES command."
+  (interactive
+   (let ((voices (append (liece-channel-get-voices)
+                        (liece-channel-get-operators)))
+        voice
+        (nicks (liece-channel-get-nicks))
+        (completion-ignore-case t)
+        (count 0))
+     (setq nicks (filter-elements nick nicks
+                  (not (string-assoc-ignore-case nick voices)))
+          voices (liece-minibuffer-completing-sequential-read
+                  (_ "Set Voice for") 0 (list-to-alist nicks)))
+     (list voices)))
+  (let (vcs)
+    (dolist (voice voices)
+      (push voice vcs)
+      (when (= (length vcs) liece-compress-mode-length)
+       (liece-send "MODE %s +%s %s"
+                    (liece-channel-real liece-current-channel)
+                    (string-times "v" liece-compress-mode-length)
+                    (string-join vcs " "))
+       (setq vcs nil)))
+    (if vcs
+       (liece-send "MODE %s +%s %s"
+                    (liece-channel-real liece-current-channel)
+                    (string-times "v" (length vcs))
+                    (string-join vcs " ")))))
+
+(defun liece-command-mode-v (voices)
+  "Send a MODE -v VOICES command."
+  (interactive
+   (let ((completion-ignore-case t)
+        (voices (liece-channel-get-voices)) voice nicks)
+     (setq nicks (liece-minibuffer-completing-sequential-read
+                 (_ "Unset Voice for") 0 (list-to-alist voices)))
+     (list nicks)))
+  (let (vcs)
+    (dolist (voice voices)
+      (push voice vcs)
+      (when (= (length vcs) liece-compress-mode-length)
+       (liece-send "MODE %s -%s %s"
+                    (liece-channel-real liece-current-channel)
+                    (string-times "v" liece-compress-mode-length)
+                    (string-join vcs " "))
+       (setq vcs nil)))
+    (if vcs
+       (liece-send "MODE %s -%s %s"
+                    (liece-channel-real liece-current-channel)
+                    (string-times "v" (length vcs))
+                    (string-join vcs " ")))))
+
+(defun liece-command-message (address message &optional arg key)
+  "Send ADDRESS a private MESSAGE.
+If argument ARG is non-nil message will be encrypted with KEY."
+  (interactive
+   (let ((completion-ignore-case t) address)
+     (setq address
+          (liece-channel-virtual
+           (liece-minibuffer-completing-default-read
+            (_ "Private message to: ")
+            (append liece-nick-alist liece-channel-alist)
+            nil nil liece-privmsg-partner)))
+     (list address
+          (read-string
+           (format
+            (_ "Private message to %s: ")
+            address))
+          (if current-prefix-arg
+              (not liece-crypt-mode-active)
+            liece-crypt-mode-active)
+          nil)))
+  (if (funcall liece-message-empty-predicate message)
+      (progn (liece-message (_ "No text to send")) nil)
+    (let ((chnl (liece-channel-real address)) (msg message))
+      (with-liece-encryption (msg address arg key)
+       (liece-send "PRIVMSG %s :%s" chnl msg)
+       (if (liece-channel-p chnl)
+           (liece-own-channel-message message
+                                       (liece-channel-virtual address))
+         (liece-own-private-message message address)))
+      t)))
+
+;; Added at mta@tut.fi's request...
+;; Does not support encryption (yet!?)
+
+(defun liece-command-mta-private (partner)
+  "Send a private message (current line) to PARTNER."
+  (interactive
+   (let ((completion-ignore-case t))
+     (setq liece-privmsg-partner
+          (liece-channel-virtual
+           (liece-minibuffer-completing-default-read
+            (_ "To whom: ")
+            (append liece-nick-alist liece-channel-alist)
+            nil nil liece-privmsg-partner)))
+     (list liece-privmsg-partner)))
+  (let ((message (buffer-substring (progn (beginning-of-line) (point))
+                                  (progn (end-of-line) (point)))))
+    (if (> (length message) 0)
+       (progn
+         (liece-command-message liece-privmsg-partner message)
+         (liece-next-line 1))
+      (liece-message (_ "No text to send")))))
+
+(defun liece-command-names (&optional channel)
+  "List the nicknames of the current IRC users on given CHANNEL.
+With an Control-U as argument, only the current channel is listed.
+With - as argument, list all channels."
+  (interactive
+   (if (or current-prefix-arg (null liece-current-channel))
+       (if (eq current-prefix-arg '-)
+          (list current-prefix-arg))
+     (let ((completion-ignore-case t) channel)
+       (setq channel (liece-minibuffer-completing-default-read
+                     (_ "Names on channel: ")
+                     liece-channel-alist nil nil liece-current-channel))
+       (unless (string-equal "" channel)
+        (list channel)))))
+  (cond
+   ((not channel)
+    (liece-send "NAMES %s"
+               (liece-channel-real liece-current-channel)))
+   ((and (eq channel '-)
+        (y-or-n-p (_ "Do you really query NAMES without argument?")))
+    (liece-send "NAMES"))
+   (t
+    (liece-send "NAMES %s" (liece-channel-real channel)))))
+
+(defun liece-command-nickname (nick)
+  "Set your nickname to NICK."
+  (interactive "sEnter your nickname: ")
+  (let ((nickname (truncate-string nick liece-nick-max-length)))
+    (if (zerop (length nickname))
+       (liece-message (_ "illegal nickname \"%s\"; not changed") nickname)
+      (liece-send "NICK %s" nick))))
+      
+(defun liece-command-who (&optional expr)
+  "Lists tue users that match the given expression EXPR.
+If you enter only Control-U as argument, list the current channel.
+With - as argument, list all users."
+  (interactive
+   (if (or current-prefix-arg (null liece-current-channel))
+       (if (eq current-prefix-arg '-)
+          (list current-prefix-arg))
+     (let ((completion-ignore-case t) expr)
+       (setq expr (liece-minibuffer-completing-default-read
+                  (_ "WHO expression: ")
+                  (append liece-channel-alist liece-nick-alist)))
+       (unless (string-equal "" expr)
+        (list expr)))))
+  (cond
+   ((not expr)
+    (liece-send "WHO %s" (liece-channel-real liece-current-channel)))
+   ((and (eq expr '-)
+        (y-or-n-p (_ "Do you really query WHO without argument?")))
+    (liece-send "WHO"))
+   (t
+    (liece-send "WHO %s" expr)
+    (setq liece-who-expression expr))))
+
+(defun liece-command-finger (finger-nick-var &optional server)
+  "Get information about a specific user FINGER-NICK-VAR.
+If called with optional argument SERVER or any prefix argument,
+query information to the foreign server."
+  (interactive
+   (let (finger-nick-var (completion-ignore-case t))
+     (setq finger-nick-var
+          (completing-read (_ "Finger whom: ") liece-nick-alist))
+     (list finger-nick-var (and current-prefix-arg finger-nick-var))))
+  (if server
+      (liece-send "WHOIS %s %s" server finger-nick-var)
+    (liece-send "WHOIS %s" finger-nick-var)))
+
+(defun liece-command-topic (topic)
+  "Change TOPIC of the current channel."
+  (interactive
+   (list (read-from-minibuffer
+         "Topic: " (cons (or (liece-channel-get-topic) "") 0))))
+  (liece-send "TOPIC %s :%s"
+             (liece-channel-real liece-current-channel) topic))
+
+(defun liece-command-invite (&optional invite-nick-var invite-channel-var)
+  "Invite INVITE-NICK-VAR to INVITE-CHANNEL-VAR."
+  (interactive
+   (let ((completion-ignore-case t) invite-channel-var invite-nick-var)
+     (if current-prefix-arg
+        (setq invite-channel-var
+              (liece-channel-virtual
+               (completing-read
+                (_ "Invite channel: ")
+                (list-to-alist liece-current-channels)))))
+     (setq invite-nick-var
+          (completing-read
+           (_ "Invite whom: ")
+           liece-nick-alist))
+     (list invite-nick-var invite-channel-var)))
+  (or invite-channel-var
+      (setq invite-channel-var liece-current-channel))
+  (liece-send "INVITE %s %s"
+              invite-nick-var (liece-channel-real invite-channel-var)))
+
+(defun liece-command-away (awaymsg)
+  "Mark/unmark yourself as being away.
+Leave message AWAYMSG."
+  (interactive "sAway message: ")
+  (liece-send "AWAY :%s" awaymsg)
+  (setq liece-away-message awaymsg))
+
+(defun liece-command-scroll-down (lines)
+  "Scroll LINES down dialogue buffer from command buffer."
+  (interactive "P")
+  (let ((other-window-scroll-buffer
+        (if liece-channel-buffer-mode
+            liece-channel-buffer
+          liece-dialogue-buffer)))
+    (when (liece-get-buffer-window other-window-scroll-buffer)
+      (condition-case nil
+         (scroll-other-window-down lines)
+       (beginning-of-buffer
+        (message "Beginning of buffer"))))))
+
+(defun liece-command-scroll-up (lines)
+  "Scroll LINES up dialogue buffer from command buffer."
+  (interactive "P")
+  (let* ((other-window-scroll-buffer
+         (if liece-channel-buffer-mode
+             liece-channel-buffer
+           liece-dialogue-buffer)))
+    (when (liece-get-buffer-window other-window-scroll-buffer)
+      (condition-case nil
+         (scroll-other-window lines)
+       (end-of-buffer
+        (message "End of buffer"))))))
+
+(defun liece-command-nick-scroll-down (lines)
+  "Scroll LINES down nick buffer from command buffer."
+  (interactive "P")
+  (let ((other-window-scroll-buffer liece-nick-buffer))
+    (when (liece-get-buffer-window other-window-scroll-buffer)
+      (condition-case nil
+         (scroll-other-window-down lines)
+       (beginning-of-buffer
+        (message "Beginning of buffer"))))))
+
+(defun liece-command-nick-scroll-up (lines)
+  "Scroll LINES up nick buffer from command buffer."
+  (interactive "P")
+  (let* ((other-window-scroll-buffer liece-nick-buffer))
+    (when (liece-get-buffer-window other-window-scroll-buffer)
+      (condition-case nil
+         (scroll-other-window lines)
+       (end-of-buffer
+        (message "End of buffer"))))))
+
+(defun liece-command-toggle-crypt (&optional arg)
+  "Toggle crypt status.
+If prefix argument ARG is non-nil, force set crypt status."
+  (interactive "P")
+  (if arg
+      (setq liece-crypt-mode-active (prefix-numeric-value arg))
+    (if liece-crypt-mode-active
+       (setq liece-crypt-mode-active nil)
+      (setq liece-crypt-mode-active t)))
+  (liece-set-crypt-indicator)
+  (switch-to-buffer (current-buffer)))
+
+(defun liece-command-freeze (&optional arg)
+  "Prevent automatic scrolling of the dialogue window.
+If prefix argument ARG is non-nil, toggle frozen status."
+  (interactive "P")
+  (liece-freeze (if liece-channel-buffer-mode
+                   liece-channel-buffer
+                 liece-dialogue-buffer)
+               (if arg (prefix-numeric-value arg))))
+
+(defun liece-command-own-freeze (&optional arg)
+  "Prevent automatic scrolling of the dialogue window.
+The difference from `liece-command-freeze' is that your messages are hidden.
+If prefix argument ARG is non-nil, toggle frozen status."
+  (interactive "P")
+  (liece-own-freeze (if liece-channel-buffer-mode
+                       liece-channel-buffer
+                     liece-dialogue-buffer)
+                   (if arg (prefix-numeric-value arg))))
+
+(defun liece-command-quit (&optional arg)
+  "Quit IRC.
+If prefix argument ARG is non-nil, leave signoff message."
+  (interactive "P")
+  (when (and (liece-server-opened)
+            (y-or-n-p (_ "Quit IRC? ")))
+    (message "")
+    (let ((quit-string
+          (if arg (read-string (_ "Signoff message: "))
+            (or liece-signoff-message
+                (product-name (product-find 'liece-version))))))
+      (liece-send "QUIT :%s" quit-string))
+    (liece-clear-system)
+    (liece-close-server)
+    (if liece-save-variables-are-dirty
+       (liece-command-save-vars))
+    (if (interactive-p)
+       (liece-window-configuration-pop))
+    (run-hooks 'liece-exit-hook)))
+
+(defun liece-command-generic (message)
+  "Enter a generic IRC MESSAGE, which is sent to the server.
+A ? lists the useful generic messages."
+  (interactive "sIRC command (? to help): ")
+  (if (string-equal message "?")
+      (with-output-to-temp-buffer "*IRC Help*"
+       (princ "The following generic IRC messages may be of interest to you:
+TOPIC <new topic>              set the topic of your channel
+INVITE <nickname>              invite another user to join your channel
+LINKS                          lists the currently reachable IRC servers
+SUMMON <user@host>             invites an user not currently in IRC
+USERS <host>                   lists the users on a host
+AWAY <reason>                  marks you as not really actively using IRC
+                               (an empty reason clears it)
+WALL <message>                 send to everyone on IRC
+NAMES <channel>                        lists users per channel
+"))
+    (liece-send "%s" message)))
+
+(defun liece-command-irc-compatible ()
+  "If entered at column 0, allow you to enter a generic IRC message."
+  (interactive)
+  (if (zerop (current-column))
+      (call-interactively (function liece-command-generic))
+    (self-insert-command 1)))
+
+(defun liece-command-exec (command)
+  "Execute COMMAND, stdout to dialogue."
+  (interactive "sShell command: ")
+  (shell-command command t)
+  (let ((opoint (point)))
+    (while (< (point) (mark))
+      (liece-command-enter-message)
+      (set-buffer liece-command-buffer))
+    (push-mark opoint t)))
+
+(defun liece-command-yank-send (&optional arg)
+  "Send message from yank buffer.
+Prefix argument ARG is regarded as distance from yank pointer."
+  (interactive)
+  (when (y-or-n-p (_ "Really SEND from Yank Buffer?"))
+    (save-restriction
+      (narrow-to-region (point) (point))
+      (insert (car kill-ring-yank-pointer))
+      (goto-char (point-min))
+      (while (eobp)
+       (liece-command-enter-message)
+       (set-buffer liece-command-buffer)))))
+
+(defun liece-command-complete ()
+  "Complete word before point from userlist."
+  (interactive)
+  (let ((completion-ignore-case t)
+       (alist (if liece-current-channel
+                  (list-to-alist (liece-channel-get-nicks))
+                liece-nick-alist))
+       candidate completion all)
+    (setq candidate (current-word)
+         completion (try-completion candidate alist)
+         all (all-completions candidate alist))
+    (liece-minibuffer-finalize-completion completion candidate all)))
+
+(defun liece-command-load-vars ()
+  "Load configuration from liece-variables-file."
+  (interactive)
+  (let ((nick liece-real-nickname))
+    (unwind-protect
+       (liece-read-variables-files)
+      (setq liece-real-nickname nick)
+      (liece-command-reconfigure-windows))))
+
+(defun liece-command-save-vars ()
+  "Save current settings to `liece-variables-file'."
+  (interactive)
+  (let* ((output-buffer
+         (find-file-noselect
+          (expand-file-name liece-variables-file)))
+        output-marker p)
+    (save-excursion
+      (set-buffer output-buffer)
+      (goto-char (point-min))
+      (cond ((re-search-forward "^;; Saved Settings *\n" nil 'move)
+            (setq p (match-beginning 0))
+            (goto-char p)
+            (or (re-search-forward
+                 "^;; End of Saved Settings *\\(\n\\|\\'\\)" nil t)
+                (error
+                 (concat "can't find END of saved state in "
+                         liece-variables-file)))
+            (delete-region p (match-end 0)))
+           (t
+            (goto-char (point-max))
+            (insert "\n")))
+      (setq output-marker (point-marker))
+      (let ((print-readably t)
+           (print-escape-newlines t)
+           (standard-output output-marker))
+       (princ ";; Saved Settings\n")
+       (dolist (var liece-saved-forms)
+         (if (symbolp var)
+             (prin1 (list 'setq var
+                          (let ((val (symbol-value var)))
+                            (if (memq val '(t nil))
+                                val
+                              (list 'quote val)))))
+           (setq var (eval var))
+           (cond ((eq (car-safe var) 'progn)
+                  (while (setq var (cdr var))
+                    (prin1 (car var))
+                    (princ "\n")
+                    (if (cdr var) (princ "  "))))
+                 (var
+                  (prin1 "xx")(prin1 var))))
+         (if var (princ "\n")))
+       (princ "\n")
+       (princ ";; End of Saved Settings\n")))
+    (set-marker output-marker nil)
+    (save-excursion
+      (set-buffer output-buffer)
+      (save-buffer)))
+  (setq liece-save-variables-are-dirty nil))
+
+(defun liece-command-reconfigure-windows ()
+  "Rearrange window splitting."
+  (interactive)
+  (let ((command-window (liece-get-buffer-window liece-command-buffer))
+       (dialogue-window (liece-get-buffer-window liece-dialogue-buffer))
+       (obuffer (current-buffer)))
+    (if (and command-window dialogue-window)
+       (let ((ch (window-height command-window))
+             (dh (window-height dialogue-window)))
+         (delete-window command-window)
+         (pop-to-buffer liece-dialogue-buffer)
+         (enlarge-window (+ ch dh (- dh))))
+      (pop-to-buffer liece-dialogue-buffer))
+    (liece-configure-windows)
+    (if liece-one-buffer-mode
+       (pop-to-buffer liece-dialogue-buffer)
+      (pop-to-buffer obuffer))))
+
+(defun liece-command-end-of-buffer ()
+  "Get end of the dialogue buffer."
+  (interactive)
+  (let (buffer window)
+    (setq buffer (if liece-channel-buffer-mode
+                    liece-channel-buffer
+                  liece-dialogue-buffer))
+    (or (setq window (liece-get-buffer-window buffer))
+       (setq window (liece-get-buffer-window liece-dialogue-buffer)
+             buffer liece-dialogue-buffer))
+    (when window
+      (save-selected-window
+       (select-window window)
+       (goto-char (point-max))))))
+
+(defun liece-command-private-conversation (arg)
+  "Toggle between private conversation mode and channel mode.
+User can then join and part to a private conversation as he would
+join or part to a channel.
+
+If there are no private conversations or argument is given user is
+prompted the partner/channel (return as partner/channel means toggle
+mode, the current channel and current chat partner are not altered)
+Argument ARG is prefix argument of toggle status."
+  (interactive
+   (let ((completion-ignore-case t))
+     (list
+      (if current-prefix-arg
+         ;; prefixed, ask where to continue
+         (if (eq liece-command-buffer-mode 'chat)
+             (liece-minibuffer-completing-default-read
+              (_ "Return to channel: ")
+              (append liece-channel-alist liece-nick-alist)
+              nil nil liece-current-channel)
+           (completing-read
+            (_ "Start private conversation with: ")
+            liece-nick-alist nil nil))
+       ;; no prefix, see if going to chat
+       (if (eq liece-command-buffer-mode 'channel)
+           ;; and if we have chat partner, select that
+           (if liece-current-chat-partner
+               liece-current-chat-partner
+             (completing-read
+              (_ "Start private conversation with: ")
+              liece-nick-alist )))))))
+  
+  (liece-toggle-command-buffer-mode)
+  (if (and arg (not (string-equal arg "")))
+      (liece-command-join arg))
+  (liece-set-channel-indicator)
+  (liece-set-crypt-indicator)
+  ;; refresh mode line
+  (force-mode-line-update))
+
+(defun liece-command-next-channel ()
+  "Select next channel or chat partner, and *DONT* rotate list."
+  (interactive)
+  (let ((rest (copy-sequence
+              (if (eq liece-command-buffer-mode 'chat)
+                  liece-current-chat-partners
+                liece-current-channels)))
+       (chnl (if (eq liece-command-buffer-mode 'chat)
+                 liece-current-chat-partner
+               liece-current-channel)))
+    (liece-switch-to-channel
+     (or (cadr (liece-channel-member chnl (delq nil rest)))
+        (car (delq nil rest))
+        chnl))))
+
+(defun liece-command-previous-channel ()
+  "Select previous channel or chat partner, and *DONT* rotate list."
+  (interactive)
+  (let ((rest
+        (reverse
+         (if (eq liece-command-buffer-mode 'chat)
+             liece-current-chat-partners
+           liece-current-channels)))
+       (chnl
+        (if (eq liece-command-buffer-mode 'chat)
+            liece-current-chat-partner
+          liece-current-channel)))
+    (liece-switch-to-channel
+     (or (cadr (liece-channel-member chnl (delq nil rest)))
+        (car (delq nil rest))
+        chnl))))
+      
+(defun liece-command-push ()
+  "Select next channel or chat partner, and rotate list."
+  (interactive)
+  (let* ((rest
+         (if (eq liece-command-buffer-mode 'chat)
+             liece-current-chat-partners
+           liece-current-channels))
+        (temp (car (last rest)))
+        (len (length rest)))
+    (unwind-protect
+       (while (< 1 len)
+         (setcar (nthcdr (1- len) rest) (nth (- len 2) rest))
+         (decf len))
+      (when rest
+       (setcar rest temp)))
+    (liece-channel-change)))
+
+(defun liece-command-pop ()
+  "Select previous channel or chat partner, and rotate list."
+  (interactive)
+  (let* ((rest
+         (if (eq liece-command-buffer-mode 'chat)
+             liece-current-chat-partners
+           liece-current-channels))
+        (temp (car rest))
+        (len (length rest)))
+    (unwind-protect
+       (dotimes (i len)
+         (setcar (nthcdr i rest) (nth (1+ i) rest)))
+      (when rest
+       (setcar (last rest) temp)))
+    (liece-channel-change)))
+
+(defvar liece-redisplay-buffer-functions
+  '(liece-channel-redisplay-buffer
+    liece-nick-redisplay-buffer
+    liece-channel-list-redisplay-buffer))
+
+(defun liece-switch-to-channel (chnl)
+  "Switch the current channel to CHNL."
+  (if (liece-channel-p (liece-channel-real chnl))
+      (progn
+       (liece-toggle-command-buffer-mode 'channel)
+       (setq liece-current-channel chnl)
+       (liece-set-channel-indicator))
+    (liece-toggle-command-buffer-mode 'chat)
+    (setq liece-current-chat-partner chnl)
+    (liece-set-channel-indicator))
+  (save-excursion
+    (run-hook-with-args 'liece-redisplay-buffer-functions chnl))
+  (liece-set-crypt-indicator)
+  t)
+
+(defun liece-switch-to-channel-no (num)
+  "Switch the current channel to NUM."
+  (let* ((mode liece-command-buffer-mode)
+        (chnls (if (eq mode 'chat)
+                   liece-current-chat-partners
+                 liece-current-channels)))
+    (if (and (integerp num)
+            (stringp (nth num chnls)))
+       (let ((chnl (nth num chnls)))
+         (if (eq mode 'chat)
+             (progn
+               (liece-toggle-command-buffer-mode 'chat)
+               (setq liece-current-chat-partner chnl)
+               (liece-set-channel-indicator))
+           (liece-toggle-command-buffer-mode 'channel)
+           (setq liece-current-channel chnl)
+           (liece-set-channel-indicator))
+         (save-excursion
+           (run-hook-with-args 'liece-redisplay-buffer-functions chnl))
+         (liece-set-crypt-indicator)
+         t)
+      (message "Invalid channel!")
+      nil)))
+
+(defun liece-command-ping ()
+  "Send PING to server."
+  (interactive)
+  (if (stringp liece-server-name)
+      (liece-send "PING %s" liece-server-name)))
+
+(defun liece-command-ison (nicks)
+  "IsON users NICKS."
+  (interactive
+   (let (nicks (completion-ignore-case t))
+     (setq nicks (liece-minibuffer-completing-sequential-read
+                 "IsON" 0 liece-nick-alist))
+     (list nicks)))
+  (liece-send "ISON :%s" (mapconcat #'identity nicks " ")))
+
+(defun liece-command-activate-friends (nicks)
+  "Register NICKS to the frinends list."
+  (interactive
+   (let (nicks (completion-ignore-case t))
+     (setq nicks
+          (liece-minibuffer-completing-sequential-read
+           (_ "Friend") 0
+           (filter-elements nick liece-nick-alist
+             (not (string-list-member-ignore-case
+                   (car nick) liece-friends)))))
+     (list nicks)))
+  (setq liece-friends (append nicks liece-friends)))
+
+(defun liece-command-deactivate-friends ()
+  "Clear current friends list."
+  (interactive)
+  (setq liece-friends nil))
+
+(defun liece-command-display-friends ()
+  "Display status of the friends."
+  (interactive)
+  (with-output-to-temp-buffer " *IRC Friends*"
+    (set-buffer standard-output)
+    (insert "Friends status: \n\n")
+    (dolist (friend liece-friends)
+      (if (string-list-member-ignore-case friend liece-friends-last)
+         (insert "+ " friend "\n")
+       (insert "- " friend "\n")))))
+
+(defun liece-command-userhost (nicks)
+  "Ask for the hostnames of NICKS."
+  (interactive
+   (let (nicks (completion-ignore-case t))
+     (setq nicks (liece-minibuffer-completing-sequential-read
+                 (_ "Userhost nick") 0
+                 (list-to-alist liece-nick-alist)))
+     (list nicks)))
+  (liece-send "USERHOST :%s" (mapconcat 'identity nicks ",")))
+
+(defun liece-command-show-last-kill ()
+  "Dig last kill from KILL and show it."
+  (interactive)
+  (liece-insert-info
+   (append liece-D-buffer liece-O-buffer)
+   (save-excursion
+     (set-buffer liece-KILLS-buffer)
+     (goto-char (point-max))
+     (forward-line -1)
+     (concat (buffer-substring (point) (point-max)) "\n"))))
+
+(defun liece-command-toggle-private ()
+  "Toggle private mode / channel mode."
+  (interactive)
+  (case (prog1 liece-command-buffer-mode
+         (liece-toggle-command-buffer-mode))
+    (chat
+     (if liece-current-channel
+        (liece-switch-to-channel liece-current-channel))
+     (setq liece-command-buffer-mode-indicator "Channels"))
+    (channel
+     (if liece-current-chat-partner
+        (liece-switch-to-channel liece-current-chat-partner))
+     (setq liece-command-buffer-mode-indicator "Partners")))
+  (liece-channel-change))
+
+(defun liece-command-tag-region (start end)
+  "Move current region between START and END to `kill-ring'."
+  (interactive
+   (if (region-active-p)
+       (list (region-beginning)(region-end))
+     (list (line-beginning-position)(line-end-position))))
+  (static-if (fboundp 'extent-property)
+      (kill-ring-save start end)
+    (let ((start (set-marker (make-marker) start))
+         (end (set-marker (make-marker) end))
+         (inhibit-read-only t)
+         buffer-read-only
+         buffer-undo-list)
+      (liece-remove-properties-region start end)
+      (kill-ring-save start end)
+      (push nil buffer-undo-list)
+      (undo))))
+
+(provide 'liece-commands)
+
+;;; liece-commands.el ends here
diff --git a/lisp/liece-compat.el b/lisp/liece-compat.el
new file mode 100644 (file)
index 0000000..96afb99
--- /dev/null
@@ -0,0 +1,163 @@
+;;; liece-compat.el --- Provide compatibility for various emacsen.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1999-12-19
+;; Keywords: IRC, liece, APEL
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile (require 'cl))
+
+(require 'pcustom)
+
+(eval-when-compile (require 'wid-edit))
+
+(eval-and-compile (autoload 'widget-convert-button "wid-edit"))
+
+(defalias 'liece-widget-convert-button 'widget-convert-button)
+(defalias 'liece-widget-button-click 'widget-button-click)
+
+(defun-maybe region-active-p ()
+  "Return non-nil if the region is active.
+If `zmacs-regions' is true, this is equivalent to `region-exists-p'.
+Otherwise, this function always returns false.
+\[XEmacs emulating function]"
+  (static-if (and (boundp 'transient-mark-mode) (boundp 'mark-active))
+      (and transient-mark-mode mark-active)))
+
+(defun liece-map-overlays (function)
+  "Map FUNCTION over the extents which overlap the current buffer."
+  (let* ((overlayss (overlay-lists))
+        (buffer-read-only nil)
+        (overlays (delq nil (nconc (car overlayss) (cdr overlayss)))))
+    (dolist (overlay overlays)
+      (funcall function overlay))))
+
+(defun liece-kill-all-overlays ()
+  "Delete all overlays in the current buffer."
+  (liece-map-overlays #'delete-overlay))
+
+(defmacro liece-get-buffer-window (buffer)
+  "Traverse all frames and return a window currently displaying BUFFER."
+  `(get-buffer-window ,buffer t))
+
+(static-if (fboundp 'window-displayed-height)
+    (defalias 'liece-window-height 'window-displayed-height)
+  (defalias 'liece-window-height 'window-height))
+
+(defalias 'liece-mode-line-buffer-identification 'identity)
+
+(defun liece-suppress-mode-line-format ()
+  "Remove unnecessary information from `mode-line-format'."
+  (let ((value (rassq 'mode-line-modified mode-line-format)))
+    (if value
+       (setq mode-line-format (delq value (copy-sequence mode-line-format)))
+      mode-line-format)))
+
+(defun liece-locate-data-directory (name &optional dir-list)
+  "Locate a directory in a search path DIR-LIST (a list of directories)."
+  (let ((dir-list
+        (or dir-list
+            (cons data-directory
+                  (mapcar (lambda (path) (concat path "etc/"))
+                          load-path))))
+       dir)
+    (while dir-list
+      (if (and (car dir-list)
+              (file-directory-p
+               (setq dir (concat
+                          (file-name-directory
+                           (directory-file-name (car dir-list)))
+                          name "/"))))
+         (setq dir-list nil)
+       (setq dir-list (cdr dir-list))))
+    dir))
+
+(defvar-maybe completion-display-completion-list-function
+  'display-completion-list)
+  
+(defalias-maybe 'easy-menu-add-item 'ignore)
+  
+;; from XEmacs's minibuf.el
+(defun-maybe temp-minibuffer-message (m)
+  (let ((savemax (point-max)))
+    (save-excursion
+      (goto-char (point-max))
+      (message nil)
+      (insert m))
+    (let ((inhibit-quit t))
+      (sit-for 2)
+      (delete-region savemax (point-max)))))
+
+;; from XEmacs's subr.el
+(defun-maybe replace-in-string (str regexp newtext &optional literal)
+  "Replace all matches in STR for REGEXP with NEWTEXT string,
+ and returns the new string.
+Optional LITERAL non-nil means do a literal replacement.
+Otherwise treat \\ in NEWTEXT string as special:
+  \\& means substitute original matched text,
+  \\N means substitute match for \(...\) number N,
+  \\\\ means insert one \\."
+  (let ((rtn-str "")
+       (start 0)
+       (special)
+       match prev-start)
+    (while (setq match (string-match regexp str start))
+      (setq prev-start start
+           start (match-end 0)
+           rtn-str
+           (concat
+            rtn-str
+            (substring str prev-start match)
+            (cond (literal newtext)
+                  (t (mapconcat
+                      (lambda (c)
+                        (if special
+                            (progn
+                              (setq special nil)
+                              (cond ((eq c ?\\) "\\")
+                                    ((eq c ?&)
+                                     (substring str
+                                                (match-beginning 0)
+                                                (match-end 0)))
+                                    ((and (>= c ?0) (<= c ?9))
+                                     (if (> c (+ ?0 (length
+                                                     (match-data))))
+                                         ;; Invalid match num
+                                         (error "Invalid match num: %c" c)
+                                       (setq c (- c ?0))
+                                       (substring str
+                                                  (match-beginning c)
+                                                  (match-end c))))
+                                    (t (char-to-string c))))
+                          (if (eq c ?\\) (progn (setq special t) nil)
+                            (char-to-string c))))
+                      newtext ""))))))
+    (concat rtn-str (substring str start))))
+  
+(provide 'liece-compat)
+
+;;; liece-compat.el ends here
diff --git a/lisp/liece-config.el b/lisp/liece-config.el
new file mode 100644 (file)
index 0000000..336a2e3
--- /dev/null
@@ -0,0 +1,95 @@
+;;; liece-config.el --- Installation settings.
+;; Copyright (C) 1999 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-04-12
+;; Revised: 1999-04-12
+;; Keywords: IRC, liece, APEL
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(setq load-path (cons (expand-file-name "../apel") load-path))
+
+(defvar default-load-path load-path)
+
+(and (expand-file-name "../../site-lisp/apel" data-directory)
+     (setq load-path (cons
+                     (expand-file-name "../../site-lisp/apel" data-directory)
+                     load-path )))
+
+(when (and (boundp 'LISPDIR) LISPDIR)
+  (or (member LISPDIR default-load-path)
+      (setq default-load-path (cons LISPDIR default-load-path)) )
+  (or (member LISPDIR load-path) (setq load-path (cons LISPDIR load-path)))
+  (or (member (expand-file-name "apel" LISPDIR) load-path)
+      (setq load-path (cons (expand-file-name "apel" LISPDIR) load-path))))
+
+(setq load-path (cons (expand-file-name ".") load-path))
+
+(defvar VERSION_SPECIFIC_LISPDIR nil)
+(if (and VERSION_SPECIFIC_LISPDIR
+        (null (member VERSION_SPECIFIC_LISPDIR load-path)) )
+    (setq load-path (cons VERSION_SPECIFIC_LISPDIR load-path)) )
+
+(require 'install)
+
+
+;;; @ Please specify prefix of install directory.
+;;;
+
+;; Please specify install path prefix.
+;; If it is omitted, shared directory (maybe /usr/local is used).
+(defvar PREFIX install-prefix)
+;;(setq PREFIX "~/")
+
+\f
+
+;;; @ optional settings
+;;;
+
+(defvar VERSION_SPECIFIC_LISPDIR
+  (install-detect-elisp-directory PREFIX nil 'version-specific))
+
+;; It is generated by automatically. Please set variable `PREFIX'.
+;; If you don't like default directory tree, please set it.
+(defvar LISPDIR (install-detect-elisp-directory PREFIX))
+;; (setq install-default-elisp-directory "~/lib/emacs/lisp")
+
+(defvar PACKAGEDIR
+  (if (boundp 'early-packages)
+      (let ((dirs (append (if early-package-load-path
+                             early-packages)
+                         (if late-package-load-path
+                             late-packages)
+                         (if last-package-load-path
+                             last-packages)))
+           dir)
+       (while (not (file-exists-p (setq dir (car dirs))))
+         (setq dirs (cdr dirs)) )
+       dir )))
+
+(defconst liece-config-info-file-regexp
+  (concat "^liece-faq\\.info\\(-[0-9]+\\)?$"))
+
+;;; liece-config.el ends here
diff --git a/lisp/liece-crypt.el b/lisp/liece-crypt.el
new file mode 100644 (file)
index 0000000..438e95e
--- /dev/null
@@ -0,0 +1,428 @@
+;;; liece-crypt.el --- Encryption/Decryption facility for conversation.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1999-02-07
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile
+  (require 'liece-inlines)
+  (require 'liece-misc))
+
+(autoload 'crc32-string "crc32")
+
+(defgroup liece-crypt nil
+  "Crypt customization group"
+  :tag "Crypt"
+  :prefix "liece-"
+  :group 'liece)
+
+(defcustom liece-crypt-decryption-keys nil
+  "String list containing decryption keys.  e.g. '(\"foo\" \"bar\")."
+  :type '(repeat (string :tag "Key"))
+  :group 'liece-crypt)
+
+(defcustom liece-crypt-encryption-keys nil
+  "List containing pairs of addresses and associated default keys."
+  :type '(repeat (cons (string :tag "Channel")
+                      (string :tag "key")))
+  :group 'liece-crypt)
+  
+(defcustom liece-crypt-timestamp-tolerance 300
+  "Allow incoming messages to have N seconds old timestamp."
+  :type 'integer
+  :group 'liece-crypt)
+
+(defcustom liece-crypt-default-cipher-algorithm 'idea
+  "Cipher algorithm."
+  :group 'liece-crypt)
+
+(defcustom liece-crypt-default-hash-function
+  (function liece-crypt-hash-crc32-string)
+  "Cipher algorithm."
+  :type 'function
+  :group 'liece-crypt)
+
+(defconst liece-crypt-encrypt-message-format "|*E*|%s|%s|%s|%s|")
+
+(defvar liece-crypt-mode-active nil
+  "If t, liece encrypts all messages it has a default key for.")
+
+(defun liece-crypt-encrypted-message-p (message)
+  (string-match "^|\\*E\\*|[^|]*|[0-9][0-9]*\\.[0-9][0-9]*|[^|]*|[^|]*|$"
+               message))
+
+(defun liece-crypt-hash-crc32-string (string)
+  (let ((r (make-string 9 0)) (s (make-string 9 0)))
+    (aset r 8 0)
+    (aset r 7 (logand (nth 0 string) 255))
+    (aset r 6 (logand (lsh (nth 0 string) -8) 255))
+    (aset r 5 (logand (nth 1 string) 255))
+    (aset r 4 (logand (lsh (nth 1 string) -8) 255))
+    (aset r 3 (logand (nth 2 string) 255))
+    (aset r 2 (logand (lsh (nth 2 string) -8) 255))
+    (aset r 1 (logand (nth 3 string) 255))
+    (aset r 0 (logand (lsh (nth 3 string) -8) 255))
+    (aset s 8 255)
+    (aset s 7 (logand (nth 4 string) 255))
+    (aset s 6 (logand (lsh (nth 4 string) -8) 255))
+    (aset s 5 (logand (nth 5 string) 255))
+    (aset s 4 (logand (lsh (nth 5 string) -8) 255))
+    (aset s 3 (logand (nth 6 string) 255))
+    (aset s 2 (logand (lsh (nth 6 string) -8) 255))
+    (aset s 1 (logand (nth 7 string) 255))
+    (aset s 0 (logand (lsh (nth 7 string) -8) 255))
+    (setq s (concat (crc32-string (concat r s)) s))
+    (setq r (concat (crc32-string (concat s r)) r))
+    (substring (crc32-string r) 0 6)
+    (substring (crc32-string s) 0 6)))
+  
+(defun liece-crypt-key-fingerprint (key &optional algorithm)
+  (let* ((algorithm (or algorithm liece-crypt-default-cipher-algorithm))
+        (func (intern (concat (symbol-name algorithm)
+                              "-key-fingerprint"))))
+    (if (fboundp func)
+       (funcall (symbol-function func) key)
+      (funcall liece-crypt-default-hash-function key))))
+
+(defun liece-crypt-algorithm-major-version (&optional algorithm)
+  (let ((algorithm (or algorithm liece-crypt-default-cipher-algorithm))
+       (major (intern (concat (symbol-name algorithm) "-major-version"))))
+    (if (boundp major)
+       (symbol-value major))))
+
+(defun liece-crypt-algorithm-minor-version (&optional algorithm)
+  (let ((algorithm (or algorithm liece-crypt-default-cipher-algorithm))
+       (minor (intern (concat (symbol-name algorithm) "-minor-version"))))
+    (if (boundp minor)
+       (symbol-value minor))))
+
+(defun liece-crypt-build-decryption-key (key &optional algorithm)
+  (let* ((algorithm (or algorithm liece-crypt-default-cipher-algorithm))
+        (func (symbol-function
+               (intern (concat (symbol-name algorithm)
+                               "-build-decryption-key")))))
+    (funcall func key)))
+
+(defun liece-crypt-build-encryption-key (key &optional algorithm)
+  (let* ((algorithm (or algorithm liece-crypt-default-cipher-algorithm))
+        (func (symbol-function
+               (intern (concat (symbol-name algorithm)
+                               "-build-encryption-key")))))
+    (funcall func key)))
+
+(defun liece-crypt-decrypt-string (string key &optional algorithm mode)
+  (let* ((algorithm (or algorithm liece-crypt-default-cipher-algorithm))
+        (mode (or mode "cbc"))
+        (func (intern (format "%s-%s-decrypt-string"
+                              (symbol-name algorithm)
+                              mode))))
+    (if (fboundp func)
+       (funcall (symbol-function func) string key)
+      (error (_ "Mode `%s' is not available.") (upcase mode)))))
+
+(defun liece-crypt-encrypt-string (string key &optional algorithm mode)
+  (let* ((algorithm (or algorithm liece-crypt-default-cipher-algorithm))
+        (mode (or mode "cbc"))
+        (func (intern (format "%s-%s-encrypt-string"
+                              (symbol-name algorithm)
+                              mode))))
+    (if (fboundp func)
+       (funcall (symbol-function func) string key)
+      (error (_ "Mode `%s' is not available.") (upcase mode)))))
+
+(defun liece-crypt-valid-version-p (algorithm major-version minor-version)
+  (let (major minor)
+    (setq major (liece-crypt-algorithm-major-version algorithm)
+         minor (liece-crypt-algorithm-minor-version algorithm))
+    (cond
+     ((and major minor)
+      (and (= (symbol-value major) major-version)
+          (>= (symbol-value minor) minor-version)))
+     (t nil))))
+
+(defun liece-crypt-import-cipher-algorithm (algorithm &optional no-error)
+  (let ((algorithm (symbol-name algorithm)))
+    (or (eval `(featurep ',(intern algorithm)))
+       (load algorithm t)
+       (unless no-error
+         (error (_ "Unknown algorithm `%s'") (upcase algorithm))))))
+
+(defun liece-crypt-initialize ()
+  "Initialize crypt variables."
+  (let ((keys (copy-sequence liece-crypt-decryption-keys)))
+    (setq liece-crypt-decryption-keys nil)
+    (dolist (key keys)
+      (liece-command-add-decryption-key key)))
+  (let ((keys (copy-sequence liece-crypt-encryption-keys)))
+    (setq liece-crypt-encryption-keys nil)
+    (dolist (key keys)
+      (liece-command-set-encryption-key (car key) (cdr key))))
+  (liece-crypt-reset-variables))
+
+(defmacro liece-crypt-reset-variables ()
+  '(setq liece-message-encrypted-p nil
+        liece-message-suspicious-p nil
+        liece-message-garbled-p nil
+        liece-message-fingerprint nil
+        liece-message-timestamp nil))
+
+\f
+;;;###liece-autoload
+(defun liece-set-crypt-indicator ()
+  "Set crypt mode indicator."
+  (setq liece-crypt-indicator
+       (cond ((and liece-crypt-mode-active
+                   (eq liece-command-buffer-mode 'channel)
+                   liece-current-channel
+                   liece-crypt-encryption-keys
+                   (string-assoc-ignore-case liece-current-channel
+                                             liece-crypt-encryption-keys))
+              "C")
+             ((and liece-crypt-mode-active
+                   (eq liece-command-buffer-mode 'chat)
+                   liece-current-chat-partner
+                   liece-crypt-encryption-keys
+                   (string-assoc-ignore-case liece-current-chat-partner
+                                             liece-crypt-encryption-keys))
+              "C")
+             (liece-crypt-mode-active "c")
+             (t "-"))))
+
+;;;###liece-autoload
+(defun liece-command-add-decryption-key (key-var &optional algorithm)
+  "Add new KEY to known decryption keys list."
+  (interactive
+   (let ((passwd-echo ?*))
+     (list (read-passwd "Add passphrase: "))))
+  (let ((algorithm (or algorithm liece-crypt-default-cipher-algorithm))
+       key fingerprint)
+    (liece-crypt-import-cipher-algorithm algorithm)
+    (setq key (if (stringp key-var)
+                 (liece-crypt-build-decryption-key key-var)
+               key-var)
+         fingerprint (liece-crypt-key-fingerprint key))
+    (set-alist 'liece-crypt-decryption-keys fingerprint key)
+    (when (interactive-p)
+      (liece-message (_ "Added new decryption key (%s).") fingerprint))))
+
+;;;###liece-autoload
+(defun liece-command-delete-decryption-key (key-var &optional algorithm)
+  "Delete a KEY from known decryption keys list."
+  (interactive
+   (let ((passwd-echo ?*))
+     (list (read-passwd (_ "Delete passphrase: ")))))
+  (let ((algorithm (or algorithm liece-crypt-default-cipher-algorithm))
+       fingerprint)
+    (liece-crypt-import-cipher-algorithm algorithm)
+    (setq fingerprint (liece-crypt-key-fingerprint key-var))
+    (remove-alist 'liece-crypt-decryption-keys fingerprint)
+      (when (interactive-p)
+       (liece-message (_ "Removed decryption key (%s).") fingerprint))))
+
+;;;###liece-autoload
+(defun liece-command-set-encryption-key
+  (addr-var pass-var &optional algorithm)
+  "Set a default key for ADDRESS (channel/nick) to be KEY."
+  (interactive
+   (let ((addr-var
+         (liece-minibuffer-completing-default-read
+          (_ "Default key for channel/user: ")
+          (append liece-nick-alist liece-channel-alist)
+          nil nil liece-privmsg-partner))
+        pass-var)
+     (let ((passwd-echo ?*))
+       (setq pass-var (read-passwd (_ "Passphrase: "))))
+     (when (string-equal pass-var "")
+       (setq pass-var nil))
+     (list addr-var pass-var)))
+  (let ((algorithm (or algorithm liece-crypt-default-cipher-algorithm))
+       (addr-var (upcase addr-var)) ek dk fingerprint)
+    (liece-crypt-import-cipher-algorithm algorithm)
+    (cond
+     ((null pass-var)
+      (remove-alist 'liece-crypt-encryption-keys addr-var)
+      (liece-message (_ "Removed a default key from \"%s\".")
+                     addr-var))
+     (t
+      (setq ek (liece-crypt-build-encryption-key pass-var)
+           dk (liece-crypt-build-decryption-key pass-var)
+           fingerprint (liece-crypt-key-fingerprint dk))
+      (liece-command-add-decryption-key dk)
+      (set-alist 'liece-crypt-encryption-keys
+                addr-var (list fingerprint ek dk))
+      (when (interactive-p)
+       (liece-message (_ "Added a default key for \"%s\".") addr-var))
+      (liece-set-crypt-indicator)))))
+
+(defun liece-make-encrypted-message (message key &optional algorithm)
+  "Build an encrypted message from MESSAGE with KEY."
+  (let ((algorithm (or algorithm liece-crypt-default-cipher-algorithm)))
+    (format liece-crypt-encrypt-message-format
+           (upcase (symbol-name algorithm))
+           (let ((major (liece-crypt-algorithm-major-version algorithm))
+                 (minor (liece-crypt-algorithm-minor-version algorithm)))
+             (cond
+              ((and major minor)
+               (format "%d.%d" major minor))
+              (t "1.0")))
+           (liece-crypt-key-fingerprint key)
+           (liece-crypt-encrypt-string message key algorithm))))
+
+(defun liece-encrypt-message (message address &optional no-clear-text)
+  "Encrypt MESSAGE to ADDRESS.  NO-CLEAR-TEXT prohibits cleartext output."
+  (let ((key
+        (caddr
+         (assoc-if
+          `(lambda (item)
+             (string-match (concat "^" (upcase item) "$") (upcase ,address)))
+          liece-crypt-encryption-keys)))
+       (message (liece-coding-encode-charset-string message)))
+    (cond
+     ((and no-clear-text (null key))
+      (error (_ "No default key associated with \"%s\".") address))
+     ((null key) message)
+     (t
+      (liece-make-encrypted-message
+       (format "%s\001%s\001%s"
+              (liece-current-nickname)
+              (liece-generate-hex-timestamp)
+              message)
+       key)))))
+
+(defmacro liece-crypt-decrypt-fail (&optional value)
+  `(throw 'failed ,value))
+
+(defun liece-decrypt-message (message)
+  "Decrypt MESSAGE."
+  (if (string-match "^|\\*E\\*|\\([^|]*\\)|\\([0-9][0-9]*\\)\\.\\([0-9][0-9]*\\)|\\([^|]*\\)|\\([^|]*\\)|$" message)
+      (let ((algorithm (intern (downcase (substring message
+                                                   (match-beginning 1)
+                                                   (match-end 1)))))
+           (version-major (string-to-number (match-string 2 message)))
+           (version-minor (string-to-number (match-string 3 message)))
+           (fingerprint (match-string 4 message))
+           (msg (match-string 5 message))
+           key r)
+       (catch 'failed
+         (or (liece-crypt-import-cipher-algorithm algorithm 'no-error)
+             (liece-crypt-decrypt-fail
+              (list 'error nil nil (_ "Unknown algorithm")
+                    fingerprint)))
+         (or (liece-crypt-valid-version-p
+              algorithm version-major version-minor)
+             (liece-crypt-decrypt-fail
+              (list 'error nil nil (_ "Unknown version")
+                    fingerprint)))
+         (or (setq key (cdr (assoc fingerprint liece-crypt-decryption-keys)))
+             (liece-crypt-decrypt-fail
+              (list 'error nil nil (_ "No key")
+                    fingerprint)))
+         (or (setq r (liece-crypt-decrypt-string msg key))
+             (liece-crypt-decrypt-fail
+              (list 'error nil nil (_ "Decryption failed")
+                    fingerprint)))
+         (or (string-match "^\\([^\001][^\001]*\\)\001\\([^\001][^\001]*\\)\001\\(.*\\)$" r)
+             (liece-crypt-decrypt-fail
+              (list 'error nil nil (_ "Invalid cleartext format")
+                    fingerprint)))
+         (list 'success
+               (match-string 1 r)
+               (match-string 2 r)
+               (liece-coding-decode-charset-string (match-string 3 r))
+               fingerprint)))
+    (list 'error nil nil (_ "Invalid message!") nil)))
+
+(defun liece-crypt-maybe-decrypt-message (message sender)
+  (let (head tail clear stat nick time msg fprint warn)
+    (when (string-match "^\\([^ ]+\\) :\\(.*\\)" message)
+      (setq head (match-string 1 message)
+           tail (match-string 2 message))
+      (when (liece-crypt-encrypted-message-p tail)
+       (setq clear (liece-decrypt-message tail)
+             stat (nth 0 clear)   ;; 'success or 'error
+             nick (nth 1 clear)   ;;  sender's nick
+             time (nth 2 clear)   ;;  timestamp
+             msg (nth 3 clear)   ;;  cleartext msg
+             fprint (nth 4 clear) ;;  fingerprint
+             warn ""
+             liece-message-encrypted-p t
+             liece-message-fingerprint fprint
+             liece-message-timestamp time)
+       ;; Check timestamp and nick here
+       (cond
+        ((equal 'success stat)
+         (setq liece-message-suspicious-p t)
+         (or (liece-hex-timestamp-valid
+              time liece-crypt-timestamp-tolerance)
+             (setq warn (concat warn " [Invalid timestamp!]")))
+         (or (liece-nick-equal nick sender)
+             (setq warn (format
+                         "%s [Invalid sender \"%s\" != \"%s\"]"
+                         warn nick sender))))
+        (t
+         (setq liece-message-garbled-p t)
+         (liece-insert liece-C-buffer
+                        (format "<%s -> %s> %s [%s]\n"
+                                sender head tail msg))))
+       (setq message (format "%s :%s%s" head msg warn))))
+    message))
+
+(defun liece-crypt-maybe-encrypt-message (message addr arg key)
+  "Encrypt MESSAGE when `liece-crypt-mode' is active."
+  (if (or (and arg addr) key)
+      (setq liece-message-encrypted-p t
+           message (liece-encrypt-message message addr t))
+    (setq liece-message-encrypted-p nil))
+  message)
+
+(defmacro with-liece-decryption (args &rest body)
+  `(let (liece-message-encrypted-p
+        liece-message-suspicious-p
+        liece-message-garbled-p
+        liece-message-fingerprint
+        liece-message-timestamp)
+     (setq ,(car args)
+          (funcall #'liece-crypt-maybe-decrypt-message ,@args))
+     ,@body))
+
+(defmacro with-liece-encryption (args &rest body)
+  `(let (liece-message-encrypted-p
+        liece-message-suspicious-p
+        liece-message-garbled-p
+        liece-message-fingerprint
+        liece-message-timestamp)
+     (setq ,(car args)
+          (funcall #'liece-crypt-maybe-encrypt-message ,@args))
+     ,@body))
+     
+(put 'with-liece-decryption 'lisp-indent-function 1)
+(put 'with-liece-encryption 'lisp-indent-function 1)
+       
+(provide 'liece-crypt)
+
+;;; liece-crypt.el ends here
diff --git a/lisp/liece-ctcp.el b/lisp/liece-ctcp.el
new file mode 100644 (file)
index 0000000..cdf9bfe
--- /dev/null
@@ -0,0 +1,610 @@
+;;; liece-ctcp.el --- CTCP handlers and commands.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece, CTCP
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile (require 'liece-inlines))
+
+(require 'liece-handler)
+
+(require 'pccl)
+
+(if-broken ccl-usable
+    (require 'liece-q-el)
+  (require 'liece-q-ccl))
+
+(require 'liece-x-face)
+
+(autoload 'liece-ctcp-dcc-message "liece-dcc")
+
+(eval-and-compile
+  (defconst liece-ctcp-supported-symbols
+    '(version userinfo clientinfo ping time x-face comment help)))
+
+(defun liece-ctcp-make-menu-command-wrapper (symbol)
+  (fset (intern (format "liece-menu-callback-ctcp-%s" symbol))
+       `#'(lambda ()
+          (interactive)
+          (dolist (nick liece-nick-region-nicks)
+            (funcall (symbol-function
+                      (intern (format "liece-command-ctcp-%s" ,symbol)))
+                     nick)))))
+
+(dolist (symbol liece-ctcp-supported-symbols)
+  (liece-ctcp-make-menu-command-wrapper symbol))
+            
+(defvar liece-ctcp-message
+  (eval-when-compile
+    (concat liece-client-prefix "%s(%s) = %s"))
+  "Message in which info of other clients is displayed.")
+
+(defvar liece-ctcp-buffer (append liece-D-buffer liece-O-buffer))
+
+(defvar liece-ctcp-ping-time '(0 0 0))
+
+(defvar liece-ctcp-last-command nil
+  "The last command executed.")
+
+(defvar liece-ctcp-last-nick nil
+  "The last nick being queried.")
+
+(defconst liece-ctcp-error-message "Unrecognized command: '%s'"
+  "Error message given to anyone asking wrong CLIENT data.")
+
+(defun liece-ctcp-last-nick-maybe-change (prefix rest)
+  (if (equal prefix liece-ctcp-last-nick)
+      (setq liece-ctcp-last-nick rest))
+  nil)
+
+(defun liece-ctcp-last-nick-maybe-reset (prefix rest)
+  (if (equal prefix liece-ctcp-last-nick)
+      (setq liece-ctcp-last-nick nil)))
+
+(add-hook 'liece-nick-hook 'liece-ctcp-last-nick-maybe-change t)
+(add-hook 'liece-quit-hook 'liece-ctcp-last-nick-maybe-reset)
+  
+(defcustom liece-ctcp-file-save-directory liece-directory
+  "Directory to save received files."
+  :type 'directory
+  :group 'liece-ctcp)
+  
+(liece-handler-define-backend "ctcp-message")
+
+(defmacro liece-register-ctcp-message-handler (name)
+  `(liece-handler-define-function
+    ,name '(from chnl data "ctcp-message")
+    ',(intern (format "liece-ctcp-%s-message" name))))
+
+(liece-register-ctcp-message-handler "version")
+(liece-register-ctcp-message-handler "userinfo")
+(liece-register-ctcp-message-handler "clientinfo")
+(liece-register-ctcp-message-handler "ping")
+(liece-register-ctcp-message-handler "time")
+(liece-register-ctcp-message-handler "file")
+(liece-register-ctcp-message-handler "x-face")
+(liece-register-ctcp-message-handler "comment")
+(liece-register-ctcp-message-handler "help")
+(liece-register-ctcp-message-handler "action")
+(liece-register-ctcp-message-handler "dcc")
+(liece-register-ctcp-message-handler "errmsg")
+
+(defun* liece-ctcp-message (from chnl rest)
+  (or (string-match "^\\([^\001]*\\)\001\\([^\001]*\\)\001" rest)
+      (return-from liece-ctcp-message))
+  (let (hook after-hook data message)
+    (setq data (match-string 2 rest)
+         rest (concat
+               (match-string 1 rest)
+               (substring rest (match-end 0))))
+    (if (string-match "^\\([^ ]*\\) *:?" data)
+       (setq message (downcase (match-string 1 data))
+             data (substring data (match-end 0)))
+      (setq message "errmsg"
+           data (_ "Couldn't figure out what was said.")))
+    (setq hook
+         (intern-soft
+          (concat "liece-ctcp-" message "-hook"))
+         after-hook
+         (intern-soft
+          (concat "liece-after-ctcp-" message "-hook")))
+    (if (condition-case nil
+           (run-hook-with-args-until-success hook from chnl data)
+         (error nil))
+       (return-from liece-ctcp-message rest))
+    (let ((func
+          (liece-handler-find-function
+           message '(from chnl data) "ctcp-message")))
+      (if func
+         (funcall func from chnl data)
+       (liece-ctcp-messages message from chnl data))
+      (ignore-errors (run-hook-with-args after-hook from chnl data)))
+    rest))
+
+(defun liece-ctcp-messages (message from chnl rest)
+  (liece-send "NOTICE %s :\001ERRMSG %s :%s\001"
+              from (upcase message)
+              (format liece-ctcp-error-message
+                      (upcase message)))
+  (setq chnl (liece-channel-virtual chnl))
+  (liece-ctcp-insert (upcase message) from chnl rest))
+
+(defun liece-ctcp-action-message (from chnl rest)
+  "CTCP ACTION handler."
+  (let ((liece-message-target (liece-channel-virtual chnl))
+       (liece-message-speaker from)
+       (liece-message-type 'action))
+    (liece-display-message rest)))
+
+(defun liece-ctcp-insert (message from &optional chnl rest)
+  (if (or (null chnl)
+         (liece-nick-equal chnl liece-real-nickname))
+      (liece-message "%s query from %s." message from)
+    (liece-message "%s query from %s (%s)." message from chnl)
+    (liece-insert-client
+     (liece-pick-buffer chnl)
+     (format "%s query from %s%s\n"
+            message from (if rest (concat ":" rest) "")))))
+
+(defun liece-ctcp-version-message (from chnl rest)
+  "CTCP VERSION handler."
+  (liece-send "NOTICE %s :\001VERSION %s :\001"
+             from (liece-version))
+  (setq chnl (liece-channel-virtual chnl))
+  (liece-ctcp-insert "VERSION" from chnl rest))
+
+(defun liece-ctcp-userinfo-message (from chnl rest)
+  "CTCP USERINFO handler."
+  (liece-send "NOTICE %s :\001USERINFO %s\001"
+             from liece-ctcp-userinfo)
+  (setq chnl (liece-channel-virtual chnl))
+  (liece-ctcp-insert "USERINFO" from chnl))
+
+(defun liece-ctcp-clientinfo-message (from chnl rest)
+  "CTCP CLIENTINFO handler."
+  (liece-send "NOTICE %s :\001CLIENTINFO %s\001"
+             from
+             (eval-when-compile
+               (mapconcat 
+                (lambda (symbol) (upcase (symbol-name symbol)))
+                liece-ctcp-supported-symbols " ")))
+  (setq chnl (liece-channel-virtual chnl))
+  (liece-ctcp-insert "CLIENTINFO" from chnl))
+
+(defvar liece-ctcp-help-message
+  "This is a help message for CTCP requests.
+\"VERSION\" gives version of this client.
+\"USERINFO\" gives user supplied information if any.
+\"CLIENTINFO\" gives commands this client knows.
+\"PING\" returns the arguments it receives.
+\"TIME\" tells you the time on the user's host.
+\"FILE\" send a small file via IRC messages.
+\"X-FACE\" gives you user supplied X-Face.
+\"COMMENT\" returns string sent by other person.
+\"HELP\" gives this help message"
+  "Help message for CTCP requests.")
+  
+(defun liece-ctcp-help-message (from chnl rest)
+  "CTCP HELP handler."
+  (liece-send
+   "NOTICE %s :\001HELP %s\001"
+   from (liece-quote-encode-string liece-ctcp-help-message))
+  (setq chnl (liece-channel-virtual chnl))
+  (liece-ctcp-insert "HELP" from chnl))
+
+(defun liece-ctcp-comment-message (from chnl rest)
+  "CTCP COMMENT handler."
+  (setq chnl (liece-channel-virtual chnl))
+  (liece-ctcp-insert "COMMENT" from chnl))
+
+(defun liece-ctcp-ping-message (from chnl rest)
+  "CTCP PING handler."
+  (liece-send "NOTICE %s :\001PING %s\001" from rest)
+  (setq chnl (liece-channel-virtual chnl))
+  (liece-ctcp-insert "PING" from chnl))
+
+(defun liece-ctcp-time-message (from chnl rest)
+  "CTCP TIME handler."
+  (liece-send "NOTICE %s :\001TIME %s\001"
+             from (funcall liece-format-time-function
+                           (current-time)))
+  (setq chnl (liece-channel-virtual chnl))
+  (liece-ctcp-insert "TIME" from chnl))
+
+(defun liece-ctcp-x-face-message (from chnl rest)
+  "CTCP X-FACE handler."
+  (liece-send "NOTICE %s :\001X-FACE %s\001"
+             from liece-ctcp-x-face)
+  (setq chnl (liece-channel-virtual chnl))
+  (liece-ctcp-insert "X-FACE" from chnl))
+
+(liece-handler-define-backend "ctcp-notice")
+
+(defmacro liece-register-ctcp-notice-handler (name)
+  `(liece-handler-define-function
+    ,name '(prefix rest "ctcp-notice")
+    ',(intern (format "liece-ctcp-%s-notice" name))))
+
+(liece-register-ctcp-notice-handler "version")
+(liece-register-ctcp-notice-handler "userinfo")
+(liece-register-ctcp-notice-handler "clientinfo")
+(liece-register-ctcp-notice-handler "ping")
+(liece-register-ctcp-notice-handler "time")
+(liece-register-ctcp-notice-handler "file")
+(liece-register-ctcp-notice-handler "x-face")
+(liece-register-ctcp-notice-handler "comment")
+(liece-register-ctcp-notice-handler "help")
+(liece-register-ctcp-notice-handler "dcc")
+(liece-register-ctcp-notice-handler "errmsg")
+
+(defun* liece-ctcp-notice (prefix rest)
+  (or (string-match "^\\([^\001]*\\)\001\\([^\001]*\\)\001" rest)
+      (return-from liece-ctcp-notice))
+  (let (hook after-hook data message)
+    (setq data (match-string 2 rest)
+         rest (concat
+               (match-string 1 rest)
+               (substring rest (match-end 0))))
+    (if (string-match "^\\([^ ]*\\) *:?" data)
+       (setq message (downcase (match-string 1 data))
+             data (substring data (match-end 0)))
+      (setq message "errmsg"
+           data (_ "Couldn't figure out what was said.")))
+    (setq hook
+         (intern-soft
+          (concat "liece-ctcp-" message "-notice-hook"))
+         after-hook
+         (intern-soft
+          (concat "liece-after-ctcp-" message "-notice-hook")))
+    (if (condition-case nil
+           (run-hook-with-args-until-success hook prefix data)
+         (error nil))
+       (return-from liece-ctcp-notice rest))
+    (let ((func
+          (liece-handler-find-function
+           message '(prefix data) "ctcp-notice")))
+      (if func
+         (funcall func prefix data)
+       (liece-ctcp-notices message prefix data)))
+    (ignore-errors (run-hook-with-args after-hook prefix data))
+    rest))
+
+(defun liece-ctcp-notices (message prefix rest)
+  (liece-message
+   (_ "Unknown ctcp notice \":%s %s %s\"")
+   prefix (upcase message) rest))
+
+(liece-handler-define-backend "ctcp-file")
+
+(defmacro liece-register-file-handler (name)
+  `(liece-handler-define-function
+    ,name '(prefix name data "ctcp-file")
+    ',(intern (format "liece-file-%s" name))))
+
+(liece-register-file-handler "start")
+(liece-register-file-handler "cont")
+(liece-register-file-handler "end")
+
+(defun* liece-ctcp-file-notice (prefix rest)
+  (when liece-file-accept
+    (multiple-value-bind (message name data)
+       (liece-split-line rest)
+      (setq message (downcase message))
+      (let ((hook
+            (intern-soft
+             (concat "liece-file-" message "-hook")))
+           (after-hook
+            (intern-soft
+             (concat "liece-after-file-" message "-hook")))
+           func)
+       (if (condition-case nil
+               (run-hook-with-args-until-success hook prefix name)
+             (error nil))
+           (return-from liece-ctcp-file-notice))
+       (setq func (liece-handler-find-function
+                   message '(prefix name data) 'ctcp-file))
+       (if func
+           (funcall func prefix name data)
+         (liece-file-notices message prefix name data))
+       (ignore-errors (run-hook-with-args after-hook prefix name))))))
+
+(defun liece-file-notices (message prefix name data)
+  (liece-message
+   (_ "Unknown FILE message \":%s %s %s %s\"")
+   prefix (upcase message) name data))
+
+(defun liece-file-start (prefix name data)
+  "CTCP FILE start handler."
+  (save-excursion
+    (set-buffer
+     (liece-get-buffer-create
+      (format " *ctcp-file:%s*" name)))
+    (buffer-disable-undo)
+    (set-buffer-multibyte nil)
+    (erase-buffer)
+    (insert data)))
+
+(defun liece-file-cont (prefix name data)
+  "CTCP FILE cont handler."
+  (save-excursion
+    (set-buffer
+     (liece-get-buffer-create
+      (format " *ctcp-file:%s*" name)))
+    (goto-char (point-max))
+    (insert data)))
+
+(defun liece-file-end (prefix name data)
+  "CTCP FILE cont handler."
+  (save-excursion
+    (set-buffer
+     (liece-get-buffer-create
+      (format " *ctcp-file:%s*" name)))
+    (goto-char (point-max))
+    (insert data)
+    (liece-quote-decode-region (point-min)(point-max))
+    (goto-char (point-min))
+    (when (or (null liece-file-confirm-save)
+             (y-or-n-p "Save file? "))
+      (or (file-directory-p liece-ctcp-file-save-directory)
+         (make-directory liece-ctcp-file-save-directory))
+      (write-region-as-binary
+       (point-min)(point-max)
+       (expand-file-name
+       (file-name-nondirectory
+        (concat name "-" prefix))
+       liece-ctcp-file-save-directory))
+      (kill-buffer (current-buffer)))))
+
+(defun liece-ctcp-version-insert (buffer prefix name
+                                        &optional version environment)
+  (or (listp buffer)
+      (setq buffer (list buffer)))
+  (liece-insert buffer
+               (concat (format liece-ctcp-message
+                               "VERSION" prefix "")
+                       name "\n"))
+  (when version
+    (liece-insert buffer
+                 (concat (format liece-ctcp-message
+                                 "VERSION" prefix "")
+                         "\t" version
+                         (if environment
+                             (concat " " environment))
+                         "\n"))))
+
+(defun liece-ctcp-version-notice (prefix rest)
+  "CTCP VERSION reply handler."
+  (if (null rest)
+      (liece-message (_ "Empty CLIENT version notice from \"%s\".") prefix)
+    (cond
+     ((string-match "^\\([^:]*\\):\\([^:]+\\):?\\([^:]*\\)" rest)
+      (liece-ctcp-version-insert liece-ctcp-buffer
+                                prefix (match-string 1 rest)
+                                (match-string 2 rest)
+                                (match-string 3 rest)))
+     ((string-match "^\\([^:]*\\):\\(.*\\)" rest)
+      (liece-ctcp-version-insert liece-ctcp-buffer
+                                prefix (match-string 1 rest)))
+     (t
+      (liece-ctcp-version-insert liece-ctcp-buffer prefix rest)))))
+
+(defun liece-ctcp-clientinfo-notice (prefix rest)
+  "CTCP CLIENTINFO reply handler."
+  (liece-insert liece-ctcp-buffer
+                (format (concat liece-ctcp-message "\n")
+                        "CLIENTINFO" prefix rest)))
+
+(defun liece-ctcp-userinfo-notice (prefix rest)
+  "CTCP USERINFO reply handler."
+  (liece-insert liece-ctcp-buffer
+                (format (concat liece-ctcp-message "\n")
+                        "USERINFO" prefix rest)))
+
+(defun liece-ctcp-help-notice (prefix rest)
+  "CTCP HELP reply handler."
+  (liece-insert liece-ctcp-buffer
+                (format (concat liece-ctcp-message "\n")
+                        "HELP" prefix rest)))
+
+(defun liece-ctcp-x-face-notice (prefix rest)
+  "CTCP X-FACE reply handler."
+  (let ((buffer liece-ctcp-buffer))
+    (liece-insert buffer
+                  (format liece-ctcp-message
+                          "X-FACE" prefix ""))
+    (if (and liece-use-x-face
+            (string-match "[^ \t]" rest))
+       (liece-x-face-insert
+        buffer (replace-in-string rest "[ \t\r\n]+" "") prefix)
+      (liece-insert buffer rest))
+    (let (liece-display-time)
+      (liece-insert buffer "\n"))))
+
+(defun liece-ctcp-errmsg-notice (prefix rest)
+  "CTCP ERRMSG reply handler."
+  (liece-insert liece-ctcp-buffer
+                (format (concat liece-ctcp-message "\n")
+                        "ERRMSG" prefix rest)))
+
+(defun liece-ctcp-comment-notice (from rest)
+  "CTCP COMMENT reply handler."
+  (liece-insert liece-ctcp-buffer
+                (format (concat liece-ctcp-message "\n")
+                        "COMMENT" from rest))
+  (liece-message "COMMENT query from %s." from))
+
+(defmacro liece-ctcp-prepare-ping-seconds (timenow)
+  `(format (_ "%d sec")
+          (+ (* 65536 (- (car ,timenow) (car liece-ctcp-ping-time)))
+             (- (cadr ,timenow) (cadr liece-ctcp-ping-time)))))
+
+(defun liece-ctcp-ping-notice (from rest)
+  "CTCP PING reply handler."
+  (let ((timenow (current-time)))
+    (liece-insert liece-ctcp-buffer
+                  (format (concat liece-ctcp-message "\n")
+                          "PING" from
+                          (liece-ctcp-prepare-ping-seconds timenow)))))
+
+(defun liece-ctcp-time-notice (from rest)
+  "CTCP TIME reply handler."
+  (liece-insert liece-ctcp-buffer
+               (format (concat liece-ctcp-message "\n")
+                       "TIME" from rest)))
+
+(defmacro liece-complete-client ()
+  '(let ((completion-ignore-case t) (nick liece-ctcp-last-nick))
+     (liece-minibuffer-completing-default-read
+      (_ "Whose client: ") liece-nick-alist nil nil
+      (if nick (liece-channel-virtual nick)))))
+
+(defun liece-minibuffer-complete-client-query ()
+  (let* ((alist
+         (eval-when-compile
+           (list-to-alist
+            (mapcar
+             (lambda (symbol) (downcase (symbol-name symbol)))
+             liece-ctcp-supported-symbols))))
+        (candidate (liece-minibuffer-prepare-candidate))
+        (completion (try-completion candidate alist))
+        (all (all-completions candidate alist)))
+    (liece-minibuffer-finalize-completion completion candidate all)))
+
+(defmacro liece-complete-query ()
+  '(let ((completion-ignore-case t)
+        (liece-minibuffer-complete-function
+         (function liece-minibuffer-complete-client-query)))
+     (read-from-minibuffer
+      (_ "Which query: ") liece-ctcp-last-command
+      liece-minibuffer-map)))
+
+(defun liece-ctcp-make-command-wrapper (symbol)
+  (fset (intern (format "liece-command-ctcp-%s" symbol))
+       `#'(lambda (client)
+            (interactive (list (liece-complete-client)))
+            (setq client (liece-channel-real client)
+                  liece-ctcp-last-nick client
+                  ,@(if (eq symbol 'ping)
+                        '(liece-ctcp-ping-time
+                          (current-time))))
+            (liece-send "PRIVMSG %s :\001%s\001"
+                        client (upcase (symbol-name symbol))))))
+
+(dolist (symbol liece-ctcp-supported-symbols)
+  (liece-ctcp-make-command-wrapper symbol))
+
+(defun liece-command-ctcp-action (&optional arg)
+  "Send CTCP action."
+  (interactive
+   (if current-prefix-arg
+       (list current-prefix-arg)))
+  (let ((completion-ignore-case t)
+       (liece-message-type 'action)
+       message)
+    (if arg
+       (setq liece-privmsg-partner 
+             (liece-channel-virtual
+              (liece-minibuffer-completing-default-read 
+               (_ "To whom: ")
+               (append liece-nick-alist liece-channel-alist)
+               nil nil liece-privmsg-partner))))
+    (beginning-of-line)
+    (setq message (buffer-substring (point)(progn (end-of-line)(point))))
+    (if (string= message "")
+       (setq message (read-string "Action: "))
+      (liece-next-line 1))
+    (liece-send "PRIVMSG %s :\001ACTION %s\001"
+                (if arg
+                    liece-privmsg-partner
+                  (liece-channel-real liece-current-channel))
+                message)
+    (if arg
+       (liece-own-private-message message)
+      (liece-own-channel-message message))))
+
+(define-obsolete-function-alias 'liece-command-send-action
+  'liece-command-ctcp-action)
+
+;;;###liece-autoload
+(defun liece-command-ctcp-generic (nick command)
+  "Ask about someones client clientinfo."
+  (interactive (list (liece-complete-client) (liece-complete-query)))
+  (setq nick (liece-channel-real nick)
+       liece-ctcp-last-nick nick
+       liece-ctcp-last-command command)
+  (if (string-equal-ignore-case liece-ctcp-last-command "ping")
+      (setq liece-ctcp-ping-time (current-time)))
+  (liece-send "PRIVMSG %s :\001%s\001%s" nick command))
+
+;;;###liece-autoload
+(defun liece-command-ctcp-userinfo-from-minibuffer (info)
+  "Ask about someones client clientinfo."
+  (interactive
+   (list (read-from-minibuffer "New userinfo: " liece-ctcp-userinfo)))
+  (setq liece-ctcp-userinfo info))
+
+;;;###liece-autoload
+(defun liece-command-ctcp-x-face-from-xbm-file (file)
+  (interactive "fXBM File: ")
+  (let (data)
+    (and (file-exists-p file) (file-readable-p file)
+        (setq data (liece-x-face-encode file))
+        (setq liece-ctcp-x-face
+              (replace-in-string (cadr (nth 3 data)) "[ \t\n]" "")))))
+
+;;;###liece-autoload
+(defun liece-command-send-file (file to)
+  "Send a file to given  user."
+  (interactive "fFile name: \nsTo whom: ")
+  (save-excursion
+    (set-buffer (liece-get-buffer-create (format " *ctcp-file:%s*" file)))
+    (buffer-disable-undo)
+    (set-buffer-multibyte nil)
+    (erase-buffer)
+    (insert-file-contents-as-binary file)
+    (liece-quote-encode-region (point-min)(point-max))
+    (goto-char (point-min))
+    (let ((bound (min (point-max) (+ 80 (point))))
+         (liece-mime-charset-for-write 'binary))
+      (liece-send
+       "NOTICE %s :\001FILE START %s :%s\001"
+       to file (buffer-substring (point) bound))
+      (goto-char bound)
+      (while (not (eobp))
+       (if (= 1 (mod (point) 800))
+           (sit-for 1))
+       (setq bound (min (point-max) (+ 80 (point))))
+       (liece-send "NOTICE %s :\001FILE CONT %s :%s\001"
+                   to file (buffer-substring (point) bound))
+       (goto-char bound)))
+    (liece-send "NOTICE %s :\001FILE END %s : \001" to file)
+    (kill-buffer (current-buffer))))
+
+(provide 'liece-ctcp)
+
+;;; liece-ctcp.el ends here
diff --git a/lisp/liece-dcc.el b/lisp/liece-dcc.el
new file mode 100644 (file)
index 0000000..b519830
--- /dev/null
@@ -0,0 +1,405 @@
+;;; liece-dcc.el --- DCC handlers and commands.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece, DCC
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile
+  (require 'liece-intl)
+  (require 'liece-inlines)
+  (require 'liece-channel))
+
+(eval-when-compile (require 'queue-m))
+
+(require 'liece-coding)
+(require 'liece-misc)
+(require 'liece-minibuf)
+
+(defvar liece-dcc-requests (queue-create))
+(defvar liece-dcc-receive-direct t)
+(defvar liece-dcc-process-alist nil)
+
+(defconst liece-dcc-acceptable-messages '("SEND" "CHAT"))
+
+(defstruct liece-dcc-object type from host port file size)
+
+(defun liece-dcc-enqueue-request (type &rest args)
+  (let ((request (apply #'make-liece-dcc-object :type type args)))
+    (inline (queue-enqueue liece-dcc-requests request))))
+
+(defun liece-dcc-dequeue-request (&optional type)
+  (when (or (not type)
+           (eq (liece-dcc-object-type
+                (queue-first liece-dcc-requests))
+               type))
+    (inline (queue-dequeue liece-dcc-requests))))
+
+(defmacro liece-dcc-add-to-process-alist (process type &rest args)
+  `(push (cons (process-name ,process)
+              (make-liece-dcc-object :type ,type ,@args))
+        liece-dcc-process-alist))
+
+(defmacro liece-dcc-get-process-object (process)
+  `(cdr (assoc (process-name ,process) liece-dcc-process-alist)))
+
+(defmacro liece-dcc-message (&rest msg)
+  `(message "DCC %s" (format ,@msg)))
+
+(defun* liece-ctcp-dcc-message (from chnl rest)
+  (cond
+   ((string-match "^SEND +" rest)
+    (multiple-value-bind (filename host port size)
+       (split-string (substring rest (match-end 0)))
+      (setq filename (file-name-nondirectory filename))
+      (liece-insert-dcc
+       (append liece-O-buffer liece-D-buffer)
+       (format (_ "SEND request from %s: %s (%s bytes)\n")
+              from filename size))
+      (liece-dcc-enqueue-request
+       'send :from from :host host :port port :file filename :size size)
+      (when liece-dcc-receive-direct
+       (liece-insert-dcc
+        (append liece-O-buffer liece-D-buffer)
+        (format (_ "SEND applied autoreceive: %s (%s bytes)\n")
+                filename size))
+       (liece-command-dcc-receive))))
+   ((string-match "^CHAT [^ ]+ +" rest)
+    (multiple-value-bind (host port)
+       (split-string (substring rest (match-end 0)))
+      (liece-dcc-enqueue-request 'chat :from from :host host :port port)
+      (liece-insert-dcc
+       (append liece-O-buffer liece-D-buffer)
+       (concat "CHAT request from " from "\n"))))))
+
+(defun liece-command-dcc-send (filename towhom)
+  "Send file to user."
+  (interactive
+   (list (expand-file-name
+         (read-file-name
+          (_ "File to send: ")
+          default-directory nil))
+        (liece-minibuffer-completing-default-read
+         (_ "To whom: ")
+         (append liece-nick-alist liece-channel-alist)
+         nil nil liece-privmsg-partner)))
+
+  (setq liece-privmsg-partner towhom)
+  (let (process)
+    (setq process (start-process
+                  liece-dcc-program nil liece-dcc-program
+                  "send" (int-to-string liece-dcc-port) filename))
+    (set-process-filter process #'liece-dcc-send-filter)
+    (set-process-sentinel process #'liece-dcc-sentinel))
+  (or (zerop liece-dcc-port)
+      (incf liece-dcc-port)))
+
+(defun liece-dcc-sentinel (process output)
+  (let* ((object (liece-dcc-get-process-object process))
+        (type (liece-dcc-object-type object)))
+    (if (null object)
+        (delete-process process)
+      (if (string-match "^finished" output)
+         (cond
+          ((eq type 'send)
+           (liece-dcc-message (_ "Sent file to %s: %s (%s bytes)")
+                              (liece-dcc-object-from object)
+                              (liece-dcc-object-file object)
+                              (liece-dcc-object-size object)))
+          ((eq type 'receive)
+           (liece-dcc-message (_ "Received file from %s: %s (%s bytes)")
+                              (liece-dcc-object-from object)
+                              (liece-dcc-object-file object)
+                              (liece-dcc-object-size object)))
+          ((eq type 'chat)
+           (liece-dcc-message (_ "Chat connection with %s finished")
+                              (liece-dcc-object-from object))))
+       (liece-dcc-message
+        (_ "%s error (%s %s %s) is %s\n")
+        (capitalize (downcase (prin1-to-string
+                               (liece-dcc-object-type object))))
+        (or (liece-dcc-object-file object) "")
+        (cond ((eq type 'send) "to")
+              ((eq type 'receive) "from")
+              ((eq type 'chat) "with"))
+        (liece-dcc-object-from object)
+        (substring output 0 (1- (length output))))))))
+
+(defun liece-dcc-send-filter (process output)
+  (if (string-match "DCC send +" output)
+      (multiple-value-bind (filename port host size)
+         (split-string (substring output (match-end 0)))
+       (setq filename (file-name-nondirectory filename))
+       (liece-send "PRIVMSG %s :\001DCC SEND %s %s %s %s\001"
+                   liece-privmsg-partner filename host port size)
+       (liece-dcc-message (_ "Sending file to %s: %s (%s bytes)")
+                          liece-privmsg-partner filename size)
+       (liece-dcc-add-to-process-alist process 'send
+                                       :host host
+                                       :port port
+                                       :from liece-privmsg-partner
+                                       :file filename
+                                       :size size))
+    (liece-dcc-message (_ "send error to %s: %s")
+                      liece-privmsg-partner
+                      (substring output 0 (1- (length output))))))
+
+(defmacro liece-dcc-prepare-directory ()
+  '(or (file-directory-p (expand-file-name liece-dcc-directory))
+       (and (y-or-n-p (_ "DCC directory does not exist. Create it? "))
+           (make-directory (expand-file-name liece-dcc-directory)))))
+
+(defun liece-command-dcc-receive (&optional number)
+  "Receive next file from list."
+  (interactive "P")
+  (let ((object (liece-dcc-dequeue-request 'send)))
+    (if (not object)
+       (liece-message (_ "DCC No send request has been arrived."))
+      (liece-dcc-message (_ "Getting file from %s: %s (%s bytes)")
+                         (liece-dcc-object-from object)
+                         (liece-dcc-object-file object)
+                         (liece-dcc-object-size object))
+      (liece-dcc-prepare-directory)
+      (let ((file
+            (expand-file-name
+             (liece-dcc-object-file object)
+             liece-dcc-directory))
+           process)
+       (setq process
+             (start-process
+              liece-dcc-program nil liece-dcc-program
+              "receive"
+              (liece-dcc-object-host object)
+              (liece-dcc-object-port object)
+              (liece-dcc-object-size object)
+              (expand-file-name
+               (liece-dcc-object-file object)
+               liece-dcc-directory)))
+       (set-process-filter process #'liece-dcc-receive-filter)
+       (set-process-sentinel process  #'liece-dcc-sentinel)
+       (liece-dcc-add-to-process-alist
+        process 'receive
+        :from (liece-dcc-object-from object)
+        :host (liece-dcc-object-host object)
+        :port (liece-dcc-object-port object)
+        :file file
+        :size (liece-dcc-object-size object))))))
+
+(defun liece-dcc-receive-filter (process output)
+  (liece-dcc-message "%s" (substring output 0 (1- (length output)))))
+
+(defun liece-command-dcc-chat-listen (towhom)
+  (interactive
+   (list (liece-minibuffer-completing-default-read
+         (_ "With whom: ")
+         (append liece-nick-alist liece-channel-alist)
+         nil nil liece-privmsg-partner)))
+  (setq liece-privmsg-partner towhom)
+  (let (process)
+    (as-binary-process
+     (setq process
+          (start-process
+           liece-dcc-program nil
+           liece-dcc-program "chat" "listen"
+           (int-to-string liece-dcc-port)))
+     (set-process-buffer
+      process
+      (liece-get-buffer-create (format " DCC:%s" (process-id process))))
+     (set-process-filter process 'liece-dcc-chat-listen-filter)
+     (set-process-sentinel process 'liece-dcc-sentinel)))
+  (unless (zerop liece-dcc-port)
+    (setq liece-dcc-port (1+ liece-dcc-port))))
+
+(defun liece-dcc-chat-listen-filter (process output)
+  (cond
+   ((string-match "DCC chat +" output)
+    (multiple-value-bind (host port)
+       (split-string (substring output (match-end 0)))
+      (liece-send "PRIVMSG %s :\001DCC CHAT chat %s %s\001"
+                 liece-privmsg-partner host port)
+      (liece-dcc-message (_ "Ringing user %s")
+                        liece-privmsg-partner)
+      (liece-dcc-add-to-process-alist
+       process 'chat :from liece-privmsg-partner)))
+   ((string-match "^DCC chat established" output)
+    (set-process-filter process 'liece-dcc-chat-filter)
+    (let* ((object (liece-dcc-get-process-object process))
+          (nick (liece-dcc-object-from object)))
+      (setq nick (liece-channel-prepare-representation nick 'dcc))
+      (liece-channel-prepare-partner nick)
+      (liece-dcc-message (_ "Chat connection established with: %s")
+                        nick))
+    (message ""))
+   (t
+    (liece-dcc-message (_ "listen error to %s: %s")
+                      liece-privmsg-partner
+                      (substring output 0 (1- (length output)))))))
+
+(defun liece-command-dcc-chat-connect (&optional number)
+  (interactive "P")
+  (let* ((object (liece-dcc-dequeue-request 'chat))
+        (nick (liece-dcc-object-from object))
+        process)
+    (if (not object)
+       (liece-message (_ "DCC No chat request has been arrived."))
+      (liece-dcc-message (_ "Connecting to: %s") nick)
+      (setq liece-privmsg-partner nick)
+      (as-binary-process
+       (setq process
+            (start-process liece-dcc-program nil
+                           liece-dcc-program "chat" "connect"
+                           (liece-dcc-object-host object)
+                           (liece-dcc-object-port object)))
+       (set-process-buffer
+       process
+       (liece-get-buffer-create
+        (format " DCC:%s" (process-id process))))
+       (set-process-filter process #'liece-dcc-chat-connect-filter)
+       (set-process-sentinel process #'liece-dcc-sentinel)
+       (liece-dcc-add-to-process-alist
+       process 'chat :from liece-privmsg-partner)))))
+
+(defun liece-dcc-chat-connect-filter (process output)
+  (if (string-match "^DCC chat established" output)
+      (let* ((object (liece-dcc-get-process-object process))
+            (nick (liece-dcc-object-from object)))
+       (set-process-filter process #'liece-dcc-chat-filter)
+       (setq nick (liece-channel-prepare-representation nick 'dcc))
+       (liece-channel-prepare-partner nick)
+       (liece-dcc-message (_ "Chat connection established with: %s")
+                          nick)
+       (message ""))
+    (liece-dcc-message
+     (_ "connect error to %s: %s")
+     liece-privmsg-partner
+     (substring output 0 (1- (length output))))))
+
+(defun liece-dcc-chat-filter (process output)
+  (save-match-data
+    (with-current-buffer (process-buffer process)
+      (let* ((object (liece-dcc-get-process-object process))
+            (nick (liece-channel-prepare-representation
+                   (liece-dcc-object-from object) 'dcc)))
+       (goto-char (point-max))
+       (insert output)
+       (goto-char (point-min))
+       (while (search-forward "\n\n" (point-max) t)
+         (delete-char -1))
+       (goto-char (point-min))
+       (when (string-match "\n" output)
+         (let (st nd line)
+           (while (looking-at ".*\n")
+             (setq st (match-beginning 0) nd (match-end 0)
+                   line (liece-coding-decode-charset-string
+                         (buffer-substring st (1- nd))))
+             (delete-region st nd)
+             (let ((liece-message-target (liece-current-nickname))
+                   (liece-message-speaker nick))
+               (liece-display-message line)))))))))
+
+(defun liece-dcc-chat-nick-to-process (nick)
+  "Convert NICK to process symbol."
+  (let ((alist liece-dcc-process-alist)
+       pair)
+    (catch 'found
+      (while alist
+       (setq pair (pop alist))
+       (if (and (eq 'chat (cadr pair))
+                (liece-nick-equal nick (caddr pair)))
+           (throw 'found (car pair))))
+      nil)))
+
+(defun liece-dcc-chat-send (nick message)
+  "Send MSG string to NICK via DCC chat."
+  (let ((process (liece-dcc-chat-nick-to-process nick)))
+    (if (not process)
+       (liece-message (_ "DCC chat has not been started."))
+      (with-current-buffer liece-command-buffer
+       (setq message (liece-coding-encode-charset-string message)
+             message (if (string-match "\r$" message) message
+                       (concat message "\r\n")))
+       (process-send-string process message)))))
+
+(defun liece-command-dcc-accept ()
+  "Dispatch one DCC request."
+  (interactive)
+  (let* ((object (queue-first liece-dcc-requests))
+        (type (liece-dcc-object-type object)))
+    (cond ((eq type 'send)
+          (liece-command-dcc-receive))
+         ((eq type 'chat)
+          (liece-command-dcc-chat-connect))
+         (t
+          (liece-message
+           (_ "DCC No request has been arrived."))))))
+
+(defun liece-command-dcc-list ()
+  "List files in receive queue."
+  (interactive)
+  (if (queue-empty liece-dcc-requests)
+      (liece-dcc-message (_ "No DCC request here"))
+    (let ((i 0) (objects (queue-all liece-dcc-requests)) type)
+      (dolist (object objects)
+       (setq type (liece-dcc-object-type object))
+       (cond ((eq type 'send)
+              (liece-dcc-message
+               (_ "(%d) %s request %s: %s (%s bytes)")
+               i (upcase (symbol-name type))
+               (liece-dcc-object-from object)
+               (liece-dcc-object-file object)
+               (liece-dcc-object-size object)))
+             ((eq type 'chat)
+              (liece-dcc-message
+               (_ "(%d) %s request from %s")
+               i (upcase (symbol-name type))
+               (liece-dcc-object-from object))))
+       (incf i)))))
+
+(defun liece-dcc-compare-hostnames (h1 h2)
+  "Compare two internet domain hostnames. Return true iff they resolve to the
+same IP-address."
+  (or
+   (string-equal-ignore-case h1 h2)
+   (if liece-dcc-program
+       (let ((pob (liece-get-buffer-create "*IRC DCC resolve*"))
+            (output) (domatch nil))
+        (save-excursion
+          (call-process liece-dcc-program nil pob nil "resolve" h1 h2)
+          (set-buffer pob)
+          (goto-char (point-min))
+          (setq output (buffer-substring (point-min) (point-max)))
+          (if (string-match "\\([^ ]+\\)\n\\([^ ]+\\)\n" output)
+              (if (string= (match-string 1 output)
+                           (match-string 2 output))
+                  (setq domatch t))))
+        (kill-buffer pob)
+        domatch)
+     (string-equal-ignore-case h1 h2))))
+
+(provide 'liece-dcc)
+
+;;; liece-dcc.el ends here
diff --git a/lisp/liece-emacs.el b/lisp/liece-emacs.el
new file mode 100644 (file)
index 0000000..7104bcc
--- /dev/null
@@ -0,0 +1,245 @@
+;;; liece-emacs.el --- FSF Emacs specific routines.
+;; Copyright (C) 1999 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-08-21
+;; Keywords: emulation
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile
+  (require 'static)
+  (require 'liece-compat)
+  (require 'liece-vars))
+
+(eval-when-compile (ignore-errors (require 'image)))
+
+(require 'derived)
+
+(eval-and-compile
+  (autoload 'bitmap-stipple-xbm-file-to-stipple "bitmap-stipple")
+  (autoload 'bitmap-stipple-insert-pixmap "bitmap-stipple"))
+
+;;; @ widget emulation
+;;; 
+(defvar liece-widget-keymap nil)
+
+(unless liece-widget-keymap
+  (require 'wid-edit)
+  (setq liece-widget-keymap (copy-keymap widget-keymap))
+  (substitute-key-definition
+   'widget-button-click 'liece-widget-button-click
+   liece-widget-keymap)
+  (define-key liece-widget-keymap (if (featurep 'xemacs) 'button3
+                                   [mouse-3])
+    'liece-widget-button-click))
+
+(defun liece-emacs-widget-convert-button (type from to &rest args)
+  (apply 'widget-convert-button type from to args)
+  (let ((map (copy-keymap liece-widget-keymap)))
+    (set-keymap-parent map (current-local-map))
+    (overlay-put (make-overlay from to) 'local-map map)))
+
+(defun liece-emacs-widget-button-click (event)
+  (interactive "e")
+  (with-current-buffer
+      (let ((window (posn-window (event-start event))))
+       (and (windowp window) (window-buffer window)))
+    (goto-char (widget-event-point event))
+    (cond
+     ((widget-at (point)))
+     ((> (point) (save-excursion
+                  (widget-forward 0)
+                  (point)))
+      (widget-backward 0))
+     ((< (point) (save-excursion
+                  (widget-backward 0)
+                  (point)))
+      (widget-forward 0)))
+    (widget-button-click event)))
+
+(fset 'liece-widget-convert-button
+      'liece-emacs-widget-convert-button)
+(fset 'liece-widget-button-click
+      'liece-emacs-widget-button-click)
+
+;;; @ startup splash
+;;; 
+(defconst liece-splash-image
+  (eval-when-compile
+    (cond
+     ((and (fboundp 'image-type-available-p)
+          (image-type-available-p 'xpm))
+      (let ((file (expand-file-name "liece.xpm" default-directory)))
+       (if (file-exists-p file)
+           (list 'image
+                 :type 'xpm
+                 :data (with-temp-buffer
+                         (insert-file-contents-as-binary file)
+                         (buffer-string))))))
+     ((fboundp 'set-face-stipple)
+      (let ((file (expand-file-name "liece.xbm" default-directory)))
+       (if (file-exists-p file)
+           (bitmap-stipple-xbm-file-to-stipple file)))))))
+
+(defun liece-emacs-splash (&optional arg)
+  (interactive "P")
+  (let* ((font (cdr (assq 'font (frame-parameters))))
+        (liece-insert-environment-version nil)
+        config buffer pixel-width pixel-height)
+    (unwind-protect
+       (progn
+         (setq config (current-window-configuration))
+         (save-excursion
+           (switch-to-buffer (setq buffer (liece-get-buffer-create
+                                           (concat (if arg "*" " *")
+                                                   (liece-version) "*"))))
+           (erase-buffer)
+           (static-cond
+            ((and (fboundp 'image-type-available-p)
+                  (image-type-available-p 'xpm))
+             (with-temp-buffer
+               (insert (plist-get (cdr liece-splash-image) :data))
+               (goto-char (point-min))
+               (skip-syntax-forward "^\"")
+               (when (looking-at "\"[ \t]*\\([0-9]+\\)[ \t]*\\([0-9]+\\)")
+                 (setq pixel-width (string-to-int (match-string 1))
+                       pixel-height (string-to-int (match-string 2)))))
+             (insert (make-string (max 0 (/ (- (frame-height)
+                                               (/ pixel-height
+                                                  (frame-char-height)))
+                                            2))
+                                  ?\n)
+                     (make-string (max 0 (/ (- (frame-width)
+                                               (/ pixel-width
+                                                  (frame-char-width)))
+                                            2))
+                                  ?\ ))
+             (static-if (condition-case nil
+                            (progn (insert-image '(image)) nil)
+                          (wrong-number-of-arguments t))
+                 (insert-image liece-splash-image "x")
+               (insert-image liece-splash-image))
+             (insert "\n"))
+            (t
+             (bitmap-stipple-insert-pixmap liece-splash-image 'center)))
+           (insert "\n")
+           (insert-char ?\  (max 0 (/ (- (window-width)
+                                         (length (liece-version)))
+                                      2)))
+           (put-text-property (point) (prog2 (insert (liece-version))(point)
+                                        (insert "\n"))
+                              'face 'underline))
+         (or arg (sit-for 2)))
+      (unless arg
+       (kill-buffer buffer)
+       (set-window-configuration config)))))
+
+;;; @ modeline decoration
+;;; 
+(defconst liece-mode-line-image nil)
+
+(static-unless (or (not (fboundp 'create-image))
+                  (memq 'data-p (aref (symbol-function 'create-image) 0)))
+  (defadvice create-image
+    (before data-p (file-or-data &optional type data-p &rest props) activate)
+    (ad-set-args 0 (list (ad-get-arg 0) (ad-get-arg 1) (ad-get-arg 3)))))
+
+(defun liece-emacs-create-mode-line-image ()
+  (static-when (fboundp 'image-type-available-p)
+    (let ((file (liece-locate-icon-file
+                (static-cond
+                 ((image-type-available-p 'xpm)
+                  "liece-pointer.xpm")
+                 ((image-type-available-p 'xbm)
+                  "liece-pointer.xbm")))))
+      (and file (file-exists-p file)
+          (create-image file nil nil :ascent 99)))))
+
+(defun liece-emacs-mode-line-buffer-identification (line)
+  (let ((id (copy-sequence (car line))) image)
+    (if (and (stringp id) (string-match "^Liece:" id)
+            (setq liece-mode-line-image
+                  (liece-emacs-create-mode-line-image)))
+       (progn
+         (add-text-properties 0 (length id)
+                              (list 'display
+                                    liece-mode-line-image
+                                    'rear-nonsticky (list 'display))
+                              id)
+         (setcar line id)))
+    line))
+
+(fset 'liece-mode-line-buffer-identification
+      'liece-emacs-mode-line-buffer-identification)
+
+;;; @ nick buffer decoration
+;;; 
+(defun liece-emacs-create-nick-image (file)
+  (static-when (and (fboundp 'image-type-available-p)
+                   (image-type-available-p 'xpm))
+    (let ((file (liece-locate-icon-file file)))
+      (and file (file-exists-p file)
+          (create-image file nil nil :ascent 99)))))
+
+(defun liece-emacs-nick-image-region (start end)
+  (save-excursion
+    (goto-char start)
+    (beginning-of-line)
+    (setq start (point))
+
+    (goto-char end)
+    (beginning-of-line 2)
+    (setq end (point))
+    
+    (save-restriction
+      (narrow-to-region start end)
+      (let ((buffer-read-only nil)
+           (inhibit-read-only t)
+           (case-fold-search nil)
+           mark image)
+       (dolist (entry liece-nick-image-alist)
+         (setq mark (car entry)
+               image (cdr entry))
+         (if (stringp image)
+             (setq image
+                   (setcdr entry (liece-emacs-create-nick-image image))))
+         (goto-char start)
+         (while (not (eobp))
+           (when (eq (char-after) mark)
+             (add-text-properties (point) (1+ (point))
+                                  (list 'display
+                                        image
+                                        'rear-nonsticky (list 'display))))
+           (beginning-of-line 2)))))))
+
+(add-hook 'liece-nick-insert-hook 'liece-emacs-nick-image-region)
+(add-hook 'liece-nick-replace-hook 'liece-emacs-nick-image-region)
+       
+(and liece-splash-image window-system
+     (liece-emacs-splash))
+
+(provide 'liece-emacs)
+
+;;; liece-emacs.el ends here
diff --git a/lisp/liece-filter.el b/lisp/liece-filter.el
new file mode 100644 (file)
index 0000000..0cca753
--- /dev/null
@@ -0,0 +1,162 @@
+;;; liece-filter.el --- Process filters for IRC process.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(require 'liece-inlines)
+(require 'liece-misc)
+(require 'liece-intl)
+(require 'liece-handler)
+
+(defvar liece-current-function nil)
+
+(defun* liece-handle-message (prefix message line)
+  (let ((hook (intern (concat "liece-" message "-hook")))
+       (after-hook (intern (concat "liece-after-" message "-hook")))
+       (number (car (read-from-string message)))
+       func)
+    (if (condition-case nil
+           (run-hook-with-args-until-success hook prefix line)
+         (error nil))
+       (return-from liece-handle-message))
+    
+    (cond
+     ((numberp number)
+      (let* ((base (/ number 100))
+            (backend (format "liece-%d00" base)))
+       (or (eval `(featurep ',(intern backend)))
+           (load backend t))
+       (setq func (liece-handler-find-function message '(prefix line)
+                                       (format "%d00" base)))
+       (if func
+           (funcall func prefix line)
+         (funcall (symbol-function (intern
+                                    (format "liece-handle-%d00-messages"
+                                            base)))
+                  message prefix line))))
+     (t
+      (setq func (liece-handler-find-function
+                 message '(prefix line) "generic"))
+      (if func
+         (funcall func prefix line))))
+
+    (ignore-errors (run-hook-with-args after-hook prefix line))))
+
+(defun liece-parse-user-at-host ()
+  (let ((cookie
+        (and (stringp liece-user-at-host)
+             (> (length liece-user-at-host) 2)
+             (string-to-char liece-user-at-host))))
+    (cond
+     ((null cookie)
+      (setq liece-user-at-host-type 'invalid))
+     ((or (eq cookie ?^) (eq cookie ?=))
+      (setq liece-user-at-host (substring liece-user-at-host 1)
+           liece-user-at-host-type 'fake))
+     ((or (eq cookie ?~) (eq cookie ?-))
+      (setq liece-user-at-host (substring liece-user-at-host 1)
+           liece-user-at-host-type 'not-verified))
+     ((eq cookie ?+)
+      (setq liece-user-at-host (substring liece-user-at-host 1)
+           liece-user-at-host-type 'ok))
+     (t (setq liece-user-at-host-type 'ok)))))
+
+(defun liece-parse-line (line)
+  (let (prefix message)
+    (when (or (string-match "^\\(:[^! ]*\\)!\\([^ ]*\\) +\\([^ ]+\\) +:?"
+                           line)
+             (string-match "^\\(:[^ ]*\\)?\\(\\) *\\([^ ]+\\) +:?"
+                           line)
+             (string-match "^\\(:[^! \t]*\\)!\\([^ \t]*\\) +\\([^ \t]+\\) +:?"
+                           line)
+             (string-match "^\\(:[^ ]*\\)?\\(\\) *\\([^ \t]+\\) +:?"
+                           line))
+      (setq prefix (if (match-beginning 1)
+                      (substring (match-string 1 line) 1))
+           liece-user-at-host (match-string 2 line)
+           message (downcase (match-string 3 line))
+           line (liece-coding-decode-charset-string
+                 (substring line (match-end 0))))
+      
+      (liece-parse-user-at-host)
+      (setq liece-current-function (list prefix message))
+      (liece-handle-message prefix message line)
+      (setq liece-current-function '("" "")))))
+
+(defun liece-filter (process output)
+  "Filter function for IRC server process."
+  (with-current-buffer (process-buffer process)
+    (goto-char (point-max))
+    (insert (liece-convert-received-input output))
+    (goto-char (point-min))
+    (while (progn (end-of-line) (and (not (eobp)) (eq (char-after) ?\n)))
+      (if (eq (char-after (1- (point))) ?\r) ; cut off preceding LF
+         (delete-region (1- (point)) (point)))
+      (liece-parse-line (buffer-substring (point-min) (point)))
+      (delete-region (point-min) (progn (beginning-of-line 2) (point))))))
+
+(defun liece-sentinel (proc status)
+  "Sentinel function for Liece process."
+  (cond
+   ((or (not liece-server-process) (liece-server-opened)))
+   ((not (or liece-reconnect-automagic liece-reconnect-with-password))
+    (if (process-id proc)
+       (liece-sentinel-error proc status)
+      (liece-message (_ "Connection closed. (%s)")
+                     (substring status 0 (1- (length status)))))
+    (liece-clear-system))
+   (liece-reconnect-with-password
+    (liece))
+   (t
+    (condition-case nil
+       (progn
+         (set-process-filter liece-server-process nil)
+         (set-process-sentinel liece-server-process nil))
+      (wrong-type-argument nil))
+    (setq liece-server-process nil)
+    (liece))))
+
+(defun liece-sentinel-error (proc status)
+  (if (not (string-match "^exited abnormally with code \\([0-9]+\\)" status))
+      (liece-message (_ "Connection closed. (%s)")
+                     (substring status 0 (1- (length status))))
+    (let ((status (string-to-int (match-string 1 status))))
+      (cond
+       ((= 99 status) ;; unsupported command
+        (liece-message (_ "Please use a newer \"%s\".") liece-dcc-program))
+       ((= 98 status) ;; bad argment number
+        (liece-message (_ "Please use a newer \"%s\".") liece-dcc-program))
+       ((= 97 status)
+        (liece-message (_ "Cannot connect to IRC server.")))
+       (t
+        (liece-message (_ "Server connection closed.")))))))
+
+(provide 'liece-filter)
+
+;;; liece-filter.el ends here
diff --git a/lisp/liece-globals.el b/lisp/liece-globals.el
new file mode 100644 (file)
index 0000000..b1e5fde
--- /dev/null
@@ -0,0 +1,216 @@
+;;; liece-globals.el --- Global variables and constants.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(require 'liece-version)
+
+(defvar liece-server-name nil)
+(defvar liece-server-process nil)
+(defvar liece-status-message-string nil)
+(defvar liece-polling 0
+  "Wheter we are automatically polling the server.")
+
+(defvar liece-real-nickname nil)
+(defvar liece-nick-accepted nil)
+
+(defvar liece-current-channel nil
+  "The channel you currently have joined.")
+
+(defvar liece-current-channels nil
+  "The channels you have currently joined.")
+
+(defvar liece-current-chat-partner nil
+  "The person you are in a private conversation with.")
+
+(defvar liece-current-chat-partners nil
+  "An list containing nics user is chatting with.")
+
+(defvar liece-privmsg-partner nil
+  "The person who got your last private message.")
+
+(defvar liece-nick-alist nil
+  "An alist containing the nicknames of users known to be on IRC.
+Each element in the list is a list containing a nickname.")
+
+(defvar liece-channel-alist nil
+  "An alist containing the channels on IRC.
+Each element in the list is  a list containing a channel name.")
+
+(defvar liece-operator-alist nil
+  "An alist of operators on channel.
+Each element in the list is a list containing a nickname.")
+
+(defvar liece-supported-user-mode-alist nil
+  "User modes supported by server.")
+
+(defvar liece-supported-channel-mode-alist nil
+  "Channel modes supported by server.")
+
+;; Caches
+(defvar liece-save-variables-are-dirty nil
+  "Non nil if liece_vars.el is changed but not saved.")
+
+(defvar liece-user-at-host ""
+  "The user@host for the current line.")
+
+(defvar liece-user-at-host-type nil
+  "The authentication of uerathost.  'ok 'not-verified 'fake or 'invalid.")
+
+(defvar liece-channel-filter ""
+  "Enables use of \\[universal-argument] with NAMES and TOPIC.")
+
+(defvar liece-default-channel-candidate nil)
+
+(defvar liece-nickname-last nil
+  "Place to keep old nickname.")
+
+(defvar liece-friends-last nil)
+(defvar liece-who-expression nil)
+
+(defconst liece-long-reply-max 38)
+(defvar liece-long-reply-count 0)
+
+(defvar liece-obarray nil)
+
+\f
+;; Modeline indicators
+(defvar liece-channel-indicator "No channel"
+  "The current channel, \"pretty-printed.\".")
+
+(defvar liece-private-indicator nil
+  "String displayed in the modeline indicating private conversation.")
+
+(defvar liece-channels-indicator "No channel"
+  "The current joined channels, \"pretty-printed.\".")
+
+(defvar liece-away-indicator "-")
+(defvar liece-crypt-indicator "-")
+(defvar liece-command-buffer-mode-indicator "Channels")
+(defvar liece-channel-status-indicator "")
+
+(defvar liece-freeze-indicator nil)
+(defvar liece-own-freeze-indicator nil)
+(defvar liece-freeze nil)
+(defvar liece-own-freeze nil)
+
+(defvar liece-own-freeze nil
+  "If non-nil, dialogue window will not be scrolled automatically.")
+
+(defvar liece-command-buffer-mode 'channel
+  "Current command buffer mode.
+Which value is 'chat or 'channel.")
+
+;; Buffers
+(defvar liece-command-buffer "*Commands*"
+  "Name of command input buffer.")
+
+(defvar liece-dialogue-buffer "*Dialogue*"
+  "Name of dialogue output buffer.")
+
+(defvar liece-private-buffer "*Private*"
+  "Name of private message buffer.")
+
+(defvar liece-others-buffer "*Others*"
+  "Name of others message buffer.")
+
+(defvar liece-channel-buffer "*Channel*"
+  "Name of Channel message buffer.")
+
+(defvar liece-channel-buffer-format " *Channel:%s*"
+  "Format of Channel message buffer.")
+
+(defvar liece-channel-list-buffer "*Channels*"
+  "Name of Channel list buffer.")
+
+(defvar liece-nick-buffer " *Nicks*"
+  "Name of nick list message buffer.")
+
+(defvar liece-nick-buffer-format " *Nicks:%s*"
+  "Format of nick list buffer.")
+
+(defvar liece-KILLS-buffer " *KILLS*")
+(defvar liece-IGNORED-buffer " *IGNORED*")
+(defvar liece-WALLOPS-buffer " *WALLOPS*")
+(defvar liece-CRYPT-buffer " *CRYPT*")
+
+(defvar liece-server-buffer nil)
+
+;; Buffer display variables
+(defvar liece-channel-buffer-alist nil)
+(defvar liece-nick-buffer-alist nil)
+
+(defvar liece-buffer-list nil
+  "A list of buffers used in displaying messages.")
+
+(defvar liece-D-buffer (list liece-dialogue-buffer)
+  "A list of buffer where normal dialogue is sent.")
+
+(defvar liece-O-buffer (list liece-others-buffer)
+  "A list of buffer where other messages are sent.")
+
+(defvar liece-P-buffer
+  (list liece-dialogue-buffer liece-private-buffer liece-others-buffer)
+  "A list of buffers where private messages to me are sent.")
+
+(defvar liece-I-buffer (list liece-IGNORED-buffer)
+  "A list of buffers where private messages to me are sent.")
+
+(defvar liece-W-buffer (list liece-WALLOPS-buffer)
+  "A list of buffers where WALLOPS messages to me are sent.")
+
+(defvar liece-K-buffer (list liece-KILLS-buffer)
+  "A list of buffers where KILL messages to me are sent.")
+
+(defvar liece-C-buffer (list liece-CRYPT-buffer)
+  "A list of buffers where messages that were not decrypted are sent.")
+
+(defvar liece-000-buffer
+  (list liece-dialogue-buffer liece-others-buffer)
+  "A list of buffers where 000 messages to me are sent.")
+
+(defvar liece-200-buffer
+  (list liece-dialogue-buffer liece-others-buffer)
+  "A list of buffers where 200 messages to me are sent.")
+
+(defvar liece-300-buffer
+  (list liece-dialogue-buffer liece-others-buffer)
+  "A list of buffers where 300 messages to me are sent.")
+
+(defvar liece-400-buffer
+  (list liece-dialogue-buffer liece-others-buffer)
+  "A list of buffers where 400 messages to me are sent.")
+
+(defvar liece-500-buffer
+  (list liece-dialogue-buffer liece-others-buffer)
+  "A list of buffers where 500 messages to me are sent.")
+
+(provide 'liece-globals)
+
+;;; liece-globals.el ends here
diff --git a/lisp/liece-handle.el b/lisp/liece-handle.el
new file mode 100644 (file)
index 0000000..374a627
--- /dev/null
@@ -0,0 +1,481 @@
+;;; liece-handle.el --- implementation of IRC message handlers
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile
+  (require 'liece-inlines)
+  (require 'liece-misc)
+  (require 'liece-intl))
+
+(require 'liece-message)
+(require 'liece-filter)
+
+(require 'liece-handler)
+
+(defmacro liece-handle-prepare-comment (rest &optional quote)
+  `(if (zerop (length ,rest))
+       ""
+     (if ,quote
+        (regexp-quote (format " (%s)" ,rest))
+       (format " (%s)" ,rest))))
+
+(defmacro liece-handle-message-check-empty (msg)
+  `(string= ,msg ""))
+
+(defmacro liece-handle-message-check-ignored (prefix rest)
+  `(and ,prefix
+       (liece-ignore-this-p ,prefix liece-user-at-host)
+       (liece-message-from-ignored ,prefix ,rest)))
+
+(defmacro liece-handle-check-changes-ignored ()
+  'liece-ignore-changes)
+
+(defconst liece-handle-ctcp-message-regexp "\001\\(.*\\)\001")
+
+(defmacro liece-handle-ctcp-message-p (msg)
+  `(string-match liece-handle-ctcp-message-regexp ,msg))
+
+(autoload 'liece-ctcp-message "liece-ctcp")
+(autoload 'liece-ctcp-notice "liece-ctcp")
+
+\f
+(liece-handler-define-backend "generic")
+
+(mapcar
+ (lambda (message)
+   (liece-handler-define-function
+    message '(prefix rest "generic")
+    (intern (format "liece-handle-%s-message" message)))
+   (defvar ,(intern (format "liece-%s-hook" message)) nil)
+   (defvar ,(intern (format "liece-after-%s-hook" message)) nil))
+ '("nick" "notice" "privmsg" "ping" "wall" "wallops" "quit" "topic"
+   "mode" "kick" "invite" "kill" "join" "part" "silence"))
+
+(defun* liece-handle-nick-message (prefix rest)
+  (let ((chnls (liece-nick-get-joined-channels prefix)))
+    (liece-nick-change prefix rest)
+    (cond
+     ((liece-nick-equal prefix liece-real-nickname)
+      (setq liece-nickname-last liece-real-nickname
+           liece-real-nickname rest))
+     ((liece-nick-member prefix liece-current-chat-partners)
+      (setq liece-current-chat-partners
+           (string-list-modify-ignore-case (list (cons prefix rest))
+                                           liece-current-chat-partners))
+      (setcar (string-assoc-ignore-case prefix liece-nick-buffer-alist)
+             rest)
+      (setcar (string-assoc-ignore-case prefix liece-channel-buffer-alist)
+             rest)
+      (if (liece-nick-equal prefix liece-current-chat-partner)
+         (setq liece-current-chat-partner rest))
+      (add-to-list 'chnls rest)
+      (liece-channel-change)))
+    (if (liece-handle-check-changes-ignored)
+       (return-from liece-handle-nick-message))
+    (liece-insert-change (append (liece-pick-buffer chnls)
+                                 liece-D-buffer liece-O-buffer)
+                         (format (_ "%s is now known as %s\n") prefix rest))))
+
+(defun* liece-handle-notice-message (prefix rest)
+  (if (liece-handle-message-check-ignored prefix rest)
+      (return-from liece-handle-notice-message))
+  (or liece-ignore-extra-notices
+       prefix
+       (string-match "as being away" rest)
+       (return-from liece-handle-notice-message))
+
+  ;; No prefix. This is a server notice.
+  (when (and (null prefix) (string-match "^[^ ]* +:?" rest))
+    (liece-insert-notice (append liece-D-buffer liece-O-buffer)
+                         (concat (substring rest (match-end 0)) "\n"))
+    (return-from liece-handle-notice-message))
+
+  (with-liece-decryption (rest prefix)
+    (if (run-hook-with-args-until-success 'liece-notice-cleartext-hook
+                                         prefix rest)
+       (return-from liece-handle-notice-message))
+    
+    (multiple-value-bind (chnl temp) (liece-split-line rest)
+      ;; This is a ctcp reply but contains additional messages
+      ;; at the left or/and right side.
+      (if (liece-handle-ctcp-message-p temp)
+         (setq temp (liece-ctcp-notice prefix temp)))
+      (if (liece-handle-message-check-empty temp)
+         (return-from liece-handle-notice-message))
+
+      ;; Normal message via notice.
+      (setq chnl (liece-channel-virtual chnl))
+      (let ((liece-message-target chnl)
+           (liece-message-speaker prefix)
+           (liece-message-type 'notice))
+       (liece-display-message temp)))))
+
+(defun* liece-handle-privmsg-message (prefix rest)
+  (if (liece-handle-message-check-ignored prefix rest)
+      (return-from liece-handle-privmsg-message))
+  (and (string-match "\007" rest) liece-beep-on-bells
+       (beep t))
+  (with-liece-decryption (rest prefix)
+    (if (run-hook-with-args-until-success 'liece-privmsg-cleartext-hook
+                                         prefix rest)
+       (return-from liece-handle-privmsg-message))
+
+    (multiple-value-bind (chnl temp) (liece-split-line rest)
+      (setq temp (or temp ""))
+      ;; This is a ctcp request but contains additional messages
+      ;; at the left or/and right side.
+      (if (liece-handle-ctcp-message-p temp)
+         (setq temp (liece-ctcp-message prefix chnl temp)))
+      (if (liece-handle-message-check-empty temp)
+         (return-from liece-handle-privmsg-message))
+
+      (setq chnl (liece-channel-virtual chnl))
+      
+      ;; Append timestamp if we are being away.
+      (and (string-equal "A" liece-away-indicator)
+          (liece-nick-equal chnl liece-real-nickname)
+          (setq temp
+                (concat temp " ("
+                        (funcall liece-format-time-function (current-time))
+                        ")")))
+      
+      ;; Normal message.
+      (let ((liece-message-target chnl)
+           (liece-message-speaker prefix)
+           (liece-message-type 'privmsg))
+       (liece-display-message temp))
+      
+      (and (liece-nick-equal chnl liece-real-nickname)
+          (not (liece-nick-equal prefix liece-current-chat-partner))
+          (liece-message (_ "A private message has arrived from %s")
+                          prefix)))))
+
+(defun liece-handle-ping-message (prefix rest)
+  (liece-send "PONG :%s" rest)
+  (liece-command-timestamp-if-interval-expired t)
+  (liece-maybe-poll))
+
+(defun liece-handle-wall-message (prefix rest)
+  (liece-insert-broadcast (append liece-D-buffer liece-O-buffer)
+                          (concat (if prefix (concat "from " prefix) "") " "
+                                  rest "\n")))
+
+(defun liece-handle-wallops-message (prefix rest)
+  (if liece-show-wallops
+      (liece-insert-wallops (append liece-D-buffer liece-O-buffer)
+                            (concat (if prefix prefix "UNKNOWN")
+                                    ": " rest "\n")))
+  (liece-insert-wallops liece-W-buffer
+                        (concat (if prefix (concat "from " prefix) "") " "
+                                rest "\n")))
+
+(defun* liece-handle-quit-message (prefix rest)
+  (let ((chnls (liece-nick-get-joined-channels prefix)) text match default)
+    ;; Mark temporary apart, if quitting user is one of our chat partners.
+    (when (liece-nick-member prefix liece-current-chat-partners)
+      (add-to-list 'chnls prefix)
+      (liece-nick-mark-as-apart prefix))
+    (if (liece-handle-check-changes-ignored)
+       (return-from liece-handle-quit-message))
+    (cond
+     (liece-compress-changes
+      (setq text (format (_ " \\(has\\|have\\) left IRC%s")
+                        (liece-handle-prepare-comment rest t))
+           match (format "^%s%s.*%s$"
+                         (if liece-display-time
+                             liece-time-prefix-regexp "")
+                         (regexp-quote liece-change-prefix)
+                         (regexp-quote text))
+           default (format (_ "%s%s has left IRC%s\n")
+                           liece-change-prefix prefix
+                           (liece-handle-prepare-comment rest)))
+      (liece-replace (append (liece-pick-buffer chnls)
+                             liece-D-buffer liece-O-buffer)
+                     match default text
+                     (format (_ ", %s have left IRC%s")
+                             prefix (liece-handle-prepare-comment rest))))
+     (t
+      (liece-insert-change (append (liece-pick-buffer chnls)
+                                   liece-D-buffer liece-O-buffer)
+                           (format (_ "%s has left IRC%s\n")
+                                   (liece-handle-prepare-comment rest)))))
+    (liece-nick-change prefix nil)))
+
+(defun* liece-handle-topic-message (prefix rest)
+  (multiple-value-bind (chnl topic) (liece-split-line rest)
+    (setq chnl (liece-channel-virtual chnl)
+         topic (or topic ""))
+    (liece-channel-set-topic topic chnl)
+    (if (liece-handle-check-changes-ignored)
+       (return-from liece-handle-topic-message))
+    (liece-insert-change (liece-pick-buffer chnl)
+                         (format (_ "New topic on channel %s set by %s: %s\n")
+                                 chnl prefix topic))
+    (liece-insert-change (if (liece-nick-equal chnl liece-current-channel)
+                             liece-D-buffer
+                           (append liece-D-buffer liece-O-buffer))
+                         (format (_ "New topic on channel %s set by %s: %s\n")
+                                 chnl prefix topic))
+    (liece-set-channel-indicator)))
+
+(defun* liece-handle-mode-message (prefix rest)
+  (if (liece-handle-check-changes-ignored)
+      (return-from liece-handle-mode-message))
+  (let ((chnl " ") (str "") mflag mflags marg margs val md chnlp)
+    (or (and (string-match "\\([^ ]*\\) +:?" rest)
+            (setq chnl (match-string 1 rest)
+                  str (substring rest (match-end 0))
+                  chnlp (liece-channel-p chnl)
+                  str (if (= (aref str (1- (length str))) ? )
+                          (substring str 0 -1) str)
+                  chnl (liece-channel-virtual chnl)))
+       (and (string-match " +:" rest)
+            (setq str (substring rest (match-end 0))))
+       (return-from liece-handle-mode-message))
+
+    ;; parse modes
+    (when (string-match "\\([^ ]*\\) +" str)
+      (setq mflag (match-string 1 str)
+           marg (substring str (match-end 0))
+           mflags (string-to-char-list mflag))
+      (while (string-match "^\\([^ ]*\\) +" marg)
+       (setq margs (cons (match-string 1 marg) margs)
+             marg (substring marg (match-end 0))))
+      (or (string= marg "") (setq margs (cons marg margs)))
+      (while (setq md (pop mflags))
+       (cond ((eq ?- md) (setq val nil))
+             ((eq ?+ md) (setq val t))
+             ((eq ?o md) (liece-channel-set-operator chnl (pop margs) val))
+             ((eq ?v md) (liece-channel-set-voice chnl (pop margs) val))
+             ((eq ?b md) (liece-channel-set-ban chnl (pop margs) val))
+             ((eq ?e md) (liece-channel-set-exception chnl (pop margs) val))
+             ((eq ?I md) (liece-channel-set-invite chnl (pop margs) val))
+             (chnlp (liece-channel-set-mode val md chnl))
+             (t (liece-nick-set-mode val md chnl)))))
+    
+    (liece-set-channel-indicator)
+    (cond
+     (liece-compress-changes
+      (let* ((text (concat (regexp-quote rest) "\n"))
+            (match (format (_ "^%s%sNew mode for %s set by %s: ")
+                           (if liece-display-time
+                               liece-time-prefix-regexp "")
+                           (regexp-quote liece-change-prefix)
+                           (regexp-quote chnl) (regexp-quote prefix)))
+            (default (format (_ "%sNew mode for %s set by %s: %s\n")
+                             liece-change-prefix chnl prefix str)))
+       (liece-replace (liece-pick-buffer chnl)
+                       match default text (concat ", " str "\n"))
+       (liece-replace (if (and liece-current-channel
+                                (liece-channel-equal
+                                 chnl liece-current-channel))
+                           liece-D-buffer
+                         (append liece-D-buffer liece-O-buffer))
+                       match default text (concat ", " str "\n"))))
+     (t
+      (liece-insert-change (liece-pick-buffer chnl)
+                           (format (_ "New mode for %s set by %s: %s\n")
+                                   chnl prefix str))
+      (liece-insert-change (if (and liece-current-channel
+                                    (liece-channel-equal
+                                     chnl liece-current-channel))
+                               liece-D-buffer
+                             (append liece-D-buffer liece-O-buffer))
+                           (format (_ "New mode for %s set by %s: %s\n")
+                                   chnl prefix str))))))
+
+(defun* liece-handle-kick-message (prefix rest)
+  (if (/= 3 (length (setq rest (liece-split-line rest))))
+      (return-from liece-handle-kick-message))
+  (multiple-value-bind (chnl nick message) rest
+    (setq chnl (liece-channel-virtual chnl))
+    
+    (if (liece-nick-equal nick liece-real-nickname)
+       (progn
+         (liece-insert-change
+          (liece-pick-buffer chnl)
+          (format (_ "You were kicked off channel %s by %s (%s).\n")
+                  chnl prefix message))
+         (liece-channel-part chnl))
+      (liece-nick-part nick chnl))
+    
+    (if (liece-handle-check-changes-ignored)
+       (return-from liece-handle-kick-message))
+
+    (liece-insert-change
+     (append (liece-pick-buffer chnl)
+            (if (liece-channel-equal chnl liece-current-channel)
+                liece-D-buffer
+              (append liece-D-buffer liece-O-buffer)))
+     (format "%s has kicked %s out%s%s\n"
+            prefix nick
+            (if (string= (or liece-current-channel "") chnl)
+                ""
+              (format " from channel %s" chnl))
+            (if (not message)
+                ""
+              (format " (%s)" message))))))
+
+(defun* liece-handle-invite-message (prefix rest)
+  (or (string-match " +:" rest)
+      (return-from liece-handle-invite-message))
+  (let ((chnl (liece-channel-virtual (substring rest (match-end 0)))))
+    (liece-insert-info (append liece-D-buffer liece-O-buffer)
+                       (format "%s invites you to channel %s\n"
+                               prefix chnl))
+    (setq liece-default-channel-candidate chnl)))
+
+(defun* liece-handle-kill-message (prefix rest)
+  (or (string-match " +:" rest)
+      (return-from liece-handle-kill-message))
+  (let ((path (substring rest (match-end 0))))
+    (liece-insert-info (append liece-D-buffer liece-O-buffer)
+                       (format "You were killed by %s. (Path: %s. RIP)\n"
+                               prefix path)))
+  (liece-clear-system))
+
+(defun* liece-handle-join-message (prefix rest)
+  (let (flag (xnick prefix) (nick prefix) (chnl rest))
+    (cond
+     ((string-match "\007[ov]" chnl)
+      (setq flag (aref (match-string 0 chnl) 1)
+           chnl (substring rest 0 (match-beginning 0))))
+     ((string-match " +$" chnl)
+      (setq chnl (substring chnl 0 (match-beginning 0)))))
+    (setq chnl (liece-channel-virtual chnl))
+    
+    (liece-nick-set-user-at-host nick liece-user-at-host)
+    
+    (if (liece-nick-equal nick liece-real-nickname)
+       (progn
+         (and liece-gather-channel-modes
+              (not (liece-channel-modeless-p (liece-channel-real chnl)))
+              (liece-send "MODE %s " (liece-channel-real chnl)))
+         (liece-channel-join chnl))
+      (liece-nick-join nick chnl))
+    
+    (cond
+     ((eq flag ?o)
+      (liece-channel-set-operator chnl xnick t)
+      (setq xnick (concat "@" xnick)))
+     ((eq flag ?v)
+      (liece-channel-set-voice chnl xnick t)
+      (setq xnick (concat "+" xnick))))
+    
+    (if (liece-handle-check-changes-ignored)
+       (return-from liece-handle-join-message))
+    
+    (when (and (liece-nick-member nick liece-current-chat-partners)
+              (get (intern nick liece-obarray) 'part))
+      (liece-insert-change (liece-pick-buffer nick)
+                           (format (_ "%s has come back as (%s)\n")
+                                   nick liece-user-at-host))
+      (liece-nick-unmark-as-apart nick))
+    
+    (cond
+     (liece-compress-changes
+      (let* ((text (format (_ " \\(has\\|have\\) joined channel %s")
+                          (regexp-quote chnl)))
+            (match (format "^%s%s.*%s$"
+                           (if liece-display-time
+                               liece-time-prefix-regexp "")
+                           (regexp-quote liece-change-prefix)
+                           (regexp-quote text)))
+            (default (format (_ "%s%s (%s) has joined channel %s\n")
+                             liece-change-prefix
+                             nick liece-user-at-host chnl)))
+       (liece-replace (liece-pick-buffer chnl)
+                       match default text
+                       (format (_ ", %s (%s) have joined channel %s")
+                               nick liece-user-at-host chnl))
+       (liece-replace (if (and liece-current-channel
+                                (liece-channel-equal chnl
+                                                      liece-current-channel))
+                           liece-D-buffer
+                         (append liece-D-buffer liece-O-buffer))
+                       match default text
+                       (format (_ ", %s (%s) have joined channel %s")
+                               nick liece-user-at-host chnl))))
+     (t
+      (liece-insert-change (liece-pick-buffer chnl)
+                           (format (_ "%s (%s) has joined channel %s\n")
+                                   nick liece-user-at-host chnl))
+      (liece-insert-change (if (liece-channel-equal chnl
+                                                     liece-current-channel)
+                               liece-D-buffer
+                             (append liece-D-buffer liece-O-buffer))
+                           (format (_ "%s (%s) has joined channel %s\n")
+                                   nick liece-user-at-host chnl))))))
+
+(defun* liece-handle-part-message (prefix rest)
+  (multiple-value-bind (chnl comment text match default buf) (liece-split-line rest)
+    (setq chnl (liece-channel-virtual chnl)
+         comment (liece-handle-prepare-comment comment))
+    
+    (if (liece-nick-equal prefix liece-real-nickname)
+       (liece-channel-part chnl)
+      (liece-nick-part prefix chnl))
+    
+    (if (liece-handle-check-changes-ignored)
+       (return-from liece-handle-part-message))
+    
+    (setq buf (append liece-D-buffer (liece-pick-buffer chnl)))
+    (unless (and liece-current-channel
+                (liece-channel-equal chnl liece-current-channel))
+      (setq buf (append buf liece-O-buffer)))
+    (cond
+     (liece-compress-changes
+      (setq text (format (_ " \\(has\\|have\\) left channel %s%s")
+                        (regexp-quote chnl) (regexp-quote comment))
+           match (format "^%s%s.*%s$"
+                         (if liece-display-time
+                             liece-time-prefix-regexp "")
+                         (regexp-quote liece-change-prefix)
+                         (regexp-quote text))
+           default (format (_ "%s%s has left channel %s%s\n")
+                           liece-change-prefix prefix chnl comment))
+      (liece-replace buf
+                     match default text
+                     (format (_ ", %s have left channel %s%s")
+                             prefix chnl comment)))
+     (t
+      (liece-insert-change buf
+                           (format (_ "%s has left channel %s%s\n")
+                                   prefix chnl comment))))))
+    
+(defun* liece-handle-silence-message (prefix rest)
+  (let* ((flag (aref rest 0)) (rest (substring rest 1)))
+    (liece-insert-info (append liece-D-buffer liece-O-buffer)
+                       (concat "User " rest
+                               (if (eq flag ?-) "unsilenced" "silenced")))))
+
+(provide 'liece-handle)
+
+;;; liece-handle.el ends here
diff --git a/lisp/liece-handler.el b/lisp/liece-handler.el
new file mode 100644 (file)
index 0000000..b085fe9
--- /dev/null
@@ -0,0 +1,87 @@
+;;; liece-handler.el --- function overloading facilities
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-06-05
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile (require 'cl))
+
+(eval-when-compile (require 'liece-inlines))
+
+(eval-when-compile (require 'liece-clfns))
+
+(defmacro liece-handler-make-obarray (backend)
+  `(defvar ,(intern (format "liece-handler-%s-obarray" backend))
+     (make-vector 107 0)))
+
+(defmacro liece-handler-obarray (backend)
+  `(symbol-value (intern-soft (format "liece-handler-%s-obarray" ,backend))))
+
+(defun liece-handler-override-function-definition (name backend args function)
+  (let ((ref (symbol-name (liece-gensym))))
+    (if (symbolp name)
+       (setq name (symbol-name name)))
+    (put (intern name (liece-handler-obarray backend)) 'unifiers
+        (nconc (get (intern name (liece-handler-obarray backend)) 'unifiers)
+               (list `(,(intern ref (liece-handler-obarray backend))
+                       ,@args))))
+    (fset (intern ref (liece-handler-obarray backend)) function)))
+
+(defun liece-handler-unify-argument-list-function (args unifiers)
+  (let ((index 0)
+       (unfs (copy-alist unifiers))
+       (len (length args))
+       type)
+    (setq unfs
+         (remove-if (lambda (unf) (/= (length (cdr unf)) len)) unfs))
+    (dolist (arg args)
+      (if (listp arg)
+         (setq unfs (remove-if-not
+                     (lambda (unf)
+                       (let ((spec (nth index (cdr unf))))
+                         (or (not (listp spec))
+                             (eq (car spec) (car arg)))))
+                     unfs)))
+      (incf index))
+    (if (caar unfs)
+       (symbol-function (caar unfs)))))
+
+(defmacro liece-handler-define-backend (type &optional parents)
+  `(liece-handler-make-obarray ,type))
+
+(defun liece-handler-find-function (name args backend)
+  (let* ((fsym (intern-soft name (liece-handler-obarray backend)))
+        (unifiers (if fsym (get fsym 'unifiers))))
+    (liece-handler-unify-argument-list-function args unifiers)))
+
+(defun liece-handler-define-function (name specs function)
+  (let ((args (butlast specs))
+       (backend (car (last specs))))
+    (liece-handler-override-function-definition name backend args function)))
+
+(provide 'liece-handler)
+
+;;; liece-handler.el ends here
diff --git a/lisp/liece-hilit.el b/lisp/liece-hilit.el
new file mode 100644 (file)
index 0000000..dea3e80
--- /dev/null
@@ -0,0 +1,446 @@
+;;; liece-hilit.el --- coloring IRC buffers
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(require 'invisible)
+
+(eval-when-compile
+  (require 'liece-inlines)
+  (require 'font-lock))
+
+(autoload 'liece-url-add-buttons "liece-url")
+(autoload 'liece-channel-add-buttons "liece-channel")
+(autoload 'liece-nick-add-buttons "liece-nick")
+
+(defgroup liece-highlight nil
+  "Highlight your IRC buffer"
+  :tag "Highlight"
+  :prefix "liece-"
+  :group 'liece)
+
+(defgroup liece-highlight-faces nil
+  "Faces for highlight your IRC buffer"
+  :tag "Faces"
+  :prefix "liece-highlight-"
+  :group 'liece-highlight)
+
+(defcustom liece-change-face 'liece-change-face
+  "Face used for displaying \"*** Change:\" line."
+  :type 'face
+  :group 'liece-highlight-faces)
+
+(defcustom liece-notice-face 'liece-notice-face
+  "Face used for displaying \"*** Notice:\" line."
+  :type 'face
+  :group 'liece-highlight-faces)
+
+(defcustom liece-broadcast-face 'liece-broadcast-face
+  "Face used for displaying \"*** Broadcast:\" line."
+  :type 'face
+  :group 'liece-highlight-faces)
+
+(defcustom liece-wallops-face 'liece-wallops-face
+  "Face used for displaying \"*** Wallops:\" line."
+  :type 'face
+  :group 'liece-highlight-faces)
+  
+(defcustom liece-error-face 'liece-error-face
+  "Face used for displaying \"*** Error:\" line."
+  :type 'face
+  :group 'liece-highlight-faces)
+
+(defcustom liece-info-face 'liece-info-face
+  "Face used for displaying \"*** Info:\" line."
+  :type 'face
+  :group 'liece-highlight-faces)
+
+(defcustom liece-timestamp-face 'liece-timestamp-face
+  "Face used for displaying \"*** Time:\" line."
+  :type 'face
+  :group 'liece-highlight-faces)
+
+(defcustom liece-client-face 'liece-client-face
+  "Face used for displaying \"CLIENT@\" line."
+  :type 'face
+  :group 'liece-highlight-faces)
+
+(defcustom liece-dcc-face 'liece-dcc-face
+  "Face used for displaying \"*** DCC:\" line."
+  :type 'face
+  :group 'liece-highlight-faces)
+
+(defcustom liece-prefix-face 'liece-prefix-face
+  "Face used for displaying \"<nick>\" extent."
+  :type 'face
+  :group 'liece-highlight-faces)
+
+(defcustom liece-priv-prefix-face 'liece-priv-prefix-face
+  "Face used for displaying \"=nick\" line."
+  :type 'face
+  :group 'liece-highlight-faces)
+
+(defcustom liece-pattern-face 'liece-pattern-face
+  "Face used for displaying user defined pattern."
+  :type 'face
+  :group 'liece-highlight-faces)
+
+(defcustom liece-quoted-bold-face 'liece-quoted-bold-face
+  "Face used for displaying \002 quoted string."
+  :type 'face
+  :group 'liece-highlight-faces)
+
+(defcustom liece-quoted-inverse-face 'liece-quoted-inverse-face
+  "Face used for displaying \026 quoted string."
+  :type 'face
+  :group 'liece-highlight-faces)
+
+(defcustom liece-quoted-underline-face 'liece-quoted-underline-face
+  "Face used for displaying \037 quoted string."
+  :type 'face
+  :group 'liece-highlight-faces)
+
+(defcustom liece-quoted-colors-ircle
+  '("white" "black" "red" "orange" "yellow" "LightGreen" "DarkOliveGreen"
+    "cyan4" "turquoise" "blue" "black" "black" "black" "black" "black"
+    "DarkBlue" "purple1" "purple2" "purple3" "magenta")
+  "Color list for displaying \003 quoted string."
+  :type '(list (radio string face))
+  :group 'liece-highlight)
+
+(defcustom liece-quoted-colors-mirc
+  '("white" "black" "blue" "DarkOliveGreen" "red" "brown" "purple"
+    "orange" "yellow" "green" "cyan4" "turquoise" "RoyalBlue" "HotPink"
+    "gray50" "gray75" "black" "black" "black" "black")
+  "Color list for displaying \013 quoted string."
+  :type '(list (radio string face))
+  :group 'liece-highlight)
+  
+(defcustom liece-highlight-jingle-function nil
+  "Function playing jingles."
+  :type 'function
+  :group 'liece-highlight)
+
+(defface liece-change-face
+  '((((class color)
+      (background dark))
+     (:foreground "cyan" :bold t))
+    (((class color)
+      (background light))
+     (:foreground "RoyalBlue" :bold t))
+    (t
+     (:bold t)))
+  "Face used for displaying \"*** Change:\" line"
+  :group 'liece-highlight-faces)
+
+(defface liece-notice-face
+  '((((class color)
+      (background dark))
+     (:foreground "green2" :bold t))
+    (((class color)
+      (background light))
+     (:foreground "MidnightBlue" :bold t))
+    (t
+     (:bold t)))
+  "Face used for displaying \"*** Notice:\" line"
+  :group 'liece-highlight-faces)
+
+(defface liece-broadcast-face
+  '((((class color)
+      (background dark))
+     (:foreground "Plum1" :italic t))
+    (((class color)
+      (background light))
+     (:foreground "purple" :italic t))
+    (t
+     (:italic t)))
+  "Face used for displaying \"*** Broadcast:\" line"
+  :group 'liece-highlight-faces)
+
+(defface liece-wallops-face
+  '((((class color)
+      (background dark))
+     (:foreground "yellow" :bold t))
+    (((class color)
+      (background light))
+     (:foreground "blue4" :bold t))
+    (t
+     (:bold t)))
+  "Face used for displaying \"*** Wallops:\" line"
+  :group 'liece-highlight-faces)
+
+(defface liece-error-face
+  '((((class color)
+      (background dark))
+     (:foreground "cornflower blue" :bold t))
+    (((class color)
+      (background light))
+     (:foreground "DarkGreen"))
+    (t
+     (:bold t)))
+  "Face used for displaying \"*** Error:\" line"
+  :group 'liece-highlight-faces)
+
+(defface liece-info-face
+  '((((class color)
+      (background dark))
+     (:foreground "PaleTurquoise" :bold t))
+    (((class color)
+      (background light))
+     (:foreground "RoyalBlue"))
+    (t
+     (:bold t)))
+  "Face used for displaying \"*** Info:\" line"
+  :group 'liece-highlight-faces)
+
+(defface liece-timestamp-face
+  '((((class color)
+      (background dark))
+     (:foreground "yellow" :bold t))
+    (((class color)
+      (background light))
+     (:foreground "blue4" :bold t))
+    (t
+     (:bold t)))
+  "Face used for displaying \"*** Time:\" line"
+  :group 'liece-highlight-faces)
+
+(defface liece-client-face
+  '((((class color)
+      (background dark))
+     (:foreground "orange"))
+    (((class color)
+      (background light))
+     (:foreground "red"))
+    (t
+     (:bold nil)))
+  "Face used for displaying \"CLIENT@\" line"
+  :group 'liece-highlight-faces)
+
+(defface liece-dcc-face
+  '((((class color)
+      (background dark))
+     (:foreground "orange"))
+    (((class color)
+      (background light))
+     (:foreground "red"))
+    (t
+     (:bold nil)))
+  "Face used for displaying \"*** DCC:\" line"
+  :group 'liece-highlight-faces)
+
+(defface liece-prefix-face
+  '((((class color)
+      (background dark))
+     (:foreground "moccasin"))
+    (((class color)
+      (background light))
+     (:foreground "firebrick"))
+    (t
+     (:bold nil)))
+  "Face used for displaying \"<nick>\" extent"
+  :group 'liece-highlight-faces)
+
+(defface liece-priv-prefix-face
+  '((((class color)
+      (background dark))
+     (:foreground "orange"))
+    (((class color)
+      (background light))
+     (:foreground "grey40"))
+    (t
+     (:bold nil)))
+  "Face used for displaying \"=nick\" line"
+  :group 'liece-highlight-faces)
+
+(defface liece-pattern-face
+  '((((class color)
+      (background dark))
+     (:foreground "red"))
+    (((class color)
+      (background light))
+     (:foreground "red"))
+    (t
+     (:bold nil)))
+  "Face used for displaying user defined pattern"
+  :group 'liece-highlight-faces)
+
+(defface liece-quoted-bold-face
+  '((t (:bold t)))
+  "Face used for displaying \002 quoted string"
+  :group 'liece-highlight-faces)
+
+(defface liece-quoted-inverse-face
+  '((t (:inverse-video t)))
+  "Face used for displaying \026 quoted string"
+  :group 'liece-highlight-faces)
+
+(defface liece-quoted-underline-face
+  '((t (:underline t)))
+  "Face used for displaying \037 quoted string"
+  :group 'liece-highlight-faces)
+
+(defcustom liece-highlight-font-lock-keywords
+  (append
+   ;; setting property occurred once
+   (list
+    `(,(concat
+       "^\\(" liece-time-prefix-regexp "\\)?"
+       "\\(\\([][<>(-][][<>(-]?[^ <>)]*[][<>)-][][<>)-]?\\)\\|"
+       "\\(=[^ ]*=\\|\\*\\*[^ \*]*\\*\\*\\)\\) ")
+      (3 liece-prefix-face append t)
+      (4 liece-priv-prefix-face append t)
+      ("\\(\002\\)\\([^\002\026\037\003]*\\)" nil nil
+       (2 liece-quoted-bold-face t t))
+      ("\\(\026\\)\\([^\002\026\037\003]*\\)" nil nil
+       (2 liece-quoted-inverse-face t t))
+      ("\\(\037\\)\\([^\002\026\037\003]*\\)" nil nil
+       (2 liece-quoted-underline-face t t))))
+   ;; set property whole line
+   (mapcar
+    (lambda (line)
+      (cons
+       (concat
+       "^\\(" liece-time-prefix-regexp "\\)?\\("
+       (regexp-quote
+        (symbol-value (intern (format "liece-%s-prefix" line))))
+       ".*\\)$")
+       (list 2 (intern (format "liece-%s-face" line)) t t)))
+    '(change notice broadcast wallops error info timestamp client dcc))
+   '((eval . (cons liece-highlight-pattern liece-pattern-face))))
+  "Normal and deformed faces for IRC normal line."
+  :type '(repeat (list string))
+  :group 'liece-highlight)
+
+(put 'liece-channel-mode 'font-lock-defaults
+     '(liece-highlight-font-lock-keywords t))
+(put 'liece-others-mode 'font-lock-defaults
+     '(liece-highlight-font-lock-keywords t))
+(put 'liece-dialogue-mode 'font-lock-defaults
+     '(liece-highlight-font-lock-keywords t))
+
+(defadvice font-lock-mode
+  (around liece-replace-space-in-buffer-name activate)
+  (if (char-equal (aref (buffer-name) 0) ? )
+      (unwind-protect
+         (progn
+           (aset (buffer-name) 0 ?_)
+           ad-do-it)
+       (aset (buffer-name) 0 ? ))
+    ad-do-it))
+
+(add-hook 'liece-after-load-startup-hook
+         'liece-highlight-maybe-turn-on-font-lock)
+
+(defun liece-highlight-maybe-turn-on-font-lock ()
+  (when liece-highlight-mode
+    (add-hook 'liece-channel-mode-hook
+             'liece-highlight-turn-on-font-lock)
+    (add-hook 'liece-others-mode-hook
+             'liece-highlight-turn-on-font-lock)
+    (add-hook 'liece-dialogue-mode-hook
+             'liece-highlight-turn-on-font-lock)
+    (add-hook 'liece-insert-hook 'liece-url-add-buttons)
+    (add-hook 'liece-insert-hook 'liece-channel-add-buttons)
+    ;;(add-hook 'liece-insert-hook 'liece-nick-add-buttons)
+    ))
+
+(defun liece-highlight-turn-on-font-lock ()
+  (make-local-variable 'font-lock-defaults)
+  (setq font-lock-defaults '(liece-highlight-font-lock-keywords t))
+  (make-local-variable 'font-lock-verbose)
+  (setq font-lock-verbose nil)
+  (make-local-variable 'font-lock-support-mode)
+  (setq font-lock-support-mode nil)
+  (make-local-hook 'font-lock-mode-hook)
+  (setq font-lock-mode-hook nil)
+  (turn-on-font-lock)
+  (make-local-hook 'after-change-functions)
+  (or liece-display-prefix-tag
+      (add-hook 'after-change-functions
+               'liece-highlight-maybe-hide-prefix nil 'local))
+  (add-hook 'after-change-functions
+           'liece-highlight-colorize-quote nil 'local)
+  (add-hook 'after-change-functions
+           'liece-highlight-maybe-hide-quote 'append 'local)
+  (when (and (eq major-mode 'liece-dialogue-mode)
+            (liece-functionp liece-highlight-jingle-function))
+    (add-hook 'after-change-functions
+             'liece-highlight-maybe-play-jingle 'append 'local)))
+
+(defun liece-highlight-maybe-hide-prefix (st nd len)
+  (save-excursion
+    (goto-char st)
+    (if (looking-at liece-generic-prefix-tag-regexp)
+       (invisible-region
+        (match-beginning 1) (match-end 1)))))
+
+(defun liece-highlight-maybe-hide-quote (st nd len)
+  (save-excursion
+    (goto-char st)
+    (while (re-search-forward "[\002\026\037]\\|[\003\013][0-9:;<=]+" nd t)
+      (invisible-region
+       (match-beginning 0) (match-end 0)))))
+
+(defun liece-highlight-maybe-play-jingle (st nd len)
+  (save-excursion
+    (goto-char st)
+    (when (re-search-forward
+          (if (listp liece-highlight-pattern)
+              (car liece-highlight-pattern)
+            liece-highlight-pattern)
+          nd t)
+      (funcall liece-highlight-jingle-function))))
+
+(defun liece-highlight-colorize-quote (st nd len)
+  (save-excursion
+    (goto-char st)
+    (let (num face faces vender name ovl)
+      (while (re-search-forward "\\([\003\013][0-9:;<=]+\\)\\([^\002\026\037\003\013]*\\)" nd t)
+       (setq ovl (make-overlay (match-beginning 2) (match-end 2))
+             num (match-string 1)
+             vender (cond ((eq ?\003 (aref num 0)) 'ircle)
+                          ((eq ?\013 (aref num 0)) 'mirc))
+             num (if (< 57 (char-int (aref num 1)))
+                     (- (char-int (aref num 1)) 43)
+                   (string-to-int (substring num 1)))
+             faces (nthcdr num (symbol-value
+                                (intern (format "liece-quoted-colors-%s"
+                                                vender))))
+             face (car faces))
+       (when (stringp face)
+         (setq face (make-face (intern (format "liece-quoted-color-%s-%d"
+                                               vender num))))
+         (set-face-foreground face (car faces))
+         (setcar faces face))
+       (overlay-put ovl 'face face)))))
+
+(provide 'liece-hilit)
+
+;;; liece-hilit.el ends here
diff --git a/lisp/liece-inlines.el b/lisp/liece-inlines.el
new file mode 100644 (file)
index 0000000..e572b9e
--- /dev/null
@@ -0,0 +1,206 @@
+;;; liece-inlines.el --- Inline macros for various use.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(require 'liece-globals)
+(require 'liece-compat)
+(require 'liece-setup)
+(require 'liece-vars)
+
+(eval-when-compile (require 'liece-clfns))
+
+;;; @ string functions
+;;;
+(defmacro string-times (str n)
+  `(apply #'concat (make-list ,n ,str)))
+
+(defmacro string-join (strlst &optional del)
+  `(mapconcat #'identity ,strlst ,del))
+
+(defsubst string-equal-ignore-case (s1 s2)
+  (string-equal (upcase s1) (upcase s2)))
+
+(defsubst string-list-member-ignore-case (thing list)
+  "Returns t if thing is member of list, not funcallable"
+  (member-if
+   (lambda (item)
+     (and (stringp item) (string-equal-ignore-case thing item)))
+   list))
+
+(defsubst string-list-member (thing list)
+  "Returns t if thing is member of list, not funcallable"
+  (member-if
+   (lambda (item)
+     (and (stringp item) (string-equal thing item)))
+   list))
+
+(defsubst string-list-remove-ignore-case (thing list)
+  (remove-if
+   (lambda (item)
+     (and (stringp item) (string-equal-ignore-case item thing)))
+   list))
+
+(defsubst string-list-delete-ignore-case (thing list)
+  (delete-if
+   (lambda (item)
+     (and (stringp item) (string-equal-ignore-case item thing)))
+   list))
+
+(defsubst string-list-remove (thing list)
+  (remove-if
+   (lambda (item)
+     (and (stringp item) (string-equal item thing)))
+   list))
+
+(defsubst string-list-delete (thing list)
+  (delete-if
+   (lambda (item)
+     (and (stringp item) (string-equal item thing)))
+   list))
+
+(defsubst string-list-modify-ignore-case (modifiers list)
+  (dolist (modifier modifiers)
+    (let ((p list))
+      (while p
+       (if (string-equal-ignore-case (car modifier) (car p))
+           (setcar p (cdr modifier)))
+       (setq p (cdr p)))))
+  list)
+
+(defsubst string-assoc-ignore-case (key list)
+  (assoc-if
+   (lambda (item) (string-equal-ignore-case item key))
+   list))
+
+(defsubst regexp-assoc-ignore-case (key list)
+  "Assoc with REGEXP-KEY from LIST."
+  (save-match-data
+    (assoc-if
+     (lambda (item)
+       (string-match (concat "^" (upcase key)) "$") (upcase item))
+     list)))
+
+(defsubst regexp-rassoc-ignore-case (key list)
+  "Assoc with KEY from LIST, in which keys are regexps."
+  (rassoc-if
+   (lambda (item)
+     (string-match (concat "^" (upcase key) "$") (upcase item)))
+   list))
+
+(defmacro list-to-alist (list)
+  `(mapcar #'list ,list))
+
+(put 'filter-elements 'lisp-indent-function 2)
+
+(defmacro filter-elements (element list condition)
+  `(let (result tail ,element)
+     (setq tail ,list)
+     (while tail
+       (setq ,element (car tail))
+       (if ,condition
+          (setq result (cons ,element result)))
+       (setq tail (cdr tail)))
+     (nreverse result)))
+
+\f
+;;; @ helper functions
+;;;
+(defmacro liece-functionp (form)
+  `(or (and (symbolp ,form) (fboundp ,form))
+       (and (listp ,form) (eq (car ,form) 'lambda))
+       (byte-code-function-p ,form)))
+
+(defun liece-eval-form (form)
+  (cond
+   ((and (listp form) (liece-functionp (car form)))
+    (eval form))
+   ((and (symbolp form) (boundp form))
+    (symbol-value form))
+   (t form)))
+
+(defun liece-or (&rest elems)
+  "Return non-nil if any of the elements are non-nil."
+  (catch 'found
+    (while elems
+      (when (pop elems)
+        (throw 'found t)))))
+
+(defun liece-and (&rest elems)
+  "Return non-nil if all of the elements are non-nil."
+  (catch 'found
+    (while elems
+      (unless (pop elems)
+        (throw 'found nil)))
+    t))
+
+(defun liece-locate-path (subdir &optional filename)
+  (let ((dir (liece-locate-data-directory
+             (downcase (product-name (product-find 'liece-version))))))
+    (when (and dir (file-directory-p dir))
+      (if filename
+         (expand-file-name filename (concat dir subdir))
+       (concat dir subdir)))))
+
+(defun liece-locate-icon-file (filename)
+  (if (null liece-icon-directory)
+      (setq liece-icon-directory (liece-locate-path "icons")))
+  (setq filename (expand-file-name filename liece-icon-directory))
+  (if (and filename (file-exists-p filename))
+      filename))
+
+(defmacro liece-next-line (arg)
+  `(let ((i 0))
+     (while (< i ,arg)
+       (if (eobp) (newline)(next-line 1))
+       (setq i (1+ i)))))
+
+;; Borrowed from `edebug.el'.
+(defvar liece-gensym-index 0
+  "Integer used by `liece-gensym' to produce new names.")
+
+(defun liece-gensym (&optional prefix)
+  "Generate a fresh uninterned symbol.
+There is an  optional argument, PREFIX.  PREFIX is the
+string that begins the new name. Most people take just the default,
+except when debugging needs suggest otherwise."
+  (if (null prefix)
+      (setq prefix "G"))
+  (let ((newsymbol nil)
+        (newname   ""))
+    (while (not newsymbol)
+      (setq newname (concat prefix (int-to-string liece-gensym-index))
+           liece-gensym-index (1+ liece-gensym-index))
+      (if (not (intern-soft newname))
+          (setq newsymbol (make-symbol newname))))
+    newsymbol))
+
+(provide 'liece-inlines)
+
+;;; liece-inlines.el ends here
diff --git a/lisp/liece-intl.el b/lisp/liece-intl.el
new file mode 100644 (file)
index 0000000..78b9f66
--- /dev/null
@@ -0,0 +1,74 @@
+;;; liece-intl.el --- Localized messages for IRC.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-12-30
+;; Revised: 1999-09-03
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile
+  (require 'cl)
+  (require 'liece-compat))
+
+(require 'gettext)
+
+(defgroup liece-intl nil
+  "Convert messages to localized them"
+  :group 'liece-vars)
+
+(defcustom liece-intl-catalogue-directory nil
+  "Normal position of PO files."
+  :type 'directory
+  :group 'liece-intl)
+
+(defcustom liece-intl-use-localized-messages t
+  "If non-nil display localized messages."
+  :type 'boolean
+  :group 'liece-intl)
+  
+(defvar liece-intl-message-alist nil)
+(defvar liece-intl-default-mime-charset 'x-ctext)
+(defvar liece-intl-mime-charset nil)
+(defvar liece-intl-domain "liece")
+
+;;;###liece-autoload
+(defmacro liece-intl-get-msgstr (msgid)
+  `(if liece-intl-use-localized-messages
+       (dgettext liece-intl-domain ,msgid)
+     ,msgid))
+
+;;;###liece-autoload
+(defalias '_ 'liece-intl-get-msgstr)
+
+(defun liece-intl-load-catalogue ()
+  (if (null liece-intl-catalogue-directory)
+      (setq liece-intl-catalogue-directory
+           (liece-locate-path "po")))
+  (bind-text-domain liece-intl-domain liece-intl-catalogue-directory))
+
+(provide 'liece-intl)
+
+;;; liece-intl.el ends here
diff --git a/lisp/liece-mail.el b/lisp/liece-mail.el
new file mode 100644 (file)
index 0000000..ccea28b
--- /dev/null
@@ -0,0 +1,77 @@
+;;; liece-mail.el --- Message composing and sending utility.
+;; Copyright (C) 1999 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-12-29
+;; Keywords: IRC, liece, Gnus
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(require 'liece-version)
+
+(defgroup liece-mail nil
+  "Compose and send mail in IRC buffer"
+  :group 'liece-vars)
+
+(defcustom liece-mail-draft-buffer " *mail*"
+  "Generic draft buffer."
+  :group 'liece-mail
+  :type 'string)
+
+(defcustom liece-maintainer-address
+  "irchat@kiss.kake.info.waseda.ac.jp (Liece developers)"
+  "The mail address of the Liece maintainers."
+  :group 'liece-mail
+  :type 'string)
+
+(defun liece-command-mail-compose (nick)
+  (interactive
+   (let ((completion-ignore-case t))
+     (list
+      (liece-minibuffer-completing-default-read
+       "To whom: " liece-nick-alist nil nil liece-current-chat-partner))))
+  (let ((composefunc (get mail-user-agent 'composefunc)) (to nick)
+       (user-agent (liece-version)) uah)
+    (if (setq uah (liece-nick-get-user-at-host nick))
+       (setq to (concat to " <" uah ">")))
+    (if (fboundp composefunc)
+       (funcall composefunc to nil (` (("User-Agent" . (, user-agent))))))))
+
+(defun liece-command-submit-bug-report ()
+  "Send a bug report to the Gnus maintainers."
+  (interactive)
+  (require 'reporter)
+  
+  (reporter-submit-bug-report
+   liece-maintainer-address
+   (liece-version)
+   (let ((base (list 'window-system
+                    'liece-highlight-mode
+                    'liece-detect-coding-system)))
+     base)))
+  
+(provide 'liece-mail)
+
+;;; liece-mail.el ends here
diff --git a/lisp/liece-make.el b/lisp/liece-make.el
new file mode 100644 (file)
index 0000000..3030daa
--- /dev/null
@@ -0,0 +1,231 @@
+;;; liece-make.el --- Generic make procedures.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1999-03-02
+;; Keywords: IRC, liece, APEL
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(require 'cl)
+
+(defun install-just-print-p ()
+  (let ((flag (getenv "MAKEFLAGS"))
+       case-fold-search)
+    (princ (format "%s\n" flag))
+    (if flag
+       (string-match "^\\(\\(--[^ ]+ \\)+-\\|[^ =-]\\)*n" flag))))
+
+(defun config-liece ()
+  (let (prefix exec-prefix lisp-dir version-specific-lisp-dir)
+    (and (setq prefix (car command-line-args-left))
+         (or (string-equal "NONE" prefix)
+             (setq PREFIX prefix)))
+    (setq command-line-args-left (cdr command-line-args-left))
+    (and (setq lisp-dir (car command-line-args-left))
+         (or (string-equal "NONE" lisp-dir)
+             (setq LISPDIR lisp-dir)))
+    (setq command-line-args-left (cdr command-line-args-left))
+    (and (setq version-specific-lisp-dir (car command-line-args-left))
+         (or (string-equal "NONE" version-specific-lisp-dir)
+             (progn
+               (defvar VERSION_SPECIFIC_LISPDIR version-specific-lisp-dir)
+               (princ (format "VERSION_SPECIFIC_LISPDIR=%s\n"
+                              VERSION_SPECIFIC_LISPDIR)))))
+    (setq command-line-args-left (cdr command-line-args-left))
+    (setq load-path (cons (expand-file-name ".") load-path))
+    (load "liece-config")
+    (or (boundp 'liece-modules-to-compile)
+       (load "liece-modules"))
+    (princ (format "PREFIX=%s\tLISPDIR=%s\n" PREFIX LISPDIR))))
+
+(defun compile-liece ()
+  ;;(setq byte-compile-dynamic t)
+  (config-liece)
+  (compile-elisp-modules liece-modules-to-compile "."))
+
+(defun install-liece ()
+  (compile-liece)
+  (let ((just-print (install-just-print-p))
+       (dir (expand-file-name "liece" LISPDIR)))
+    (princ (format "%s\n" emacs-version))
+    (install-elisp-modules liece-modules "." dir just-print)))
+
+(defun install-update-manifest-file (package dir &optional just-print)
+  (message "Generating MANIFEST.%s for the package..." package)
+  (unless just-print
+    (with-temp-buffer
+      (insert "pkginfo/MANIFEST." package "\n"
+             "lisp/" package "/"
+             (mapconcat #'identity
+                        (sort
+                         (mapcar (lambda (symbol)
+                                   (format "%s.el\nlisp/%s/%s.elc"
+                                           symbol package symbol))
+                                 liece-modules-to-compile)
+                         #'string-lessp)
+                        (concat "\nlisp/" package "/"))
+             "\n")
+      (when (file-directory-p "../doc")
+       (insert "info/"
+               (mapconcat #'identity
+                          (sort
+                           (directory-files
+                            "../doc" nil liece-config-info-file-regexp)
+                           #'string-lessp)
+                          "\ninfo/")
+               "\n"))
+      (let ((dirs '("icons" "po" "styles")))
+       (dolist (dir dirs)
+         (when (file-directory-p (concat "../etc/" dir))
+           (insert "etc/" package "/" dir "/"
+                   (mapconcat #'identity
+                              (sort (directory-files (concat "../etc/" dir)
+                                                     nil nil nil t)
+                                    #'string-lessp)
+                              (concat "\netc/" package "/" dir "/"))
+                   "\n"))))
+      (write-file (expand-file-name (concat "MANIFEST." package) dir)))))
+
+(defun install-update-package-files (package dir &optional just-print)
+  (cond (just-print
+        (princ (format "Updating autoloads in directory %s..\n\n" dir))
+          
+        (princ (format "Processing %s\n" dir))
+        (princ "Generating custom-load.el...\n\n")
+           
+        (princ (format "Compiling %s...\n"
+                       (expand-file-name "auto-autoloads.el" dir)))
+        (princ (format "Wrote %s\n"
+                       (expand-file-name "auto-autoloads.elc" dir)))
+          
+        (princ (format "Compiling %s...\n"
+                       (expand-file-name "custom-load.el" dir)))
+        (princ (format "Wrote %s\n"
+                       (expand-file-name "custom-load.elc" dir))))
+       (t
+        (setq autoload-package-name package)
+        (add-to-list 'command-line-args-left dir)
+        (batch-update-directory)
+       
+        (add-to-list 'command-line-args-left dir)
+        (Custom-make-dependencies)
+          
+        (byte-compile-file (expand-file-name "auto-autoloads.el" dir))
+        (byte-compile-file (expand-file-name "custom-load.el" dir)))))
+
+(defun config-liece-package-directory ()
+  (if (boundp 'early-packages)
+      (let ((dirs (append (if early-package-load-path
+                             early-packages)
+                         (if late-package-load-path
+                             late-packages)
+                         (if last-package-load-path
+                             last-packages)))
+           dir)
+       (while (not (file-exists-p
+                    (setq dir (car dirs))))
+         (setq dirs (cdr dirs)))
+       (defvar PACKAGEDIR dir)
+       (princ (format "PACKAGEDIR=%s\n" PACKAGEDIR)))))
+
+(defun config-liece-package ()
+  (let (package-dir)
+    (and (setq package-dir (car command-line-args-left))
+        (or (string= "NONE" package-dir)
+            (defvar PACKAGEDIR package-dir)))
+    (config-liece)
+    (config-liece-package-directory)
+    (setq command-line-args-left (cdr command-line-args-left))))
+
+(defun compile-liece-package ()
+  (config-liece-package)
+  (compile-elisp-modules liece-modules-to-compile "."))
+
+(defun install-liece-package ()
+  (config-liece-package)
+  (let ((just-print (install-just-print-p))
+       (dir (expand-file-name "lisp/liece" PACKAGEDIR))
+       (pkginfo-dir (expand-file-name "pkginfo" PACKAGEDIR)))
+    (install-elisp-modules liece-modules "." dir just-print)
+    (install-update-package-files "liece" dir just-print)
+    (install-update-manifest-file "liece" pkginfo-dir just-print)))
+
+(defun autoload-liece ()
+  (config-liece)
+  (require 'autoload)
+  (let* ((generated-autoload-file "liece-setup.el")
+        (generate-autoload-cookie ";;;###liece-autoload")
+        (buf (find-file-noselect generated-autoload-file))
+        make-backup-files)
+    (set-buffer buf)
+    (delete-region (point-min) (point-max))
+    (insert-string
+     (format "(if (not (featurep '%s)) (progn\n"
+            (file-name-sans-extension generated-autoload-file)))
+    (mapcar
+     (function
+      (lambda (file)
+       (generate-file-autoloads
+        (concat (symbol-name file) ".el"))))
+     liece-modules-to-compile)
+    (goto-char (point-max))
+    (insert-string
+     (format "(provide '%s)))\n"
+            (file-name-sans-extension generated-autoload-file)))
+    (save-buffer)))
+
+;; Generate documents and startup samples.
+(defun make-liece-info-files ()
+  (let ((file (car command-line-args-left)))
+    (when (and file (file-exists-p file))
+      (if (fboundp 'set-language-environment)
+         (set-language-environment "Japanese"))
+      (find-file file)
+      (texinfo-every-node-update)
+      (texinfo-format-buffer)
+      (save-buffer))))
+
+(defun make-liece-sample-files ()
+  (let* ((file (pop command-line-args-left))
+         (dcc-path (pop command-line-args-left))
+         (icon-directory (pop command-line-args-left))
+         (catalogue-directory (pop command-line-args-left))
+         (styles-directory (pop command-line-args-left)))
+    (when (and file (file-exists-p file))
+      (find-file file)
+      (goto-char (point-min))
+      (replace-string "@DCCPATH@" dcc-path)
+      (goto-char (point-min))
+      (replace-string "@ICONDIR@" icon-directory)
+      (goto-char (point-min))
+      (replace-string "@CATALOGDIR@" catalogue-directory))
+      (goto-char (point-min))
+      (replace-string "@STYLEDIR@" styles-directory)
+      (save-buffer)))
+
+(provide 'liece-make)
+
+;;; liece-make.el ends here
diff --git a/lisp/liece-menu.el b/lisp/liece-menu.el
new file mode 100644 (file)
index 0000000..bedae00
--- /dev/null
@@ -0,0 +1,301 @@
+;;; liece-menu.el --- Define menus.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-09-06
+;; Revised: 1999-09-06
+;; Keywords: menu, easymenu
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile
+  (require 'easymenu)
+  (require 'advice)
+  (require 'liece-compat)
+  (require 'liece-commands)
+  (require 'liece-intl)
+  (require 'liece-nick))
+
+(defvar liece-use-localized-menu (featurep 'meadow))
+
+(defvar liece-nick-popup-menu
+  '("Liece"
+    ["Finger" liece-menu-callback-finger
+     liece-nick-region-nicks]
+    "----"
+    ["CTCP VERSION" liece-menu-callback-ctcp-version
+     liece-nick-region-nicks]
+    ["CTCP USERINFO" liece-menu-callback-ctcp-userinfo
+     liece-nick-region-nicks]
+    ["CTCP HELP" liece-menu-callback-ctcp-help
+     liece-nick-region-nicks]
+    ["CTCP CLIENTINFO" liece-menu-callback-ctcp-clientinfo
+     liece-nick-region-nicks]
+    ["CTCP PING" liece-menu-callback-ctcp-ping
+     liece-nick-region-nicks]
+    "----"
+    ["Set Channel Operator(s)" liece-menu-callback-mode+o
+     liece-nick-region-nicks]
+    ["Set Channel Voice(s)" liece-menu-callback-mode+v
+     liece-nick-region-nicks]
+    ["Unset Channel Operator(s)" liece-menu-callback-mode-o
+     liece-nick-region-nicks]
+    ["Unset Channel Voice(s)" liece-menu-callback-mode-v
+     liece-nick-region-nicks]
+    "----"
+    ["Kick" liece-menu-callback-kick
+     liece-nick-region-nicks]))
+      
+(defvar liece-menu-url-menu '("URL" "----"))
+(defvar liece-menu-dcc-menu
+  '("DCC"
+    ["Send file" liece-command-dcc-send t]
+    ["Receive file" liece-command-dcc-receive t]
+    "----"
+    ["Send chat request" liece-command-dcc-chat-listen t]
+    ["Accept chat request" liece-command-dcc-chat-connect t]
+    "----"
+    ["List DCC request" liece-command-dcc-list t]
+    ["Dispatch stacked DCC requests" liece-command-dcc-accept t]))
+  
+(defvar liece-menu-crypt-menu
+  '("Crypt"
+    ["Toggle crypt mode" liece-command-toggle-crypt t]
+    ["Set default key for this channel" liece-command-set-encryption-key
+     (or liece-current-channel liece-current-chat-partner)]
+    ["Add new key to keyring" liece-command-add-decryption-key t]
+    ["Remove key from keyring" liece-command-delete-decryption-key t]))
+  
+(defvar liece-menu-private-menu
+  '("Private"
+    ["Toggle private conversation" liece-command-toggle-private
+     (liece-server-opened)]
+    ["IsON" liece-command-ison (liece-server-opened)]
+    ["Register friends" liece-command-activate-friends t]
+    ["Unregister friends" liece-command-deactivate-friends t]
+    ["Display userhost" liece-command-userhost (liece-server-opened)]
+    ["Ignore nicks / regexp" liece-command-kill t]
+    ["Compose mail" liece-command-mail-compose t]))
+  
+(defvar liece-menu-ctcp-menu
+  '("CTCP"
+    ["ACTION" liece-command-client-action
+     liece-current-channel]
+    ["VERSION" liece-command-client-version
+     liece-current-channel]
+    ["USERINFO" liece-command-client-userinfo
+     liece-current-channel]
+    ["HELP" liece-command-client-help
+     liece-current-channel]
+    ["CLIENTINFO" liece-command-client-clientinfo
+     liece-current-channel]
+    ["PING" liece-command-client-ping
+     liece-current-channel]
+    "----"
+    ["Request X-Face" liece-command-client-x-face
+     liece-current-channel]
+    ["Set my X-Face" liece-command-client-x-face-from-xbm-file
+     liece-current-channel]))
+
+(defvar liece-menu-channel-menu
+  (nconc
+   '("Channel"
+     ["Join channel" liece-command-join
+      (liece-server-opened)]
+     ["Part channel" liece-command-part
+      (or liece-current-channels liece-current-chat-partners)]
+     ["Go to next channel" liece-command-next-channel
+      (or liece-current-channels liece-current-chat-partners)]
+     ["Go to previous channel" liece-command-previous-channel
+      (or liece-current-channels liece-current-chat-partners)]
+     ["Rotate left channels" liece-command-pop
+      (or liece-current-channels liece-current-chat-partners)]
+     ["Rotate right channels" liece-command-push
+      (or liece-current-channels liece-current-chat-partners)]
+     "----"
+     ["Invite to this channel" liece-command-invite
+      liece-current-channel]
+     ["Kick out from this channel" liece-command-kick
+      liece-current-channel]
+     "----"
+     ["Set mode of this channel" liece-command-modec
+      liece-current-channel]
+     ["Set topic of this channel" liece-command-topic
+      liece-current-channel]
+     "----"
+     ["List channel" liece-command-list
+      (liece-server-opened)]
+     ["Display names of channel" liece-command-names
+      (liece-server-opened)]
+     ["Display who are on the channel" liece-command-names
+      (liece-server-opened)]
+     "----"
+     ["Toggle crypt mode" liece-command-toggle-crypt t]
+     ["Set default key of this channel" liece-command-set-default-key
+      (or liece-current-channel liece-current-chat-partner)]
+     "----")
+   (list liece-menu-ctcp-menu)))
+
+(defvar liece-menu-IRC-menu
+  '("IRC"
+    ["Load variables file" liece-command-load-vars t]
+    ["Save variables file" liece-command-save-vars t]
+    "----"
+    ["Change window style" liece-command-set-window-style t]
+    ["Reload style file" liece-command-reload-window-style t]
+    ["Reconfigure windows" liece-command-reconfigure-windows t]
+    ["Toggle channel buffer display state"
+     liece-command-toggle-channel-buffer-mode t]
+    ["Toggle nick buffer display state"
+     liece-command-toggle-nick-buffer-mode t]
+    "----"
+    ["Freeze buffer" liece-command-freeze t]
+    ["Own freeze buffer" liece-command-own-freeze t]
+    ["Enter debug mode" liece-command-debug t]
+    ["Quit IRC" liece-command-quit t]))
+
+(defvar liece-menu-alist
+  '(
+    (liece-menu-IRC-menu "IRC Menu.")
+    (liece-menu-channel-menu "Channel Menu.")
+    (liece-menu-private-menu "Private Menu.")
+    (liece-menu-crypt-menu "Crypt Menu.")
+    (liece-menu-dcc-menu "DCC Menu.")
+    (liece-menu-url-menu "URL Menu.")))
+
+(defvar liece-menu-IRC-menu-map)
+(defvar liece-menu-channel-menu-map)
+(defvar liece-menu-private-menu-map)
+(defvar liece-menu-crypt-menu-map)
+(defvar liece-menu-dcc-menu-map)
+(defvar liece-menu-url-menu-map)
+
+;;; @ popup menus
+;;;
+(defmacro liece-menu-bogus-filter-constructor (name menu)
+  `(let (x y)
+     (setq x (x-popup-menu t ,menu)
+           y (and x (lookup-key ,menu (apply #'vector x))))
+     (if (and x y)
+         (funcall y))))
+
+(defmacro liece-menu-popup-menu (event menu)
+  (if (featurep 'xemacs)
+      `(popup-menu ,menu)
+    `(let (bogus-menu)
+       (easy-menu-define bogus-menu nil nil ,menu)
+       (liece-menu-bogus-filter-constructor "Popup" bogus-menu))))
+
+(defun liece-nick-popup-menu (widget &optional event)
+  (let ((menu (copy-sequence liece-nick-popup-menu))
+       (pos (widget-event-point event)))
+    (when pos
+      (goto-char pos)
+      (if (eq major-mode 'liece-nick-mode)
+         (liece-nick-update-region))
+      (liece-menu-popup-menu event menu))))
+
+;;; @ initialize menus
+;;;
+(when (or (featurep 'menubar); XEmacs
+         (featurep 'menu-bar))
+  (add-hook 'liece-command-mode-hook 'liece-command-define-menus)
+  (add-hook 'liece-command-mode-hook 'liece-command-add-menus 'append)
+  (add-hook 'liece-url-add-hook 'liece-menu-add-url))
+
+(defun liece-menu-define (menu)
+  (eval (list 'easy-menu-define
+             (intern (concat (symbol-name (car menu)) "-map"))
+             'liece-command-mode-map (cadr menu)
+             '(symbol-value (car menu)))))
+
+(defun liece-command-define-menus-1 (value)
+  (dolist (spec value)
+    (cond
+     ((stringp spec))
+     ((vectorp spec)
+      (when liece-use-localized-menu
+       (aset spec 0 (liece-intl-get-msgstr (aref spec 0)))))
+     ((listp spec)
+      (liece-command-define-menus-1 spec)))))
+
+(defun liece-command-define-menus ()
+  (dolist (menu (reverse liece-menu-alist))
+    (let ((value (symbol-value (car menu))))
+      (liece-command-define-menus-1 value)
+      (liece-menu-define menu))))
+
+(defun liece-command-add-menus ()
+  (dolist (menu liece-menu-alist)
+    (easy-menu-add (symbol-value (car menu)) liece-command-mode-map)))
+
+(defun liece-menu-add-url (url)
+  (when (boundp 'liece-menu-url-menu-map)
+    (easy-menu-add-item
+     liece-menu-url-menu-map nil
+     (vector url (list 'liece-command-browse-url url) t))))
+
+;;; @ menu callbacks
+;;;
+(autoload 'liece-menu-callback-ctcp-version "liece-ctcp" nil t)
+(autoload 'liece-menu-callback-ctcp-userinfo "liece-ctcp" nil t)
+(autoload 'liece-menu-callback-ctcp-help "liece-ctcp" nil t)
+(autoload 'liece-menu-callback-ctcp-clientinfo "liece-ctcp" nil t)
+(autoload 'liece-menu-callback-ctcp-ping "liece-ctcp" nil t)
+
+(defun liece-menu-callback-finger ()
+  (interactive)
+  (dolist (nick liece-nick-region-nicks)
+    (liece-command-finger nick)))
+
+(defun liece-menu-callback-kick ()
+  (interactive)
+  (dolist (nick liece-nick-region-nicks)
+    (liece-command-kick nick)))
+
+(defun liece-menu-callback-mode+o ()
+  (interactive)
+  (dolist (oper liece-nick-region-opers)
+    (setq liece-nick-region-nicks
+         (string-list-remove-ignore-case oper liece-nick-region-nicks)))
+  (liece-command-mode+o liece-nick-region-nicks))
+
+(defun liece-menu-callback-mode+v ()
+  (interactive)
+  (dolist (voice liece-nick-region-voices)
+    (setq liece-nick-region-nicks
+         (string-list-remove-ignore-case voice liece-nick-region-nicks)))
+  (liece-command-mode+v liece-nick-region-nicks))
+
+(defun liece-menu-callback-mode-o ()
+  (interactive)
+  (liece-command-mode-o liece-nick-region-opers))
+
+(defun liece-menu-callback-mode-v ()
+  (interactive)
+  (liece-command-mode-v liece-nick-region-voices))
+
+(provide 'liece-menu)
+
+;;; liece-menu.el ends here
diff --git a/lisp/liece-message.el b/lisp/liece-message.el
new file mode 100644 (file)
index 0000000..245ccd0
--- /dev/null
@@ -0,0 +1,190 @@
+;;; liece-message.el --- generate and display message line
+;; Copyright (C) 1999 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-05-30
+;; Keywords: message
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(defgroup liece-message nil
+  "Messages"
+  :tag "Message"
+  :prefix "liece-"
+  :group 'liece)
+
+(defcustom liece-message-blackets
+  '(((type notice)
+     ("-" "-"))
+    ((and (type action) (direction outgoing))
+     ("]" "["))
+    ((type action)
+     ("[" "]"))
+    ((and (range private) (direction incoming))
+     ("=" "="))
+    ((direction outgoing)
+     (">" "<"))
+    ((range external)
+     ("(" ")"))
+    (t
+     ("<" ">")))
+  "Blackets."
+  :group 'liece-message)
+
+(defcustom liece-message-tags
+  '(((and (direction outgoing) (range private))
+     (liece-message-target liece-message-target))
+    ((range private)
+     (liece-message-speaker liece-message-speaker))
+    (t
+     (liece-message-speaker
+      (concat liece-message-target ":" liece-message-speaker))))
+  "Primary tags."
+  :group 'liece-message)
+
+(defcustom liece-message-empty-predicate
+  (function (lambda (message) (string-equal "" message)))
+  "Return non-nil if message is regarded as empty string."
+  :group 'liece-message)
+     
+(defvar liece-message-type nil)
+(defvar liece-message-target nil)
+(defvar liece-message-speaker nil)
+(defvar liece-message-direction nil)
+(defvar liece-message-encrypted-p nil)
+(defvar liece-message-suspicious-p nil)
+(defvar liece-message-garbled-p nil)
+(defvar liece-message-fingerprint nil)
+(defvar liece-message-timestamp nil)
+
+(defun liece-message-predicate (val)
+  (cond
+   ((null val)
+    nil)
+   ((eq val t)
+    t)
+   ((listp val)
+    (let ((pred (pop val)))
+      (cond
+       ((eq pred 'or)
+       (apply 'liece-or (mapcar 'liece-message-predicate val)))
+       ((eq pred 'and)
+       (apply 'liece-and (mapcar 'liece-message-predicate val)))
+       ((eq pred 'not)
+       (not (liece-message-predicate (car val))))
+       ((eq pred 'type)
+       (eq liece-message-type (car val)))
+       ((eq pred 'direction)
+       (cond
+        ((eq (car val) 'outgoing)
+         liece-message-direction)
+        ((eq (car val) 'incoming)
+         (not liece-message-direction))))
+       ((eq pred 'mode)
+       (eq liece-command-buffer-mode (car val)))
+       ((eq pred 'range)
+       (cond
+        ((eq (car val) 'private)
+         (not (liece-channel-p (liece-channel-real liece-message-target))))
+        ((eq (car val) 'external)
+         (not (liece-channel-member
+               liece-message-target (liece-nick-get-joined-channels
+                                      liece-message-speaker))))))
+       ((liece-functionp pred)
+       (liece-eval-form (cons pred val)))
+       (t
+       (liece-message-predicate pred)))))
+   (t
+    (liece-eval-form val))))
+
+(defun liece-message-blackets-function ()
+  (let* ((specs liece-message-blackets) spec
+        (blackets
+         (catch 'found
+           (while specs
+             (setq spec (pop specs))
+             (if (liece-message-predicate (car spec))
+                 (throw 'found (cadr spec)))))))
+    ;; if message is encrypted just concatenate each blacket, two times.
+    (if liece-message-encrypted-p
+       (setq blackets (mapcar (function (lambda (b) (concat b b)))
+                              blackets)))
+    blackets))
+  
+(defun liece-message-tags-function ()
+  (let* ((specs liece-message-tags) spec
+        (tags
+         (catch 'found
+           (while specs
+             (setq spec (pop specs))
+             (if (liece-message-predicate (car spec))
+                 (throw 'found (cadr spec)))))))
+    (list (eval (car tags)) (eval (cadr tags)))))
+
+(defun liece-message-buffer-function ()
+  (let* ((target (if (liece-message-predicate
+                     '(and (range private) (direction incoming)))
+                    liece-message-speaker
+                  liece-message-target))
+        (buffer (liece-pick-buffer target)))
+    (cond
+     ((car buffer) buffer)
+     (liece-auto-join-partner
+      (liece-channel-prepare-partner target)
+      (liece-pick-buffer target)))))
+
+(defun liece-message-parent-buffer (cbuffer)
+  (if (or (and (car cbuffer) (liece-frozen (car cbuffer)))
+         (and (eq liece-command-buffer-mode 'channel)
+              liece-current-channel
+              (not (liece-channel-equal liece-message-target
+                                        liece-current-channel)))
+         (and (eq liece-command-buffer-mode 'chat)
+              liece-current-chat-partner
+              (not (eq liece-message-direction 'outgoing))
+              (or
+               (not (liece-nick-equal liece-message-speaker
+                                      liece-current-chat-partner))
+               (not (liece-nick-equal liece-message-target
+                                      (liece-current-nickname))))))
+      (append liece-D-buffer liece-O-buffer)
+    liece-D-buffer))
+
+;;;###liece-autoload
+(defun liece-display-message (temp)
+  (let* ((blackets (liece-message-blackets-function))
+        (tags (liece-message-tags-function))
+        (buffer (liece-message-buffer-function))
+        (parent (liece-message-parent-buffer buffer)))
+    (liece-insert buffer
+                  (concat (car blackets) (car tags) (cadr blackets)
+                          " " temp "\n"))
+    (liece-insert parent
+                  (concat (car blackets) (cadr tags) (cadr blackets)
+                          " " temp "\n"))
+    (run-hook-with-args 'liece-display-message-hook temp)))
+   
+(provide 'liece-message)
+
+;;; liece-message.el ends here
diff --git a/lisp/liece-minibuf.el b/lisp/liece-minibuf.el
new file mode 100644 (file)
index 0000000..f0bbb53
--- /dev/null
@@ -0,0 +1,182 @@
+;;; liece-minibuf.el --- Minibuffer custom completion.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-02-02
+;; Revised: 1999-02-02
+;; Keywords: minibuffer, completion
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(require 'liece-compat)
+(require 'liece-intl)
+(require 'liece-nick)
+
+(defvar liece-minibuffer-map nil)
+(defvar liece-minibuffer-complete-function nil)
+
+(unless liece-minibuffer-map
+  (setq liece-minibuffer-map
+       (let ((map (make-sparse-keymap)))
+         (set-keymap-parent map minibuffer-local-map)
+         (define-key map " " nil)
+         (define-key map "\t" 'liece-minibuffer-complete)
+         (define-key map "\r" 'exit-minibuffer)
+         (define-key map "\n" 'exit-minibuffer)
+         map)))
+
+(defun liece-minibuffer-complete ()
+  (interactive)
+  (if (and liece-minibuffer-complete-function
+          (fboundp liece-minibuffer-complete-function))
+      (funcall liece-minibuffer-complete-function)))
+
+(defun liece-minibuffer-parse-modes ()
+  (save-excursion
+    (let (preceding-char (state 'flag) type)
+      (beginning-of-buffer)
+      (while (not (eobp))
+       (forward-char)
+       (setq preceding-char (char-before))
+       (cond
+        ((and (memq state '(flag arg))
+              (or (char-equal preceding-char ?+)
+                  (char-equal preceding-char ?-)))
+         (setq state 'mode
+               type nil))
+        ((and (eq state 'mode) (char-equal preceding-char ? ))
+         (setq state 'arg))
+        ((and (eq state 'mode) (memq preceding-char '(?o ?v)))
+         (setq type (nconc type (list 'nick preceding-char
+                                      (char-before (1- (point)))))))
+        ((and (eq state 'mode) (eq preceding-char ?b))
+         (setq type (nconc type (list 'ban (char-before (1- (point)))))))))
+      (cons state type))))
+       
+(defun liece-minibuffer-prepare-candidate ()
+  (let ((point (point)))
+    (skip-syntax-backward "^ ")
+    (prog1 (buffer-substring (point) point)
+      (goto-char point))))
+
+(defun liece-minibuffer-delete-candidate ()
+  (let ((point (point)))
+    (skip-syntax-backward "^ ")
+    (delete-region (point) point)))
+
+(defun liece-minibuffer-finalize-completion (completion pattern all)
+  (cond
+   ((eq completion t))
+   ((null completion)
+    (temp-minibuffer-message (_ "[No match]")))
+   ((not (string= pattern completion))
+    (liece-minibuffer-delete-candidate)
+    (insert completion))
+   (t
+    (with-output-to-temp-buffer "*Completions*"
+      (funcall completion-display-completion-list-function
+              (sort all (function (lambda (x y)
+                                    (string-lessp
+                                     (or (car-safe x) x)
+                                     (or (car-safe y) y))))))))))
+
+(defun liece-minibuffer-complete-channel-modes ()
+  (let* ((preceding-char (char-before)) completion candidate all
+        (modes (mapconcat
+                (function car)
+                liece-supported-channel-mode-alist ""))
+        (nicks (liece-channel-get-nicks))
+        uahs
+        (context (liece-minibuffer-parse-modes))
+        (state (car context)) (type (cdr context)))
+    (cond
+     ((memq state '(flag mode))
+      (temp-minibuffer-message
+       (format (_ "[Modes are: %s]") modes)))
+     ((and (eq state 'arg) (memq 'ban type))
+      (if (memq ?- type)
+         (setq uahs (list-to-alist (liece-channel-get-bans)))
+       (setq uahs (mapcar
+                   (function
+                    (lambda (nick)
+                      (list (concat nick "!"
+                                    (liece-nick-get-user-at-host nick)))))
+                   nicks)))
+      (setq candidate (liece-minibuffer-prepare-candidate)
+           completion (try-completion candidate uahs)
+           all (all-completions candidate uahs)))
+     ((and (eq state 'arg) (memq 'nick type))
+      (let* ((masks (cond ((memq ?o type) (liece-channel-get-operators))
+                         ((memq ?v type) (liece-channel-get-voices))))
+            (nicks
+             (if (memq ?- type)
+                 masks
+               (remove-if
+                (` (lambda (item)
+                     (and (stringp item)
+                          (string-list-member-ignore-case item '(, masks)))))
+                nicks))))
+       (setq nicks (mapcar (function list) nicks)
+             candidate (liece-minibuffer-prepare-candidate)
+             completion (try-completion candidate nicks)
+             all (all-completions candidate nicks)))))
+    (liece-minibuffer-finalize-completion completion candidate all)))
+
+(defun liece-minibuffer-complete-user-modes ()
+  (temp-minibuffer-message
+   (format
+    (_ "[Modes are: %s]")
+    (mapconcat (function car) liece-supported-user-mode-alist ""))))
+
+(defun liece-minibuffer-completing-default-read
+  (prompt table &optional predicate require-match initial-input)
+  "Completing-read w/ default argument like in 'kill-buffer'."
+  (let ((default-read
+         (completing-read
+          (if initial-input
+              (format "%s(default %s) " prompt initial-input)
+            prompt)
+          table predicate require-match nil)))
+    (if (and (string= default-read "") initial-input)
+       initial-input
+      default-read)))
+
+(defun liece-minibuffer-completing-sequential-read
+  (prompt &optional count table predicate require-match multiple-candidate)
+  "Execute completing-read w/ default argument consequently."
+  (let ((count (or count 0)) string result)
+    (while (progn
+            (setq string
+                  (completing-read
+                   (format "%s (%d): " prompt (incf count))
+                   table predicate require-match nil))
+            (or multiple-candidate
+                (remove-alist 'table string))
+            (not (string= "" string)))
+      (push string result))
+    result))
+
+(provide 'liece-minibuf)
+
+;;; liece-minibuf.el ends here
diff --git a/lisp/liece-misc.el b/lisp/liece-misc.el
new file mode 100644 (file)
index 0000000..496a372
--- /dev/null
@@ -0,0 +1,496 @@
+;;; liece-misc.el --- Miscellaneous routines.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-and-compile
+  (require 'broken)
+  (require 'pccl)
+  (require 'invisible)
+  (require 'liece-inlines)
+  (require 'liece-coding))
+
+(eval-when-compile
+  (autoload '_ "liece-intl" nil nil 'macro))
+
+(defun liece-toggle-command-buffer-mode (&optional mode)
+  "Toggle command buffer MODE."
+  (let ((mode
+        (or mode
+            (if (eq liece-command-buffer-mode 'chat)
+                'channel
+              'chat)))
+       (hide (get 'liece-nick-buffer-mode 'hide)))
+    (cond
+     ((eq mode 'chat)
+      (put 'liece-nick-buffer-mode 'hide t)
+      (setq liece-private-indicator "P"))
+     (t
+      (put 'liece-nick-buffer-mode 'hide nil)
+      (setq liece-private-indicator "-")))
+    (and (not (eq liece-command-buffer-mode mode))
+        (not (eq hide (get 'liece-nick-buffer-mode 'hide)))
+        liece-nick-window-auto-hide
+        (liece-configure-windows))
+    (setq liece-command-buffer-mode mode)
+    liece-command-buffer-mode))
+
+(defsubst liece-set-frame-title-format ()
+  "Inline function for modifying `frame-title-format'."
+  (let ((frame-indicator liece-channel-indicator))
+    (when (eq liece-command-buffer-mode 'channel)
+      (if liece-display-status-on-channel-indicator
+         (setq frame-indicator liece-channel-indicator)
+       (setq frame-indicator
+             (format "%s: %s [%s]"
+                     liece-channel-indicator
+                     (or (and liece-current-channel
+                              (liece-channel-get-topic))
+                         "")
+                     (or (and liece-current-channel
+                              (liece-channel-get-modes))
+                         "")))))
+    (setq liece-channel-status-indicator frame-indicator)))
+
+(defsubst liece-set-channel-indicator ()
+  "Inline-function for modifying `liece-channel-indicator'."
+  (if (eq liece-command-buffer-mode 'chat)
+      (setq liece-channel-indicator
+           (if liece-current-chat-partner
+               (format (_ "Chatting with %s")
+                       liece-current-chat-partner)
+             (_ "No partner")))
+    (setq liece-channel-indicator
+         (if liece-current-channel
+             (concat liece-current-channel
+                     (if liece-display-status-on-channel-indicator
+                         (format ": %s [%s]"
+                                 (or (and liece-current-channel
+                                          (liece-channel-get-topic))
+                                     "")
+                                 (or (and liece-current-channel
+                                          (liece-channel-get-modes))
+                                     ""))
+                       ""))
+           (_ "No channel"))))
+  (with-current-buffer liece-command-buffer
+    (force-mode-line-update))
+  (if liece-display-frame-title
+      (liece-set-frame-title-format)))
+
+(defun liece-freeze (buffer &optional arg)
+  (with-current-buffer buffer
+    (setq liece-freeze (if arg (plusp arg) (not liece-freeze))
+         liece-freeze-indicator (if liece-freeze "F" "-"))
+    (force-mode-line-update)))
+
+(defmacro liece-frozen (buffer)
+  (list 'with-current-buffer buffer 'liece-freeze))
+
+(defun liece-own-freeze (buffer &optional arg)
+  (with-current-buffer buffer
+    (setq liece-own-freeze (if arg (plusp arg) (not liece-own-freeze))
+         liece-own-freeze-indicator (if liece-own-freeze "M" "-"))
+    (force-mode-line-update)))
+
+(defmacro liece-own-frozen (buffer)
+  (list 'with-current-buffer buffer 'liece-own-freeze))
+
+(defun liece-ignore-this-p (nick user-at-host)
+  ;; Remove entries which are expired.
+  (let ((time (current-time)) expire-time)
+    (dolist (kill liece-kill-nickname)
+      (setq expire-time (if (cdr kill)
+                           (liece-time-difference time (cdr kill))
+                         1))
+      (when (< expire-time 0)
+       (if (zerop (cadddr kill))
+           (liece-insert-info liece-D-buffer
+                              (format (_ "Ignore timeout for %s expired.\n")
+                                      (car kill))))
+       (when (setq kill (string-assoc-ignore-case
+                         (car kill) liece-kill-nickname))
+         (setq liece-kill-nickname (delq kill liece-kill-nickname)
+               liece-save-variables-are-dirty t)))))
+  ;; Search on `liece-kill-nickname' and return non-nil if matches.
+  (unless (run-hook-with-args-until-success
+          'liece-custom-ignore-this-p nick user-at-host)
+    (let ((case-fold-search t))
+      (member-if
+       (lambda (kill)
+        (or (liece-nick-equal (car kill) nick)
+            (string-match (concat "\\<" (car kill) "\\>") nick)
+            (and (string-match "@" (car kill))
+                 (or (string-equal-ignore-case
+                      (car kill) user-at-host)
+                     (string-match (concat "^" (car kill) "$")
+                                   user-at-host)))))
+       liece-kill-nickname))))
+
+(defun liece-split-line (line)
+  (cond
+   ((eq ?: (aref line 0))
+    (list (substring line 1)))
+   (t
+    (let (args)
+      (catch 'done
+       (while (string-match "^\\([^ ]+\\) +" line)
+         (setq args (nconc args (list (match-string 1 line)))
+               line (substring line (match-end 0)))
+         (and (not (string= "" line)) (eq ?: (aref line 0))
+              (setq line (substring line 1))
+              (throw 'done nil))))
+      (or (string= "" line)
+         (setq args (nconc args (list line))))
+      args))))
+
+(defmacro liece-message (&rest msg)
+  `(message "%s: %s"
+           (product-name (product-find 'liece-version))
+           (format ,@msg)))
+
+(defmacro liece-insert-change (buffer msg)
+  `(liece-insert ,buffer (concat liece-change-prefix ,msg)))
+
+(defmacro liece-insert-notice (buffer msg)
+  `(liece-insert ,buffer (concat liece-notice-prefix ,msg)))
+
+(defmacro liece-insert-broadcast (buffer msg)
+  `(liece-insert ,buffer (concat liece-broadcast-prefix ,msg)))
+
+(defmacro liece-insert-wallops (buffer msg)
+  `(liece-insert ,buffer (concat liece-wallops-prefix ,msg)))
+
+(defmacro liece-insert-error (buffer msg)
+  `(liece-insert ,buffer (concat liece-error-prefix ,msg)))
+
+(defmacro liece-insert-info (buffer msg)
+  `(liece-insert ,buffer (concat liece-info-prefix ,msg)))
+
+(defmacro liece-insert-timestamp (buffer msg)
+  `(liece-insert ,buffer (concat liece-timestamp-prefix ,msg)))
+
+(defmacro liece-insert-dcc (buffer msg)
+  `(liece-insert ,buffer (concat liece-dcc-prefix ,msg)))
+
+(defmacro liece-insert-client (buffer msg)
+  `(liece-insert ,buffer (concat liece-client-prefix ,msg)))
+
+(defmacro liece-own-message (message)
+  `(if (eq liece-command-buffer-mode 'channel)
+       (liece-own-channel-message ,message)
+     (liece-own-channel-message ,message)))
+
+(defmacro liece-own-channel-message (message &optional chnl)
+  `(let* ((chnl (or ,chnl (liece-current-channel)))
+         (liece-message-target chnl)
+         (liece-message-speaker (liece-current-nickname))
+         (liece-message-direction 'outgoing))
+     (liece-display-message ,message)))
+
+(defmacro liece-own-private-message (message &optional partner)
+  `(let* ((partner (or ,partner liece-current-chat-partner))
+         (liece-message-target partner)
+         (liece-message-speaker (liece-current-nickname))
+         (liece-message-direction 'outgoing))
+     (liece-display-message ,message)))
+
+(defmacro liece-convert-received-input (input)
+  "Convert input before it is processed"
+  `(let ((conv-list liece-receive-convert-list)
+        (input ,input)
+        i f s s1 s2)
+     (while (and conv-list (not liece-polling))
+       (setq i (car conv-list)
+            f (car i)
+            s (cadr i)
+            s1 (if (stringp f) f (funcall f input))
+            s2 (if (stringp s) s (funcall s s1))
+            input (replace-in-string input s1 s2)
+            conv-list (cdr conv-list)))
+     input))
+
+(defun liece-send (&rest args)
+  "Send message to IRC server."
+  (liece-reset-idle)
+  (let ((string (apply #'format args)) send-string len)
+    (dolist (convert liece-send-convert-list)
+      (setq string (apply #'replace-in-string string convert)))
+    (with-current-buffer liece-command-buffer
+      (setq send-string (liece-coding-encode-charset-string string)
+           send-string (if (string-match "\r$" send-string) send-string
+                         (concat send-string "\r\n"))
+           len (length send-string)))
+    (if (< len 512)
+       (process-send-string liece-server-process send-string)
+      (message "Protocol message too long (%d).  Truncated." len)
+      (if liece-beep-on-bells (beep)))
+    (if (string-match "^list\\s-*" (setq string (downcase string)))
+       (setq liece-channel-filter (substring string (match-end 0))))))
+
+(defmacro liece-send-pong ()
+  '(liece-send "PONG :%s" liece-tmp-server-name))
+
+(defmacro liece-increment-long-reply-count ()
+  '(incf liece-long-reply-count))
+
+(defmacro liece-reset-long-reply-count ()
+  '(setq liece-long-reply-count 0))
+
+(defmacro liece-check-long-reply-count ()
+  '(when (> liece-long-reply-count liece-long-reply-max)
+     (liece-reset-long-reply-count)
+     (liece-send-pong)))
+
+(defmacro liece-server-host ()
+  '(if (listp liece-server)
+       (plist-get liece-server ':host)
+     liece-server))
+
+(defmacro liece-clean-hostname (hostname)
+  "Return the arg HOSTNAME, but if is a dotted-quad, put brackets around it."
+  `(save-match-data
+     (if (string-match "[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+" ,hostname)
+        (concat "[" ,hostname "]")
+       ,hostname)))
+
+(defmacro liece-current-nickname ()
+  "Our current nickname."
+  'liece-real-nickname)
+
+(defmacro liece-current-channel ()
+  "Out current channel."
+  'liece-current-channel)
+
+(defmacro liece-current-channels ()
+  "Out current channels."
+  'liece-current-channels)
+
+(defmacro liece-current-chat-partner ()
+  "Out current chat partner."
+  'liece-current-chat-partner)
+
+(defmacro liece-current-chat-partners ()
+  "Out current chat partners."
+  'liece-current-chat-partners)
+
+(defmacro liece-scroll-if-visible (window)
+  `(if ,window (set-window-point ,window (point-max))))
+
+(defmacro liece-pick-buffer-1 (chnl)
+  `(cdr (string-assoc-ignore-case ,chnl liece-channel-buffer-alist)))
+
+(defun liece-pick-buffer (chnl)
+  (cond
+   ((stringp chnl)
+    (let ((buf (liece-pick-buffer-1 chnl)))
+      (if buf (list buf))))
+   ((and chnl (listp chnl))
+    (let ((buf (liece-pick-buffer-1 (car chnl))))
+      (if buf (cons buf (liece-pick-buffer (cdr chnl))))))
+   (t nil)))
+
+\f
+;;; Date and time handling functions
+(defun liece-compose-time-string (time)
+  (format-time-string "%A %B %e %Y %R" time))
+
+(defun liece-convert-seconds (time)
+  "Convert seconds to printable string."
+  (let* ((seconds (string-to-int time))
+        (minutes (/ seconds 60))
+        (seconds (if minutes (% seconds 60) seconds))
+        (hours (/ minutes 60))
+        (minutes (if hours (% minutes 60) minutes))
+        (days (/ hours 24))
+        (hours (if days (% hours 24) hours))
+        (ds (and (/= 0 days)
+                 (format "%d day%s, " days
+                         (if (> days 1) "s" ""))))
+        (hs (and (/= 0 hours)
+                 (format "%d hour%s, " hours
+                         (if (> hours 1) "s" ""))))
+        (ms (and (/= 0 minutes)
+                 (format "%d minute%s " minutes
+                         (if (> minutes 1) "s" ""))))
+        (ss (format "%d seconds" seconds)))
+    (concat ds hs ms (if seconds ss ""))))
+
+(defmacro liece-insert-time-string ()
+  '(insert (substring (current-time-string) 11 16) " "))
+
+(defvar liece-idle-point nil "Timestamp of last idle reset.")
+
+(defmacro liece-reset-idle ()
+  "Reset idle counter and return last idle."
+  '(prog1 (liece-idle) (setq liece-idle-point (current-time))))
+
+(defmacro liece-idle ()
+  "How long has liece been idle."
+  '(if liece-idle-point
+       (liece-time-difference liece-idle-point (current-time))
+     9999999))
+
+(defmacro liece-ping-if-idle (&optional limit)
+  `(if (<= (liece-idle) (or ,limit 120))
+       nil
+     (liece-command-ping)
+     t))
+
+(defmacro liece-maybe-poll ()
+  '(liece-send "PING %s" (system-name)))
+
+(defun liece-get-buffer-create (name)
+  "Get or create buffer, keep track on its NAME so we can kill it."
+  (let ((buffer (get-buffer-create name)))
+    (or (memq buffer liece-buffer-list)
+       (push buffer liece-buffer-list))
+    buffer))
+
+(defmacro liece-message-from-ignored (prefix rest)
+  `(save-excursion
+     (liece-insert liece-I-buffer (concat ,prefix "::" ,rest "\n"))
+     t))
+
+(defmacro liece-is-message-ignored (string buffer)
+  `(let (found (case-fold-search t) msg str msgstr who)
+     (catch 'ignore
+       (when (member ,buffer liece-no-ignore-buffers)
+        (throw 'ignore t))
+       (dolist (ignore-entry liece-ignore-list)
+        ;; Check message type
+        (cond
+         ((consp (car ignore-entry))
+          (setq msg (caar ignore-entry)
+                str (cdar ignore-entry)))
+         ((fboundp (car ignore-entry))
+          (setq msgstr (apply (car ignore-entry) (list ,string))
+                msg (car msgstr)
+                str (cdr msgstr)))
+         (t
+          (liece-message
+           (_ "Malformed ignore-list, no msg+str function."))))
+        ;; Check message from whom
+        (cond
+         ((listp (cadr ignore-entry))
+          (setq who (cadr ignore-entry)))
+         ((fboundp (cadr ignore-entry))
+          (setq who (apply (cadr ignore-entry) (list ,string))))
+         ((not (cadr ignore-entry))
+          (liece-message
+           (_ "Malformed ignore-list, no user function."))))
+        ;; Handle regexp
+        (save-match-data
+          (when (and (or msg str)
+                     (and msg
+                          (string-match
+                           msg (cadr liece-current-function)))
+                     (and str (string-match str ,string)))
+            (while who
+              (when (string-match (car who) (car liece-current-function))
+                (setq found t)
+                (throw 'ignore t))
+              (setq who (cdr who)))))))
+     found))
+
+(defmacro liece-time-difference (t0 t1)
+  "Difference in seconds between T0 and T1.
+Both T0 and T1 are in the encoded time format."
+  `(+ (* (- (car ,t1) (car ,t0)) 65536)
+      (- (cadr ,t1)) (cadr ,t0)))
+
+(defmacro liece-time-add (t0 t1)
+  "Add T0 seconds to time T1.
+t0 is in `three integer lists'-format  returned by `current-time' function."
+  `(list (+ (car ,t0) (/ (+ (cadr ,t0) ,t1) 65536))
+        (% (+ (cadr ,t0) ,t1) 65536)
+        0))
+
+(defun liece-seconds-to-time (seconds)
+  "Convert SECONDS (a floating point number) to an Emacs time structure."
+  (list (floor seconds 65536)
+       (floor (mod seconds 65536))
+       (floor (* (- seconds (ffloor seconds)) 1000000))))
+
+(defmacro liece-generate-hex-timestamp (&optional time)
+  "Generate timestamp string as hexadecimal.
+If optional argument TIME is nil, calculate timestamp using current time."
+  `(let ((time (or ,time (current-time))))
+     (format "%04x%04x" (car time) (cadr time))))
+
+(defmacro liece-hex-timestamp-valid (timestamp limit)
+  "Is TIMESTAMP valid within LIMIT?"
+  `(let (t1 t2 diff (timestamp ,timestamp))
+     (if (not (and (stringp timestamp)
+                  (string-match
+                   "^[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$" timestamp)))
+        nil
+       (setq t1 (liece-hex-string-to-integer (substring timestamp 0 4))
+            t2 (liece-hex-string-to-integer (substring timestamp 4 8))
+            diff (liece-time-difference
+                  (list t1 t2 0) (current-time)))
+       (or (>= ,limit 0)
+          (and (< diff ,limit) (> diff (- 0 ,limit)))))))
+
+(defmacro liece-hex-char-to-integer (character)
+  "Convert single hex digit CHARACTER to integer."
+  `(if (and (>= ,character ?0) (<= ,character ?9))
+       (- ,character ?0)
+     (let ((ch (logior ,character 32)))
+       (if (and (>= ch ?a) (<= ch ?f))
+          (- ch (- ?a 10))
+        (error "Invalid hex digit `%c'" ch)))))
+
+(defmacro liece-hex-string-to-integer (hex-string)
+  "Convert a HEX-STRING like ffff to the decimal integer."
+  `(let ((hex-string ,hex-string) (hex-num 0))
+     (while (not (equal hex-string ""))
+       (setq hex-num (+ (* hex-num 16)
+                       (liece-hex-char-to-integer
+                        (string-to-char hex-string))))
+       (setq hex-string (substring hex-string 1)))
+     hex-num))
+
+(defmacro liece-remove-properties-region (start end)
+  (unless (fboundp 'make-extent)
+    `(save-excursion
+       (save-restriction
+        (narrow-to-region ,start ,end)
+        (goto-char (point-min))
+        (let (start)
+          (while (setq start (next-single-property-change
+                              (point) 'invisible))
+            (when (invisible-p start)
+              (delete-region start (next-visible-point start))
+              (goto-char start))
+            (remove-text-properties (point-min)(point-max) '(face))))))))
+
+(provide 'liece-misc)
+
+;;; liece-misc.el ends here
diff --git a/lisp/liece-modules.el b/lisp/liece-modules.el
new file mode 100644 (file)
index 0000000..7c474d7
--- /dev/null
@@ -0,0 +1,99 @@
+;;; liece-modules.el --- Module definitions.
+;; Copyright (C) 1999 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-04-12
+;; Revised: 1999-03-02
+;; Keywords: IRC, liece, APEL
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(defvar liece-modules-to-compile
+  '(queue-m
+    gettext
+    liece-clfns
+    liece-handler
+    liece-compat
+    liece-version
+    liece-vars
+    liece-globals
+    liece-inlines
+    liece-filter
+    liece-dcc
+    liece-menu
+    liece-000
+    liece-200
+    liece-300
+    liece-400
+    liece-500
+    liece-nick
+    liece-channel
+    liece-commands
+    liece-ctcp
+    liece-q-el
+    liece-message
+    liece-handle
+    liece-hilit
+    liece-intl
+    liece-mail
+    liece-minibuf
+    liece-misc
+    liece-tcp
+    liece-url
+    liece-x-face
+    liece-window
+    liece-crypt
+    liece))
+
+(require 'emu)
+(if (featurep 'xemacs)
+    (add-to-list 'liece-modules-to-compile 'liece-xemacs)
+  (add-to-list 'liece-modules-to-compile 'liece-emacs)
+  (if (fboundp 'set-face-stipple)
+      (add-to-list 'liece-modules-to-compile 'bitmap-stipple)))
+
+(when (featurep 'mule)
+  (add-to-list 'liece-modules-to-compile 'liece-coding))
+
+(condition-case ()
+    (progn
+      (require 'pccl)
+      (require 'ccl))
+  (error nil))
+
+(require 'broken)
+
+(unless-broken ccl-usable
+  (add-to-list 'liece-modules-to-compile 'liece-q-ccl))
+
+(condition-case ()
+    (require 'cus-face)
+  (file-error nil))
+
+(setq liece-modules (cons 'liece-setup
+                         (delq 'queue-m liece-modules-to-compile)))
+
+(provide 'liece-modules)
+
+;;; liece-modules.el ends here
diff --git a/lisp/liece-nick.el b/lisp/liece-nick.el
new file mode 100644 (file)
index 0000000..247728d
--- /dev/null
@@ -0,0 +1,370 @@
+;;; liece-nick.el --- Various facility for nick operation.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(require 'liece-hilit)
+
+(defalias 'liece-nick-set-operator 'liece-channel-set-operator)
+(defalias 'liece-nick-set-voice 'liece-channel-set-voice)
+(defalias 'liece-nick-equal 'string-equal-ignore-case)
+
+(defun liece-nick-member (nick nicks)
+  "Return non-nil if NICK is member of NICKS."
+  (member-if
+   (lambda (item)
+     (and (stringp item) (liece-nick-equal nick item)))
+   nicks))
+
+(defvar liece-nick-insert-hook nil)
+(defvar liece-nick-replace-hook nil)
+
+(define-widget 'liece-nick-push-button 'push-button
+  "A nick button."
+  :action 'liece-nick-popup-menu)
+
+(defcustom liece-nick-sort-nicks nil
+  "If t, sort nick list in each time."
+  :type 'boolean
+  :group 'liece-vars)
+
+(defcustom liece-nick-sort-predicate 'string-lessp
+  "Function for sorting nick buffers."
+  :type 'function
+  :group 'liece-vars)
+
+;;; @ internal access methods
+;;;
+(defmacro liece-nick-get-joined-channels (nick)
+  "Return channels as list NICK is joined."
+  `(get (intern ,nick liece-obarray) 'chnl))
+
+(defmacro liece-nick-get-user-at-host (nick)
+  "Return user-at-host as string NICK is joined."
+  `(get (intern ,nick liece-obarray) 'user-at-host))
+
+(defmacro liece-nick-set-user-at-host (nick uah)
+  "Set user at host as string NICK is joined."
+  `(put (intern ,nick liece-obarray) 'user-at-host ,uah))
+
+(defmacro liece-nick-mark-as-apart (nick)
+  "Mark NICK is temporary apart."
+  `(put (intern ,nick liece-obarray) 'part t))
+
+(defmacro liece-nick-unmark-as-apart (nick)
+  "Mark NICK is temporary apart."
+  `(put (intern ,nick liece-obarray) 'part nil))
+
+(defmacro liece-nick-get-modes (nick)
+  "Return modes as string NICK is joined."
+  `(get (intern ,nick liece-obarray) 'mode))
+
+(defmacro liece-nick-add-mode (mode &optional nick)
+  "Add MODE as char to NICK."
+  `(let* ((n (intern ,nick liece-obarray))
+         (modes (string-to-char-list (or (get n 'mode) ""))))
+     (put n 'mode (mapconcat #'char-to-string
+                            (or (memq ,mode modes)
+                                (cons ,mode modes)) ""))))
+
+(defmacro liece-nick-remove-mode (mode &optional nick)
+  "Remove MODE as char to NICK."
+  `(let* ((n (intern ,nick liece-obarray))
+         (modes (string-to-char-list (or (get n 'mode) ""))))
+     (delq ,mode modes)
+     (put n 'mode (mapconcat #'char-to-string modes ""))))
+
+(defmacro liece-nick-set-mode (val mode &optional nick)
+  "Set MODE as char to CHNL."
+  `(if ,val
+       (liece-nick-add-mode ,mode ,nick)
+     (liece-nick-remove-mode ,mode ,nick)))
+
+(defmacro liece-nick-strip (nick)
+  `(if (and ,nick (memq (aref ,nick 0) '(?@ ?+ ? )))
+       (substring ,nick 1)
+     ,nick))
+
+(defmacro liece-nick-normalize (nick)
+  `(if (and ,nick (memq (aref ,nick 0) '(?@ ?+ ? )))
+       ,nick
+     (concat " " ,nick)))
+
+;;; @ display
+;;;
+(defun liece-nick-insert (nick)
+  ;; Find sorted position
+  (cond
+   ((and (eq liece-nick-sort-nicks t)
+        (liece-functionp liece-nick-sort-predicate))
+    (let (nicks found)
+      (goto-char (point-min))
+      (while (and (not (eobp)) (not found))
+       (if (condition-case nil
+               (funcall liece-nick-sort-predicate
+                        (liece-nick-strip nick)
+                        (widget-value (widget-at (1+ (point)))))
+             (void-function nil))
+           (setq found t)
+         (beginning-of-line 2)))))
+    ((eq liece-nick-sort-nicks 'reverse)
+     (goto-char (point-min)))
+    (t (goto-char (point-max))))
+
+  (insert (substring nick 0 1))
+  (let ((st (point)) (nick (liece-nick-strip nick)))
+    (insert nick)
+    (when liece-highlight-mode
+      (liece-widget-convert-button
+       'liece-nick-push-button st (point) nick))
+    (insert "\n")
+    (run-hook-with-args 'liece-nick-insert-hook st (point))))
+
+(defun liece-nick-replace (old new &optional limit regexp)
+  (if regexp
+      (setq old (concat "^\\(" old "\\)$"))
+    (setq old (concat "^\\([ @+]\\)\\(" (regexp-quote old) "\\)$")))
+  (let (case-fold-search beg end)
+    (when (re-search-forward old limit t)
+      (unless regexp
+       (setq new (concat (match-string 1) new)))
+      (if (and (eq liece-nick-sort-nicks t)
+              (liece-functionp liece-nick-sort-predicate))
+         (progn
+           (delete-region (match-beginning 0)
+                          (progn (goto-char (match-end 0))
+                                 (forward-char) (point)))
+           (liece-nick-insert new))
+       (condition-case nil
+           (widget-delete (widget-at (1+ (point))))
+         (void-function nil))
+       (replace-match new t t)
+       (setq end (point)
+             beg (progn (beginning-of-line) (1+ (point))))
+       (when liece-highlight-mode
+         (liece-widget-convert-button
+          'liece-nick-push-button beg end (substring new 1)))
+       (run-hook-with-args 'liece-nick-replace-hook beg end)))))
+
+;;;###liece-autoload
+(defun liece-command-toggle-nick-buffer-mode ()
+  (interactive)
+  (when (and (eq liece-command-buffer-mode 'channel)
+            (get-buffer liece-nick-buffer))
+    (setq liece-nick-buffer-mode (not liece-nick-buffer-mode)))
+  (liece-configure-windows))
+
+(defmacro liece-nick-buffer-create (chnl)
+  `(with-current-buffer
+       (liece-get-buffer-create (format liece-nick-buffer-format ,chnl))
+     (unless (eq major-mode 'liece-nick-mode)
+       (liece-nick-mode))
+     (set-alist 'liece-nick-buffer-alist ,chnl (current-buffer))
+     (current-buffer)))
+
+(defun liece-change-nick-of-1 (old new nicks)
+  (if new
+      (do ((nicks nicks (cdr nicks)))
+         ((or (null nicks)
+              (if (liece-nick-equal (caar nicks) old)
+                  (setcar (car nicks) new))))
+       nil)
+    (delete-if
+     `(lambda (nick) (liece-nick-equal (car nick) ,old))
+     nicks)))
+  
+(defun liece-change-nick-of-2 (old new nicks)
+  (if new
+      (do ((nicks nicks (cdr nicks)))
+         ((or (not nicks)
+              (if (liece-nick-equal (car nicks) old)
+                  (setcar nicks new))))
+       nil)
+    (delete-if
+     `(lambda (nick) (liece-nick-equal nick ,old))
+     nicks)))
+
+(defun liece-change-nick-of (old new)
+  (liece-change-nick-of-1 old new liece-nick-alist)
+  (let ((chnls (liece-nick-get-joined-channels old)))
+    (dolist (chnl chnls)
+      (liece-change-nick-of-2 old new (liece-channel-get-nicks chnl))
+      (liece-change-nick-of-2 old new (liece-channel-get-operators chnl))
+      (liece-change-nick-of-2 old new (liece-channel-get-voices chnl)))))
+
+(defmacro liece-nick-join-1 (user chnl)
+  "Add CHNL to list of channels USER belongs to."
+  `(let* ((flag (string-to-char user))
+         (user (liece-nick-strip ,user))
+         (u (intern user liece-obarray))
+         (c (intern ,chnl liece-obarray)))
+     (or (string-assoc-ignore-case user liece-nick-alist)
+        (push (list user) liece-nick-alist))
+     (cond
+      ((char-equal flag ?@)
+       (liece-channel-set-operator ,chnl user t))
+      ((char-equal flag ?+)
+       (liece-channel-set-voice ,chnl user t)))
+     (or (string-list-member-ignore-case ,chnl (get u 'chnl))
+        (put u 'chnl (cons ,chnl (get u 'chnl))))
+     (or (string-list-member-ignore-case user (get c 'nick))
+        (put c 'nick (cons user (get c 'nick))))))
+               
+(defmacro liece-nick-part-1 (user chnl)
+  "Remove USER information from his CHNL."
+  `(let ((u (intern ,user liece-obarray))
+        (c (intern ,chnl liece-obarray)))
+     (liece-channel-set-operator ,chnl ,user nil)
+     (liece-channel-set-voice ,chnl ,user nil)
+     (put u 'chnl (string-list-remove-ignore-case ,chnl (get u 'chnl)))
+     (put c 'nick (string-list-remove-ignore-case ,user (get c 'nick)))))
+
+;;;###liece-autoload
+(defun liece-nick-join (user chnl)
+  (liece-nick-join-1 user chnl)
+  (let ((nbuf (cdr (string-assoc-ignore-case chnl liece-nick-buffer-alist))))
+    (with-current-buffer nbuf
+      (let (buffer-read-only)
+       (liece-nick-insert (liece-nick-normalize user))))))
+
+;;;###liece-autoload
+(defun liece-nick-part (user chnl)
+  (let ((nbuf (cdr (string-assoc-ignore-case chnl liece-nick-buffer-alist))))
+    (setq user (liece-nick-strip user))
+    (with-current-buffer nbuf
+      (let ((case-fold-search t) buffer-read-only)
+       (goto-char (point-min))
+       (when (re-search-forward (concat "^." (regexp-quote user) "$") nil t)
+         (delete-region (match-beginning 0)
+                        (progn (goto-char (match-end 0))
+                               (forward-char) (point)))
+         (liece-nick-part-1 user chnl))))))
+
+;;;###liece-autoload
+(defun liece-nick-change (old new)
+  (let* ((old (liece-nick-strip old)) (new (liece-nick-strip new))
+        (chnls (get (intern old liece-obarray) 'chnl)) chnl nbuf)
+    (liece-change-nick-of old new)
+    (if new
+       (put (intern new liece-obarray) 'chnl chnls))
+    (unintern old liece-obarray)
+    (dolist (chnl chnls)
+      (if (null new)
+         (liece-nick-part old chnl)
+       (setq nbuf (cdr (string-assoc-ignore-case
+                        chnl liece-nick-buffer-alist)))
+       (with-current-buffer nbuf
+         (let (buffer-read-only)
+           (goto-char (point-min))
+           (liece-nick-replace old new)))))))
+
+;;;###liece-autoload
+(defun liece-nick-update (chnl users)
+  (let ((c (intern chnl liece-obarray))
+       (nbuf (cdr (string-assoc-ignore-case chnl liece-nick-buffer-alist))))
+    (mapcar (lambda (prop) (put c prop nil)) '(nick oper voice))
+    (with-current-buffer nbuf
+      (let (buffer-read-only)
+       (liece-kill-all-overlays)
+       (erase-buffer)))
+    (when (and liece-nick-sort-nicks
+              (liece-functionp liece-nick-sort-predicate))
+      (setq users (sort users
+                       (lambda (s1 s2)
+                         (funcall liece-nick-sort-predicate
+                                  (liece-nick-strip s1)
+                                  (liece-nick-strip s2))))))
+    (let (liece-nick-sort-predicate)
+      (dolist (user users)
+       (liece-nick-join user chnl)))))
+
+(defvar liece-nick-region-nicks nil)
+(defvar liece-nick-region-opers nil)
+(defvar liece-nick-region-voices nil)
+
+;;;###liece-autoload
+(defun liece-nick-update-region ()
+  (setq liece-nick-region-nicks nil
+       liece-nick-region-opers nil
+       liece-nick-region-voices nil)
+  (save-excursion
+    (let (region nick)
+      (if (not (region-active-p))
+         (setq region (cons (line-beginning-position)
+                            (line-beginning-position 2)))
+       (setq region (cons (region-beginning) (region-end)))
+       (goto-char (car region))
+       (setcar region (line-beginning-position))
+       (goto-char (cdr region))
+       (if (eobp)
+           (setcdr region (line-beginning-position))
+         (setcdr region (line-beginning-position 2))))
+      (save-restriction
+       (narrow-to-region (car region) (cdr region))
+       (goto-char (point-min))
+       (while (not (eobp))
+         (setq nick (widget-value (widget-at (1+ (point)))))
+         (push nick liece-nick-region-nicks)
+         (if (memq (char-after) '(?@ ?+))
+             (push nick liece-nick-region-voices))
+         (if (eq ?@ (char-after))
+             (push nick liece-nick-region-opers))
+         (beginning-of-line 2))))))
+
+(defun liece-nick-add-buttons (start end)
+  (save-excursion
+    (goto-char start)
+    (while (re-search-forward
+           (eval-when-compile
+             (concat "^\\(" liece-time-prefix-regexp "\\)?"
+                     "[][=<>(][][=<>(]?\\([^:]*:\\)?\\([^][=<>(]+\\)"))
+           end t)
+      (let* ((nick-start (match-beginning 3))
+            (nick-end (match-end 3))
+            (nick (buffer-substring nick-start nick-end)))
+       (when liece-highlight-mode
+         (liece-widget-convert-button
+          'liece-nick-push-button nick-start nick-end nick))))))
+
+;;;###liece-autoload
+(defun liece-nick-redisplay-buffer (chnl)
+  (let ((buffer
+        (cdr (string-assoc-ignore-case
+              chnl liece-nick-buffer-alist)))
+       (window (liece-get-buffer-window liece-nick-buffer)))
+    (and buffer window
+        (with-current-buffer buffer
+          (set-window-buffer window buffer)
+          (unless (liece-frozen buffer)
+            (set-window-start window (point-min)))
+          (setq liece-nick-buffer buffer)))))
+
+(provide 'liece-nick)
+
+;;; liece-nick.el ends here
diff --git a/lisp/liece-q-ccl.el b/lisp/liece-q-ccl.el
new file mode 100644 (file)
index 0000000..4ac9cba
--- /dev/null
@@ -0,0 +1,136 @@
+;;; liece-q-ccl.el --- CTCP binary data quotation in CCL.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-01-31
+;; Revised: 1999-01-31
+;; Keywords: IRC, liece, CTCP
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(require 'broken)
+(require 'pccl)
+
+(eval-and-compile
+  (defconst liece-quote-ccl-256-table
+    '(  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
+       16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31
+       32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47
+       48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63
+       64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79
+       80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95
+       96  97  98  99 100 101 102 103 104 105 106 107 108 109 110 111
+      112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
+      128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
+      144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
+      160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
+      176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
+      192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
+      208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
+      224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
+      240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255)))
+
+(broken-facility ccl-cascading-write
+  "Emacs CCL write command does not accept more than 2 arguments."
+  (condition-case nil
+      (progn
+       (define-ccl-program cascading-read-test
+         '(1
+           (write r0 r1 r2)))
+       t)
+    (error nil)))
+(define-ccl-program liece-quote-ccl-decode
+  `(1
+    (loop
+      (read-if
+       (r0 == ?\\)
+       ((read-if
+        (r1 == ?\\)
+        (write r1)
+        (branch
+         r1
+         ,@(mapcar
+            (lambda (r1)
+              (cond
+               ((= r1 (char-int ?a))
+                `(write ?\x01))
+               ((= r1 (char-int ?n))
+                `(write ?\n))
+               ((= r1 (char-int ?r))
+                `(write ?\r))
+               (t
+                (if-broken ccl-cascading-write
+                    `((write r0)
+                      (write r1))
+                  `(write r0 r1)))))
+            liece-quote-ccl-256-table))))
+       (write r0))
+      (repeat))))
+
+(define-ccl-program liece-quote-ccl-encode
+  `(2
+    (loop
+      (read-branch
+       r0
+       ,@(mapcar
+         (lambda (r0)
+           (cond
+            ((= r0 (char-int ?\\))
+             `(write-repeat "\\\\"))
+            ((= r0 (char-int ?\x01))
+             `(write-repeat "\\a"))
+            ((= r0 (char-int ?\n))
+             `(write-repeat "\\n"))
+            ((= r0 (char-int ?\r))
+             `(write-repeat "\\r"))
+            (t
+             `(write-repeat r0))))
+         liece-quote-ccl-256-table)))))
+
+(make-ccl-coding-system
+ 'liece-quote-ccl-cs ?Q "CTCP Quote Decoder/Encoder"
+ 'liece-quote-ccl-decode 'liece-quote-ccl-encode)
+
+(defun liece-quote-ccl-decode-string (string-to-decode)
+  (decode-coding-string string-to-decode 'liece-quote-ccl-cs))
+
+(defun liece-quote-ccl-encode-string (string-to-encode)
+  (encode-coding-string string-to-encode 'liece-quote-ccl-cs))
+
+(defun liece-quote-ccl-decode-region (min max)
+  (decode-coding-region min max 'liece-quote-ccl-cs))
+
+(defun liece-quote-ccl-encode-region (min max)
+  (encode-coding-region min max 'liece-quote-ccl-cs))
+
+(defalias 'liece-quote-decode-string 'liece-quote-ccl-decode-string)
+(defalias 'liece-quote-encode-string 'liece-quote-ccl-encode-string)
+
+(defalias 'liece-quote-decode-region 'liece-quote-ccl-decode-region)
+(defalias 'liece-quote-encode-region 'liece-quote-ccl-encode-region)
+
+(provide 'liece-q-ccl)
+
+;;; liece-q-ccl.el ends here
diff --git a/lisp/liece-q-el.el b/lisp/liece-q-el.el
new file mode 100644 (file)
index 0000000..dce861e
--- /dev/null
@@ -0,0 +1,91 @@
+;;; liece-q-el.el --- CTCP binary data quotation in emacs-lisp.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-01-31
+;; Revised: 1999-01-31
+;; Keywords: IRC, liece, CTCP
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(defconst liece-quote-strings
+  '(("\\\\" . "\\") ("\\a" . "\ 1") ("\\n" . "\n") ("\\r" . "\r")))
+  
+(defun liece-quote-el-decode-region (start end)
+  "Decode binary data between START and END."
+  (interactive "r")
+  (save-restriction
+    (narrow-to-region start end)
+    (dolist (pair liece-quote-strings)
+      (goto-char (point-min)) (replace-string (car pair) (cdr pair)))))
+
+(defun liece-quote-el-decode-string (string)
+  "Decode binary data from STRING."
+  (interactive)
+  (save-excursion
+    (with-temp-buffer
+      (insert string)
+      (liece-quote-el-decode-string (point-min) (point-max))
+      (buffer-substring (point-min) (point-max)))))
+
+(defun liece-quote-el-encode-region (start end)
+  "Encode binary data between START and END."
+  (interactive "r")
+  (save-restriction
+    (narrow-to-region start end)
+    (goto-char (point-min))
+    (while (search-forward "\\" nil t) (insert "\\"))
+    (goto-char (point-min))
+    (while (search-forward "\ 1" nil t)
+      (backward-delete-char 1)
+      (insert "\\a"))
+    (goto-char (point-min))
+    (while (search-forward "\n" nil t)
+      (backward-delete-char 1)
+      (insert "\\n"))
+    (goto-char (point-min))
+    (while (search-forward "\r" nil t)
+      (backward-delete-char 1)
+      (insert "\\r"))))
+
+(defun liece-quote-el-encode-string (string)
+  "Encode binary data from STRING."
+  (interactive)
+  (save-excursion
+    (with-temp-buffer
+      (erase-buffer)
+      (insert string)
+      (liece-quote-el-encode-region (point-min) (point-max))
+      (buffer-substring (point-min) (point-max)))))
+
+(defalias 'liece-quote-decode-string 'liece-quote-el-decode-string)
+(defalias 'liece-quote-encode-string 'liece-quote-el-encode-string)
+
+(defalias 'liece-quote-decode-region 'liece-quote-el-decode-region)
+(defalias 'liece-quote-encode-region 'liece-quote-el-encode-region)
+
+(provide 'liece-q-el)
+
+;;; liece-q-el.el ends here
+
diff --git a/lisp/liece-tcp.el b/lisp/liece-tcp.el
new file mode 100644 (file)
index 0000000..b264f39
--- /dev/null
@@ -0,0 +1,239 @@
+;;; liece-tcp.el --- TCP/IP stream emulation.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Masanobu Umeda <umerin@mse.kyutech.ac.jp>
+;;         Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-03-16 renamed from tcp.el
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; Notes on TCP package:
+;;
+;; This package provides a TCP/IP stream emulation for GNU Emacs. If
+;; the function `open-network-stream' is not defined in Emacs, but
+;; your operating system has a capability of network stream
+;; connection, this tcp package can be used for communicating with
+;; NNTP server.
+;;
+;; The tcp package runs inferior process which actually does the role
+;; of `open-network-stream'.  The program `tcp' provided with this
+;; package can be used for such purpose.  Before loading the package,
+;; compile `tcp.c' and install it as `tcp' in a directory in the emacs
+;; search path. If you modify `tcp.c', please send diffs to the author
+;; of GNUS.  I'll include some of them in the next releases.
+
+;;; Code:
+
+(require 'poe)
+(require 'poem)
+
+(eval-when-compile
+  (require 'liece-compat)
+  (require 'liece-globals))
+
+(defgroup liece-tcp nil
+  "TCP/IP Emulation"
+  :tag "TCP"
+  :prefix "liece-"
+  :group 'liece-server)
+
+(defcustom liece-tcp-program "ltcp"
+  "The name of the program emulating `open-network-stream' function."
+  :type 'file
+  :group 'liece-tcp)
+
+(defcustom liece-tcp-default-connection-type 'network
+  "TCP/IP Connection type."
+  :type '(choice
+         (const :tag "Network" network)
+         (const :tag "Program" program)
+         (const :tag "SSLeay" ssl)
+         (const :tag "rlogin" rlogin))
+  :group 'liece-tcp)
+
+(autoload 'open-ssl-stream "ssl")
+(defvar ssl-program-arguments)
+
+(defcustom liece-tcp-ssl-protocol-version "3"
+  "SSL protocol version."
+  :type 'integer
+  :group 'liece-tcp)
+
+(defcustom liece-tcp-ssl-default-service 993
+  "Default SSL service."
+  :type 'liece-service-spec
+  :group 'liece-tcp)
+
+(defcustom liece-tcp-rlogin-program "rsh"
+  "Program used to log in on remote machines.
+The default is \"rsh\", but \"ssh\" is a popular alternative."
+  :type 'file
+  :group 'liece-tcp)
+
+(defcustom liece-tcp-relay-host "localhost"
+  "Remote host address."
+  :type 'file
+  :group 'liece-tcp)
+
+(defcustom liece-tcp-rlogin-parameters '("telnet" "-8")
+  "Parameters to `liece-tcp-open-rlogin'."
+  :type 'list
+  :group 'liece-tcp)
+
+(defcustom liece-tcp-rlogin-user-name nil
+  "User name on remote system when using the rlogin connect method."
+  :type 'string
+  :group 'liece-tcp)
+
+\f
+;;;###liece-autoload
+(defun liece-open-network-stream-as-binary
+  (name buffer host service &optional type)
+  (let* ((type (or type liece-tcp-default-connection-type))
+        (method
+         (cond ((eq type 'network)
+                'open-network-stream-as-binary)
+               ((eq type 'program)
+                'liece-tcp-open-program-stream-as-binary)
+               ((eq type 'ssl)
+                'liece-tcp-open-ssl-stream-as-binary)
+               ((eq type 'rlogin)
+                'liece-tcp-open-rlogin-stream-as-binary))))
+    (funcall method name buffer host service)))
+
+;;;###liece-autoload
+(defun liece-open-network-stream
+  (name buffer host service &optional type)
+  (let* ((type (or type liece-tcp-default-connection-type))
+        (method
+         (cond ((eq type 'network)
+                'open-network-stream)
+               ((eq type 'program)
+                'liece-tcp-open-program-stream)
+               ((eq type 'ssl)
+                'liece-tcp-open-ssl-stream)
+               ((eq type 'rlogin)
+                'liece-tcp-open-rlogin-stream-as-binary))))
+    (funcall method name buffer host service)))
+
+(defun liece-tcp-open-program-stream-as-binary (name buffer host service)
+  (as-binary-process
+   (liece-tcp-open-program-stream
+    name buffer host service)))
+
+(defun liece-tcp-open-program-stream (name buffer host service)
+  "Open a TCP connection for a service to a host.
+Returns a subprocess-object to represent the connection.
+Input and output work as for subprocesses; `delete-process' closes it.
+Args are NAME BUFFER HOST SERVICE.
+NAME is name for process.  It is modified if necessary to make it unique.
+BUFFER is the buffer (or `buffer-name') to associate with the process.
+ Process output goes at end of that buffer, unless you specify
+ an output stream or filter function to handle the output.
+ BUFFER may be also nil, meaning that this process is not associated
+ with any buffer
+Third arg is name of the host to connect to.
+Fourth arg SERVICE is name of the service desired, or an integer
+ specifying a service number to connect to."
+  (let ((proc (start-process name buffer
+                            liece-tcp-program
+                            host
+                            (if (stringp service)
+                                service
+                              (int-to-string service)))))
+    (process-kill-without-query proc)
+    ;; Return process
+    proc))
+
+(defun liece-tcp-open-ssl-stream-as-binary (name buffer server service)
+  (as-binary-process
+   (liece-tcp-open-ssl-stream
+    name buffer server service)))
+
+(defun liece-tcp-open-ssl-stream-1 (name buffer server service extra-arg)
+  (let* ((service (or service liece-tcp-ssl-default-service))
+         (ssl-program-arguments (list extra-arg "-connect"
+                                      (format "%s:%d" server service)))
+         (process (open-ssl-stream name buffer server service)))
+    (and process (memq (process-status process) '(open run))
+        process)))
+
+(defun liece-tcp-open-ssl-stream (name buffer server service)
+  (if (string-equal liece-tcp-ssl-protocol-version "2")
+      (liece-tcp-open-ssl-stream-1
+       name buffer server service "-ssl2")
+    (or (liece-tcp-open-ssl-stream-1
+        name buffer server service "-ssl3")
+       (liece-tcp-open-ssl-stream-1
+        name buffer server service "-ssl2"))))
+
+(defun liece-tcp-wait-for-string (proc regexp)
+  "Wait until string arrives in the buffer."
+  (let ((buffer (current-buffer)))
+    (goto-char (point-min))
+    (while (not (re-search-forward regexp nil t))
+      (accept-process-output proc)
+      (set-buffer buffer)
+      (goto-char (point-min)))))
+
+(defun liece-tcp-open-rlogin-stream (name buffer server service)
+  "Open a connection to SERVER using rsh."
+  (let* ((service (if (stringp service)
+                     service
+                  (int-to-string service)))
+        (args `(,name
+                ,buffer
+                ,liece-tcp-rlogin-program
+                ,@(if liece-tcp-rlogin-user-name
+                      (list "-l" liece-tcp-rlogin-user-name))
+                ,liece-tcp-relay-host
+                ,@liece-tcp-rlogin-parameters ,server ,service))
+        (proc (apply #'start-process args)))
+    (save-excursion
+      (set-buffer buffer)
+      (liece-tcp-wait-for-string proc "^Escape") ;; XXX
+      (beginning-of-line 2)
+      (delete-region (point-min) (point))
+      proc)))
+
+(defun liece-tcp-open-rlogin-stream-as-binary (name buffer server service)
+  "Open a connection to SERVER using rsh."
+  (let* ((service (if (stringp service)
+                     service
+                   (int-to-string service)))
+        (args `(,name
+                ,buffer
+                ,liece-tcp-rlogin-program
+                ,@(if liece-tcp-rlogin-user-name
+                      (list "-l" liece-tcp-rlogin-user-name))
+                ,liece-tcp-relay-host
+                ,@liece-tcp-rlogin-parameters ,server ,service))
+        (proc (as-binary-process (apply #'start-process args))))
+    (save-excursion
+      (set-buffer buffer)
+      (liece-tcp-wait-for-string proc "^Escape") ;; XXX
+      (beginning-of-line 2)
+      (delete-region (point-min) (point))
+      proc)))
+
+(provide 'liece-tcp)
+
+;;; liece-tcp.el ends here
diff --git a/lisp/liece-url.el b/lisp/liece-url.el
new file mode 100644 (file)
index 0000000..11568c6
--- /dev/null
@@ -0,0 +1,139 @@
+;;; liece-url.el --- URL browsing.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile
+  (require 'liece-inlines)
+  (require 'liece-intl)
+  (require 'browse-url)
+  (require 'liece-menu))
+
+(defvar-maybe browse-url-browser-function nil)
+
+(defgroup liece-url nil
+  "URL Browsing in IRC buffer."
+  :group 'liece-vars)
+
+(defcustom liece-url-regexp  "\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*[-a-zA-Z0-9_=#$@~`%&*+|\\/]"
+  "Regular expression that matches URLs."
+  :group 'liece-url
+  :type 'regexp)
+
+(defcustom liece-url-mail-regexp "\\bmailto:\\([-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*[-a-zA-Z0-9_=#$@~`%&*+|\\/]\\)"
+  "Regular expression that matches mailto:."
+  :group 'liece-url
+  :type 'regexp)
+
+(defcustom liece-url-browser-name
+  (let (url-func url-prog len)
+    (if (featurep 'browse-url)
+       (and (setq url-func browse-url-browser-function)
+            (setq url-prog (symbol-name url-func))
+            (stringp url-prog)
+            (setq len (length url-prog))
+            (setq url-prog (substring url-prog 11 len)))
+      "netscape"))
+  "Default URL Browser Name.
+netscape   Netscape    1.1b1
+mosaic     XMosaic     <= 2.4
+cci        XMosaic     2.5
+w3         w3          0
+iximosaic  IXI Mosaic  ?
+lynx-*     Lynx        0
+grail      Grail       0.3b1"
+  :type 'string
+  :group 'liece-url)
+
+(defvar liece-url-add-hook nil)
+
+(defmacro liece-url-prepare-browser-function ()
+  (if (featurep 'browse-url)
+      '(intern (concat "browse-url-" liece-url-browser-name))
+    '(intern (concat "liece-url-browser-" liece-url-browser-name))))
+
+(defcustom liece-url-browser-function
+  (liece-url-prepare-browser-function)
+  "Default URL Browser."
+  :type 'function
+  :group 'liece-url)
+
+(defcustom liece-url-alist nil
+  "Alist for URL completion."
+  :type 'alist
+  :group 'liece-url)
+
+(define-widget 'liece-url-link 'link
+  "A link to an www page."
+  :help-echo 'widget-url-link-help-echo
+  :action 'liece-url-link-action)
+
+(defun liece-url-link-action (widget &optional event)
+  (let ((func (liece-url-prepare-browser-function)))
+    (if (fboundp func)
+        (setq liece-url-browser-function func)
+      (setq func liece-url-browser-function))
+    (funcall func (widget-value widget))))
+
+(defun liece-url-add-buttons (start end)
+  (save-excursion
+    (goto-char start)
+    (while (re-search-forward liece-url-regexp end t)
+      (let* ((url-start (match-beginning 0))
+            (url-end (match-end 0))
+            (url (buffer-substring url-start url-end)))
+       (if liece-highlight-mode
+           (liece-widget-convert-button 'url-link url-start url-end url))
+       (unless (assoc url liece-url-alist)
+         (push (list url) liece-url-alist)
+         (run-hook-with-args 'liece-url-add-hook url))))))
+
+(defun liece-command-browse-url (&optional url)
+  (interactive
+   (let (url)
+     (if (and current-prefix-arg (eq current-prefix-arg '-))
+        (setq url (caar liece-url-alist))
+       (setq url (liece-minibuffer-completing-default-read
+                 (_ "Open URL:") liece-url-alist)))
+     (list url)))
+  (let ((func (liece-url-prepare-browser-function)))
+    (if (fboundp func)
+       (setq liece-url-browser-function func)
+      (setq func liece-url-browser-function))
+    (funcall func url)))
+
+(defun url-irc-liece (host port channel user password)
+  (let ((liece-server
+        `(:host ,host :service ,port :password ,password))
+       (liece-startup-channel channel))
+    (liece)))
+
+(provide 'liece-url)
+
+;;; liece-url.el ends here
diff --git a/lisp/liece-vars.el b/lisp/liece-vars.el
new file mode 100644 (file)
index 0000000..937cc7a
--- /dev/null
@@ -0,0 +1,890 @@
+;;; liece-vars.el --- Customization.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile
+  (require 'liece-compat)
+  (require 'liece-globals))
+
+;; User modifiable variables.
+(defgroup liece nil
+  "liece specific customize group")
+
+(defgroup liece-vars nil
+  "liece user customizable variables"
+  :tag "Variables"
+  :prefix "liece-"
+  :group 'liece)
+
+(defcustom liece-saved-forms
+  (purecopy
+   '(liece-kill-nickname
+     liece-server-alist
+     liece-channel-buffer-mode
+     liece-nick-buffer-mode
+     liece-friends))
+  "Variables whose values are saved via command liece-command-save-vars."
+  :type 'string
+  :group 'liece-vars)
+
+(defgroup liece-look nil
+  "Look & Feels"
+  :tag "Look"
+  :prefix "liece-"
+  :group 'liece)
+
+(defcustom liece-command-window-height 4
+  "How large should command window be on startup."
+  :type 'integer
+  :group 'liece-look)
+
+(defcustom liece-truncate-partial-width-windows t
+  "If non-nil, truncate lines in splitting windows such as others buffer."
+  :type 'boolean
+  :group 'liece-look)
+
+(defcustom liece-use-full-window t
+  "If non-nil, IRCHAT will use whole Emacs window."
+  :type 'boolean
+  :group 'liece-look)
+
+(defcustom liece-display-frame-title t
+  "If non-nil, IRCHAT displays channel information on frame title."
+  :type 'boolean
+  :group 'liece-look)
+
+(defcustom liece-tab-stop-list '(2 4 6 8 10 12 14 16)
+  "List of tab stop positions in dialogue buffer."
+  :type '(repeat integer)
+  :group 'liece-look)
+
+(defcustom liece-icon-directory nil
+  "Normal position of liece icons."
+  :type 'directory
+  :group 'liece-look)
+
+(defcustom liece-nick-image-alist
+  '((?@ . "ball.red.xpm")
+    (?  . "ball.blank.xpm")
+    (?+ . "ball.gray.xpm"))
+  "Normal and deformed faces for operators and voices."
+  :type '(repeat (list (character :tag "Mark")
+                      (string :tag "Image")))
+  :group 'liece-look)
+
+(defcustom liece-want-traditional nil
+  "Do we want /commands."
+  :type 'boolean
+  :group 'liece-vars)
+
+(defcustom liece-command-window-on-top nil
+  "If non-nil, the command window will be put at the top of the screen."
+  :type 'boolean
+  :group 'liece-look)
+
+(defcustom liece-one-buffer-mode nil
+  "When non-nil, liece will put up only a dialogue buffer.
+Useful for those (perverts) who use 24 line terminals."
+  :type 'boolean
+  :group 'liece-look)
+
+(defcustom liece-display-status-on-channel-indicator nil
+  "When non-nil, liece will display channel topic on modeline."
+  :type 'boolean
+  :group 'liece-look)
+
+(defcustom liece-directory "~/.liece"
+  "Where to look for data files."
+  :type 'directory
+  :group 'liece-vars)
+  
+(defcustom liece-variables-file (expand-file-name "init.el" liece-directory)
+  "Where to look for variables.  Helps to remove clutter from your .emacs.
+This feature is most likely to dissappear in near future.  The preferred
+way is to put liece variables on .emacs or file loaded from there."
+  :type 'file
+  :group 'liece-vars)
+
+(defcustom liece-variables-files
+  (list liece-variables-file)
+  "Where to look for variables.  Helps to remove clutter from your .emacs.
+This feature is most likely to dissappear in near future.  The preferred
+way is to put liece variables on .emacs or file loaded from there."
+  :type '(repeat (file :tag "Initialization File"))
+  :group 'liece-vars)
+
+;; Where to connect.
+(defgroup liece-server nil
+  "Server Settings"
+  :tag "Server"
+  :prefix "liece-"
+  :group 'liece)
+
+(defgroup liece-channel nil
+  "Channel Settings"
+  :tag "Channel"
+  :prefix "liece-"
+  :group 'liece)
+
+(define-widget 'liece-service-spec 'radio
+  "Edit service spec entries"
+  :convert-widget 'liece-service-spec-convert)
+
+(defun liece-service-spec-convert (widget)
+  (widget-put widget :args '((integer :tag "Port Number")
+                            (string :tag "Name")))
+  widget)
+
+(define-widget 'liece-server-spec 'repeat
+  "Edit server spec entries"
+  :match (lambda (widget value)
+          (eval
+           (` (and
+               (,@ (mapcar
+                    (lambda (entry)
+                      (or (stringp (cdr entry))
+                          (listp (cdr entry))))
+                    value))))))
+  :convert-widget 'liece-server-spec-convert)
+
+(defun liece-server-spec-convert (widget)
+  (let* ((host '(const :format "" :value :host))
+        (service '(const :format "" :value :service))
+        (host
+         (` (group :inline t (, host) (string :tag "Host"))))
+        (service
+         (` (group :inline t (, service) liece-service-spec)))
+        (spec
+         (` (cons
+             (string :tag "Name")
+             (radio (string :tag "Host")
+                    (list (, host) (, service))))))
+        (args (` ((, spec)))))
+    (widget-put widget :args args)
+    widget))
+  
+(defcustom liece-server-alist
+  '(("WIDE Project Kyoto NOC, Japan" . "irc.kyoto.wide.ad.jp")
+    ("WIDE Project Tokyo NOC, Japan" . "irc.tokyo.wide.ad.jp")
+    ("TDI RCAC / 6660" :host "irc.rcac.tdi.co.jp" :service 6660)
+    ("TDI RCAC / 6661" :host "irc.rcac.tdi.co.jp" :service 6661)
+    ("TDI RCAC / 6662" :host "irc.rcac.tdi.co.jp" :service 6662)
+    ("TDI RCAC / 6663" :host "irc.rcac.tdi.co.jp" :service 6663)
+    ("TDI RCAC / 6664" :host "irc.rcac.tdi.co.jp" :service 6664)
+    ("TDI RCAC / 6665" :host "irc.rcac.tdi.co.jp" :service 6665)
+    ("TDI RCAC / 6666" :host "irc.rcac.tdi.co.jp" :service 6666)
+    ("TDI RCAC" . "irc.rcac.tdi.co.jp")
+    ("TDI RCAC, 6Bone" . "irc6.rcac.tdi.co.jp")
+    ("RACE, University of Tokyo" . "irc.race.u-tokyo.ac.jp")
+    ("Hokkaido University, Sapporo, Japan" . "irc.huie.hokudai.ac.jp")
+    ("KARRN Hakozaki NOC" . "irc.karrn.ad.jp")
+    ("Tohoku University, Japan" . "irc.tohoku.ac.jp")
+    ("DTI, Akasaka Tokyo, Japan" . "irc.dti.ne.jp"))
+  "IRC server assoc-list which is used for input IRC server."
+  :type 'liece-server-spec
+  :group 'liece-server)
+
+(defcustom liece-server (or (getenv "IRCSERVER") nil)
+  "Name of the host running the IRC server.
+Value initialized from the IRCSERVER environment variable if one is set"
+  :type 'string
+  :group 'liece-server)
+
+(defcustom liece-service
+  (let ((ircport-env (getenv "IRCPORT")))
+    (if ircport-env
+       (if (> (string-to-int ircport-env) 0)
+           (string-to-int ircport-env)
+         ircport-env)
+      6667))
+  "IRC service name or (port) number."
+  :type 'liece-service-spec
+  :group 'liece-server)
+
+(defcustom liece-my-userhost nil
+  "You can explicitly indicate own hostname here."
+  :type '(radio (string :tag "Hostname")
+               (const :tag "Autodetect" nil))
+  :group 'liece-server)
+
+(defcustom liece-password (or (getenv "IRCPASSWORD") nil)
+  "Your password when connecting to server."
+  :type '(radio (string :tag "Password")
+               (const :tag "No" nil))
+  :group 'liece-server)
+
+(defcustom liece-name (or (getenv "IRCNAME") (user-real-login-name))
+  "The nickname you want to use in IRC.
+Default is the environment variable IRCNICK, or your login name."
+  :type 'string
+  :group 'liece-server)
+
+(defcustom liece-nickname (or (getenv "IRCNICK") (user-real-login-name))
+  "The nickname you want to use in IRC.
+Default is the environment variable IRCNICK, or your login name."
+  :type 'string
+  :group 'liece-server)
+
+(defcustom liece-nick-max-length 9
+  "Maximum length of the nickname."
+  :type 'integer
+  :group 'liece-server)
+
+(defvar liece-real-nickname nil)
+
+(defcustom liece-startup-channel nil
+  "The channel to join automatically at startup.
+If nil, do not join any channel."
+  :type '(radio (string :tag "Channels")
+               (const nil))
+  :group 'liece-channel)
+
+(defcustom liece-startup-channel-list nil
+  "The channel list to join automatically at startup.
+If nil, do not join any channel."
+  :type '(repeat (string :tag "Startup Channel"))
+  :group 'liece-channel)
+
+(defcustom liece-auto-join-partner t
+  "Whether join automatically at arriving private message."
+  :type 'boolean
+  :group 'liece-channel)
+
+(defcustom liece-reconnect-automagic nil
+  "Automatic reconnection, default is disabled."
+  :type 'boolean
+  :group 'liece-server)
+
+(defcustom liece-ask-for-nickname nil
+  "Ask for nickname if liece was entered with \\[universal-argument]."
+  :type 'boolean
+  :group 'liece-server)
+
+(defcustom liece-ask-for-password nil
+  "Ask for password when connecting to server."
+  :type 'boolean
+  :group 'liece-server)
+
+(defcustom liece-ask-for-channel-password nil
+  "Ask for channel password when joining channel with password."
+  :type 'boolean
+  :group 'liece-server)
+
+(defcustom liece-reconnect-with-password nil
+  "Auto recconect to server with password after incorrect password."
+  :type 'boolean
+  :group 'liece-server)
+
+(defcustom liece-grow-tail "_"
+  "Add liece-grow-tail to nick when reconnecting.
+Otherwise you might get killed again if automagic reconnect is too fast."
+  :type 'string
+  :group 'liece-server)
+
+(defcustom liece-auto-iterate-nick nil
+  "When nickname has already been in use, grow-tail automagically."
+  :type 'boolean
+  :group 'liece-server)
+
+(defvar liece-after-registration nil
+  "After my registration.")
+
+(defvar liece-status-message-string nil)
+
+;; Hooks.
+(defgroup liece-hook nil
+  "Hooks"
+  :tag "Hooks"
+  :prefix "liece-"
+  :group 'liece)
+  
+(defcustom liece-command-mode-hook nil
+  "A hook for IRCHAT command mode."
+  :type 'hook
+  :group 'liece-hook)
+
+(defcustom liece-dialogue-mode-hook nil
+  "A hook for IRCHAT dialogue mode."
+  :type 'hook
+  :group 'liece-hook)
+
+(defcustom liece-others-mode-hook nil
+  "A hook for IRCHAT others mode."
+  :type 'hook
+  :group 'liece-hook)
+
+(defcustom liece-channel-mode-hook nil
+  "A hook for IRCHAT Channel mode."
+  :type 'hook
+  :group 'liece-hook)
+
+(defcustom liece-nick-mode-hook nil
+  "A hook for IRCHAT nick mode."
+  :type 'hook
+  :group 'liece-hook)
+
+(defcustom liece-exit-hook nil
+  "A hook executed when signing off IRC."
+  :type 'hook
+  :group 'liece-hook)
+
+(defcustom liece-before-kill-emacs-hook nil
+  "A hook executed when exitting Emacs."
+  :type 'hook
+  :group 'liece-hook)
+
+;; Channel buffers.
+(defcustom liece-channel-buffer-mode nil
+  "When non-nil, liece will display a channel buffer."
+  :type 'boolean
+  :group 'liece-look)
+
+(defcustom liece-channel-window-height-percent 63
+  "How large percent should Current channel window be on startup."
+  :type 'integer
+  :group 'liece-look)
+
+(defcustom liece-default-freeze nil
+  "If non nil, channel buffer local freeze flag is on at starting."
+  :type 'boolean
+  :group 'liece-look)
+
+(defcustom liece-default-own-freeze nil
+  "If non nil, channel buffer local own freeze flag is on at starting."
+  :type 'boolean
+  :group 'liece-look)
+
+(defcustom liece-default-channel-binding nil
+  "The channel list to bind the channel number when joining."
+  :type '(repeat (radio (string :tag "Bound Channel")
+                       (const nil)))
+  :group 'liece-channel)
+
+(defcustom liece-default-partner-binding nil
+  "The chat partner list to bind the partner's number."
+  :type '(repeat (radio (string :tag "Bound Partner")
+                       (const nil)))
+  :group 'liece-partner)
+
+;; Nick buffers.
+(defcustom liece-nick-buffer-mode nil
+  "When non-nil, liece will display a nick list buffer."
+  :type 'boolean
+  :group 'liece-look)
+
+(defcustom liece-nick-window-width-percent 18
+  "How large percent should Current nick list window be on startup."
+  :type 'integer
+  :group 'liece-look)
+
+(defcustom liece-nick-window-auto-hide t
+  "Hide nick window in priv buffer automatically."
+  :type 'boolean
+  :group 'liece-look)
+
+;; Channel list buffer.
+(defcustom liece-channel-list-buffer-mode nil
+  "When non-nil, liece will display a channel list buffer."
+  :type 'boolean
+  :group 'liece-look)
+
+(defcustom liece-channel-list-window-width-percent 18
+  "How large percent should Current channel list window be on startup."
+  :type 'integer
+  :group 'liece-look)
+  
+;; Highlight.
+(defcustom liece-highlight-mode nil
+  "If non nil, IRC buffer is highlighted by specific rule."
+  :type 'boolean
+  :group 'liece-highlight)
+
+(defcustom liece-highlight-pattern "$^"
+  "If non nil, this pattern used for user defined highlight rule."
+  :type '(regexp :tag "Highlighting Pattern")
+  :group 'liece-highlight)
+
+;; DCC
+(defgroup liece-dcc nil
+  "DCC Settings"
+  :tag "DCC"
+  :prefix "liece-"
+  :group 'liece)
+
+(defcustom liece-dcc-program "ldcc"
+  "Name of the external dcc-program.
+Current version takes the one which is earlier in path \(if many\)."
+  :type '(file :tag "DCC program path")
+  :group 'liece-dcc)
+
+(defcustom liece-dcc-directory "~/tmp"
+  "Directory where liece-dcc puts its files."
+  :type 'directory
+  :group 'liece-dcc)
+
+(defcustom liece-dcc-port 0
+  "Default port for DCC operations."
+  :type 'integer
+  :group 'liece-dcc)
+
+(defcustom liece-dcc-resolve-server nil
+  "Resolve IRC server FQDN with external DCC command."
+  :type 'boolean
+  :group 'liece-dcc)
+
+;; Prefix strings for various messages.
+(defgroup liece-prefix nil
+  "Various message prefix"
+  :tag "Prefix"
+  :prefix "liece-"
+  :group 'liece)
+
+(defgroup liece-prefix-string nil
+  "Various prefix string"
+  :tag "Prefix string"
+  :prefix "liece-"
+  :group 'liece-prefix)
+
+(defcustom liece-defected-message-prefix ""
+  "Prefix to attach before the defected crypt message."
+  :type 'string
+  :group 'liece-prefix-string)
+
+(defcustom liece-suspicious-message-prefix ""
+  "Prefix to attach before the suspicious crypt message."
+  :type 'string
+  :group 'liece-prefix-string)
+
+(defcustom liece-change-prefix "*** Change: "
+  "String to add before changing messages."
+  :type 'string
+  :group 'liece-prefix-string)
+
+(defcustom liece-notice-prefix "*** Notice: "
+  "String to add before any notice message."
+  :type 'string
+  :group 'liece-prefix-string)
+
+(defcustom liece-broadcast-prefix "*** Broadcast: "
+  "String to add before any Broadcast message."
+  :type 'string
+  :group 'liece-prefix-string)
+
+(defcustom liece-wallops-prefix "*** Notice: "
+  "String to add before any WALLOPS message."
+  :type 'string
+  :group 'liece-prefix-string)
+
+(defcustom liece-error-prefix "*** Error: "
+  "String to add before any ERROR message."
+  :type 'string
+  :group 'liece-prefix-string)
+
+(defcustom liece-info-prefix "*** Info: "
+  "String to add before any informational message."
+  :type 'string
+  :group 'liece-prefix-string)
+
+(defcustom liece-timestamp-prefix "*** Time: "
+  "String to add before any timestamp message."
+  :type 'string
+  :group 'liece-prefix-string)
+
+(defcustom liece-client-prefix "*** Client: "
+  "String to add before any CTCP message."
+  :type 'string
+  :group 'liece-prefix-string)
+
+(defcustom liece-dcc-prefix "*** DCC: "
+  "String to add before any DCC message."
+  :type 'string
+  :group 'liece-prefix-string)
+
+(defcustom liece-time-prefix-regexp "[0-9][0-9]:[0-9][0-9] "
+  "Time prefix regexp."
+  :type 'regexp
+  :group 'liece-prefix)
+
+(defcustom liece-display-time t
+  "If non-nil, print time prefix on each line in channel buffer."
+  :type 'boolean
+  :group 'liece-prefix)
+
+(defcustom liece-display-prefix-tag nil
+  "If non-nil, print prefix tag on each line in channel buffer."
+  :type 'boolean
+  :group 'liece-prefix)
+
+(defcustom liece-generic-prefix-tag-regexp "\\*\\*\\* \\([^:]+: \\)"
+  "Regular expression for generic prefix tag."
+  :type 'regexp
+  :group 'liece-prefix)
+
+;; Misc.
+(defcustom liece-blink-parens nil
+  "Should we blink matching parenthesis in liece command buffer?"
+  :type 'boolean
+  :group 'liece-vars)
+
+(defcustom liece-show-wallops t
+  "Show wallops messages if usermode +ws."
+  :type 'boolean
+  :group 'liece-vars)
+
+(defcustom liece-ignore-extra-notices t
+  "Don't show any notice unless they come from the local server."
+  :type 'boolean
+  :group 'liece-vars)
+
+(defcustom liece-shorten-kills t
+  "Shorten KILL messages to about one line."
+  :type 'boolean
+  :group 'liece-vars)
+
+(defcustom liece-ignore-changes nil
+  "Ignore changes? Good in topic-wars/link troubles."
+  :type 'boolean
+  :group 'liece-vars)
+
+(defcustom liece-ignore-fakes nil
+  "If non nil, ignore fake notices if receiving them."
+  :type 'boolean
+  :group 'liece-vars)
+
+(defcustom liece-signoff-message nil
+  "Default signoff message."
+  :type '(radio (string :tag "Signoff message"))
+  :group 'liece-vars)
+
+(defcustom liece-away-message ""
+  "Default away message."
+  :type 'string
+  :group 'liece-vars)
+
+(defcustom liece-beep-on-bells 'always
+  "If non-nil, and the IRC dialogue buffer is not selected in a window,
+an IRC message arriving containing a bell character, will cause you
+to be notified.
+If value is 'always, an arriving bell will always cause a beep (or flash)."
+  :type '(radio (const :tag "Always" always) (const :tag "No" nil))
+  :group 'liece-vars)
+
+(defcustom liece-system-fqdname (system-name)
+  "The fully qualified domain name of the system.
+Default is what (system-name) returns."
+  :type 'string
+  :group 'liece-vars)
+
+(defcustom liece-gather-channel-modes t
+  "Gather channel modes when joining channels."
+  :type 'boolean
+  :group 'liece-vars)
+
+(defcustom liece-use-x-face nil
+  "Display X-Face in dialogue buffer."
+  :type 'boolean
+  :group 'liece-look)
+
+;; Send/Receive files.
+(defcustom liece-file-accept nil
+  "Do we accept files."
+  :type 'boolean
+  :group 'liece-ctcp)
+
+(defcustom liece-file-confirm-save nil
+  "Do we want confirmation on saving files."
+  :type 'boolean
+  :group 'liece-ctcp)
+
+;; Userinfos.
+(defgroup liece-ctcp nil
+  "CTCP Settings"
+  :tag "CTCP"
+  :prefix "liece-"
+  :group 'liece)
+
+(defcustom liece-ctcp-userinfo "No user information given."
+  "Userinfo message given to anyone asking."
+  :type 'string
+  :group 'liece-ctcp)
+
+(defcustom liece-ctcp-x-face ""
+  "X-Face message given to anyone asking.  Proper form is \"X-Face: ....\"."
+  :type 'string
+  :group 'liece-ctcp)
+
+(static-when (featurep 'xemacs)
+  (define-obsolete-variable-alias 'liece-client-userinfo
+    'liece-ctcp-userinfo)
+  (define-obsolete-variable-alias 'liece-client-x-face
+    'liece-ctcp-x-face))
+
+(defcustom liece-timers
+  '((liece-command-poll-names liece-poll-names-interval)
+    (liece-command-keepalive liece-keepalive-interval)
+    (liece-command-poll-friends liece-poll-friends-interval))
+  "Symbol name to store timer, timer-function and timer-interval."
+  :type 'list
+  :group 'liece-server)
+
+(defcustom liece-friends nil
+  "Friends to be checked consequently."
+  :type '(repeat (string :tag "Nick"))
+  :group 'liece-vars)
+
+(defcustom liece-display-friends-function 'liece-303-display-friends
+  "Function to display friends status."
+  :type 'function
+  :group 'liece-vars)
+
+(defcustom liece-poll-friends-interval 30
+  "Interval on seconds the existence of friends."
+  :type '(repeat
+         (integer :tag "Polling Interval in Seconds")
+         (const :tag "No" nil))
+  :group 'liece-server)
+
+(defcustom liece-keepalive-interval nil
+  "Interval on seconds the existence of server connection is checked."
+  :type '(radio
+         (integer :tag "Seconds"
+                  :doc "Connection Interval in Seconds")
+         (const :tag "No" nil))
+  :group 'liece-server)
+
+(defcustom liece-poll-names-interval nil
+  "Interval the names are polled from server."
+  :type '(radio
+         (integer :tag "Seconds"
+                  :doc "NAMES Polling Interval in Seconds")
+         (const :tag "No" nil))
+  :group 'liece-server)
+
+(defcustom liece-timestamp-interval (* 60 10)
+  "Interval in seconds between timestamps in dialogue-buffer, nil for none."
+  :type '(radio
+         (integer :tag "Seconds"
+                  :doc "Timestamp Interval in Seconds")
+         (const "No" nil))
+  :group 'liece-server)
+
+(defcustom liece-connection-timeout 60
+  "Default timeout interval."
+  :type 'integer
+  :group 'liece-server)
+  
+(defcustom liece-timestamp-format (concat liece-timestamp-prefix "%s")
+  "Format-string for timestamp."
+  :type 'string
+  :group 'liece-format-string)
+
+;; Conversions: Not used.
+(defcustom liece-send-convert-list nil
+  "Convert characters before sending to server."
+  :type '(repeat (character :tag "Character"
+                           :doc "Convert Character"))
+  :group 'liece-vars)
+
+(defcustom liece-receive-convert-list nil
+  "Convert characters after receiving from server."
+  :type '(repeat (character :tag "Character"
+                           :doc "Convert Character"))
+  :group 'liece-vars)
+
+;; Ignores
+(defgroup liece-ignore nil
+  "Ignore Settings"
+  :tag "Ignore"
+  :prefix "liece-"
+  :group 'liece-vars)
+
+(defcustom liece-kill-nickname nil
+  "List of nicknames to be ignored.
+Messages from these people won't be displayed."
+  :type '(repeat (string :tag "Nick" :doc "Ignore Nick"))
+  :group 'liece-ignore)
+
+(defcustom liece-kill-realname nil
+  "List of real names to be ignored.
+Messages from them won't be displayed."
+  :type '(repeat (string :tag "Realname" :doc "Ignore Realname"))
+  :group 'liece-ignore)
+
+(defcustom liece-kill-logon nil
+  "List of logon names (user@host.dom.ain) to be ignored.
+Messages from them won't be displayed."
+  :type '(repeat (string :tag "Logon" :doc "Ignore Logon Name"))
+  :group 'liece-ignore)
+
+;; New style ignore.
+(defcustom liece-no-ignore-buffers nil
+  "A list of buffers that don't adhere to ignore-list."
+  :type '(repeat (string :tag "Buffer" :doc "Don't Ignore Buffer Names"))
+  :group 'liece-ignore)
+
+(define-widget 'liece-ignore-spec 'repeat
+  "Edit server spec entries"
+  :convert-widget 'liece-ignore-spec-convert)
+
+(defun liece-ignore-spec-convert (widget)
+  (let* ((type
+         '(radio
+           (string :tag "Type" :doc "Match for messagetype")
+           (const nil)))
+        (match
+         '(radio
+           (string :tag "Match" :doc "Match for string-in-message")
+           (const nil)))
+        (info-func
+         '(function :doc "Function whose return value is ignore info"))
+        (user-func
+         '(function :doc "Function whose return value is ignore user list"))
+        (name
+         '(repeat :tag "Name" (string :doc "Ignore user name")))
+        (spec
+         (` (list :value (nil nil)
+                  (choice :tag "Message"
+                   (cons (, type) (, match)) (const nil) (, info-func))
+                  (choice :tag "User" (const nil) (, user-func) (, name)))))
+        (args (` ((, spec)))))
+    (widget-put widget :args args)
+    widget))
+
+(defcustom liece-ignore-list nil
+  "A list of buffers that don't adhere to ignore-list."
+  :type 'liece-ignore-spec
+  :group 'liece-ignore)
+
+(defcustom liece-compress-changes t
+  "Set to t if we want instant compressed messages in the old format."
+  :type 'boolean
+  :group 'liece-vars)
+
+(defcustom liece-compress-treshold 1
+  "Number of lines to search back for a previous matching join/part/quit/mode."
+  :type 'integer
+  :group 'liece-vars)
+
+(defcustom liece-compress-mode-length 3
+  "Number of mode compression length."
+  :type 'integer
+  :group 'liece-vars)
+
+(defcustom liece-buffer-max-size 4242424
+  "Maximum size (in bytes) of any liece buffer."
+  :type 'integer
+  :group 'liece-vars)
+
+(defcustom liece-buffer-default-size 4042424
+  "Size to shrink buffer if it grows too big."
+  :type 'integer
+  :group 'liece-vars)
+
+(defcustom liece-buffer-check-interval (* 60 10)
+  "Interval between `buffer-size' checks."
+  :type 'integer
+  :group 'liece-vars)
+
+(static-when (featurep 'xemacs)
+  (define-obsolete-variable-alias 'liece-buffer-maxsize
+    'liece-buffer-max-size)
+  (define-obsolete-variable-alias 'liece-buffer-defsize
+    'liece-buffer-default-size)
+  (define-obsolete-variable-alias 'liece-checkbuffer-interval
+    'liece-buffer-check-interval))
+
+(defcustom liece-private-window-height 4
+  "How tall is the window for private messages when shown."
+  :type 'integer
+  :group 'liece-vars)
+
+(defcustom liece-format-time-function
+  'liece-compose-time-string
+  "Function to convert `current-time-string' to the human readable form.
+If you like to have the short format, set this to nil or to a
+funtion (defun my-format (s) s)."
+  :type 'function
+  :group 'liece-vars)
+
+(defcustom liece-keep-buffers t
+  "When (re)starting IRC, erase contents of old buffers."
+  :type 'boolean
+  :group 'liece-vars)
+
+(defcustom liece-scroll-step nil
+  "The number of lines to try scrolling a window by when point moves out."
+  :type '(radio (integer :tag "Scroll Step")
+               (const nil))
+  :group 'liece-look)
+
+(defcustom liece-swap-private nil
+  "When showing private is it between under dialogue or not."
+  :type 'boolean
+  :group 'liece-vars)
+
+(defcustom liece-buffer-preferences
+  (list
+   (cons ".*" liece-D-buffer))
+  "List of lists that contain regexp to match and `buffer-list' to insert.
+Setting this as
+(list
+ (cons \"#report\" (list \"*report-buffer*\"))
+ (cons \".*\" liece-D-buffer))
+would cause messages from and to channel #report to be displayed on
+buffer named *report-buffer* and all other messages are displayed on
+dialogue-buffer."
+  :type '(repeat (cons (string :tag "Channel Name")
+                       (list (variable :tag "Buffe or Name"))))
+  :group 'liece-vars)
+
+(defcustom liece-channel-conversion-map nil
+  "The map of channel conversion."
+  :type '(repeat (cons (string :tag "Channel Name")
+                      (string :tag "Channel Name (After Conversion)")))
+  :group 'liece-vars)
+
+(defcustom liece-channel-conversion-default-mask "*.jp"
+  "The default mask of channel conversion."
+  :type 'string
+  :group 'liece-vars)
+
+(defcustom liece-channel-id-length 5
+  "Length of channel ID for ! channels."
+  :type 'integer
+  :group 'liece-vars)
+
+(defcustom liece-insert-environment-version nil
+  "If non-nil, display version description of current environment."
+  :type 'boolean
+  :group 'liece-vars)
+  
+(provide 'liece-vars)
+
+;;; liece-vars.el ends here
diff --git a/lisp/liece-version.el b/lisp/liece-version.el
new file mode 100644 (file)
index 0000000..43fdc3d
--- /dev/null
@@ -0,0 +1,113 @@
+;;; liece-version.el --- Version information for Liece.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1999-12-23
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+;;; @ version number constants
+;;;
+
+(require 'product)
+(provide 'liece-version)
+
+(product-provide 'liece-version
+  (product-define "Liece" nil '(1 4 3) "Dreamlore Degenarate"))
+
+(defconst liece-environment-version
+  (concat
+   (if (fboundp 'apel-version)
+       (concat (apel-version) " ")
+     nil)
+   (if (featurep 'xemacs)
+       (concat (cond
+               ((featurep 'utf-2000)
+                (concat "UTF-2000-MULE/" utf-2000-version))
+               ((featurep 'mule) "MULE"))
+              " XEmacs"
+              (if (string-match "^[0-9]+\\(\\.[0-9]+\\)" emacs-version)
+                  (concat
+                   "/"
+                   (substring emacs-version 0 (match-end 0))
+                   (cond ((and (boundp 'xemacs-betaname)
+                               xemacs-betaname)
+                          ;; It does not exist in XEmacs
+                          ;; versions prior to 20.3.
+                          (concat " " xemacs-betaname))
+                         ((and (boundp 'emacs-patch-level)
+                               emacs-patch-level)
+                          ;; It does not exist in FSF Emacs or in
+                          ;; XEmacs versions earlier than 21.1.1.
+                          (format " (patch %d)" emacs-patch-level))
+                         (t ""))
+                   " (" xemacs-codename ") ("
+                   system-configuration ")")
+                " (" emacs-version ")"))
+     (let ((ver (if (string-match "\\.[0-9]+$" emacs-version)
+                   (substring emacs-version 0 (match-beginning 0))
+                 emacs-version)))
+       (if (featurep 'mule)
+          (if (boundp 'enable-multibyte-characters)
+              (concat "Emacs/" ver
+                      " (" system-configuration ")"
+                      (if enable-multibyte-characters
+                          (concat " MULE/" mule-version)
+                        " (with unibyte mode)")
+                      (if (featurep 'meadow)
+                          (let ((mver (Meadow-version)))
+                            (if (string-match "^Meadow-" mver)
+                                (concat " Meadow/"
+                                        (substring mver
+                                                   (match-end 0))))))
+                      (if (boundp 'NEMACS)
+                          (let ((nemacs-version
+                                 (condition-case ()
+                                     (eval '(nemacs-version))
+                                   (error ""))))
+                            (when (string-match
+                                   "Nemacs version \\([^ ]*\\)"
+                                   nemacs-version)
+                              (setq nemacs-version
+                                    (match-string 1 nemacs-version)))
+                            (concat " NEmacs/" nemacs-version))))
+            (concat "MULE/" mule-version
+                    " (based on Emacs " ver ")"))
+        (concat "Emacs/" ver " (" system-configuration ")"))))))
+
+(defun liece-version ()
+  "Print Liece version."
+  (interactive)
+  (let ((product-info
+        (concat (product-string-1 'liece-version t)
+                (if liece-insert-environment-version
+                    (concat " " liece-environment-version)
+                  nil))))
+    (if (interactive-p)
+       (message "%s" product-info)
+      product-info)))
+
+;;; liece-version.el ends here
diff --git a/lisp/liece-window.el b/lisp/liece-window.el
new file mode 100644 (file)
index 0000000..c9f9b77
--- /dev/null
@@ -0,0 +1,330 @@
+;;; liece-window.el --- Window configuration style utility.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-01-08
+;; Revised: 1999-07-05
+;; Keywords: window, window configuration
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(require 'liece-misc)
+(require 'liece-intl)
+
+(require 'calist)
+(eval-when-compile (require 'cl))
+
+(defgroup liece-window nil
+  "Window configuration"
+  :tag "Window configuration"
+  :group 'liece)
+
+(defcustom liece-window-min-width 2
+  "Minimal width of liece window."
+  :type 'integer
+  :group 'liece-window)
+
+(defcustom liece-window-min-height 2
+  "Minimal height of liece window."
+  :type 'integer
+  :group 'liece-window)
+
+(defcustom liece-window-style-directory nil
+  "Normal position of style configuration files."
+  :type 'directory
+  :group 'liece-window)
+
+(defcustom liece-window-default-style "bottom"
+  "Default style."
+  :type 'string
+  :group 'liece-window)
+
+(defcustom liece-window-to-buffer
+  '((channel . liece-channel-buffer)
+    (others . liece-others-buffer)
+    (dialogue . liece-dialogue-buffer)
+    (command . liece-command-buffer)
+    (channel-list . liece-channel-list-buffer)
+    (nick . liece-nick-buffer))
+  "Window abbreviation to buffer alist."
+  :type '(repeat
+         (cons (symbol :tag "Abbrev")
+               (symbol :tag "Buffer")))
+  :group 'liece-window)
+
+(defconst liece-window-split-types '(horizontal vertical))
+
+(defvar liece-window-style-configuration-alist nil)
+(defvar liece-window-current-style nil)
+(defvar liece-window-configuration-stack nil)
+
+(defun liece-window-field-match-method-as-default-rule
+  (calist field-type field-value)
+  (let* ((field (assq field-type calist)) (value (cdr field)))
+    (cond ((null field)
+          (cons (cons field-type field-value) calist))
+         ((and (symbolp field-value) (eq field-value 'any))
+          calist)
+         ((and (symbolp value) (eq field-value value))
+          calist))))
+
+(define-calist-field-match-method
+  'command-buffer-mode
+  'liece-window-field-match-method-as-default-rule)
+
+(define-calist-field-match-method
+  'channel-buffer-mode
+  'liece-window-field-match-method-as-default-rule)
+
+(define-calist-field-match-method
+  'nick-buffer-mode
+  'liece-window-field-match-method-as-default-rule)
+
+(define-calist-field-match-method
+  'channel-list-buffer-mode
+  'liece-window-field-match-method-as-default-rule)
+
+(defmacro liece-window-add-style (&rest calist)
+  `(ctree-set-calist-strictly 'liece-window-style-configuration-alist
+                             ',calist))
+
+(defmacro liece-window-define-reconfiguration-predicate (name &rest body)
+  `(defun-maybe ,name ,@body))
+  
+(put 'liece-window-define-reconfiguration-predicate
+     'lisp-indent-function 'defun)
+
+(defmacro liece-window-set-default-style ()
+  "Set window configuration with fallback style."
+  '(liece-window-add-style
+    (command-buffer-mode . any)
+    (channel-buffer-mode . any)
+    (nick-buffer-mode . any)
+    (channel-list-buffer-mode . any)
+    (configuration
+     (vertical
+      1.0
+      (dialogue 1.0)
+      (command 4 point)))))
+     
+(defsubst liece-window-load-style-file (style)
+  "Load style file."
+  (condition-case nil
+      (progn
+       (if (null liece-window-style-directory)
+           (setq liece-window-style-directory
+                 (liece-locate-path "styles")))
+       (setq liece-window-style-configuration-alist nil)
+       (load (expand-file-name style liece-window-style-directory))
+       (setq liece-window-current-style style))
+    (error
+     (liece-message "Style file load failed.")
+     (liece-window-set-default-style))))
+
+(defmacro liece-window-percent-to-rate (percent)
+  `(/ ,percent 100.0))
+
+(defmacro liece-window-to-buffer-helper (window)
+  `(cond ((symbolp ,window)
+         (symbol-value ,window))
+        (t ,window)))
+
+(defmacro liece-window-safe-select-window (window)
+  `(if ,window (select-window ,window)))
+
+;;;###liece-autoload
+(defun liece-command-set-window-style (style)
+  (interactive
+   (let ((styles (directory-files liece-window-style-directory)))
+     (list
+      (liece-minibuffer-completing-default-read
+       "Window style: " (list-to-alist styles) nil t
+       liece-window-current-style))))
+  (liece-window-load-style-file style))
+
+(defun liece-command-reload-window-style ()
+  (interactive)
+  (liece-window-load-style-file
+   (or liece-window-current-style
+       liece-window-default-style)))
+
+(defmacro liece-window-default-reconfiguration-predicate ()
+  '(or (one-window-p t)
+       (null (liece-get-buffer-window liece-command-buffer))
+       (and (not liece-channel-buffer-mode)
+           (null (liece-get-buffer-window liece-dialogue-buffer)))
+       (and liece-channel-buffer-mode
+           (null (liece-get-buffer-window liece-channel-buffer))
+           (null (liece-get-buffer-window liece-others-buffer)))
+       (and liece-channel-buffer-mode
+           (if liece-nick-buffer-mode
+               (null (liece-get-buffer-window liece-nick-buffer))
+             (not (null (liece-get-buffer-window liece-nick-buffer)))))
+       (if liece-channel-list-buffer-mode
+          (null (liece-get-buffer-window liece-channel-list-buffer))
+        (not (null (liece-get-buffer-window liece-channel-list-buffer))))))
+
+;;;###liece-autoload
+(defun liece-configure-windows ()
+  (let ((liece-nick-buffer-mode liece-nick-buffer-mode)
+       (liece-channel-buffer-mode liece-channel-buffer-mode)
+       situation calist split predicate)
+    (if (and (get 'liece-nick-buffer-mode 'hide)
+            liece-nick-window-auto-hide)
+       (setq liece-nick-buffer-mode nil))
+    (if (not (liece-channel-last
+             (if (eq liece-command-buffer-mode 'chat)
+                 liece-current-chat-partners
+               liece-current-channels)))
+       (setq liece-channel-buffer-mode nil))
+    (setq situation
+         `((channel-buffer-mode . ,liece-channel-buffer-mode)
+           (nick-buffer-mode . ,liece-nick-buffer-mode)
+           (channel-list-buffer-mode . ,liece-channel-list-buffer-mode)
+           (command-buffer-mode . ,liece-command-buffer-mode)))
+    (or liece-window-current-style
+       (liece-command-set-window-style liece-window-default-style))
+    (setq calist (ctree-match-calist liece-window-style-configuration-alist
+                                    situation)
+         split (cadr (assq 'configuration calist))
+         predicate (cdr (assq 'reconfiguration-predicate calist)))
+    (when (and split
+              (or (null predicate)
+                  (and predicate
+                       (liece-functionp predicate)
+                       (funcall predicate))))
+      (setq truncate-partial-width-windows
+           (not liece-truncate-partial-width-windows))
+      (if liece-use-full-window (delete-other-windows))
+      (save-excursion
+       (switch-to-buffer liece-command-buffer) ;; u-mu.
+       (liece-window-configure-frame split)))))
+
+(defun liece-window-configure-frame (split &optional window)
+  (or window
+      (setq window (get-buffer-window (current-buffer))))
+  (liece-window-safe-select-window window)
+  (while (and (not (assq (car split) liece-window-to-buffer))
+              (liece-functionp (car split)))
+    (setq split (eval split)))
+  (let* ((type (car split))
+        (subs (cddr split))
+        (len (if (eq type 'horizontal) (window-width) (window-height)))
+        (total 0)
+        (window-min-width
+         (or liece-window-min-width window-min-width))
+        (window-min-height
+         (or liece-window-min-height window-min-height))
+        s result new-win rest comp-subs size sub)
+    (cond
+     ;; Nothing to do here.
+     ((null split))
+     ;; Don't switch buffers.
+     ((null type)
+      (and (memq 'point split) window))
+     ;; This is a buffer to be selected.
+     ((not (memq type '(horizontal vertical)))
+      (let ((buffer (cond ((stringp type) type)
+                         (t (cdr (assq type liece-window-to-buffer))))))
+       (unless buffer
+         (error "Illegal buffer type: %s" type))
+       (switch-to-buffer
+        (liece-window-to-buffer-helper buffer))
+       ;; We return the window if it has the `point' spec.
+       (and (memq 'point split) window)))
+     (t
+      (when (> (length subs) 0)
+       ;; First we have to compute the sizes of all new windows.
+       (while subs
+         (setq sub (append (pop subs) nil))
+         (while (and (not (assq (car sub) liece-window-to-buffer))
+                     (liece-functionp (car sub)))
+           (setq sub (eval sub)))
+         (when sub
+           (push sub comp-subs)
+           (setq size (cadar comp-subs))
+           (cond ((equal size 1.0)
+                  (setq rest (car comp-subs))
+                  (setq s 0))
+                 ((floatp size)
+                  (setq s (floor (* size len))))
+                 ((integerp size)
+                  (setq s size))
+                 ((symbolp size)
+                  (setq s
+                        (floor
+                         (* (liece-window-percent-to-rate
+                             (symbol-value size))
+                            len))))
+                 (t
+                  (error "Illegal size: %s" size)))
+           ;; Try to make sure that we are inside the safe limits.
+           (cond ((zerop s))
+                 ((eq type 'horizontal)
+                  (setq s (max s window-min-width)))
+                 ((eq type 'vertical)
+                  (setq s (max s window-min-height))))
+           (setcar (cdar comp-subs) s)
+           (incf total s)))
+       ;; Take care of the "1.0" spec.
+       (if rest
+           (setcar (cdr rest) (- len total))
+         (error "No 1.0 specs in %s" split))
+       ;; The we do the actual splitting in a nice recursive
+       ;; fashion.
+       (setq comp-subs (nreverse comp-subs))
+       (while comp-subs
+         (if (null (cdr comp-subs))
+             (setq new-win window)
+           (setq new-win
+                 (split-window window (cadar comp-subs)
+                               (eq type 'horizontal))))
+         (setq result (or (liece-window-configure-frame
+                           (car comp-subs) window)
+                          result))
+         (liece-window-safe-select-window new-win)
+         (setq window new-win)
+         (setq comp-subs (cdr comp-subs))))
+      ;; Return the proper window, if any.
+      (liece-window-safe-select-window result)))))
+
+(defun liece-window-configuration-push ()
+  (let ((frame (selected-frame))
+       (config (current-window-configuration)))
+    (push (list frame config)
+         liece-window-configuration-stack)))
+
+(defun liece-window-configuration-pop ()
+  (let* ((frame (selected-frame))
+         (triple (assq frame liece-window-configuration-stack)))
+    (when (and triple (window-configuration-p (cadr triple)))
+      (set-window-configuration (cadr triple))
+      (if (setq frame (assq frame liece-window-configuration-stack))
+         (setq liece-window-configuration-stack
+               (delq frame liece-window-configuration-stack))))
+    liece-window-configuration-stack))
+
+(provide 'liece-window)
+
+;;; liece-window.el ends here
diff --git a/lisp/liece-x-face.el b/lisp/liece-x-face.el
new file mode 100644 (file)
index 0000000..4403619
--- /dev/null
@@ -0,0 +1,87 @@
+;;; liece-x-face.el --- X-Face wrappers.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1998-11-25
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile (require 'liece-compat))
+
+(require 'path-util)
+
+(defvar liece-x-face-insert-function
+  (when (and (module-installed-p 'bitmap) (module-installed-p 'x-face))
+    (function liece-x-face-insert-with-bitmap)))
+
+(eval-and-compile
+  (autoload 'x-face-encode "x-face")
+  (autoload 'x-face-read-existing-file-name "x-face")
+  (autoload 'x-face-icons-to-xbm "x-face")
+  (autoload 'x-face-x-face-encoded-string-to-icon-string "x-face")
+  (autoload 'bitmap-insert-xbm-buffer "bitmap")
+  (autoload 'bitmap-decode-xbm "bitmap")
+  (autoload 'bitmap-read-xbm-buffer "bitmap")
+  (autoload 'bitmap-compose "bitmap"))
+  
+(defalias 'liece-x-face-encode 'x-face-encode)
+(defalias 'liece-x-face-read-existing-file-name
+  'x-face-read-existing-file-name)
+
+(defun liece-x-face-insert-with-bitmap (buffer str nick)
+  (save-excursion
+    (set-buffer buffer)
+    (goto-char (point-max))
+    (let* (buffer-read-only
+          (buf (x-face-icons-to-xbm
+                nick 1 1
+                (x-face-x-face-encoded-string-to-icon-string str)))
+          (cmp (bitmap-decode-xbm (bitmap-read-xbm-buffer buf)))
+          (len (length cmp)) (col (current-column))
+          (prefix (buffer-substring
+                   (line-beginning-position) (point))) pt)
+      (delete-region (line-beginning-position) (point))
+      (dotimes (i len)
+       (insert ?\n)
+       (if (= i (/ len 2))
+           (insert prefix)
+         (move-to-column col t))
+       (setq pt (point))
+       (insert (bitmap-compose (aref cmp i)))
+       (overlay-put
+        (make-overlay pt (point)) 'face 'liece-client-face)))))
+  
+(defun liece-x-face-insert (buffers str nick)
+  (cond
+   ((or (not buffers) (listp buffers))
+    (dolist (buffer buffers)
+      (liece-x-face-insert buffer str nick)))
+   ((fboundp liece-x-face-insert-function)
+    (funcall liece-x-face-insert-function buffers str nick))))
+
+(provide 'liece-x-face)
+
+;;; liece-x-face.el ends here
diff --git a/lisp/liece-xemacs.el b/lisp/liece-xemacs.el
new file mode 100644 (file)
index 0000000..06cc66c
--- /dev/null
@@ -0,0 +1,630 @@
+;;; liece-xemacs.el --- XEmacs specific routines.
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 1999-08-22
+;; Keywords: emulation
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(eval-when-compile
+  (require 'liece-inlines)
+  (require 'liece-crypt)
+  (require 'liece-commands))
+
+(autoload 'liece-command-dcc-send "liece-dcc")
+(defvar liece-nick-popup-menu)
+
+(defgroup liece-toolbar nil
+  "Toolbar of your XEmacs"
+  :tag "Toolbar"
+  :group 'liece)
+
+(defgroup liece-toolbar-icons nil
+  "Toolbar Icons of your XEmacs"
+  :tag "Toolbar Icons"
+  :prefix "liece-toolbar-"
+  :group 'liece)
+
+(defmacro liece-xemacs-icon-path (file)
+  "Search icon FILE and return absolete path of the file."
+  `(or (and liece-icon-directory
+           (expand-file-name ,file liece-icon-directory))
+       (let ((path (liece-find-path ,file "icons")))
+        (when path
+          (setq liece-icon-directory
+                (file-name-directory path)))
+        path)))
+
+(define-widget 'liece-toolbar-icon 'list
+  "Edit toolbar spec entries"
+  :match (lambda (widget value)
+          (valid-plist-p value))
+  :convert-widget 'liece-toolbar-icon-convert)
+
+(eval-and-compile
+  (defconst liece-toolbar-icon-states
+    '(:up :down :disabled :cap-up :cap-down :cap-disabled)
+    "toolbar event states")
+
+  (defun liece-toolbar-icon-convert-1 (state)
+    (list 'group :inline t :format "%t: %v"
+         :tag (capitalize (substring (symbol-name state) 1))
+         (list 'const :format "" :value state
+               (list 'radio '(const :tag "none" nil) 'file)))))
+
+(defun liece-toolbar-icon-convert (widget)
+  "Widget converter of the WIDGET `liece-toolbar-icon'."
+  (apply #'widget-put widget :args
+        (eval-when-compile
+          (mapcar #'liece-toolbar-icon-convert-1
+                  liece-toolbar-icon-states)))
+  widget)
+
+(defcustom liece-use-toolbar (if (featurep 'toolbar)
+                                'default-toolbar
+                              nil)
+  "*If nil, do not use a toolbar.
+If it is non-nil, it must be a toolbar.  The five valid values are
+`default-toolbar', `top-toolbar', `bottom-toolbar',
+`right-toolbar', and `left-toolbar'."
+  :type '(choice (const default-toolbar)
+                 (const top-toolbar) (const bottom-toolbar)
+                 (const left-toolbar) (const right-toolbar)
+                 (const :tag "no toolbar" nil))
+  :group 'liece-toolbar)
+
+(defcustom liece-toolbar-back-icon '(:up "back.xpm")
+  "Back button."
+  :type 'liece-toolbar-icon
+  :group 'liece-toolbar-icons)
+
+(defcustom liece-toolbar-forward-icon '(:up "forward.xpm")
+  "Forward button."
+  :type 'liece-toolbar-icon
+  :group 'liece-toolbar-icons)
+
+(defcustom liece-toolbar-reload-icon '(:up "reload.xpm")
+  "Reload button."
+  :type 'liece-toolbar-icon
+  :group 'liece-toolbar-icons)
+
+(defcustom liece-toolbar-home-icon '(:up "home.xpm")
+  "Home button."
+  :type 'liece-toolbar-icon
+  :group 'liece-toolbar-icons)
+
+(defcustom liece-toolbar-search-icon '(:up "search.xpm")
+  "Search button."
+  :type 'liece-toolbar-icon
+  :group 'liece-toolbar-icons)
+
+(defcustom liece-toolbar-location-icon '(:up "location.xpm")
+  "Location button."
+  :type 'liece-toolbar-icon
+  :group 'liece-toolbar-icons)
+
+(defcustom liece-toolbar-crypt-active-icon '(:up "encrypt.xpm")
+  "Crypt button (active)."
+  :type 'liece-toolbar-icon
+  :group 'liece-toolbar-icons)
+
+(defcustom liece-toolbar-crypt-inactive-icon '(:up "crypt.xpm")
+  "Crypt button (inactive)."
+  :type 'liece-toolbar-icon
+  :group 'liece-toolbar-icons)
+
+(defcustom liece-toolbar-crypt-icon
+  liece-toolbar-crypt-inactive-icon
+  "Crypt button."
+  :type 'liece-toolbar-icon
+  :group 'liece-toolbar-icons)
+
+(defcustom liece-toolbar-stop-icon '(:up "stop.xpm")
+  "Stop button."
+  :type 'liece-toolbar-icon
+  :group 'liece-toolbar-icons)
+
+;;; @ internal variables
+;;; 
+(defvar liece-glyph-cache nil)
+(defvar liece-toolbar-position default-toolbar-position)
+
+(defvar liece-toolbar-back-glyph nil)
+(defvar liece-toolbar-forward-glyph nil)
+(defvar liece-toolbar-reload-glyph nil)
+(defvar liece-toolbar-home-glyph nil)
+(defvar liece-toolbar-search-glyph nil)
+(defvar liece-toolbar-location-glyph nil)
+(defvar liece-toolbar-crypt-glyph nil)
+(defvar liece-toolbar-crypt-active-glyph nil)
+(defvar liece-toolbar-crypt-inactive-glyph nil)
+(defvar liece-toolbar-stop-glyph nil)
+
+(defvar liece-toolbar-spec-list
+  '([liece-toolbar-back-glyph
+     liece-command-previous-channel t "Previous Channel"]
+    [liece-toolbar-forward-glyph
+     liece-command-next-channel t "Next Channel"]
+    [liece-toolbar-reload-glyph
+     liece-command-list t "List Channel"]
+    [liece-toolbar-home-glyph
+     liece-switch-to-channel-no-1 t "Go Home Channel"]
+    [liece-toolbar-search-glyph
+     liece-command-finger t "Finger"]
+    [liece-toolbar-location-glyph
+     liece-command-join t "Join Channel"]
+    [liece-toolbar-crypt-glyph
+     liece-toolbar-toggle-crypt t "Toggle Crypt Mode"]
+    [liece-toolbar-stop-glyph
+     liece-command-quit t "Quit IRC"]))
+
+;;; @ toolbar icons
+;;; 
+(defun liece-toolbar-icon-plist-get (spec prop)
+  "Return absolete path of icon file which SPEC has PROP."
+  (let ((icon (plist-get spec prop)))
+    (if icon (liece-locate-icon-file icon))))
+
+(defun liece-toolbar-map-button-list (plist)
+  "Make toolbar icon list based on status PLIST."
+  (apply #'toolbar-make-button-list
+        (mapcar
+         (lambda (prop)
+           (liece-toolbar-icon-plist-get plist prop))
+         liece-toolbar-icon-states)))
+
+(defun liece-xemacs-setup-toolbar (bar &optional force)
+  "Prepare icons of toolbar BAR.
+If optional argument FORCE is non-nil, always update toolbar."
+  (let (icon plist)
+    (set-default-toolbar-position liece-toolbar-position)
+    (dolist (spec bar)
+      (setq icon (aref spec 0)
+           plist (symbol-value
+                  (intern (concat
+                           (substring (prin1-to-string icon) -5 0)
+                           "icon"))))
+      (when (or force
+               (not (symbol-value icon)))
+       (set icon (liece-toolbar-map-button-list plist)))
+      (run-hooks 'liece-xemacs-setup-toolbar-hook))))
+
+(add-hook 'liece-xemacs-setup-toolbar-hook 'liece-toolbar-setup-crypt-glyph)
+
+(defun liece-toolbar-setup-crypt-glyph ()
+  "Set crypt icons in two states."
+  (setq liece-toolbar-crypt-active-glyph
+       (liece-toolbar-map-button-list liece-toolbar-crypt-active-icon)
+       liece-toolbar-crypt-inactive-glyph
+       (liece-toolbar-map-button-list liece-toolbar-crypt-inactive-icon)))
+
+(defun liece-toolbar-toggle-crypt ()
+  "Toolbar button handler for crypt mode."
+  (interactive)
+  (liece-command-toggle-crypt)
+  (setq liece-toolbar-crypt-glyph
+       (if liece-crypt-mode-active
+           liece-toolbar-crypt-active-glyph
+         liece-toolbar-crypt-inactive-glyph))
+  (and liece-use-toolbar
+       (set-specifier (symbol-value liece-use-toolbar)
+                     (cons (current-buffer) liece-toolbar-spec-list))))
+
+;;; @ modeline decoration
+;;; 
+(defun liece-xemacs-hide-modeline ()
+  "Remove modeline from current window."
+  (set-specifier has-modeline-p (cons (current-buffer) nil)))
+
+(when (featurep 'scrollbar)
+  (defun liece-xemacs-hide-scrollbars ()
+    (static-cond
+     ((boundp 'horizontal-scrollbar-visible-p)
+      (set-specifier horizontal-scrollbar-visible-p nil
+                    (current-buffer)))
+     ((boundp 'scrollbar-height)
+      (set-specifier scrollbar-height (cons (current-buffer) 0)))))
+  (add-hook 'liece-nick-mode-hook 'liece-xemacs-hide-scrollbars)
+  (add-hook 'liece-channel-list-mode-hook 'liece-xemacs-hide-scrollbars))
+
+(add-hook 'liece-nick-mode-hook 'liece-xemacs-hide-modeline)
+(add-hook 'liece-channel-list-mode-hook 'liece-xemacs-hide-modeline)
+
+(defvar liece-xemacs-modeline-left-extent
+  (let ((ext (copy-extent modeline-buffer-id-left-extent)))
+    ext))
+
+(defvar liece-xemacs-modeline-right-extent
+  (let ((ext (copy-extent modeline-buffer-id-right-extent)))
+    ext))
+
+(add-hook 'liece-command-mode-hook 'liece-setup-toolbar)
+
+(defun liece-setup-toolbar ()
+  "Prepare toolbar if wanted."
+  (and liece-use-toolbar
+       (liece-xemacs-setup-toolbar liece-toolbar-spec-list)
+       (set-specifier (symbol-value liece-use-toolbar)
+                     (cons (current-buffer) liece-toolbar-spec-list))))
+
+(defun liece-xemacs-modeline-glyph ()
+  "Return a glyph of modeline pointer."
+  (let ((glyph
+        (let (file)
+          (make-glyph
+           (nconc
+            (if (setq file (liece-locate-icon-file
+                            "liece-pointer.xpm"))
+                (list (vector 'xpm :file file)))
+            (if (setq file (liece-locate-icon-file
+                            "liece-pointer.xbm"))
+                (list (vector 'xbm :file file)))
+            '([string :data "Liece:"]))))))
+    (set-glyph-face glyph 'modeline-buffer-id)
+    glyph))
+
+(defun liece-xemacs-mode-line-buffer-identification (line)
+  "Decorate 1st        element of `mode-line-buffer-identification' LINE.
+Modify whole identification by side effect."
+  (let ((id (car line)) chop)
+    (if (and (stringp id) (string-match "^Liece:" id))
+       (progn
+         (setq chop (match-end 0))
+         (nconc
+          (list
+           (let ((glyph (liece-xemacs-modeline-glyph)))
+             (if glyph
+                 (cons liece-xemacs-modeline-left-extent glyph)
+               (cons liece-xemacs-modeline-left-extent
+                     (substring id 0 chop))))
+           (cons liece-xemacs-modeline-right-extent
+                 (substring id chop)))
+          (cdr line)))
+      line)))
+
+(defun liece-xemacs-suppress-modeline-format ()
+  "Remove unnecessary information from `modeline-format'."
+  (setq modeline-format
+       (remrassq 'modeline-modified
+                 (delq 'modeline-multibyte-status
+                       (copy-sequence mode-line-format)))))
+
+;;; @ menus
+;;; 
+(defun liece-xemacs-nick-popup-menu (widget &optional event)
+  "Trigger function for popup menu."
+  (let ((pos (widget-event-point event)))
+    (when pos
+      (goto-char pos)
+      (if (eq major-mode 'liece-nick-mode)
+         (liece-nick-update-region))
+      (let ((menu (cdr liece-nick-popup-menu)))
+       (setq menu (nconc (list "IRCHAT" ; title: not displayed
+                               "     IRC commands"
+                               "--:shadowDoubleEtchedOut")
+                         (mapcar (lambda (spec)
+                                   (if (stringp spec)
+                                       "--:shadowEtchedOut"
+                                     spec))
+                                 menu)))
+       (let (popup-menu-titles)
+         (popup-menu menu))))))
+
+(fset 'liece-nick-popup-menu 'liece-xemacs-nick-popup-menu)
+
+;;; @ nick buffer decoration
+;;; 
+(defun liece-xemacs-create-nick-glyph (file &optional string)
+  "Return a glyph of nick indicator from FILE or STRING."
+  (or
+   (cdr-safe (assoc file liece-glyph-cache))
+   (let ((glyph
+         (make-glyph
+          (nconc
+           (if (setq file (liece-locate-icon-file file))
+               (list (vector 'xpm :file file)))
+           (if string
+               (list (vector 'string :data string)))))))
+     (push (cons file glyph) liece-glyph-cache)
+     (set-glyph-face glyph 'default)
+     glyph)))
+
+(defun liece-xemacs-glyph-nick-region (start end)
+  "Decorate nick buffer between START and END."
+  (save-excursion
+    (setq start (progn (goto-char start)(beginning-of-line)(point))
+         end (progn (goto-char end)(beginning-of-line 2)(point)))
+    (save-restriction
+      (narrow-to-region start end)
+      (let ((buffer-read-only nil)
+           (inhibit-read-only t)
+           (case-fold-search nil)
+           mark file glyph ext ant)
+       (map-extents
+        (lambda (e void)
+          (when (or
+                 (extent-property
+                  e 'liece-xemacs-glyph-nick-extent)
+                 (extent-property
+                  e 'liece-xemacs-glyph-nick-annotation))
+            (delete-extent e)))
+        (current-buffer) start end)
+       (dolist (entry liece-nick-image-alist)
+         (setq mark (car entry)
+               file (cdr entry)
+               glyph (liece-xemacs-create-nick-glyph
+                      file (char-to-string mark)))
+         (when glyph
+           (goto-char start)
+           (while (not (eobp))
+             (when (eq (char-after) mark)
+               (mapcar 'delete-annotation
+                       (annotations-at (1+ (point))))
+               (setq ext (make-extent (point) (1+ (point)))
+                     ant (make-annotation glyph (1+ (point)) 'text))
+               (set-extent-property ext 'end-open t)
+               (set-extent-property ext 'start-open t)
+               (set-extent-property ext 'invisible t)
+               (set-extent-property ext 'intangible t)
+               (set-extent-property
+                ant 'liece-xemacs-glyph-nick-extent ext)
+               (set-extent-property
+                ext 'liece-xemacs-glyph-nick-annotation ant))
+             (beginning-of-line 2))))))))
+
+(defun liece-xemacs-set-drop-functions (start end)
+  "Initialize drag and drop in DCC between START and END.
+This function needs window system independent drag and drop
+support (21.0 b39 or later)"
+  (interactive "r")
+  (liece-xemacs-set-drop-functions-buffer
+   (current-buffer) start end)
+  (goto-char end))
+
+(defun liece-xemacs-set-drop-functions-buffer (&optional buffer start end)
+  "Initialize BUFFER drag and drop DCC settings between START and END.
+This function needs window system independent drag and drop
+support (21.0 b39 or later)"
+  (interactive)
+  (when (and (featurep 'x) (featurep 'dragdrop))
+    (save-excursion
+      (when buffer
+       (set-buffer buffer))
+      (setq start (or start (point-min))
+           end (or end (point-max)))
+      (goto-char start)
+      (setq start (line-beginning-position))
+      (goto-char end)
+      (setq end (line-beginning-position))
+      (goto-char end)
+      (when (not (eobp))
+       (beginning-of-line 2)
+       (setq end (point)))
+      (save-restriction
+       (narrow-to-region start end)
+       (let (buffer-read-only case-fold-search)
+         (map-extents
+          (function
+           (lambda (e void)
+             (when (extent-property e 'liece-xemacs-drop-extent)
+               (delete-extent e))))
+          buffer start end)
+         (goto-char start)
+         (let (st nd nick func)
+           (while (not (eobp))
+             (forward-char)
+             (setq st (point)
+                   nd (line-end-position)
+                   nick (buffer-substring st nd))
+             (mapcar 'delete-annotation (annotations-at nd))
+             (setq func (intern (concat "liece-xemacs-drop-function-" nick)))
+             (fset func
+                   (list 'lambda (list 'object)
+                         (list 'liece-xemacs-drop-function 'object nick)))
+             (let ((ext (make-extent st nd)))
+               (set-extent-property ext 'liece-xemacs-drop-extent t)
+               (set-extent-property ext 'dragdrop-drop-functions (list func)))
+             (beginning-of-line 2))))))))
+
+(defun liece-xemacs-drop-function (object nick)
+  "Drag and drop handler.
+Always two arguments are passed, OBJECT and NICK."
+  (if (and (eq (car object) 'dragdrop_URL)
+          (stringp (cdr object))
+          (string-match "^[^:]*:\\(.*\\)" (cdr object)))
+      (let ((filename (match-string 1 (cdr object))))
+       (liece-command-dcc-send filename nick))))
+
+(defadvice easy-menu-add-item
+  (around liece-fix-menu-path-switch-buffer activate)
+  "Advice for XEmacs 20.4 or earlier."
+  (save-excursion
+    (set-buffer liece-command-buffer)
+    (add-menu-button
+     (cons (car (ad-get-arg 0)) (ad-get-arg 1))
+     (ad-get-arg 2) (ad-get-arg 3))))
+
+(eval-and-compile
+  (setq liece-x-face-insert-function
+       (function liece-x-face-insert-with-xemacs))
+
+  (defun liece-x-face-insert-with-xemacs (buffer str nick)
+    (save-excursion
+      (let ((glyph (cdr-safe (assoc nick liece-glyph-cache))))
+       (unless glyph
+         (setq glyph (make-glyph
+                      (cond
+                       ((and (featurep 'xface)
+                             (memq (console-type) '(x mswindows)))
+                        `[xface :data ,str])
+                       (t `[string :data ,str]))))
+         (when glyph
+           (push (cons nick glyph) liece-glyph-cache)
+           (set-glyph-face glyph 'default)))
+       (set-buffer buffer)
+       (goto-char (point-max))
+       (when glyph
+         (set-extent-end-glyph (make-extent (point) (point)) glyph))))))
+
+;;; @ startup splash
+;;; 
+(eval-when-compile
+  (defvar filename)
+  (setq load-path
+       `(,(if (and (boundp 'filename)
+                   (stringp filename)
+                   (file-exists-p filename))
+              (file-name-directory filename)
+            default-directory)
+         ,@load-path)))
+
+(when (featurep 'xpm)
+  (eval-when-compile
+    (defmacro liece-xemacs-logo ()
+      (let ((logo "liece.xpm")
+           (dir (if (and (boundp 'filename)
+                         (stringp filename)
+                         (file-exists-p filename))
+                    (file-name-directory filename)
+                  default-directory)))
+       (setq logo (expand-file-name logo dir))
+       (if (file-exists-p logo)
+           (let ((buffer (generate-new-buffer " *liece-logo*"))
+                 (coding-system-for-read (quote binary))
+                 buffer-file-format format-alist
+                 insert-file-contents-post-hook
+                 insert-file-contents-pre-hook)
+             (prog1
+                 (save-excursion
+                   (set-buffer buffer)
+                   (insert-file-contents logo)
+                   (buffer-string))
+               (kill-buffer buffer)))
+         (progn
+           (byte-compile-warn
+            "Warning: file \"%s\" not found." logo)
+           (sit-for 2)
+           nil))))))
+
+(defconst liece-xemacs-logo
+  (when (featurep 'xpm)
+    (liece-xemacs-logo)))
+
+(defun liece-xemacs-splash-at-point (&optional height)
+  "Display splash logo in HEIGHT."
+  (or (bolp) (insert "\n"))
+  (let ((bow (point))
+       (glyph (make-glyph `[xpm :data ,liece-xemacs-logo]))
+       (lh (/ (window-pixel-height) (window-height)))
+       (lw (/ (window-pixel-width) (window-width)))
+       (liece-insert-environment-version nil)
+        bov)
+    
+    (insert-char ?\n (max 0 (/ (- (or height (window-height))
+                                 (/ (glyph-height glyph) lh))
+                              2)))
+    (insert-char ?\  (max 0 (/ (- (window-width)
+                                 (/ (glyph-width glyph) lw))
+                              2)))
+    (when (and (featurep 'xpm) (memq (console-type) '(x mswindows)))
+      (set-extent-end-glyph
+       (make-extent (point) (point))
+       glyph))
+    (insert "\n")
+    (insert-char ?\  (max 0 (/ (- (window-width) (length (liece-version))) 2)))
+    (setq bov (point))
+    (insert (liece-version))
+    (and (find-face 'bold-italic)
+         (put-text-property bov (point) 'face 'bold-italic))
+    (goto-char bow)
+    (set-window-start (get-buffer-window (current-buffer)) (point))
+    (redisplay-frame)))
+
+(defun liece-xemacs-splash (&optional arg)
+  "Display splash logo interactively.
+If ARG is given, don't hide splash buffer."
+  (interactive "P")
+  (and liece-xemacs-logo
+       (let ((frame (selected-frame))
+             config buffer
+            (liece-insert-environment-version nil))
+         (and frame
+              (unwind-protect
+                  (progn
+                    (setq config (current-window-configuration))
+                    (switch-to-buffer
+                     (setq buffer (generate-new-buffer
+                                   (concat (if arg "*" " *")
+                                           (liece-version) "*"))))
+                    (delete-other-windows)
+                    (liece-xemacs-splash-at-point)
+                    (set-buffer-modified-p nil)
+                    (or arg (sleep-for 2)))
+                (unless arg
+                  (kill-buffer buffer)
+                  (set-window-configuration config)
+                  (redisplay-frame frame)))))))
+
+(or (eq 'stream (device-type))
+    (liece-xemacs-splash))
+
+\f
+;;; @ emulation functions
+;;; 
+(defun liece-xemacs-map-extents (function)
+  "Map FUNCTION over the extents which overlap the current buffer."
+  (map-extents (lambda (extent ignore)
+                (if (overlayp extent) (funcall function extent)))))
+
+(defun liece-xemacs-kill-all-overlays ()
+  "Delete all extents in the current buffer."
+  (liece-xemacs-map-extents #'delete-extent))
+
+(defun liece-xemacs-overlays-at (pos)
+  "Return a list of the overlays that contain position POS."
+  (let ((ext (extent-at pos)))
+    (and ext (overlayp ext) (list ext))))
+      
+(fset 'liece-mode-line-buffer-identification
+      'liece-xemacs-mode-line-buffer-identification)
+
+(fset 'liece-suppress-mode-line-format
+      'liece-xemacs-suppress-modeline-format)
+
+(fset 'liece-kill-all-overlays 'liece-xemacs-kill-all-overlays)
+(fset 'liece-map-overlays 'liece-xemacs-map-extents)
+(fset 'liece-locate-data-directory 'locate-data-directory)
+
+(add-hook 'liece-nick-insert-hook 'liece-xemacs-glyph-nick-region)
+(add-hook 'liece-nick-insert-hook 'liece-xemacs-set-drop-functions)
+
+(add-hook 'liece-nick-replace-hook 'liece-xemacs-glyph-nick-region)
+(add-hook 'liece-nick-replace-hook 'liece-xemacs-set-drop-functions)
+
+(provide 'liece-xemacs)
+
+;;; liece-xemacs.el ends here
+
diff --git a/lisp/liece.el b/lisp/liece.el
new file mode 100644 (file)
index 0000000..85c3215
--- /dev/null
@@ -0,0 +1,1019 @@
+;;; liece.el --- IRC client for Emacsen
+;; Copyright (C) 1998-2000 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Revised: 2000-03-20
+;; Keywords: IRC, liece
+
+;; This file is part of Liece.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;;; Commentary:
+;; 
+
+;;; Code:
+
+(require 'liece-inlines)
+(require 'liece-crypt)
+(require 'liece-handle)
+(require 'liece-filter)
+(require 'liece-hilit)
+(require 'liece-intl)
+(require 'liece-menu)
+(require 'liece-window)
+(require 'liece-tcp)
+(if (featurep 'xemacs)
+    (require 'liece-xemacs)
+  (require 'liece-emacs))
+(require 'liece-commands)
+
+(autoload 'mule-caesar-region "mule-caesar" nil t)
+(autoload 'liece-command-browse-url "liece-url" nil t)
+(autoload 'liece-command-dcc-send "liece-dcc" nil t)
+(autoload 'liece-command-dcc-receive "liece-dcc" nil t)
+(autoload 'liece-command-dcc-list "liece-dcc" nil t)
+(autoload 'liece-command-dcc-chat-listen "liece-dcc" nil t)
+(autoload 'liece-command-dcc-chat-connect "liece-dcc" nil t)
+(autoload 'liece-command-dcc-accept "liece-dcc" nil t)
+(autoload 'liece-command-mail-compose "liece-mail" nil t)
+(autoload 'liece-command-submit-bug-report "liece-mail" nil t)
+
+(eval-and-compile
+  (defvar liece-server-keyword-map
+    '((:host (getenv "IRCSERVER"))
+      (:service liece-service)
+      (:password liece-password)
+      (:prescript)
+      (:prescript-delay)
+      (:type)
+      (:relay))
+    "Mapping from keywords to default values.
+All keywords that can be used must be listed here."))
+
+(defadvice save-buffers-kill-emacs
+  (before liece-save-buffers-kill-emacs activate)
+  "Prompt user to quit IRC explicitly."
+  (run-hooks 'liece-before-kill-emacs-hook) )
+
+(add-hook 'liece-before-kill-emacs-hook 'liece-command-quit)
+
+(defvar liece-tmp-server-name nil "Temporaly server name.")
+(defvar liece-buffer-last-check-time nil)
+(defvar liece-timers-list-initialized-p nil
+  "Are liece internal timers in place?")
+
+(defconst liece-obarray-size 1327
+  "The size of obarray used by liece on channelname and username space.
+For efficiency this should be prime.  See documentation of intern and
+`make-vector' for more information.  Here is a list of some small primes...
+
+13, 29, 37, 47, 59, 71, 89, 107, 131, 163, 197, 239, 293, 353, 431, 521,
+631, 761, 919, 1103, 1327, 1597, 1931, 2333, 2801, 3371, 4049, 4861, 5839,
+7013, 8419, 10103, 12143, 14591, 17519, 21023, 25229, 30293, 36353,
+43627, 52361, 62851, 75431, 90523, 108631, 130363, 156437, 187751,
+225307, 270371, 324449, 389357, 467237, 560689, 672827, 807403, 968897,
+1162687, 1395263, 1674319, 2009191, 2411033, 2893249.")
+
+(defvar liece-channel-list-mode-map (make-sparse-keymap))
+(defvar liece-nick-mode-map (make-sparse-keymap))
+(defvar liece-client-query-map (make-sparse-keymap))
+(defvar liece-dcc-map (make-sparse-keymap))
+(defvar liece-crypt-map (make-sparse-keymap))
+(defvar liece-friends-map (make-sparse-keymap))
+
+(defvar liece-dialogue-mode-map
+  (let ((keymap (make-keymap)))
+    (suppress-keymap keymap 'nodigit)
+    keymap))
+
+(defvar liece-command-mode-map (make-keymap))
+(defvar liece-command-map (make-sparse-keymap))
+
+(defvar liece-command-mode-syntax-table nil)
+
+(put 'liece-command-mode 'mode-class 'special)
+(put 'liece-dialogue-mode 'mode-class 'special)
+(put 'liece-channel-list-mode 'mode-class 'special)
+(put 'liece-nick-mode 'mode-class 'special)
+(put 'liece-channel-mode 'derived-mode-parent 'liece-dialogue-mode)
+(put 'liece-others-mode 'derived-mode-parent 'liece-dialogue-mode)
+
+(defvar liece-buffer-mode-alist
+  '((liece-dialogue-buffer liece-dialogue-mode)
+    (liece-others-buffer liece-others-mode)
+    (liece-channel-list-buffer liece-channel-list-mode)
+    (liece-private-buffer liece-dialogue-mode)
+    (liece-KILLS-buffer)
+    (liece-IGNORED-buffer)
+    (liece-WALLOPS-buffer)
+    (liece-CRYPT-buffer liece-dialogue-mode)))
+    
+(eval-and-compile
+  (dotimes (n 20)
+    (fset (intern (format "liece-switch-to-channel-no-%d" (1+ n)))
+         `(lambda ()
+            (interactive)
+            (funcall #'liece-switch-to-channel-no ,n)))))
+
+(defvar liece-select-keys
+  '("1" liece-switch-to-channel-no-1
+    "2" liece-switch-to-channel-no-2
+    "3" liece-switch-to-channel-no-3
+    "4" liece-switch-to-channel-no-4
+    "5" liece-switch-to-channel-no-5
+    "6" liece-switch-to-channel-no-6
+    "7" liece-switch-to-channel-no-7
+    "8" liece-switch-to-channel-no-8
+    "9" liece-switch-to-channel-no-9
+    "0" liece-switch-to-channel-no-10
+    "\C-c1" liece-switch-to-channel-no-11
+    "\C-c2" liece-switch-to-channel-no-12
+    "\C-c3" liece-switch-to-channel-no-13
+    "\C-c4" liece-switch-to-channel-no-14
+    "\C-c5" liece-switch-to-channel-no-15
+    "\C-c6" liece-switch-to-channel-no-16
+    "\C-c7" liece-switch-to-channel-no-17
+    "\C-c8" liece-switch-to-channel-no-18
+    "\C-c9" liece-switch-to-channel-no-19
+    "\C-c0" liece-switch-to-channel-no-20))
+
+;;; Keymap macros. -- borrowd from `gnus-util.el'.
+
+(defmacro liece-local-set-keys (&rest plist)
+  "Set the keys in PLIST in the current keymap."
+  `(liece-define-keys-1 (current-local-map) ',plist))
+
+(defmacro liece-define-keys (keymap &rest plist)
+  "Assign KEYMAP keys from PLIST."
+  `(liece-define-keys-1 ',keymap ',plist))
+
+(defmacro liece-define-keys-safe (keymap &rest plist)
+  "Assign KEYMAP keys from PLIST without overwriting previous definitions."
+  `(liece-define-keys-1 ',keymap ',plist t))
+
+(put 'liece-define-keys 'lisp-indent-function 1)
+(put 'liece-define-keys-safe 'lisp-indent-function 1)
+(put 'liece-local-set-keys 'lisp-indent-function 1)
+
+(defun liece-define-keys-1 (keymap plist &optional safe)
+  "Assign KEYMAP keys from PLIST.
+If optional argument SAFE is nil, overwrite previous definitions."
+  (unless keymap
+    (error "Can't set keys in a null keymap"))
+  (cond
+   ((symbolp keymap)
+    (setq keymap (symbol-value keymap)))
+   ((keymapp keymap))
+   ((listp keymap)
+    (set (car keymap) nil)
+    (define-prefix-command (car keymap))
+    (define-key (symbol-value (caddr keymap)) (cadr keymap) (car keymap))
+    (setq keymap (symbol-value (car keymap)))))
+  (let (key)
+    (while plist
+      (when (symbolp (setq key (pop plist)))
+       (setq key (symbol-value key)))
+      (if (or (not safe)
+             (eq (lookup-key keymap key) 'undefined))
+         (define-key keymap key (pop plist))
+       (pop plist)))))
+
+(when t
+  (liece-define-keys liece-dialogue-mode-map
+    "\177" scroll-down
+    [delete] scroll-down
+    [backspace] scroll-down
+    [return] scroll-up
+    " " scroll-up
+    "$" end-of-buffer
+    "/" liece-command-generic
+    ">" end-of-buffer
+    "<" beginning-of-buffer
+    "!" liece-command-exec
+    "|" liece-command-show-last-kill
+    "a" liece-command-away
+    "b" liece-command-submit-bug-report
+    "c" liece-command-point-back-to-command-buffer
+    "f" liece-command-finger
+    "F" liece-dialogue-freeze
+    "O" liece-dialogue-own-freeze
+    "i" liece-command-invite
+    "j" liece-command-join
+    "k" liece-command-kill
+    "\C-k" liece-command-kick
+    "l" liece-command-list
+    "L" liece-command-load-vars
+    "S" liece-command-save-vars
+    "m" liece-dialogue-enter-message
+    "M" liece-command-modec
+    "n" liece-command-nickname
+    "o" other-window
+    "p" liece-command-mta-private
+    "P" liece-command-toggle-private
+    "q" liece-command-quit
+    "r" liece-command-reconfigure-windows
+    "x" liece-command-tag-region
+    "t" liece-command-topic
+    "T" liece-command-timestamp
+    "\C-t" liece-command-find-timestamp
+    "u" liece-command-lusers
+    "U" liece-command-userhost
+    "v" liece-command-browse-url
+    "w" liece-command-who)
+
+  (liece-define-keys (liece-client-query-map "\C-c" liece-dialogue-mode-map)
+    "a" liece-command-client-action
+    "v" liece-command-client-version
+    "u" liece-command-client-userinfo
+    "h" liece-command-client-help
+    "c" liece-command-client-clientinfo
+    "g" liece-command-client-generic
+    "p" liece-command-client-ping
+    "t" liece-command-client-time
+    "x" liece-command-client-x-face
+    "X" liece-command-client-x-face-from-xbm-file
+    "\C-x" liece-command-client-x-face-from-commandbuffer
+    "U" liece-command-client-userinfo-from-minibuffer
+    "\C-u" liece-command-client-userinfo-from-commandbuffer)
+
+  (liece-define-keys (liece-crypt-map "%" liece-dialogue-mode-map)
+    "t" liece-command-toggle-crypt
+    "k" liece-command-set-encryption-key
+    "a" liece-command-add-decryption-key
+    "d" liece-command-delete-decryption-key)
+
+  (liece-define-keys (liece-dcc-map "\C-d" liece-dialogue-mode-map)
+    "s" liece-command-dcc-send
+    "r" liece-command-dcc-receive
+    "l" liece-command-dcc-list
+    "cl" liece-command-dcc-chat-listen
+    "cc" liece-command-dcc-chat-connect
+    "g" liece-command-dcc-accept)
+
+  (liece-define-keys (liece-friends-map "\C-i" liece-dialogue-mode-map)
+    " " liece-command-ison
+    "a" liece-command-activate-friends
+    "d" liece-command-deactivate-friends
+    "s" liece-command-display-friends)
+
+  (liece-define-keys liece-command-mode-map
+    "\r" liece-command-enter-message
+    [(meta return)] liece-command-enter-message-opposite-crypt-mode
+    [tab] liece-command-complete
+    [(meta control c) >] liece-command-push
+    [(meta control c) <] liece-command-pop
+    [(meta control c) o] liece-command-mode+o
+    [(meta control c) O] liece-command-mode-o
+    [(meta control c) v] liece-command-mode+v
+    [(meta control c) V] liece-command-mode-v)
+
+  (liece-define-keys (liece-command-map "\C-c" liece-command-mode-map)
+    "\177" liece-command-scroll-down
+    [delete] liece-command-scroll-down
+    [backspace] liece-command-scroll-down
+    " " liece-command-scroll-up
+    "$" liece-command-end-of-buffer
+    ">" liece-command-next-channel
+    "<" liece-command-previous-channel
+    "a" liece-command-away
+    "c" liece-command-inline
+    "\C-a" liece-command-previous-channel
+    "\C-f" liece-command-freeze
+    "\C-j" liece-command-next-channel
+    "\C-n" liece-command-names
+    "l" liece-command-list
+    "L" liece-command-load-vars
+    "M" liece-command-own-freeze
+    "\C-m" liece-command-modec
+    "o" liece-command-mode+o
+    "O" liece-command-toggle-nick-buffer-mode
+    "\C-o" liece-command-toggle-channel-buffer-mode
+    "\C-p" liece-command-part
+    "r" liece-command-reconfigure-windows
+    "\C-r" mule-caesar-region
+    "s" liece-command-set-window-style
+    "S" liece-command-save-vars
+    "v" liece-command-mode+v
+    "\C-v" liece-command-browse-url
+    "\C-y" liece-command-yank-send)
+  (set-keymap-parent liece-command-map liece-dialogue-mode-map)
+
+  (liece-define-keys liece-nick-mode-map
+    "o" liece-command-mode+o
+    "O" liece-command-mode-o
+    "v" liece-command-mode+v
+    "V" liece-command-mode-v
+    "f" liece-command-finger
+    " " liece-command-nick-scroll-up
+    "\177" liece-command-nick-scroll-down
+    [delete] liece-command-nick-scroll-down
+    [backspace] liece-command-nick-scroll-down
+    "m" liece-command-mail-compose
+    "c" liece-command-point-back-to-command-buffer)
+
+  (liece-define-keys liece-channel-list-mode-map
+    ">" liece-command-next-channel
+    "<" liece-command-previous-channel
+    "o" other-window
+    "c" liece-command-point-back-to-command-buffer)
+
+  (liece-define-keys-1 liece-dialogue-mode-map liece-select-keys)
+  (liece-define-keys-1 liece-channel-list-mode-map liece-select-keys))
+
+;;;###liece-autoload
+(defmacro liece-server-opened ()
+  "Return server process status.
+Return non-nil if stream is opened."
+  '(and liece-server-process
+       (memq (process-status liece-server-process)
+             '(open run))))
+
+(defun liece-start-server (&optional confirm)
+  "Open network stream to remote irc server.
+If optional argument CONFIRM is non-nil, ask the host that the server
+is running on."
+  (if (liece-server-opened)
+      ;; Stream is already opened.
+      nil
+    ;; Open IRC server.
+    (when (or confirm (null liece-server))
+      (setq liece-server
+           (liece-minibuffer-completing-default-read
+            (_ "IRC server: ")
+            liece-server-alist)))
+    (and confirm
+        liece-ask-for-nickname
+        (setq liece-nickname
+              (read-string (_ "Enter your nickname: ") liece-nickname)))
+    ;; If no server name is given, local host is assumed.
+    (and
+     (stringp liece-server)
+     (string-equal liece-server "")
+     (setq liece-server (system-name)))
+    (let ((host (liece-server-host)))
+      (liece-message
+       (_ "Connecting to IRC server on %s...") host)
+      (cond
+       ((liece-open-server liece-server liece-service))
+       ((and (stringp liece-status-message-string)
+            (> (length liece-status-message-string) 0))
+       ;; Show valuable message if available.
+       (error liece-status-message-string))
+       (t (error (_ "Cannot open IRC server on %s") host))))))
+
+(defun liece-close-server-internal ()
+  "Close connection to chat server."
+  (if (liece-server-opened)
+      (delete-process liece-server-process))
+  (if liece-server-buffer
+      (kill-buffer liece-server-buffer))
+  (setq liece-server-buffer nil
+       liece-server-process nil
+       liece-server nil))
+
+;;;###liece-autoload
+(defun liece-close-server ()
+  "Close chat server."
+  (unwind-protect
+      (progn
+       ;; Unset default sentinel function before closing connection.
+       (and
+        liece-server-process
+        (eq (quote liece-sentinel)
+            (process-sentinel liece-server-process))
+        (set-process-sentinel liece-server-process nil))
+       ;; We cannot send QUIT command unless the process is running.
+       (if (liece-server-opened)
+           (liece-send "QUIT")))
+    (liece-close-server-internal)))
+
+(defmacro liece-server-keyword-bind (plist &rest body)
+  "Return a `let' form that binds all variables in PLIST.
+After this is done, BODY will be executed in the scope
+of the `let' form.
+
+The variables bound and their default values are described by
+the `liece-server-keyword-map' variable."
+  `(let ,(mapcar
+         (lambda (keyword)
+           (list (intern (substring (symbol-name (car keyword)) 1))
+                 (if (cadr keyword)
+                     `(or (plist-get plist ',(car keyword))
+                          ,(cadr keyword))
+                   `(plist-get plist ',(car keyword)))))
+         liece-server-keyword-map)
+     ,@body))
+
+(put 'liece-server-keyword-bind 'lisp-indent-function 1)
+(put 'liece-server-keyword-bind 'edebug-form-spec '(form body))
+
+(defun liece-server-parse-string (string)
+  "Convert a STRING set as `liece-server' and return a property list."
+  (when (or (string-match "^\\([^:]+\\):?\\([0-9]*\\)" string)
+           (string-match "^[\\([^\\[]+\\)]:?\\([0-9]*\\)" string))
+    (let ((host (match-string 1 string))
+         (service (match-string 2 string))
+         (password (substring string (match-end 0)))
+         plist)
+      (push `(:host ,host) plist)
+      (unless (string= service "")
+       (push `(:service ,(string-to-int service)) plist))
+      (cond
+       ((string= password ":")
+       (setq liece-ask-for-password t))
+       ((string= password ""))
+       (t (push `(:password ,(substring password 1)) plist)))
+      (apply #'nconc plist))))
+
+(defun liece-open-server (host &optional service)
+  "Open chat server on HOST.
+If HOST is nil, use value of environment variable \"IRCSERVER\".
+If optional argument SERVICE is non-nil, open by the service name."
+  (let* ((host (or host (getenv "IRCSERVER")))
+        (plist
+         (if (listp host)
+             host
+           (or (cdr (string-assoc-ignore-case host liece-server-alist))
+               (liece-server-parse-string host))))
+        status)
+    (setq liece-status-message-string "")
+    (when (stringp plist) ;; Old style server entry...
+      (setq plist (liece-server-parse-string host)))
+    (when (and (stringp host)
+              (null (string-assoc-ignore-case host liece-server-alist)))
+      (push (cons host plist) liece-server-alist)
+      (setq liece-save-variables-are-dirty t))
+    (liece-server-keyword-bind plist
+      ;; Execute preconnecting script
+      (when prescript
+       (if (fboundp prescript)
+           (funcall prescript)
+         (call-process shell-file-name nil nil nil
+                       shell-command-switch prescript))
+       (when prescript-delay
+         (sleep-for prescript-delay)))
+      (if password
+         (setq liece-ask-for-password nil
+               liece-password password))
+      (if (and (memq type '(rlogin telnet)) relay)
+         (setq liece-tcp-relay-host relay))
+      (setq liece-tmp-server-name host);; temporary
+      (liece-message (_ "Connecting to IRC server %s...") host)
+      (cond
+       ((null host)
+       (setq liece-status-message-string
+             (_ "IRC server is not specified.")))
+       ((liece-open-server-internal host service type)
+       (setq liece-after-registration nil)
+       (liece-maybe-poll)
+       (setq status (liece-wait-for-response "^:[^ ]+ [4P][5O][1N][ G]"))
+       (if (null status)
+           (progn
+             (setq liece-status-message-string
+                   (format (_ "Connection to %s timed out") host))
+             ;; We have to close connection here, since the function
+             ;;  `liece-server-opened' may return incorrect status.
+             (liece-close-server-internal))
+         (setq liece-after-registration t)
+         (set-process-sentinel liece-server-process 'liece-sentinel)
+         (set-process-filter liece-server-process 'liece-filter)
+         (if (or liece-ask-for-password liece-reconnect-with-password)
+             (let ((passwd-echo ?*) password)
+               (setq password (read-passwd (_ "Server Password: ")))
+               (or (string= password "")
+                   (setq liece-password password))))
+         (if liece-password
+             (liece-send "PASS %s" liece-password))
+         (setq liece-reconnect-with-password nil)
+         (liece-send "USER %s * * :%s"
+                     (or (user-real-login-name) "Nobody")
+                     (if (and liece-name (not (string= liece-name "")))
+                         liece-name
+                       "No Name"))
+         (or liece-real-nickname
+             (setq liece-real-nickname liece-nickname))
+         (setq liece-real-nickname
+               (truncate-string liece-real-nickname liece-nick-max-length)
+               liece-nickname-last liece-real-nickname
+               liece-nick-accepted 'sent
+               liece-after-registration t)
+         (liece-send "NICK %s" liece-real-nickname)))))
+    status))
+
+(defun liece-open-server-internal (host &optional service type)
+  "Open connection to chat server on HOST by SERVICE (default is irc).
+Optional argument TYPE specifies connection types such as `program'."
+  (condition-case err
+      (save-excursion
+       ;; Initialize communication buffer.
+       (setq liece-server-buffer (liece-get-buffer-create " *IRC*"))
+       (set-buffer liece-server-buffer)
+       (set-buffer-multibyte nil)
+       (kill-all-local-variables)
+       (buffer-disable-undo)
+       (erase-buffer)
+       (cond
+        ((string-match "^[^\\[]" host)
+         (setq liece-server-process
+               (liece-open-network-stream-as-binary
+                "IRC" (current-buffer) host (or service "irc") type)))
+        ((not
+          (or
+           (string-match
+            "^\\[\\([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\)\\]$" host)
+           (string-match
+            "^\\[\\([0-9A-Za-z]*:[0-9A-Za-z:]*\\)\\]$" host)
+           (string-match
+            "^\\[\\([0-9]+\\)\\]$" host)))
+         (setq liece-status-message-string
+               (_ "Use [nnn.nnn.nnn.nnn]")
+               liece-server-process nil)))
+       (setq liece-server-name host)
+       (run-hooks 'liece-server-hook)
+       ;; Return the server process.
+       liece-server-process)
+    (error
+     (setq liece-status-message-string (cadr err)) nil)))
+
+(defun liece-initialize-timers ()
+  "Initialise internal timers."
+  (dolist (timer liece-timers)
+    (if (caddr timer)
+       (cancel-timer (caddr timer))
+      (let ((handler (car timer)) (interval (cadr timer)))
+       (and (liece-functionp handler)
+            (symbolp interval) (boundp interval)
+            (setq interval (symbol-value interval))
+            (setcdr (cdr timer)
+                    (list (run-at-time 1 interval handler)))))))
+  (setq liece-timers-list-initialized-p t))
+
+(defun liece-read-variables-files (&optional file)
+  "Read variables FILEs."
+  (and (not (file-directory-p liece-directory))
+       (file-exists-p liece-directory)
+       (yes-or-no-p "Upgrade the location of the data files? ")
+       (let ((file
+             (expand-file-name
+              (make-temp-name "liece") temporary-file-directory)))
+        (unwind-protect
+            (progn
+              (rename-file liece-directory file 'ok-if-exists)
+              (make-directory liece-directory)
+              (copy-file file (expand-file-name
+                               (file-name-nondirectory liece-variables-file)
+                               liece-directory)))
+          (ignore-errors (delete-file file)))))
+  (or (file-directory-p liece-directory)
+      (make-directory liece-directory))
+  (let ((files (if file
+                  (progn
+                    (setq liece-variables-file file
+                          liece-variables-files (list file)))
+                liece-variables-files)))
+    (dolist (file files)
+      (if (file-readable-p (expand-file-name file))
+         (load (expand-file-name file) t)))))
+
+;;;###autoload
+(defun liece (&optional confirm)
+  "Connect to the IRC server and start chatting.
+If optional argument CONFIRM is non-nil, ask which IRC server to connect.
+If already connected, just pop up the windows."
+  (interactive "P")
+  (liece-read-variables-files
+   (car command-line-args-left))
+  (pop command-line-args-left)
+  (run-hooks 'liece-after-load-startup-hook)
+  ;; Save initial state of window configuration.
+  (when (interactive-p)
+    (liece-window-configuration-push))
+  (unless liece-intl-message-alist
+    (liece-intl-load-catalogue))
+  (if (liece-server-opened)
+      (liece-configure-windows)
+    (unwind-protect
+       (progn
+         (switch-to-buffer
+          (liece-get-buffer-create liece-command-buffer))
+         (unless (eq major-mode 'liece-command-mode)
+           (liece-command-mode))
+         (liece-start-server confirm))
+      (if (not (liece-server-opened))
+         (liece-command-quit)
+       ;; IRC server is successfully open.
+       (with-current-buffer liece-command-buffer
+         (setq mode-line-process (concat " " (liece-server-host))))
+       (let (buffer-read-only)
+         (unless liece-keep-buffers
+           (erase-buffer))
+         (sit-for 0))
+
+       (liece-set-crypt-indicator)
+       (liece-crypt-initialize)
+
+       (liece-initialize-buffers)
+       (liece-configure-windows)
+       (setq liece-current-channels nil)
+       (cond
+        (liece-current-channel
+         (liece-command-join liece-current-channel))
+        (liece-startup-channel
+         (liece-command-join liece-startup-channel))
+        (liece-startup-channel-list
+         (dolist (chnl liece-startup-channel-list)
+           (if (listp chnl)
+               (liece-command-join (car chnl) (cadr chnl))
+             (liece-command-join chnl)))))
+       (unless (string-equal liece-away-message "")
+         (liece-command-away liece-away-message))
+       (run-hooks 'liece-startup-hook)
+       (setq liece-obarray
+             (or liece-obarray (make-vector liece-obarray-size nil)))
+       (unless liece-timers-list-initialized-p
+         (liece-initialize-timers))
+       (liece-command-timestamp)
+       (message (substitute-command-keys
+                 "Type \\[describe-mode] for help"))))))
+
+;;;###liece-autoload
+(defun liece-command-mode ()
+  "Major mode for Liece.  Normal edit function are available.
+Typing Return or Linefeed enters the current line in the dialogue.
+The following special commands are available:
+For a list of the generic commands type \\[liece-command-generic] ? RET.
+\\{liece-command-mode-map}"
+  (interactive)
+  (kill-all-local-variables)
+
+  (liece-set-crypt-indicator)
+  (setq liece-nick-alist (list (list liece-nickname))
+       major-mode 'liece-command-mode
+       mode-name "Commands"
+       liece-privmsg-partner nil
+       liece-private-indicator nil
+       liece-away-indicator "-"
+       liece-freeze-indicator "-"
+       liece-own-freeze-indicator "-"
+       mode-line-buffer-identification
+       (liece-mode-line-buffer-identification
+        '("Liece: "
+          mode-line-modified
+          liece-private-indicator
+          liece-away-indicator
+          liece-crypt-indicator
+          "- " liece-current-channel " " liece-real-nickname)))
+  (liece-suppress-mode-line-format)
+  (use-local-map liece-command-mode-map)
+
+  (when liece-display-frame-title
+    (make-local-variable 'frame-title-format)
+    (setq frame-title-format 'liece-channel-status-indicator))
+  
+  (unless liece-blink-parens
+    (make-local-variable 'blink-matching-paren)
+    (setq blink-matching-paren nil))
+  
+  (unless liece-command-mode-syntax-table
+    (setq liece-command-mode-syntax-table
+         (copy-syntax-table (syntax-table)))
+    (set-syntax-table liece-command-mode-syntax-table)
+    (mapcar
+     (function (lambda (c) (modify-syntax-entry c "w")))
+     "^[]{}'`"))
+
+  (run-hooks 'liece-command-mode-hook))
+  
+;;;###liece-autoload
+(defun liece-dialogue-mode ()
+  "Major mode for displaying the IRC dialogue.
+All normal editing commands are turned off.
+Instead, these commands are available:
+\\{liece-dialogue-mode-map}"
+  (kill-all-local-variables)
+
+  (make-local-variable 'liece-freeze)
+  (make-local-variable 'liece-freeze-indicator)
+  (make-local-variable 'liece-own-freeze)
+  (make-local-variable 'liece-own-freeze-indicator)
+  (make-local-variable 'tab-stop-list)
+
+  (setq liece-freeze liece-default-freeze
+       liece-freeze-indicator (if liece-freeze "F" "-")
+       liece-own-freeze liece-default-own-freeze
+       liece-own-freeze-indicator (if liece-own-freeze "M" "-")
+
+       major-mode 'liece-dialogue-mode
+       mode-name "Dialogue"
+       mode-line-buffer-identification
+       (liece-mode-line-buffer-identification
+        '("Liece: "
+          mode-line-modified
+          liece-away-indicator
+          liece-crypt-indicator
+          liece-freeze-indicator
+          liece-own-freeze-indicator
+          " " liece-channels-indicator " "))
+       buffer-read-only t
+       tab-stop-list liece-tab-stop-list)
+  (liece-suppress-mode-line-format)
+  (use-local-map liece-dialogue-mode-map)
+  (buffer-disable-undo)
+
+  (unless liece-keep-buffers
+    (erase-buffer))
+  
+  (run-hooks 'liece-dialogue-mode-hook))
+
+;;;###liece-autoload
+(define-derived-mode liece-others-mode liece-dialogue-mode
+  "Others"
+  "Major mode for displaying the IRC others message except current channel.
+All normal editing commands are turned off.
+Instead, these commands are available:
+\\{liece-others-mode-map}")
+
+;;;###liece-autoload
+(define-derived-mode liece-channel-mode liece-dialogue-mode
+  "Channel"
+  "Major mode for displaying the IRC current channel buffer.
+All normal editing commands are turned off.
+Instead, these commands are available:
+\\{liece-channel-mode-map}"
+  (setq mode-line-buffer-identification
+       (liece-mode-line-buffer-identification
+        '("Liece: "
+          mode-line-modified
+          liece-away-indicator
+          liece-crypt-indicator
+          liece-freeze-indicator
+          liece-own-freeze-indicator
+          " "
+          liece-channel-indicator))))
+
+;;;###liece-autoload
+(defun liece-channel-list-mode ()
+  "Major mode for displaying channel list.
+All normal editing commands are turned off."
+  (kill-all-local-variables)
+  (setq major-mode 'liece-channel-list-mode
+        mode-name "Channels"
+       mode-line-buffer-identification
+       (liece-mode-line-buffer-identification
+        '("Liece: " liece-command-buffer-mode-indicator " "))
+       truncate-lines t
+       buffer-read-only t)
+  (use-local-map liece-channel-list-mode-map)
+  (run-hooks 'liece-channel-list-mode-hook))
+
+;;;###liece-autoload
+(defun liece-nick-mode ()
+  "Major mode for displaying members in the IRC current channel buffer.
+All normal editing commands are turned off.
+Instead, these commands are available:
+\\{liece-nick-mode-map}"
+  (kill-all-local-variables)
+  (setq mode-line-modified "--- "
+        major-mode 'liece-nick-mode
+        mode-name "Liece Channel member"
+       mode-line-buffer-identification
+       (liece-mode-line-buffer-identification
+        '("Liece: " liece-channel-indicator " "))
+       truncate-lines t
+       buffer-read-only t)
+  (if (boundp 'transient-mark-mode)
+      (set (make-local-variable 'transient-mark-mode) t))
+  (use-local-map liece-nick-mode-map)
+  (run-hooks 'liece-nick-mode-hook))
+
+(fset 'liece-dialogue-freeze 'liece-command-freeze)
+(fset 'liece-dialogue-own-freeze 'liece-command-own-freeze)
+
+(defun liece-initialize-buffers ()
+  "Initialize buffers."
+  (dolist (spec liece-buffer-mode-alist)
+    (let ((buffer (symbol-value (car spec)))
+         (mode (cadr spec)))
+      (or (get-buffer buffer)
+         (save-excursion
+           (set-buffer (liece-get-buffer-create buffer))
+           (or (eq major-mode mode)
+               (null mode)
+               (funcall mode)))))
+    ))
+
+;;;###liece-autoload
+(defun liece-clear-system ()
+  "Clear all Liece variables and buffers."
+  (interactive)
+  (dolist (buffer liece-buffer-list)
+    (when (and (get-buffer buffer) (buffer-live-p buffer))
+      (bury-buffer buffer)))
+  (if (vectorp liece-obarray)
+      (dotimes (i liece-obarray-size)
+       (aset liece-obarray i nil)))
+  (dolist (timer liece-timers)
+    (if (caddr timer)
+       (cancel-timer (caddr timer)))
+    (if (cdr timer)
+       (setcdr (cdr timer) nil)))
+  (setq liece-channel-buffer-alist nil
+       liece-nick-buffer-alist nil
+       liece-current-channels nil
+       liece-current-channel nil
+       liece-current-chat-partners nil
+       liece-current-chat-partner nil
+       liece-timers-list-initialized-p nil
+       liece-friends-last nil
+       liece-polling 0
+       liece-channel-indicator "No channel"))
+
+(defun liece-wait-for-response (regexp &optional timeout)
+  "Wait for server response which match REGEXP.
+Optional argument TIMEOUT specifies connection timeout."
+  (save-excursion
+    (let ((status t) (wait t) (timeout (or timeout liece-connection-timeout)))
+      (set-buffer liece-server-buffer)
+      (with-timeout (timeout nil)
+       (while wait
+         (liece-accept-response)
+         (goto-char (point-min))
+         (cond ((looking-at "ERROR") (setq status nil wait nil))
+               ((looking-at ".") (setq wait nil))))
+       ;; Save status message.
+       (end-of-line)
+       (setq liece-status-message-string
+             (buffer-substring (point-min) (point)))
+       (when status
+         (while wait
+           (goto-char (point-max))
+           (forward-line -1)
+           (if (looking-at regexp)
+               (setq wait 0)
+             (liece-message (_ "Reading..."))
+             (liece-accept-response))))
+       ;; Successfully received server response.
+       t))))
+
+(defun liece-accept-process-output (process &optional timeout)
+  "Wait for output from PROCESS and message some dots.
+Optional argument TIMEOUT specifies connection timeout."
+  (save-excursion
+    (set-buffer liece-server-buffer)
+    (accept-process-output process (or timeout 1))))
+
+(defun liece-accept-response ()
+  "Read response of server.  Only used at startup time."
+  (unless (liece-server-opened)
+    (cond
+     ((not liece-reconnect-automagic)
+      (error "Liece: Connection closed"))
+     (liece-grow-tail
+      (let ((liece-nickname (concat liece-nickname liece-grow-tail)))
+       (liece)))
+     (t (liece))))
+  (condition-case code
+      (liece-accept-process-output liece-server-process)
+    (error
+     (or (string-equal "select error: Invalid argument" (nth 1 code))
+        (signal (car code) (cdr code))))))
+
+(defmacro liece-replace-internal (buffer match defstring oldstring newstring)
+  "Helper function only used from `liece-replace'.
+
+Replace in buffer or list of buffers BUFFER with matching MATCH.
+Argument DEFSTRING used when no matches are there.
+Argument OLDSTRING is replaced with NEWSTRING."
+  `(save-excursion
+     (set-buffer (get-buffer ,buffer))
+     (let (buffer-read-only (inhibit-read-only t))
+       (goto-char (point-max))
+       (previous-line liece-compress-treshold)
+       (save-match-data
+        (if (not (re-search-forward ,match nil t))
+            (liece-insert ,buffer ,defstring)
+          (while (re-search-forward ,match nil t))
+          (beginning-of-line)
+          (if (re-search-forward ,oldstring nil t)
+              (replace-match ,newstring nil t)
+            (liece-insert ,buffer ,defstring))
+          (liece-insert ,buffer ""))))))
+
+;;;###liece-autoload
+(defun liece-replace (buffer match defstring oldstring newstring)
+  "Replace in buffer or list of buffers BUFFER with matching MATCH.
+Argument DEFSTRING used when no matches are there.
+Argument OLDSTRING is replaced with NEWSTRING."
+  (unless (listp buffer)
+    (setq buffer (list buffer)))
+  (dolist (buf buffer)
+    (when (get-buffer buf)
+      (liece-replace-internal buf match defstring oldstring newstring))))
+
+(defun liece-check-buffers ()
+  "Check if there is a buffer larger than `liece-buffer-max-size'.
+If such a buffer is found, shrink it."
+  (let ((liece-buffer-check-interval 0))
+    (when (> liece-buffer-max-size 0)
+      (save-excursion
+       (dolist (buffer liece-channel-buffer-alist)
+         (set-buffer (cdr buffer))
+         (when (< liece-buffer-max-size (buffer-size))
+           (let ((inhibit-read-only t)
+                 buffer-read-only)
+             (delete-region (point-min)
+                            (progn
+                              (goto-char (- (buffer-size)
+                                            liece-buffer-default-size))
+                              (beginning-of-line -1)
+                              (point)))
+             (garbage-collect)
+             (setq liece-buffer-last-check-time (current-time)))))))))
+
+(defun liece-check-buffers-if-interval-expired ()
+  "Timer handler for `liece-check-buffers'.
+Only used from `liece-before-insert-hook'."
+  (and (> liece-buffer-check-interval 0)
+       (or (null liece-buffer-last-check-time)
+          (> (liece-time-difference liece-buffer-last-check-time
+                                    (current-time))
+             liece-buffer-check-interval))
+       (liece-check-buffers)))
+
+(defun liece-refresh-buffer-window (buffer)
+  "Center point in window of BUFFER and redisplay frame."
+  (let ((window (liece-get-buffer-window buffer)))
+    (when (and window (not (pos-visible-in-window-p (point-max) window)))
+      (save-selected-window
+       (select-window window)
+       (goto-char (point-max))
+       (if (null liece-scroll-step)
+           (recenter (- (liece-window-height window) 1))
+         (vertical-motion
+          (- (or liece-scroll-step
+                 (1+ (/ (liece-window-height window) 2)))
+             (liece-window-height window)))
+         (set-window-start window (point))
+         (goto-char (point-max)))))))
+
+(defmacro liece-save-point (&rest body)
+  "Execute BODY, then goto the point that was around before BODY."
+  (let ((liece-save-point (liece-gensym "lsp")))
+    `(let ((,liece-save-point (point-marker)))
+       (unwind-protect
+          (progn ,@body)
+        (goto-char ,liece-save-point)
+        (set-marker ,liece-save-point nil)))))
+
+(defvar liece-before-insert-hook
+  '(liece-check-buffers-if-interval-expired
+    liece-command-timestamp-if-interval-expired))
+
+(defun liece-insert-internal (buffer string)
+  "Helper function only used from `liece-insert'.
+
+Insert before point of BUFFER STRING with decorating."
+  (run-hooks 'liece-before-insert-hook)
+  (with-current-buffer (liece-get-buffer-create buffer)
+    (or (eq (derived-mode-class major-mode) 'liece-dialogue-mode)
+       (liece-dialogue-mode))
+    (liece-save-point
+     (let ((inhibit-read-only t)
+          buffer-read-only
+          (from (goto-char (point-max))))
+       (unless (liece-is-message-ignored string (current-buffer))
+        (and liece-display-time (not (string-equal string ""))
+             (liece-insert-time-string))
+        (insert string)
+        (run-hook-with-args 'liece-insert-hook from (point)))))
+    (unless (liece-frozen (current-buffer))
+      (liece-refresh-buffer-window (current-buffer)))))
+
+;;;###liece-autoload
+(defun liece-insert (buffer string)
+  "Insert before point of BUFFER STRING with decorating."
+  (or (listp buffer)
+      (setq buffer (list buffer)))
+  (dolist (buf buffer)
+    (when (get-buffer buf)
+      (liece-insert-internal buf string))))
+
+(provide 'liece)
+
+;;; liece.el ends here
diff --git a/lisp/liece.xbm b/lisp/liece.xbm
new file mode 100644 (file)
index 0000000..3ad70c9
--- /dev/null
@@ -0,0 +1,843 @@
+#define noname_width 500
+#define noname_height 200
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0d,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x1a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xc0,0x1b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x8a,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0e,0x29,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x1b,0x5d,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x6a,
+ 0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xc0,0xf6,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xad,0x9d,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x86,0x31,0xdb,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x1a,0xee,0x9d,0x03,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x1d,0x2b,
+ 0xfb,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xb8,0x6b,0x54,0x95,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x66,0x4c,0xb6,0xd3,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0xd3,0x68,0xde,0x07,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7b,0x6e,0x88,0x2e,0x1c,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x55,0x96,0xf1,
+ 0x56,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,
+ 0xfa,0x28,0x29,0xf7,0x5c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x0b,0xb6,0xdc,0xa3,0xa2,0x2d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xc0,0x34,0x4a,0x61,0x66,0xcd,0x6a,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4a,0x34,0x5b,0x85,0x12,0x5b,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x6d,0x74,0x51,0xcd,
+ 0x1b,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x92,
+ 0x98,0x56,0x0d,0x27,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x80,0x12,0xef,0xb8,0xa6,0x9a,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x60,0x6f,0xdc,0x61,0xcd,0x15,0x56,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x04,0x00,0x00,0x98,0x28,0xa6,0xb2,0x4a,0x1a,0x32,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x71,0x00,0x00,0xa4,0xd6,0xd4,0x22,0xa9,0x2d,
+ 0x1c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xde,0x00,0x00,0xea,0x6a,0x68,
+ 0xc3,0x9b,0x32,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xbb,0x07,0x00,
+ 0x56,0x1c,0x90,0x4c,0x66,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0xef,0x12,0x00,0x6e,0x01,0x70,0x8b,0xaa,0x35,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xd0,0xba,0x0f,0x00,0xec,0x08,0xd0,0x86,0xbb,0x15,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xe0,0xef,0x2a,0x3d,0x92,0x57,0x60,0x19,0x55,0x07,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0xba,0xdf,0xcd,0x54,0xd5,0x43,
+ 0x25,0x54,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x77,0x55,0x5d,
+ 0x6c,0xbb,0x4f,0x3a,0xfa,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,
+ 0xdd,0xff,0xd2,0x59,0x97,0x80,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xda,0x77,0x7d,0xab,0xb0,0x59,0x9f,0x6a,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x74,0xdd,0xef,0xbb,0x43,0xb7,0x34,0xb7,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xde,0x77,0xb5,0x4a,0xa2,0x7a,0x35,
+ 0x4b,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0xba,0x7f,0xb3,
+ 0x06,0x80,0x4d,0xea,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xdb,
+ 0xef,0xfa,0xcb,0x02,0x28,0x5d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x80,0xbf,0xba,0xf7,0xb6,0x03,0x34,0xce,0x28,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xc8,0xea,0xef,0x7e,0x97,0x0f,0x5b,0x2e,0x08,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0xff,0xba,0xef,0xb9,0x15,0xb3,0x5a,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd4,0xd5,0xef,0x7a,0x5b,
+ 0x2a,0xc5,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x7f,
+ 0x75,0xff,0xb6,0x6d,0xba,0x3d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x80,0xde,0xd5,0xdf,0xdd,0x39,0x55,0x24,0x15,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0xf4,0x7e,0x75,0xfb,0x56,0xd7,0x58,0x07,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xaf,0xeb,0xdf,0xdf,0x36,0x6e,0x60,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0xfb,0x7e,0xf5,0xbd,0xe9,
+ 0x52,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf2,0x6d,0xeb,
+ 0xaf,0x5e,0xb7,0x4c,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x68,0xdf,0xbf,0xfa,0x3f,0xf6,0xd9,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0xbf,0x75,0xf5,0xaf,0x2f,0x86,0x59,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xe2,0xee,0xdf,0x5f,0xf5,0x4f,0x74,0x52,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x49,0xfd,0xbb,0x7a,0xf5,0xdf,0x0b,0x68,
+ 0x27,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x5b,0xdd,0xaf,0xbf,
+ 0xf5,0x2f,0x58,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xee,
+ 0x77,0xfd,0xea,0xfe,0x8e,0x92,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xac,0x7b,0xdd,0x57,0xbf,0xff,0xb5,0xa5,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x74,0xef,0xbb,0xfe,0xf5,0x6e,0xf7,0x53,0x00,0x00,0x00,
+ 0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0xba,0xee,0x57,0xdf,0xdf,0x16,0x0c,
+ 0x00,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xf7,0xbb,0xfe,0xfa,
+ 0x57,0xbb,0x03,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x5d,
+ 0xdd,0xab,0xff,0xad,0xc4,0x05,0x00,0x00,0x00,0x00,0x60,0x05,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xb0,0xf7,0x77,0xff,0xbf,0x8b,0x75,0x01,0x00,0x00,0x00,0x00,0xfd,0x11,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xe8,0x59,0xdd,0xf5,0xf7,0x0d,0x5e,0x00,0x00,0x00,0x00,
+ 0x40,0xbc,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0xf0,0xfb,0xdf,0xbe,0x0e,0x2a,0x00,
+ 0x00,0x00,0x00,0x00,0xf7,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa1,0xb5,0x7e,0xed,0x6b,
+ 0x19,0x04,0x00,0x00,0x00,0x00,0x80,0xde,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x67,0xf8,
+ 0xfd,0x15,0xbb,0x1f,0x00,0x00,0x00,0x00,0x00,0x80,0x7b,0xbf,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xb0,0x08,0x5a,0x57,0x4a,0xaa,0x3c,0x00,0x00,0x00,0x00,0x00,0x80,0xee,0x6b,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xa8,0x1a,0xee,0x5f,0x01,0x55,0x19,0x00,0x00,0x00,0x00,0x00,
+ 0x80,0xbf,0xbf,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x56,0x95,0x7a,0x3f,0x00,0xac,0x0e,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xeb,0x76,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xed,0x1a,0xd7,0x4b,0x10,0x38,
+ 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x5f,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,0x4b,0xfd,
+ 0x1f,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0xfd,0x04,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x95,0x82,0xeb,0x3f,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xea,0x57,
+ 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x9c,0x6a,0xd4,0xbe,0x35,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x50,0xad,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x17,0x6d,0xe1,0xeb,0x5b,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xa4,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x6a,0xd3,0x52,0xed,0xd6,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x33,0x6a,0xf8,0x9b,
+ 0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x1e,
+ 0x9a,0x50,0xb7,0xbe,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xcc,0x06,0x24,0xfe,0x5d,0xd6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x73,0x0e,0x5c,0x5a,0x2f,0x94,0x02,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x16,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x50,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x5a,0x0b,0x00,0xef,0x1f,0xbc,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x00,0x00,0x00,0x80,0xf4,0x3f,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xea,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0xa5,0x92,0x91,0xba,0x35,
+ 0x68,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x5e,0x00,0x00,0x00,0x00,0xdd,
+ 0xff,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0xfe,0xff,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xed,0xf6,
+ 0xc1,0xd7,0x1f,0x28,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0xd0,0x3f,0x00,0x00,
+ 0x00,0xa8,0xff,0xf6,0x00,0x00,0x00,0x00,0x48,0x05,0x00,0x00,0xc8,0xff,0x7b,
+ 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x52,0xc7,0xae,0x4b,0xed,0x3b,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0xa0,
+ 0x6f,0x02,0x00,0x00,0xc2,0xde,0xff,0x05,0x00,0x00,0x00,0xe2,0x3f,0x00,0x00,
+ 0xf1,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x80,0x48,0x81,0x49,0xe0,0x5b,0x25,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x2d,0x00,0xe4,0xba,0x00,0x00,0x00,0xf8,0xfb,0xde,0x12,0x00,0x00,0x20,0xfd,
+ 0x7f,0x00,0x00,0xfc,0xff,0x7f,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x24,0x40,0x55,0xf5,0xbe,0x3b,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x9c,0x00,0xb1,0xff,0x0a,0x00,0x00,0xfd,0xff,0xf7,0x0b,0x00,
+ 0x00,0x88,0xff,0xfe,0x02,0x40,0xfe,0xef,0xfe,0x0a,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa9,0xff,0x0b,0xbb,0xa8,0xfd,0x0b,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0xfc,0xb6,0x02,0x00,0x20,0x9f,0xb6,
+ 0x7f,0x03,0x00,0x00,0xf1,0xff,0xff,0x02,0x00,0x9f,0xfe,0xf7,0x05,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfa,0xab,0x5d,0x26,
+ 0xb8,0x57,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0xbc,0x02,0xd8,0xef,0x01,0x00,
+ 0x88,0x47,0xf9,0xfd,0x17,0x00,0x40,0xbc,0xdd,0xef,0x09,0xd0,0x47,0xf9,0xff,
+ 0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xad,
+ 0x7e,0xf7,0x28,0x4f,0xad,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x4c,0x40,0x7f,
+ 0x7b,0x05,0x00,0xc0,0xa9,0xea,0xb7,0x05,0x00,0x10,0x47,0xf4,0xfd,0x02,0xe0,
+ 0xa9,0xfa,0x7f,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x48,0xfb,0xd7,0xbd,0x87,0x5a,0x7f,0x05,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xbc,0x02,0xda,0xff,0x02,0x00,0xe8,0xaa,0x72,0xff,0x2b,0x00,0xc4,0x13,0x52,
+ 0xff,0x17,0xf4,0x52,0xf9,0xfe,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xe0,0xaf,0x7e,0xf7,0x9e,0x63,0xed,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x15,0xa0,0x7f,0xbb,0x02,0x00,0x72,0x94,0xf0,0xff,0x02,0x00,
+ 0xf8,0x40,0xd5,0xb6,0x04,0x79,0x94,0xf0,0x77,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xf5,0xd7,0xad,0xf7,0x7e,0x11,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x5c,0x89,0xd6,0x7f,0x01,0x00,0xb8,0x4a,0xe4,
+ 0xb6,0x0b,0x40,0xfe,0x94,0x90,0x7a,0x43,0xbc,0x4a,0xfa,0xff,0x0a,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdd,0x5f,0xbd,0x7f,0xdd,
+ 0xb9,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x56,0xc2,0x7f,0xaf,0x08,0x80,
+ 0xbe,0x12,0xf1,0xff,0x02,0x00,0x3f,0x4a,0x44,0x4a,0x09,0x1e,0x25,0xf0,0xdf,
+ 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0xea,
+ 0xef,0xd5,0xb7,0xe6,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xac,0xe0,0xed,
+ 0x5b,0x00,0x00,0x2c,0x25,0xb0,0x7b,0x09,0xa0,0x5b,0x05,0x00,0xa0,0x02,0x5f,
+ 0x09,0xf9,0x7e,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x60,0xbe,0xbf,0xba,0xbe,0xfe,0xab,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xae,0xa8,0xff,0x27,0x01,0x20,0x5f,0x01,0xfd,0xaf,0x02,0xc4,0xaf,0x12,0x00,
+ 0x09,0xa0,0x4f,0x05,0xfc,0xb7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0xad,0xd5,0xdf,0xeb,0xab,0xbe,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x4e,0xf2,0x6b,0x15,0x00,0x40,0xaf,0x2a,0xb4,0xdd,0x00,0xf0,
+ 0xbf,0x02,0x00,0x00,0x80,0x57,0x01,0xfd,0x5f,0x04,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xfe,0xbf,0x6a,0x5f,0xff,0x55,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x2b,0xb8,0xfe,0x0a,0x00,0x80,0x4b,0x80,0x7e,
+ 0x37,0x00,0xf9,0x6d,0x01,0x00,0x40,0xc8,0xab,0x28,0x5f,0x95,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0xd7,0x56,0xfd,0xf5,0x55,
+ 0xff,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x56,0xed,0xbf,0x02,0x00,0xa0,
+ 0x17,0x89,0xaf,0x9a,0x00,0xf8,0xbf,0x08,0x00,0x00,0x40,0x07,0xc0,0x5f,0x2b,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x81,0xfd,0x4b,
+ 0xab,0xdf,0xfe,0xda,0x27,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x27,0xbc,0x6d,
+ 0x01,0x00,0xc0,0x85,0xf4,0xd3,0x05,0x80,0xde,0xab,0x02,0x00,0x00,0xe8,0x93,
+ 0xfe,0xe3,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
+ 0x23,0xb7,0x2d,0xd4,0xb5,0xaf,0x77,0x9d,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x55,0xee,0x5f,0x00,0x00,0xe8,0xf7,0xbf,0xa8,0x2a,0x00,0x7e,0x7f,0x00,0x00,
+ 0x00,0xe0,0xf7,0x7f,0x94,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x38,0x05,0xfd,0x8e,0x50,0xff,0xfa,0xde,0x77,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xd0,0x2b,0x7b,0x2b,0x01,0x00,0x60,0xbf,0x0b,0x92,0x00,0x40,0xfb,
+ 0xaf,0x00,0x00,0x00,0xf4,0xff,0x05,0x29,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xd8,0x42,0xdb,0x15,0x04,0x54,0x5f,0xb7,0xdd,0x0b,
+ 0x00,0x00,0x00,0x00,0x00,0xc4,0x12,0xde,0x1f,0x00,0x00,0xe8,0xdb,0xa0,0x4a,
+ 0x04,0x00,0xff,0x5f,0x00,0x00,0x00,0xf0,0x5b,0xa0,0x54,0x02,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x51,0x05,0xb7,0x2a,0x20,0xfe,0xf5,
+ 0xfd,0x76,0x47,0x00,0x00,0x00,0x00,0x00,0x70,0x8d,0x7b,0x23,0x00,0x00,0x70,
+ 0x2f,0x95,0x24,0x01,0x90,0xdf,0x3d,0x01,0x00,0x00,0xf9,0xad,0x96,0x02,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x53,0x0d,0xbb,0x6a,
+ 0x00,0xab,0xbe,0xae,0xdf,0x3d,0x00,0x00,0x00,0x00,0x00,0xd2,0x92,0xee,0x1d,
+ 0x00,0x00,0xf2,0xfb,0x24,0x09,0x00,0x80,0xf7,0x5f,0x00,0x00,0x40,0xf8,0x7f,
+ 0x21,0x28,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0xd2,
+ 0x0f,0xbb,0x75,0xc8,0xfe,0xeb,0x7b,0x7d,0xf7,0x02,0x00,0x00,0x00,0x00,0x7c,
+ 0x8d,0xbf,0x03,0x00,0x00,0xd8,0x2f,0x09,0x00,0x00,0xa4,0x7f,0xb7,0x00,0x00,
+ 0x00,0xde,0x2b,0x8a,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x98,0xa6,0x38,0x6e,0x8a,0x82,0x6b,0x7d,0xdd,0xd7,0x5d,0x2b,0x00,0x00,
+ 0x00,0x80,0xba,0xa6,0xed,0x5f,0x00,0x00,0x72,0x5b,0x82,0x00,0x00,0xc1,0xfd,
+ 0x5f,0x00,0x00,0x10,0xfb,0x5f,0x01,0x00,0x00,0x31,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x50,0x62,0x1b,0x55,0xd5,0xe8,0xaa,0xd7,0x77,0x7d,0xf7,
+ 0x2d,0x01,0x00,0x00,0x28,0x6f,0x89,0xbf,0x02,0x00,0x10,0xfc,0xaf,0x00,0x00,
+ 0x00,0xf8,0xef,0xbf,0x00,0x00,0xc5,0xfd,0x26,0x10,0x00,0x00,0x18,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x8d,0x2c,0xae,0x0b,0xf4,0xd4,0xba,
+ 0xdd,0xd7,0x7d,0xff,0x10,0x00,0x00,0xc0,0xbb,0x85,0xeb,0x27,0x00,0x04,0xef,
+ 0x3d,0x11,0x00,0x80,0xd8,0xff,0xbd,0x04,0x40,0x70,0xf8,0x9f,0x02,0x00,0x40,
+ 0x8e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x61,0xc9,0x6a,0x9a,0x20,
+ 0x1b,0x15,0xd4,0x76,0x7f,0xd7,0xd5,0x97,0x10,0x90,0xfa,0xaf,0xd2,0x7e,0x9f,
+ 0x52,0xd0,0xb9,0x77,0x04,0x00,0x08,0xce,0xbe,0x6f,0x02,0x04,0x9e,0xfc,0x7f,
+ 0x00,0x00,0x04,0x27,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xc7,0x96,
+ 0xad,0x74,0xc8,0x5e,0x4a,0xa9,0xdf,0xd5,0x7d,0xbf,0x7d,0x85,0x84,0xb6,0x6a,
+ 0x85,0xef,0xf6,0x00,0xfd,0xf8,0xff,0x43,0x24,0xc2,0xc7,0xf7,0xff,0x20,0xa1,
+ 0x2f,0xdc,0xff,0x4b,0x12,0xd1,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x5c,0x24,0xe9,0xd2,0xac,0xff,0x4b,0x09,0xa0,0xba,0x7f,0xb7,0xf5,0xb6,0x7f,
+ 0xfb,0xff,0x57,0xe0,0xbe,0xdf,0xff,0x77,0x6d,0xdb,0x1f,0x81,0xe8,0xe9,0xff,
+ 0xfd,0x05,0xfc,0x47,0xfd,0xff,0x17,0x40,0xf8,0x11,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x27,0xcd,0xaa,0x6c,0xd9,0x57,0xad,0x22,0x88,0xee,0xd5,0xef,
+ 0xbf,0xef,0xdb,0x7e,0xdb,0xba,0x82,0xeb,0x77,0xff,0xbe,0xf8,0xff,0xfd,0x55,
+ 0xfe,0xc5,0xbd,0xdf,0xff,0xf7,0x53,0xf8,0x7d,0xff,0x2d,0xff,0x25,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xc0,0xdd,0x8e,0xbe,0xdb,0x74,0xf5,0x15,0x04,0x40,
+ 0xb8,0xbe,0xba,0xf6,0xbe,0xee,0xeb,0x7d,0x57,0xc0,0x7f,0xfd,0xdd,0xab,0xb2,
+ 0xbb,0xef,0xff,0x7f,0xd4,0xff,0xff,0xff,0xbf,0x94,0xfa,0xff,0xff,0xff,0x3f,
+ 0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0xf2,0x19,0x45,0x57,0xb3,0x4d,
+ 0x49,0x01,0x00,0xca,0xef,0xef,0xbb,0xeb,0xfb,0x7e,0xd7,0x2d,0x80,0xda,0xbf,
+ 0xf7,0x5f,0xf9,0xee,0x7e,0xff,0xb7,0x8a,0xef,0xfb,0xbb,0xff,0x4a,0xf8,0xef,
+ 0xff,0xff,0xbf,0x52,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x95,0x2e,0xd5,
+ 0x54,0x75,0xa7,0x22,0x00,0x00,0x50,0xbd,0xbe,0xef,0xbe,0xaf,0xdb,0x7f,0x93,
+ 0x80,0x7f,0xdb,0x5f,0x6b,0xf5,0xff,0xfb,0x6d,0x5f,0xe5,0x7e,0xdf,0xfe,0xaf,
+ 0x2a,0xbc,0xff,0xfb,0xff,0x57,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x33,0x29,0xb6,0xd1,0xaa,0x15,0x08,0x00,0x00,0x80,0xee,0xeb,0xba,0x6f,0xfb,
+ 0x7f,0xfb,0x0d,0x00,0xdb,0xff,0xfa,0xbf,0xa0,0xfb,0xef,0xff,0xdf,0x8a,0xfb,
+ 0xff,0xff,0xbb,0x05,0xf0,0xff,0xff,0xff,0xef,0x12,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xc0,0x65,0x55,0x94,0x29,0xb5,0x47,0x02,0x00,0x00,0x24,0xb9,0xbf,
+ 0xef,0xfa,0x5d,0xf5,0xaf,0x02,0x00,0xff,0xf6,0xef,0x56,0xf2,0x6f,0x7f,0xff,
+ 0xba,0x80,0xdf,0xf7,0xef,0x6e,0x15,0xf0,0xbf,0xbf,0xbb,0x5b,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xc0,0x01,0x7b,0x6e,0xb4,0xd3,0xae,0x00,0x00,0x00,0x00,
+ 0x00,0xd2,0xea,0xbb,0x6f,0xf7,0xbf,0xbb,0x00,0x00,0xb6,0xbf,0xfd,0x2f,0xc0,
+ 0xfd,0xff,0xb7,0xdf,0x0a,0xff,0xfe,0xff,0x5f,0x01,0xc0,0xf7,0xff,0xff,0xbf,
+ 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x81,0x55,0x6b,0xcc,0xe4,0x4a,0x01,
+ 0x00,0x00,0x00,0x00,0xa8,0xbf,0xfe,0xfe,0xdf,0xf6,0x4d,0x02,0x00,0xfa,0xf6,
+ 0x77,0x95,0x80,0xdf,0xed,0xfd,0x37,0x01,0xfe,0xbf,0xfd,0x5b,0x04,0xe0,0xfe,
+ 0xfd,0xff,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x02,0xa5,0x35,0xb0,
+ 0x25,0x19,0x20,0x00,0x00,0x00,0x00,0x40,0xea,0xaf,0x57,0xb5,0x7f,0x2b,0x00,
+ 0x00,0xbc,0xdf,0xfe,0x05,0x40,0xf7,0xbf,0xff,0x4d,0x00,0xec,0xfb,0xff,0xaa,
+ 0x00,0x80,0xff,0xef,0xff,0x5b,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5c,0x03,
+ 0xb4,0x2e,0x98,0xcd,0x06,0x00,0x00,0x00,0x00,0x00,0x21,0x6d,0xfd,0xfe,0xff,
+ 0xef,0x02,0x00,0x00,0xf0,0xfe,0x5f,0x09,0x00,0xbd,0xfb,0xb7,0x2b,0x00,0xf9,
+ 0xff,0xb7,0x0b,0x00,0x40,0xff,0x7f,0xb7,0x05,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xb0,0x0c,0x74,0x39,0x60,0x4d,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,
+ 0xb7,0xdb,0xfe,0x3a,0x49,0x00,0x00,0xc8,0xeb,0xb7,0x02,0x00,0xfa,0xff,0xfe,
+ 0x0a,0x00,0x74,0xbf,0xff,0x12,0x00,0x08,0xbd,0xff,0xff,0x2a,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0xa8,0x05,0x94,0x0a,0x20,0x91,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xa1,0xfa,0xff,0xeb,0x45,0x00,0x00,0x00,0x50,0xbf,0x2a,0x00,0x80,
+ 0x6c,0xef,0x5f,0x05,0x00,0xd0,0xfb,0x96,0x08,0x00,0x00,0xfa,0xff,0xad,0x02,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xb0,0x0d,0xb8,0x03,0xc0,0x1d,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x4a,0xb5,0x5d,0x2a,0x02,0x00,0x00,0x82,0xea,
+ 0x16,0x01,0x00,0xa8,0xfb,0x6b,0x11,0x00,0xa0,0xee,0x55,0x02,0x00,0x80,0xa4,
+ 0xbb,0xb7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4e,0xa0,0x0f,0xa8,0x04,0xa0,
+ 0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0xa8,0xaa,0xaa,0x00,0x00,0x00,
+ 0x00,0x20,0x55,0x21,0x00,0x00,0x50,0xaf,0x16,0x00,0x00,0x88,0x5a,0x0b,0x00,
+ 0x00,0x00,0x68,0xed,0x4a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xad,0x81,0x30,
+ 0x50,0x0d,0xc0,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x49,0x05,
+ 0x12,0x00,0x00,0x00,0x00,0x48,0x04,0x00,0x00,0x84,0xb4,0x49,0x01,0x00,0x20,
+ 0xa5,0x44,0x00,0x00,0x00,0x10,0x5b,0x15,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
+ 0x76,0xe1,0x16,0xb0,0x06,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x24,0x24,0x10,0x00,0x00,0x00,0x00,0x80,0x24,0x00,0x00,0x00,0x20,0x49,0x02,
+ 0x00,0x00,0x00,0x08,0x10,0x00,0x00,0x00,0x40,0xaa,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xc0,0x4d,0x87,0x6d,0xa0,0x1d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
+ 0x00,0x92,0x10,0x00,0x00,0x00,0x42,0x01,0x00,0x00,0x00,0x00,0x01,0x0a,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x52,0x85,0xad,0x40,0x19,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x6d,0x0b,0x59,0xc0,0x3d,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x75,0x0b,0xad,
+ 0x80,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xcb,0x3a,0x9a,0x81,0x6a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x6d,0x53,0x6c,0x29,0xad,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x75,0xca,0x76,0x3a,0x00,0x00,0x00,0x00,
+ 0x00,0x28,0x0a,0x00,0x00,0x50,0x01,0x00,0x00,0x40,0x01,0x00,0x00,0xa0,0x16,
+ 0x00,0x00,0x30,0x04,0x03,0x00,0x00,0x00,0x28,0x14,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x02,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0xa0,0x02,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4b,0x8b,0x18,0x4f,0x06,0x00,
+ 0x00,0x00,0x00,0x00,0x08,0x04,0x00,0x01,0xa0,0x00,0x00,0x00,0x81,0x00,0x00,
+ 0x00,0x40,0x29,0x00,0x00,0x08,0x80,0x00,0x00,0x00,0x00,0x10,0x14,0x00,0x00,
+ 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xa0,0x00,0x40,0x00,0x00,0x40,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd6,0xb4,0xd4,
+ 0xea,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x42,0x45,0x05,0x90,0x20,0x85,0x42,
+ 0x45,0x0a,0x2a,0x54,0x40,0x10,0x2a,0x54,0x21,0x16,0x50,0x42,0x50,0x01,0x54,
+ 0x0a,0x28,0xa8,0x50,0xa1,0x82,0x0a,0x21,0x05,0x15,0x40,0x88,0x90,0x80,0x20,
+ 0x22,0x90,0x40,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x6c,0x76,0x59,0xb6,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x21,0x89,0x04,0x48,
+ 0xa8,0x62,0x85,0xa4,0x94,0x12,0x12,0x40,0x10,0x29,0x28,0x89,0x88,0xa2,0xaa,
+ 0x48,0x02,0x28,0x04,0x25,0x24,0x24,0x90,0xa2,0x8a,0x50,0xa1,0x12,0xa0,0x50,
+ 0x21,0x29,0x41,0xd5,0x20,0x83,0xa4,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xca,0x54,0xa3,0x56,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x42,
+ 0x44,0x01,0x48,0x11,0x14,0x48,0x81,0x08,0x41,0x04,0x40,0x28,0x42,0x80,0x90,
+ 0x86,0x10,0x89,0x14,0x01,0x08,0x2a,0xa2,0x04,0x08,0x00,0x51,0x08,0x21,0x8a,
+ 0x08,0x20,0x14,0x55,0x10,0x45,0x20,0x81,0x50,0x41,0x04,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xac,0x9a,0x65,0x2f,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xa0,0x10,0x44,0x00,0x84,0x08,0x21,0x44,0x20,0x48,0x30,0x05,0xa0,0x92,
+ 0x20,0x40,0x14,0x01,0x21,0x42,0x04,0x01,0x32,0x89,0x40,0x02,0x04,0x20,0x22,
+ 0x44,0x09,0x62,0x14,0x40,0x00,0x22,0x04,0x12,0x08,0x10,0x25,0x10,0x08,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x67,0x5a,0x02,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x40,0xa8,0x8a,0x00,0x84,0x10,0x15,0x94,0x40,0x94,0x0d,
+ 0x02,0xa0,0x0a,0x55,0x5a,0x09,0x81,0x10,0x84,0xaa,0x02,0x84,0x12,0x2d,0x2a,
+ 0x54,0xac,0x12,0x0a,0x28,0x14,0x08,0x50,0x18,0x11,0x74,0x51,0x30,0x48,0x11,
+ 0x60,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0xb4,0xd2,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x90,0xa0,0x00,0x55,0x09,0x12,0x48,
+ 0x50,0x48,0x10,0x01,0x10,0x42,0x09,0x45,0x84,0x40,0x08,0xa1,0x44,0x00,0x52,
+ 0x89,0x20,0x54,0xa8,0x10,0x09,0xc4,0x10,0x21,0x04,0x20,0x84,0x28,0x08,0x21,
+ 0x00,0x94,0x12,0x88,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xd8,0x56,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x10,0x40,0x00,0x92,
+ 0x14,0x11,0x44,0x20,0x84,0x00,0x04,0x40,0x84,0x00,0x81,0x10,0x81,0x28,0x45,
+ 0x02,0x00,0x42,0x50,0x01,0x40,0x40,0x04,0x29,0x04,0x08,0x15,0x08,0x50,0x08,
+ 0x09,0x04,0x10,0x18,0x04,0x11,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xb0,0x6a,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x08,
+ 0x10,0x80,0x40,0x88,0x0a,0x22,0x10,0xa8,0x80,0x02,0x28,0x42,0x00,0xa1,0x8c,
+ 0x40,0x08,0x22,0x04,0x00,0xa1,0x88,0x00,0x20,0x80,0x8a,0x10,0xa1,0x04,0x12,
+ 0x0a,0x00,0x8a,0x10,0x0a,0x10,0x10,0x82,0x08,0x10,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x8b,0x16,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x10,0x50,0xc5,0x80,0x42,0x85,0x20,0x45,0x21,0x44,0x14,0x01,0x20,0x4a,
+ 0x25,0x4a,0x40,0xa5,0x14,0x41,0x95,0x00,0x42,0x90,0x2a,0x40,0x41,0x84,0x52,
+ 0x86,0x10,0x61,0x05,0x50,0x04,0x29,0x24,0x21,0x08,0x2a,0x51,0x28,0x02,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x8e,0x05,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x50,0x22,0x03,0x81,0x04,0xa9,0x50,0x12,0x82,0x89,
+ 0x00,0x28,0x14,0x95,0x2a,0x86,0x48,0x08,0x21,0x54,0x80,0x22,0x88,0x12,0x55,
+ 0x5a,0xaa,0x50,0x21,0x8c,0x90,0x00,0x28,0x42,0xa4,0x48,0x08,0x04,0x94,0xa8,
+ 0xa1,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1a,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x80,0x40,0x40,0x00,0x09,0x00,0x00,
+ 0x01,0x04,0x02,0x02,0x00,0x80,0x00,0x40,0x00,0x02,0x80,0x00,0x00,0x00,0x40,
+ 0x10,0x04,0x09,0x04,0x10,0x00,0x84,0x00,0x02,0x06,0x00,0x00,0x11,0x90,0x20,
+ 0x10,0x00,0x01,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x40,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x01,0x00,0xa8,0x04,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x80,0x2e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x01,0x00,0x50,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/lisp/liece.xpm b/lisp/liece.xpm
new file mode 100644 (file)
index 0000000..e98ebb1
--- /dev/null
@@ -0,0 +1,228 @@
+/* XPM */
+static char * liece_xpm[] = {
+"500 200 25 1",
+"      c None",
+".     c #2B050D",
+"+     c #AFAEAC",
+"@     c #818180",
+"#     c #B3082C",
+"$     c #5F595B",
+"%     c #DE6A7C",
+"&     c #969493",
+"*     c #E3DBDB",
+"=     c #820B24",
+"-     c #C9606E",
+";     c #3E3637",
+">     c #9E9E9C",
+",     c #C2C2C0",
+"'     c #5C051A",
+")     c #AF5460",
+"!     c #E3717F",
+"~     c #EDC2C8",
+"{     c #E99EA4",
+"]     c #262221",
+"^     c #8D454C",
+"/     c #BA485D",
+"(     c #F2EFEF",
+"_     c #D496A3",
+":     c #B54159",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                          >*                                                                                                                                                                                                                                        ",
+"                                                                                                                                                                                                                                                                        +;;+(                                                                                                                                                                                                                                       ",
+"                                                                                                                                                                                                                                                                     (>;-!-$,                                                                                                                                                                                                                                       ",
+"                                                                                                                                                                                                                                                                     ,$!!!!]@*                                                                                                                                                                                                                                      ",
+"                                                                                                                                                                                                                                                                   ( *@;]]!]$,                                                                                                                                                                                                                                      ",
+"                                                                                                                                                                                                                                                                *@@>*(,$]%!-!@*(                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                              ,>$];;&((&$%!%!;+*                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                             ,@]]];];>*,$!!];!@*                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                             ,$]%!!-!]@*>]!%]-;>*                                                                                                                                                                                                                                   ",
+"                                                                                                                                                                                                                                                             *@])!]!]]]@,@]%%!]@,                                                                                                                                                                                                                                   ",
+"                                                                                                                                                                                                                                                       (***   *$-%;-!;!]$@;])%-$&*                                                                                                                                                                                                                                  ",
+"                                                                                                                                                                                                                                                      (>@$@>(  @;-!!!;!!]$$];!!];+(                                                                                                                                                                                                                                 ",
+"                                                                                                                                                                                                                                                    ,@;%-%$;@* *$)]!!;]-]!]]]!-]!@*                                                                                                                                                                                                                                 ",
+"                                                                                                                                                                                                                                                  +$;]!!;%!];&* +;;]!]!!]]!];]];%;+(                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                 *@;]]!);--$-;+(*@]!!!!!-!%%!!%]%$$,                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                *@]!!!])%!!;!!$+ +;!!;!%]]%%!-!]%%]>(                                                                                                                                                                                                                               ",
+"                                                                                                                                                                                                                                                +]!!!-$@]!%!!-]@*(>;%]!%!]]]]!];]!]@,                                                                                                                                                                                                                               ",
+"                                                                                                                                                                                                                                           *(  (@]!%]]$(@]]]!!;$> *$%%%%%]]]!!!!!!%]@*                                                                                                                                                                                                                              ",
+"                                                                                                                                                                                                                                          *@&  (&^%!]-$>,;%-!-!!$( >;]^!-;;$%%%%%!-!;+(                                                                                                                                                                                                                             ",
+"                                                                                                                                                                                                                                        +@]%]   @;%%]]]$,>!%!!!%;>(,@;)!];;,$]];!!]]]@,                                                                                                                                                                                                                             ",
+"                                                                                                                                                                                                                                      ,&$]!]-&( +$]%]]!;,*;]-!;]!$,(+;%!%!!@+$-]%!])!;+*                                                                                                                                                                                                                            ",
+"                                                                                                                                                                                                                                     (&]!%%!!;, *$%-%!%%$,+!!!]!!]&(*@;!-!%]*,$]%%!]%)$*                                                                                                                                                                                                                            ",
+"                                                                                                                                                                                                                                     (,;!!-!-!&**&;!]]!!]>(;!%$%!!$+(*$!!]!!&*+@]!);!;$*                                                                                                                                                                                                                            ",
+"                                                                                                                                                                                                                                 *((   @]!!]!%;+(*@%];%!;@,>;!]%%%]$( @]];!%;+(,@%!-;@,(                                                                                                                                                                                                                            ",
+"                                                                                                                                                                                                                                +@$@,((+$%!-!!-$((+]!%!%!]@,@%!%]!;$+(,$];]!!$*(,$$@,*                                                                                                                                                                                                                              ",
+"                                                                                                                                                                                                                              +$!;!!$>((&]]]!!]]>(*@;]%%%!;+,;!!%-!]$( >;;]!!;&  *,*                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                (**,(                      (>$;!;;]!)$,(,$;;]);];( ,$]-!;;;@,>]]!!!!;+(,@]!%%!]   (                                                                                                                                                                                                                                 ",
+"                                                                                                                                                                                               ,~~~~~~* (                 ,@]!!!!%!%!]$,(>;!!%!%%&**@;!-!%!;+(;-!%$%]@((,$-!;$@*                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                              ~~~~_-::_*(*((             *$%!!!%!-%%$!;+ ($%%!]!!;,(,@!!!!!)@,>]]-];!@( *&$$@,*                                                                                                                                                                                                                                     ",
+"                                                                                                                                                                                             ,~~{:######>**(*(           @$-%]]$@$!%-;@,( ,$%!]%-;@((+]!]]!!;>*$!!!!-$*  ,@>*(                                                                                                                                                                                                                                      ",
+"                                                                                                                                                                                            ~~~{#########@,**((         *$]%!%]&,@]);@,(  (@]%%!-%]> *$!!]!!!$+>]!%!!@(   *(                                                                                                                                                                                                                                        ",
+"                                                                                                                                                                                           *~~{:##########>,,*((        *;;]!-;&,,@&,*(    ,$)]!!$%;  +;!]!%!]$;]%!!]>(                                                                                                                                                                                                                                             ",
+"                                                                                                                                                                                          (~~~############=>+,*(( ,+**  ,$;;!]];>(,*(((    (&;;];;!!+(*@;;!];%);-!!)$,                                                                                                                                                                                                                                              ",
+"                                                                                                                                                                                          ~~~/#######=#####$&+,,>@;;;$,*(@!!!!!!]$$@@>&,,(  ,$;%!%%!$,(,$!%!;%!!]];@,                                                                                                                                                                                                                                               ",
+"                                                                                                                                                                                         *~~!###########=##=@&@$;-!;!!;>(+]!%!!!];!!;!];$@+((>;%%!-%^&((+$%%]!%!!]$+(                                                                                                                                                                                                                                               ",
+"                                                                                                                                                                                        (~~{###############=$$;))%-;]!]@,(@)!]^%]]!!;$%]]]]@ (@-!]!!]$+ (,$);;];$@*                                                                                                                                                                                                                                                 ",
+"                                                                                                                                                                                        ~~~-########=######=.]]$--%%-!-]$ *]%!%!]]!%]%%!%!!%>*+;!]%!!;$   *&&@&+,*                                                                                                                                                                                                                                                  ",
+"                                                                                                                                                                                       *~~!############=####'].^);-!!!!]%,(>;]-!];!%]%-!%!;];+,&]])%!;]>    (( (                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                      (~~~##################=]]^]@$;]-!]%$*(>$;!]]%%;]%^%%)$!$,,$]]!-]!;*                                                                                                                                                                                                                                                           ",
+"                                                                                                                                                                                      {~~/##############=###=];^]@+$]!!!!], (,+@$@$;$]]-!!]!!;&,&;%%!!!!+(                                                                                                                                                                                                                                                          ",
+"                                                                                                                                                                                     ~~~!###########=####=##=..^^;(>;!%]!;+(  (*((**++>$]!;]-!$(*$!%!]]$,(                                                                                                                                                                                                                                                          ",
+"                                                                                                                                                                                    *~~{####################'.];^]>+@!!;!$,      (,&&+*,@%;]!!;, +;!]@>,(                                                                                                                                                                                                                                                           ",
+"                                                                                                                                                                                   ~~~~###############=#####'].^^]$&$-!;;$,*(    ,$!;$, +]]!!!;& (@$@,(                                                                                                                                                                                                                                                             ",
+"                                                                                                                                                                                  *~~~/#################=###'..;^]]$;!!;];$$>( ,@-!!;$&*,$]]%!$,  ,,((                                                                                                                                                                                                                                                              ",
+"                                                                                                                                                                                 *~~~/#############=#####=##'].;^)-;;%!];@;-],(,$]!-;%$>&]%]%!$,   (                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                *~~~/######################='..^^)-%]-!-!%%!!$,*@;!!!%!]]!%%!;>(                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                              (~~~~/##################=####=]]].^]--];$;^%]]%]& *$%%;)!;]!];;>*                                                                                                                                                                                                                                                                     ",
+"                                                                                                                                                                             *~~~~:################=####=##'.]];))%!];,>;-!!%!$,(+;!!!!%!%]$@*                                                                                                                                                                                                                                                                      ",
+"                                                                                                                                                                            ~~~~{##########################.];;]))-%;%+,$;;-%!]$ (+]%%%%];$>(                                                                                                                                                                                                                                                                       ",
+"                                                                                                                                                                          *,~~~!#####################=###==.];$;)];%;;$++$;;!]]!,  +>$$@++(                                                                                                                                                                                                                                                                         ",
+"                                                                                                                                                                       (*~~~~{:###################=######=..]$@$]--%;]^@*@^!-!%_$*  ((**((                                                                                                                                                                                                                                                                          ",
+"                                                                                                                                                                     (*~~~~{%#########################=##'...;&>$]%%]]-],,;)%%%-^>                                                                                                                                                                                                                                                                                  ",
+"                                                                                                                                                                  (*~~~~~{%#############################=..]]$>,>;]%;;];$*&$]!]]-@*                                                                                                                                                                                                                                                                                 ",
+"                                                                                                                                                              (**~~~~~~{/#######################=##=###=...]$@+*,@]!!!!;],,$;!!^;&*                                                                                                                                                                                                                                                                                 ",
+"                                                                                                                                                      *****,~~~~~~~~_%################################=...];@+,*(,$!%%%%!$,&;%]@+*(                                                                                                                                                                                                                                                                                 ",
+"                                                                                                                                                      *~~~~~~~~~!%:#################################=#....]$>,*(((&;!]]%]]&*>@+*                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                       *!%/:::##################################=###=.....];>,((((*$!%!!]%$,(,(                                                                                                                                                                                                                                                                                     ",
+"                                                                                                                                                        !##########################################'..]]];^]@*(+@>(>;%!%!;@*                                                                                                                                                                                                                                                                                        ",
+"                                                                                                                                                        (-#######################################=.....;;^^)$+&$;$+,@;!]@,*                                (*                                                                                                                                                                                                                                                       ",
+"                                                                                                                                                        ((/#####################################'.]]]];;.])-;;];]]$*,@@>,                                  ,~~                                                                                                                                                                                                                                                      ",
+"                                                                                                                                                        ((*/#################################='...];$$]^)]--]!%!!!;>*,*(                                  ~~~_@*((((                                                                                                                                                                                                                                                ",
+"                                                                                                                                                        ((*~:##############################='.....];@@@^);!-]-!;;!$+( (                                 (,~~{==:*((((                                                                                                                                                                                                                                               ",
+"                                                                                                                                                         (*~{%###########################=....].]]]@>>,$-%-!-!-]$$+*                                   (~~~~#='=@*,**((                                                                                                                                                                                                                                             ",
+"                                                                                                                                                         ((*&;:=######################='......]];^^$+,*>;%!%]]]$&*(                                   (~~~!======&,,*((                                                                                                                                                                                                                                             ",
+"                                                                                                                                                          (,$]^.=%%/##############='......]]].;^.^]$+(((&;]%]$@,*                                     ~~~!========&+,,((                                                                                                                                                                                                                                            ",
+"                                                                                                                                                         ( *$]/))~~{########'...]]];]]]]]];;]]^^^))]>(  ,$!;&,*                                      *~~!=='==='===>+,**(                                                                                                                                                                                                                                           ",
+"                                                                                                                                                       ,,,*(+;-]_~~%#######..]];;;;$$$;];=^^:;)))--]$,  (,$>,                                        ~~{============&+,**(                                                                                                                                                                                                                                          ",
+"                                                                                                                                                    *>@;$$$,(@$>~~{#######=]]];$$$@@@@&@;^^^];-];]];;+    *(                                         *~-========'=='=$+,*((                                                                                                                                                                                                                                         ",
+"                                                                                                                                                  (@;]-%%!!$+,,~~~:######'.]]$$@@&&>>++,@;-/-;%-%!]]]@(                                              (~:====='========$+,*((                                                                                                                                                                                                                                        ",
+"                                                                                                                                                  ,]!]!!-!!]$,~~~%#######..];$@>+,,,,*,*,&]%-%%%%%!];>(                                               *:========'==='=^>+**((                                                                                                                                                                                                                                       ",
+"                                                                                                                                                +$;!!!)!!--!${~~{#######].]]$@&,,**((((((,$]-]%%!-]@>,                                                 {=========='==;$@>+*((                                                                                                                                                                                                                                       ",
+"                                                                                                                                               *$!]!!];]!-!%$,~~:######'.]]]$>,**((((((( (,$%;%!]$&,(                                                 ((&===='====='];$@&,**(                                                                                                                                                                                                                                       ",
+"                                                                                                                                              (,;!]]!$>@;]!;~~~%######...]];],,((((       (,]]^;&,*                                                    (*>)=====''.]];$@>+*((                                                                                                                                                                                                                                       ",
+"                                                                                                                                           >,( @]!!!$@*,@;@~~~_######=]]..;.]@(((          (@@$+(                                                     ((*,>@$;;];]];;$$@+,*(                                                                                                                                                                                                                                        ",
+"                                                                                                                                        *&$;$,*@^!%%%;+,,>,~~{######^]].];^^];,             (,**                                                       ((*,>&$$;$;$$$@&>,,(((                                                                                                                                                                                                                                       ",
+"                                                                                                                                      (+@$;-;+(+;%;;%]$@+,~~~/#####:$;]].]^)]-@*                                                                       ((*,,>&@@@$@@@&+,**(                                                                                                                                                                                                                                         ",
+"                                                                                                                                      >;;$!!!$,,;!!%!!;^!{~~%#####^$$;$];^)--!;+                                                                        ((**,++>>>>++,,*(((                                                                                                                                                                                                                                         ",
+"                                                                                                                                   *>$^%];%!]$+*&!%)!!]!~~~!######$;;$@$])--%%!$(                                                                        (((**,*,,,,**((((                                                                                                                                                                                                                                          ",
+"                                                                                                                                  ,@;;]%%;]]@+( *;!]!!;&~~~#####=]]$$$@&@;]]]!!;>                                                                         (((((**((*((((                     *((**(                                                                                 (((**(                                                                                                                          ",
+"                                                                                                                                 ,,;!%]%!]]@,(  (>;%%!{~~~######';.;$&>,>$]-;!%]$(                                                                          (((((((((                    (**,~~~~~~~* (                                                                          (,~~~~~~~~*( (                                                                                                                     ",
+"                                                                                                                              *&$]*&]!]!%;]@      @$:_~~~/#####;;;];$&,*,&;-]!!%-+(                                                           *,~,*              (                    (*~~~~~~~__!:&_**(((                                                                    *~~~~~~~+!&^-&,*((((                                                                                                                  ",
+"                                                                                                                            ,&$]!!@>$;%!%]%]   *,((+&~~~-#####^=.;;]$>**(*$!;]!]@+                                      *(                   ,~~~~~~(((                             (*~~~~~_%='''''''=>**(((                                   ((                           *,~~~~{!^........$**(((                                                                                                                 ",
+"                                                                                                                           ,@;]]-!]&>]!%!-!!@,>@$+ (~~~!####=];]]=;]]>*(((>;-]$>,(                                     (~,                 (~~~{/==')(**((                        (~~~~~{-=''='''''''''&,,*((                             (*~,~~,~,*(                    (*~~~~~-;............$,,*((                                                                                                                ",
+"                                                                                                                         (@;-!!!]!;@,@;]!]]!;@$]]@*~~~!####/@$.;.^^]]@((  (@$@,(                                       (~~!, ( (          *~~~{#======***(((                     *~~~~_:'''=''''''''''''+,***(                        (*,~~~~~~~~__~~((((               **~~~{)................@+,**(                                                                                                               ",
+"                                                                                                                       ,+$@$!!]!];@,(,;]!]]!!]$];;~~~~####=;$$;]]^^]]$(    *,*(                                        *~!==**(((        (~~~_======'=$,,,((                   (~~~~_:''=''''=''''''''''$>+**(                      *~~~~~~{!^='.'..]),(*((            ~~~~{)..................;&+,*((                                                                                                              ",
+"                                                                                                                  (*,~~~~~~~~~+&@+((  $]-!!-!%!%!~~~{####:^.;@$;]^-)%@*     (                                           ~!==_***((       ~~~!=========^&+,*((                 *~~~{)'''''=''''''='''''''$@&,*((                  (,~~~~~_)'.'....'.'...,***((        (,~~~-]...................]@&+,((                                                                                                              ",
+"                                                                                                               (*~~~~~~~~!_!_!{~~~~*((+$-!-!!!!!&~~{:####^];]$@;])--]@(                                                 ~!==),*,*((     ~~~{===========@>+,*(                ~~~~{=='='=''''=''''''''''';$@+,*(                *~~~~*,!='.'.'.'.'..'.'.],,**(       ~~~~{^.....................]$@>,*((                                                                                                             ",
+"                                                                                                             (,~~~~~!%:##########/!_~~*&;;^%];%&~~~:###=);];.;$]]]-;$,                                                  ~~#=:,,,**(    *~~{#=========';$@>,*((              ,~~~)''''=@))^'='''''''''''';$@>,*(              *,~**(~^'...'..'..'..'...'.&+,*((     *~~~_.....$@$;].............];@&+*((                                                                                                             ",
+"                                                                                                            *~~~~{%##################/{~&;-%%;{~~~/###&;.^^^^^)--%-]>(                                                  ~{==^+++,*((  *~~~============;;@&,*(             (~~~~='''-++&@@@{=''=''''''''.;;$>,*(           (*~~~* _''.'^^^^.'.'..'...'...@@+,*((  (~~~~^...;&+&@@@_;............];$@,,*                                                                                                              ",
+"                                                                                                           ,~~~{########################!~@--_~~{/###~>$];=$^))--];>(                                                   ~~#=^&>>,*(( (~~~/===========.];$&,,((           (~~~~=='={++&@@$@+-'''''''''''.;$@>,*((         *~~~~*-.''&~*,,+>>@^''..'.'...'$@&,,((  ,~~~)...&,_>&@@$&~............];$&+*((                                                                                                             ",
+"                                                                                                          ~~~~%###########################-~{~~{####_+@@$]]])];);@>*                                                   (~~==^&>>,,(((~~~%=#=========.];$@>,*(           (~~{_=''),+>@&@&@@{~'='=''''''.]];@>,*(        (~~~~~-'.'&*,,,+++>&@@$$;''...']]$$@,,(( ~~~~]..]_+>&@@@&@&~;..........]]$$>+*(                                                                                                              ",
+"                                                                                                         ,~~{###############################-{~:##/~@$;@@$;]]];$@,(                                                    (~~#=:@&>+**(*~~!===========.]];$@>,*(           ~~~_''=:,+>&@&&&+>,~:''''''''']];$@+**(       *~~~~)'.'',,,,,,+++>>&@@@$$;;;]];;$@&+*((*~~{'..'+++&&&&>&>,~!..........]]$@>,*(                                                                                                              ",
+"                                                                                                        ~~~~######################################$@;.]$&,>&@+,*(                                                      *~_==^&@>,,(~~~{#========='.]];$@>,*((          ~~~_'='^,>&&&&>+,,,~~:''''''''.];;@&,*((     (~~~~!=.'.=+++++++,++,++>&&@@@$$;$;$$@>,*(*~~~;..'++&&@&&++,,~~@.........]];$&+**(                                                                                                              ",
+"                                                                                                       *~~{######################################{$]];^;@+*(((                                                         ~~!=#)&&>+,*~~~==========..]];$@@+,*((         *~~{=='=>>&@@>++,**~~~^'''''''..];$@+,((     (,~~{^'.'''+++&>>,+,,,*,*,,++>@@@@$@@@>+,(*~~~^...@+&&&&>+,**~~~-........]]]$@>,*((                                                                                                              ",
+"                                                                                                      ,~~~:#######################################%_^;^]$+*(                                                          (~~-==@@&>+*~~~/#======='.]];;$@&+,(((         *~~~=''=&>@@&&+,,*(~~~_''''''']]];$@>,,((    *~~~_=.''.'@&&@>>+,*****(****,,,++>>&>>,,*(~~~)...)>&@@&++,***~~~]........]]$@@+**(                                                                                                               ",
+"                                                                                                    ,@@~~-##########################################_!^;@,((                                                          *~~:#=&&@>,~~~!====#===']]];;@@&+,*((          ~~~/===)>&@@&+,***~~~~:'''''']]];$@&+*((    *~~~!''.'.'^@@@@&>,,**(((((((((***,,,,,,*((~~~!...'+&@@&&+**(~~~~-......]]];;@@+,*((                                                                                                               ",
+"                                                                                                   *@]_~{#####:;;;^;;################################:_>+*(((                                                         ~~{===>@&>~~~_========]]];;$$@>,,*((          *~~!'''=>@@@&>,,*~~~~{:'''=';;]];$$&,,*((   (~~~)'.'''.'$$$@@&,,*((( ( ( ((((*((*****(((~~~'...@@@@@>,,*~~~~~@.....]]]];$$@+,*((                                                                                                                ",
+"                                                                                                    @]~~!####'..];;$$;$;=##############################-{,**((                                                       *~~-=#)>@@+~~{#=======]]];;$@>+,*(((           ~~{=='=)&@@@+,~~~~~~!=''''^^;;;$$@&+,*((   (~~~:.''.''.;$$$$&+,*(((         (((((((((((*~~^...;&@@@>+~~~~~~{;.....$$;;;$$&+,*((                                                                                                                 ",
+"                                                                                              (,,( (+@~~####^^;];];@$@$@$$:##############################!,,*(((                                                     ~~~#==@&&&~~~-======#];];$$@>+,**((           *~~-'='=+_~~~~~~~~~_=''''^$@$$;$$@&,,(((   (~~~!'.''.''';;$$@>,*((               (  (  (~~_.'.._+{~~~~~~~~_^.....$@$$$$$@&>,**(                                                                                                                  ",
+"                                                                                             *>@$,  *&~~###']];.^.;@>>&@@@$$:##############################!~,*(((                                                  ,~~%==#>&@>~~_=======];];$$&>,,((((            ~~{'='=)~~~~{~__^:''''=)>&&$$$@@@>,,*((    *~~!.''.''.''];;@&+,(((                     ~~~=...'~~~~~{,_)$.....;&>&@$$$$@&+,*(((                                                                                                                  ",
+"                                                                                            ,$$];@( (+~{###^].;.^^;$+,,,++&@@)##############################:!,,*(((                                               *~~{#==)&@&{~~#==#====]];$@@+,**((             *~~)='=':^^=^'''''''^)>,+>&@&$@@>+,,(((    (~~~='''.'''.'];;@>,*(                      (~~_....;^^;=........^@,+>&@@@@&&>,,*((                                                                                                                    ",
+"                                                                                          ,@]!%!%$+  ,~!##:;;].]^)]]@,**,,,+&@@%###############################{,**(((                                            (~~~:==#+@@&~~{=======;];;$@+,,(((              ~~{='=''''''''==)-&,,,+>>&&@&@>>,,*(((     *~~^.'.''.'.''];$@+,*(                      *~~;'..'........^^&+,,++>&@@@@&>+,*(((                                                                                                                     ",
+"                                                                                       (* ,$;-]]!;@(  ~!##^.;;;;)-;%],*((**,,+~~~-##############################:-~,*(((                                         (~~{-===)&@@+~~:#======];;$@>,*((               (~~)=''='===^^@+++++++>+>>&>>>+,,**((      (~~_'''''''''..];$@,,((                      ~~_.....';';^$>++,++++>+>>>>>+,,,*(((                                                                                                                      ",
+"                                                                                       >@+*@!!!-!!;+( ~!##)^]$$))--%%$+((((**~~~~-########################=########!~***((                                      *~~~_#===>@@@~~{========]]$$>,**((               *~~=='=''$;$$$@>>++>>+>+>+++,,,,(*((       *~~='.'..'.'.''];$&+*((                    *~~~).....;;;$@@>>>>+>+>>>++++,,,((((        ,(                                                                                                              ",
+"                                                                                     +$);$ *]%!!!%]@, ~~##^;^;@;^-%%!!$*( ((~~{~:###############################=##=#-~,**(((                                  ~~~~!==##@&@@&~~)========];$@>,*(                 *~_='='=';;;$@&&+>++++++,,,,,*(((((       ~~~~''''''.''.'.];$&,,(                   (~~*~~'.....;;;$$@&>+++++,+,,,,,*(*(((       (~*  *                                                                                                            ",
+"                                                                                  (+@;!;;]+(&%]]]^];&((~##:^.]@+$%!%%];&( *~~~~:####''=####################=##=#######=-_~,*((                               *~~~~-====)&@@@_~~#========';$@+,((                ,~~%'=''''^];$@@>+++,,,,,***((((((       (,~~~-.'.'.''.''.'';$&+*((                (,~( *)...'..'';;$$@>+++,,,,,*,(*(((((        *~( *]>( (                                                                                                         ",
+"                                                                                  *@]!!%%!;(*;!%%%];$,(~%##^^^$,&]%%!!!]&~~~~~####/@;;=;###############=###########=#####:!{~,*(((                         *~~~~{:#=#=:@@$@&{~{==#======;;$@+,((             (*~*~~:'='='='$;$@>+,,,**(***(((((         *~~(~:''''''.''.''..]$@+,((              (~~~* {';-.......;;$@&+,,,,***(*((((((        (~~* >.+(((((                                                                                                        ",
+"                                                                                  *&]!!!!%!+(@;)-!%]]&((_##)^^;>+$-!%!!@~~~~!####!&@$$$$$^######################=#####=##=#=/!~,~**(                    (**~~~~%======@@@@@&,~_==========:>@+,(*           *,~~* {:'='='''='_&@+,,(**(((((((          (,~~ ~'''.'.'.''.'.''']$@>,((            (,~~*(~;.)~)........^&@&+,**(*(((((((          ,~~*($.>(**((((                                                                                                       ",
+"                                                                             (***  *$]]!-!-$,*$!!%!]!;,*+)##!@);$]!-_{~~~~{:###:+>@@@@$@@$$:#############=##=###=##=########=##/!~~,~,**(           (**~~~~~~%#=#=#=#@@$$@&+~~-=========='^,,,**((    ((*~~~~~*~:':'=''='=''')~++**((((((           (~~~*(-'=_''.''''.''.'.'.$@&,,*(        (*~~~~*,^.=+~~^.........;{,,,**((((((          (*~~~(_].>******((                                                                                                       ",
+"                                                                            ,+@$@+( &$]!!!!-@ +]-!!^!]@**$:##{~&&_{~~~~~!/####!{+&@@@@>>>>@@$:#####=###=#####=####=##=#=#=####=#=#:-!~~~~,~~,*****,~~~~~~~_-#======#$$$@@@>,~~:=============){~,~~,~,~~~~~~~~!^'=)~='='=''='='=!~~,*((((          *,~~~*{;''~!.'''.'.''.''.''.@>+,(((   (**,~~~~~{^..^,~~~^...........){~~*((((          (,~~~~*^..&**,,***((                                                                                                       ",
+"                                                                           ,$!-;];>(*$;%!]!!;>+$]!;]%%$+*>;###-{~~~~~{^#####/++>&@&&>+,,,,+&@@$=###############=####=#####=#=###=#=#=#::_!{~~~~~~~~~~~{!:#=#=#=#=#=$@$$$@&,*~~:==============':)_{~~~~~~__/:'=='_~!='''='=''''''=){~~~**(***(***~~~~~~_^''^,~_'.'.'''.'.'.'.''.)~~,,*,~~~~~~~~_-'...),,,~~..............^_,~~******(***~~~~~~{@..]>*,,,,,**((                                                                                                       ",
+"                                                                        *>$$%-!!-!;+(+$-!!!-!;$]!!%!%!]$,,$-:####:########:;@+&&&&&>+,*****,+&@@$=######=#=######=###=#=#=##=#=##=###=#=#=#=##::::::#=#=#=========$$$$$&>+***~:#=========='=========='='=='='==&,~_'='='''='='=''''=)_~~~~~~~~~~~~~{!='''^*,~%'''.'.'.''.''.'.'.'!~~~~~~~~_-^'....'+,,++,~'................^!{,~~~~~~~~~~~~!;....,,,+,,,**((                                                                                                        ",
+"                                                                      *+$;%%!!!!!!;$,*&]%%!!%!!]%%!]%%];&(>)]::#########::;$@>&&>>+,***(((**,,+&@$^=#=######=#=##=#=######=###=#=#=#=#=##=#==#=###=#==#===##=#=#=$$$$$@&,,*((~:=============='=='='===='=='='=&>&{~''''='=''''''='''''''^^!_!_!_-:='''''^++>~&'.'''''''.'.'.'.'...'.^:^^'.'....'.^++>>>++~^....................;^-&!&!&!^;......+++++,,,*(((                                                                                                        ",
+"                                                                     (@$;;^;;);;%!;;@ *$!]]];]!]]-!]])]-$,+$.]^:]:^@-$];;$@&>&>>+,,**((( ((((*,,+&@$^#####=#########=#=#=##==##=#=#=#=#==#=##=#==#=#=#=#=#=====;$;;$$@>+,*(((~!========'======'==='='='='==':@@@&>~:='='''='='''''''''''''''.'''''''.'.-+>>>+~''.'...'.'.'.'.'.''..'.......'.'.]@>&&&>>+,~-...................................;+>>&>++,*(((                                                                                                         ",
+"                                                                    ($!-!!!%;$$]!!!$;,(&]%%!!%%!]]%%%!)%]@,@^])^.^;&+@$$@&>>>>+,,,*(((     (((**,,>@@$==###=##=#=#=###=##=###=#=#=##=#=##=#==#=#=#=#=======#=#;;;$$$@&,,((( (({==========='===='==='===='='^$$@@@&_)''''='''='='='''''''''''''''''''''$&@&@&>~=.'''''.'.'.'.'.'.'.'.'.''.'.'..^@@@@@&>+,,*_..................................;&&@&&>+,**((                                                                                                          ",
+"                                                                    (@!!!%!!;+>$$%]]!$ ($!%%!!%]$&$)!-]!%$,&;]))]^;$+>&@&>++,,,**((((        (((**,++&@$;###=######=###=##=#=#=###=#=#=#==#=#=#===#==#=#=#==';;;;$$&>+,*((   (~:========'==='==='==='='==';;$$$@@>+{='=''=''''''''='''''''''''''.'.''@$@@@@>+~)'.'.'.''.''.'.'..'..'....'...'$$$@@@&&+,,**~;................................$$@@@@&+,**((                                                                                                           ",
+"                                                                     *]!]%!!;@+&$%^]!!*(>$)%]%%;$(*^!!]%!]@+$;--])]@+++,+,,,,,**(((            (((**,+&&$$==#=#=#=##=#=#=##=##=#==#=##=#=#=#=#=#=#==#====#']]];;$@@>,*(((    (*-==='========='==='==='='=;;;$$@&>,,~/''=''='='='''''=''''''''''''''=$$$$@@>+,,{''.'''.'.'.'.'.'.'.'.''.'..';;$$$$@@>+,*(*(*_...............................;$$$$@&+,,*((                                                                                                            ",
+"                                                               +,     @]]!!%%]@*$%%!%%@**@]%%!%];, $!!!!-!$&+;--];$>,,,,~,**(((((               (((**,,+>@@$==###=#=##=##=##=#=##=#===#=#=#==#=#==#==#=#']]];;$$@&+,,(*(      (*:====='========'==''===']];;$$&>+***+==''='''''''=''''''''''''.''';;;$$$@>+,**,)'.'.''.'.'.'.'.'..'...'.'';;;$$$@@>,,**((((*^............................];;$$$@&>,*(((                                                                                                             ",
+"                                                            *&;]@*    *$]]%!;]$,>;]]!]$, ,$%]%!]]$(*;%;]!];$,$%]@+,**(**(*(((((                    ((***,+>@@$;=####=##=#=#=#=#==#=##=#=#==#=#==#=#=#='.]]];$$@@&,,**(        **_========'=='==='===''.]];;$@&>,,*(**_''''='''=''''''''''''''''''];;;$$@&+,**(*,'''.'.'''.'.'.'.'.'.'...]]];;$$@&+,**((( ((*+'..........................]];;;$@&>,,*((                                                                                                              ",
+"                                                          *>@]!]$>(    >]$%-]%]@>]^;!]$* *&]^!!;%!+(&]]%%!%]@&$&,*(((((((((((                        ((**,,+&@@$;;#=#=#=#=#=##=##=#==#=#=#==#===#==='.]]];$$$@&+,,(((         ((,@===='==='=='=='='=..]];;$@&>,*((((*,-'=''='''''''''''''''''''..]];$$&>+***(((*&'.''...'.'.'.'.'..'.'.]]];$$@@&+,,*((   (((*>]........................]]];;@@@+,*(((                                                                                                               ",
+"                                                          +]%!!)!$,(   ($%!!!!!];%!%!;@*  ,$-%%]%!$,,$%%!!!]@,*(   ( ( (((                            (((**,,>>@@$$;==###=#=#=#==#=#=#==#=#=#=#=='..]]];;$$@&>+***(((          (*,)=========='====..]];;$@@>,,**( (((*,)''''='='''='''''''''''.]];;$@@>+,*((((((,-'.'''.'.'.'.'..'....]];;$$@&+,**(((      (*,&........................]];$$@&+,*(((                                                                                                                ",
+"                                                         (>]]!!!!;&*    *!-!];%))!];%$+    &;-%]]%]&(,;-!;;@*(                                          (((**,,+>@@$$$]==##=#=###=#=#=#=#==#=''..]]];;$$@@&>,,*(((             ((*+@=='=='='=='''.]]];$$@&+,,(((    (**+@'='''''''''''''''''.]]];;$@@+,*((((  ((*,@''.'.'.'..'.'.'.].]];$$@@>+,**((        ((*,@]....................]];;$$@>,,*(((                                                                                                                 ",
+"                                                     *    *$$;!;!!$,     @%%^]!-%%%];&*    *&]%%%%]$,($%;@+**                                             ((((*,,+>&@@$$;;;''===#==#=#==='..]]]];]$;$$@@&>,,**(((              (((,+&^======''.]]]];;$@@>+,*(((     ((*,+@^'''''''''''''''..]];;$@@>+,**((     ((,+@;'.'.''.'.'...]];;;$@@>+,**((          ((**+&$.................]]];$$@&+,**(((                                                                                                                  ",
+"                                                    ,&+   (>$%!]!-]@*    ,;!%!!!!%%$,       +;!!!%%%$ *$>,(                                                  (((**,,+&&@@$$$;;;]]]]]]]]]]];];;;;$$$@@@>>,,**((((                ((*,+&@$;;]]]];];$$$@@>+,**(((       ((*,+@$^''='''''''..]]]];$$@&>,,((((      (((,+&$^''.''.].]]];;$$@@&+,,(*(((            (*,+&@;............]]]];$$@@>,,**((                                                                                                                    ",
+"                                                  *&]]$*   *@]!];%!;+     @]];!]]]&         *&;]%%!];* *(                                                     ((((**,,++>&@@@$$$$$;;;;;;;$;$$$$@@@@>+,,,**(((                    ((*,+&@@$$$;$;$$$@@>+,,**((          (**,+@@$$=;]'.]]]]]];$$$@&>+,**((         ((*,+&@$$;;;;];;;$$$@@>+,,**((               ((*,+&@@;;]].].]]]]];;$$$@>+,,((((                                                                                                                     ",
+"                                                ,&$]!!-@,( (,$!;]$]]&*    *$)]!%!!$*         ,$]%%%]@*                                                           (((***,,++>>&&@@@@$@$@$@$@@@@&&>+,,,**((((                       ((*,,>@@@@@$@@@>>+,,*(((             ((*,+>@@$$;$;;;;;$$$$@@>+,**(((           ((*,+>@@$$$$$$$$@@&++,,*((((                 (((,,>@@$$;$;;;;;;$$$@@>+,,*(((                                                                                                                       ",
+"                                              ,>$]]!-!!]@*  *&!!!%!%;>*    ,!!%!!!]@*        (&]!]$,,(                                                             (((((***,,,+>&&>>>&&>>>>>++,,,,***(((((                        (((**,,+>>>>>++,,***(((              (((**++&@@@$$$$@$$@@>>,,**(((              (((,,+>&@@@@@&&>++,***((                      (**,+>&@@$$$$$@$@@@++,,**((                                                                                                                         ",
+"                                             (@]!!;]!;]!;>(  ,$]%%!-!$*    *@]!-%%]$+         ,@$>,                                                                   ((((*(*,*,*,,,,,,,,,,,,***(((((((                             (((***,,,,,,***(((                   ((**,,+>>>&&@&&>>+,,***(((                (((*,,,++>+++,,,***(((                       (((**,+>>>&&&@&>>+,,,(((((                                                                                                                          ",
+"                                             +]]!!]!!-;!]$>  (>;]!]]!;@*    *]%]]-];@,         ,*((                                                                     ( ((((((*(*(******(((((((((                                  ((((*(*(((*(((((                     ((((***,+,+,+,,,***((((                    (((*,*,*,**,((((((                           ((***,,+,+,+,,,,**((((                                                                                                                            ",
+"                                             *;$%%-!!!!!!];*  ,$]!%]%!$,     @]!!!%-;&          (                                                                           ((((((((((((((((((                                          ((((((((((                           ((**********(*((((                       ((((((*(*(((((                               ((((((***,(**((((((                                                                                                                              ",
+"                                             (@$]!]]!;]!];-@*((+$%%]!-;&*    ,$-]!]]]$*                                                                                            ( ( ( (                                                 ( (                                 (((((((((((((                            ( ((((((                                      ((((((((((((((                                                                                                                                ",
+"                                             (+$;!!!!;]!!]!]@* *&-!]!!!;+(    &^%%!!!;>(                                                                                                                                                                                         (  (  (                                                                                ( ( ( ( (                                                                                                                                   ",
+"                                              *$;%-!!;;]%^!-;&*(,;!]!!!-@,  ((,$!-!)!!;,                                                                                                                                                                                                                                                                                                                                                                                                                            ",
+"                                              (+;!];%;@$^]!!;$& (>^;%-;!;>*,+>,*]!!;%]&*                                                                                                                                                                             (                                                                                                                                                                                                                                              ",
+"                                               (;!!!!;@@;%!!]-]* ,$]!!;!!$>$;]&($%!;$>,                                           ~-%+   _%-*           ,*          _%-%+                       ,*    !-_                            ,%-!-%-%+                     _%-    +    {-_                                 !%-*  *-%-                                                  {-_                           ,!-_             ,*                    (!%-%%,                                                         ",
+"                                                @]!%%!$>@]!%!!!$,*>;!!!%!]]]!%$+,;$&,((                                            %!!  (!!{           (!*         (!!%!{                      (!*   *!!~                            ~!!!!!!!%                     _%!   ,!    ,{~                                (%!!~  ,!!%                                                  ,{~                           ~%!{            (!*                    ,!!_{{(                                                         ",
+"                                                *;]-!%$@+@]!]]!;+*,@]%;%-;]%-]]@*,,((                                              {!-( _!!  *+___+* *{!%{_,       {%_!%_  ~_+(___,  *_-%-_( *{!%_{, ~%%~___,  (~____,   __~+__(     {!-   {%%* *+___+*   ______,  !!_ ~_!!__(({_* (__*~__, *__+   *____,(        {!!!,  !%!-(  (~____,   *_____*  ~_____  *______(  (~_____, ({{* *__({__+   *+_____(       {!!, *__({__+ *{!%{_, (~____,   __,{_{~_%!~*( *______(  *_____* *+___+*                                ",
+"                                                *@;!!%]$*,]!]]!!$&,+$!!%!]]%!;;@*(                                                 ,!!~~%%* *!!!!!%! _%!%!!~      *%%*!%{  _!%!!!!! *%%!{!!! _!!!!!~ _!%!!!!%* !!!!!!!~ (!%!!!!      %!!   _!% *!!!!!%!   !!!!!!! *!%~(%!!!!! (!!~  !%!!!%%{!!!%{ +%!!!!%{        _%-!{ ,!!!%*  !!!!!!!~ *!!!!!%( +%!!!!_  *%!!!!%{ (!!!!!!!{ (%%~ *%!!!!!%~ ,!!!!!!%~       %!%  *%!!!!!%~_!!%!!~ !!!!!!!~ (!!!!!!!!%!!%* *%!!!!%{ ,!!!!!%~*!!!!!%!                                ",
+"                                                (>$-!!]!, $!!-!-!;&*@%!-!%]%]$>,                                                   *!%_!!+  {%!*~~%%~~!!!~*(      !!{ %!_  !!!~~!!- !!!( (!!~~%!!~*( !!!~*!%%(~!%~~*!!_ ~!!{~**     *%!_  (!-_ {%!*~~%%,  (*~*!!! ~%!~({!%{*, ~!!( ~%!{{_!!!{_!!{(%!{*~{%-       *%%_%_ _%%%%, ~!%~~*!!_ !%_     *!%~       **~~!!+ !!%{{{!!+ ~%!( {!%~~{%!**!!!{{_!!*      *!!!  {!%~~{!!~~!!!~*(~%!~~*!!_ ~!!{~*~{%%_{{   **~~!!{(!!!~~** {!!*~~%%,                               ",
+"                                                 *$;!%;;@>$!]!%!]!],,$;!%];;@,((                                                    !%!!!  *%%~  (%%*~!!*        ,%!( %!{ *!!~  _%_*%!~   %!~*%!*   (!!~  {!! !%_   _%{ _!!(        *%%!%-!%%~*%%~  (!!* *~*~*!!{ _%%  _!%    {!%  _!%( ~!!~ (%%{~%%(  ~%!       {!!{!{*!%{%!~ !!_   _!{ !%{     ~!!~      ,*~*~%!~~!!~  ~!%~ +!%  !!_  ~%%({%!(  _-!       ,!%_  !!_  {!!(~!!*   !%_   _%{ _!!(   ~!%*    ,*~*~!!*~%!~    *%%~  (!!*                               ",
+"                                                  >;%%$]]$]%!]%%-!!$,@]!!;@,*                                                       {%!%*  {%!%%%!!! {%%(       (!!{  -%_ ~%!*  %%{{!!    %!~{%%(   ~%!*  !%_*!%%-%!%!* !!!         {!%%!%%!{ {%%%%%%%% {!!!!!!%, !!!  !-_    _!_  !%_  {%!  ~!!~!%!%%%%!_       !!~{!!_!{{%!**%%%-%%%%* %!-!_*  ~!%%_+(  !!!!%!%!(_%!   {%%  {!_ (!%+  {%%(%!{   !!_       {-!, (!%+  {!% {%%(  *!%%-%!%!* !!!    {%%    !!!!%%%%({%%     {%%%%%%%%                                ",
+"                                                  ,;!!%!!%-!%]!%%!%!@+$;$&,                                                         *%%{   _!!{{{_{{ _!!        {%!{_{!!! _%!  ,!%~!!{   ,!! _%!    _!!   %!~~!!{{{{_{( %!{         !!! _%!   {!!{{{{{{ !!!~~{%%~ %!_ (%!{    -!{ (!!{  !!_  {!! %!!{{{{{~      ,!!(~%%!%(~!%~*!!{{{{_{( +!!!%%* (_%!%%!(*%%{~~!%% %%{   %!_  -!{ *%!~  %!{~!!~  ,!!~       %!!( ~!!~  %!{ _%!   *%!{{{{_{( %!{    !%{   ,!!!*~!%! %%{     _!!{{{{{{                                ",
+"                                                   @]%]]!^!!;$%%]];];@++*(                                                          {%!,   !%{       %%_       *!!%%!!!!- !%_  ~!!(!!,   _!! !!_    !!_  ~!!~{%%       ~!!,        (!!_ {%!,  !!{      *%!*  {!% *!%, ~%!,   *!!* ~%%,  !%+  !%_~!!~            {!_ ~!!%_ ~!!~{!%          ~_%%_   (~!!%~{%!   %%{~!!,  *!%+ *!!, {%%  (%%~{%%   {%%*      (!!!  {!%  (%%, !!_   {!%       ~!!,   (!!,   {!!   %%{(%%+     !!{                                      ",
+"                                                   ,;%!%!]%;&&]!%%!;$>((                                                            !!!    %!{    * ,!!~  (    _%_~*~*%!!(!!~  _!! !!~  *%!{*%%~  ((!!~  {!! {!%    (* +!!*        ,!%{ *%%{  -%{    * {!%   -!! ,!%* _!%(  (~%%( _!!( ,!!~ (%%{*!%*    *      (%-~ ~!%%* ~!!~{%%    (*     (%!{     ~%!~!!{  ,!%~~!%_ (_!%~ ~%!( _!_  *%%*{!%~ *!!%       ~!!{  _!!  *%%*~%%~  (_!-    (* +!!*   ~%!*   !!{  ,!!~~!%{    (%!{    *                                 ",
+"                                                   (@!%%!^!$**>]--;@+*                                                             (!%_    !-%__{__ ~!%{~,*   ~%%*    %%!~!-*  !!_ %!{((_%%(~%!+~~*~%%*  _%_ {%%____!  {!%         {!!,  %%%, !%%__{__ {%%_{{!!_ {!%  _!%*~+ {!-  !!!  {%%  ~!!*~%!!____,      ~%%( ~!!!  ~!%*{%%_____ ,   ({!!~,   *!!! !!%{{_!!~(!%%%!!!%  {%%  %%+  {%! {%%%%_!!_       {%!,  !!+  {!% ~!!+~~*{%%____!  {!%    {%%    !!%{{_%%*~!!!,~_{*!%-__{__                                 ",
+"                                                    >]]!%]]], *@$$&,(                                                              *%%_    _!!!!%!~ _!%!!%    !!{     %%%{!!  *%%* +!%%%%!* _%%!!! ,%!   %-{ *%%%!!!{  -%{         !!!   _%!! _!%!!!!~ +!%%%{%!~ %%_  %%%!!{ !!{ *!!{  _!_  _!%( %%!!!!!       !!_  (!!~  *%!~*%%%!!%{ _%-%!%!!(!%-!!%!{ !!%%!_!%  {%%%~!!!  !!{ ,!%~  !!{ (!!%!~%%~       !!%( ,!!~  !%{ _%%!!! ~!%%!!!{  -%{    !%{    !!%%!{%%  !!%%!%! _!!!!%!~                                 ",
+"                                                    (+!%%!!]@*(,+,(                                                                ~{{,    ({{{{{+  ~{{{{,   ({{,     {{{~{_  *{{~  *{{{~   ~{{{{, ~{_   {{*  ~{{{{_(  {{,         {{_   ~{{, ({{{{{+  ({{{~*{{* {{+  {{{{{* {{, ({{,  {{+  ~{{( *{{{{{,       {{,   {_   *{{~ ~{{{{_( {{{{{{~ ({{{{{{*  *{{{({{_ *    *!!+  ~_~ *{{*  {{+ *    {%%*       {{{( *{{*  {{+ ~{{{_~  ~{{{{_(  {{,    {{,    *{{{({{_  ({{{{{* ({{{{{+                                  ",
+"                                                      $-!]!!$, ((                                                                                                                                                                                                                                                                                                 %%-!%%%!*               *%%-%%!-!                                                                                                                 ",
+"                                                      +]%];;@*                                                                                                                                                                                                                                                                                                    !!%%!%!~                *!!%%!!!(                                                                                                                 ",
+"                                                       ^!!;>*(                                                                                                                                                                                                                                                                                                    (*~*~*                   **~*~(                                                                                                                   ",
+"                                                       @;>,*                                                                                                                                                                                                                                                                                                                                                                                                                                                        ",
+"                                                       (,(                                                                                                                                                                                                                                                                                                                                                                                                                                                          ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    "};
diff --git a/lisp/queue-m.el b/lisp/queue-m.el
new file mode 100644 (file)
index 0000000..3a8be04
--- /dev/null
@@ -0,0 +1,141 @@
+;;;; $Id: queue-m.el,v 1.1 1999/02/13 20:29:15 daiki Exp $
+;;;; This file implements a simple FIFO queue using macros.
+
+;; Copyright (C) 1991-1995 Free Software Foundation
+
+;; Author: Inge Wallin <inge@lysator.liu.se>
+;; Maintainer: elib-maintainers@lysator.liu.se
+;; Created: before 12 May 1991
+;; Keywords: extensions, lisp
+
+;;;;
+;;;; This file is part of the GNU Emacs lisp library, Elib.
+;;;;
+;;;; GNU Elib 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, or (at your option)
+;;;; any later version.
+;;;;
+;;;; GNU Elib 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 GNU Elib; see the file COPYING.  If not, write to
+;;;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;;;; Boston, MA 02111-1307, USA
+;;;;
+;;;; Author: Inge Wallin
+;;;; 
+
+;;; Commentary:
+
+;;; The queue is implemented as a two cons cell list, the first 
+;;; containing the tag 'QUEUE.  The car of the the second cons
+;;; cell points at the first element of the queue and the cdr points
+;;; at the last.  All entries and removals are done using destructive
+;;; functions.
+;;;
+;;; This file implements the short functions as macros for speed in 
+;;; compiled code.
+;;;
+
+
+;;; Code:
+
+;; Provide the function version and remove the macro version
+(provide 'queue-m)
+(setq features (delq 'queue-f features))
+
+
+;;; ================================================================
+
+
+(defmacro queue-create ()
+  "Create an empty fifo queue."
+  (` (cons 'QUEUE (cons nil nil))))
+
+
+(defmacro queue-p (queue)
+  "Return t if QUEUE is a queue, otherwise return nil."
+  (` (eq (car-safe (, queue)) 'QUEUE)))
+
+
+(defun queue-enqueue (queue element)
+  "Enter an element into a queue.
+Args: QUEUE ELEMENT"
+  (let ((elementcell (cons element nil)))
+    (if (null (car (cdr queue)))
+       ;; QUEUE is empty
+       (setcar (cdr queue)
+               (setcdr (cdr queue) 
+                       elementcell))
+      (setcdr (cdr (cdr queue))
+             elementcell)
+      (setcdr (cdr queue)
+             elementcell))))
+
+
+(defun queue-dequeue (queue)
+  "Remove the first element of QUEUE and return it.
+If QUEUE is empty, return nil and do nothing."
+  (if (not (null (car (cdr queue))))
+      (prog1
+         (car (car (cdr queue)))
+       (setcar (cdr queue)
+               (cdr (car (cdr queue))))
+       (if (null (car (cdr queue)))
+           (setcdr (cdr queue) nil)))))
+
+
+(defmacro queue-empty (queue)
+  "Return t if QUEUE is empty, otherwise return nil."
+  (` (null (car (cdr (, queue))))))
+
+
+(defmacro queue-first (queue)
+  "Return the first element of QUEUE or nil if it is empty.
+The element is not removed."
+  (` (car-safe (car (cdr (, queue))))))
+
+
+(defmacro queue-nth (queue n)
+  "Return the nth element of a queue, but don't remove it.
+Args: QUEUE N
+If the length of the queue is less than N, return nil.
+
+The oldest element (the first one) has number 0."
+  (` (nth (, n) (car (cdr (, queue))))))
+
+
+(defmacro queue-last (queue)
+  "Return the last element of QUEUE or nil if it is empty."
+  (` (car-safe (cdr (cdr (, queue))))))
+
+
+(defmacro queue-all (queue)
+  "Return a list of all elements of QUEUE or nil if it is empty.
+The oldest element in the queue is the first in the list."
+  (` (car (cdr (, queue)))))
+
+
+(defun queue-copy (queue)
+  "Return a copy of QUEUE.  All entries in QUEUE are also copied."
+  (let* ((first  (copy-sequence (car (cdr queue))))
+        (last first))
+    (while (cdr last)
+      (setq last (cdr last)))
+    (cons 'QUEUE (cons first last))))
+
+
+(defmacro queue-length (queue)
+  "Return the number of elements in QUEUE."
+  (` (length (car (cdr (, queue))))))
+
+
+(defmacro queue-clear (queue)
+  "Remove all elements from QUEUE."
+  (` (setcdr (, queue) (cons nil nil))))
+
+;;; queue-m.el ends here