Update copyright year + FSF address
[idzebra-moved-to-github.git] / util / res.c
index 4e26a7a..88a9e81 100644 (file)
@@ -1,5 +1,5 @@
-/* $Id: res.c,v 1.47 2005-10-27 08:49:29 adam Exp $
-   Copyright (C) 1995-2005
+/* $Id: res.c,v 1.51 2006-08-14 10:40:34 adam Exp $
+   Copyright (C) 1995-2006
    Index Data ApS
 
 This file is part of the Zebra server.
@@ -15,9 +15,9 @@ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 for more details.
 
 You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra.  If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
 */
 
 #include <stdio.h>
@@ -307,7 +307,8 @@ const char *res_get_def(Res r, const char *name, const char *def)
 
     if (!(t = res_get(r, name)))
     {
-       yaz_log(YLOG_DEBUG, "CAUTION: Using default resource %s:%s", name, def);
+       if (def)
+           yaz_log(YLOG_DEBUG, "Using default resource %s:%s", name, def);
        return def;
     }
     else
@@ -379,7 +380,7 @@ ZEBRA_RES res_write_file(Res r, const char *fname)
     if (!fr)
     {
         yaz_log(YLOG_FATAL|YLOG_ERRNO, "Cannot create `%s'", fname);
-        exit(1);
+       return ZEBRA_FAIL;
     }
 
     for (re = r->first; re; re=re->next)
@@ -540,3 +541,11 @@ void res_dump (Res r, int level)
        res_dump (r->over_res, level + 1);
     }
 }
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+