X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fodr_bit.c;h=69ceac9f97f404cb9da3dd1b5e470310d90ddae4;hp=20362bd79f6df58a224ae67b964cc031c3783ff9;hb=fb6d99a0c7e07d9cc4a315c447deaf6564a85505;hpb=67002f49611adb64993391b0cbf6c235f18080a4 diff --git a/src/odr_bit.c b/src/odr_bit.c index 20362bd..69ceac9 100644 --- a/src/odr_bit.c +++ b/src/odr_bit.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: odr_bit.c,v 1.4 2005-01-15 19:47:14 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 + */ +