projects
/
apps
/
madtty.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a way to associate custom data with a madtty term.
[apps/madtty.git]
/
madtty
/
madtty.c
diff --git
a/madtty/madtty.c
b/madtty/madtty.c
index
1718b83
..
c35959a
100644
(file)
--- a/
madtty/madtty.c
+++ b/
madtty/madtty.c
@@
-107,6
+107,7
@@
struct madtty_t {
char ebuf[BUFSIZ];
int rlen, elen;
madtty_handler_t handler;
char ebuf[BUFSIZ];
int rlen, elen;
madtty_handler_t handler;
+ void *data;
};
typedef struct t_row_t {
};
typedef struct t_row_t {
@@
-1095,3
+1096,13
@@
void madtty_set_handler(madtty_t *t, madtty_handler_t handler)
{
t->handler = handler;
}
{
t->handler = handler;
}
+
+void madtty_set_data(madtty_t *t, void *data)
+{
+ t->data = data;
+}
+
+void *madtty_get_data(madtty_t *t)
+{
+ return t->data;
+}