X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmbschr.c;h=d66dae854a9d3511d930fbeb7ec55380c6d07fbc;hb=c836e5b28785da88e1a99940f30b020f6d66414b;hp=ec1ebac053930b7b4b90b90413a4510f90e72a5b;hpb=4eda4ba54f3cf29f6b7fe4458e719cd2325be4c4;p=gnulib.git diff --git a/lib/mbschr.c b/lib/mbschr.c index ec1ebac05..d66dae854 100644 --- a/lib/mbschr.c +++ b/lib/mbschr.c @@ -1,5 +1,5 @@ /* Searching a string for a character. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2013 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software: you can redistribute it and/or modify @@ -29,20 +29,20 @@ mbschr (const char *string, int c) { if (MB_CUR_MAX > 1 /* Optimization: We know that ASCII characters < 0x30 don't occur as - part of multibyte characters longer than 1 byte. Hence, if c < 0x30, - the faster unibyte loop can be used. */ + part of multibyte characters longer than 1 byte. Hence, if c < 0x30, + the faster unibyte loop can be used. */ && (unsigned char) c >= 0x30) { mbui_iterator_t iter; for (mbui_init (iter, string);; mbui_advance (iter)) - { - if (!mbui_avail (iter)) - goto notfound; - if (mb_len (mbui_cur (iter)) == 1 - && (unsigned char) * mbui_cur_ptr (iter) == (unsigned char) c) - break; - } + { + if (!mbui_avail (iter)) + goto notfound; + if (mb_len (mbui_cur (iter)) == 1 + && (unsigned char) * mbui_cur_ptr (iter) == (unsigned char) c) + break; + } return (char *) mbui_cur_ptr (iter); notfound: return NULL;