Something went wrong. Try again.
Something went wrong. Try again.
Files
Verified signature Signed by matrixfurry.com SHA256:/Xn30J4Kb3adDK2Uh+/+/I3nCq2UMHmdVhsw8eADbuY Click to copy SHA
Verified signature Signed by matrixfurry.com SHA256:/Xn30J4Kb3adDK2Uh+/+/I3nCq2UMHmdVhsw8eADbuY Click to copy SHA
Verified signature Signed by matrixfurry.com SHA256:OIsNRui6AFD5q4jnVzMss74Th6LbifKVEEyE9czRgMw Click to copy SHA
- Zig 100%
README.md
SysExits for Zig #
This library provides the SysExit constants from BSD sysexits.h
If you're enjoying this library, please consider donating. Your donation will allow me to:
- improve the Linux VR ecosystem and software support
- keep this software up-to-date and secure
- continue developing high-quality software
Add to your project #
Add the package to your build.zig.zon:
zig fetch --save git+https://tangled.org/did:plc:ees4lejcv6zjj3lz3ctj3djs
Import the package in your build.zig:
const sysexits = b.dependency("sysexits", .{}).module("sysexits");
exe.root_module.addImport("sysexits", sysexits);
Usage #
Use the constants provided by this library:
const sysexits = @import("sysexits");
pub fn main() !u8 {
// Oh no, the command was used incorrectly!
return sysexits.usage;
// Yay, everything worked correctly!
return sysexits.ok;
}
Or with std.process.exit():
const std = @import("std");
const sysexits = @import("sysexits");
pub fn main() !void {
// Oh no, the command was used incorrectly!
std.process.exit(sysexits.usage);
// Yay, everything worked correctly!
std.process.exit(sysexits.ok);
}
