mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
Add {irc,japanese}/slirc, a SLang-based IRC client.
This commit is contained in:
parent
3cc329279e
commit
91cfe10d51
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=36868
@ -25,6 +25,7 @@
|
||||
SUBDIR += scrollz
|
||||
SUBDIR += sic
|
||||
SUBDIR += sirc
|
||||
SUBDIR += slirc
|
||||
SUBDIR += tirc
|
||||
SUBDIR += tircproxy
|
||||
SUBDIR += tkirc
|
||||
|
54
irc/slirc/Makefile
Normal file
54
irc/slirc/Makefile
Normal file
@ -0,0 +1,54 @@
|
||||
# New ports collection makefile for: SLirc
|
||||
# Date created: 6 Jan 2001
|
||||
# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= slirc
|
||||
PORTVERSION= 0.12
|
||||
# Assign with += for slave ports
|
||||
CATEGORIES+= irc
|
||||
MASTER_SITES= http://www.megsinet.com/~stabro/
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
||||
MAINTAINER= knu@FreeBSD.org
|
||||
|
||||
LIB_DEPENDS= ${LIB_DEPENDS_LIBSLANG}
|
||||
|
||||
USE_GMAKE= yes
|
||||
|
||||
SLANG_INCDIR?= ${PREFIX}/include
|
||||
SLANG_LIBDIR?= ${PREFIX}/lib
|
||||
LIB_DEPENDS_LIBSLANG?= slang.1:${PORTSDIR}/devel/libslang
|
||||
|
||||
MAKE_ARGS= SLANG_INCDIR="${SLANG_INCDIR}" \
|
||||
SLANG_LIBDIR="${SLANG_LIBDIR}" \
|
||||
${MAKE_ARGS_JA}
|
||||
PLIST_SUB= JA=${PLIST_JA}
|
||||
PLIST_JA?= "@comment "
|
||||
|
||||
# Assign with += for slave ports
|
||||
DOCS+= BUGS \
|
||||
CHANGES \
|
||||
COPYING \
|
||||
FAQ \
|
||||
LACK-OF-WARRANTY \
|
||||
README \
|
||||
README.dropin \
|
||||
README.gutsbonesbloodtoilsweat \
|
||||
TODO \
|
||||
scripts/slirc.hlp \
|
||||
sldocs/VFile.txt \
|
||||
sldocs/utilsfun.txt
|
||||
|
||||
post-install:
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${PREFIX}/share/doc/slirc
|
||||
.for f in ${DOCS}
|
||||
${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/share/doc/slirc/
|
||||
.endfor
|
||||
.endif
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.mk>
|
1
irc/slirc/distinfo
Normal file
1
irc/slirc/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (slirc-0.12.tgz) = d5210681b5719d095ffa7f683e98860c
|
29
irc/slirc/files/patch-Makefile
Normal file
29
irc/slirc/files/patch-Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
--- Makefile.orig Tue Aug 24 05:42:02 1999
|
||||
+++ Makefile Sat Jan 6 08:50:21 2001
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/bin/make -f
|
||||
|
||||
-CC=gcc
|
||||
-CFLAGS:=-Wall -Wmissing-declarations -Wstrict-prototypes -O2 -Iinclude
|
||||
+CC?=cc
|
||||
+CFLAGS+=-Wall -Wmissing-declarations -Wstrict-prototypes -I$(SLANG_INCDIR) $(KANJI)
|
||||
SOFLAGS:=-shared -fPIC -Wl,-export-dynamic
|
||||
LDFLAGS:=-s
|
||||
-LIBS:=-ldl -lm -Llib -lslang
|
||||
+LIBS:=-lm -ltermcap -L$(SLANG_LIBDIR) -lslang
|
||||
|
||||
pwd:=$(shell pwd)
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
[ -d $(lib_dir) ] || mkdir -p $(lib_dir)
|
||||
[ -d $(CFG_DIR) ] || mkdir -p $(CFG_DIR)
|
||||
[ -d $(script_dir) ] || mkdir -p $(script_dir)
|
||||
- install -p -o root -g root -m755 slirc $(bin_dir)
|
||||
- install -p -o root -g root -m755 $(MODULES) $(CFG_DIR)
|
||||
- install -p -o root -g root -m644 scripts/*.sl $(script_dir)
|
||||
+ install -p -o root -g wheel -m755 slirc $(bin_dir)
|
||||
+ install -p -o root -g wheel -m755 $(MODULES) $(CFG_DIR)
|
||||
+ install -p -o root -g wheel -m644 scripts/*.sl $(script_dir)
|
||||
endif
|
||||
|
||||
slirc: slirc.o lru.o slload.o windoze.o
|
5
irc/slirc/files/patch-VFile.txt
Normal file
5
irc/slirc/files/patch-VFile.txt
Normal file
@ -0,0 +1,5 @@
|
||||
--- sldocs/VFile.txt.orig Sun Aug 22 00:40:49 1999
|
||||
+++ sldocs/VFile.txt Sat Jan 6 20:26:41 2001
|
||||
@@ -213 +213 @@
|
||||
- O_SYNC
|
||||
+ O_FSYNC
|
10
irc/slirc/files/patch-check_slang
Normal file
10
irc/slirc/files/patch-check_slang
Normal file
@ -0,0 +1,10 @@
|
||||
--- check_slang.orig Sat Aug 21 03:25:35 1999
|
||||
+++ check_slang Sat Jan 6 09:39:13 2001
|
||||
@@ -1,5 +1,5 @@
|
||||
-#!/bin/bash
|
||||
-
|
||||
+#!/bin/sh
|
||||
+exit 0 # FreeBSD port: We know we have libslang already installed.
|
||||
# This little script to alert people who didn't bother to read
|
||||
# step (0) in the README installation instructions
|
||||
|
14
irc/slirc/files/patch-lru.c
Normal file
14
irc/slirc/files/patch-lru.c
Normal file
@ -0,0 +1,14 @@
|
||||
--- lru.c.orig Sun Aug 22 20:14:28 1999
|
||||
+++ lru.c Sun Jan 7 02:37:54 2001
|
||||
@@ -253,8 +253,9 @@
|
||||
if (el) {
|
||||
do {
|
||||
if (!(p = index(el->str, '!')))
|
||||
- p = "NoBang";
|
||||
- len = p - el->str;
|
||||
+ len = strlen(el->str);
|
||||
+ else
|
||||
+ len = p - el->str;
|
||||
if (ix + len > SLtt_Screen_Cols - 2)
|
||||
break;
|
||||
if (ix) {
|
30
irc/slirc/files/patch-slirc.c
Normal file
30
irc/slirc/files/patch-slirc.c
Normal file
@ -0,0 +1,30 @@
|
||||
--- slirc.c.orig Tue Aug 24 00:15:11 1999
|
||||
+++ slirc.c Sun Jan 7 03:17:46 2001
|
||||
@@ -242,7 +242,7 @@
|
||||
{
|
||||
char secs[8];
|
||||
|
||||
- sprintf(Status, "%s -> %s Server[%s] %s",
|
||||
+ snprintf(Status, sizeof(Status), "%s -> %s Server[%s] %s",
|
||||
NickName, Target, ServerName, StatMsg);
|
||||
|
||||
SLsmg_gotorc(start, 0);
|
||||
@@ -339,13 +339,15 @@
|
||||
|
||||
/* now for scripts search-path */
|
||||
if((q = getenv("HOME")))
|
||||
- sprintf(SLirc_Load_Path,"%s/.slirc/scripts:",q);
|
||||
+ snprintf(SLirc_Load_Path, 196, "%s/.slirc/scripts",q);
|
||||
else
|
||||
- sprintf(SLirc_Load_Path,"/home/%s/.slirc/scripts:",p);
|
||||
+ snprintf(SLirc_Load_Path, 196, "/home/%s/.slirc/scripts",p);
|
||||
|
||||
if (2 != SLpath_file_exists(SLirc_Load_Path))
|
||||
SLirc_Load_Path[0] = '\0';
|
||||
-
|
||||
+ else
|
||||
+ strcat(SLirc_Load_Path, ":");
|
||||
+
|
||||
strcat(SLirc_Load_Path,SCRIPTPATH); /* SCRIPTPATH defined in Makefile */
|
||||
}
|
||||
|
10
irc/slirc/files/patch-utils-module.c
Normal file
10
irc/slirc/files/patch-utils-module.c
Normal file
@ -0,0 +1,10 @@
|
||||
--- utils-module.c.orig Mon Aug 23 01:39:11 1999
|
||||
+++ utils-module.c Sat Jan 6 08:46:47 2001
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <slang.h>
|
||||
+#include <sys/types.h>
|
||||
|
||||
/* this was just to verify that cp0 will be an slstring
|
||||
static int is_same(char *cp0)
|
5
irc/slirc/files/patch-vfile-module.c
Normal file
5
irc/slirc/files/patch-vfile-module.c
Normal file
@ -0,0 +1,5 @@
|
||||
--- vfile-module.c.orig Tue Aug 24 00:08:56 1999
|
||||
+++ vfile-module.c Sat Jan 6 20:25:43 2001
|
||||
@@ -2067 +2067 @@
|
||||
- MAKE_ICONSTANT("O_SYNC", O_SYNC),
|
||||
+ MAKE_ICONSTANT("O_FSYNC", O_FSYNC),
|
1
irc/slirc/pkg-comment
Normal file
1
irc/slirc/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
A SLang-based IRC client
|
6
irc/slirc/pkg-descr
Normal file
6
irc/slirc/pkg-descr
Normal file
@ -0,0 +1,6 @@
|
||||
SLirc is an irc client based on J.E.D.'s libslang. It was originally
|
||||
created by Dave Cridland, and then Stan Brooks got involved and is
|
||||
maintaining the code.
|
||||
|
||||
Author: Stan Brooks <stabro@megsinet.net>
|
||||
WWW: http://www.megsinet.com/~stabro/slirc.html
|
18
irc/slirc/pkg-message
Normal file
18
irc/slirc/pkg-message
Normal file
@ -0,0 +1,18 @@
|
||||
************************************************************
|
||||
Quickstart:
|
||||
|
||||
- Copy config.sl and colours.sl to ~/.slirc/scripts
|
||||
|
||||
mkdir -p ~/.slirc/scripts
|
||||
cp ${PREFIX}/lib/slirc/scripts/config.sl ~/.slirc/scripts
|
||||
cp ${PREFIX}/lib/slirc/scripts/colours.sl ~/.slirc/scripts
|
||||
|
||||
- Edit ~/.slirc/scripts/config.sl
|
||||
|
||||
() = s_putlast(servers,"server:port::nick");
|
||||
variable chan_on_connect = "channel";
|
||||
|
||||
- Set your name to the environment variable "IRCNAME"
|
||||
|
||||
export IRCNAME="John Doe"
|
||||
************************************************************
|
39
irc/slirc/pkg-plist
Normal file
39
irc/slirc/pkg-plist
Normal file
@ -0,0 +1,39 @@
|
||||
bin/slirc
|
||||
lib/slirc/vfile-module.so
|
||||
lib/slirc/utils-module.so
|
||||
lib/slirc/scripts/LList.sl
|
||||
lib/slirc/scripts/RBL.sl
|
||||
lib/slirc/scripts/ak47.sl
|
||||
lib/slirc/scripts/bot-kernel.sl
|
||||
lib/slirc/scripts/bot.sl
|
||||
lib/slirc/scripts/colours.sl
|
||||
lib/slirc/scripts/config.sl
|
||||
lib/slirc/scripts/ctcp.sl
|
||||
lib/slirc/scripts/ctcp_cmd.sl
|
||||
lib/slirc/scripts/dcc.sl
|
||||
lib/slirc/scripts/editor.sl
|
||||
lib/slirc/scripts/flip.sl
|
||||
lib/slirc/scripts/goodies.sl
|
||||
lib/slirc/scripts/init.sl
|
||||
lib/slirc/scripts/lists.sl
|
||||
lib/slirc/scripts/op-stuff.sl
|
||||
lib/slirc/scripts/registry.sl
|
||||
lib/slirc/scripts/slftp.sl
|
||||
lib/slirc/scripts/standard.sl
|
||||
lib/slirc/scripts/tab-ex.sl
|
||||
@dirrm lib/slirc/scripts
|
||||
@dirrm lib/slirc
|
||||
share/doc/slirc/BUGS
|
||||
share/doc/slirc/CHANGES
|
||||
share/doc/slirc/COPYING
|
||||
share/doc/slirc/FAQ
|
||||
share/doc/slirc/LACK-OF-WARRANTY
|
||||
share/doc/slirc/README
|
||||
share/doc/slirc/README.dropin
|
||||
share/doc/slirc/README.gutsbonesbloodtoilsweat
|
||||
%%JA%%share/doc/slirc/README.ja
|
||||
share/doc/slirc/TODO
|
||||
share/doc/slirc/VFile.txt
|
||||
share/doc/slirc/slirc.hlp
|
||||
share/doc/slirc/utilsfun.txt
|
||||
@dirrm share/doc/slirc
|
@ -287,6 +287,7 @@
|
||||
SUBDIR += skkfep
|
||||
SUBDIR += skkinput
|
||||
SUBDIR += skkserv
|
||||
SUBDIR += slirc
|
||||
SUBDIR += slrn
|
||||
SUBDIR += srd-fpw
|
||||
SUBDIR += srd-fpw-package
|
||||
|
29
japanese/slirc/Makefile
Normal file
29
japanese/slirc/Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
# New ports collection makefile for: SLirc-ja
|
||||
# Date created: 6 Jan 2001
|
||||
# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
CATEGORIES= japanese
|
||||
|
||||
MAINTAINER= knu@FreeBSD.org
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../../irc/slirc
|
||||
|
||||
MD5_FILE= ${.CURDIR}/distinfo
|
||||
EXTRA_FILESDIR= ${.CURDIR}/files
|
||||
EXTRA_PATCHES= ${EXTRA_FILESDIR}/patch-*
|
||||
|
||||
SLANG_INCDIR= ${PREFIX}/include/slang
|
||||
LIB_DEPENDS_LIBSLANG?= slang.2:${PORTSDIR}/japanese/libslang
|
||||
|
||||
MAKE_ARGS_JA= KANJI="-DKANJI"
|
||||
PLIST_JA= ""
|
||||
|
||||
DOCS= README.ja
|
||||
|
||||
post-patch:
|
||||
${CP} ${EXTRA_FILESDIR}/README.ja ${WRKSRC}/
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
2
japanese/slirc/distinfo
Normal file
2
japanese/slirc/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
MD5 (slirc-0.12.tgz) = d5210681b5719d095ffa7f683e98860c
|
||||
MD5 (slirc-0.11.10ja6.patch.gz) = eaa93a712efdd43a831c2541ef796248
|
65
japanese/slirc/files/README.ja
Normal file
65
japanese/slirc/files/README.ja
Normal file
@ -0,0 +1,65 @@
|
||||
|
||||
SLirc 0.11.10ja6
|
||||
$BI~It(B $BE590(B <tnh@aurora.dti.ne.jp>
|
||||
|
||||
SLirc$B$K$D$$$F(B
|
||||
$B%*%j%8%J%k$+$i$NJQ99(B
|
||||
$B%3%s%Q%$%k!&4D6-@_Dj(B
|
||||
$BIT6q9g!?%P%0(B
|
||||
$B$=$NB>(B
|
||||
|
||||
SLirc$B$K$D$$$F(B
|
||||
|
||||
Dave Cridland $B;a$H(B Stan Brooks $B;a$K$h$k(B IRC Client $B$G$9!#(B
|
||||
$BFCD'$H$7$F(B
|
||||
|
||||
o $BB.$/$F2wE,(B
|
||||
o $B%+%i%U%k$G$+$C$3$$$$(B
|
||||
o S-lang $B8@8l$G3HD%$G$-$k(B
|
||||
|
||||
$B$H$$$&$b$N$,$"$j$^$9!#(B
|
||||
$BF|K\8lBP1~(B SLirc $B$O(B SLirc $B$rF|K\8lBP1~$K$7$?$b$N$G$9!#(B
|
||||
|
||||
|
||||
$B%*%j%8%J%k$+$i$NJQ99(B
|
||||
|
||||
IRC $B%5!<%P$HF|K\8l$NAw<u?.$,$G$-$^$9!#(B
|
||||
$BF~NO%P%C%U%!$GF|K\8l$,@5>o$KJT=8$G$-$^$9!#(B
|
||||
|
||||
|
||||
$B%3%s%Q%$%k!&4D6-@_Dj(B
|
||||
|
||||
$B!&%3%s%Q%$%k(B
|
||||
|
||||
$B%3%s%Q%$%k;~$K%*%W%7%g%s$H$7$F(B -DKANJI $B$r;XDj$7$F$/$@$5$$!#(B
|
||||
|
||||
$B!&4D6-@_Dj(B
|
||||
|
||||
config.sl, colours.sl $B$r(B ~/.slirc/scripts $B$K%3%T!<$7$^$9!#(B
|
||||
|
||||
mkdir -p ~/.slirc/scripts
|
||||
cp /usr/lib/slirc/scripts/config.sl ~/.slirc/scripts
|
||||
cp /usr/lib/slirc/scripts/colours.sl ~/.slirc/scripts
|
||||
|
||||
$B<!$K(B ~/.slirc/scripts/config.sl $B$r@_Dj$7$^$9!#(B
|
||||
|
||||
() = s_putlast(servers,"$B%5!<%PL>(B:$B%]!<%HHV9f(B::$B%K%C%/%M!<%`(B");
|
||||
variable chan_on_connect = "$B@\B3$9$k%A%c%M%k(B";
|
||||
|
||||
$B%K%C%/%M!<%`$O(B9$BJ8;z0JFb$G!"H>3Q1Q?t$7$+$D$+$($J$$$N$GCm0U$7$F$/$@$5$$!#(B
|
||||
$B<!$K4D6-JQ?t(B IRCNAME $B$r(B .profile $BEy$K@_Dj$7$^$9!#(B
|
||||
|
||||
export IRCNAME="$BK\L>(B"
|
||||
|
||||
$B0J>e$G@_Dj$O40N;$G$9!#(B
|
||||
|
||||
|
||||
$BIT6q9g!?%P%0(B
|
||||
|
||||
$BF~NO%P%C%U%!$KD9$$F|K\8l$rF~NO$9$k$HI=<($,$_$@$l$k>l9g$,$"$j$^$9!#(B
|
||||
|
||||
|
||||
$B$=$NB>(B
|
||||
|
||||
$B%P%0$r8+$D$1$?$j=$@5$5$l$?J}$,$$$i$C$7$c$?$i!"I~ItE590(B
|
||||
<tnh@aurora.dti.ne.jp>$B$^$GO"Mm$7$F2<$5$$!#(B
|
109
japanese/slirc/files/patch-editor.sl
Normal file
109
japanese/slirc/files/patch-editor.sl
Normal file
@ -0,0 +1,109 @@
|
||||
--- scripts/editor.sl.orig Mon Jun 7 16:07:23 1999
|
||||
+++ scripts/editor.sl Sat Jan 6 21:23:30 2001
|
||||
@@ -35,6 +35,13 @@
|
||||
{
|
||||
irc_edit_insert_pos--;
|
||||
buf = chop_last(irc_buffer);
|
||||
+#ifdef KANJI
|
||||
+ if(iskanji(irc_buffer[irc_edit_insert_pos]))
|
||||
+ {
|
||||
+ irc_edit_insert_pos--;
|
||||
+ buf = substr(irc_buffer, 1, irc_edit_insert_pos);
|
||||
+ }
|
||||
+#endif
|
||||
irc_set_buffer(buf);
|
||||
}
|
||||
else
|
||||
@@ -42,6 +49,14 @@
|
||||
irc_edit_insert_pos--;
|
||||
buf = substr(irc_buffer, 1, irc_edit_insert_pos)
|
||||
+ substr(irc_buffer, irc_edit_insert_pos + 2, -1);
|
||||
+#ifdef KANJI
|
||||
+ if(iskanji(irc_buffer[irc_edit_insert_pos]))
|
||||
+ {
|
||||
+ irc_edit_insert_pos--;
|
||||
+ buf = substr(irc_buffer, 1, irc_edit_insert_pos)
|
||||
+ + substr(irc_buffer, irc_edit_insert_pos + 3, -1);
|
||||
+ }
|
||||
+#endif
|
||||
irc_set_buffer(buf);
|
||||
}
|
||||
!if(irc_edit_insert_pos)
|
||||
@@ -67,10 +82,25 @@
|
||||
if(ch < 0x0a0) return; % ISO-LATIN-1 are 0xa0-0xff
|
||||
}
|
||||
variable buf;
|
||||
+#ifdef KANJI
|
||||
+ variable keysym;
|
||||
+#endif
|
||||
if(irc_edit_insert_pos >= strlen(irc_buffer))
|
||||
{
|
||||
+#ifdef KANJI
|
||||
+ buf = irc_buffer + char(ch);
|
||||
+ irc_edit_insert_pos = strlen(buf);
|
||||
+ if (iskanji(ch))
|
||||
+ {
|
||||
+ keysym = irc_get_input();
|
||||
+ buf = irc_buffer + char(ch) + char(keysym);
|
||||
+ irc_edit_insert_pos = strlen(buf);
|
||||
+ }
|
||||
+ irc_set_buffer(buf);
|
||||
+#else
|
||||
irc_set_buffer(irc_buffer + char(ch));
|
||||
irc_edit_insert_pos = strlen(irc_buffer);
|
||||
+#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -78,12 +108,30 @@
|
||||
{
|
||||
buf = char(ch) + irc_buffer;
|
||||
irc_edit_insert_pos = 1;
|
||||
+#ifdef KANJI
|
||||
+ if (iskanji(ch))
|
||||
+ {
|
||||
+ keysym = irc_get_input();
|
||||
+ buf = char(ch) + char(keysym) + irc_buffer;
|
||||
+ irc_edit_insert_pos = 2;
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
buf = substr(irc_buffer, 1, irc_edit_insert_pos)
|
||||
+ char(ch)
|
||||
+ substr(irc_buffer, irc_edit_insert_pos + 1, -1);
|
||||
+#ifdef KANJI
|
||||
+ if (iskanji(ch))
|
||||
+ {
|
||||
+ keysym = irc_get_input();
|
||||
+ buf = substr(irc_buffer, 1, irc_edit_insert_pos)
|
||||
+ + char(ch) + char(keysym)
|
||||
+ + substr(irc_buffer, irc_edit_insert_pos + 1, -1);
|
||||
+ irc_edit_insert_pos++;
|
||||
+ }
|
||||
+#endif
|
||||
irc_edit_insert_pos++;
|
||||
}
|
||||
irc_set_buffer(buf);
|
||||
@@ -96,10 +144,20 @@
|
||||
{
|
||||
if(irc_edit_insert_pos > 0)
|
||||
irc_edit_insert_pos --;
|
||||
+#ifdef KANJI
|
||||
+ if(irc_edit_insert_pos > 0)
|
||||
+ if(iskanji(irc_buffer[irc_edit_insert_pos]))
|
||||
+ irc_edit_insert_pos--;
|
||||
+#endif
|
||||
}
|
||||
|
||||
define do_scroll_right()
|
||||
{
|
||||
+#ifdef KANJI
|
||||
+ if(irc_edit_insert_pos < strlen(irc_buffer))
|
||||
+ if(iskanji(irc_buffer[irc_edit_insert_pos]))
|
||||
+ irc_edit_insert_pos++;
|
||||
+#endif
|
||||
if(irc_edit_insert_pos < strlen(irc_buffer))
|
||||
irc_edit_insert_pos++;
|
||||
}
|
11
japanese/slirc/files/patch-init.sl
Normal file
11
japanese/slirc/files/patch-init.sl
Normal file
@ -0,0 +1,11 @@
|
||||
--- scripts/init.sl.orig Sun Aug 22 03:22:41 1999
|
||||
+++ scripts/init.sl Sat Jan 6 21:23:30 2001
|
||||
@@ -56,7 +56,7 @@
|
||||
return;
|
||||
}
|
||||
variable w = vf_write(irc_server, st);
|
||||
- if (w == strlen(st)) return;
|
||||
+ if (w >= strlen(st)) return;
|
||||
irc_Inff("incomplete server write: %d/%d",w,strlen(st));
|
||||
% () = fflush(irc_server);
|
||||
}
|
40
japanese/slirc/files/patch-slirc.c
Normal file
40
japanese/slirc/files/patch-slirc.c
Normal file
@ -0,0 +1,40 @@
|
||||
--- slirc.c.orig Tue Aug 24 00:15:11 1999
|
||||
+++ slirc.c Sat Jan 6 21:23:30 2001
|
||||
@@ -8,6 +8,9 @@
|
||||
#include <signal.h>
|
||||
|
||||
#include <slang.h>
|
||||
+#ifdef KANJI
|
||||
+#include <slkanji.h>
|
||||
+#endif
|
||||
|
||||
#include "slirc.h"
|
||||
|
||||
@@ -135,7 +138,16 @@
|
||||
char *cp,*pm;
|
||||
char stop, ch;
|
||||
|
||||
+#ifdef KANJI
|
||||
+ char *KBuf;
|
||||
+ int KSiz;
|
||||
+ KSiz = strlen(cp0);
|
||||
+ KBuf = kSLCodeConv(cp0, &KSiz, JIS, kSLcode, 1);
|
||||
+ cp = strmcpy(RBuf, KBuf, sizeof(RBuf));
|
||||
+ SLfree(KBuf);
|
||||
+#else
|
||||
cp = strmcpy(RBuf, cp0, sizeof(RBuf));
|
||||
+#endif
|
||||
/* now cp points to the terminating null in RBuf */
|
||||
while(1) {
|
||||
if (cp > RBuf && *(cp-1) == '\n') { /* back up past '\n' if is one. */
|
||||
@@ -1031,6 +1043,10 @@
|
||||
}
|
||||
SLsmg_init_smg(); /* this does get_screen_size inside. */
|
||||
SLang_set_abort_signal(NULL);
|
||||
+#ifdef KANJI
|
||||
+ kSLcode = EUC;
|
||||
+ init_SLKanji();
|
||||
+#endif
|
||||
InitMainScreen();
|
||||
SLang_VMessage_Hook = Local_vmessage;
|
||||
SLang_Load_File_Hook = Local_SLang_load_file;
|
50
japanese/slirc/files/patch-vfile-module.c
Normal file
50
japanese/slirc/files/patch-vfile-module.c
Normal file
@ -0,0 +1,50 @@
|
||||
--- vfile-module.c.orig Tue Aug 24 00:08:56 1999
|
||||
+++ vfile-module.c Sat Jan 6 21:53:38 2001
|
||||
@@ -54,6 +54,9 @@
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <slang.h>
|
||||
+#ifdef KANJI
|
||||
+#include <slkanji.h>
|
||||
+#endif
|
||||
|
||||
/* we need stripped-down version of SLang_Object_Type for cookies: */
|
||||
typedef struct {
|
||||
@@ -1331,6 +1334,9 @@
|
||||
unsigned long ip;
|
||||
void *data;
|
||||
char *s = NULL;
|
||||
+#ifdef KANJI
|
||||
+ char *s2 = NULL;
|
||||
+#endif
|
||||
SLang_BString_Type *bs = NULL;
|
||||
SLang_Array_Type *at = NULL;
|
||||
SLang_MMT_Type *mmt = NULL;
|
||||
@@ -1351,8 +1357,15 @@
|
||||
case SLANG_STRING_TYPE:
|
||||
if (SLang_pop_slstring(&s)) return -1;
|
||||
type = strlen(s);
|
||||
+#ifdef KANJI
|
||||
+ s2 = kSLCodeConv(s,&type,kSLcode,JIS,0);
|
||||
+ type = strlen(s2);
|
||||
+ if (len < 0 || len > type) len = type;
|
||||
+ data = s2;
|
||||
+#else
|
||||
if (len < 0 || len > type) len = type;
|
||||
data = s;
|
||||
+#endif
|
||||
break;
|
||||
case SLANG_BSTRING_TYPE:
|
||||
if (SLang_pop_bstring(&bs)) return -1;
|
||||
@@ -1397,6 +1410,11 @@
|
||||
if (at) SLang_free_array (at);
|
||||
if (bs) SLbstring_free(bs);
|
||||
SLang_free_slstring(s); /* NULL is ok */
|
||||
+#ifdef KANJI
|
||||
+ if(s2 != NULL)
|
||||
+ SLfree(s2);
|
||||
+#endif
|
||||
+
|
||||
if (mmt) SLang_free_mmt(mmt);
|
||||
return ct;
|
||||
}
|
44
japanese/slirc/files/patch-windoze.c
Normal file
44
japanese/slirc/files/patch-windoze.c
Normal file
@ -0,0 +1,44 @@
|
||||
--- windoze.c.orig Sun Aug 22 20:15:00 1999
|
||||
+++ windoze.c Sat Jan 6 21:23:35 2001
|
||||
@@ -15,6 +15,9 @@
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <slang.h>
|
||||
+#ifdef KANJI
|
||||
+#include <slkanji.h>
|
||||
+#endif
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include "slirc.h"
|
||||
@@ -124,7 +127,19 @@
|
||||
while (*p && isspace(*p)) p++ ;
|
||||
q = p;
|
||||
if (*p) {
|
||||
+#ifdef KANJI
|
||||
+ for (q = p; q < (p+tw); q++) {
|
||||
+ if(iskanji(*q)) {
|
||||
+ q++;
|
||||
+ }
|
||||
+ }
|
||||
+ if (q > (p+tw)) {
|
||||
+ q -= 2;
|
||||
+ }
|
||||
+ if (q > txth) q = txth;
|
||||
+#else
|
||||
q += tw; if (q > txth) q = txth;
|
||||
+#endif
|
||||
/* go back up to 1/3 of text-width looking for a word-break */
|
||||
if (*q && !isspace(*q)) {
|
||||
char *r,*rlow;
|
||||
@@ -256,6 +271,11 @@
|
||||
} else if (*cp == CTRL_O) {
|
||||
bold = 0;
|
||||
SLsmg_set_color(ColNorm);
|
||||
+#ifdef KANJI
|
||||
+ } else if (iskanji(*cp)){
|
||||
+ SLsmg_write_nstring(cp,2);
|
||||
+ cp++;
|
||||
+#endif
|
||||
} else if (*cp != '')
|
||||
SLsmg_write_char(*cp);
|
||||
}
|
Loading…
Reference in New Issue
Block a user