Ethereal-dev: Re: [ethereal-dev] Patches

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ben Fowler <wapdev@xxxxxxxxxxxx>
Date: Tue, 25 Apr 2000 18:52:03 +0100

> DISPLAY_WIDTH_UINT8,
> DISPLAY_WIDTH_UINT16

[ snip explanation of why that idea is inappropriate ]

Would you want to provide macros for a set of small integers ( < 32 ) ?

DISPLAY_WIDTH_1
...
DISPLAY_WIDTH_32

Yes is the short answer. My issue is that that makes the code more
self-documenting: there could be a parameter known as 'display' and
a DISPLAY_* constant for every reasonable value. Until I heard of your
reservation, I would have defined them as

DISPLAY_WIDTH_UINT8 = sizeof( uint8 ) * 8,
DISPLAY_WIDTH_UINT16 = sizeof( uint16 ) * 8,
....

Obviously this is not right. The next question is would you be prepared
to have code as trite looking as

enum  ... = (
...
DISPLAY_WIDTH_1 = 1,
DISPLAY_WIDTH_2,
DISPLAY_WIDTH_3,
DISPLAY_WIDTH_4,
DISPLAY_WIDTH_5,
...
);

> Incidentally, when tooltips are added, I hope that the text for the
> tooltips could be distinct from the blurb. I would like to write my
> blurb (long description for the man page and like documentation)
> in a way that may not be right for a tooltip.

The blurb shouldn't be too long; we're keeping all of them in memory.
Perhaps we need a way of storing additional per-protocol and per-field documentation
that for the manpage, but is not in the program itself.

I understand that. My request which does mean more work and will take up
more space for most people would be have a separate, smaller field for the
tooltip, not to enlarge the blurb field.

Ben.

--
Leedsnet - The information resource for Leeds and the West Riding
< URL:http://www.leedsnet.com/mobile/ >