From owner-cvs-src@FreeBSD.ORG Fri Oct 31 21:13:14 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E201A16A4CE; Fri, 31 Oct 2003 21:13:14 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57F4743FBD; Fri, 31 Oct 2003 21:13:14 -0800 (PST) (envelope-from tjr@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hA15DEXJ085149; Fri, 31 Oct 2003 21:13:14 -0800 (PST) (envelope-from tjr@repoman.freebsd.org) Received: (from tjr@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hA15DEHm085148; Fri, 31 Oct 2003 21:13:14 -0800 (PST) (envelope-from tjr) Message-Id: <200311010513.hA15DEHm085148@repoman.freebsd.org> From: "Tim J. Robbins" Date: Fri, 31 Oct 2003 21:13:14 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libc/locale Makefile.inc mbrtowc.c none.c setrunelocale.c srune.c table.c wcrtomb.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2003 05:13:15 -0000 tjr 2003/10/31 21:13:14 PST FreeBSD src repository Modified files: lib/libc/locale Makefile.inc mbrtowc.c none.c setrunelocale.c table.c wcrtomb.c Added files: lib/libc/locale srune.c Log: Allow mbrtowc() and wcrtomb() to be implemented directly, instead of as wrappers around the deprecated 4.4BSD rune functions. This paves the way for state-dependent encodings, which the rune API does not support. - Add __emulated_sgetrune() and __emulated_sputrune(), which are implementations of sgetrune() and sputrune() in terms of mbrtowc() and wcrtomb(). - Rename the old rune-wrapper mbrtowc() and wcrtomb() functions to __emulated_mbrtowc() and __emulated_wcrtomb(). - Add __mbrtowc and __wcrtomb function pointers, which point to the current locale's conversion functions, or the __emulated versions. - Implement mbrtowc() and wcrtomb() as calls to these function pointers. - Make the "NONE" encoding implement mbrtowc() and wcrtomb() directly. All of this emulation mess will be removed, together with rune support, in FreeBSD 6. Revision Changes Path 1.48 +2 -1 src/lib/libc/locale/Makefile.inc 1.4 +18 -3 src/lib/libc/locale/mbrtowc.c 1.7 +42 -39 src/lib/libc/locale/none.c 1.32 +15 -0 src/lib/libc/locale/setrunelocale.c 1.1 +94 -0 src/lib/libc/locale/srune.c (new) 1.19 +17 -5 src/lib/libc/locale/table.c 1.5 +16 -2 src/lib/libc/locale/wcrtomb.c