-/* $OpenBSD: apps.c,v 1.22 2014/12/28 16:51:31 jsing Exp $ */
+/* $OpenBSD: apps.c,v 1.23 2015/01/01 14:28:00 jsing Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
*opt->opt.value = opt->value;
break;
+ case OPTION_VALUE_AND:
+ *opt->opt.value &= opt->value;
+ break;
+
+ case OPTION_VALUE_OR:
+ *opt->opt.value |= opt->value;
+ break;
+
default:
fprintf(stderr, "option %s - unknown type %i\n",
opt->name, opt->type);
-/* $OpenBSD: apps.h,v 1.12 2014/12/28 16:22:37 jsing Exp $ */
+/* $OpenBSD: apps.h,v 1.13 2015/01/01 14:28:00 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
OPTION_ARG_FORMAT,
OPTION_ARG_FUNC,
OPTION_ARG_INT,
+ OPTION_DISCARD,
OPTION_FUNC,
OPTION_FLAG,
OPTION_FLAG_ORD,
OPTION_VALUE,
+ OPTION_VALUE_AND,
+ OPTION_VALUE_OR,
} type;
union {
char **arg;