Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/citrus/modules update string pointer when input is ...



details:   https://anonhg.NetBSD.org/src/rev/59f952a789fc
branches:  trunk
changeset: 770195:59f952a789fc
user:      tnozaki <tnozaki%NetBSD.org@localhost>
date:      Fri Oct 07 18:59:13 2011 +0000

description:
update string pointer when input is partial escape sequence or multibyte.

diffstat:

 lib/libc/citrus/modules/citrus_iso2022.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 8a32cfa55e29 -r 59f952a789fc lib/libc/citrus/modules/citrus_iso2022.c
--- a/lib/libc/citrus/modules/citrus_iso2022.c  Fri Oct 07 17:53:03 2011 +0000
+++ b/lib/libc/citrus/modules/citrus_iso2022.c  Fri Oct 07 18:59:13 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: citrus_iso2022.c,v 1.20 2010/12/07 22:01:45 joerg Exp $        */
+/*     $NetBSD: citrus_iso2022.c,v 1.21 2011/10/07 18:59:13 tnozaki Exp $      */
 
 /*-
  * Copyright (c)1999, 2002 Citrus Project,
@@ -30,7 +30,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_iso2022.c,v 1.20 2010/12/07 22:01:45 joerg Exp $");
+__RCSID("$NetBSD: citrus_iso2022.c,v 1.21 2011/10/07 18:59:13 tnozaki Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <assert.h>
@@ -695,7 +695,7 @@
                        if (n < sp->len) {
                                if (nmatch == n) {
                                        if (result)
-                                               *result = string;
+                                               *result = string + n;
                                        return (_ISO2022INVALID);
                                }
                        } else {
@@ -755,7 +755,7 @@
 
                /* we still need to wait for more characters to come */
                if (result)
-                       *result = string;
+                       *result = string + n;
                return (_ISO2022INVALID);
 
        case CS94:
@@ -765,7 +765,7 @@
 
                /* we still need to wait for more characters to come */
                if (result)
-                       *result = string;
+                       *result = string + n;
                return (_ISO2022INVALID);
        }
 



Home | Main Index | Thread Index | Old Index