Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 29176: /trunk/epan/ /trunk/epan/dfil
On Thu, Jul 23, 2009 at 12:47:30PM +0200, Jakub Zawadzki wrote:
> You can't typedef again, even if you use it without includes, in single file like:
>
> but you can do:
> struct bar; /* forward, just in case? */
>
> struct foo {
> struct bar *baz;
> };
>
> typedef struct bar {
> int field1;
> } baz_t;
In attachment patch, it looks scary cause of indent change :)
When you strip whitespaces change in _column_info struct it's just:
- dfilter_t **col_custom_dfilter; /* Compiled custom column field */
+ struct _dfilter_t **col_custom_dfilter; /* Compiled custom column field */
diff --git epan/column_info.h epan/column_info.h
index 9bae505..9f4e09c 100644
--- epan/column_info.h
+++ epan/column_info.h
@@ -27,9 +27,6 @@
#include <glib.h>
-/* Forward declaration (epan/dfilter/dfilter.h) */
-typedef struct _dfilter_t dfilter_t;
-
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@@ -43,20 +40,20 @@ typedef struct {
} col_expr_t;
typedef struct _column_info {
- gint num_cols; /* Number of columns */
- gint *col_fmt; /* Format of column */
- gboolean **fmt_matx; /* Specifies which formats apply to a column */
- gint *col_first; /* First column number with a given format */
- gint *col_last; /* Last column number with a given format */
- gchar **col_title; /* Column titles */
- gchar **col_custom_field; /* Custom column field */
- dfilter_t **col_custom_dfilter; /* Compiled custom column field */
- const gchar **col_data; /* Column data */
- gchar **col_buf; /* Buffer into which to copy data for column */
- int *col_fence; /* Stuff in column buffer before this index is immutable */
- col_expr_t col_expr; /* Column expressions and values */
- gboolean writable; /* Are we still writing to the columns? */
- gboolean columns_changed; /* Have the columns been changed in the prefs? */
+ gint num_cols; /* Number of columns */
+ gint *col_fmt; /* Format of column */
+ gboolean **fmt_matx; /* Specifies which formats apply to a column */
+ gint *col_first; /* First column number with a given format */
+ gint *col_last; /* Last column number with a given format */
+ gchar **col_title; /* Column titles */
+ gchar **col_custom_field; /* Custom column field */
+ struct _dfilter_t **col_custom_dfilter; /* Compiled custom column field */
+ const gchar **col_data; /* Column data */
+ gchar **col_buf; /* Buffer into which to copy data for column */
+ int *col_fence; /* Stuff in column buffer before this index is immutable */
+ col_expr_t col_expr; /* Column expressions and values */
+ gboolean writable; /* Are we still writing to the columns? */
+ gboolean columns_changed; /* Have the columns been changed in the prefs? */
} column_info;
/*
diff --git epan/dfilter/dfilter.h epan/dfilter/dfilter.h
index 39e23de..7951569 100644
--- epan/dfilter/dfilter.h
+++ epan/dfilter/dfilter.h
@@ -26,9 +26,7 @@
#include <glib.h>
/* Passed back to user */
-#ifndef dfilter_t
typedef struct _dfilter_t dfilter_t;
-#endif
#include <epan/epan.h>
#include <epan/proto.h>