X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=odr%2Fodr_util.c;h=26a672c1fdb5e393d4e5161056f355b7e7177da6;hp=5f7d7e54cdfe80b84b136ddd143bfd16b0c20eab;hb=ec1f815d5348cd21e393f76bc212c910c34bbc45;hpb=569f86b4615c2731727be2a0ff898d36f9725819 diff --git a/odr/odr_util.c b/odr/odr_util.c index 5f7d7e5..26a672c 100644 --- a/odr/odr_util.c +++ b/odr/odr_util.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 1995-2002, Index Data + * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: odr_util.c,v 1.21 2002-07-25 12:51:08 adam Exp $ + * $Id: odr_util.c,v 1.23 2003-05-20 19:55:30 adam Exp $ */ #if HAVE_CONFIG_H #include @@ -81,4 +81,15 @@ Odr_oid *odr_getoidbystr(ODR o, const char *str) return odr_getoidbystr_nmem (o->mem, str); } - +int odr_missing(ODR o, int opt, const char *name) +{ + if (o->error) + return 0; + if (!opt) + { + printf ("odr_missing set error : %s\n", name); + odr_seterror(o, OREQUIRED, 55); + odr_setaddinfo(o, name); + } + return opt; +}