Initial import
authorMatthew Mondor <mmondor@pulsar-zone.net>
Wed, 9 Sep 2015 23:25:43 +0000 (23:25 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Wed, 9 Sep 2015 23:25:43 +0000 (23:25 +0000)
tests/tget.c [new file with mode: 0644]

diff --git a/tests/tget.c b/tests/tget.c
new file mode 100644 (file)
index 0000000..9c47c1d
--- /dev/null
@@ -0,0 +1,21 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <termcap.h>
+
+int    main(void);
+
+int
+main(void)
+{
+       char    str[2048], *tb = str, *cap;
+
+       cap = tgetstr("le", &tb);
+       (void) printf("cap = %p\n", cap);
+       if (cap != NULL)
+               (void) printf("cap = %s\n", cap);
+       (void) printf("tb = %p\n", tb);
+       if (tb != NULL)
+               (void) printf("*tb = 0x%02x\n", *tb);
+
+       return 0;
+}