At 11:54 AM 11/26/01 -0800, Arne Georg Gleditsch wrote:
>* Bill Moseley
>> Oh, so are you saying you want to pipe the data into swish? Something like
>> extractdata | format | swish-e -c config -S prog -i -
>Exactly. It'll be more like ``open(S, "| swish-e -S prog -i -");
>print(S "...");'' in my case, but that's essentially what I want to
Ok, I like that. For now, how about "stdin" instead of "-"?
Otherwise I need to modify a bunch of places to make "-" work for both -S
prog and -S fs. It's only real use would be for -S prog. Plus, look how
small the diff is...
RCS file: /cvsroot/swishe/swish-e/src/extprog.c,v
retrieving revision 1.27
diff -u -r1.27 extprog.c
--- extprog.c 2001/10/15 23:26:16 1.27
+++ extprog.c 2001/11/26 20:11:31
@@ -105,6 +105,9 @@
struct stat stbuf;
struct swline *progparameterslist = sw->Prog->progparameterslist;
+ if ( ! strcmp( prog, "stdin") )
+ return stdin;
/* get total length of configuration parameters */
> ./test.pl | ./swish-e -S prog -i stdin
Indexing Data Source: "External-Program"
Removing very common words...
no words removed.
Writing main index...
Sorting words ...
Sorting 4 words alphabetically
Writing header ...
Writing index entries ...
Writing word text: Complete
Writing word hash: Complete
Writing word data: Complete
4 unique words indexed.
4 properties sorted.
2 files indexed. 36 total bytes.
Elapsed time: 00:00:00 CPU time: 00:00:00
Received on Mon Nov 26 20:16:37 2001