projects
/
ir-tcl-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9a44ae2
)
Scan request changed a bit. This version works with RLG.
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 11 May 1995 15:34:46 +0000
(15:34 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 11 May 1995 15:34:46 +0000
(15:34 +0000)
client.tcl
patch
|
blob
|
history
ir-tcl.c
patch
|
blob
|
history
diff --git
a/client.tcl
b/client.tcl
index
64b31fe
..
129fa6f
100644
(file)
--- a/
client.tcl
+++ b/
client.tcl
@@
-1,6
+1,9
@@
#
# $Log: client.tcl,v $
#
# $Log: client.tcl,v $
-# Revision 1.20 1995-04-21 16:31:57 adam
+# Revision 1.21 1995-05-11 15:34:46 adam
+# Scan request changed a bit. This version works with RLG.
+#
+# Revision 1.20 1995/04/21 16:31:57 adam
# New radiobutton: protocol (z39v2/SR).
#
# Revision 1.19 1995/04/18 16:11:50 adam
# New radiobutton: protocol (z39v2/SR).
#
# Revision 1.19 1995/04/18 16:11:50 adam
@@
-91,7
+94,8
@@
proc top-down-window {w} {
frame $w.top -relief raised -border 1
frame $w.bot -relief raised -border 1
frame $w.top -relief raised -border 1
frame $w.bot -relief raised -border 1
- pack $w.top $w.bot -side top -fill both -expand yes
+ pack $w.top -side top -fill both -expand yes
+ pack $w.bot -fill both
}
proc top-down-ok-cancel {w ok-action g} {
}
proc top-down-ok-cancel {w ok-action g} {
@@
-480,7
+484,8
@@
proc scan-request {} {
top-down-ok-cancelx $w [list {Close} [list destroy $w]] 0
}
top-down-ok-cancelx $w [list {Close} [list destroy $w]] 0
}
- z39.scan scan 0
+ z39.scan numberOfTermsRequested 100
+ z39.scan scan ti=0
show-status {Scan} 1
}
show-status {Scan} 1
}
diff --git
a/ir-tcl.c
b/ir-tcl.c
index
6c1c0cb
..
21e90a9
100644
(file)
--- a/
ir-tcl.c
+++ b/
ir-tcl.c
@@
-4,7
+4,10
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: ir-tcl.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: ir-tcl.c,v $
- * Revision 1.26 1995-04-18 16:11:51 adam
+ * Revision 1.27 1995-05-11 15:34:47 adam
+ * Scan request changed a bit. This version works with RLG.
+ *
+ * Revision 1.26 1995/04/18 16:11:51 adam
* First version of graphical Scan. Some work on query-by-form.
*
* Revision 1.25 1995/04/17 09:37:17 adam
* First version of graphical Scan. Some work on query-by-form.
*
* Revision 1.25 1995/04/17 09:37:17 adam
@@
-1023,6
+1026,8
@@
static int do_search (void *o, Tcl_Interp *interp,
Tcl_AppendResult (interp, "CCL error: ", ccl_err_msg(error),NULL);
return TCL_ERROR;
}
Tcl_AppendResult (interp, "CCL error: ", ccl_err_msg(error),NULL);
return TCL_ERROR;
}
+ ccl_pr_tree (rpn, stderr);
+ fprintf (stderr, "\n");
query.which = Z_Query_type_1;
assert((RPNquery = ccl_rpn_query(rpn)));
RPNquery->attributeSetId = oid_getoidbyent (&p->bib1);
query.which = Z_Query_type_1;
assert((RPNquery = ccl_rpn_query(rpn)));
RPNquery->attributeSetId = oid_getoidbyent (&p->bib1);
@@
-1500,7
+1505,8
@@
static int do_scan (void *o, Tcl_Interp *interp, int argc, char **argv)
Z_APDU apdu, *apdup = &apdu;
IRScanObj *obj = o;
IRObj *p = obj->parent;
Z_APDU apdu, *apdup = &apdu;
IRScanObj *obj = o;
IRObj *p = obj->parent;
- int r;
+ int r, pos;
+ struct ccl_rpn_node *rpn;
p->scan_child = o;
if (argc != 3)
p->scan_child = o;
if (argc != 3)
@@
-1525,6
+1531,7
@@
static int do_scan (void *o, Tcl_Interp *interp, int argc, char **argv)
req.databaseNames = p->databaseNames;
req.attributeSet = oid_getoidbyent (&p->bib1);
req.databaseNames = p->databaseNames;
req.attributeSet = oid_getoidbyent (&p->bib1);
+#if 0
if (!(req.termListAndStartPoint =
ir_malloc (interp, sizeof(*req.termListAndStartPoint))))
return TCL_ERROR;
if (!(req.termListAndStartPoint =
ir_malloc (interp, sizeof(*req.termListAndStartPoint))))
return TCL_ERROR;
@@
-1543,6
+1550,18
@@
static int do_scan (void *o, Tcl_Interp *interp, int argc, char **argv)
return TCL_ERROR;
req.termListAndStartPoint->term->u.general->len =
req.termListAndStartPoint->term->u.general->size = strlen(argv[2]);
return TCL_ERROR;
req.termListAndStartPoint->term->u.general->len =
req.termListAndStartPoint->term->u.general->size = strlen(argv[2]);
+#else
+ rpn = ccl_find_str(p->bibset, argv[2], &r, &pos);
+ if (r)
+ {
+ Tcl_AppendResult (interp, "CCL error: ", ccl_err_msg (r), NULL);
+ return TCL_ERROR;
+ }
+ ccl_pr_tree (rpn, stderr);
+ fprintf (stderr, "\n");
+ if (!(req.termListAndStartPoint = ccl_scan_query (rpn)))
+ return TCL_ERROR;
+#endif
req.stepSize = &obj->stepSize;
req.numberOfTermsRequested = &obj->numberOfTermsRequested;
req.preferredPositionInResponse = &obj->preferredPositionInResponse;
req.stepSize = &obj->stepSize;
req.numberOfTermsRequested = &obj->numberOfTermsRequested;
req.preferredPositionInResponse = &obj->preferredPositionInResponse;