mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
27dd121d14
git-subtree-dir: outside/re2 git-subtree-mainline: f94738bfd171ae447133e0964843addbb497894f git-subtree-split: 539b44fc4c5a49c3453b80e3af85d297f4cab4bf
28 lines
994 B
C++
28 lines
994 B
C++
// Copyright 2009 The RE2 Authors. All Rights Reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Simplified version of Google's command line flags.
|
|
// Does not support parsing the command line.
|
|
// If you want to do that, see
|
|
// http://code.google.com/p/google-gflags
|
|
|
|
#ifndef RE2_UTIL_FLAGS_H__
|
|
#define RE2_UTIL_FLAGS_H__
|
|
|
|
#define DEFINE_flag(type, name, deflt, desc) \
|
|
namespace re2 { type FLAGS_##name = deflt; }
|
|
|
|
#define DECLARE_flag(type, name) \
|
|
namespace re2 { extern type FLAGS_##name; }
|
|
|
|
#define DEFINE_bool(name, deflt, desc) DEFINE_flag(bool, name, deflt, desc)
|
|
#define DEFINE_int32(name, deflt, desc) DEFINE_flag(int32, name, deflt, desc)
|
|
#define DEFINE_string(name, deflt, desc) DEFINE_flag(string, name, deflt, desc)
|
|
|
|
#define DECLARE_bool(name) DECLARE_flag(bool, name)
|
|
#define DECLARE_int32(name) DECLARE_flag(int32, name)
|
|
#define DECLARE_string(name) DECLARE_flag(string, name)
|
|
|
|
#endif // RE2_UTIL_FLAGS_H__
|