[illumos-Developer] webrev: reimplementation of od
Joerg Schilling
Joerg.Schilling at fokus.fraunhofer.de
Mon Oct 18 09:42:50 PDT 2010
"Garrett D'Amore" <garrett at nexenta.com> wrote:
> So I couldn't find a suitable "od". GNU is GPL and not POSIX compliant
> to boot. (At least from my tests.) And the legacy Solaris one is --
> startlingly, amazingly bad. (If anyone can tell me what od -tfD
> *thinks* its doing when long doubles are 12-bytes wide, I'd love to hear
> an explanation. I think its just generating random garbage somehow.)
There is my hdump(1) that could be used as a mature base framework.
> Anyway, the new code I wrote is here:
>
> http://pastebin.ca/1964590
>
> Its not in an ON workspace yet.
>
> I've reasonably tested this as best as I can. It performs on par with
> legacy Sun od, and for some interesting cases runs even faster. (od -c
> in particular.)
...
> Assuming I get some good reviews of this, I'll probably integrate it on
> Monday. It compiles cleanly, so its simple to just d/l and compile if
> you want to try it yourself. :-)
- Does not include largefile support
- Uses hidden intefaces not intended for the public
- Does not suppot the X-Open CLI
- Does not give the same default output as od(1)
- Occasionally prints incorrect output
- Occacionally prints zeroes where non-zero data is known to be
- Does not call mbtowc() call in a standard compliant way.
-> not ready for integration.
How about enhancing hdump(1) with the od(1) interface?
Jörg
--
EMail:joerg at schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js at cs.tu-berlin.de (uni)
joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
More information about the Developer
mailing list