projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Return the state information from loop_init() in the correct way. This means
[u/mdw/putty]
/
testback.c
diff --git
a/testback.c
b/testback.c
index
2a468a6
..
f3e7614
100644
(file)
--- a/
testback.c
+++ b/
testback.c
@@
-1,4
+1,4
@@
-/* $Id: testback.c,v 1.
2 2002/11/19 12:29:4
5 ben Exp $ */
+/* $Id: testback.c,v 1.
3 2002/11/23 19:58:5
5 ben Exp $ */
/*
* Copyright (c) 1999 Simon Tatham
* Copyright (c) 1999 Ben Harris
/*
* Copyright (c) 1999 Simon Tatham
* Copyright (c) 1999 Ben Harris
@@
-75,7
+75,8
@@
static char *loop_init(void *frontend_handle, void **backend_handle,
struct loop_state *st = smalloc(sizeof(*st));
st->term = frontend_handle;
struct loop_state *st = smalloc(sizeof(*st));
st->term = frontend_handle;
- return (char *)st;
+ *backend_handle = st;
+ return NULL;
}
static int null_send(void *handle, char *buf, int len) {
}
static int null_send(void *handle, char *buf, int len) {
@@
-85,7
+86,12
@@
static int null_send(void *handle, char *buf, int len) {
static int loop_send(void *handle, char *buf, int len) {
struct loop_state *st = handle;
static int loop_send(void *handle, char *buf, int len) {
struct loop_state *st = handle;
+ int i;
+ fprintf(stderr, "%d chars: ", len);
+ for (i = 0; i < len; i++)
+ fprintf(stderr, " 0x%x", buf[i]);
+ fprintf(stderr, "\n");
return from_backend(st->term, 0, buf, len);
}
return from_backend(st->term, 0, buf, len);
}