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: dk4mao8h.ctr
12 */
13 
14 #ifndef DK4MAO8H_H_INCLUDED
15 /** Avoid multiple inclusions. */
16 #define DK4MAO8H_H_INCLUDED 1
17 
18 
19 /**	@file
20 	Convert dk4_um_t / dk4_im_t
21 	to 8 bit character strings 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 
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54 /**	Write unsigned number to char string in hex notation.
55 
56 	CRT on Windows: Optional.
57 	@param	dptr	Pointer to buffer for string.
58 	@param	sz	Buffer size (number of char).
59 	@param	val	Value to write.
60 	@param	padsz	Minimum number of digits, 1 for automatic choice.
61 	@param	erp	Error report, may be NULL.
62 	@return	1 on success, 0 on error.
63 */
64 int
65 dk4ma_write_c8_hex_unsigned(
66   char *dptr, size_t sz, dk4_um_t val, size_t padsz, dk4_er_t *erp
67 );
68 
69 /**	Write signed number to char string in hex notation.
70 
71 	CRT on Windows: Optional.
72 	@param	dptr	Pointer to buffer for string.
73 	@param	sz	Buffer size (number of char).
74 	@param	val	Value to write.
75 	@param	padsz	Minimum number of digits, 1 for automatic choice.
76 	@param	erp	Error report, may be NULL.
77 	@return	1 on success, 0 on error.
78 */
79 int
80 dk4ma_write_c8_hex_signed(
81   char *dptr, size_t sz, dk4_im_t val, size_t padsz, dk4_er_t *erp
82 );
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 
89 
90 
91 #endif
92