xterm.c (0a0fc0ddbe732779366ab6b1b879f62195e65967) | xterm.c (5e7672ec3f059f764fcc5c78216e24bb16c44dba) |
---|---|
1/* 2 * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) 3 * Licensed under the GPL 4 */ 5 6#include <stdio.h> 7#include <stdlib.h> 8#include <unistd.h> --- 17 unchanged lines hidden (view full) --- 26 int device; 27 int raw; 28 struct termios tt; 29 unsigned long stack; 30 int direct_rcv; 31}; 32 33/* Not static because it's called directly by the tt mode gdb code */ | 1/* 2 * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) 3 * Licensed under the GPL 4 */ 5 6#include <stdio.h> 7#include <stdlib.h> 8#include <unistd.h> --- 17 unchanged lines hidden (view full) --- 26 int device; 27 int raw; 28 struct termios tt; 29 unsigned long stack; 30 int direct_rcv; 31}; 32 33/* Not static because it's called directly by the tt mode gdb code */ |
34void *xterm_init(char *str, int device, struct chan_opts *opts) | 34void *xterm_init(char *str, int device, const struct chan_opts *opts) |
35{ 36 struct xterm_chan *data; 37 38 data = malloc(sizeof(*data)); 39 if(data == NULL) return(NULL); 40 *data = ((struct xterm_chan) { .pid = -1, 41 .helper_pid = -1, 42 .device = device, --- 146 unchanged lines hidden (view full) --- 189 os_close_file(fd); 190} 191 192static void xterm_free(void *d) 193{ 194 free(d); 195} 196 | 35{ 36 struct xterm_chan *data; 37 38 data = malloc(sizeof(*data)); 39 if(data == NULL) return(NULL); 40 *data = ((struct xterm_chan) { .pid = -1, 41 .helper_pid = -1, 42 .device = device, --- 146 unchanged lines hidden (view full) --- 189 os_close_file(fd); 190} 191 192static void xterm_free(void *d) 193{ 194 free(d); 195} 196 |
197struct chan_ops xterm_ops = { | 197const struct chan_ops xterm_ops = { |
198 .type = "xterm", 199 .init = xterm_init, 200 .open = xterm_open, 201 .close = xterm_close, 202 .read = generic_read, 203 .write = generic_write, 204 .console_write = generic_console_write, 205 .window_size = generic_window_size, --- 14 unchanged lines hidden --- | 198 .type = "xterm", 199 .init = xterm_init, 200 .open = xterm_open, 201 .close = xterm_close, 202 .read = generic_read, 203 .write = generic_write, 204 .console_write = generic_console_write, 205 .window_size = generic_window_size, --- 14 unchanged lines hidden --- |