Skip site navigation (1)Skip section navigation (2)
Date:      Fri,  3 Oct 2003 21:05:02 +0700 (OMSST)
From:      "Evgueni V.Gavrilov" <aquatique@rusunix.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        krion@FreeBSD.org
Subject:   ports/57537: add patch for recoding actions in 8-bit terminals (from silc CVS)
Message-ID:  <20031003140502.A6FA21CDA81@rusunix.org>
Resent-Message-ID: <200310031410.h93EAEuU043560@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         57537
>Category:       ports
>Synopsis:       add patch for recoding actions in 8-bit terminals (from silc CVS)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 03 07:10:13 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Evgueni V. Gavrilov
>Release:        FreeBSD 4.9-RC i386
>Organization:
rusunix.org
>Environment:
System: FreeBSD rusunix.org 4.9-RC FreeBSD 4.9-RC #0: Wed Oct 1 18:14:58 OMSST 2003 root@rusunix.org:/usr/obj/usr/src/sys/NEWMONSTER i386


>Description:
	add patch for recoding actions in 8-bit terminals (from silc CVS)
>How-To-Repeat:
	patch <
>Fix:

diff -ruN silc-client.orig/files/patch-action-utf-8-fix silc-client/files/patch-action-utf-8-fix
--- silc-client.orig/files/patch-action-utf-8-fix	Thu Jan  1 06:00:00 1970
+++ silc-client/files/patch-action-utf-8-fix	Fri Oct  3 20:47:57 2003
@@ -0,0 +1,33 @@
+diff --unified --recursive silc-client-0.9.10.1/irssi/src/silc/core/client_ops.c silc-client-0.9.10.1.db/irssi/src/silc/core/client_ops.c
+--- irssi/src/silc/core/client_ops.c.orig	Thu Dec  5 15:37:49 2002
++++ irssi/src/silc/core/client_ops.c	Tue Sep  9 18:41:57 2003
+@@ -312,9 +312,26 @@
+   /* FIXME: replace those printformat calls with signals and add signature
+             information to them (if present) */
+   if (flags & SILC_MESSAGE_FLAG_ACTION)
+-    printformat_module("fe-common/silc", server, channel->channel_name,
+-		       MSGLEVEL_ACTIONS, SILCTXT_CHANNEL_ACTION, 
+-                       nick == NULL ? "[<unknown>]" : nick->nick, message);
++    if(flags & SILC_MESSAGE_FLAG_UTF8 && !silc_term_utf8()) {
++      char tmp[256], *cp, *dm = NULL;
++      memset(tmp, 0, sizeof(tmp));
++      cp = tmp;
++      if(message_len > sizeof(tmp) - 1) {
++        dm = silc_calloc(message_len + 1, sizeof(*dm));
++        cp = dm;
++      }
++      silc_utf8_decode(message, message_len, SILC_STRING_LANGUAGE,
++                       cp, message_len);
++      printformat_module("fe-common/silc", server, channel->channel_name,
++                         MSGLEVEL_ACTIONS, SILCTXT_CHANNEL_ACTION,
++                         nick == NULL ? "[<unknown>]" : nick->nick, cp);
++      silc_free(dm);
++    } else {
++      printformat_module("fe-common/silc", server, channel->channel_name,
++                         MSGLEVEL_ACTIONS, SILCTXT_CHANNEL_ACTION,
++                         nick == NULL ? "[<unknown>]" : nick->nick,
++                         message);
++    }
+   else if (flags & SILC_MESSAGE_FLAG_NOTICE)
+     printformat_module("fe-common/silc", server, channel->channel_name,
+ 		       MSGLEVEL_NOTICES, SILCTXT_CHANNEL_NOTICE, 


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031003140502.A6FA21CDA81>