* Europagate, 1995
*
* $Log: urp.c,v $
- * Revision 1.4 1995/02/17 09:08:36 adam
+ * 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
* Reply with subject. CCL base command implemented.
*
* Revision 1.3 1995/02/16 18:35:09 adam
return 0;
}
+static int exec_show (struct ccl_token *list)
+{
+ const struct zass_presentent *zp;
+ char num_str[20];
+ int num;
+
+ if (list->kind == CCL_TOK_EOL)
+ return -1;
+ if (!info.zass)
+ return -2;
+
+ memcpy (num_str, list->name, list->len);
+ num_str[list->len] = '\0';
+
+ num = atoi (num_str);
+ if (!num)
+ return -3;
+ gw_log (GW_LOG_DEBUG, "urp", "zass_present of %d records", num);
+ zp = zass_present(info.zass, "Default", 1, num);
+ return 0;
+}
+
static int exec_command (const char *str)
{
struct ccl_token *cmd = ccl_tokenize (str);
{
case 1:
return exec_find (cmd->next);
+ case 2:
+ return exec_show (cmd->next);
case 3:
return exec_base (cmd->next);
case 9:
}
else
{
+ fprintf (reply_fd, "\n> %s", str);
fprintf (reply_fd, " ^ %s\n",
gw_res_get (info.kernel_res, "gw.err.unknown.command",
"unknown command"));