… | |
… | |
10 | * Copyright (c) 1996 Chuck Blake <cblake@BBN.COM> |
10 | * Copyright (c) 1996 Chuck Blake <cblake@BBN.COM> |
11 | * Copyright (c) 1997 mj olesen <olesen@me.queensu.ca> |
11 | * Copyright (c) 1997 mj olesen <olesen@me.queensu.ca> |
12 | * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> |
12 | * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> |
13 | * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> |
13 | * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> |
14 | * - extensive modifications |
14 | * - extensive modifications |
15 | * Copyright (c) 2003-2007 Marc Lehmann <pcg@goof.com> |
15 | * Copyright (c) 2003-2008 Marc Lehmann <pcg@goof.com> |
16 | * |
16 | * |
17 | * This program is free software; you can redistribute it and/or modify |
17 | * This program is free software; you can redistribute it and/or modify |
18 | * it under the terms of the GNU General Public License as published by |
18 | * it under the terms of the GNU General Public License as published by |
19 | * the Free Software Foundation; either version 2 of the License, or |
19 | * the Free Software Foundation; either version 2 of the License, or |
20 | * (at your option) any later version. |
20 | * (at your option) any later version. |
… | |
… | |
267 | NULL, // Color_underline |
267 | NULL, // Color_underline |
268 | #endif |
268 | #endif |
269 | #ifdef OPTION_HC |
269 | #ifdef OPTION_HC |
270 | NULL, |
270 | NULL, |
271 | #endif |
271 | #endif |
272 | #ifdef KEEP_SCROLLCOLOR |
272 | #ifdef HAVE_SCROLLBARS |
273 | COLOR_SCROLLBAR, |
273 | COLOR_SCROLLBAR, |
|
|
274 | #endif |
|
|
275 | #ifdef RXVT_SCROLLBAR |
274 | COLOR_SCROLLTROUGH, |
276 | COLOR_SCROLLTROUGH, |
275 | #endif /* KEEP_SCROLLCOLOR */ |
277 | #endif |
276 | #if ENABLE_TRANSPARENCY |
278 | #if ENABLE_TRANSPARENCY |
277 | NULL, |
279 | NULL, |
278 | #endif |
280 | #endif |
279 | #if OFF_FOCUS_FADING |
281 | #if OFF_FOCUS_FADING |
280 | "rgb:00/00/00", |
282 | "rgb:00/00/00", |
… | |
… | |
308 | set_option (Opt_secondaryScreen); |
310 | set_option (Opt_secondaryScreen); |
309 | set_option (Opt_secondaryScroll); |
311 | set_option (Opt_secondaryScroll); |
310 | set_option (Opt_pastableTabs); |
312 | set_option (Opt_pastableTabs); |
311 | set_option (Opt_intensityStyles); |
313 | set_option (Opt_intensityStyles); |
312 | set_option (Opt_iso14755_52); |
314 | set_option (Opt_iso14755_52); |
|
|
315 | set_option (Opt_buffered); |
313 | } |
316 | } |
314 | |
317 | |
315 | void |
318 | static void |
316 | rxvt_term::init_secondary () |
319 | init_secondary () |
317 | { |
320 | { |
318 | int i; |
321 | int i; |
319 | |
322 | |
320 | /* |
|
|
321 | * Close all unused file descriptors |
|
|
322 | * We don't want them, we don't need them. |
|
|
323 | */ |
|
|
324 | if ((i = open ("/dev/null", O_RDONLY)) < 0) |
323 | if ((i = open ("/dev/null", O_RDONLY)) < 0) |
325 | { |
324 | { |
326 | /* TODO: BOO HISS */ |
|
|
327 | dup2 (STDERR_FILENO, STDIN_FILENO); |
325 | dup2 (STDERR_FILENO, STDIN_FILENO); |
328 | } |
326 | } |
329 | else if (i != STDIN_FILENO) |
327 | else if (i != STDIN_FILENO) |
330 | { |
328 | { |
331 | dup2 (i, STDIN_FILENO); |
329 | dup2 (i, STDIN_FILENO); |
332 | close (i); |
330 | close (i); |
333 | } |
331 | } |
334 | |
332 | |
335 | dup2 (STDERR_FILENO, STDOUT_FILENO); |
333 | dup2 (STDERR_FILENO, STDOUT_FILENO); |
336 | |
|
|
337 | #if 0 // schmorp sayz closing filies is murder |
|
|
338 | for (i = STDERR_FILENO + 1; i < num_fds; i++) |
|
|
339 | { |
|
|
340 | #ifdef __sgi /* Alex Coventry says we need 4 & 7 too */ |
|
|
341 | if (i == 4 || i == 7) |
|
|
342 | continue; |
|
|
343 | #endif |
|
|
344 | close (i); |
|
|
345 | } |
|
|
346 | #endif |
|
|
347 | } |
334 | } |
348 | |
335 | |
349 | /*----------------------------------------------------------------------*/ |
336 | /*----------------------------------------------------------------------*/ |
350 | const char ** |
337 | const char ** |
351 | rxvt_term::init_resources (int argc, const char *const *argv) |
338 | rxvt_term::init_resources (int argc, const char *const *argv) |
… | |
… | |
923 | * get scrollBar shadow colors |
910 | * get scrollBar shadow colors |
924 | * |
911 | * |
925 | * The calculations of topShadow/bottomShadow values are adapted |
912 | * The calculations of topShadow/bottomShadow values are adapted |
926 | * from the fvwm window manager. |
913 | * from the fvwm window manager. |
927 | */ |
914 | */ |
928 | #ifdef KEEP_SCROLLCOLOR |
915 | #ifdef RXVT_SCROLLBAR |
929 | if (depth <= 2) |
916 | if (depth <= 2) |
930 | { |
917 | { |
931 | /* Monochrome */ |
918 | /* Monochrome */ |
932 | alias_color (Color_scroll, Color_fg); |
919 | alias_color (Color_scroll, Color_fg); |
933 | alias_color (Color_topShadow, Color_bg); |
920 | alias_color (Color_topShadow, Color_bg); |
… | |
… | |
948 | min ((int)rgba::MAX_CC, max (cscroll.b / 5, cscroll.b) * 7 / 5), |
935 | min ((int)rgba::MAX_CC, max (cscroll.b / 5, cscroll.b) * 7 / 5), |
949 | cscroll.a) |
936 | cscroll.a) |
950 | )) |
937 | )) |
951 | alias_color (Color_topShadow, Color_White); |
938 | alias_color (Color_topShadow, Color_White); |
952 | } |
939 | } |
953 | #endif /* KEEP_SCROLLCOLOR */ |
940 | #endif |
954 | |
941 | |
955 | #ifdef OFF_FOCUS_FADING |
942 | #ifdef OFF_FOCUS_FADING |
956 | for (i = 0; i < (depth <= 2 ? 2 : NRS_COLORS); i++) |
943 | for (i = 0; i < (depth <= 2 ? 2 : NRS_COLORS); i++) |
957 | update_fade_color (i); |
944 | update_fade_color (i); |
958 | #endif |
945 | #endif |