summaryrefslogtreecommitdiff
path: root/libssh2-sys/libssh2-1.5.0/nw/keepscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh2-sys/libssh2-1.5.0/nw/keepscreen.c')
-rw-r--r--libssh2-sys/libssh2-1.5.0/nw/keepscreen.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/libssh2-sys/libssh2-1.5.0/nw/keepscreen.c b/libssh2-sys/libssh2-1.5.0/nw/keepscreen.c
new file mode 100644
index 0000000..c3471b3
--- /dev/null
+++ b/libssh2-sys/libssh2-1.5.0/nw/keepscreen.c
@@ -0,0 +1,25 @@
+/* Simple _NonAppStop() implementation which can be linked to your
+ * NLM in order to keep the screen open when the NLM terminates
+ * (the good old clib behaviour).
+ * You dont have to call it, its done automatically from LibC.
+ *
+ * 2004-Aug-11 by Guenter Knauf
+ *
+ * URL: http://www.gknw.net/development/mk_nlm/
+ */
+
+#include <stdio.h>
+#include <screen.h>
+
+void _NonAppStop()
+{
+ uint16_t row, col;
+
+ GetScreenSize(&row, &col);
+ gotorowcol(row-1, 0);
+ /* pressanykey(); */
+ printf("<Press any key to close screen> ");
+ getcharacter();
+}
+
+