-/* $Id: zebrash.c,v 1.17 2003-07-04 14:00:22 heikki Exp $
+/* $Id: zebrash.c,v 1.19 2003-07-04 14:27:19 heikki Exp $
Copyright (C) 2002,2003
Index Data Aps
int cmd_quit( char *args[], WRBUF outbuff)
{
+ if (zs)
+ {
+ onecommand("zebra_close",outbuff,"");
+ zs=0;
+ }
+ if (zh)
+ {
+ onecommand("zebra_stop",outbuff,"");
+ zh=0;
+ }
wrbuf_puts(outbuff, "bye");
return -99; /* special stop signal */
}
rc = zebra_records_retrieve (zh, odr, setname,
pcomp, format, nrecs,recs);
- printf("rc=%d\n",rc);
if (0==rc)
{
for (i=0;i<nrecs;i++)
}
nextrecno=start+nrecs+1;
}
+ odr_destroy(odr);
return rc;
}
/**************************************)
Zerrors(outbuff);
printf("%s\n", wrbuf_buf(outbuff));
} /* while */
+ wrbuf_free(outbuff,1);
} /* shell() */