1 | /*--------------------------------*-C-*---------------------------------* |
1 | /*--------------------------------*-C-*---------------------------------* |
2 | * File: main.c |
2 | * File: main.c |
3 | *----------------------------------------------------------------------* |
3 | *----------------------------------------------------------------------* |
4 | * $Id: main.C,v 1.4 2003/11/25 15:25:17 pcg Exp $ |
4 | * $Id: main.C,v 1.7 2003/11/26 10:42:34 pcg Exp $ |
5 | * |
5 | * |
6 | * All portions of code are copyright by their respective author/s. |
6 | * All portions of code are copyright by their respective author/s. |
7 | * Copyright (c) 1992 John Bovey, University of Kent at Canterbury <jdb@ukc.ac.uk> |
7 | * Copyright (c) 1992 John Bovey, University of Kent at Canterbury <jdb@ukc.ac.uk> |
8 | * - original version |
8 | * - original version |
9 | * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> |
9 | * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> |
… | |
… | |
58 | { |
58 | { |
59 | free (p); |
59 | free (p); |
60 | } |
60 | } |
61 | |
61 | |
62 | rxvt_term::rxvt_term () |
62 | rxvt_term::rxvt_term () |
63 | : pty_ev(this, &rxvt_term::pty_cb), |
63 | : pty_ev (this, &rxvt_term::pty_cb), |
|
|
64 | #ifdef CURSOR_BLINK |
|
|
65 | blink_ev (this, &rxvt_term::blink_cb), |
|
|
66 | #endif |
|
|
67 | #ifdef POINTER_BLANK |
|
|
68 | pointer_ev (this, &rxvt_term::pointer_cb), |
|
|
69 | #endif |
64 | x_ev (this, &rxvt_term::x_cb) |
70 | x_ev (this, &rxvt_term::x_cb) |
65 | { |
71 | { |
66 | cmdbuf_ptr = cmdbuf_endp = cmdbuf_base; |
72 | cmdbuf_ptr = cmdbuf_endp = cmdbuf_base; |
67 | } |
73 | } |
68 | |
74 | |
69 | rxvt_term::~rxvt_term () |
75 | rxvt_term::~rxvt_term () |
… | |
… | |
155 | rxvt_init_env (this); |
161 | rxvt_init_env (this); |
156 | rxvt_init_command (this, cmd_argv); |
162 | rxvt_init_command (this, cmd_argv); |
157 | |
163 | |
158 | x_ev.start (Xfd, EVENT_READ); |
164 | x_ev.start (Xfd, EVENT_READ); |
159 | pty_ev.start (cmd_fd, EVENT_READ); |
165 | pty_ev.start (cmd_fd, EVENT_READ); |
|
|
166 | |
|
|
167 | flush (); |
160 | |
168 | |
161 | return true; |
169 | return true; |
162 | } |
170 | } |
163 | |
171 | |
164 | /* ------------------------------------------------------------------------- * |
172 | /* ------------------------------------------------------------------------- * |