Commit Graph

4 Commits

Author SHA1 Message Date
Guy Harris 252d55d80f For each column, have both a buffer into which strings for that column
can be put, and a pointer to the string for the column, which might or
might not point to that buffer.

Add a routine "col_set_str()", which sets the string for the column to
the string passed to it as an argument; it should only be handed a
static string (a string constant would be ideal).  It doesn't do any
copying, so it's faster than "col_add_str()".

Make the routines that append to columns check whether the pointer to
the string for the column points to the buffer for the column and, if
not, copy the string for the column to the buffer for the column so that
you can append to it (so you can use "col_set_str()" and then use
"col_append_str()" or "col_append_fstr()").

Convert a bunch of "col_add_str()" calls that take a string constant as
an argument to "col_set_str()" calls.

Convert some "col_add_fstr()" calls that take a string constant as the
only argument - i.e., the format string doesn't have any "%" slots into
which to put strings for subsequent arguments to "col_set_str()" calls
(those calls are just like "col_add_str()" calls).

Replace an END_OF_FRAME reference in a tvbuffified dissector with a
"tvb_length(tvb)" call.

svn path=/trunk/; revision=2670
2000-11-19 08:54:37 +00:00
Guy Harris c1214ede33 Use "memset()" to zero byte arrays, and "memcpy" to copy into them.
When copying IPv4 or IPv6 addresses, copy the minimum of the number of
bytes in the source and the destination, so that if the prefix length is
bogus, we don't overwrite the buffer.

"tvb_get_ptr()" returns a "guint8 *"; give the variable to which its
value is assigned that type.

svn path=/trunk/; revision=2307
2000-08-20 09:07:16 +00:00
Laurent Deniel 9c05ee2741 - remove ^M
- add CHECK_DISPLAY_AS_DATA()

svn path=/trunk/; revision=2293
2000-08-18 15:45:30 +00:00
Gilbert Ramirez 729f85b1ad Add Zebra dissector from Jochen.
svn path=/trunk/; revision=2292
2000-08-18 15:26:52 +00:00