/usr/include/idzebra-2.0/idzebra/util.h is in libidzebra-2.0-dev 2.0.59-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | /* This file is part of the Zebra server.
Copyright (C) Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ZEBRA_UTIL_H
#define ZEBRA_UTIL_H
#include <yaz/yconfig.h>
#include <yaz/log.h>
/**
expand GCC_ATTRIBUTE if GCC is in use. See :
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
To see gcc pre-defines for c:
gcc -E -dM -x c /dev/null
*/
#ifdef __GNUC__
#if __GNUC__ >= 4
#define ZEBRA_GCC_ATTR(x) __attribute__ (x)
#endif
#endif
#ifndef ZEBRA_GCC_ATTR
#define ZEBRA_GCC_ATTR(x)
#endif
YAZ_BEGIN_CDECL
/** \var zint
* \brief Zebra integer
*
* This integer is used in various Zebra APIs to specify record identifires,
* number of occurrences etc. It is a "large" integer and is usually
* 64-bit on newer architectures.
*/
#ifdef WIN32
typedef __int64 zint;
#define ZINT_FORMAT0 "I64d"
#else
#ifndef ZEBRA_ZINT
#error ZEBRA_ZINT undefined. idzebra-config not in use?
#endif
#if ZEBRA_ZINT > 0
typedef long long int zint;
#define ZINT_FORMAT0 "lld"
#else
typedef long zint;
#define ZINT_FORMAT0 "ld"
#endif
#endif
#define ZINT_FORMAT "%" ZINT_FORMAT0
/** \var typedef ZEBRA_RES
* \brief Common return type for Zebra API
*
* This return code indicates success with code ZEBRA_OK and failure
* with ZEBRA_FAIL
*/
typedef short ZEBRA_RES;
#define ZEBRA_FAIL -1
#define ZEBRA_OK 0
YAZ_EXPORT zint atoi_zn(const char *buf, zint len);
YAZ_EXPORT void zebra_zint_encode(char **dst, zint pos);
YAZ_EXPORT void zebra_zint_decode(const char **src, zint *pos);
YAZ_EXPORT void zebra_exit(const char *msg);
YAZ_EXPORT zint atozint(const char *src);
YAZ_END_CDECL
#define CAST_ZINT_TO_INT(x) (int)(x)
#define CAST_ZINT_TO_DOUBLE(x) (double)(x)
#endif
/*
* Local variables:
* c-basic-offset: 4
* c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
*/
|