live-bootstrap/dev-utils/m2-functions/match.c
fosslinux 192221af22 Add fletcher16-gen developer util
1. I'm not convinced our fletcher16 implementation is proper
2. It is not in coreutils

So we add some basic code to do that.

This is also the first dev-util, so add some documentation to DEVEL.md.
2021-02-20 10:52:54 +11:00

24 lines
335 B
C

/*
* SPDX-FileCopyrightText: 2016 Jeremiah Orians
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#define FALSE 0
// CONSTANT FALSE 0
#define TRUE 1
// CONSTANT TRUE 1
int match(char* a, char* b)
{
int i = -1;
do
{
i = i + 1;
if(a[i] != b[i])
{
return FALSE;
}
} while((0 != a[i]) && (0 !=b[i]));
return TRUE;
}