… | |
… | |
944 | |
944 | |
945 | /*----------------------------------------------------------------------*/ |
945 | /*----------------------------------------------------------------------*/ |
946 | /* |
946 | /* |
947 | * find if fg/bg matches any of the normal (low-intensity) colors |
947 | * find if fg/bg matches any of the normal (low-intensity) colors |
948 | */ |
948 | */ |
949 | void |
949 | char * |
950 | rxvt_term::set_colorfgbg () |
950 | rxvt_term::get_colorfgbg () |
951 | { |
951 | { |
952 | unsigned int i; |
952 | unsigned int i; |
953 | const char *xpmb = ""; |
953 | const char *xpmb = ""; |
954 | char fstr[] = "default"; |
954 | char fstr[] = "default"; |
955 | char bstr[] = "default"; |
955 | char bstr[] = "default"; |
|
|
956 | char *env_colorfgbg; |
956 | |
957 | |
957 | for (i = Color_Black; i <= Color_White; i++) |
958 | for (i = Color_Black; i <= Color_White; i++) |
958 | if (pix_colors[Color_fg] == pix_colors[i]) |
959 | if (pix_colors[Color_fg] == pix_colors[i]) |
959 | { |
960 | { |
960 | sprintf (fstr, "%d", i - Color_Black); |
961 | sprintf (fstr, "%d", i - Color_Black); |
… | |
… | |
969 | xpmb = "default;"; |
970 | xpmb = "default;"; |
970 | #endif |
971 | #endif |
971 | break; |
972 | break; |
972 | } |
973 | } |
973 | |
974 | |
|
|
975 | env_colorfgbg = (char *)rxvt_malloc (sizeof ("COLORFGBG=default;default;bg")); |
974 | sprintf (env_colorfgbg, "COLORFGBG=%s;%s%s", fstr, xpmb, bstr); |
976 | sprintf (env_colorfgbg, "COLORFGBG=%s;%s%s", fstr, xpmb, bstr); |
|
|
977 | return env_colorfgbg; |
975 | } |
978 | } |
976 | |
979 | |
977 | /*----------------------------------------------------------------------*/ |
980 | /*----------------------------------------------------------------------*/ |
978 | |
981 | |
979 | bool |
982 | bool |