Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add MB_CUR_MAX_L.
details: https://anonhg.NetBSD.org/src/rev/d9f032913937
branches: trunk
changeset: 786193:d9f032913937
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Apr 19 14:35:31 2013 +0000
description:
Add MB_CUR_MAX_L.
diffstat:
include/stdlib.h | 4 +++-
lib/libc/locale/multibyte_amd1.c | 16 +++++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
diffs (59 lines):
diff -r 3ac7aea0c3f3 -r d9f032913937 include/stdlib.h
--- a/include/stdlib.h Fri Apr 19 14:05:12 2013 +0000
+++ b/include/stdlib.h Fri Apr 19 14:35:31 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: stdlib.h,v 1.103 2013/04/18 22:22:20 joerg Exp $ */
+/* $NetBSD: stdlib.h,v 1.104 2013/04/19 14:35:31 joerg Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -352,6 +352,8 @@
quad_t strtoq_l(const char * __restrict, char ** __restrict, int, locale_t);
u_quad_t strtouq_l(const char * __restrict, char ** __restrict, int, locale_t);
+size_t _mb_cur_max_l(locale_t);
+#define MB_CUR_MAX_L(loc) _mb_cur_max_l(loc)
int mblen_l(const char *, size_t, locale_t);
size_t mbstowcs_l(wchar_t * __restrict, const char * __restrict, size_t,
locale_t);
diff -r 3ac7aea0c3f3 -r d9f032913937 lib/libc/locale/multibyte_amd1.c
--- a/lib/libc/locale/multibyte_amd1.c Fri Apr 19 14:05:12 2013 +0000
+++ b/lib/libc/locale/multibyte_amd1.c Fri Apr 19 14:35:31 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: multibyte_amd1.c,v 1.10 2013/04/18 23:24:27 joerg Exp $ */
+/* $NetBSD: multibyte_amd1.c,v 1.11 2013/04/19 14:35:33 joerg Exp $ */
/*-
* Copyright (c)2002, 2008 Citrus Project,
@@ -28,13 +28,14 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: multibyte_amd1.c,v 1.10 2013/04/18 23:24:27 joerg Exp $");
+__RCSID("$NetBSD: multibyte_amd1.c,v 1.11 2013/04/19 14:35:33 joerg Exp $");
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <assert.h>
#include <errno.h>
#include <langinfo.h>
+#include <stdlib.h>
#define __SETLOCALE_SOURCE__
#include <locale.h>
#include <wchar.h>
@@ -254,4 +255,13 @@
wctob(wint_t wc)
{
return wctob_l(wc, *_current_locale());
-}
\ No newline at end of file
+}
+
+size_t
+_mb_cur_max_l(locale_t loc)
+{
+ if (loc == NULL)
+ loc = _C_locale;
+
+ return _citrus_ctype_get_mb_cur_max(_CITRUS_CTYPE(loc));
+}
Home |
Main Index |
Thread Index |
Old Index