shithub: mc

ref: a277cea8fabeb3ec38484ffc461ae86e5fd8f9b5
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()
	;;
}