annotate modules/fstrcmp @ 17896:29ead46d1cca

fstrcmp: don't assume strlen < INT_MAX * lib/fstrcmp.c: Include stddef.h and stdint.h. (uintptr_t): Remove, as we're now assuming stdint. (OFFSET, EXTRA_CONTEXT_FIELDS, fstrcmp_bounded): Prefer ptrdiff_t to int when the value could exceed INT_MAX if the input string is long. (fstrcmp_bounded): Check for size-calculation overflow. Prefer uintptr_t to size_t when the underlying value is a pointer casted to an unsigned integer. Avoid unnecessary 'buffer != NULL' test. * modules/fstrcmp (Depends-on): Add stdint.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 07 Feb 2015 18:09:00 -0800
parents 1f14c6dd175d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9151
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 Description:
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2 Fuzzy string comparison.
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 Files:
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 lib/fstrcmp.h
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 lib/fstrcmp.c
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 Depends-on:
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 diffseq
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 lock
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 tls
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 minmax
17896
29ead46d1cca fstrcmp: don't assume strlen < INT_MAX
Paul Eggert <eggert@cs.ucla.edu>
parents: 17713
diff changeset
13 stdint
9151
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 xalloc
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 configure.ac:
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 Makefile.am:
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 lib_SOURCES += fstrcmp.h fstrcmp.c
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 Include:
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 "fstrcmp.h"
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 License:
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 GPL
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26
8c5ddfde42d6 Fuzzy string comparison.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 Maintainer:
17713
1f14c6dd175d Bruno Haible has stepped down as maintainer.
Paul Eggert <eggert@cs.ucla.edu>
parents: 9151
diff changeset
28 all