X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmbschr.c;h=e6504c4d3a172f057813a49d420b1a57f73df370;hb=2c35d5c11d2359c7ebb06a3388a544cbe2f9c7f5;hp=ec1ebac053930b7b4b90b90413a4510f90e72a5b;hpb=4eda4ba54f3cf29f6b7fe4458e719cd2325be4c4;p=gnulib.git diff --git a/lib/mbschr.c b/lib/mbschr.c index ec1ebac05..e6504c4d3 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-2010 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;