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: dk4mai8dli.ctr
12 */
13 
14 #ifndef DK4MAI8DLI_H_INCLUDED
15 /** Avoid multiple inclusions. */
16 #define DK4MAI8DLI_H_INCLUDED 1
17 
18 
19 /**	@file
20 	Retrieve long long value from
21 	8 bit character string in decimal 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 #if DK4_HAVE_LONG_LONG
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 
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 /**	Retrieve numeric value from string, decimal notation.
57 	@param	rp	Pointer to result variable for the found value.
58 	@param	src	String to check for numeric value.
59 	@param	endptr	Address of pointer variable.
60 			A pointer to the first character not processed
61 			is stored here.
62 			The function may also store a NULL pointer in this
63 			variable.
64 			The variable points to the correct error position
65 			only if er.ec is DK4_E_SYNTAX.
66 	@param	atg	Allow trailing garbage:
67 			0=no unprocessable trailing bytes allowed,
68 			1=trailing whitespaces allowed,
69 			2=any trailing characters allowed.
70 	@param	erp	Error report, may be NULL.
71 	@return	1 on success, 0 on error.
72 
73 	Error codes:
74 	DK4_E_INVALID_ARGUMENTS	if rp or src is NULL,
75 	DK4_E_MATH_OVERFLOW	if the number is out of range, or
76 	DK4_E_SYNTAX		if src contains illegal characters.
77 */
78 int
79 dk4ma_input_c8_dec_ll(
80   long long	 *rp,
81   const char	 *src,
82   const char	**endptr,
83   int		  atg,
84   dk4_er_t	 *erp
85 );
86 
87 #ifdef __cplusplus
88 }
89 #endif
90 
91 #endif
92 
93 
94 #endif
95