X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fber_bool.c;h=de1ba3a59cb616a4bf2b6de4f232aec28a55c382;hp=db1067879a74654a38cb6c8cae48610f83ae0ea9;hb=833bf58328945361db8a744c0dec2c925c97d43a;hpb=b7c6d3740131ba03800c5c2cc935dc2626d12bb3 diff --git a/src/ber_bool.c b/src/ber_bool.c index db10678..de1ba3a 100644 --- a/src/ber_bool.c +++ b/src/ber_bool.c @@ -1,11 +1,9 @@ -/* - * Copyright (C) 1995-2005, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2013 Index Data * See the file LICENSE for details. - * - * $Id: ber_bool.c,v 1.5 2005-08-11 14:21:55 adam Exp $ */ -/** +/** * \file ber_bool.c * \brief Implements BER BOOLEAN encoding and decoding * @@ -33,19 +31,19 @@ int ber_boolean(ODR o, int *val) return 0; return 1; case ODR_DECODE: - if ((res = ber_declen(o->bp, &len, odr_max(o))) < 0) + if ((res = ber_declen(o->op->bp, &len, odr_max(o))) < 0) { odr_seterror(o, OPROTO, 9); return 0; } - o->bp+= res; + o->op->bp+= res; if (len != 1 || odr_max(o) < len) { odr_seterror(o, OPROTO, 10); return 0; } - *val = *o->bp; - o->bp++; + *val = *o->op->bp; + o->op->bp++; return 1; case ODR_PRINT: return 1; @@ -55,6 +53,7 @@ int ber_boolean(ODR o, int *val) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab