diff options
author | Norbert Preining <norbert@preining.info> | 2020-09-20 03:03:26 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-09-20 03:03:26 +0000 |
commit | 1f457376b478257b88d4a857f5ec1b6155442dd7 (patch) | |
tree | 2a06a60551dea362cf8cb0cb0ba66c78608717c4 /support/dktools/dk4maowd.ctr | |
parent | ac690ca29ad5bf8a5203a65fd6252f7b564f4727 (diff) |
CTAN sync 202009200303
Diffstat (limited to 'support/dktools/dk4maowd.ctr')
-rw-r--r-- | support/dktools/dk4maowd.ctr | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/support/dktools/dk4maowd.ctr b/support/dktools/dk4maowd.ctr index 4e11d84993..ad0a4362b5 100644 --- a/support/dktools/dk4maowd.ctr +++ b/support/dktools/dk4maowd.ctr @@ -3,7 +3,7 @@ copyright owner = Dirk Krause copyright year = 2015-xxxx -license = bsd +SPDX-License-Identifier: BSD-3-Clause %% header @@ -14,15 +14,27 @@ license = bsd */ #ifndef DK4CONF_H_INCLUDED +#if DK4_BUILDING_DKTOOLS4 #include "dk4conf.h" +#else +#include <dktools-4/dk4conf.h> +#endif #endif #ifndef DK4TYPES_H_INCLUDED +#if DK4_BUILDING_DKTOOLS4 #include "dk4types.h" +#else +#include <dktools-4/dk4types.h> +#endif #endif #ifndef DK4ERROR_H_INCLUDED +#if DK4_BUILDING_DKTOOLS4 #include "dk4error.h" +#else +#include <dktools-4/dk4error.h> +#endif #endif @@ -32,6 +44,8 @@ extern "C" { #endif /** Write unsigned number to char string in decimal notation. + + CRT on Windows: Optional. @param dptr Pointer to buffer for string. @param sz Buffer size (number of char). @param val Value to write. @@ -45,6 +59,8 @@ dk4ma_write_wc_decimal_unsigned( ); /** Write signed number to char string in decimal notation. + + CRT on Windows: Optional. @param dptr Pointer to buffer for string. @param sz Buffer size (number of char). @param val Value to write. @@ -66,6 +82,15 @@ dk4ma_write_wc_decimal_signed( %% module +#include "dk4conf.h" + +#if DK4_HAVE_ASSERT_H +#ifndef ASSERT_H_INCLUDED +#include <assert.h> +#define ASSERT_H_INCLUDED 1 +#endif +#endif + #include "dk4maowd.h" #include "dk4numco.h" #include "dk4numl.h" @@ -88,6 +113,10 @@ dk4ma_write_wc_decimal_unsigned( int err = 0; /* Flag: Error occued */ int back = 0; /* Function result */ +#if DK4_USE_ASSERT + assert(NULL != dptr); + assert(0 < sz); +#endif if ((NULL != dptr) && (0 < sz)) { *dptr = L'\0'; } @@ -169,7 +198,10 @@ dk4ma_write_wc_decimal_signed( ) { int back = 0; - +#if DK4_USE_ASSERT + assert(NULL != dptr); + assert(0 < sz); +#endif if ((NULL != dptr) && (0 < sz)) { *dptr = L'\0'; } |