Added simple display of records.
authorSebastian Hammer <quinn@indexdata.com>
Fri, 17 Feb 1995 14:41:13 +0000 (14:41 +0000)
committerSebastian Hammer <quinn@indexdata.com>
Fri, 17 Feb 1995 14:41:13 +0000 (14:41 +0000)
kernel/default.res
kernel/urp.c

index 7e79300..a7a35d3 100644 (file)
@@ -1,11 +1,11 @@
 # Email gateway - general kernel resources
-# $Id: default.res,v 1.4 1995/02/17 09:08:36 adam Exp $
+# $Id: default.res,v 1.5 1995/02/17 14:41:13 quinn Exp $
 #
 # Important directories, programs, etc.
 gw.reply.mta: /usr/bin/smail
 gw.reply.tmp.prefix: gwr
 gw.reply.tmp.dir: /tmp
-gw.path: /home/adam/egate/kernel
+gw.path: /home/quinn/egate/kernel
 
 # Target definitions
 gw.portno: 2000
index 308b93b..29b0e62 100644 (file)
@@ -2,7 +2,10 @@
  * Europagate, 1995
  *
  * $Log: urp.c,v $
- * Revision 1.5  1995/02/17 14:22:13  adam
+ * Revision 1.6  1995/02/17 14:41:14  quinn
+ * Added simple display of records.
+ *
+ * Revision 1.5  1995/02/17  14:22:13  adam
  * First steps of CCL show command. Not finished yet.
  *
  * Revision 1.4  1995/02/17  09:08:36  adam
@@ -31,6 +34,7 @@
 #include <unistd.h>
 
 #include "kernel.h"
+#include <iso2709.h>
 
 #define LINE_MAX 256
 
@@ -258,6 +262,7 @@ static int exec_base (struct ccl_token *list)
 static int exec_show (struct ccl_token *list)
 {
     const struct zass_presentent *zp;
+    zass_record *pp;
     char num_str[20];
     int num;
 
@@ -274,6 +279,16 @@ static int exec_show (struct ccl_token *list)
         return -3;
     gw_log (GW_LOG_DEBUG, "urp", "zass_present of %d records", num);
     zp = zass_present(info.zass, "Default", 1, num);
+    if (zp)
+    {
+       fprintf(reply_fd, "Got %d records\n", zp->num);
+       for (pp = zp->records; pp; pp = pp->next)
+       {
+           Iso2709Rec p = iso2709_cvt(pp->record);
+           iso2709_display(p, reply_fd);
+           iso2709_rm(p);
+       }
+    }
     return 0;
 }