Remove the oid_name_to_dotstring() function, which is now in oid.c
[yaz-moved-to-github.git] / zoom / zoomsh.c
index 54ebda2..c6b29ae 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: zoomsh.c,v 1.19 2003-04-23 20:39:25 adam Exp $
+ * $Id: zoomsh.c,v 1.22 2003-07-10 11:50:32 mike Exp $
  *
  * ZOOM-C Shell
  */
@@ -21,6 +21,7 @@
 #include <yaz/log.h>
 #include <yaz/nmem.h>
 #include <yaz/zoom.h>
+#include <yaz/oid.h>
 
 #define MAX_CON 100
 
@@ -158,7 +159,10 @@ static void display_records (ZOOM_connection c,
        /* if rec is non-null, we got a record for display */
        if (rec)
        {
-           printf ("%d %s %s\n", pos+1, (db ? db : "unknown"), syntax);
+           char oidbuf[100];
+           (void) oid_name_to_dotstring(CLASS_RECSYN, syntax, oidbuf);
+           printf ("%d %s %s (%s)\n",
+                   pos+1, (db ? db : "unknown"), syntax, oidbuf);
            if (render)
                fwrite (render, 1, len, stdout);
            printf ("\n");
@@ -341,8 +345,8 @@ static void cmd_scan (ZOOM_connection *c, ZOOM_resultset *r,
             size_t p, sz = ZOOM_scanset_size(s[i]);
             for (p = 0; p < sz; p++)
             {
-                int  occ = 0;
-                size_t len = 0;
+                int occ = 0;
+                int len = 0;
                 const char *term = ZOOM_scanset_term(s[i], p, &occ, &len);
                 fwrite(term, 1, len, stdout);
                 printf (" %d\n", occ);