… | |
… | |
192 | MEvent.time = CurrentTime; |
192 | MEvent.time = CurrentTime; |
193 | MEvent.button = AnyButton; |
193 | MEvent.button = AnyButton; |
194 | options = DEFAULT_OPTIONS; |
194 | options = DEFAULT_OPTIONS; |
195 | want_refresh = 1; |
195 | want_refresh = 1; |
196 | priv_modes = SavedModes = PrivMode_Default; |
196 | priv_modes = SavedModes = PrivMode_Default; |
197 | focus = 0; |
|
|
198 | ncol = 80; |
197 | ncol = 80; |
199 | nrow = 24; |
198 | nrow = 24; |
200 | int_bwidth = INTERNALBORDERWIDTH; |
199 | int_bwidth = INTERNALBORDERWIDTH; |
201 | ext_bwidth = EXTERNALBORDERWIDTH; |
200 | ext_bwidth = EXTERNALBORDERWIDTH; |
202 | lineSpace = LINESPACE; |
201 | lineSpace = LINESPACE; |
203 | saveLines = SAVELINES; |
202 | saveLines = SAVELINES; |
204 | numpix_colors = TOTAL_COLORS; |
203 | numpix_colors = TOTAL_COLORS; |
205 | |
204 | |
206 | refresh_limit = 1; |
205 | refresh_limit = 1; |
207 | refresh_type = SLOW_REFRESH; |
206 | refresh_type = SLOW_REFRESH; |
208 | prev_nrow = prev_ncol = 0; |
|
|
209 | |
207 | |
210 | oldcursor.row = oldcursor.col = -1; |
208 | oldcursor.row = oldcursor.col = -1; |
211 | #ifdef XPM_BACKGROUND |
209 | #ifdef XPM_BACKGROUND |
212 | /* bgPixmap.w = bgPixmap.h = 0; */ |
210 | /* bgPixmap.w = bgPixmap.h = 0; */ |
213 | bgPixmap.x = bgPixmap.y = 50; |
211 | bgPixmap.x = bgPixmap.y = 50; |
… | |
… | |
485 | i = strlen (val); |
483 | i = strlen (val); |
486 | env_display = (char *)rxvt_malloc ((i + 9) * sizeof (char)); |
484 | env_display = (char *)rxvt_malloc ((i + 9) * sizeof (char)); |
487 | |
485 | |
488 | sprintf (env_display, "DISPLAY=%s", val); |
486 | sprintf (env_display, "DISPLAY=%s", val); |
489 | |
487 | |
490 | /* avoiding the math library: |
488 | sprintf (env_windowid, "WINDOWID=%lu", (unsigned long)parent[0]); |
491 | * i = (int) (ceil (log10 ((unsigned int)parent[0]))) */ |
|
|
492 | for (i = 0, u = (unsigned int)parent[0]; u; u /= 10, i++) |
|
|
493 | ; |
|
|
494 | max_it (i, 1); |
|
|
495 | env_windowid = (char *)rxvt_malloc ((i + 10) * sizeof (char)); |
|
|
496 | |
|
|
497 | sprintf (env_windowid, "WINDOWID=%u", |
|
|
498 | (unsigned int)parent[0]); |
|
|
499 | |
489 | |
500 | /* add entries to the environment: |
490 | /* add entries to the environment: |
501 | * @ DISPLAY: in case we started with -display |
491 | * @ DISPLAY: in case we started with -display |
502 | * @ WINDOWID: X window id number of the window |
492 | * @ WINDOWID: X window id number of the window |
503 | * @ COLORTERM: terminal sub-name and also indicates its color |
493 | * @ COLORTERM: terminal sub-name and also indicates its color |
… | |
… | |
505 | * @ TERMINFO: path to terminfo directory |
495 | * @ TERMINFO: path to terminfo directory |
506 | * @ COLORFGBG: fg;bg color codes |
496 | * @ COLORFGBG: fg;bg color codes |
507 | */ |
497 | */ |
508 | putenv (env_display); |
498 | putenv (env_display); |
509 | putenv (env_windowid); |
499 | putenv (env_windowid); |
|
|
500 | |
510 | if (env_colorfgbg) |
501 | if (env_colorfgbg) |
511 | putenv (env_colorfgbg); |
502 | putenv (env_colorfgbg); |
512 | |
503 | |
513 | #ifdef RXVT_TERMINFO |
504 | #ifdef RXVT_TERMINFO |
514 | putenv ("TERMINFO=" RXVT_TERMINFO); |
505 | putenv ("TERMINFO=" RXVT_TERMINFO); |