Closed GoogleCodeExporter closed 8 years ago
Original comment by garlick....@gmail.com
on 2 Feb 2012 at 10:05
On Fri, Feb 03, 2012 at 11:29:05AM -0800, Peter Hyman wrote:
> See NEWS for update.
>
> Please test some. I think it's pretty good. Enjoy the weekend!
Original comment by garlick....@gmail.com
on 17 Apr 2012 at 5:40
Attachments:
Changes to scrub-2.5.0.patch.gz:
- Removed issue 9 changes unrelated to this set of changes
- For the moment dropped NEWS, META, ChangeLog
- Updated to apply to current git tree.
Review comments to follow.
Original comment by garlick....@gmail.com
on 17 Apr 2012 at 6:11
Attachments:
I think we could simplify this patch in the following ways:
- drop -A -H options and allow --pattern custom="string"
- in string, allow \nnn (octal) and \xnn (hex) constants as with C strings
- when seq_lookup() encounters custom="string", have it malloc a new pattern
struct
called "custom" (one pass, type PAT_NORMAL) and return it.
- expose a pattern_cleanup() function in pattern.c to free a created sequence
if any and call it from scrub.c on successful termination.
- no special case in pat2str(), just use PAT_NORMAL handling
This would avoid changing the options and would localize your changes to
pattern.c.
What do you think?
Original comment by garlick....@gmail.com
on 17 Apr 2012 at 6:33
Whoops, I meant create a new sequence_t not a new pattern.
The sequence would have one pattern.
There's a name mismatch between data structures and option names :-(
Original comment by garlick....@gmail.com
on 17 Apr 2012 at 6:37
OK, I couldn't leave it alone. What do you think of this way of doing it?
Original comment by garlick....@gmail.com
on 17 Apr 2012 at 10:27
Attachments:
THis patch evolved a bit and was committed for 2.5.0.
Closing the issue for now. Please open a new issue if you have
any issues with the implementation.
commit 183c21a8f400b3af4ab76fce1e753ff7dd944bb7
Author: Jim Garlick <garlick.jim@gmail.com>
Date: Wed Apr 18 10:16:13 2012 -0700
Change title of custom pattern
commit 2e45eab8cbd5f682dfb2ff7873a3935724af0d11
Author: Jim Garlick <garlick.jim@gmail.com>
Date: Tue Apr 17 15:33:47 2012 -0700
Add custom pattern capability [Peter Hyman] (issue 11)
Allow scrub --pattern=custom="string" (issue 11) [Peter Hyman]
Allow C style numerical escapes in string: \nnn (octal) and \xnn
(hex). This is a single-pass sequence with a custom pattern.
Original comment by garlick....@gmail.com
on 24 Apr 2012 at 8:26
Original issue reported on code.google.com by
garlick....@gmail.com
on 2 Feb 2012 at 10:03