summaryrefslogtreecommitdiff
path: root/usr.bin/vi/common/options.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-01-08 21:05:41 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-01-08 21:05:41 +0000
commitfcde5ec1a7e7dda343ba822c73be5f080b0ff0c8 (patch)
treefae8f53125cc8dbd05f4b107c32d3733dbfdd6da /usr.bin/vi/common/options.h
parente36b0788688a5dd823dc99c40167de645deb9988 (diff)
Explicit braces around macro fields and logical operations, gets rid of 148
warnings, no functional change. From Ray Lai.
Diffstat (limited to 'usr.bin/vi/common/options.h')
-rw-r--r--usr.bin/vi/common/options.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/vi/common/options.h b/usr.bin/vi/common/options.h
index 9e1f424dba2..42f789a96d2 100644
--- a/usr.bin/vi/common/options.h
+++ b/usr.bin/vi/common/options.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.h,v 1.7 2002/02/16 21:27:57 millert Exp $ */
+/* $OpenBSD: options.h,v 1.8 2006/01/08 21:05:39 miod Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -36,7 +36,7 @@
#define OG_SET(gp, o) ((gp)->opts[(o)].o_cur.val) = 1
#define OG_STR(gp, o) ((gp)->opts[(o)].o_cur.str)
#define OG_VAL(gp, o) ((gp)->opts[(o)].o_cur.val)
-#define OG_ISSET(gp, o) OG_VAL(gp, o)
+#define OG_ISSET(gp, o) OG_VAL((gp), (o))
#define OG_D_STR(gp, o) ((gp)->opts[(o)].o_def.str)
#define OG_D_VAL(gp, o) ((gp)->opts[(o)].o_def.val)
@@ -55,21 +55,21 @@ struct _option {
u_long val; /* Value or boolean. */
char *str; /* String. */
} o_cur;
-#define O_CLR(sp, o) o_set(sp, o, 0, NULL, 0)
-#define O_SET(sp, o) o_set(sp, o, 0, NULL, 1)
-#define O_STR(sp, o) O_V(sp, o, o_cur.str)
-#define O_VAL(sp, o) O_V(sp, o, o_cur.val)
-#define O_ISSET(sp, o) O_VAL(sp, o)
+#define O_CLR(sp, o) o_set((sp), (o), 0, NULL, 0)
+#define O_SET(sp, o) o_set((sp), (o), 0, NULL, 1)
+#define O_STR(sp, o) O_V((sp), (o), o_cur.str)
+#define O_VAL(sp, o) O_V((sp), (o), o_cur.val)
+#define O_ISSET(sp, o) O_VAL((sp), (o))
union {
u_long val; /* Value or boolean. */
char *str; /* String. */
} o_def;
-#define O_D_CLR(sp, o) o_set(sp, o, OS_DEF, NULL, 0)
-#define O_D_SET(sp, o) o_set(sp, o, OS_DEF, NULL, 1)
-#define O_D_STR(sp, o) O_V(sp, o, o_def.str)
-#define O_D_VAL(sp, o) O_V(sp, o, o_def.val)
-#define O_D_ISSET(sp, o) O_D_VAL(sp, o)
+#define O_D_CLR(sp, o) o_set((sp), (o), OS_DEF, NULL, 0)
+#define O_D_SET(sp, o) o_set((sp), (o), OS_DEF, NULL, 1)
+#define O_D_STR(sp, o) O_V((sp), (o), o_def.str)
+#define O_D_VAL(sp, o) O_V((sp), (o), o_def.val)
+#define O_D_ISSET(sp, o) O_D_VAL((sp), (o))
#define OPT_GLOBAL 0x01 /* Option is global. */
#define OPT_SELECTED 0x02 /* Selected for display. */