rename from soi.h to soi, including macros

This commit is contained in:
Johannes Kapfhammer 2019-10-06 17:16:19 +02:00
parent 44aa8d060a
commit d8a3ccc553
6 changed files with 21 additions and 21 deletions

View file

@ -7,8 +7,8 @@
//
// The global operator<< overload hs been removed
#ifndef SOI_H_PRETTY_PRINT
#define SOI_H_PRETTY_PRINT
#ifndef SOI_PRETTY_PRINT
#define SOI_PRETTY_PRINT
#include <cstddef>
#include <iterator>
@ -88,7 +88,7 @@ namespace pretty_print
struct delimiters
{
using type = delimiters_values<TChar>;
static const type values;
static const type values;
};
@ -441,4 +441,4 @@ namespace std
}
*/
#endif // SOI_H_PRETTY_PRINT
#endif // SOI_PRETTY_PRINT

View file

@ -7,8 +7,8 @@
// initialize with dbg_init() to enable colorized output
//
#ifndef SOI_H_DBG
#define SOI_H_DBG
#ifndef SOI_DBG
#define SOI_DBG
#include <cstddef>
#include <stdexcept>
@ -165,7 +165,7 @@ sanitized_type_name() {
t[11] == 'g';
return static_string_no_std(is_debug, is_std, t);
}
// ----------------------------------------------------------------------------
// colorized output
@ -178,7 +178,7 @@ bool tty_supports_colors() {
}
int has_environment_color_overwrite() {
if (const char* color_enabled = std::getenv("SOI_H_COLOR")) {
if (const char* color_enabled = std::getenv("SOI_COLOR")) {
if (!std::strcmp(color_enabled, "1"))
return 1;
if (!std::strcmp(color_enabled, "0"))
@ -261,7 +261,7 @@ auto dbg_print(const char (&msg)[N],
char const* file,
int line,
char const* function_name,
char const* expression) -> decltype(msg) {
char const* expression) -> decltype(msg) {
std::cerr << ANSI_DEBUG
<< "[" << file << ":" << line
<< " (" << function_name << ")] " << ANSI_RESET
@ -279,7 +279,7 @@ T&& identity(T&& t) {
} // end namespace dbg_macro
#ifdef SOI_H_RELEASE
#ifdef SOI_RELEASE
#define dbg(...) dbg_macro::identity(__VA_ARGS__)
#else
#define dbg(...) \
@ -291,4 +291,4 @@ T&& identity(T&& t) {
#__VA_ARGS__)
#endif
#endif // SOI_H_DBG
#endif // SOI_DBG

View file

@ -6,8 +6,8 @@
// pretty printing with c++
//
#ifndef SOI_H_PRETTY
#define SOI_H_PRETTY
#ifndef SOI_PRETTY
#define SOI_PRETTY
#include "prettyprint.hpp"
@ -73,4 +73,4 @@ pretty_print(std::basic_ostream<TChar, TCharTraits> & stream, const T& x) {
}
#endif // SOI_H_PRETTY
#endif // SOI_PRETTY

View file

@ -28,7 +28,7 @@
#include <valarray>
#include <vector>
#include "soi-dbg.hpp"
#include "bits/soi-dbg.hpp"
namespace soi_h {
@ -56,7 +56,7 @@ void noninteractive_check_eof() {
}
bool should_check_for_eof() {
if (const char* eofcheck_enabled = std::getenv("SOI_H_EOFCHECK")) {
if (const char* eofcheck_enabled = std::getenv("SOI_EOFCHECK")) {
if (!std::strcmp(eofcheck_enabled, "1"))
return true;
if (!std::strcmp(eofcheck_enabled, "0"))
@ -96,7 +96,7 @@ soi_h_initializer soi_h_initializer_{false};
} // end namespace soi_h
#include "soi-deprecate.hpp"
#include "bits/soi-deprecate.hpp"
#define int int64_t
using namespace std;