Squelch a compiler warning (extraneous extern on struct).

Fix the PROTO_ITEM_IS_XXX and PROTO_ITEM_SET_XXX macros by replacing
the if(x) with trigraphs so the macros can still be used in subsequent
conditional tests.

svn path=/trunk/; revision=10758
This commit is contained in:
Olivier Biot 2004-05-01 20:15:56 +00:00
parent 52a04a6f71
commit 8d29376f42
1 changed files with 10 additions and 6 deletions

View File

@ -1,7 +1,7 @@
/* proto.h
* Definitions for protocol display
*
* $Id: proto.h,v 1.60 2004/05/01 18:39:07 ulfl Exp $
* $Id: proto.h,v 1.61 2004/05/01 20:15:56 obiot Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -52,7 +52,7 @@ struct _value_string;
/* ... and similarly, */
#define TFS(x) (const struct true_false_string*)(x)
extern struct _protocol;
struct _protocol;
typedef struct _protocol protocol_t;
@ -156,11 +156,15 @@ typedef proto_node proto_item;
/* indicate that this field should not be shown by Ethereal (used for filtering only) */
#define PROTO_ITEM_IS_HIDDEN(proto_item) if(proto_item) FI_GET_FLAG(proto_item->finfo, FI_HIDDEN)
#define PROTO_ITEM_SET_HIDDEN(proto_item) if(proto_item) FI_SET_FLAG(proto_item->finfo, FI_HIDDEN)
#define PROTO_ITEM_IS_HIDDEN(proto_item) \
((proto_item) ? FI_GET_FLAG(proto_item->finfo, FI_HIDDEN) : 0)
#define PROTO_ITEM_SET_HIDDEN(proto_item) \
((proto_item) ? FI_SET_FLAG(proto_item->finfo, FI_HIDDEN) : 0)
/* indicate that this field is generated by Ethereal (and not inside the packet data) */
#define PROTO_ITEM_IS_GENERATED(proto_item) if(proto_item) FI_GET_FLAG(proto_item->finfo, FI_GENERATED)
#define PROTO_ITEM_SET_GENERATED(proto_item) if(proto_item) FI_SET_FLAG(proto_item->finfo, FI_GENERATED)
#define PROTO_ITEM_IS_GENERATED(proto_item) \
((proto_item) ? FI_GET_FLAG(proto_item->finfo, FI_GENERATED) : 0)
#define PROTO_ITEM_SET_GENERATED(proto_item) \
((proto_item) ? FI_SET_FLAG(proto_item->finfo, FI_GENERATED) : 0)
typedef void (*proto_tree_foreach_func)(proto_node *, gpointer);