Ethereal-dev: Re: [Ethereal-dev] Adding list-type data to a column

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Wed, 4 Feb 2004 17:12:10 -0800

On Feb 4, 2004, at 3:14 PM, Olivier Biot wrote:

There's no function yet in epan/column_utils.[ch] which enables adding
a string to the column if the column is empty, and prefix this string
with a separator otherwise. I'm still having problems in naming that
function.

Well, if we're willing to make changes to all dissectors and other code that calls the "col_append_*str()" routines, there's a suggestion I made in another message:

	(BTW, should the "col_append_*str" routines take a "char *" argument
that, if not null, is appended to the string before appending the new
text if the string is not empty, so that you can put in a space, or ";",
or "; ", or... to separate the new item from any existing items without
that item showing up at the beginning of the column?  The same might
apply to "proto_item_append_text()", and possibly even
"proto_item_append_string()".)

I.e., call them "col_append_str()" and "col_append_fstr()", but add a separator string argument.