Change conditional include to avoid conflicts
This commit is contained in:
parent
ddf6711a44
commit
cf4cb1c4de
8 changed files with 26 additions and 26 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef COLOR_HPP
|
#ifndef ZTD_COLOR_HPP
|
||||||
#define COLOR_HPP
|
#define ZTD_COLOR_HPP
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
@ -122,4 +122,4 @@ namespace ztd
|
||||||
inline std::ostream& operator<<(std::ostream& st, const ztd::color::color_name& c) { return st << ztd::color::color_index[c]; }
|
inline std::ostream& operator<<(std::ostream& st, const ztd::color::color_name& c) { return st << ztd::color::color_index[c]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //COLOR_HPP
|
#endif //ZTD_COLOR_HPP
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef COMPLEX_HPP
|
#ifndef ZTD_COMPLEX_HPP
|
||||||
#define COMPLEX_HPP
|
#define ZTD_COMPLEX_HPP
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
@ -59,4 +59,4 @@ namespace ztd
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //COMPLEX_HPP
|
#endif //ZTD_COMPLEX_HPP
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef FILEDAT_HPP
|
#ifndef ZTD_FILEDAT_HPP
|
||||||
#define FILEDAT_HPP
|
#define ZTD_FILEDAT_HPP
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
@ -442,4 +442,4 @@ namespace ztd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif //FILEDAT_HPP
|
#endif //ZTD_FILEDAT_HPP
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef OPTIONS_H
|
#ifndef ZTD_OPTIONS_HPP
|
||||||
#define OPTIONS_H
|
#define ZTD_OPTIONS_HPP
|
||||||
|
|
||||||
//DUPLICATES NOT HANDLED: takes last one
|
//DUPLICATES NOT HANDLED: takes last one
|
||||||
//NO ORDER: no way to know options order
|
//NO ORDER: no way to know options order
|
||||||
|
|
@ -177,4 +177,4 @@ namespace ztd
|
||||||
|
|
||||||
} //ztd
|
} //ztd
|
||||||
|
|
||||||
#endif //OPTIONS_H
|
#endif //ZTD_OPTIONS_HPP
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef SHELL_HPP
|
#ifndef ZTD_SHELL_HPP
|
||||||
#define SHELL_HPP
|
#define ZTD_SHELL_HPP
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
@ -120,7 +120,7 @@ namespace ztd
|
||||||
@return File descriptor for the stream in question
|
@return File descriptor for the stream in question
|
||||||
@see <a href="http://man7.org/linux/man-pages/man3/popen.3.html">popen(), pclose()</a>
|
@see <a href="http://man7.org/linux/man-pages/man3/popen.3.html">popen(), pclose()</a>
|
||||||
*/
|
*/
|
||||||
inline FILE* popen2(const char* command, const char* type, int* pid) { return eopen(type, pid, "/bin/sh", {"-c", (char*) command}) ; }
|
inline FILE* popen2(const char* command, const char* type, int* pid) { return eopen(type, pid, "/bin/sh", {(char*) "-c", (char*) command}) ; }
|
||||||
//! @brief pclose C function with added pid functionality
|
//! @brief pclose C function with added pid functionality
|
||||||
/*!
|
/*!
|
||||||
@param fd
|
@param fd
|
||||||
|
|
@ -150,11 +150,11 @@ namespace ztd
|
||||||
@param args Arguments given to the file
|
@param args Arguments given to the file
|
||||||
*/
|
*/
|
||||||
std::pair<std::string, int> script(std::string const& data, std::vector<std::string> const& args);
|
std::pair<std::string, int> script(std::string const& data, std::vector<std::string> const& args);
|
||||||
|
|
||||||
//! @brief Variadic call of script()
|
//! @brief Variadic call of script()
|
||||||
template<class... Args>
|
template<class... Args>
|
||||||
std::pair<std::string, int> script(std::string const& data, Args... args) { std::vector<std::string> rargs = { static_cast<std::string>(args)...}; return script(data, rargs); }
|
std::pair<std::string, int> script(std::string const& data, Args... args) { std::vector<std::string> rargs = { static_cast<std::string>(args)...}; return script(data, rargs); }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //SHELL_HPP
|
#endif //ZTD_SHELL_HPP
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef SOCKET_H
|
#ifndef ZTD_SOCKET_HPP
|
||||||
#define SOCKET_H
|
#define ZTD_SOCKET_HPP
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
@ -221,4 +221,4 @@ namespace ztd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif //SOCKET_H
|
#endif //ZTD_SOCKET_HPP
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TIME_HPP
|
#ifndef ZTD_TIME_HPP
|
||||||
#define TIME_HPP
|
#define ZTD_TIME_HPP
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
|
@ -50,4 +50,4 @@ namespace ztd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif //TIME_HPP
|
#endif //ZTD_TIME_HPP
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef WAIT_HPP
|
#ifndef ZTD_WAIT_HPP
|
||||||
#define WAIT_HPP
|
#define ZTD_WAIT_HPP
|
||||||
|
|
||||||
#include <mutex> // std::mutex, std::unique_lock
|
#include <mutex> // std::mutex, std::unique_lock
|
||||||
#include <condition_variable> // std::condition_variable
|
#include <condition_variable> // std::condition_variable
|
||||||
|
|
@ -30,4 +30,4 @@ namespace ztd
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //WAIT_HPP
|
#endif //ZTD_WAIT_HPP
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue