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/dk4rec01.ctr | |
parent | ac690ca29ad5bf8a5203a65fd6252f7b564f4727 (diff) |
CTAN sync 202009200303
Diffstat (limited to 'support/dktools/dk4rec01.ctr')
-rw-r--r-- | support/dktools/dk4rec01.ctr | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/support/dktools/dk4rec01.ctr b/support/dktools/dk4rec01.ctr index 32ffcbd6cc..fc223ca80e 100644 --- a/support/dktools/dk4rec01.ctr +++ b/support/dktools/dk4rec01.ctr @@ -2,7 +2,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 #ifdef __cplusplus @@ -56,9 +68,16 @@ dk4recode_ascii_to_ansi( %% module +#include "dk4conf.h" #include "dk4rec01.h" #include "dk4ansi.h" +#if DK4_HAVE_ASSERT_H +#ifndef ASSERT_H_INCLUDED +#include <assert.h> +#define ASSERT_H_INCLUDED 1 +#endif +#endif int @@ -70,6 +89,11 @@ dk4recode_ascii_to_ansi( dk4_c32_t c32 = dkC32(0); int back = 0; unsigned char uc = '\0'; +#if DK4_USE_ASSERT + assert(NULL != dstb); + assert(0 < szdstb); + assert(NULL != src); +#endif if ((NULL != dstb) && (0 < szdstb) && (NULL != src)) { back = 1; while(('\0' != *src) && (1 == back) && (used < szdstb)) { |