> Date: Mon, 2 Feb 1998 16:47:35 -0500 (EST)
> From: Bill Wichers <billw@unix0.waveform.net>
> Has anyone written a redirector in C that they can distribute? I have
> heard of people writing redirectors in C but I have yet to see any code
> for any of them. If someone could pass on what they've written to this
> effect I'd appreciate it. My current perl script, well, um, leaves a bit
> to be desired :-)
Ok, I'm one of these people, I started with the rredir.c in the
contrib directory of squid. My first version searched for strings
using strncmp() (it's still running on our local squid), but the
current version (only 5 Minutes old) now uses regcomp/regexec.
You can look at/fetch it from
http://www.ba-stuttgart.de/~bziller/rredir.c
It's only a quick hack, but I've tested it and piped our 'cut -c47-
cache/log' through it, to check if there are any memory holes (after I
checked the code for any, of course), just to be sure - rereading and
recompiling the regexps after each line.
For a speed test: It took 5.143s reading 132037 URLs on our
HP9000/819.
Regards,
-- Bernd bziller@ba-stuttgart.de ------------------------------------------------- http://www.ba-stuttgart.de/~bziller/ Perry Rhodan - Blind Guardian - Morwen PagesReceived on Tue Feb 03 1998 - 04:41:02 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:38:46 MST