X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Funistr%2Fu8-mbsnlen.c;h=913bbf0d234b2655994bbe24a07ada98ef0c4580;hb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;hp=f9a58b87f4a610e553261bb7b22fe6ecfb9d6515;hpb=3125b88ba89113a6ad39254af4cd146e822ec1d1;p=gnulib.git diff --git a/lib/unistr/u8-mbsnlen.c b/lib/unistr/u8-mbsnlen.c index f9a58b87f..913bbf0d2 100644 --- a/lib/unistr/u8-mbsnlen.c +++ b/lib/unistr/u8-mbsnlen.c @@ -1,21 +1,19 @@ /* Count characters in UTF-8 string. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc. Written by Bruno Haible , 2007. - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2, or (at your option) - any later version. + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include @@ -32,7 +30,7 @@ u8_mbsnlen (const uint8_t *s, size_t n) { int count = u8_mblen (s, n); if (count <= 0) - count = 1; + count = 1; s += count; n -= count; characters++;