.lf 1 ./man/man3/fmemcmpi.3 .\" .\" fstrcmp - fuzzy string compare library .\" Copyright (C) 2009, 2011, 2012 Peter Miller .\" Written by Peter Miller .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 3 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU .\" General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program. If not, see . .\" .ds n) fmemcmpi .TH fmemcmpi 3 .SH NAME fmemcmpi \- fuzzy comparison of two memory areas .if require_index \{ .\} .SH SYNOPSIS #include .sp 0.3 #define FSTRCMPI_IDENTICAL .br #define FSTRCMPI_THRESHOLD .br #define FSTRCMPI_ERROR .sp 0.3 int 'in +0.5i fmemcmpi(const void *data1, size_t size1, const void *data2, size_t size2); .in -0.5i .SH DESCRIPTION The \f[B]fmemcmpi\fP() function compares the two memory areas, the \f[I]size1\fP bytes pointed to by \f[I]data1\fP and the \f[I]size2\fP bytes pointed to by \f[I]data2\fP. .SH RETURN VALUE The \f[B]fmemcmpi\fP function returns an \f[B]int\fP value between 0 and FSTRCMPI_IDENTICAL. A value of 0 means the memory areas are utterly un\[hy]alike. A value of FSTRCMPI_IDENTICAL means the memory areas are identical. A value of more than FSTRCMPI_THRESHOLD (it lies between 0.0 and FSTRCMP_IDENTICAL) would be considered "similar" by most people. .PP A value of FSTRCMPI_ERROR (always negative) indicates a \f[I]malloc\fP(3) failure. .SH SEE ALSO .TP 8n \f[I]fmemcmp\fP(3) fuzzy comparison of two memory areas .TP 8n \f[I]fstrcmpi\fP(3) fuzzy comparison of two strings .TP 8n \f[I]memcmp\fP(3) compare memory areas .lf 1 ./man/man1/z_copyright.so .\" .\" fstrcmp - fuzzy string compare library .\" Copyright (C) 2009 Peter Miller .\" Written by Peter Miller .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 3 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU .\" General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with this program. If not, see . .\" .SH COPYRIGHT .lf 1 ./etc/version.so .ds v) 0.7 .ds V) 0.7.D001 .ds Y) 2009, 2011, 2012, 2014 .lf 21 ./man/man1/z_copyright.so .if n .ds C) (C) .if t .ds C) \(co fstrcmp version \*(v) .br Copyright \*(C) 2009 Peter Miller .br Peter Miller .PP The comparison code is derived from the fuzzy comparison functions in GNU Gettext 0.17. The GNU Gettext comparison functions were, in turn, derived from GNU Diff 2.7. .PP Copyright \*(C) 1988-2009 Free Software Foundation .lf 63 ./man/man3/fmemcmpi.3