mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-14 23:35:24 +01:00
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.
This commit is contained in:
parent
71505bc8b9
commit
192221af22
10 changed files with 400 additions and 0 deletions
20
dev-utils/m2-functions/require.c
Normal file
20
dev-utils/m2-functions/require.c
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2016 Jeremiah Orians
|
||||
* SPDX-FileCopyrightText: 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
|
||||
void file_print(char* s, FILE* f);
|
||||
|
||||
void require(int bool, char* error)
|
||||
{
|
||||
if(!bool)
|
||||
{
|
||||
file_print(error, stderr);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue