diff options
| author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-02-12 11:07:18 +0000 |
|---|---|---|
| committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-02-12 11:07:18 +0000 |
| commit | bd7029a99b0c2974265c6665638ef14a052f42ab (patch) | |
| tree | f5661ba73366d81ef6e91f889ea7fec5ebe07b6b /gl/regex_internal.c | |
| parent | f99612320d6eda67644c07be04bb21aa4d7789db (diff) | |
| download | monitoring-plugins-bd7029a99b0c2974265c6665638ef14a052f42ab.tar.gz | |
Sync to latest Gnulib
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1925 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'gl/regex_internal.c')
| -rw-r--r-- | gl/regex_internal.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gl/regex_internal.c b/gl/regex_internal.c index 78e16f33..cf3bf1bb 100644 --- a/gl/regex_internal.c +++ b/gl/regex_internal.c | |||
| @@ -1,11 +1,12 @@ | |||
| 1 | /* Extended regular expression matching and search library. | 1 | /* Extended regular expression matching and search library. |
| 2 | Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software |
| 3 | Foundation, Inc. | ||
| 3 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. | 5 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. |
| 5 | 6 | ||
| 6 | This program is free software; you can redistribute it and/or modify | 7 | This program is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 8 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 2, or (at your option) | 9 | the Free Software Foundation; either version 3, or (at your option) |
| 9 | any later version. | 10 | any later version. |
| 10 | 11 | ||
| 11 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, |
| @@ -706,7 +707,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) | |||
| 706 | 707 | ||
| 707 | if (pstr->is_utf8) | 708 | if (pstr->is_utf8) |
| 708 | { | 709 | { |
| 709 | const unsigned char *raw, *p, *q, *end; | 710 | const unsigned char *raw, *p, *end; |
| 710 | 711 | ||
| 711 | /* Special case UTF-8. Multi-byte chars start with any | 712 | /* Special case UTF-8. Multi-byte chars start with any |
| 712 | byte other than 0x80 - 0xbf. */ | 713 | byte other than 0x80 - 0xbf. */ |
| @@ -735,13 +736,11 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) | |||
| 735 | unsigned char buf[6]; | 736 | unsigned char buf[6]; |
| 736 | size_t mbclen; | 737 | size_t mbclen; |
| 737 | 738 | ||
| 738 | q = p; | ||
| 739 | if (BE (pstr->trans != NULL, 0)) | 739 | if (BE (pstr->trans != NULL, 0)) |
| 740 | { | 740 | { |
| 741 | int i = mlen < 6 ? mlen : 6; | 741 | int i = mlen < 6 ? mlen : 6; |
| 742 | while (--i >= 0) | 742 | while (--i >= 0) |
| 743 | buf[i] = pstr->trans[p[i]]; | 743 | buf[i] = pstr->trans[p[i]]; |
| 744 | q = buf; | ||
| 745 | } | 744 | } |
| 746 | /* XXX Don't use mbrtowc, we know which conversion | 745 | /* XXX Don't use mbrtowc, we know which conversion |
| 747 | to use (UTF-8 -> UCS4). */ | 746 | to use (UTF-8 -> UCS4). */ |
