claugeas/utils.h

13 lines
500 B
C
Raw Permalink Normal View History

2022-11-12 01:09:13 +03:00
#include "string"
#include <iostream>
// Some guards
#define CHECK_RET_VOID(bx, msg) if(bx) {std::cout << msg << std::endl; return;}
#define CHECK_RET_NULLPTR(bx, msg) if(bx) {std::cout << msg << std::endl; return nullptr;}
#define CHECK_RET_BOOL(bx, msg) if(bx) {std::cout << msg << std::endl; return false;}
#define CHECK_RET_INT(bx, msg) if(bx) {std::cout << msg << std::endl; return -1;}
2022-11-12 21:23:29 +03:00
#define INVALID_STATE "Augeas object is no longer valid."
2022-11-12 01:09:13 +03:00
bool path_exists(const std::string &name);