diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2021-11-05 13:28:23 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-11-05 13:28:23 +0100 |
commit | 8c787c3591c1c885b91a54128835b400858c5cca (patch) | |
tree | eca1b776912a305c4d45b3964038278a2fae1ead /debian/htdig/htdig-3.2.0b6/htlib/lib.h | |
parent | fe188b907cdf30dfdfe0eba9412e7f8749fec158 (diff) | |
download | extra-dependencies-8c787c3591c1c885b91a54128835b400858c5cca.tar.gz extra-dependencies-8c787c3591c1c885b91a54128835b400858c5cca.zip |
DEB htdig: Added to repository.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'debian/htdig/htdig-3.2.0b6/htlib/lib.h')
-rw-r--r-- | debian/htdig/htdig-3.2.0b6/htlib/lib.h | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/debian/htdig/htdig-3.2.0b6/htlib/lib.h b/debian/htdig/htdig-3.2.0b6/htlib/lib.h new file mode 100644 index 00000000..d17bd7c4 --- /dev/null +++ b/debian/htdig/htdig-3.2.0b6/htlib/lib.h @@ -0,0 +1,90 @@ +// +// lib.h +// +// lib: Contains typical declarations and header inclusions used by +// most sources in this directory. +// +// Part of the ht://Dig package <http://www.htdig.org/> +// Copyright (c) 1999-2004 The ht://Dig Group +// For copyright details, see the file COPYING in your distribution +// or the GNU Library General Public License (LGPL) version 2 or later +// <http://www.gnu.org/copyleft/lgpl.html> +// +// $Id: lib.h,v 1.16 2004/05/28 13:15:21 lha Exp $ +// + +#ifndef _lib_h +#define _lib_h + +#ifndef _MSC_VER /* _WIN32 */ +#include "clib.h" +#endif + +#include <string.h> + +#ifdef _MSC_VER /* _WIN32 */ +#include "dirent_local.h" +#define S_ISDIR(v) ((v)&_S_IFDIR) +#define S_ISREG(v) ((v)&_S_IFREG) +#else +#include <dirent.h> // for scandir +#endif + +#ifdef _MSC_VER /* _WIN32 */ +#include <io.h> +#include <stdlib.h> +#define S_IFIFO _S_IFIFO // pipe +#define S_IFBLK 0060000 // block special +#define S_IFLNK 0120000 // symbolic link +#define S_IFSOCK 0140000 // socket +#define S_IFWHT 0160000 // whiteout +#define R_OK 02 +#define popen _popen +#define pclose _pclose +#define lstat stat +#define readlink(x,y,z) {-1} +#define sleep(t) _sleep((t) * 1000) +#endif + +#if TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif + +// +// Other defines used throughout the library +// +#define OK 0 +#define NOTOK (-1) + +// +// To get rid of inconsistencies between different machines we will ALWAYS +// use our own version of the following routines +// +int mystrcasecmp(const char *, const char *); +int mystrncasecmp(const char *, const char *, int); + +// +// The standard strstr() function is limited in that it does case-sensitive +// searches. This version will ignore case. +// +const char *mystrcasestr(const char *s, const char *pattern); + +// +// Too many problems with system strptime() functions... Just use our own +// version of it. +// +char *mystrptime(const char *buf, const char *fmt, struct tm *tm); + +// +// timegm() is quite rare, so provide our own. +// +extern "C" time_t Httimegm(struct tm *tm); + +#endif |