Introduce strncmp_iw
The explicit locations completer patch will need a strncmp_iw
function, that to strcmp_iw like strncmp is to strcmp. This patch
implements it.
(Unit tests added a bit further down in this series will exercise
this.)
gdb/ChangeLog:
2017-07-17 Pedro Alves <palves@redhat.com>
* utils.c (enum class strncmp_iw_mode): New.
(strcmp_iw): Rename to ...
(strncmp_iw_with_mode): ... this. Add string2_len and mode
parameters. Handle them.
(strncmp_iw): New.
(strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
* utils.h (strncmp_iw): Declare.
(strcmp_iw): Move describing comments here.