Repositories
/
mmondor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a7a805
)
Initial import
author
Matthew Mondor
<mmondor@pulsar-zone.net>
Wed, 9 Sep 2015 23:25:43 +0000
(23:25 +0000)
committer
Matthew Mondor
<mmondor@pulsar-zone.net>
Wed, 9 Sep 2015 23:25:43 +0000
(23:25 +0000)
tests/tget.c
[new file with mode: 0644]
patch
|
blob
diff --git a/tests/tget.c
b/tests/tget.c
new file mode 100644
(file)
index 0000000..
9c47c1d
--- /dev/null
+++ b/
tests/tget.c
@@ -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;
+}