shithub: mc

ref: ed5a96dec13db05df59e4af350be066f2c57efd2
dir: /lib/std/assert.myr/

View raw version
use "fmt"
use "syswrap"
use "varargs"

pkg std =
	const assert	: (cond : bool, fmt : byte[:], args : ... -> void)
;;

const assert = {cond, msg, args
	var ap

	ap = vastart(&args)
	if !cond
		std.fputv(2, msg, &ap)
		suicide()
	;;
}