X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fodr_bit.c;h=69ceac9f97f404cb9da3dd1b5e470310d90ddae4;hp=ab8d0522bef4d863e2da72fcd75b6070eb74640e;hb=471c6dccdbb5c5a9c08b24c9abd6a1dcda29e79e;hpb=05c274ef315384faafcc5900c17468f0ea2474e6 diff --git a/src/odr_bit.c b/src/odr_bit.c index ab8d052..69ceac9 100644 --- a/src/odr_bit.c +++ b/src/odr_bit.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 1995-2004, Index Data + * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: odr_bit.c,v 1.3 2004-10-15 00:19:00 adam Exp $ + * $Id: odr_bit.c,v 1.5 2005-06-25 15:46:04 adam Exp $ */ /** @@ -26,27 +26,27 @@ int odr_bitstring(ODR o, Odr_bitmask **p, int opt, const char *name) int res, cons = 0; if (o->error) - return 0; + return 0; if (o->t_class < 0) { - o->t_class = ODR_UNIVERSAL; - o->t_tag = ODR_BITSTRING; + o->t_class = ODR_UNIVERSAL; + o->t_tag = ODR_BITSTRING; } if ((res = ber_tag(o, p, o->t_class, o->t_tag, &cons, opt, name)) < 0) - return 0; + return 0; if (!res) - return odr_missing(o, opt, name); + return odr_missing(o, opt, name); if (o->direction == ODR_PRINT) { - odr_prname(o, name); - odr_printf(o, "BITSTRING(len=%d)\n",(*p)->top + 1); - return 1; + odr_prname(o, name); + odr_printf(o, "BITSTRING(len=%d)\n",(*p)->top + 1); + return 1; } if (o->direction == ODR_DECODE) { - *p = (Odr_bitmask *)odr_malloc(o, sizeof(Odr_bitmask)); - memset((*p)->bits, 0, ODR_BITMASK_SIZE); - (*p)->top = -1; + *p = (Odr_bitmask *)odr_malloc(o, sizeof(Odr_bitmask)); + memset((*p)->bits, 0, ODR_BITMASK_SIZE); + (*p)->top = -1; } #if 0 /* ignoring the cons helps with at least one target. @@ -57,3 +57,11 @@ int odr_bitstring(ODR o, Odr_bitmask **p, int opt, const char *name) return ber_bitstring(o, *p, cons); #endif } +/* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +