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/lprngcl.ctr | |
parent | ac690ca29ad5bf8a5203a65fd6252f7b564f4727 (diff) |
CTAN sync 202009200303
Diffstat (limited to 'support/dktools/lprngcl.ctr')
-rw-r--r-- | support/dktools/lprngcl.ctr | 100 |
1 files changed, 65 insertions, 35 deletions
diff --git a/support/dktools/lprngcl.ctr b/support/dktools/lprngcl.ctr index 5d73928ccc..d3506d3c65 100644 --- a/support/dktools/lprngcl.ctr +++ b/support/dktools/lprngcl.ctr @@ -2,7 +2,7 @@ copyright owner = Dirk Krause copyright year = 2016-xxxx -license = bsd +SPDX-License-Identifier: BSD-3-Clause @@ -55,8 +55,13 @@ license = bsd #endif #endif -#if DK4_HAVE_MATH_H +#if DK4_HAVE_MATH_H #ifndef MATH_H_INCLUDED +#if DK4_ON_WINDOWS +#ifndef _USE_MATH_DEFINES +#define _USE_MATH_DEFINES 1 +#endif +#endif #include <math.h> #define MATH_H_INCLUDED 1 #endif @@ -79,7 +84,11 @@ license = bsd #include "dk4socka.h" #include "dk4user.h" #include "dk4rec.h" +#include "dk4unused.h" +#ifndef DK4WMAIN_H_INCLUDED +#include "dk4wmain.h" +#endif $!trace-include @@ -143,7 +152,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. @@ -170,27 +180,27 @@ 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 @@ -481,8 +491,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 @@ -492,8 +503,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; } @@ -502,8 +514,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; } @@ -527,10 +540,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; } } @@ -596,13 +617,16 @@ process_options(void) static int lprngcl_char_handler( - void *obj, + void * DK4_ARG_UNUSED(obj), dkChar c, - dk4_text_stream_position_t *pos, - dk4_er_t *erp + dk4_text_stream_position_t * DK4_ARG_UNUSED(pos), + dk4_er_t * DK4_ARG_UNUSED(erp) ) { int back = DK4_TSP_RES_OK; + DK4_UNUSED_ARG(obj) + DK4_UNUSED_ARG(pos) + DK4_UNUSED_ARG(erp) if (0 == dk4fputc(c, stdout, NULL)) { exval = EXIT_FAILURE; wrerror = 1; @@ -661,7 +685,13 @@ process_one_delete_request(const dkChar *hptr, const dkChar *fullqueue) ( (0 != isUtf8) ? (DK4_FILE_ENCODING_UTF8) - : (DK4_FILE_ENCODING_ASCII) + : ( +#if DK4_ON_WINDOWS + DK4_FILE_ENCODING_WIN1252 +#else + DK4_FILE_ENCODING_PLAIN +#endif + ) ), NULL ); @@ -769,7 +799,7 @@ send_delete_requests(int xargc) ); } else { $? ". ASCII" res = dk4recode_dk_to_any( - user8, sizeof(user8), DK4_ENCODING_ASCII, username, + user8, sizeof(user8), DK4_ENCODING_PLAIN, username, dk4app_get_encoding(app), NULL ); } @@ -793,7 +823,7 @@ send_delete_requests(int xargc) ); } else { $? ". ASCII" res = dk4recode_dk_to_any( - queue8, sizeof(queue8), DK4_ENCODING_ASCII, curqueue, + queue8, sizeof(queue8), DK4_ENCODING_PLAIN, curqueue, dk4app_get_encoding(app), NULL ); } |