mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Massively overhaul the debian packaging to bring it up to 0.8.10rc5
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3855 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
a06efdc97c
commit
ae62c8f9c7
97
debian/botti.1
vendored
Normal file
97
debian/botti.1
vendored
Normal file
@ -0,0 +1,97 @@
|
||||
.\" This -*- nroff -*- file has been generated from
|
||||
.\" DocBook SGML with docbook-to-man on Debian GNU/Linux.
|
||||
...\"
|
||||
...\" transcript compatibility for postscript use.
|
||||
...\"
|
||||
...\" synopsis: .P! <file.ps>
|
||||
...\"
|
||||
.de P!
|
||||
\\&.
|
||||
.fl \" force out current output buffer
|
||||
\\!%PB
|
||||
\\!/showpage{}def
|
||||
...\" the following is from Ken Flowers -- it prevents dictionary overflows
|
||||
\\!/tempdict 200 dict def tempdict begin
|
||||
.fl \" prolog
|
||||
.sy cat \\$1\" bring in postscript file
|
||||
...\" the following line matches the tempdict above
|
||||
\\!end % tempdict %
|
||||
\\!PE
|
||||
\\!.
|
||||
.sp \\$2u \" move below the image
|
||||
..
|
||||
.de pF
|
||||
.ie \\*(f1 .ds f1 \\n(.f
|
||||
.el .ie \\*(f2 .ds f2 \\n(.f
|
||||
.el .ie \\*(f3 .ds f3 \\n(.f
|
||||
.el .ie \\*(f4 .ds f4 \\n(.f
|
||||
.el .tm ? font overflow
|
||||
.ft \\$1
|
||||
..
|
||||
.de fP
|
||||
.ie !\\*(f4 \{\
|
||||
. ft \\*(f4
|
||||
. ds f4\"
|
||||
' br \}
|
||||
.el .ie !\\*(f3 \{\
|
||||
. ft \\*(f3
|
||||
. ds f3\"
|
||||
' br \}
|
||||
.el .ie !\\*(f2 \{\
|
||||
. ft \\*(f2
|
||||
. ds f2\"
|
||||
' br \}
|
||||
.el .ie !\\*(f1 \{\
|
||||
. ft \\*(f1
|
||||
. ds f1\"
|
||||
' br \}
|
||||
.el .tm ? font underflow
|
||||
..
|
||||
.ds f1\"
|
||||
.ds f2\"
|
||||
.ds f3\"
|
||||
.ds f4\"
|
||||
'\" t
|
||||
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
|
||||
.TH "botti" "1"
|
||||
.SH "NAME"
|
||||
botti \(em Run an irssi module, such as a bot, without a UI
|
||||
.SH "SYNOPSIS"
|
||||
.PP
|
||||
\fBbotti\fP [\fB\fIOPTIONS\fP\fP]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
This manual page documents briefly the
|
||||
\fBbotti\fP command.
|
||||
.PP
|
||||
Botti allows for you to run an irssi module without a UI.
|
||||
This is most useful for bots, and by default botti will load the
|
||||
"bot" module.
|
||||
.PP
|
||||
This manual page was written for the \fBDebian\fP distribution
|
||||
because the original program does not have a manual page.
|
||||
.SH "OPTIONS"
|
||||
.IP "\fB--config\fP " 10
|
||||
Specify the configuration file location. By default,
|
||||
it is ~/.irssi/config.
|
||||
.IP "\fB--home\fP " 10
|
||||
Specify the irssi home directory location. By default,
|
||||
it is ~/.irssi.
|
||||
.IP "\fB-l\fP \fB--load\fP " 10
|
||||
Specify a module to load. By default, it is "bot".
|
||||
.IP "\fB--session\fP " 10
|
||||
Option used by the /UPGRADE command.
|
||||
.IP "\fB-?\fP \fB--help\fP " 10
|
||||
Print instructions.
|
||||
.IP "\fB--usage\fP " 10
|
||||
Print simple usage instructions.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
This manual page was written by David Nusinow \<david_nusinow@yahoo.com\> for
|
||||
the \fBDebian\fP system (but may be used by others). Permission is
|
||||
granted to copy, distribute and/or modify this document under
|
||||
the terms of the GNU Free Documentation
|
||||
License, Version 1.1 or any later version published by the Free
|
||||
Software Foundation; with no Invariant Sections, no Front-Cover
|
||||
Texts and no Back-Cover Texts.
|
||||
...\" created by instant / docbook-to-man, Thu 24 Apr 2003, 02:34
|
72
debian/changelog
vendored
72
debian/changelog
vendored
@ -1,72 +1,6 @@
|
||||
irssi-text (0.7.98.3-2) unstable; urgency=low
|
||||
irssi (0.8.10~rc5-1) unstable; urgency=low
|
||||
|
||||
* Made perl support ready for perl 5.6.1, thanks to Branden O'Dea
|
||||
(closes: #95535)
|
||||
* Initial packaging to unify irssi-text and irssi-snapshot
|
||||
|
||||
-- Pekka Aleksi Knuutila <pa@debian.org> Sun, 20 May 2001 15:02:42 +0300
|
||||
|
||||
irssi-text (0.7.98.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream release (closes: #90139)
|
||||
* Include the libfe_perl files (closes: #90189)
|
||||
|
||||
-- Pekka Aleksi Knuutila <pa@debian.org> Mon, 19 Mar 2001 17:17:25 +0200
|
||||
|
||||
irssi-text (0.7.98.1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
* Recompiled with perl-5.6 (closes: #86157)
|
||||
* Added alternative for irssi(1) man-page (closes: #80845)
|
||||
|
||||
-- Pekka Aleksi Knuutila <pa@debian.org> Fri, 23 Feb 2001 16:48:43 +0200
|
||||
|
||||
irssi-text (0.7.97.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Pekka Aleksi Knuutila <pa@debian.org> Tue, 19 Dec 2000 15:22:56 +0200
|
||||
|
||||
irssi-text (0.7.97.1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Pekka Aleksi Knuutila <pa@debian.org> Wed, 6 Dec 2000 21:40:44 +0200
|
||||
|
||||
irssi-text (0.7.97-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Pekka Aleksi Knuutila <pa@debian.org> Sun, 3 Dec 2000 21:35:03 +0200
|
||||
|
||||
irssi-text (0.7.96-2) unstable; urgency=low
|
||||
|
||||
* Added startup-howto to /usr/share/doc
|
||||
* Applied 0.7.96-2 bugfixes from upstream
|
||||
|
||||
-- Pekka Aleksi Knuutila <pa@debian.org> Mon, 30 Oct 2000 17:48:34 +0200
|
||||
|
||||
irssi-text (0.7.96-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Pekka Aleksi Knuutila <pa@debian.org> Thu, 19 Oct 2000 23:22:54 +0300
|
||||
|
||||
irssi-text (0.7.95-2) unstable; urgency=medium
|
||||
|
||||
* Applied patch to fix remote crash
|
||||
|
||||
-- Pekka Aleksi Knuutila <pa@debian.org> Wed, 23 Aug 2000 10:21:36 +0300
|
||||
|
||||
irssi-text (0.7.95-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
* Fixed debian/rules clean (closes: Bug#69105)
|
||||
|
||||
-- Pekka Aleksi Knuutila <pa@debian.org> Sun, 13 Aug 2000 22:03:53 +0300
|
||||
|
||||
irssi-text (0.7.94-1) unstable; urgency=low
|
||||
|
||||
* Initial release
|
||||
|
||||
-- Pekka Aleksi Knuutila <pa@debian.org> Wed, 26 Jul 2000 21:40:40 +0300
|
||||
-- David Pashley <david@davidpashley.com> Sun, 10 Jul 2005 15:11:38 +0300
|
||||
|
||||
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
||||
4
|
1
debian/conffiles
vendored
1
debian/conffiles
vendored
@ -1 +0,0 @@
|
||||
/etc/irssi.conf
|
51
debian/control
vendored
51
debian/control
vendored
@ -1,15 +1,13 @@
|
||||
Source: irssi-text
|
||||
Source: irssi
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Pekka Aleksi Knuutila <pa@debian.org>
|
||||
Standards-Version: 3.1.0
|
||||
Build-Depends: libglib1.2-dev, perl (>= 5.6.0-16), libperl-dev, libncurses5-dev, debhelper (>= 3.0.18)
|
||||
Maintainer: David Pashley <david@davidpashley.com>
|
||||
Build-Depends: debhelper (>= 4.0.0), autotools-dev
|
||||
Standards-Version: 3.6.2
|
||||
|
||||
Package: irssi-text
|
||||
Package: irssi
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}
|
||||
Suggests: ${perl:Depends}
|
||||
Conflicts: irssi
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: text-mode version of the irssi IRC client
|
||||
Irssi is an IRC client from the author of yagirc, Timo Sirainen. It has a
|
||||
text, GTK and GNOME interface (with integration to the GNOME panel).
|
||||
@ -18,8 +16,37 @@ Description: text-mode version of the irssi IRC client
|
||||
.
|
||||
This package includes the text-mode version of the irssi client.
|
||||
.
|
||||
Other irssi packages are:
|
||||
irssi-common: common files for the irssi IRC client
|
||||
irssi-gtk: GTK version of the irssi IRC client
|
||||
irssi-gnome: GNOME version of the irssi IRC client
|
||||
The GTK and GNOME versions of irssi haven't been developed since early
|
||||
2000, and currently lack much of irssi-text's functionality.
|
||||
|
||||
Package: irssi-dev
|
||||
Architecture: any
|
||||
Depends: irssi
|
||||
Description: text-mode version of the irssi IRC client development files
|
||||
Irssi is an IRC client from the author of yagirc, Timo Sirainen. It has a
|
||||
text, GTK and GNOME interface (with integration to the GNOME panel).
|
||||
Irssi's features include configurability, smart nick completion, DCC resuming,
|
||||
support for plugins and perl scripting.
|
||||
.
|
||||
This package includes the development files for the irssi client.
|
||||
|
||||
Package: irssi-text
|
||||
Architecture: any
|
||||
Depends: irssi
|
||||
Description: irssi dummy transition package
|
||||
This is a dummy transition package from irssi-text and is safe to
|
||||
remove.
|
||||
|
||||
Package: irssi-snapshot
|
||||
Architecture: any
|
||||
Depends: irssi
|
||||
Description: irssi dummy transition package
|
||||
This is a dummy transition package from irssi-snapshot and is safe to
|
||||
remove.
|
||||
|
||||
Package: irssi-snapshot-dev
|
||||
Architecture: any
|
||||
Depends: irssi-dev
|
||||
Description: irssi dummy transition package
|
||||
This is a dummy transition package from irssi-snapshot-dev and is safe
|
||||
to remove.
|
||||
|
94
debian/copyright
vendored
94
debian/copyright
vendored
@ -1,28 +1,86 @@
|
||||
This package was debianized by Pekka Aleksi Knuutila <pa@debian.org> on
|
||||
Wed, 26 Jul 2000 21:40:40 +0300
|
||||
License
|
||||
=======
|
||||
|
||||
The source for the package can be found from http://www.irssi.org/
|
||||
|
||||
Upstream Author(s): Timo Sirainen <tss@iki.fi>
|
||||
|
||||
Copyright:
|
||||
|
||||
Copyright (C) 1999 Timo Sirainen
|
||||
src/fe-text/irssi.c includes:
|
||||
|
||||
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.
|
||||
A copy of the GPL can be found in /usr/share/common-licenses/GPL-2
|
||||
|
||||
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
|
||||
COPYING includes the following addition to the GPL:
|
||||
|
||||
Specific permission is granted for the GPLed code in this
|
||||
distribition to be linked to OpenSSL without invoking GPL clause
|
||||
2(b).
|
||||
|
||||
On Debian GNU/Linux systems, the complete text of the GNU General
|
||||
Public License can be found in /usr/share/common-licenes/GPL
|
||||
Sources
|
||||
=======
|
||||
|
||||
The source was obtained from http://www.irssi.org/files/
|
||||
|
||||
Copyright
|
||||
=========
|
||||
|
||||
AUTHORS contains:
|
||||
|
||||
Original code:
|
||||
|
||||
Timo Sirainen <cras@irssi.org>
|
||||
|
||||
Large feature patches by:
|
||||
|
||||
David Leadbeater (dg, dgl) : isupport
|
||||
vjt@users.sf.net : SSL support
|
||||
Joel Eriksson : SSL certs
|
||||
Heikki Orsila : DCC SEND queueing
|
||||
Mark Trumbull : DCC SERVER
|
||||
Francesco Fracassi : Passive DCC
|
||||
|
||||
Other patches (grep for "patch" in ChangeLog) by:
|
||||
|
||||
Joost Vunderink
|
||||
Wang WenRui
|
||||
Valentin Batz
|
||||
Jochen Eisinger (c0ffee)
|
||||
Jean-Yves Lefort
|
||||
Joel Eriksson
|
||||
Maarten van der Zwaart
|
||||
Noah Levitt
|
||||
Wouter Coekaerts (coekie)
|
||||
Krzysztof Kowalik (Borys)
|
||||
Peder Stray
|
||||
mls@suse.de
|
||||
nix@suhs.nu
|
||||
Marcin Kowalczyk (Qrczak)
|
||||
Petr Baudis
|
||||
Bjoern Krombholz (fuchs)
|
||||
aldem-irssi@aldem.net,
|
||||
BC-bd
|
||||
Juerd
|
||||
Han
|
||||
pv2b
|
||||
Tommi Komulainen (tommik)
|
||||
mike@po.cs.msu.su
|
||||
zinx@magenet.net
|
||||
yathen@web.de
|
||||
paul@raade.org
|
||||
Leszek Matok
|
||||
tygrys@moo.pl
|
||||
manoj@io.com
|
||||
cph@cph.demon.co.uk
|
||||
ganesh@earth.li
|
||||
Jakub Jankowski (shasta)
|
||||
vanilla@freebsd.org
|
||||
Tinuk
|
||||
Mark Glines
|
||||
Kjetil Ødegaard
|
||||
|
||||
Debian Packaging
|
||||
================
|
||||
|
||||
This packaging was written by David Pashley <david@davidpashley.com> and
|
||||
contains ideas and code from previous irssi packaging by Pekka Aleksi
|
||||
Knuutila <pa@debian.org>.
|
||||
|
3
debian/dirs
vendored
3
debian/dirs
vendored
@ -1,3 +0,0 @@
|
||||
etc
|
||||
usr/bin
|
||||
usr/share/irssi/scripts
|
1
debian/irssi-dev.install
vendored
Normal file
1
debian/irssi-dev.install
vendored
Normal file
@ -0,0 +1 @@
|
||||
debian/tmp/usr/include
|
3
debian/irssi.docs
vendored
Normal file
3
debian/irssi.docs
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
NEWS
|
||||
README
|
||||
TODO
|
7
debian/irssi.install
vendored
Normal file
7
debian/irssi.install
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
debian/tmp/etc/irssi.conf
|
||||
debian/tmp/usr/bin/botti
|
||||
debian/tmp/usr/bin/irssi
|
||||
debian/tmp/usr/lib/irssi/
|
||||
debian/tmp/usr/lib/perl5/
|
||||
debian/tmp/usr/share/doc/irssi/
|
||||
debian/tmp/usr/share/irssi/
|
2
debian/irssi.manpages
vendored
Normal file
2
debian/irssi.manpages
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
debian/botti.1
|
||||
debian/tmp/usr/share/man/man1/irssi.1
|
2
debian/irssi.menu
vendored
Normal file
2
debian/irssi.menu
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
?package(irssi-text):needs="text" section="Apps/Net" \
|
||||
title="irssi-text" command="/usr/bin/irssi-text"
|
3
debian/postinst → debian/irssi.postinst
vendored
3
debian/postinst → debian/irssi.postinst
vendored
@ -6,3 +6,6 @@ update-alternatives --install /usr/bin/irssi irssi /usr/bin/irssi-text 30 \
|
||||
--slave /usr/share/man/man1/irssi.1.gz irssi.1.gz \
|
||||
/usr/share/man/man1/irssi-text.1.gz
|
||||
|
||||
update-alternatives --install /usr/bin/irc irc /usr/bin/irssi 19 \
|
||||
--slave /usr/share/man/man1/irc.1.gz irc.1 \
|
||||
/usr/share/man/man1/irssi.1.gz
|
2
debian/prerm → debian/irssi.prerm
vendored
2
debian/prerm → debian/irssi.prerm
vendored
@ -4,5 +4,5 @@
|
||||
|
||||
if [ "$1" != "upgrade" ]; then
|
||||
update-alternatives --remove irssi /usr/bin/irssi-text
|
||||
update-alternatives --remove irc /usr/bin/irssi
|
||||
fi
|
||||
|
2
debian/menu
vendored
2
debian/menu
vendored
@ -1,2 +0,0 @@
|
||||
?package(irssi-text):needs=text section=Apps/Net\
|
||||
title="irssi-text" command="/usr/bin/irssi-text"
|
3
debian/patches/00list
vendored
Normal file
3
debian/patches/00list
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
01glib-errors
|
||||
02tr_TR
|
||||
03sigtstp
|
21
debian/patches/01glib-errors.dpatch
vendored
Executable file
21
debian/patches/01glib-errors.dpatch
vendored
Executable file
@ -0,0 +1,21 @@
|
||||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 01glib-errors.dpatch by David Pashley <david@davidpashley.com>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad --exclude=CVS --exclude=.svn ./src/fe-common/core/fe-common-core.c /tmp/dpep-work.Z3VDTJ/irssi-0.8.10~rc5/src/fe-common/core/fe-common-core.c
|
||||
--- ./src/fe-common/core/fe-common-core.c 2004-08-20 03:02:29.000000000 +0300
|
||||
+++ /tmp/dpep-work.Z3VDTJ/irssi-0.8.10~rc5/src/fe-common/core/fe-common-core.c 2005-07-15 21:57:54.000000000 +0300
|
||||
@@ -430,6 +430,10 @@
|
||||
(GLogLevelFlags) (G_LOG_LEVEL_CRITICAL |
|
||||
G_LOG_LEVEL_WARNING),
|
||||
(GLogFunc) glog_func, NULL);
|
||||
+ g_log_set_handler("GLib",
|
||||
+ (GLogLevelFlags) (G_LOG_LEVEL_CRITICAL |
|
||||
+ G_LOG_LEVEL_WARNING),
|
||||
+ (GLogFunc) glog_func, NULL);
|
||||
|
||||
if (setup_changed)
|
||||
signal_emit("setup changed", 0);
|
24
debian/patches/02tr_TR.dpatch
vendored
Executable file
24
debian/patches/02tr_TR.dpatch
vendored
Executable file
@ -0,0 +1,24 @@
|
||||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 02tr_TR.dpatch by David Pashley <david@davidpashley.com>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad --exclude=CVS --exclude=.svn ./src/perl/perl-common.c /tmp/dpep-work.uNmkb9/irssi-0.8.10~rc5/src/perl/perl-common.c
|
||||
--- ./src/perl/perl-common.c 2004-01-20 12:08:41.000000000 +0200
|
||||
+++ /tmp/dpep-work.uNmkb9/irssi-0.8.10~rc5/src/perl/perl-common.c 2005-07-15 22:10:34.000000000 +0300
|
||||
@@ -566,8 +566,13 @@
|
||||
chat_type = chat_protocol_lookup(rec->name);
|
||||
g_return_if_fail(chat_type >= 0);
|
||||
|
||||
+#if GLIB_MAJOR_VERSION < 2
|
||||
name = g_strdup(rec->name);
|
||||
g_strdown(name+1);
|
||||
+#else
|
||||
+ name = g_ascii_strdown(rec->name,-1);
|
||||
+ *name = *(rec->name);
|
||||
+#endif
|
||||
|
||||
/* window items: channel, query */
|
||||
type = module_get_uniq_id_str("WINDOW ITEM TYPE", "CHANNEL");
|
694
debian/patches/03sigtstp.dpatch
vendored
Executable file
694
debian/patches/03sigtstp.dpatch
vendored
Executable file
@ -0,0 +1,694 @@
|
||||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 03sigtstp.dpatch by David Pashley <david@davidpashley.com>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad --exclude=CVS --exclude=.svn ./src/fe-text/term-curses.c /tmp/dpep-work.uTVMh2/irssi-0.8.10~rc5/src/fe-text/term-curses.c
|
||||
--- ./src/fe-text/term-curses.c 2002-02-17 17:42:07.000000000 +0200
|
||||
+++ /tmp/dpep-work.uTVMh2/irssi-0.8.10~rc5/src/fe-text/term-curses.c 2005-07-15 22:26:23.000000000 +0300
|
||||
@@ -362,7 +362,7 @@
|
||||
void term_stop(void)
|
||||
{
|
||||
term_deinit_int();
|
||||
- kill(getpid(), SIGSTOP);
|
||||
+ kill(getpid(), SIGTSTP);
|
||||
term_init_int();
|
||||
irssi_redraw();
|
||||
}
|
||||
diff -urNad --exclude=CVS --exclude=.svn ./src/fe-text/term-terminfo.c /tmp/dpep-work.uTVMh2/irssi-0.8.10~rc5/src/fe-text/term-terminfo.c
|
||||
--- ./src/fe-text/term-terminfo.c 2004-05-14 15:24:23.000000000 +0300
|
||||
+++ /tmp/dpep-work.uTVMh2/irssi-0.8.10~rc5/src/fe-text/term-terminfo.c 2005-07-15 22:26:23.000000000 +0300
|
||||
@@ -543,10 +543,10 @@
|
||||
void term_stop(void)
|
||||
{
|
||||
if (term_detached) {
|
||||
- kill(getpid(), SIGSTOP);
|
||||
+ kill(getpid(), SIGTSTP);
|
||||
} else {
|
||||
terminfo_stop(current_term);
|
||||
- kill(getpid(), SIGSTOP);
|
||||
+ kill(getpid(), SIGTSTP);
|
||||
terminfo_cont(current_term);
|
||||
irssi_redraw();
|
||||
}
|
||||
diff -urNad --exclude=CVS --exclude=.svn ./src/fe-text/term-terminfo.c.orig /tmp/dpep-work.uTVMh2/irssi-0.8.10~rc5/src/fe-text/term-terminfo.c.orig
|
||||
--- ./src/fe-text/term-terminfo.c.orig 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ /tmp/dpep-work.uTVMh2/irssi-0.8.10~rc5/src/fe-text/term-terminfo.c.orig 2004-05-14 15:24:23.000000000 +0300
|
||||
@@ -0,0 +1,655 @@
|
||||
+/*
|
||||
+ term-terminfo.c : irssi
|
||||
+
|
||||
+ Copyright (C) 2001 Timo Sirainen
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, write to the Free Software
|
||||
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+*/
|
||||
+
|
||||
+#include "module.h"
|
||||
+#include "signals.h"
|
||||
+#include "term.h"
|
||||
+#include "terminfo-core.h"
|
||||
+#include "utf8.h"
|
||||
+
|
||||
+#include <signal.h>
|
||||
+
|
||||
+/* returns number of characters in the beginning of the buffer being a
|
||||
+ a single character, or -1 if more input is needed. The character will be
|
||||
+ saved in result */
|
||||
+typedef int (*TERM_INPUT_FUNC)(const unsigned char *buffer, int size,
|
||||
+ unichar *result);
|
||||
+
|
||||
+struct _TERM_WINDOW {
|
||||
+ /* Terminal to use for window */
|
||||
+ TERM_REC *term;
|
||||
+
|
||||
+ /* Area for window in terminal */
|
||||
+ int x, y;
|
||||
+ int width, height;
|
||||
+};
|
||||
+
|
||||
+TERM_WINDOW *root_window;
|
||||
+
|
||||
+static char *term_lines_empty; /* 1 if line is entirely empty */
|
||||
+static int vcmove, vcx, vcy, curs_visible;
|
||||
+static int crealx, crealy, cforcemove;
|
||||
+static int curs_x, curs_y;
|
||||
+static int auto_detach;
|
||||
+
|
||||
+static int last_fg, last_bg, last_attrs;
|
||||
+
|
||||
+static int redraw_needed, redraw_tag;
|
||||
+static int freeze_counter;
|
||||
+
|
||||
+static TERM_INPUT_FUNC input_func;
|
||||
+static unsigned char term_inbuf[256];
|
||||
+static int term_inbuf_pos;
|
||||
+
|
||||
+/* SIGCONT handler */
|
||||
+static void sig_cont(int p)
|
||||
+{
|
||||
+ redraw_needed = TRUE;
|
||||
+ terminfo_cont(current_term);
|
||||
+}
|
||||
+
|
||||
+static int redraw_timeout(void)
|
||||
+{
|
||||
+ if (redraw_needed) {
|
||||
+ irssi_redraw();
|
||||
+ redraw_needed = FALSE;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+int term_init(void)
|
||||
+{
|
||||
+ struct sigaction act;
|
||||
+ int width, height;
|
||||
+
|
||||
+ last_fg = last_bg = -1;
|
||||
+ last_attrs = 0;
|
||||
+ vcx = vcy = 0; crealx = crealy = -1;
|
||||
+ vcmove = FALSE; cforcemove = TRUE;
|
||||
+ curs_visible = TRUE;
|
||||
+
|
||||
+ current_term = terminfo_core_init(stdin, stdout);
|
||||
+ if (current_term == NULL)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ if (term_get_size(&width, &height)) {
|
||||
+ current_term->width = width;
|
||||
+ current_term->height = height;
|
||||
+ }
|
||||
+
|
||||
+ /* grab CONT signal */
|
||||
+ sigemptyset(&act.sa_mask);
|
||||
+ act.sa_flags = 0;
|
||||
+ act.sa_handler = sig_cont;
|
||||
+ sigaction(SIGCONT, &act, NULL);
|
||||
+ redraw_tag = g_timeout_add(500, (GSourceFunc) redraw_timeout, NULL);
|
||||
+
|
||||
+ curs_x = curs_y = 0;
|
||||
+ term_width = current_term->width;
|
||||
+ term_height = current_term->height;
|
||||
+ root_window = term_window_create(0, 0, term_width, term_height);
|
||||
+ term_detached = FALSE;
|
||||
+
|
||||
+ term_lines_empty = g_new0(char, term_height);
|
||||
+
|
||||
+ term_set_input_type(TERM_TYPE_8BIT);
|
||||
+ term_common_init();
|
||||
+ g_atexit(term_deinit);
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+void term_deinit(void)
|
||||
+{
|
||||
+ if (current_term != NULL) {
|
||||
+ signal(SIGCONT, SIG_DFL);
|
||||
+ g_source_remove(redraw_tag);
|
||||
+
|
||||
+ term_common_deinit();
|
||||
+ terminfo_core_deinit(current_term);
|
||||
+ current_term = NULL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void term_move_real(void)
|
||||
+{
|
||||
+ if (term_detached) return;
|
||||
+
|
||||
+ if (vcx != crealx || vcy != crealy || cforcemove) {
|
||||
+ if (curs_visible) {
|
||||
+ terminfo_set_cursor_visible(FALSE);
|
||||
+ curs_visible = FALSE;
|
||||
+ }
|
||||
+
|
||||
+ if (cforcemove) {
|
||||
+ crealx = crealy = -1;
|
||||
+ cforcemove = FALSE;
|
||||
+ }
|
||||
+ terminfo_move_relative(crealx, crealy, vcx, vcy);
|
||||
+ crealx = vcx; crealy = vcy;
|
||||
+ }
|
||||
+
|
||||
+ vcmove = FALSE;
|
||||
+}
|
||||
+
|
||||
+/* Cursor position is unknown - move it immediately to known position */
|
||||
+static void term_move_reset(int x, int y)
|
||||
+{
|
||||
+ if (x >= term_width) x = term_width-1;
|
||||
+ if (y >= term_height) y = term_height-1;
|
||||
+
|
||||
+ vcx = x; vcy = y;
|
||||
+ cforcemove = TRUE;
|
||||
+ term_move_real();
|
||||
+}
|
||||
+
|
||||
+/* Resize terminal - if width or height is negative,
|
||||
+ the new size is unknown and should be figured out somehow */
|
||||
+void term_resize(int width, int height)
|
||||
+{
|
||||
+ if (width < 0 || height < 0) {
|
||||
+ terminfo_resize(current_term);
|
||||
+ width = current_term->width;
|
||||
+ height = current_term->height;
|
||||
+ }
|
||||
+
|
||||
+ if (term_width != width || term_height != height) {
|
||||
+ term_width = current_term->width = width;
|
||||
+ term_height = current_term->height = height;
|
||||
+ term_window_move(root_window, 0, 0, term_width, term_height);
|
||||
+
|
||||
+ g_free(term_lines_empty);
|
||||
+ term_lines_empty = g_new0(char, term_height);
|
||||
+ }
|
||||
+
|
||||
+ term_move_reset(0, 0);
|
||||
+}
|
||||
+
|
||||
+void term_resize_final(int width, int height)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+/* Returns TRUE if terminal has colors */
|
||||
+int term_has_colors(void)
|
||||
+{
|
||||
+ return current_term->has_colors;
|
||||
+}
|
||||
+
|
||||
+/* Force the colors on any way you can */
|
||||
+void term_force_colors(int set)
|
||||
+{
|
||||
+ if (term_detached) return;
|
||||
+
|
||||
+ terminfo_setup_colors(current_term, set);
|
||||
+}
|
||||
+
|
||||
+/* Clear screen */
|
||||
+void term_clear(void)
|
||||
+{
|
||||
+ if (term_detached) return;
|
||||
+
|
||||
+ term_set_color(root_window, ATTR_RESET);
|
||||
+ terminfo_clear();
|
||||
+ term_move_reset(0, 0);
|
||||
+
|
||||
+ memset(term_lines_empty, 1, term_height);
|
||||
+}
|
||||
+
|
||||
+/* Beep */
|
||||
+void term_beep(void)
|
||||
+{
|
||||
+ if (term_detached) return;
|
||||
+
|
||||
+ terminfo_beep(current_term);
|
||||
+}
|
||||
+
|
||||
+/* Create a new window in terminal */
|
||||
+TERM_WINDOW *term_window_create(int x, int y, int width, int height)
|
||||
+{
|
||||
+ TERM_WINDOW *window;
|
||||
+
|
||||
+ window = g_new0(TERM_WINDOW, 1);
|
||||
+ window->term = current_term;
|
||||
+ window->x = x; window->y = y;
|
||||
+ window->width = width; window->height = height;
|
||||
+ return window;
|
||||
+}
|
||||
+
|
||||
+/* Destroy a terminal window */
|
||||
+void term_window_destroy(TERM_WINDOW *window)
|
||||
+{
|
||||
+ g_free(window);
|
||||
+}
|
||||
+
|
||||
+/* Move/resize a window */
|
||||
+void term_window_move(TERM_WINDOW *window, int x, int y,
|
||||
+ int width, int height)
|
||||
+{
|
||||
+ window->x = x;
|
||||
+ window->y = y;
|
||||
+ window->width = width;
|
||||
+ window->height = height;
|
||||
+}
|
||||
+
|
||||
+/* Clear window */
|
||||
+void term_window_clear(TERM_WINDOW *window)
|
||||
+{
|
||||
+ int y;
|
||||
+
|
||||
+ if (term_detached) return;
|
||||
+
|
||||
+ terminfo_set_normal();
|
||||
+ if (window->y == 0 && window->height == term_height) {
|
||||
+ term_clear();
|
||||
+ } else {
|
||||
+ for (y = 0; y < window->height; y++) {
|
||||
+ term_move(window, 0, y);
|
||||
+ term_clrtoeol(window);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* Scroll window up/down */
|
||||
+void term_window_scroll(TERM_WINDOW *window, int count)
|
||||
+{
|
||||
+ int y;
|
||||
+
|
||||
+ if (term_detached) return;
|
||||
+
|
||||
+ terminfo_scroll(window->y, window->y+window->height-1, count);
|
||||
+ term_move_reset(vcx, vcy);
|
||||
+
|
||||
+ /* set the newly scrolled area dirty */
|
||||
+ for (y = 0; y < window->height; y++)
|
||||
+ term_lines_empty[window->y+y] = FALSE;
|
||||
+}
|
||||
+
|
||||
+/* Change active color */
|
||||
+void term_set_color(TERM_WINDOW *window, int col)
|
||||
+{
|
||||
+ int set_normal;
|
||||
+
|
||||
+ if (term_detached) return;
|
||||
+
|
||||
+ set_normal = ((col & ATTR_RESETFG) && last_fg != -1) ||
|
||||
+ ((col & ATTR_RESETBG) && last_bg != -1);
|
||||
+ if (((last_attrs & ATTR_BOLD) && (col & ATTR_BOLD) == 0) ||
|
||||
+ ((last_attrs & ATTR_BLINK) && (col & ATTR_BLINK) == 0)) {
|
||||
+ /* we'll need to get rid of bold/blink - this can only be
|
||||
+ done with setting the default color */
|
||||
+ set_normal = TRUE;
|
||||
+ }
|
||||
+
|
||||
+ if (set_normal) {
|
||||
+ last_fg = last_bg = -1;
|
||||
+ last_attrs = 0;
|
||||
+ terminfo_set_normal();
|
||||
+ }
|
||||
+
|
||||
+ if (!term_use_colors && (col & 0xf0) != 0)
|
||||
+ col |= ATTR_REVERSE;
|
||||
+
|
||||
+ /* reversed text (use standout) */
|
||||
+ if (col & ATTR_REVERSE) {
|
||||
+ if ((last_attrs & ATTR_REVERSE) == 0)
|
||||
+ terminfo_set_standout(TRUE);
|
||||
+ } else if (last_attrs & ATTR_REVERSE)
|
||||
+ terminfo_set_standout(FALSE);
|
||||
+
|
||||
+ /* set foreground color */
|
||||
+ if ((col & 0x0f) != last_fg &&
|
||||
+ ((col & 0x0f) != 0 || (col & ATTR_RESETFG) == 0)) {
|
||||
+ if (term_use_colors) {
|
||||
+ last_fg = col & 0x0f;
|
||||
+ terminfo_set_fg(last_fg);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* set background color */
|
||||
+ if (col & ATTR_BLINK)
|
||||
+ col |= 0x80;
|
||||
+ else if (col & 0x80)
|
||||
+ col |= ATTR_BLINK;
|
||||
+
|
||||
+ if ((col & 0xf0) >> 4 != last_bg &&
|
||||
+ ((col & 0xf0) != 0 || (col & ATTR_RESETBG) == 0)) {
|
||||
+ if (term_use_colors) {
|
||||
+ last_bg = (col & 0xf0) >> 4;
|
||||
+ terminfo_set_bg(last_bg);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* bold */
|
||||
+ if (col & 0x08)
|
||||
+ col |= ATTR_BOLD;
|
||||
+ else if (col & ATTR_BOLD)
|
||||
+ terminfo_set_bold();
|
||||
+
|
||||
+ /* underline */
|
||||
+ if (col & ATTR_UNDERLINE) {
|
||||
+ if ((last_attrs & ATTR_UNDERLINE) == 0)
|
||||
+ terminfo_set_uline(TRUE);
|
||||
+ } else if (last_attrs & ATTR_UNDERLINE)
|
||||
+ terminfo_set_uline(FALSE);
|
||||
+
|
||||
+ last_attrs = col & ~0xff;
|
||||
+}
|
||||
+
|
||||
+void term_move(TERM_WINDOW *window, int x, int y)
|
||||
+{
|
||||
+ vcmove = TRUE;
|
||||
+ vcx = x+window->x;
|
||||
+ vcy = y+window->y;
|
||||
+
|
||||
+ if (vcx >= term_width)
|
||||
+ vcx = term_width-1;
|
||||
+ if (vcy >= term_height)
|
||||
+ vcy = term_height-1;
|
||||
+}
|
||||
+
|
||||
+static void term_printed_text(int count)
|
||||
+{
|
||||
+ term_lines_empty[vcy] = FALSE;
|
||||
+
|
||||
+ /* if we continued writing past the line, wrap to next line.
|
||||
+ However, next term_move() really shouldn't try to cache
|
||||
+ the move, otherwise terminals would try to combine the
|
||||
+ last word in upper line with first word in lower line. */
|
||||
+ vcx += count;
|
||||
+ while (vcx >= term_width) {
|
||||
+ vcx -= term_width;
|
||||
+ if (vcy < term_height-1) vcy++;
|
||||
+ if (vcx > 0) term_lines_empty[vcy] = FALSE;
|
||||
+ }
|
||||
+
|
||||
+ crealx += count;
|
||||
+ if (crealx >= term_width)
|
||||
+ cforcemove = TRUE;
|
||||
+}
|
||||
+
|
||||
+void term_addch(TERM_WINDOW *window, int chr)
|
||||
+{
|
||||
+ if (term_detached) return;
|
||||
+
|
||||
+ if (vcmove) term_move_real();
|
||||
+
|
||||
+ if (vcy < term_height-1 || vcx < term_width-1) {
|
||||
+ /* With UTF-8, move cursor only if this char is either
|
||||
+ single-byte (8. bit off) or beginning of multibyte
|
||||
+ (7. bit off) */
|
||||
+ if (term_type != TERM_TYPE_UTF8 ||
|
||||
+ (chr & 0x80) == 0 || (chr & 0x40) == 0) {
|
||||
+ term_printed_text(1);
|
||||
+ }
|
||||
+
|
||||
+ putc(chr, window->term->out);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void term_addch_utf8(TERM_WINDOW *window, unichar chr)
|
||||
+{
|
||||
+ char buf[10];
|
||||
+ int i, len;
|
||||
+
|
||||
+ len = utf16_char_to_utf8(chr, buf);
|
||||
+ for (i = 0; i < len; i++)
|
||||
+ putc(buf[i], window->term->out);
|
||||
+}
|
||||
+
|
||||
+void term_add_unichar(TERM_WINDOW *window, unichar chr)
|
||||
+{
|
||||
+ if (term_detached) return;
|
||||
+
|
||||
+ if (vcmove) term_move_real();
|
||||
+ if (vcy == term_height-1 && vcx == term_width-1)
|
||||
+ return; /* last char in screen */
|
||||
+
|
||||
+ switch (term_type) {
|
||||
+ case TERM_TYPE_UTF8:
|
||||
+ term_printed_text(utf8_width(chr));
|
||||
+ term_addch_utf8(window, chr);
|
||||
+ break;
|
||||
+ case TERM_TYPE_BIG5:
|
||||
+ if (chr > 0xff) {
|
||||
+ term_printed_text(2);
|
||||
+ putc((chr >> 8) & 0xff, window->term->out);
|
||||
+ } else {
|
||||
+ term_printed_text(1);
|
||||
+ }
|
||||
+ putc((chr & 0xff), window->term->out);
|
||||
+ break;
|
||||
+ default:
|
||||
+ term_printed_text(1);
|
||||
+ putc(chr, window->term->out);
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void term_addstr(TERM_WINDOW *window, const char *str)
|
||||
+{
|
||||
+ int len;
|
||||
+
|
||||
+ if (term_detached) return;
|
||||
+
|
||||
+ if (vcmove) term_move_real();
|
||||
+ len = strlen(str); /* FIXME utf8 or big5 */
|
||||
+ term_printed_text(len);
|
||||
+
|
||||
+ if (vcy != term_height || vcx != 0)
|
||||
+ fputs(str, window->term->out);
|
||||
+ else
|
||||
+ fwrite(str, 1, len-1, window->term->out);
|
||||
+}
|
||||
+
|
||||
+void term_clrtoeol(TERM_WINDOW *window)
|
||||
+{
|
||||
+ if (term_detached) return;
|
||||
+
|
||||
+ /* clrtoeol() doesn't necessarily understand colors */
|
||||
+ if (last_fg == -1 && last_bg == -1 &&
|
||||
+ (last_attrs & (ATTR_UNDERLINE|ATTR_REVERSE)) == 0) {
|
||||
+ if (!term_lines_empty[vcy]) {
|
||||
+ if (vcmove) term_move_real();
|
||||
+ terminfo_clrtoeol();
|
||||
+ if (vcx == 0) term_lines_empty[vcy] = TRUE;
|
||||
+ }
|
||||
+ } else if (vcx < term_width) {
|
||||
+ /* we'll need to fill the line ourself. */
|
||||
+ if (vcmove) term_move_real();
|
||||
+ terminfo_repeat(' ', term_width-vcx);
|
||||
+ terminfo_move(vcx, vcy);
|
||||
+ term_lines_empty[vcy] = FALSE;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void term_move_cursor(int x, int y)
|
||||
+{
|
||||
+ curs_x = x;
|
||||
+ curs_y = y;
|
||||
+}
|
||||
+
|
||||
+void term_refresh(TERM_WINDOW *window)
|
||||
+{
|
||||
+ if (term_detached || freeze_counter > 0)
|
||||
+ return;
|
||||
+
|
||||
+ term_move(root_window, curs_x, curs_y);
|
||||
+ term_move_real();
|
||||
+
|
||||
+ if (!curs_visible) {
|
||||
+ terminfo_set_cursor_visible(TRUE);
|
||||
+ curs_visible = TRUE;
|
||||
+ }
|
||||
+
|
||||
+ term_set_color(window, ATTR_RESET);
|
||||
+ fflush(window != NULL ? window->term->out : current_term->out);
|
||||
+}
|
||||
+
|
||||
+void term_refresh_freeze(void)
|
||||
+{
|
||||
+ freeze_counter++;
|
||||
+}
|
||||
+
|
||||
+void term_refresh_thaw(void)
|
||||
+{
|
||||
+ if (--freeze_counter == 0)
|
||||
+ term_refresh(NULL);
|
||||
+}
|
||||
+
|
||||
+void term_auto_detach(int set)
|
||||
+{
|
||||
+ auto_detach = set;
|
||||
+}
|
||||
+
|
||||
+void term_detach(void)
|
||||
+{
|
||||
+ terminfo_stop(current_term);
|
||||
+
|
||||
+ fclose(current_term->in);
|
||||
+ fclose(current_term->out);
|
||||
+
|
||||
+ current_term->in = NULL;
|
||||
+ current_term->out = NULL;
|
||||
+ term_detached = TRUE;
|
||||
+}
|
||||
+
|
||||
+void term_attach(FILE *in, FILE *out)
|
||||
+{
|
||||
+ current_term->in = in;
|
||||
+ current_term->out = out;
|
||||
+ term_detached = FALSE;
|
||||
+
|
||||
+ terminfo_cont(current_term);
|
||||
+ irssi_redraw();
|
||||
+}
|
||||
+
|
||||
+void term_stop(void)
|
||||
+{
|
||||
+ if (term_detached) {
|
||||
+ kill(getpid(), SIGSTOP);
|
||||
+ } else {
|
||||
+ terminfo_stop(current_term);
|
||||
+ kill(getpid(), SIGSTOP);
|
||||
+ terminfo_cont(current_term);
|
||||
+ irssi_redraw();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int input_utf8(const unsigned char *buffer, int size, unichar *result)
|
||||
+{
|
||||
+ const unsigned char *end = buffer;
|
||||
+
|
||||
+ *result = get_utf8_char(&end, size);
|
||||
+ switch (*result) {
|
||||
+ case (unichar) -2:
|
||||
+ /* not UTF8 - fallback to 8bit ascii */
|
||||
+ *result = *buffer;
|
||||
+ return 1;
|
||||
+ case (unichar) -1:
|
||||
+ /* need more data */
|
||||
+ return -1;
|
||||
+ default:
|
||||
+ return (int) (end-buffer)+1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int input_big5(const unsigned char *buffer, int size, unichar *result)
|
||||
+{
|
||||
+ if (is_big5_hi(*buffer)) {
|
||||
+ /* could be */
|
||||
+ if (size == 1)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (is_big5_los(buffer[1]) || is_big5_lox(buffer[1])) {
|
||||
+ *result = buffer[1] + ((int) *buffer << 8);
|
||||
+ return 2;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ *result = *buffer;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static int input_8bit(const unsigned char *buffer, int size, unichar *result)
|
||||
+{
|
||||
+ *result = *buffer;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+void term_set_input_type(int type)
|
||||
+{
|
||||
+ switch (type) {
|
||||
+ case TERM_TYPE_UTF8:
|
||||
+ input_func = input_utf8;
|
||||
+ break;
|
||||
+ case TERM_TYPE_BIG5:
|
||||
+ input_func = input_big5;
|
||||
+ break;
|
||||
+ default:
|
||||
+ input_func = input_8bit;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+int term_gets(unichar *buffer, int size)
|
||||
+{
|
||||
+ int ret, i, char_len;
|
||||
+
|
||||
+ if (term_detached)
|
||||
+ return 0;
|
||||
+
|
||||
+ /* fread() doesn't work */
|
||||
+ if (size > sizeof(term_inbuf)-term_inbuf_pos)
|
||||
+ size = sizeof(term_inbuf)-term_inbuf_pos;
|
||||
+
|
||||
+ ret = read(fileno(current_term->in),
|
||||
+ term_inbuf + term_inbuf_pos, size);
|
||||
+ if (ret == 0) {
|
||||
+ /* EOF - terminal got lost */
|
||||
+ if (auto_detach)
|
||||
+ term_detach();
|
||||
+ ret = -1;
|
||||
+ } else if (ret == -1 && (errno == EINTR || errno == EAGAIN))
|
||||
+ ret = 0;
|
||||
+
|
||||
+ if (ret > 0) {
|
||||
+ /* convert input to unichars. */
|
||||
+ term_inbuf_pos += ret;
|
||||
+ ret = 0;
|
||||
+ for (i = 0; i < term_inbuf_pos; ) {
|
||||
+ char_len = input_func(term_inbuf+i, term_inbuf_pos-i,
|
||||
+ buffer);
|
||||
+ if (char_len < 0)
|
||||
+ break;
|
||||
+
|
||||
+ i += char_len;
|
||||
+ buffer++;
|
||||
+ ret++;
|
||||
+ }
|
||||
+
|
||||
+ if (i >= term_inbuf_pos)
|
||||
+ term_inbuf_pos = 0;
|
||||
+ else if (i > 0) {
|
||||
+ memmove(term_inbuf, term_inbuf+i, term_inbuf_pos-i);
|
||||
+ term_inbuf_pos -= i;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
99
debian/rules
vendored
99
debian/rules
vendored
@ -1,38 +1,67 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
# This is the debhelper compatability version to use.
|
||||
export DH_COMPAT=2
|
||||
include /usr/share/dpatch/dpatch.make
|
||||
|
||||
TMP=`pwd`/debian/irssi-text
|
||||
# These are used for cross-compiling and for saving the configure script
|
||||
# from having to guess our platform (since we know it already)
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
|
||||
configure: configure-stamp
|
||||
configure-stamp:
|
||||
|
||||
CFLAGS = -Wall -g
|
||||
|
||||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||
CFLAGS += -O0
|
||||
else
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
|
||||
config.status: patch-stamp configure
|
||||
dh_testdir
|
||||
./configure --prefix=/usr --exec-prefix=/usr --sysconf=/etc \
|
||||
# Add here commands to configure the package.
|
||||
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
|
||||
--prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
|
||||
--sysconfdir=/etc \
|
||||
--without-servertest --enable-ipv6 --with-bot --with-proxy \
|
||||
--enable-perl=yes --with-perl-lib=vendor
|
||||
touch configure-stamp
|
||||
--enable-perl --with-perl-lib=vendor
|
||||
|
||||
build: configure-stamp build-stamp
|
||||
build-stamp:
|
||||
|
||||
build: build-stamp
|
||||
|
||||
build-stamp: config.status
|
||||
dh_testdir
|
||||
$(MAKE) CFLAGS="-O2 -g -Wall"
|
||||
|
||||
# Add here commands to compile the package.
|
||||
$(MAKE)
|
||||
#docbook-to-man debian/irssi.sgml > irssi.1
|
||||
|
||||
touch build-stamp
|
||||
|
||||
clean:
|
||||
clean: unpatch
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) distclean
|
||||
-rm -f src/perl/perl-signals-list.h
|
||||
-rm -f default-theme.h
|
||||
#-rm -f `find . -name "*~"` debian/*debhelper debian/{files,substvars}
|
||||
-rm -f default-config.h libtool*
|
||||
find -name Makefile -o -name Makefile.PL | xargs rm -f
|
||||
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
|
||||
cp -f /usr/share/misc/config.sub config.sub
|
||||
endif
|
||||
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
|
||||
cp -f /usr/share/misc/config.guess config.guess
|
||||
endif
|
||||
|
||||
dh_clean build-stamp configure-stamp
|
||||
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
@ -40,10 +69,9 @@ install: build
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
|
||||
$(MAKE) install DESTDIR=$(TMP) PREFIX=$(TMP)/usr
|
||||
mv $(TMP)/usr/bin/irssi $(TMP)/usr/bin/irssi-text
|
||||
rm -rf $(TMP)/usr/share/doc
|
||||
find $(TMP) -name perllocal.pod -o -name .packlist | xargs rm -f
|
||||
# Add here commands to install the package into debian/tmp.
|
||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
|
||||
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
@ -53,23 +81,32 @@ binary-indep: build install
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
|
||||
dh_installdocs README TODO AUTHORS docs/*.txt
|
||||
dh_installchangelogs NEWS
|
||||
dh_installmenu
|
||||
dh_undocumented
|
||||
ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
|
||||
dh_installchangelogs ChangeLog
|
||||
dh_installdocs
|
||||
dh_installexamples
|
||||
dh_install
|
||||
# dh_installmenu
|
||||
# dh_installdebconf
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_installinit
|
||||
# dh_installcron
|
||||
# dh_installinfo
|
||||
dh_installman
|
||||
dh_link
|
||||
dh_strip
|
||||
endif
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
dh_perl
|
||||
# dh_python
|
||||
dh_makeshlibs
|
||||
dh_installdeb
|
||||
dh_perl
|
||||
dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install configure
|
||||
.PHONY: build clean binary-indep binary-arch binary install
|
||||
|
2
debian/undocumented
vendored
2
debian/undocumented
vendored
@ -1,2 +0,0 @@
|
||||
irssi-text.1
|
||||
botti.1
|
Loading…
Reference in New Issue
Block a user