Update source headers for 2008. Omit CVS ID keyword subst.
[yaz-moved-to-github.git] / zoom / zoomsh.c
index d25c674..f575294 100644 (file)
@@ -1,8 +1,6 @@
-/*
- * Copyright (C) 1995-2007, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2008 Index Data
  * See the file LICENSE for details.
- *
- * $Id: zoomsh.c,v 1.48 2007-08-16 10:09:37 adam Exp $
  */
 
 /** \file zoomsh.c
@@ -192,7 +190,7 @@ static void display_records(ZOOM_connection c,
             int error = ZOOM_record_error(rec, &msg, &addinfo, &diagset);
             
             printf("%d %s: %s (%s:%d) %s\n", pos, (db ? db : "unknown"),
-                   msg, diagset, error, addinfo);
+                   msg, diagset, error, addinfo ? addinfo : "none");
         }
         else
         {
@@ -200,11 +198,13 @@ static void display_records(ZOOM_connection c,
             const char *render = ZOOM_record_get(rec, "render", &len);
             const char *opac_render = ZOOM_record_get(rec, "opac", &opac_len);
             const char *syntax = ZOOM_record_get(rec, "syntax", 0);
+            const char *schema = ZOOM_record_get(rec, "schema", 0);
             /* if rec is non-null, we got a record for display */
             if (rec)
             {
-                printf("%d %s %s\n",
-                       pos, (db ? db : "unknown"), syntax);
+                printf("%d database=%s syntax=%s schema=%s\n",
+                       pos, (db ? db : "unknown"), syntax,
+                       schema ? schema : "unknown");
                 if (render)
                     fwrite(render, 1, len, stdout);
                 printf("\n");
@@ -212,7 +212,6 @@ static void display_records(ZOOM_connection c,
                     fwrite(opac_render, 1, opac_len, stdout);
             }
         }
-            
     }
 }