diff options
author | Bruno Haible <bruno@clisp.org> | 2008-01-08 23:54:30 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2008-01-08 23:54:30 +0100 |
commit | 5c26c7d4ad5c61653975b68a38a59e2bec103e39 (patch) | |
tree | fb5286b65545ac2400a354df7a735ce2ea8d7653 /lib/mbscasestr.c | |
parent | dced91140ad8eb666ed6cc6192fb486dadf623bb (diff) | |
download | gnulib-5c26c7d4ad5c61653975b68a38a59e2bec103e39.tar.gz |
Document the knuth_morris_pratt calling convention better.
Diffstat (limited to 'lib/mbscasestr.c')
-rw-r--r-- | lib/mbscasestr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mbscasestr.c b/lib/mbscasestr.c index 82eb968aea..a136b21d8c 100644 --- a/lib/mbscasestr.c +++ b/lib/mbscasestr.c @@ -1,5 +1,5 @@ /* Case-insensitive searching in a string. - Copyright (C) 2005-2007 Free Software Foundation, Inc. + Copyright (C) 2005-2008 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2005. This program is free software: you can redistribute it and/or modify @@ -38,7 +38,9 @@ #if HAVE_MBRTOWC /* Knuth-Morris-Pratt algorithm. See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm - Return a boolean indicating success. */ + Return a boolean indicating success: + Return true and set *RESULTP if the search was completed. + Return false if it was aborted because not enough memory was available. */ static bool knuth_morris_pratt_multibyte (const char *haystack, const char *needle, const char **resultp) |