From aquatique@rusunix.org  Fri Oct  3 07:05:06 2003
Return-Path: <aquatique@rusunix.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 8B86316A4BF; Fri,  3 Oct 2003 07:05:06 -0700 (PDT)
Received: from rusunix.org (rusunix.org [195.162.58.254])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 6A1DA43FA3; Fri,  3 Oct 2003 07:05:05 -0700 (PDT)
	(envelope-from aquatique@rusunix.org)
Received: by rusunix.org (CommuniGay Pro, from userid 1111)
	id A6FA21CDA81; Fri,  3 Oct 2003 21:05:02 +0700 (OMSST)
Message-Id: <20031003140502.A6FA21CDA81@rusunix.org>
Date: Fri,  3 Oct 2003 21:05:02 +0700 (OMSST)
From: Evgueni V.Gavrilov <aquatique@rusunix.org>
Reply-To: <aquatique@rusunix.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: krion@FreeBSD.org
Subject: add patch for recoding actions in 8-bit terminals (from silc CVS)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>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:    krion
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 03 07:10:13 PDT 2003
>Closed-Date:    Fri Oct 03 07:38:46 PDT 2003
>Last-Modified:  Fri Oct 03 07:38:46 PDT 2003
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->krion 
Responsible-Changed-By: krion 
Responsible-Changed-When: Fri Oct 3 07:22:56 PDT 2003 
Responsible-Changed-Why:  
I'll handle this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=57537 
State-Changed-From-To: open->closed 
State-Changed-By: krion 
State-Changed-When: Fri Oct 3 07:38:40 PDT 2003 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=57537 
>Unformatted:
