X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=odr%2Fodr_util.c;h=c8b35b84b13d862eedc81c2f4c96697f9b259771;hb=07a80eea989576eaa13633f4e96e57e14b40ea0f;hp=3f450ca736d571b072b7a1cf51cc12eee04665a3;hpb=4d531a1a9131d69c3b6c27fbac42837e22cff61c;p=yaz-moved-to-github.git diff --git a/odr/odr_util.c b/odr/odr_util.c index 3f450ca..c8b35b8 100644 --- a/odr/odr_util.c +++ b/odr/odr_util.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: odr_util.c,v 1.22 2003-01-06 08:20:28 adam Exp $ + * $Id: odr_util.c,v 1.24 2003-05-20 20:21:34 adam Exp $ */ #if HAVE_CONFIG_H #include @@ -81,4 +81,14 @@ 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) + { + odr_seterror(o, OREQUIRED, 53); + odr_setaddinfo(o, name); + } + return opt; +}