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/dk-bmm.ctr | |
parent | ac690ca29ad5bf8a5203a65fd6252f7b564f4727 (diff) |
CTAN sync 202009200303
Diffstat (limited to 'support/dktools/dk-bmm.ctr')
-rw-r--r-- | support/dktools/dk-bmm.ctr | 85 |
1 files changed, 52 insertions, 33 deletions
diff --git a/support/dktools/dk-bmm.ctr b/support/dktools/dk-bmm.ctr index a4fd766c76..5a509251b4 100644 --- a/support/dktools/dk-bmm.ctr +++ b/support/dktools/dk-bmm.ctr @@ -2,7 +2,7 @@ copyright owner = Dirk Krause copyright year = 2015-xxxx -license = bsd +SPDX-License-Identifier: BSD-3-Clause @@ -124,7 +124,11 @@ license = bsd #include "dk4aopt.h" #include "dk4mpl.h" #include "dk4pathd.h" +#include "dk4unused.h" +#ifndef DK4WMAIN_H_INCLUDED +#include "dk4wmain.h" +#endif $!trace-include @@ -178,7 +182,7 @@ dk-bmm <media-file> Find number of current media in set. dk-bmm -c <media-file> Confirm successful backup to current media. dk-bmm -c -s <set-names-file> Confirm successful backup for current set. -http://dktools.sourceforge.net +http://sourceforge.net/p/dktools/wiki/dk-bmm/ $!end }; @@ -194,7 +198,8 @@ This software uses code from the following projects, either directly or as a library: dktools Dirk Krause's tools and libraries. - See http://dktools.sourceforge.net/ for more information. + See http://sourceforge.net/p/dktools/wiki/Home/ + for more information. #if DK4_HAVE_ZLIB_H zlib Data compression library. @@ -221,27 +226,28 @@ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of the Dirk Krause nor the names of contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. - -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + #if DK4_HAVE_ZLIB_H @@ -612,8 +618,9 @@ sig_pass_pointer(DK4_VOLATILE dk4_sig_atomic_t *ptr) */ static void -sig_handler_pipe(int signo) +sig_handler_pipe(int DK4_ARG_UNUSED(signo) ) { + DK4_UNUSED_ARG(signo) *sig_pass_pointer(&sig_had_pipe) = 1; } #endif @@ -623,8 +630,9 @@ sig_handler_pipe(int signo) */ static void -sig_handler_int(int signo) +sig_handler_int(int DK4_ARG_UNUSED(signo) ) { + DK4_UNUSED_ARG(signo) *sig_pass_pointer(&sig_had_int) = 1; } @@ -633,8 +641,9 @@ sig_handler_int(int signo) */ static void -sig_handler_term(int signo) +sig_handler_term(int DK4_ARG_UNUSED(signo) ) { + DK4_UNUSED_ARG(signo) *sig_pass_pointer(&sig_had_term) = 1; } @@ -658,10 +667,18 @@ sig_read_atomic(DK4_VOLATILE dk4_sig_atomic_t *ap) */ static int -sig_can_continue(int check_pipe) +sig_can_continue( +#ifdef SIGPIPE + int check_pipe +#else + int DK4_ARG_UNUSED(check_pipe) +#endif +) { int back = 1; -#ifdef SIGPIPE +#ifndef SIGPIPE + DK4_UNUSED_ARG(check_pipe) +#else if (0 != check_pipe) { if (0 != sig_read_atomic(&sig_had_pipe)) { back = 0; } } @@ -707,7 +724,7 @@ dk_bmm_sets_line_handler( void *obj, dkChar *line, dk4_um_t lineno, - dk4_er_t *erp + dk4_er_t * DK4_ARG_UNUSED(erp) ) { dk_bmm_lh_obj_t *lhoptr; @@ -719,6 +736,7 @@ dk_bmm_sets_line_handler( int res; int back = DK4_TSP_RES_FATAL; $? "+ dk_bmm_sets_line_handler %lu", (unsigned long)lineno + DK4_UNUSED_ARG(erp) lhoptr = (dk_bmm_lh_obj_t *)obj; if ((dk4_um_t)1UL == lineno) { $? ". first line" dk4str_delnl(line); @@ -747,7 +765,7 @@ dk_bmm_sets_line_handler( if (0 != res) { if ((dk4_um_t)INT_MAX >= um) { dk_bmm_day_in_cycle = (int)um; - if ((dk4_um_t)dk_bmm_n_set_names > dk_bmm_day_in_cycle) { + if ((dk4_um_t)dk_bmm_n_set_names > um) { back = DK4_TSP_RES_OK; } } @@ -951,7 +969,7 @@ dk_bmm_media_line_handler( void *obj, char *line, dk4_um_t lineno, - dk4_er_t *erp + dk4_er_t * DK4_ARG_UNUSED(erp) ) { dk4_er_t er; @@ -961,6 +979,7 @@ dk_bmm_media_line_handler( int res; int back = DK4_TSP_RES_FATAL; $? "+ dk_bmm_media_line_handler %lu \"%!8s\"", (unsigned long)lineno, line + DK4_UNUSED_ARG(erp) lhoptr = (dk_bmm_lh_obj_t *)obj; dk4str8_delnl(line); if ((dk4_um_t)1UL == lineno) { $? ". first line" @@ -1025,7 +1044,7 @@ dk_bmm_read_media_file(const dkChar *filename) dk4error_init(&er); res = dk4tsp08_setup_line( &tsp08, &obj, dk_bmm_media_line_handler, inb, sizeof(inb), - DK4_ENCODING_ASCII, dk4app_get_file_in_encoding(app), &er + DK4_ENCODING_PLAIN, dk4app_get_file_in_encoding(app), &er ); if (0 != res) { back = 1; |