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: dk4maiwhdi.ctr 12 */ 13 14 #ifndef DK4MAIWHDI_H_INCLUDED 15 /** Avoid multiple inclusions. */ 16 #define DK4MAIWHDI_H_INCLUDED 1 17 18 19 /** @file 20 Retrieve dk4_im_t value from 21 wchar_t string in hexadecimal notation. 22 23 CRT on Windows: Optional, disabling CRT degrades performance. 24 */ 25 26 #ifndef DK4CONF_H_INCLUDED 27 #if DK4_BUILDING_DKTOOLS4 28 #include "dk4conf.h" 29 #else 30 #include <dktools-4/dk4conf.h> 31 #endif 32 #endif 33 34 #ifndef DK4TYPES_H_INCLUDED 35 #if DK4_BUILDING_DKTOOLS4 36 #include <libdk4base/dk4types.h> 37 #else 38 #include <dktools-4/dk4types.h> 39 #endif 40 #endif 41 42 #ifndef DK4ERROR_H_INCLUDED 43 #if DK4_BUILDING_DKTOOLS4 44 #include <libdk4base/dk4error.h> 45 #else 46 #include <dktools-4/dk4error.h> 47 #endif 48 #endif 49 50 #ifdef __cplusplus 51 extern "C" { 52 #endif 53 54 /** Retrieve numeric value from string, hexadecimal notation. 55 @param rp Pointer to result variable for the found value. 56 @param src String to check for numeric value. 57 @param endptr Address of pointer variable. 58 A pointer to the first character not processed 59 is stored here. 60 The function may also store a NULL pointer in this 61 variable. 62 The variable points to the correct error position 63 only if er.ec is DK4_E_SYNTAX. 64 @param atg Allow trailing garbage: 65 0=no unprocessable trailing bytes allowed, 66 1=trailing whitespaces allowed, 67 2=any trailing characters allowed. 68 @param erp Error report, may be NULL. 69 @return 1 on success, 0 on error. 70 71 Error codes: 72 DK4_E_INVALID_ARGUMENTS if rp or src is NULL, 73 DK4_E_MATH_OVERFLOW if the number is out of range, or 74 DK4_E_SYNTAX if src contains illegal characters. 75 */ 76 int 77 dk4ma_input_wc_hex_dk4_im_t( 78 dk4_im_t *rp, 79 const wchar_t *src, 80 const wchar_t **endptr, 81 int atg, 82 dk4_er_t *erp 83 ); 84 85 #ifdef __cplusplus 86 } 87 #endif 88 89 90 91 92 #endif 93