aboutsummaryrefslogtreecommitdiffhomepage
path: root/demo/ex3.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2011-10-11 15:05:38 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2011-10-11 15:05:38 +0200
commit1efec3952b780cc675ae111313017c3b91d20a01 (patch)
tree8a2d77b52e2c558976c8d2d362edf8837e2066ea /demo/ex3.c
downloaderlang-slang-fork-1efec3952b780cc675ae111313017c3b91d20a01.tar.gz
initial commit based on erlang-slang 1.0 release (debian tar ball)
Diffstat (limited to 'demo/ex3.c')
-rw-r--r--demo/ex3.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/demo/ex3.c b/demo/ex3.c
new file mode 100644
index 0000000..0e9c7ff
--- /dev/null
+++ b/demo/ex3.c
@@ -0,0 +1,40 @@
+#include <stdio.h>
+#include <slang.h>
+
+
+stuff()
+{
+ SLsmg_normal_video ();
+ SLsmg_gotorc (5, 0);
+ SLsmg_write_string ("Hello ");
+ SLsmg_erase_eol ();
+ SLsmg_refresh ();
+}
+
+
+int main ()
+{
+ SLtt_get_terminfo ();
+ SLkp_init ();
+ SLang_init_tty (-1, 0, 0);
+ SLsmg_init_smg ();
+
+
+ stuff();
+
+ SLkp_getkey ();
+
+ /* do stuff .... */
+
+ SLsmg_reset_smg ();
+ SLang_reset_tty ();
+ return 0;
+}
+
+
+
+
+
+
+
+