aboutsummaryrefslogtreecommitdiffstats
path: root/tty.h
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2005-03-12 00:27:55 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2005-03-12 00:27:55 (GMT)
commit77b250bfb63a28a8fe8a8da67de7354bce6e61ff (patch)
treee28f72c18305016c19c608f5fce4432529e7673d /tty.h
parent5dfb1906b299bf7c8a1ee3ba5cd1c9ea40648d89 (diff)
downloadpowwow-77b250bfb63a28a8fe8a8da67de7354bce6e61ff.zip
powwow-77b250bfb63a28a8fe8a8da67de7354bce6e61ff.tar.gz
powwow-77b250bfb63a28a8fe8a8da67de7354bce6e61ff.tar.bz2
Initial revisionv1.2.7
Diffstat (limited to 'tty.h')
-rw-r--r--tty.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/tty.h b/tty.h
new file mode 100644
index 0000000..ab22d90
--- /dev/null
+++ b/tty.h
@@ -0,0 +1,52 @@
+/* public definitions from tty.c */
+
+#ifndef _TTY_H_
+#define _TTY_H_
+
+extern int tty_read_fd;
+
+extern char *tty_clreoln, *tty_clreoscr, *tty_begoln,
+ *tty_modebold, *tty_modeblink, *tty_modeuline,
+ *tty_modenorm, *tty_modenormbackup,
+ *tty_modeinv, *tty_modestandon, *tty_modestandoff;
+
+void tty_bootstrap __P ((void));
+void tty_start __P ((void));
+void tty_quit __P ((void));
+void tty_special_keys __P ((void));
+void tty_sig_winch_bottomhalf __P ((void));
+void tty_add_walk_binds __P ((void));
+void tty_add_initial_binds __P ((void));
+void tty_gotoxy __P ((int col, int line));
+void tty_gotoxy_opt __P ((int fromcol, int fromline, int tocol, int toline));
+
+void input_delete_nofollow_chars __P ((int n));
+void input_overtype_follow __P ((char c));
+void input_insert_follow_chars __P ((char *str, int n));
+void input_moveto __P ((int new_pos));
+
+#if 1
+
+#define tty_puts(s) fputs((s), stdout)
+/* printf("%s", (s)); would be as good */
+
+#define tty_putc(c) putc((int)(char)(c), stdout)
+#define tty_printf printf
+#define tty_read read
+#define tty_gets(s,size) fgets((s), (size), stdin)
+#define tty_flush() fflush(stdout)
+#define tty_raw_write(s,size) do { tty_flush(); write(1, (s), (size)); } while (0)
+
+#else /* !1 */
+
+void tty_puts __P ((char *s));
+void tty_putc __P ((char c));
+void tty_printf __P ((const char *format, ...));
+int tty_read __P ((int fd, char *buf, size_t count));
+void tty_gets __P ((char *s, int size));
+void tty_flush __P ((void));
+void tty_raw_write __P ((char *data, int len));
+
+#endif /* 1 */
+
+#endif /* _TTY_H_ */