1 /* 2 Copyright (C) 2015-2021, Dirk Krause 3 SPDX-License-Identifier: BSD-3-Clause 4 */ 5 6 /* 7 WARNING: This file was generated by the dkct program (see 8 http://dktools.sourceforge.net/ for details). 9 Changes you make here will be lost if dkct is run again! 10 You should modify the original source and run dkct on it. 11 Original source: dk4maidhui.ctr 12 */ 13 14 #ifndef DK4MAIDHUI_H_INCLUDED 15 /** Avoid multiple inclusions. */ 16 #define DK4MAIDHUI_H_INCLUDED 1 17 18 19 /** @file 20 Retrieve unsigned int value from 21 dkChar string in hexadecimal notation. 22 */ 23 24 #ifndef DK4CONF_H_INCLUDED 25 #if DK4_BUILDING_DKTOOLS4 26 #include "dk4conf.h" 27 #else 28 #include <dktools-4/dk4conf.h> 29 #endif 30 #endif 31 32 #ifndef DK4TYPES_H_INCLUDED 33 #if DK4_BUILDING_DKTOOLS4 34 #include <libdk4base/dk4types.h> 35 #else 36 #include <dktools-4/dk4types.h> 37 #endif 38 #endif 39 40 #ifndef DK4ERROR_H_INCLUDED 41 #if DK4_BUILDING_DKTOOLS4 42 #include <libdk4base/dk4error.h> 43 #else 44 #include <dktools-4/dk4error.h> 45 #endif 46 #endif 47 48 #ifdef __cplusplus 49 extern "C" { 50 #endif 51 52 /** Retrieve numeric value from string, hexadecimal notation. 53 @param rp Pointer to result variable for the found value. 54 @param src String to check for numeric value. 55 @param endptr Address of pointer variable. 56 A pointer to the first character not processed 57 is stored here. 58 The function may also store a NULL pointer in this 59 variable. 60 @param atg Allow trailing garbage: 61 0=no unprocessable trailing bytes allowed, 62 1=trailing whitespaces allowed, 63 2=any trailing characters allowed. 64 @param erp Error report, may be NULL. 65 @return 1 on success, 0 on error. 66 67 Error codes: 68 DK4_E_INVALID_ARGUMENTS if rp or src is NULL, 69 DK4_E_MATH_OVERFLOW if the number is out of range, or 70 DK4_E_SYNTAX if src contains illegal characters. 71 */ 72 int 73 dk4ma_input_dk_hex_uint( 74 unsigned *rp, 75 const dkChar *src, 76 const dkChar **endptr, 77 int atg, 78 dk4_er_t *erp 79 ); 80 81 #ifdef __cplusplus 82 } 83 #endif 84 85 86 87 88 #endif 89