Files
wizapp-stdlib/src/os/shell/commander/commander.h
T
2026-09-06 18:15:23 +01:00

30 lines
776 B
C

// vim:fileencoding=utf-8:foldmethod=marker
#ifndef COMMANDER_H
#define COMMANDER_H
#include "commander_output.h"
#include "../../../common/aliases/aliases.h"
#include "../../../common/platform/platform.h"
#include "../../../base/strings/str8/str8.h"
#include <stdio.h>
#include <stdlib.h>
// TODO (Abdelrahman): This module needs rethinking
#ifdef WP_PLATFORM_CPP
BEGIN_C_LINKAGE
#endif // !WP_PLATFORM_CPP
#define wpCmdNoExit(ERR) ((WpCmdResult){.exited = false, .exit_code = EXIT_FAILURE, .error = ERR})
WpCmdResult wpShellCommanderExecute(WpCmdOutHandling out_handling, WpStr8 *out_buf, const WpStr8List *cmd);
wp_extern WpCmdError getOutputStatus(FILE *fp, i32 *status_out);
#ifdef WP_PLATFORM_CPP
END_C_LINKAGE
#endif // !WP_PLATFORM_CPP
#endif // !COMMANDER_H