format code

This commit is contained in:
code liturgy 2022-11-11 17:10:27 -05:00
parent b80df54b9a
commit 5080985a77
2 changed files with 4 additions and 13 deletions

View File

@ -15,7 +15,7 @@ constexpr size_t size(T (&)[N]) { return N; }
extern "C" { extern "C" {
CLAPI void* CLAPI void *
init_aug(augSettings settings, int flags) { init_aug(augSettings settings, int flags) {
CHECK_RET_NULLPTR(!path_exists(std::string(settings.root)), "Root path is invalid."); CHECK_RET_NULLPTR(!path_exists(std::string(settings.root)), "Root path is invalid.");
return aug_init(settings.root, settings.loadPath, flags); return aug_init(settings.root, settings.loadPath, flags);
@ -51,8 +51,7 @@ CLAPI int rm_node(augeas *aug, const char *path) {
} }
CLAPI char *
CLAPI char*
get_preview(augeas *aug, const char *path) { get_preview(augeas *aug, const char *path) {
CHECK_RET_NULLPTR(!aug, INVALID_STATE); CHECK_RET_NULLPTR(!aug, INVALID_STATE);
@ -188,18 +187,11 @@ CLAPI bool save(augeas *aug) {
return aug_save(aug) == 0; return aug_save(aug) == 0;
} }
CLAPI void get_arr( unsigned long &size, char** result) CLAPI int match(augeas *aug, const char *match_path, char ***matches) {
{
}
CLAPI int match(augeas *aug, const char *match_path, char*** matches) {
CHECK_RET_INT(!aug, INVALID_STATE); CHECK_RET_INT(!aug, INVALID_STATE);
return aug_match(aug, match_path, matches); return aug_match(aug, match_path, matches);
} }
CLAPI const char *get_node(augeas *aug, const char *path) { CLAPI const char *get_node(augeas *aug, const char *path) {
const char *value; const char *value;

3
main.h
View File

@ -41,6 +41,5 @@ CLAPI int rm_node (augeas *aug, const char *path);
CLAPI bool save (augeas *aug); CLAPI bool save (augeas *aug);
CLAPI int match(augeas *aug, const char *match_path, char*** matches); CLAPI int match(augeas *aug, const char *match_path, char*** matches);
// internal static extern int match(IntPtr augeas, [MarshalAs(UnmanagedType.LPStr)] string matchPath, uint* size, char*** stringArray);
} }