* Copyright (c) 1995-2004, Index Data
* See the file LICENSE for details.
*
- * $Id: client.c,v 1.243 2004-05-10 10:45:28 adam Exp $
+ * $Id: client.c,v 1.244 2004-05-27 21:24:44 ja7 Exp $
*/
#include <stdio.h>
}
*req->requestedAction = Z_TriggerResourceControlRequest_cancel;
req->resultSetWanted = &rfalse;
+ req->referenceId = set_refid (out);
send_apdu(apdu);
printf("Sent cancel request\n");
return 2;
}
+
+int cmd_cancel_find(const char *arg) {
+ int fres;
+ fres=cmd_find(arg);
+ if( fres > 0 ) {
+ return cmd_cancel("");
+ };
+ return fres;
+}
+
int send_scanrequest(const char *query, int pp, int num, const char *term)
{
Z_APDU *apdu = zget_APDU(out, Z_APDU_scanRequest);
{
/* first should open the file and read one line at a time.. */
FILE* includeFile;
- char line[1024], *cp;
+ char line[102400], *cp;
if(strlen(arg)<1) {
fprintf(stderr,"Error in source command use a filename\n");
{"status", cmd_status, "",NULL,0,NULL},
{"setnames", cmd_setnames, "",NULL,0,NULL},
{"cancel", cmd_cancel, "",NULL,0,NULL},
+ {"cancel_find", cmd_cancel_find, "<query>",NULL,0,NULL},
{"format", cmd_format, "<recordsyntax>",complete_format,0,NULL},
{"schema", cmd_schema, "<schema>",complete_schema,0,NULL},
{"elements", cmd_elements, "<elementSetName>",NULL,0,NULL},
void process_cmd_line(char* line)
{
int i,res;
- char word[32], arg[1024];
+ char word[32], arg[10240];
#if HAVE_GETTIMEOFDAY
gettimeofday (&tv_start, 0);
#endif
- if ((res = sscanf(line, "%31s %1023[^;]", word, arg)) <= 0)
+ if ((res = sscanf(line, "%31s %10239[^;]", word, arg)) <= 0)
{
strcpy(word, last_cmd);
*arg = '\0';
rl_attempted_completion_over = 1;
return res;
} else {
- char arg[1024],word[32];
+ char arg[10240],word[32];
int i=0 ,res;
- if ((res = sscanf(rl_line_buffer, "%31s %1023[^;]", word, arg)) <= 0) {
+ if ((res = sscanf(rl_line_buffer, "%31s %10239[^;]", word, arg)) <= 0) {
rl_attempted_completion_over = 1;
return NULL;
}
static void client(void)
{
- char line[1024];
+ char line[10240];
- line[1023] = '\0';
+ line[10239] = '\0';
#if HAVE_GETTIMEOFDAY
gettimeofday (&tv_start, 0);
if (*line_in)
add_history(line_in);
#endif
- strncpy(line, line_in, 1023);
+ strncpy(line, line_in, 10239);
free (line_in);
}
#endif
char *end_p;
printf (C_PROMPT);
fflush(stdout);
- if (!fgets(line, 1023, stdin))
+ if (!fgets(line, 10239, stdin))
break;
if ((end_p = strchr (line, '\n')))
*end_p = '\0';