diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-06 09:11:17 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-06 09:11:17 +0000 |
commit | 474f5930dbf134c48cae00e042263167d4f8c97f (patch) | |
tree | ed9a5d442b2e3a6b316e1681186be06691f6231d /epan/column-utils.c | |
parent | 22077a8eb181f7ae44fdabf207a13af43b095e55 (diff) |
Macrofy have_custom_cols() -> HAVE_CUSTOM_COLS() internally in columns-utils.c
svn path=/trunk/; revision=29737
Diffstat (limited to 'epan/column-utils.c')
-rw-r--r-- | epan/column-utils.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/epan/column-utils.c b/epan/column-utils.c index d4c883f63d..037fabc524 100644 --- a/epan/column-utils.c +++ b/epan/column-utils.c @@ -276,12 +276,21 @@ col_add_fstr(column_info *cinfo, gint el, const gchar *format, ...) { va_end(ap); } +/* The same as CHECK_COL(), but without the check to see if the column is writable. */ +#define HAVE_CUSTOM_COLS(cinfo) ((cinfo) && (cinfo)->col_first[COL_CUSTOM] >= 0) + +gboolean +have_custom_cols(column_info *cinfo) +{ + return HAVE_CUSTOM_COLS(cinfo); +} + /* search in edt tree custom fields */ void col_custom_set_edt(epan_dissect_t *edt, column_info *cinfo) { int i; - if(!have_custom_cols(cinfo)) + if(!HAVE_CUSTOM_COLS(cinfo)) return; for (i = cinfo->col_first[COL_CUSTOM]; @@ -302,10 +311,10 @@ col_custom_prime_edt(epan_dissect_t *edt, column_info *cinfo) { int i; - ci = cinfo; /* Save this into the static variable ci for use by - * col_custom_set_fstr() later. */ + /* Save this into the static variable ci for use by col_custom_set_fstr() later. */ + ci = cinfo; - if(!have_custom_cols(cinfo)) + if(!HAVE_CUSTOM_COLS(cinfo)) return; for (i = cinfo->col_first[COL_CUSTOM]; @@ -317,17 +326,6 @@ col_custom_prime_edt(epan_dissect_t *edt, column_info *cinfo) } gboolean -have_custom_cols(column_info *cinfo) -{ - /* The same as CHECK_COL(), but without the check to see if the column - * is writable. */ - if (cinfo && cinfo->col_first[COL_CUSTOM] >= 0) - return TRUE; - else - return FALSE; -} - -gboolean col_has_time_fmt(column_info *cinfo, gint col) { return ((cinfo->fmt_matx[col][COL_CLS_TIME]) || |