From owner-cvs-ports@FreeBSD.ORG Sun Aug 31 08:31:02 2008 Return-Path: Delivered-To: cvs-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9ADF1065681; Sun, 31 Aug 2008 08:31:02 +0000 (UTC) (envelope-from chinsan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B81728FC0C; Sun, 31 Aug 2008 08:31:02 +0000 (UTC) (envelope-from chinsan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7V8V2uK095791; Sun, 31 Aug 2008 08:31:02 GMT (envelope-from chinsan@repoman.freebsd.org) Received: (from chinsan@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7V8V2VH095790; Sun, 31 Aug 2008 08:31:02 GMT (envelope-from chinsan) Message-Id: <200808310831.m7V8V2VH095790@repoman.freebsd.org> From: Chin-San Huang Date: Sun, 31 Aug 2008 08:31:02 +0000 (UTC) To: ports-committers@FreeBSD.org, cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: ports/textproc Makefile ports/textproc/p5-Text-CharWidth Makefile distinfo pkg-descr pkg-plist X-BeenThere: cvs-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2008 08:31:02 -0000 chinsan 2008-08-31 08:31:02 UTC FreeBSD ports repository Modified files: textproc Makefile Added files: textproc/p5-Text-CharWidth Makefile distinfo pkg-descr pkg-plist Log: Add p5-Text-CharWidth, get number of occupied columns of a string on terminal. This module supplies features similar as wcwidth(3) and wcswidth(3) in C language. Characters have its own width on terminal depending on locale. For example, ASCII characters occupy one column per character, east Asian fullwidth characters (like Hiragana or Han Ideograph) occupy two columns per character, and combining characters (apperaring in ISO-8859-11 Thai, Unicode, and so on) occupy zero columns per character. mbwidth() gives the width of the first character of the given string and mbswidth() gives the width of the whole given string. The names of mbwidth and mbswidth came from "multibyte" versions of wcwidth and wcswidth which are "wide character" versions. mblen(string) returns number of bytes of the first character of the string. Please note that a character may consist of multiple bytes in multibyte encodings such as UTF-8, EUC-JP, EUC-KR, GB2312, or Big5. mbwidth(string) returns the width of the first character of the string. mbswidth(string) returns the width of the whole string. Parameters are to be given in locale encodings, not always in UTF-8. WWW: http://search.cpan.org/dist/Text-CharWidth/ Revision Changes Path 1.1261 +1 -0 ports/textproc/Makefile 1.1 +21 -0 ports/textproc/p5-Text-CharWidth/Makefile (new) 1.1 +3 -0 ports/textproc/p5-Text-CharWidth/distinfo (new) 1.1 +24 -0 ports/textproc/p5-Text-CharWidth/pkg-descr (new) 1.1 +7 -0 ports/textproc/p5-Text-CharWidth/pkg-plist (new)