Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/lib/libc/citrus Pull up revision 1.7 (requested by yamt...
details: https://anonhg.NetBSD.org/src/rev/ef4c69d66530
branches: netbsd-1-6
changeset: 530244:ef4c69d66530
user: tron <tron%NetBSD.org@localhost>
date: Mon Jun 02 15:00:34 2003 +0000
description:
Pull up revision 1.7 (requested by yamt in ticket #1202):
when s==0, wctomb should initialize its internal state and return if
encodings have state dependency or not.
a patch provided with PR 18269 by wurlitzer.
modified by me.
fix part of PR 18269.
diffstat:
lib/libc/citrus/citrus_none.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 7ad04448c8ee -r ef4c69d66530 lib/libc/citrus/citrus_none.c
--- a/lib/libc/citrus/citrus_none.c Mon Jun 02 15:00:28 2003 +0000
+++ b/lib/libc/citrus/citrus_none.c Mon Jun 02 15:00:34 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_none.c,v 1.4.2.2 2003/06/02 14:59:32 tron Exp $ */
+/* $NetBSD: citrus_none.c,v 1.4.2.3 2003/06/02 15:00:34 tron Exp $ */
/*-
* Copyright (c)2002 Citrus Project,
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_none.c,v 1.4.2.2 2003/06/02 14:59:32 tron Exp $");
+__RCSID("$NetBSD: citrus_none.c,v 1.4.2.3 2003/06/02 15:00:34 tron Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@@ -291,6 +291,15 @@
int ret;
size_t nr;
+ if (s == 0) {
+ /*
+ * initialize state here.
+ * (nothing to do for us.)
+ */
+ *nresult = 0; /* we're state independent */
+ return (0);
+ }
+
ret = _citrus_NONE_ctype_wcrtomb(cl, s, wc, NULL, &nr);
*nresult = (int)nr;
Home |
Main Index |
Thread Index |
Old Index