--- rxvt-unicode/src/misc.C 2006/01/03 02:43:33 1.30 +++ rxvt-unicode/src/misc.C 2006/01/16 16:19:19 1.34 @@ -38,6 +38,7 @@ while (len--) { ssize_t l = wcrtomb (dst, *str++, mbs); + if (l < 0) *dst++ = '?'; else @@ -439,7 +440,7 @@ /* #define DEBUG_SEARCH_PATH */ -#if defined (XPM_BACKGROUND) || (MENUBAR_MAX) +#ifdef XPM_BACKGROUND /* * search for FILE in the current working directory, and within the * colon-delimited PATHLIST, adding the file extension EXT if required. @@ -526,12 +527,7 @@ if (file == NULL || *file == '\0') return NULL; - /* search environment variables here too */ - if ((f = rxvt_File_search_path (path, file, ext)) == NULL) -#ifdef PATH_ENV - if ((f = rxvt_File_search_path (getenv (PATH_ENV), file, ext)) == NULL) -#endif - f = rxvt_File_search_path (getenv ("PATH"), file, ext); + f = rxvt_File_search_path (path, file, ext); #ifdef DEBUG_SEARCH_PATH if (f) @@ -540,7 +536,7 @@ return f; } -#endif /* defined (XPM_BACKGROUND) || (MENUBAR_MAX) */ +#endif /*----------------------------------------------------------------------* * miscellaneous drawing routines @@ -549,13 +545,13 @@ /* * Draw top/left and bottom/right border shadows around windows */ -#if defined(RXVT_SCROLLBAR) || defined(MENUBAR) +#ifdef RXVT_SCROLLBAR void rxvt_Draw_Shadow (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int h) { int shadow; - shadow = (w == 0 || h == 0) ? 1 : MENU_SHADOW; + shadow = (w == 0 || h == 0) ? 1 : 2; w += x - 1; h += y - 1; for (; shadow-- > 0; x++, y++, w--, h--) @@ -567,49 +563,6 @@ } } #endif - -/* button shapes */ -#ifdef MENUBAR -void -rxvt_Draw_Triangle (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int type) -{ - switch (type) - { - case 'r': /* right triangle */ - XDrawLine (display, win, topShadow, x, y, x, y + w); - XDrawLine (display, win, topShadow, x, y, x + w, y + w / 2); - XDrawLine (display, win, botShadow, x, y + w, x + w, y + w / 2); - break; - - case 'l': /* left triangle */ - XDrawLine (display, win, botShadow, x + w, y + w, x + w, y); - XDrawLine (display, win, botShadow, x + w, y + w, x, y + w / 2); - XDrawLine (display, win, topShadow, x, y + w / 2, x + w, y); - break; - - case 'd': /* down triangle */ - XDrawLine (display, win, topShadow, x, y, x + w / 2, y + w); - XDrawLine (display, win, topShadow, x, y, x + w, y); - XDrawLine (display, win, botShadow, x + w, y, x + w / 2, y + w); - break; - - case 'u': /* up triangle */ - XDrawLine (display, win, botShadow, x + w, y + w, x + w / 2, y); - XDrawLine (display, win, botShadow, x + w, y + w, x, y + w); - XDrawLine (display, win, topShadow, x, y + w, x + w / 2, y); - break; -#if 0 - case 's': /* square */ - XDrawLine (display, win, topShadow, x + w, y, x, y); - XDrawLine (display, win, topShadow, x, y, x, y + w); - XDrawLine (display, win, botShadow, x, y + w, x + w, y + w); - XDrawLine (display, win, botShadow, x + w, y + w, x + w, y); - break; -#endif - - } -} -#endif // should not be used in interactive programs, for obvious reasons void rxvt_usleep (int usecs)