Added col_clear_fence().

svn path=/trunk/; revision=54220
This commit is contained in:
Stig Bjørlykke 2013-12-18 14:18:45 +00:00
parent 4729c083ac
commit 80150e196a
2 changed files with 26 additions and 0 deletions

View File

@ -161,6 +161,22 @@ col_set_fence(column_info *cinfo, const gint el)
}
}
/* Clear the fence for a column. */
void
col_clear_fence(column_info *cinfo, const gint el)
{
int i;
if (!CHECK_COL(cinfo, el))
return;
for (i = cinfo->col_first[el]; i <= cinfo->col_last[el]; i++) {
if (cinfo->fmt_matx[i][el]) {
cinfo->col_fence[i] = 0;
}
}
}
/* Gets the text of a column */
const gchar *
col_get_text(column_info *cinfo, const gint el)

View File

@ -108,6 +108,16 @@ WS_DLL_PUBLIC void col_set_writable(column_info *cinfo, const gboolean writable)
*/
WS_DLL_PUBLIC void col_set_fence(column_info *cinfo, const gint col);
/** Clears a fence for the current column content
*
* This can be useful if a protocol wants to remove whatever
* a previous protocol has added to the column.
*
* @param cinfo the current packet row
* @param col the column to use, e.g. COL_INFO
*/
WS_DLL_PUBLIC void col_clear_fence(column_info *cinfo, const gint col);
/** Gets the text of a column element.
*
* @param cinfo the current packet row