diff options
Diffstat (limited to 'src/3rdparty/libtiff/port')
-rw-r--r-- | src/3rdparty/libtiff/port/dummy.c | 10 | ||||
-rw-r--r-- | src/3rdparty/libtiff/port/getopt.c | 123 | ||||
-rw-r--r-- | src/3rdparty/libtiff/port/lfind.c | 60 | ||||
-rw-r--r-- | src/3rdparty/libtiff/port/libport.h | 71 | ||||
-rw-r--r-- | src/3rdparty/libtiff/port/snprintf.c | 42 | ||||
-rw-r--r-- | src/3rdparty/libtiff/port/strcasecmp.c | 49 | ||||
-rw-r--r-- | src/3rdparty/libtiff/port/strtoul.c | 44 | ||||
-rw-r--r-- | src/3rdparty/libtiff/port/strtoull.c | 44 |
8 files changed, 0 insertions, 443 deletions
diff --git a/src/3rdparty/libtiff/port/dummy.c b/src/3rdparty/libtiff/port/dummy.c deleted file mode 100644 index 346a07e..0000000 --- a/src/3rdparty/libtiff/port/dummy.c +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Dummy function, just to be ensure that the library always will be created. - */ - -void -libport_dummy_function() -{ - return; -} - diff --git a/src/3rdparty/libtiff/port/getopt.c b/src/3rdparty/libtiff/port/getopt.c deleted file mode 100644 index c7bdb11..0000000 --- a/src/3rdparty/libtiff/port/getopt.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 1987, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 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 University 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 REGENTS 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 REGENTS 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 0 -static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95"; -__RCSID("$NetBSD: getopt.c,v 1.26 2003/08/07 16:43:40 agc Exp $"); -#endif - -#include <stdio.h> -#include <string.h> -#include "libport.h" - -int opterr = 1, /* if error message should be printed */ - optind = 1, /* index into parent argv vector */ - optopt, /* character checked for validity */ - optreset; /* reset getopt */ -char *optarg; /* argument associated with option */ - -#define BADCH (int)'?' -#define BADARG (int)':' -#define EMSG "" - -/* - * getopt -- - * Parse argc/argv argument vector. - */ -int -getopt(int argc, char * const argv[], const char *optstring) -{ - static char *place = EMSG; /* option letter processing */ - char *oli; /* option letter list index */ - - if (optreset || *place == 0) { /* update scanning pointer */ - optreset = 0; - place = argv[optind]; - if (optind >= argc || *place++ != '-') { - /* Argument is absent or is not an option */ - place = EMSG; - return (-1); - } - optopt = *place++; - if (optopt == '-' && *place == 0) { - /* "--" => end of options */ - ++optind; - place = EMSG; - return (-1); - } - if (optopt == 0) { - /* Solitary '-', treat as a '-' option - if the program (eg su) is looking for it. */ - place = EMSG; - if (strchr(optstring, '-') == NULL) - return -1; - optopt = '-'; - } - } else - optopt = *place++; - - /* See if option letter is one the caller wanted... */ - if (optopt == ':' || (oli = strchr(optstring, optopt)) == NULL) { - if (*place == 0) - ++optind; - if (opterr && *optstring != ':') - (void)fprintf(stderr, - "unknown option -- %c\n", optopt); - return (BADCH); - } - - /* Does this option need an argument? */ - if (oli[1] != ':') { - /* don't need argument */ - optarg = NULL; - if (*place == 0) - ++optind; - } else { - /* Option-argument is either the rest of this argument or the - entire next argument. */ - if (*place) - optarg = place; - else if (argc > ++optind) - optarg = argv[optind]; - else { - /* option-argument absent */ - place = EMSG; - if (*optstring == ':') - return (BADARG); - if (opterr) - (void)fprintf(stderr, - "option requires an argument -- %c\n", - optopt); - return (BADCH); - } - place = EMSG; - ++optind; - } - return (optopt); /* return option letter */ -} diff --git a/src/3rdparty/libtiff/port/lfind.c b/src/3rdparty/libtiff/port/lfind.c deleted file mode 100644 index 00ab649..0000000 --- a/src/3rdparty/libtiff/port/lfind.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Roger L. Snyder. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 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 University 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 REGENTS 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 REGENTS 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 0 -static char sccsid[] = "@(#)lsearch.c 8.1 (Berkeley) 6/4/93"; -__RCSID("$NetBSD: lsearch.c,v 1.2 2005/07/06 15:47:15 drochner Exp $"); -#endif - -#ifdef _WIN32_WCE -# include <wce_types.h> -#else -# include <sys/types.h> -#endif - -#ifndef NULL -# define NULL 0 -#endif - -void * -lfind(const void *key, const void *base, size_t *nmemb, size_t size, - int(*compar)(const void *, const void *)) -{ - char *element, *end; - - end = (char *)base + *nmemb * size; - for (element = (char *)base; element < end; element += size) - if (!compar(element, key)) /* key found */ - return element; - - return NULL; -} diff --git a/src/3rdparty/libtiff/port/libport.h b/src/3rdparty/libtiff/port/libport.h deleted file mode 100644 index 9f2dace..0000000 --- a/src/3rdparty/libtiff/port/libport.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2009 Frank Warmerdam - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _LIBPORT_ -#define _LIBPORT_ - -#if defined(HAVE_CONFIG_H) -# include <tif_config.h> -#endif - -int getopt(int argc, char * const argv[], const char *optstring); -extern char *optarg; -extern int opterr; -extern int optind; -extern int optopt; - -int strcasecmp(const char *s1, const char *s2); - -#ifndef HAVE_GETOPT -# define HAVE_GETOPT 1 -#endif - -#if !defined(HAVE_STRTOL) -long strtol(const char *nptr, char **endptr, int base); -#endif -#if !defined(HAVE_STRTOLL) -long long strtoll(const char *nptr, char **endptr, int base); -#endif -#if !defined(HAVE_STRTOUL) -unsigned long strtoul(const char *nptr, char **endptr, int base); -#endif -#if !defined(HAVE_STRTOULL) -unsigned long long strtoull(const char *nptr, char **endptr, int base); -#endif - -#if 0 -void * -lfind(const void *key, const void *base, size_t *nmemb, size_t size, - int(*compar)(const void *, const void *)); -#endif - -#if !defined(HAVE_SNPRINTF) -#undef vsnprintf -#define vsnprintf _TIFF_vsnprintf_f - -#undef snprintf -#define snprintf _TIFF_snprintf_f -int snprintf(char* str, size_t size, const char* format, ...); -#endif - -#endif /* ndef _LIBPORT_ */ diff --git a/src/3rdparty/libtiff/port/snprintf.c b/src/3rdparty/libtiff/port/snprintf.c deleted file mode 100644 index 3542ab7..0000000 --- a/src/3rdparty/libtiff/port/snprintf.c +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Workaround for lack of snprintf(3) in Visual Studio. See - * http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010/8712996#8712996 - * It's a trivial wrapper around the builtin _vsnprintf_s and - * _vscprintf functions. - */ - -#ifdef _MSC_VER - -#include <stdio.h> -#include <stdarg.h> -#include "libport.h" - -int _TIFF_vsnprintf_f(char* str, size_t size, const char* format, va_list ap) -{ - int count = -1; - - if (size != 0) -#if _MSC_VER <= 1310 - count = _vsnprintf(str, size, format, ap); -#else - count = _vsnprintf_s(str, size, _TRUNCATE, format, ap); -#endif - if (count == -1) - count = _vscprintf(format, ap); - - return count; -} - -int _TIFF_snprintf_f(char* str, size_t size, const char* format, ...) -{ - int count; - va_list ap; - - va_start(ap, format); - count = vsnprintf(str, size, format, ap); - va_end(ap); - - return count; -} - -#endif // _MSC_VER diff --git a/src/3rdparty/libtiff/port/strcasecmp.c b/src/3rdparty/libtiff/port/strcasecmp.c deleted file mode 100644 index 65e2b41..0000000 --- a/src/3rdparty/libtiff/port/strcasecmp.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 1987, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 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 University 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 REGENTS 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 REGENTS 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 0 -static char sccsid[] = "@(#)strcasecmp.c 8.1 (Berkeley) 6/4/93"; -__RCSID("$NetBSD: strcasecmp.c,v 1.16 2003/08/07 16:43:49 agc Exp $"); -#endif - -#include <ctype.h> -#include <string.h> -#include "libport.h" - -int -strcasecmp(const char *s1, const char *s2) -{ - const unsigned char *us1 = (const unsigned char *)s1, - *us2 = (const unsigned char *)s2; - - while (tolower((int) *us1) == tolower((int) *us2++)) - if (*us1++ == '\0') - return (0); - return (tolower((int) *us1) - tolower((int) *--us2)); -} diff --git a/src/3rdparty/libtiff/port/strtoul.c b/src/3rdparty/libtiff/port/strtoul.c deleted file mode 100644 index dbd44f1..0000000 --- a/src/3rdparty/libtiff/port/strtoul.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $NetBSD: strtoul.c,v 1.3 2008/08/20 19:58:34 oster Exp $ */ - -/*- - * Copyright (c) 2005 The DragonFly Project. All rights reserved. - * Copyright (c) 2003 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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 0 -__RCSID("$NetBSD: strtoul.c,v 1.3 2008/08/20 19:58:34 oster Exp $"); -#endif - -#include <assert.h> -#include <ctype.h> -#include <errno.h> -#include <limits.h> -#include <stdlib.h> - -#define _FUNCNAME strtoul -#define __UINT unsigned long int -#define __UINT_MAX ULONG_MAX - -#include "_strtoul.h" diff --git a/src/3rdparty/libtiff/port/strtoull.c b/src/3rdparty/libtiff/port/strtoull.c deleted file mode 100644 index 91e4ddf..0000000 --- a/src/3rdparty/libtiff/port/strtoull.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $NetBSD: strtoul.c,v 1.3 2008/08/20 19:58:34 oster Exp $ */ - -/*- - * Copyright (c) 2005 The DragonFly Project. All rights reserved. - * Copyright (c) 2003 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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 0 -__RCSID("$NetBSD: strtoul.c,v 1.3 2008/08/20 19:58:34 oster Exp $"); -#endif - -#include <assert.h> -#include <ctype.h> -#include <errno.h> -#include <limits.h> -#include <stdlib.h> - -#define _FUNCNAME strtoull -#define __UINT unsigned long long int -#define __UINT_MAX ULLONG_MAX - -#include "_strtoul.h" |