X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fber_int.c;h=ef185aa6b4ac7197e016b61f3ff9bd001027c15f;hb=c6b8edd2312a4606cc014738266059a20e3b6e61;hp=f9a61ae6b239be6f3d4b65897a8b3bfab18b5562;hpb=8d691989077a0addcbd840d769dce6700f3d9622;p=yaz-moved-to-github.git diff --git a/src/ber_int.c b/src/ber_int.c index f9a61ae..ef185aa 100644 --- a/src/ber_int.c +++ b/src/ber_int.c @@ -1,8 +1,6 @@ -/* - * Copyright (C) 1995-2007, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. - * - * $Id: ber_int.c,v 1.7 2007-01-03 08:42:15 adam Exp $ */ /** @@ -25,16 +23,17 @@ #ifdef WIN32 #include -#else +#endif +#if HAVE_NETINET_IN_H #include #endif #include "odr-priv.h" -static int ber_encinteger(ODR o, int val); -static int ber_decinteger(const unsigned char *buf, int *val, int max); +static int ber_encinteger(ODR o, Odr_int val); +static int ber_decinteger(const unsigned char *buf, Odr_int *val, int max); -int ber_integer(ODR o, int *val) +int ber_integer(ODR o, Odr_int *val) { int res; @@ -62,7 +61,7 @@ int ber_integer(ODR o, int *val) /* * Returns: number of bytes written or -1 for error (out of bounds). */ -int ber_encinteger(ODR o, int val) +int ber_encinteger(ODR o, Odr_int val) { int a, len; union { int i; unsigned char c[sizeof(int)]; } tmp; @@ -83,7 +82,7 @@ int ber_encinteger(ODR o, int val) /* * Returns: Number of bytes read or 0 if no match, -1 if error. */ -int ber_decinteger(const unsigned char *buf, int *val, int max) +int ber_decinteger(const unsigned char *buf, Odr_int *val, int max) { const unsigned char *b = buf; unsigned char fill; @@ -113,6 +112,7 @@ int ber_decinteger(const unsigned char *buf, int *val, int max) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab