Line data Source code
1 : /* File: u8_u64.inl; Copyright and License: see below */
2 :
3 : #include <assert.h>
4 :
5 2 : static inline void u8_u64_get_hex ( const uint64_t value, u8_u64_hex_t *out_hex )
6 : {
7 2 : assert( out_hex != NULL );
8 : /* Note: snprintf is not available on every OS */
9 2 : sprintf( &((*out_hex)[0]), "%" PRIx64, value );
10 2 : }
11 :
12 1 : static inline void u8_u64_get_dec ( const uint64_t value, u8_u64_dec_t *out_dec )
13 : {
14 1 : assert( out_dec != NULL );
15 : /* Note: snprintf is not available on every OS */
16 1 : sprintf( &((*out_dec)[0]), "%" PRIu64, value );
17 1 : }
18 :
19 :
20 : /*
21 : Copyright 2025-2025 Andreas Warnke
22 :
23 : Licensed under the Apache License, Version 2.0 (the "License");
24 : you may not use this file except in compliance with the License.
25 : You may obtain a copy of the License at
26 :
27 : http://www.apache.org/licenses/LICENSE-2.0
28 :
29 : Unless required by applicable law or agreed to in writing, software
30 : distributed under the License is distributed on an "AS IS" BASIS,
31 : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32 : See the License for the specific language governing permissions and
33 : limitations under the License.
34 : */
|