blob: 64347d1cd4c1de14379ad0dd856fd2f5e40e91ca (
plain) (
tree)
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
// SPDX-FileCopyrightText: 2020 Alyssa Ross <hi@alyssa.is>
#include <stdint.h>
// Strictly parse an integer from a string. The integer must span the
// whole string, not have any leading + or zeros, and be between min
// and max (inclusive).
int getu32(const char *s, uint32_t min, uint32_t max, uint32_t *out);
int getul(const char *s, unsigned long min, unsigned long max,
unsigned long *out);
|