projects
/
libmalice.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add example for exiting mid-program.
[libmalice.git]
/
demo-exitclean.c
diff --git a/demo-exitclean.c
b/demo-exitclean.c
new file mode 100644
(file)
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;
+}