X-Git-Url: https://git.enpas.org/?p=libmalice.git;a=blobdiff_plain;f=demo-exitclean.c;fp=demo-exitclean.c;h=a87c0f9351d34a81b9fff40ab6fe00d1f26bf0fb;hp=0000000000000000000000000000000000000000;hb=4eb9d01a7a8018ad332c30ee7b036f6f81894031;hpb=f880243c5af1076eac3b8f2af326640a5d1bb79d diff --git a/demo-exitclean.c b/demo-exitclean.c new file mode 100644 index 0000000..a87c0f9 --- /dev/null +++ b/demo-exitclean.c @@ -0,0 +1,12 @@ +#include "libmalice.h" + +int lmMain(void) +{ + lmPrintString("This demo exits mid-program via lmExit() with code 23.\n"); + + lmExit(23); + + lmPrintString("This line is never printed.\n"); + + return 42; +}