X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=odr%2Fber_int.c;h=6d0da3504a3702543c1627a54c070b1d9f2394bf;hb=68f9c30763ddbba9f25b6e893078ead2583c6f21;hp=49ef26402b1ed82afba5c768a51861978056f3d2;hpb=63cafe41a93427118959a74201b3e331169a71d9;p=yaz-moved-to-github.git diff --git a/odr/ber_int.c b/odr/ber_int.c index 49ef264..6d0da35 100644 --- a/odr/ber_int.c +++ b/odr/ber_int.c @@ -1,10 +1,16 @@ /* - * Copyright (c) 1995, Index Data + * Copyright (c) 1995-1999, Index Data * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * * $Log: ber_int.c,v $ - * Revision 1.11 1995-09-29 17:12:16 quinn + * Revision 1.13 1999-01-08 11:23:22 adam + * Added const modifier to some of the BER/ODR encoding routines. + * + * Revision 1.12 1996/07/06 19:58:33 quinn + * System headerfiles gathered in yconfig + * + * Revision 1.11 1995/09/29 17:12:16 quinn * Smallish * * Revision 1.10 1995/09/29 17:01:50 quinn @@ -41,21 +47,15 @@ */ -#include - -#ifdef WINDOWS -#include -#else -#include /* for htons... */ -#endif +#define YNETINCLUDE +#include #include #include -#include static int ber_encinteger(ODR o, int val); -static int ber_decinteger(unsigned char *buf, int *val); +static int ber_decinteger(const unsigned char *buf, int *val); int ber_integer(ODR o, int *val) { @@ -114,9 +114,10 @@ int ber_encinteger(ODR o, int val) /* * Returns: Number of bytes read or 0 if no match, -1 if error. */ -int ber_decinteger(unsigned char *buf, int *val) +int ber_decinteger(const unsigned char *buf, int *val) { - unsigned char *b = buf, fill; + const unsigned char *b = buf; + unsigned char fill; int res, len, remains; union { int i; unsigned char c[sizeof(int)]; } tmp;