Lines 794-800
Link Here
|
794 |
static void |
794 |
static void |
795 |
handle_attribute(char *val_ptr) |
795 |
handle_attribute(char *val_ptr) |
796 |
{ |
796 |
{ |
797 |
conf_parse_line(NULL, val_ptr); |
797 |
conf_parse_line(NULL, (spif_charptr_t)val_ptr); |
798 |
} |
798 |
} |
799 |
|
799 |
|
800 |
/* The config file parsers. Each function handles a given context. */ |
800 |
/* The config file parsers. Each function handles a given context. */ |
Lines 805-843
Link Here
|
805 |
return NULL; |
805 |
return NULL; |
806 |
} |
806 |
} |
807 |
if (!BEG_STRCASECMP(buff, "foreground ")) { |
807 |
if (!BEG_STRCASECMP(buff, "foreground ")) { |
808 |
RESET_AND_ASSIGN(rs_color[fgColor], get_word(2, buff)); |
808 |
RESET_AND_ASSIGN(rs_color[fgColor], (char *)get_word(2, (spif_charptr_t)buff)); |
809 |
} else if (!BEG_STRCASECMP(buff, "background ")) { |
809 |
} else if (!BEG_STRCASECMP(buff, "background ")) { |
810 |
RESET_AND_ASSIGN(rs_color[bgColor], get_word(2, buff)); |
810 |
RESET_AND_ASSIGN(rs_color[bgColor], (char *)get_word(2, (spif_charptr_t)buff)); |
811 |
|
811 |
|
812 |
} else if (!BEG_STRCASECMP(buff, "cursor ")) { |
812 |
} else if (!BEG_STRCASECMP(buff, "cursor ")) { |
813 |
|
813 |
|
814 |
#ifndef NO_CURSORCOLOR |
814 |
#ifndef NO_CURSORCOLOR |
815 |
RESET_AND_ASSIGN(rs_color[cursorColor], get_word(2, buff)); |
815 |
RESET_AND_ASSIGN(rs_color[cursorColor], (char *)get_word(2, (spif_charptr_t)buff)); |
816 |
#else |
816 |
#else |
817 |
print_warning("Support for the cursor attribute was not compiled in, ignoring\n"); |
817 |
print_warning("Support for the cursor attribute was not compiled in, ignoring\n"); |
818 |
#endif |
818 |
#endif |
819 |
|
819 |
|
820 |
} else if (!BEG_STRCASECMP(buff, "cursor_text ")) { |
820 |
} else if (!BEG_STRCASECMP(buff, "cursor_text ")) { |
821 |
#ifndef NO_CURSORCOLOR |
821 |
#ifndef NO_CURSORCOLOR |
822 |
RESET_AND_ASSIGN(rs_color[cursorColor2], get_word(2, buff)); |
822 |
RESET_AND_ASSIGN(rs_color[cursorColor2], (char *)get_word(2, (spif_charptr_t)buff)); |
823 |
#else |
823 |
#else |
824 |
print_warning("Support for the cursor_text attribute was not compiled in, ignoring\n"); |
824 |
print_warning("Support for the cursor_text attribute was not compiled in, ignoring\n"); |
825 |
#endif |
825 |
#endif |
826 |
|
826 |
|
827 |
} else if (!BEG_STRCASECMP(buff, "pointer ")) { |
827 |
} else if (!BEG_STRCASECMP(buff, "pointer ")) { |
828 |
RESET_AND_ASSIGN(rs_color[pointerColor], get_word(2, buff)); |
828 |
RESET_AND_ASSIGN(rs_color[pointerColor], (char *)get_word(2, (spif_charptr_t)buff)); |
829 |
|
829 |
|
830 |
#ifdef ESCREEN |
830 |
#ifdef ESCREEN |
831 |
} else if (!BEG_STRCASECMP(buff, "es_current ")) { |
831 |
} else if (!BEG_STRCASECMP(buff, "es_current ")) { |
832 |
RESET_AND_ASSIGN(rs_color[ES_COLOR_CURRENT], get_word(2, buff)); |
832 |
RESET_AND_ASSIGN(rs_color[ES_COLOR_CURRENT], (char *)get_word(2, (spif_charptr_t)buff)); |
833 |
|
833 |
|
834 |
} else if (!BEG_STRCASECMP(buff, "es_active ")) { |
834 |
} else if (!BEG_STRCASECMP(buff, "es_active ")) { |
835 |
RESET_AND_ASSIGN(rs_color[ES_COLOR_ACTIVE], get_word(2, buff)); |
835 |
RESET_AND_ASSIGN(rs_color[ES_COLOR_ACTIVE], (char *)get_word(2, (spif_charptr_t)buff)); |
836 |
#endif |
836 |
#endif |
837 |
|
837 |
|
838 |
} else if (!BEG_STRCASECMP(buff, "video ")) { |
838 |
} else if (!BEG_STRCASECMP(buff, "video ")) { |
839 |
|
839 |
|
840 |
char *tmp = get_pword(2, buff); |
840 |
char *tmp = (char *)get_pword(2, (spif_charptr_t)buff); |
841 |
|
841 |
|
842 |
if (!BEG_STRCASECMP(tmp, "reverse")) { |
842 |
if (!BEG_STRCASECMP(tmp, "reverse")) { |
843 |
BITFIELD_SET(vt_options, VT_OPTIONS_REVERSE_VIDEO); |
843 |
BITFIELD_SET(vt_options, VT_OPTIONS_REVERSE_VIDEO); |
Lines 850-863
Link Here
|
850 |
char *tmp = 0, *r1, *g1, *b1; |
850 |
char *tmp = 0, *r1, *g1, *b1; |
851 |
unsigned int n, r, g, b, index = 0; |
851 |
unsigned int n, r, g, b, index = 0; |
852 |
|
852 |
|
853 |
n = num_words(buff); |
853 |
n = num_words((spif_charptr_t)buff); |
854 |
if (n < 3) { |
854 |
if (n < 3) { |
855 |
print_error("Parse error in file %s, line %lu: Invalid parameter list \"%s\" for \n" |
855 |
print_error("Parse error in file %s, line %lu: Invalid parameter list \"%s\" for \n" |
856 |
"attribute color", file_peek_path(), file_peek_line(), NONULL(tmp)); |
856 |
"attribute color", file_peek_path(), file_peek_line(), NONULL(tmp)); |
857 |
return NULL; |
857 |
return NULL; |
858 |
} |
858 |
} |
859 |
tmp = get_pword(2, buff); |
859 |
tmp = (char *)get_pword(2, (spif_charptr_t)buff); |
860 |
r1 = get_pword(3, buff); |
860 |
r1 = (char *)get_pword(3, (spif_charptr_t)buff); |
861 |
if (!isdigit(*r1)) { |
861 |
if (!isdigit(*r1)) { |
862 |
if (isdigit(*tmp)) { |
862 |
if (isdigit(*tmp)) { |
863 |
n = strtoul(tmp, (char **) NULL, 0); |
863 |
n = strtoul(tmp, (char **) NULL, 0); |
Lines 866-890
Link Here
|
866 |
} else if (n >= 8 && n <= 15) { |
866 |
} else if (n >= 8 && n <= 15) { |
867 |
index = minBright + n - 8; |
867 |
index = minBright + n - 8; |
868 |
} |
868 |
} |
869 |
RESET_AND_ASSIGN(rs_color[index], get_word(1, r1)); |
869 |
RESET_AND_ASSIGN(rs_color[index], (char *)get_word(1, (spif_charptr_t)r1)); |
870 |
return NULL; |
870 |
return NULL; |
871 |
} else { |
871 |
} else { |
872 |
if (!BEG_STRCASECMP(tmp, "bd ")) { |
872 |
if (!BEG_STRCASECMP(tmp, "bd ")) { |
873 |
#ifndef NO_BOLDUNDERLINE |
873 |
#ifndef NO_BOLDUNDERLINE |
874 |
RESET_AND_ASSIGN(rs_color[colorBD], get_word(1, r1)); |
874 |
RESET_AND_ASSIGN(rs_color[colorBD], (char *)get_word(1, (spif_charptr_t)r1)); |
875 |
#else |
875 |
#else |
876 |
print_warning("Support for the color bd attribute was not compiled in, ignoring\n"); |
876 |
print_warning("Support for the color bd attribute was not compiled in, ignoring\n"); |
877 |
#endif |
877 |
#endif |
878 |
return NULL; |
878 |
return NULL; |
879 |
} else if (!BEG_STRCASECMP(tmp, "ul ")) { |
879 |
} else if (!BEG_STRCASECMP(tmp, "ul ")) { |
880 |
#ifndef NO_BOLDUNDERLINE |
880 |
#ifndef NO_BOLDUNDERLINE |
881 |
RESET_AND_ASSIGN(rs_color[colorUL], get_word(1, r1)); |
881 |
RESET_AND_ASSIGN(rs_color[colorUL], (char *)get_word(1, (spif_charptr_t)r1)); |
882 |
#else |
882 |
#else |
883 |
print_warning("Support for the color ul attribute was not compiled in, ignoring\n"); |
883 |
print_warning("Support for the color ul attribute was not compiled in, ignoring\n"); |
884 |
#endif |
884 |
#endif |
885 |
return NULL; |
885 |
return NULL; |
886 |
} else { |
886 |
} else { |
887 |
tmp = get_word(1, tmp); |
887 |
tmp = (char *)get_word(1, (spif_charptr_t)tmp); |
888 |
print_error("Parse error in file %s, line %lu: Invalid color index \"%s\"\n", |
888 |
print_error("Parse error in file %s, line %lu: Invalid color index \"%s\"\n", |
889 |
file_peek_path(), file_peek_line(), NONULL(tmp)); |
889 |
file_peek_path(), file_peek_line(), NONULL(tmp)); |
890 |
FREE(tmp); |
890 |
FREE(tmp); |
Lines 896-903
Link Here
|
896 |
"attribute color", file_peek_path(), file_peek_line(), NONULL(tmp)); |
896 |
"attribute color", file_peek_path(), file_peek_line(), NONULL(tmp)); |
897 |
return NULL; |
897 |
return NULL; |
898 |
} |
898 |
} |
899 |
g1 = get_pword(4, buff); |
899 |
g1 = (char *)get_pword(4, (spif_charptr_t)buff); |
900 |
b1 = get_pword(5, buff); |
900 |
b1 = (char *)get_pword(5, (spif_charptr_t)buff); |
901 |
if (isdigit(*tmp)) { |
901 |
if (isdigit(*tmp)) { |
902 |
n = strtoul(tmp, (char **) NULL, 0); |
902 |
n = strtoul(tmp, (char **) NULL, 0); |
903 |
r = strtoul(r1, (char **) NULL, 0); |
903 |
r = strtoul(r1, (char **) NULL, 0); |
Lines 938-944
Link Here
|
938 |
#endif |
938 |
#endif |
939 |
|
939 |
|
940 |
} else { |
940 |
} else { |
941 |
tmp = get_word(1, tmp); |
941 |
tmp = (char *)get_word(1, (spif_charptr_t)tmp); |
942 |
print_error("Parse error in file %s, line %lu: Invalid color index \"%s\"\n", file_peek_path(), file_peek_line(), NONULL(tmp)); |
942 |
print_error("Parse error in file %s, line %lu: Invalid color index \"%s\"\n", file_peek_path(), file_peek_line(), NONULL(tmp)); |
943 |
FREE(tmp); |
943 |
FREE(tmp); |
944 |
} |
944 |
} |
Lines 956-993
Link Here
|
956 |
return NULL; |
956 |
return NULL; |
957 |
} |
957 |
} |
958 |
if (!BEG_STRCASECMP(buff, "geometry ")) { |
958 |
if (!BEG_STRCASECMP(buff, "geometry ")) { |
959 |
RESET_AND_ASSIGN(rs_geometry, get_word(2, buff)); |
959 |
RESET_AND_ASSIGN(rs_geometry, (char *)get_word(2, (spif_charptr_t)buff)); |
960 |
|
960 |
|
961 |
} else if (!BEG_STRCASECMP(buff, "title ")) { |
961 |
} else if (!BEG_STRCASECMP(buff, "title ")) { |
962 |
RESET_AND_ASSIGN(rs_title, get_word(2, buff)); |
962 |
RESET_AND_ASSIGN(rs_title, (char *)get_word(2, (spif_charptr_t)buff)); |
963 |
|
963 |
|
964 |
} else if (!BEG_STRCASECMP(buff, "name ")) { |
964 |
} else if (!BEG_STRCASECMP(buff, "name ")) { |
965 |
RESET_AND_ASSIGN(rs_name, get_word(2, buff)); |
965 |
RESET_AND_ASSIGN(rs_name, (char *)get_word(2, (spif_charptr_t)buff)); |
966 |
|
966 |
|
967 |
} else if (!BEG_STRCASECMP(buff, "iconname ")) { |
967 |
} else if (!BEG_STRCASECMP(buff, "iconname ")) { |
968 |
RESET_AND_ASSIGN(rs_iconName, get_word(2, buff)); |
968 |
RESET_AND_ASSIGN(rs_iconName, (char *)get_word(2, (spif_charptr_t)buff)); |
969 |
|
969 |
|
970 |
} else if (!BEG_STRCASECMP(buff, "desktop ")) { |
970 |
} else if (!BEG_STRCASECMP(buff, "desktop ")) { |
971 |
rs_desktop = (int) strtol(buff, (char **) NULL, 0); |
971 |
rs_desktop = (int) strtol(buff, (char **) NULL, 0); |
972 |
|
972 |
|
973 |
} else if (!BEG_STRCASECMP(buff, "scrollbar_type ")) { |
973 |
} else if (!BEG_STRCASECMP(buff, "scrollbar_type ")) { |
974 |
RESET_AND_ASSIGN(rs_scrollbar_type, get_word(2, buff)); |
974 |
RESET_AND_ASSIGN(rs_scrollbar_type, (char *)get_word(2, (spif_charptr_t)buff)); |
975 |
|
975 |
|
976 |
} else if (!BEG_STRCASECMP(buff, "scrollbar_width ")) { |
976 |
} else if (!BEG_STRCASECMP(buff, "scrollbar_width ")) { |
977 |
rs_scrollbar_width = strtoul(get_pword(2, buff), (char **) NULL, 0); |
977 |
rs_scrollbar_width = strtoul((char *)get_pword(2, (spif_charptr_t)buff), (char **) NULL, 0); |
978 |
|
978 |
|
979 |
} else if (!BEG_STRCASECMP(buff, "font ")) { |
979 |
} else if (!BEG_STRCASECMP(buff, "font ")) { |
980 |
|
980 |
|
981 |
char *tmp = get_pword(2, buff); |
981 |
char *tmp = (char *)get_pword(2, (spif_charptr_t)buff); |
982 |
unsigned long n; |
982 |
unsigned long n; |
983 |
|
983 |
|
984 |
if (!BEG_STRCASECMP(tmp, "fx ") || !BEG_STRCASECMP(tmp, "effect")) { |
984 |
if (!BEG_STRCASECMP(tmp, "fx ") || !BEG_STRCASECMP(tmp, "effect")) { |
985 |
if (parse_font_fx(get_pword(2, tmp)) != 1) { |
985 |
if (parse_font_fx((char *)get_pword(2, (spif_charptr_t)tmp)) != 1) { |
986 |
print_error("Parse error in file %s, line %lu: Syntax error in font effects specification\n", |
986 |
print_error("Parse error in file %s, line %lu: Syntax error in font effects specification\n", |
987 |
file_peek_path(), file_peek_line()); |
987 |
file_peek_path(), file_peek_line()); |
988 |
} |
988 |
} |
989 |
} else if (!BEG_STRCASECMP(tmp, "prop")) { |
989 |
} else if (!BEG_STRCASECMP(tmp, "prop")) { |
990 |
tmp = get_pword(2, tmp); |
990 |
tmp = (char *)get_pword(2, (spif_charptr_t)tmp); |
991 |
if (BOOL_OPT_ISTRUE(tmp)) { |
991 |
if (BOOL_OPT_ISTRUE(tmp)) { |
992 |
BITFIELD_SET(vt_options, VT_OPTIONS_PROPORTIONAL); |
992 |
BITFIELD_SET(vt_options, VT_OPTIONS_PROPORTIONAL); |
993 |
} else if (BOOL_OPT_ISFALSE(tmp)) { |
993 |
} else if (BOOL_OPT_ISFALSE(tmp)) { |
Lines 999-1020
Link Here
|
999 |
} else if (isdigit(*tmp)) { |
999 |
} else if (isdigit(*tmp)) { |
1000 |
n = strtoul(tmp, (char **) NULL, 0); |
1000 |
n = strtoul(tmp, (char **) NULL, 0); |
1001 |
if (n <= 255) { |
1001 |
if (n <= 255) { |
1002 |
eterm_font_add(&etfonts, get_pword(2, tmp), n); |
1002 |
eterm_font_add(&etfonts, (char *)get_pword(2, (spif_charptr_t)tmp), n); |
1003 |
} else { |
1003 |
} else { |
1004 |
print_error("Parse error in file %s, line %lu: Invalid font index %d\n", file_peek_path(), file_peek_line(), n); |
1004 |
print_error("Parse error in file %s, line %lu: Invalid font index %d\n", file_peek_path(), file_peek_line(), n); |
1005 |
} |
1005 |
} |
1006 |
} else if (!BEG_STRCASECMP(tmp, "bold ")) { |
1006 |
} else if (!BEG_STRCASECMP(tmp, "bold ")) { |
1007 |
#ifndef NO_BOLDFONT |
1007 |
#ifndef NO_BOLDFONT |
1008 |
RESET_AND_ASSIGN(rs_boldFont, get_word(2, tmp)); |
1008 |
RESET_AND_ASSIGN(rs_boldFont, (char *)get_word(2, (spif_charptr_t)tmp)); |
1009 |
#else |
1009 |
#else |
1010 |
print_warning("Support for the bold font attribute was not compiled in, ignoring\n"); |
1010 |
print_warning("Support for the bold font attribute was not compiled in, ignoring\n"); |
1011 |
#endif |
1011 |
#endif |
1012 |
|
1012 |
|
1013 |
} else if (!BEG_STRCASECMP(tmp, "default ")) { |
1013 |
} else if (!BEG_STRCASECMP(tmp, "default ")) { |
1014 |
def_font_idx = strtoul(get_pword(2, tmp), (char **) NULL, 0); |
1014 |
def_font_idx = strtoul((char *)get_pword(2, (spif_charptr_t)tmp), (char **) NULL, 0); |
1015 |
|
1015 |
|
1016 |
} else { |
1016 |
} else { |
1017 |
tmp = get_word(1, tmp); |
1017 |
tmp = (char *)get_word(1, (spif_charptr_t)tmp); |
1018 |
print_error("Parse error in file %s, line %lu: Invalid font index \"%s\"\n", file_peek_path(), file_peek_line(), NONULL(tmp)); |
1018 |
print_error("Parse error in file %s, line %lu: Invalid font index \"%s\"\n", file_peek_path(), file_peek_line(), NONULL(tmp)); |
1019 |
FREE(tmp); |
1019 |
FREE(tmp); |
1020 |
} |
1020 |
} |
Lines 1035-1041
Link Here
|
1035 |
if ((*buff == CONF_BEGIN_CHAR) || (*buff == CONF_END_CHAR)) { |
1035 |
if ((*buff == CONF_BEGIN_CHAR) || (*buff == CONF_END_CHAR)) { |
1036 |
return NULL; |
1036 |
return NULL; |
1037 |
} |
1037 |
} |
1038 |
if (!(tmp = get_pword(2, buff))) { |
1038 |
if (!(tmp = (char *)get_pword(2, (spif_charptr_t)buff))) { |
1039 |
print_error("Parse error in file %s, line %lu: Missing boolean value in context toggles\n", file_peek_path(), file_peek_line()); |
1039 |
print_error("Parse error in file %s, line %lu: Missing boolean value in context toggles\n", file_peek_path(), file_peek_line()); |
1040 |
return NULL; |
1040 |
return NULL; |
1041 |
} |
1041 |
} |
Lines 1276-1282
Link Here
|
1276 |
} |
1276 |
} |
1277 |
if (!BEG_STRCASECMP(buff, "smallfont_key ")) { |
1277 |
if (!BEG_STRCASECMP(buff, "smallfont_key ")) { |
1278 |
#if defined (HOTKEY_CTRL) || defined (HOTKEY_META) |
1278 |
#if defined (HOTKEY_CTRL) || defined (HOTKEY_META) |
1279 |
RESET_AND_ASSIGN(rs_smallfont_key, get_word(2, buff)); |
1279 |
RESET_AND_ASSIGN(rs_smallfont_key, (char *)get_word(2, (spif_charptr_t)buff)); |
1280 |
TO_KEYSYM(&ks_smallfont, rs_smallfont_key); |
1280 |
TO_KEYSYM(&ks_smallfont, rs_smallfont_key); |
1281 |
#else |
1281 |
#else |
1282 |
print_warning("Support for the smallfont_key attribute was not compiled in, ignoring\n"); |
1282 |
print_warning("Support for the smallfont_key attribute was not compiled in, ignoring\n"); |
Lines 1284-1290
Link Here
|
1284 |
|
1284 |
|
1285 |
} else if (!BEG_STRCASECMP(buff, "bigfont_key ")) { |
1285 |
} else if (!BEG_STRCASECMP(buff, "bigfont_key ")) { |
1286 |
#if defined (HOTKEY_CTRL) || defined (HOTKEY_META) |
1286 |
#if defined (HOTKEY_CTRL) || defined (HOTKEY_META) |
1287 |
RESET_AND_ASSIGN(rs_bigfont_key, get_word(2, buff)); |
1287 |
RESET_AND_ASSIGN(rs_bigfont_key, (char *)get_word(2, (spif_charptr_t)buff)); |
1288 |
TO_KEYSYM(&ks_bigfont, rs_bigfont_key); |
1288 |
TO_KEYSYM(&ks_bigfont, rs_bigfont_key); |
1289 |
#else |
1289 |
#else |
1290 |
print_warning("Support for the bigfont_key attribute was not compiled in, ignoring\n"); |
1290 |
print_warning("Support for the bigfont_key attribute was not compiled in, ignoring\n"); |
Lines 1306-1316
Link Here
|
1306 |
file_peek_path(), file_peek_line(), sym + 0xff00); |
1306 |
file_peek_path(), file_peek_line(), sym + 0xff00); |
1307 |
return NULL; |
1307 |
return NULL; |
1308 |
} |
1308 |
} |
1309 |
s = get_word(3, buff); |
1309 |
s = (char *)get_word(3, (spif_charptr_t)buff); |
1310 |
str = (char *) MALLOC(strlen(s) + 2); |
1310 |
str = (char *) MALLOC(strlen(s) + 2); |
1311 |
strcpy(str, s); |
1311 |
strcpy(str, s); |
1312 |
FREE(s); |
1312 |
FREE(s); |
1313 |
chomp(str); |
1313 |
chomp((spif_charptr_t)str); |
1314 |
len = parse_escaped_string(str); |
1314 |
len = parse_escaped_string(str); |
1315 |
if (len > 255) |
1315 |
if (len > 255) |
1316 |
len = 255; /* We can only handle lengths that will fit in a char */ |
1316 |
len = 255; /* We can only handle lengths that will fit in a char */ |
Lines 1328-1334
Link Here
|
1328 |
#endif |
1328 |
#endif |
1329 |
|
1329 |
|
1330 |
} else if (!BEG_STRCASECMP(buff, "meta_mod ")) { |
1330 |
} else if (!BEG_STRCASECMP(buff, "meta_mod ")) { |
1331 |
char *tmp = get_pword(2, buff); |
1331 |
char *tmp = (char *)get_pword(2, (spif_charptr_t)buff); |
1332 |
|
1332 |
|
1333 |
if (!tmp) { |
1333 |
if (!tmp) { |
1334 |
print_error("Parse error in file %s, line %lu: Missing modifier value for attribute meta_mod\n", |
1334 |
print_error("Parse error in file %s, line %lu: Missing modifier value for attribute meta_mod\n", |
Lines 1338-1344
Link Here
|
1338 |
rs_meta_mod = (unsigned int) strtoul(tmp, (char **) NULL, 0); |
1338 |
rs_meta_mod = (unsigned int) strtoul(tmp, (char **) NULL, 0); |
1339 |
|
1339 |
|
1340 |
} else if (!BEG_STRCASECMP(buff, "alt_mod ")) { |
1340 |
} else if (!BEG_STRCASECMP(buff, "alt_mod ")) { |
1341 |
char *tmp = get_pword(2, buff); |
1341 |
char *tmp = (char *)get_pword(2, (spif_charptr_t)buff); |
1342 |
|
1342 |
|
1343 |
if (!tmp) { |
1343 |
if (!tmp) { |
1344 |
print_error("Parse error in file %s, line %lu: Missing modifier value for attribute alt_mod\n", |
1344 |
print_error("Parse error in file %s, line %lu: Missing modifier value for attribute alt_mod\n", |
Lines 1348-1354
Link Here
|
1348 |
rs_alt_mod = (unsigned int) strtoul(tmp, (char **) NULL, 0); |
1348 |
rs_alt_mod = (unsigned int) strtoul(tmp, (char **) NULL, 0); |
1349 |
|
1349 |
|
1350 |
} else if (!BEG_STRCASECMP(buff, "numlock_mod ")) { |
1350 |
} else if (!BEG_STRCASECMP(buff, "numlock_mod ")) { |
1351 |
char *tmp = get_pword(2, buff); |
1351 |
char *tmp = (char *)get_pword(2, (spif_charptr_t)buff); |
1352 |
|
1352 |
|
1353 |
if (!tmp) { |
1353 |
if (!tmp) { |
1354 |
print_error("Parse error in file %s, line %lu: Missing modifier value for attribute numlock_mod\n", |
1354 |
print_error("Parse error in file %s, line %lu: Missing modifier value for attribute numlock_mod\n", |
Lines 1390-1396
Link Here
|
1390 |
|
1390 |
|
1391 |
} else if (!BEG_STRCASECMP(buff, "app_keypad ")) { |
1391 |
} else if (!BEG_STRCASECMP(buff, "app_keypad ")) { |
1392 |
|
1392 |
|
1393 |
char *tmp = get_pword(2, buff); |
1393 |
char *tmp = (char *)get_pword(2, (spif_charptr_t)buff); |
1394 |
|
1394 |
|
1395 |
if (!tmp) { |
1395 |
if (!tmp) { |
1396 |
print_error("Parse error in file %s, line %lu: Missing boolean value for attribute app_keypad\n", |
1396 |
print_error("Parse error in file %s, line %lu: Missing boolean value for attribute app_keypad\n", |
Lines 1409-1415
Link Here
|
1409 |
|
1409 |
|
1410 |
} else if (!BEG_STRCASECMP(buff, "app_cursor ")) { |
1410 |
} else if (!BEG_STRCASECMP(buff, "app_cursor ")) { |
1411 |
|
1411 |
|
1412 |
char *tmp = get_pword(2, buff); |
1412 |
char *tmp = (char *)get_pword(2, (spif_charptr_t)buff); |
1413 |
|
1413 |
|
1414 |
if (!tmp) { |
1414 |
if (!tmp) { |
1415 |
print_error("Parse error in file %s, line %lu: Missing boolean value for attribute app_cursor\n", |
1415 |
print_error("Parse error in file %s, line %lu: Missing boolean value for attribute app_cursor\n", |
Lines 1441-1495
Link Here
|
1441 |
} |
1441 |
} |
1442 |
if (!BEG_STRCASECMP(buff, "print_pipe ")) { |
1442 |
if (!BEG_STRCASECMP(buff, "print_pipe ")) { |
1443 |
#ifdef PRINTPIPE |
1443 |
#ifdef PRINTPIPE |
1444 |
RESET_AND_ASSIGN(rs_print_pipe, get_word(2, buff)); |
1444 |
RESET_AND_ASSIGN(rs_print_pipe, (char *)get_word(2, (spif_charptr_t)buff)); |
1445 |
#else |
1445 |
#else |
1446 |
print_warning("Support for the print_pipe attribute was not compiled in, ignoring\n"); |
1446 |
print_warning("Support for the print_pipe attribute was not compiled in, ignoring\n"); |
1447 |
#endif |
1447 |
#endif |
1448 |
|
1448 |
|
1449 |
} else if (!BEG_STRCASECMP(buff, "save_lines ")) { |
1449 |
} else if (!BEG_STRCASECMP(buff, "save_lines ")) { |
1450 |
rs_saveLines = strtol(get_pword(2, buff), (char **) NULL, 0); |
1450 |
rs_saveLines = strtol((char *)get_pword(2, (spif_charptr_t)buff), (char **) NULL, 0); |
1451 |
|
1451 |
|
1452 |
} else if (!BEG_STRCASECMP(buff, "min_anchor_size ")) { |
1452 |
} else if (!BEG_STRCASECMP(buff, "min_anchor_size ")) { |
1453 |
rs_min_anchor_size = strtol(get_pword(2, buff), (char **) NULL, 0); |
1453 |
rs_min_anchor_size = strtol((char *)get_pword(2, (spif_charptr_t)buff), (char **) NULL, 0); |
1454 |
|
1454 |
|
1455 |
} else if (!BEG_STRCASECMP(buff, "border_width ")) { |
1455 |
} else if (!BEG_STRCASECMP(buff, "border_width ")) { |
1456 |
#ifdef BORDER_WIDTH_OPTION |
1456 |
#ifdef BORDER_WIDTH_OPTION |
1457 |
TermWin.internalBorder = (short) strtol(get_pword(2, buff), (char **) NULL, 0); |
1457 |
TermWin.internalBorder = (short) strtol((char *)get_pword(2, (spif_charptr_t)buff), (char **) NULL, 0); |
1458 |
#else |
1458 |
#else |
1459 |
print_warning("Support for the border_width attribute was not compiled in, ignoring\n"); |
1459 |
print_warning("Support for the border_width attribute was not compiled in, ignoring\n"); |
1460 |
#endif |
1460 |
#endif |
1461 |
|
1461 |
|
1462 |
} else if (!BEG_STRCASECMP(buff, "line_space ")) { |
1462 |
} else if (!BEG_STRCASECMP(buff, "line_space ")) { |
1463 |
rs_line_space = strtol(get_pword(2, buff), (char **) NULL, 0); |
1463 |
rs_line_space = strtol((char *)get_pword(2, (spif_charptr_t)buff), (char **) NULL, 0); |
1464 |
|
1464 |
|
1465 |
} else if (!BEG_STRCASECMP(buff, "finished_title ")) { |
1465 |
} else if (!BEG_STRCASECMP(buff, "finished_title ")) { |
1466 |
RESET_AND_ASSIGN(rs_finished_title, get_word(2, buff)); |
1466 |
RESET_AND_ASSIGN(rs_finished_title, (char *)get_word(2, (spif_charptr_t)buff)); |
1467 |
|
1467 |
|
1468 |
} else if (!BEG_STRCASECMP(buff, "finished_text ")) { |
1468 |
} else if (!BEG_STRCASECMP(buff, "finished_text ")) { |
1469 |
RESET_AND_ASSIGN(rs_finished_text, get_word(2, buff)); |
1469 |
RESET_AND_ASSIGN(rs_finished_text, (char *)get_word(2, (spif_charptr_t)buff)); |
1470 |
|
1470 |
|
1471 |
} else if (!BEG_STRCASECMP(buff, "term_name ")) { |
1471 |
} else if (!BEG_STRCASECMP(buff, "term_name ")) { |
1472 |
RESET_AND_ASSIGN(rs_term_name, get_word(2, buff)); |
1472 |
RESET_AND_ASSIGN(rs_term_name, (char *)get_word(2, (spif_charptr_t)buff)); |
1473 |
|
1473 |
|
1474 |
} else if (!BEG_STRCASECMP(buff, "debug ")) { |
1474 |
} else if (!BEG_STRCASECMP(buff, "debug ")) { |
1475 |
DEBUG_LEVEL = (unsigned int) strtoul(get_pword(2, buff), (char **) NULL, 0); |
1475 |
DEBUG_LEVEL = (unsigned int) strtoul((char *)get_pword(2, (spif_charptr_t)buff), (char **) NULL, 0); |
1476 |
|
1476 |
|
1477 |
} else if (!BEG_STRCASECMP(buff, "exec ")) { |
1477 |
} else if (!BEG_STRCASECMP(buff, "exec ")) { |
1478 |
|
1478 |
|
1479 |
register unsigned short k, n; |
1479 |
register unsigned short k, n; |
1480 |
|
1480 |
|
1481 |
RESET_AND_ASSIGN(rs_exec_args, (char **) MALLOC(sizeof(char *) * ((n = num_words(get_pword(2, buff))) + 1))); |
1481 |
RESET_AND_ASSIGN(rs_exec_args, (char **) MALLOC(sizeof(char *) * ((n = num_words(get_pword(2, (spif_charptr_t)buff))) + 1))); |
1482 |
|
1482 |
|
1483 |
for (k = 0; k < n; k++) { |
1483 |
for (k = 0; k < n; k++) { |
1484 |
rs_exec_args[k] = get_word(k + 2, buff); |
1484 |
rs_exec_args[k] = (char *)get_word(k + 2, (spif_charptr_t)buff); |
1485 |
D_OPTIONS(("rs_exec_args[%d] == %s\n", k, rs_exec_args[k])); |
1485 |
D_OPTIONS(("rs_exec_args[%d] == %s\n", k, rs_exec_args[k])); |
1486 |
} |
1486 |
} |
1487 |
rs_exec_args[n] = (char *) NULL; |
1487 |
rs_exec_args[n] = (char *) NULL; |
1488 |
|
1488 |
|
1489 |
} else if (!BEG_STRCASECMP(buff, "cut_chars ")) { |
1489 |
} else if (!BEG_STRCASECMP(buff, "cut_chars ")) { |
1490 |
#ifdef CUTCHAR_OPTION |
1490 |
#ifdef CUTCHAR_OPTION |
1491 |
RESET_AND_ASSIGN(rs_cutchars, get_word(2, buff)); |
1491 |
RESET_AND_ASSIGN(rs_cutchars, (char *)get_word(2, (spif_charptr_t)buff)); |
1492 |
chomp(rs_cutchars); |
1492 |
chomp((spif_charptr_t)rs_cutchars); |
1493 |
#else |
1493 |
#else |
1494 |
print_warning("Support for the cut_chars attribute was not compiled in, ignoring\n"); |
1494 |
print_warning("Support for the cut_chars attribute was not compiled in, ignoring\n"); |
1495 |
#endif |
1495 |
#endif |
Lines 1510-1533
Link Here
|
1510 |
|
1510 |
|
1511 |
if (!BEG_STRCASECMP(buff, "icon ")) { |
1511 |
if (!BEG_STRCASECMP(buff, "icon ")) { |
1512 |
#ifdef PIXMAP_SUPPORT |
1512 |
#ifdef PIXMAP_SUPPORT |
1513 |
RESET_AND_ASSIGN(rs_icon, get_word(2, buff)); |
1513 |
RESET_AND_ASSIGN(rs_icon, (char *)get_word(2, (spif_charptr_t)buff)); |
1514 |
#else |
1514 |
#else |
1515 |
print_warning("Pixmap support was not compiled in, ignoring \"icon\" attribute\n"); |
1515 |
print_warning("Pixmap support was not compiled in, ignoring \"icon\" attribute\n"); |
1516 |
#endif |
1516 |
#endif |
1517 |
|
1517 |
|
1518 |
} else if (!BEG_STRCASECMP(buff, "cache")) { |
1518 |
} else if (!BEG_STRCASECMP(buff, "cache")) { |
1519 |
#ifdef PIXMAP_SUPPORT |
1519 |
#ifdef PIXMAP_SUPPORT |
1520 |
rs_cache_size = strtoul(get_pword(2, buff), (char **) NULL, 0); |
1520 |
rs_cache_size = strtoul((char *)get_pword(2, (spif_charptr_t)buff), (char **) NULL, 0); |
1521 |
#else |
1521 |
#else |
1522 |
print_warning("Pixmap support was not compiled in, ignoring \"cache\" attribute\n"); |
1522 |
print_warning("Pixmap support was not compiled in, ignoring \"cache\" attribute\n"); |
1523 |
#endif |
1523 |
#endif |
1524 |
|
1524 |
|
1525 |
} else if (!BEG_STRCASECMP(buff, "path ")) { |
1525 |
} else if (!BEG_STRCASECMP(buff, "path ")) { |
1526 |
RESET_AND_ASSIGN(rs_path, get_word(2, buff)); |
1526 |
RESET_AND_ASSIGN(rs_path, (char *)get_word(2, (spif_charptr_t)buff)); |
1527 |
|
1527 |
|
1528 |
} else if (!BEG_STRCASECMP(buff, "anim ")) { |
1528 |
} else if (!BEG_STRCASECMP(buff, "anim ")) { |
1529 |
#ifdef BACKGROUND_CYCLING_SUPPORT |
1529 |
#ifdef BACKGROUND_CYCLING_SUPPORT |
1530 |
char *tmp = get_pword(2, buff); |
1530 |
char *tmp = (char *)get_pword(2, (spif_charptr_t)buff); |
1531 |
|
1531 |
|
1532 |
if (tmp) { |
1532 |
if (tmp) { |
1533 |
rs_anim_pixmap_list = STRDUP(tmp); |
1533 |
rs_anim_pixmap_list = STRDUP(tmp); |
Lines 1568-1574
Link Here
|
1568 |
} |
1568 |
} |
1569 |
idx = *((int *) state); |
1569 |
idx = *((int *) state); |
1570 |
if (!BEG_STRCASECMP(buff, "type ")) { |
1570 |
if (!BEG_STRCASECMP(buff, "type ")) { |
1571 |
char *type = get_pword(2, buff); |
1571 |
char *type = (char *)get_pword(2, (spif_charptr_t)buff); |
1572 |
|
1572 |
|
1573 |
if (!type) { |
1573 |
if (!type) { |
1574 |
print_error("Parse error in file %s, line %lu: Missing image type\n", file_peek_path(), file_peek_line()); |
1574 |
print_error("Parse error in file %s, line %lu: Missing image type\n", file_peek_path(), file_peek_line()); |
Lines 1611-1618
Link Here
|
1611 |
*((int *) state) = idx; |
1611 |
*((int *) state) = idx; |
1612 |
|
1612 |
|
1613 |
} else if (!BEG_STRCASECMP(buff, "mode ")) { |
1613 |
} else if (!BEG_STRCASECMP(buff, "mode ")) { |
1614 |
char *mode = get_pword(2, buff); |
1614 |
char *mode = (char *)get_pword(2, (spif_charptr_t)buff); |
1615 |
char *allow_list = get_pword(4, buff); |
1615 |
char *allow_list = (char *)get_pword(4, (spif_charptr_t)buff); |
1616 |
|
1616 |
|
1617 |
if (!CHECK_VALID_INDEX(idx)) { |
1617 |
if (!CHECK_VALID_INDEX(idx)) { |
1618 |
print_error("Parse error in file %s, line %lu: Encountered \"mode\" with no image type defined\n", file_peek_path(), |
1618 |
print_error("Parse error in file %s, line %lu: Encountered \"mode\" with no image type defined\n", file_peek_path(), |
Lines 1655-1661
Link Here
|
1655 |
} |
1655 |
} |
1656 |
} |
1656 |
} |
1657 |
} else if (!BEG_STRCASECMP(buff, "state ")) { |
1657 |
} else if (!BEG_STRCASECMP(buff, "state ")) { |
1658 |
char *state = get_pword(2, buff), new = 0; |
1658 |
char *state = (char *)get_pword(2, (spif_charptr_t)buff), new = 0; |
1659 |
|
1659 |
|
1660 |
if (!state) { |
1660 |
if (!state) { |
1661 |
print_error("Parse error in file %s, line %lu: Missing state\n", file_peek_path(), file_peek_line()); |
1661 |
print_error("Parse error in file %s, line %lu: Missing state\n", file_peek_path(), file_peek_line()); |
Lines 1702-1708
Link Here
|
1702 |
MEMSET(images[idx].current->iml, 0, sizeof(imlib_t)); |
1702 |
MEMSET(images[idx].current->iml, 0, sizeof(imlib_t)); |
1703 |
} |
1703 |
} |
1704 |
} else if (!BEG_STRCASECMP(buff, "color ")) { |
1704 |
} else if (!BEG_STRCASECMP(buff, "color ")) { |
1705 |
char *fg = get_word(2, buff), *bg = get_word(3, buff); |
1705 |
char *fg = (char *)get_word(2, (spif_charptr_t)buff), |
|
|
1706 |
*bg = (char *)get_word(3, (spif_charptr_t)buff); |
1706 |
|
1707 |
|
1707 |
if (!CHECK_VALID_INDEX(idx)) { |
1708 |
if (!CHECK_VALID_INDEX(idx)) { |
1708 |
print_error("Parse error in file %s, line %lu: Encountered \"color\" with no image type defined\n", file_peek_path(), |
1709 |
print_error("Parse error in file %s, line %lu: Encountered \"color\" with no image type defined\n", file_peek_path(), |
Lines 1734-1740
Link Here
|
1734 |
|
1735 |
|
1735 |
} else if (!BEG_STRCASECMP(buff, "file ")) { |
1736 |
} else if (!BEG_STRCASECMP(buff, "file ")) { |
1736 |
#ifdef PIXMAP_SUPPORT |
1737 |
#ifdef PIXMAP_SUPPORT |
1737 |
char *filename = get_pword(2, buff); |
1738 |
char *filename = (char *)get_pword(2, (spif_charptr_t)buff); |
1738 |
|
1739 |
|
1739 |
if (!CHECK_VALID_INDEX(idx)) { |
1740 |
if (!CHECK_VALID_INDEX(idx)) { |
1740 |
print_error("Parse error in file %s, line %lu: Encountered \"file\" with no image type defined\n", file_peek_path(), |
1741 |
print_error("Parse error in file %s, line %lu: Encountered \"file\" with no image type defined\n", file_peek_path(), |
Lines 1758-1764
Link Here
|
1758 |
|
1759 |
|
1759 |
} else if (!BEG_STRCASECMP(buff, "geom ")) { |
1760 |
} else if (!BEG_STRCASECMP(buff, "geom ")) { |
1760 |
#ifdef PIXMAP_SUPPORT |
1761 |
#ifdef PIXMAP_SUPPORT |
1761 |
char *geom = get_pword(2, buff); |
1762 |
char *geom = (char *)get_pword(2, (spif_charptr_t)buff); |
1762 |
|
1763 |
|
1763 |
if (!CHECK_VALID_INDEX(idx)) { |
1764 |
if (!CHECK_VALID_INDEX(idx)) { |
1764 |
print_error("Parse error in file %s, line %lu: Encountered \"geom\" with no image type defined\n", file_peek_path(), |
1765 |
print_error("Parse error in file %s, line %lu: Encountered \"geom\" with no image type defined\n", file_peek_path(), |
Lines 1779-1786
Link Here
|
1779 |
|
1780 |
|
1780 |
} else if (!BEG_STRCASECMP(buff, "cmod ") || !BEG_STRCASECMP(buff, "colormod ")) { |
1781 |
} else if (!BEG_STRCASECMP(buff, "cmod ") || !BEG_STRCASECMP(buff, "colormod ")) { |
1781 |
#ifdef PIXMAP_SUPPORT |
1782 |
#ifdef PIXMAP_SUPPORT |
1782 |
char *color = get_pword(2, buff); |
1783 |
char *color = (char *)get_pword(2, (spif_charptr_t)buff); |
1783 |
char *mods = get_pword(3, buff); |
1784 |
char *mods = (char *)get_pword(3, (spif_charptr_t)buff); |
1784 |
unsigned char n; |
1785 |
unsigned char n; |
1785 |
imlib_t *iml = images[idx].current->iml; |
1786 |
imlib_t *iml = images[idx].current->iml; |
1786 |
|
1787 |
|
Lines 1802-1808
Link Here
|
1802 |
print_error("Parse error in file %s, line %lu: Missing modifier(s)\n", file_peek_path(), file_peek_line()); |
1803 |
print_error("Parse error in file %s, line %lu: Missing modifier(s)\n", file_peek_path(), file_peek_line()); |
1803 |
return NULL; |
1804 |
return NULL; |
1804 |
} |
1805 |
} |
1805 |
n = num_words(mods); |
1806 |
n = num_words((spif_charptr_t)mods); |
1806 |
|
1807 |
|
1807 |
if (!BEG_STRCASECMP(color, "image ")) { |
1808 |
if (!BEG_STRCASECMP(color, "image ")) { |
1808 |
if (iml->mod) { |
1809 |
if (iml->mod) { |
Lines 1811-1820
Link Here
|
1811 |
iml->mod = create_colormod(); |
1812 |
iml->mod = create_colormod(); |
1812 |
iml->mod->brightness = (int) strtol(mods, (char **) NULL, 0); |
1813 |
iml->mod->brightness = (int) strtol(mods, (char **) NULL, 0); |
1813 |
if (n > 1) { |
1814 |
if (n > 1) { |
1814 |
iml->mod->contrast = (int) strtol(get_pword(2, mods), (char **) NULL, 0); |
1815 |
iml->mod->contrast = (int) strtol((char *)get_pword(2, (spif_charptr_t)mods), (char **) NULL, 0); |
1815 |
} |
1816 |
} |
1816 |
if (n > 2) { |
1817 |
if (n > 2) { |
1817 |
iml->mod->gamma = (int) strtol(get_pword(3, mods), (char **) NULL, 0); |
1818 |
iml->mod->gamma = (int) strtol((char *)get_pword(3, (spif_charptr_t)mods), (char **) NULL, 0); |
1818 |
} |
1819 |
} |
1819 |
update_cmod(iml->mod); |
1820 |
update_cmod(iml->mod); |
1820 |
} else if (!BEG_STRCASECMP(color, "red ")) { |
1821 |
} else if (!BEG_STRCASECMP(color, "red ")) { |
Lines 1824-1833
Link Here
|
1824 |
iml->rmod = create_colormod(); |
1825 |
iml->rmod = create_colormod(); |
1825 |
iml->rmod->brightness = (int) strtol(mods, (char **) NULL, 0); |
1826 |
iml->rmod->brightness = (int) strtol(mods, (char **) NULL, 0); |
1826 |
if (n > 1) { |
1827 |
if (n > 1) { |
1827 |
iml->rmod->contrast = (int) strtol(get_pword(2, mods), (char **) NULL, 0); |
1828 |
iml->rmod->contrast = (int) strtol((char *)get_pword(2, (spif_charptr_t)mods), (char **) NULL, 0); |
1828 |
} |
1829 |
} |
1829 |
if (n > 2) { |
1830 |
if (n > 2) { |
1830 |
iml->rmod->gamma = (int) strtol(get_pword(3, mods), (char **) NULL, 0); |
1831 |
iml->rmod->gamma = (int) strtol((char *)get_pword(3, (spif_charptr_t)mods), (char **) NULL, 0); |
1831 |
} |
1832 |
} |
1832 |
update_cmod(iml->rmod); |
1833 |
update_cmod(iml->rmod); |
1833 |
} else if (!BEG_STRCASECMP(color, "green ")) { |
1834 |
} else if (!BEG_STRCASECMP(color, "green ")) { |
Lines 1837-1846
Link Here
|
1837 |
iml->gmod = create_colormod(); |
1838 |
iml->gmod = create_colormod(); |
1838 |
iml->gmod->brightness = (int) strtol(mods, (char **) NULL, 0); |
1839 |
iml->gmod->brightness = (int) strtol(mods, (char **) NULL, 0); |
1839 |
if (n > 1) { |
1840 |
if (n > 1) { |
1840 |
iml->gmod->contrast = (int) strtol(get_pword(2, mods), (char **) NULL, 0); |
1841 |
iml->gmod->contrast = (int) strtol((char *)get_pword(2, (spif_charptr_t)mods), (char **) NULL, 0); |
1841 |
} |
1842 |
} |
1842 |
if (n > 2) { |
1843 |
if (n > 2) { |
1843 |
iml->gmod->gamma = (int) strtol(get_pword(3, mods), (char **) NULL, 0); |
1844 |
iml->gmod->gamma = (int) strtol((char *)get_pword(3, (spif_charptr_t)mods), (char **) NULL, 0); |
1844 |
} |
1845 |
} |
1845 |
update_cmod(iml->gmod); |
1846 |
update_cmod(iml->gmod); |
1846 |
} else if (!BEG_STRCASECMP(color, "blue ")) { |
1847 |
} else if (!BEG_STRCASECMP(color, "blue ")) { |
Lines 1850-1859
Link Here
|
1850 |
iml->bmod = create_colormod(); |
1851 |
iml->bmod = create_colormod(); |
1851 |
iml->bmod->brightness = (int) strtol(mods, (char **) NULL, 0); |
1852 |
iml->bmod->brightness = (int) strtol(mods, (char **) NULL, 0); |
1852 |
if (n > 1) { |
1853 |
if (n > 1) { |
1853 |
iml->bmod->contrast = (int) strtol(get_pword(2, mods), (char **) NULL, 0); |
1854 |
iml->bmod->contrast = (int) strtol((char *)get_pword(2, (spif_charptr_t)mods), (char **) NULL, 0); |
1854 |
} |
1855 |
} |
1855 |
if (n > 2) { |
1856 |
if (n > 2) { |
1856 |
iml->bmod->gamma = (int) strtol(get_pword(3, mods), (char **) NULL, 0); |
1857 |
iml->bmod->gamma = (int) strtol((char *)get_pword(3, (spif_charptr_t)mods), (char **) NULL, 0); |
1857 |
} |
1858 |
} |
1858 |
update_cmod(iml->bmod); |
1859 |
update_cmod(iml->bmod); |
1859 |
} else { |
1860 |
} else { |
Lines 1869-1885
Link Here
|
1869 |
file_peek_line()); |
1870 |
file_peek_line()); |
1870 |
return NULL; |
1871 |
return NULL; |
1871 |
} |
1872 |
} |
1872 |
if (num_words(buff + 7) < 4) { |
1873 |
if (num_words((spif_charptr_t)buff + 7) < 4) { |
1873 |
print_error("Parse error in file %s, line %lu: Invalid parameter list for attribute \"border\"\n", file_peek_path(), |
1874 |
print_error("Parse error in file %s, line %lu: Invalid parameter list for attribute \"border\"\n", file_peek_path(), |
1874 |
file_peek_line()); |
1875 |
file_peek_line()); |
1875 |
return NULL; |
1876 |
return NULL; |
1876 |
} |
1877 |
} |
1877 |
RESET_AND_ASSIGN(images[idx].current->iml->border, (Imlib_Border *) MALLOC(sizeof(Imlib_Border))); |
1878 |
RESET_AND_ASSIGN(images[idx].current->iml->border, (Imlib_Border *) MALLOC(sizeof(Imlib_Border))); |
1878 |
|
1879 |
|
1879 |
images[idx].current->iml->border->left = (unsigned short) strtoul(get_pword(2, buff), (char **) NULL, 0); |
1880 |
images[idx].current->iml->border->left = (unsigned short) strtoul((char *)get_pword(2, (spif_charptr_t)buff), (char **) NULL, 0); |
1880 |
images[idx].current->iml->border->right = (unsigned short) strtoul(get_pword(3, buff), (char **) NULL, 0); |
1881 |
images[idx].current->iml->border->right = (unsigned short) strtoul((char *)get_pword(3, (spif_charptr_t)buff), (char **) NULL, 0); |
1881 |
images[idx].current->iml->border->top = (unsigned short) strtoul(get_pword(4, buff), (char **) NULL, 0); |
1882 |
images[idx].current->iml->border->top = (unsigned short) strtoul((char *)get_pword(4, (spif_charptr_t)buff), (char **) NULL, 0); |
1882 |
images[idx].current->iml->border->bottom = (unsigned short) strtoul(get_pword(5, buff), (char **) NULL, 0); |
1883 |
images[idx].current->iml->border->bottom = (unsigned short) strtoul((char *)get_pword(5, (spif_charptr_t)buff), (char **) NULL, 0); |
1883 |
|
1884 |
|
1884 |
if ((images[idx].current->iml->border->left == 0) && (images[idx].current->iml->border->right == 0) |
1885 |
if ((images[idx].current->iml->border->left == 0) && (images[idx].current->iml->border->right == 0) |
1885 |
&& (images[idx].current->iml->border->top == 0) && (images[idx].current->iml->border->bottom == 0)) { |
1886 |
&& (images[idx].current->iml->border->top == 0) && (images[idx].current->iml->border->bottom == 0)) { |
Lines 1897-1903
Link Here
|
1897 |
file_peek_line()); |
1898 |
file_peek_line()); |
1898 |
return NULL; |
1899 |
return NULL; |
1899 |
} |
1900 |
} |
1900 |
if (num_words(buff + 6) < 5) { |
1901 |
if (num_words((spif_charptr_t)buff + 6) < 5) { |
1901 |
print_error("Parse error in file %s, line %lu: Invalid parameter list for attribute \"bevel\"\n", file_peek_path(), |
1902 |
print_error("Parse error in file %s, line %lu: Invalid parameter list for attribute \"bevel\"\n", file_peek_path(), |
1902 |
file_peek_line()); |
1903 |
file_peek_line()); |
1903 |
return NULL; |
1904 |
return NULL; |
Lines 1909-1923
Link Here
|
1909 |
images[idx].current->iml->bevel = (bevel_t *) MALLOC(sizeof(bevel_t)); |
1910 |
images[idx].current->iml->bevel = (bevel_t *) MALLOC(sizeof(bevel_t)); |
1910 |
images[idx].current->iml->bevel->edges = (Imlib_Border *) MALLOC(sizeof(Imlib_Border)); |
1911 |
images[idx].current->iml->bevel->edges = (Imlib_Border *) MALLOC(sizeof(Imlib_Border)); |
1911 |
|
1912 |
|
1912 |
if (!BEG_STRCASECMP(get_pword(2, buff), "down")) { |
1913 |
if (!BEG_STRCASECMP((char *)get_pword(2, (spif_charptr_t)buff), "down")) { |
1913 |
images[idx].current->iml->bevel->up = 0; |
1914 |
images[idx].current->iml->bevel->up = 0; |
1914 |
} else { |
1915 |
} else { |
1915 |
images[idx].current->iml->bevel->up = 1; |
1916 |
images[idx].current->iml->bevel->up = 1; |
1916 |
} |
1917 |
} |
1917 |
images[idx].current->iml->bevel->edges->left = (unsigned short) strtoul(get_pword(3, buff), (char **) NULL, 0); |
1918 |
images[idx].current->iml->bevel->edges->left = (unsigned short) strtoul((char *)get_pword(3, (spif_charptr_t)buff), (char **) NULL, 0); |
1918 |
images[idx].current->iml->bevel->edges->right = (unsigned short) strtoul(get_pword(4, buff), (char **) NULL, 0); |
1919 |
images[idx].current->iml->bevel->edges->right = (unsigned short) strtoul((char *)get_pword(4, (spif_charptr_t)buff), (char **) NULL, 0); |
1919 |
images[idx].current->iml->bevel->edges->top = (unsigned short) strtoul(get_pword(5, buff), (char **) NULL, 0); |
1920 |
images[idx].current->iml->bevel->edges->top = (unsigned short) strtoul((char *)get_pword(5, (spif_charptr_t)buff), (char **) NULL, 0); |
1920 |
images[idx].current->iml->bevel->edges->bottom = (unsigned short) strtoul(get_pword(6, buff), (char **) NULL, 0); |
1921 |
images[idx].current->iml->bevel->edges->bottom = (unsigned short) strtoul((char *)get_pword(6, (spif_charptr_t)buff), (char **) NULL, 0); |
1921 |
|
1922 |
|
1922 |
if ((images[idx].current->iml->bevel->edges->left == 0) && (images[idx].current->iml->bevel->edges->right == 0) |
1923 |
if ((images[idx].current->iml->bevel->edges->left == 0) && (images[idx].current->iml->bevel->edges->right == 0) |
1923 |
&& (images[idx].current->iml->bevel->edges->top == 0) && (images[idx].current->iml->bevel->edges->bottom == 0)) { |
1924 |
&& (images[idx].current->iml->bevel->edges->top == 0) && (images[idx].current->iml->bevel->edges->bottom == 0)) { |
Lines 1937-1953
Link Here
|
1937 |
file_peek_line()); |
1938 |
file_peek_line()); |
1938 |
return NULL; |
1939 |
return NULL; |
1939 |
} |
1940 |
} |
1940 |
if (num_words(buff + 8) < 4) { |
1941 |
if (num_words((spif_charptr_t)buff + 8) < 4) { |
1941 |
print_error("Parse error in file %s, line %lu: Invalid parameter list for attribute \"padding\"\n", file_peek_path(), |
1942 |
print_error("Parse error in file %s, line %lu: Invalid parameter list for attribute \"padding\"\n", file_peek_path(), |
1942 |
file_peek_line()); |
1943 |
file_peek_line()); |
1943 |
return NULL; |
1944 |
return NULL; |
1944 |
} |
1945 |
} |
1945 |
RESET_AND_ASSIGN(images[idx].current->iml->pad, (Imlib_Border *) MALLOC(sizeof(Imlib_Border))); |
1946 |
RESET_AND_ASSIGN(images[idx].current->iml->pad, (Imlib_Border *) MALLOC(sizeof(Imlib_Border))); |
1946 |
|
1947 |
|
1947 |
images[idx].current->iml->pad->left = (unsigned short) strtoul(get_pword(2, buff), (char **) NULL, 0); |
1948 |
images[idx].current->iml->pad->left = (unsigned short) strtoul((char *)get_pword(2, (spif_charptr_t)buff), (char **) NULL, 0); |
1948 |
images[idx].current->iml->pad->right = (unsigned short) strtoul(get_pword(3, buff), (char **) NULL, 0); |
1949 |
images[idx].current->iml->pad->right = (unsigned short) strtoul((char *)get_pword(3, (spif_charptr_t)buff), (char **) NULL, 0); |
1949 |
images[idx].current->iml->pad->top = (unsigned short) strtoul(get_pword(4, buff), (char **) NULL, 0); |
1950 |
images[idx].current->iml->pad->top = (unsigned short) strtoul((char *)get_pword(4, (spif_charptr_t)buff), (char **) NULL, 0); |
1950 |
images[idx].current->iml->pad->bottom = (unsigned short) strtoul(get_pword(5, buff), (char **) NULL, 0); |
1951 |
images[idx].current->iml->pad->bottom = (unsigned short) strtoul((char *)get_pword(5, (spif_charptr_t)buff), (char **) NULL, 0); |
1951 |
|
1952 |
|
1952 |
if ((images[idx].current->iml->pad->left == 0) && (images[idx].current->iml->pad->right == 0) |
1953 |
if ((images[idx].current->iml->pad->left == 0) && (images[idx].current->iml->pad->right == 0) |
1953 |
&& (images[idx].current->iml->pad->top == 0) && (images[idx].current->iml->pad->bottom == 0)) { |
1954 |
&& (images[idx].current->iml->pad->top == 0) && (images[idx].current->iml->pad->bottom == 0)) { |
Lines 1975-1981
Link Here
|
1975 |
} |
1976 |
} |
1976 |
|
1977 |
|
1977 |
if (!BEG_STRCASECMP(buff, "bind ")) { |
1978 |
if (!BEG_STRCASECMP(buff, "bind ")) { |
1978 |
for (i = 2; (str = get_word(i, buff)) && strcasecmp(str, "to"); i++) { |
1979 |
for (i = 2; (str = (char *)get_word(i, (spif_charptr_t)buff)) && strcasecmp(str, "to"); i++) { |
1979 |
if (!BEG_STRCASECMP(str, "anymod")) { |
1980 |
if (!BEG_STRCASECMP(str, "anymod")) { |
1980 |
mod = MOD_ANY; |
1981 |
mod = MOD_ANY; |
1981 |
} else if (!BEG_STRCASECMP(str, "ctrl")) { |
1982 |
} else if (!BEG_STRCASECMP(str, "ctrl")) { |
Lines 2017-2040
Link Here
|
2017 |
return NULL; |
2018 |
return NULL; |
2018 |
} |
2019 |
} |
2019 |
i++; |
2020 |
i++; |
2020 |
str = get_pword(i, buff); |
2021 |
str = (char *)get_pword(i, (spif_charptr_t)buff); |
2021 |
if (!BEG_STRCASECMP(str, "string")) { |
2022 |
if (!BEG_STRCASECMP(str, "string")) { |
2022 |
str = get_word(i + 1, buff); |
2023 |
str = (char *)get_word(i + 1, (spif_charptr_t)buff); |
2023 |
action_add(mod, button, keysym, ACTION_STRING, (void *) str); |
2024 |
action_add(mod, button, keysym, ACTION_STRING, (void *) str); |
2024 |
FREE(str); |
2025 |
FREE(str); |
2025 |
} else if (!BEG_STRCASECMP(str, "echo")) { |
2026 |
} else if (!BEG_STRCASECMP(str, "echo")) { |
2026 |
str = get_word(i + 1, buff); |
2027 |
str = (char *)get_word(i + 1, (spif_charptr_t)buff); |
2027 |
action_add(mod, button, keysym, ACTION_ECHO, (void *) str); |
2028 |
action_add(mod, button, keysym, ACTION_ECHO, (void *) str); |
2028 |
FREE(str); |
2029 |
FREE(str); |
2029 |
} else if (!BEG_STRCASECMP(str, "menu")) { |
2030 |
} else if (!BEG_STRCASECMP(str, "menu")) { |
2030 |
menu_t *menu; |
2031 |
menu_t *menu; |
2031 |
|
2032 |
|
2032 |
str = get_word(i + 1, buff); |
2033 |
str = (char *)get_word(i + 1, (spif_charptr_t)buff); |
2033 |
menu = find_menu_by_title(menu_list, str); |
2034 |
menu = find_menu_by_title(menu_list, str); |
2034 |
action_add(mod, button, keysym, ACTION_MENU, (void *) menu); |
2035 |
action_add(mod, button, keysym, ACTION_MENU, (void *) menu); |
2035 |
FREE(str); |
2036 |
FREE(str); |
2036 |
} else if (!BEG_STRCASECMP(str, "script")) { |
2037 |
} else if (!BEG_STRCASECMP(str, "script")) { |
2037 |
str = get_word(i + 1, buff); |
2038 |
str = (char *)get_word(i + 1, (spif_charptr_t)buff); |
2038 |
action_add(mod, button, keysym, ACTION_SCRIPT, (void *) str); |
2039 |
action_add(mod, button, keysym, ACTION_SCRIPT, (void *) str); |
2039 |
FREE(str); |
2040 |
FREE(str); |
2040 |
} else { |
2041 |
} else { |
Lines 2057-2063
Link Here
|
2057 |
menu_t *menu; |
2058 |
menu_t *menu; |
2058 |
|
2059 |
|
2059 |
if (*buff == CONF_BEGIN_CHAR) { |
2060 |
if (*buff == CONF_BEGIN_CHAR) { |
2060 |
char *title = get_pword(2, buff + 6); |
2061 |
char *title = (char *)get_pword(2, (spif_charptr_t)buff + 6); |
2061 |
|
2062 |
|
2062 |
menu = menu_create(title); |
2063 |
menu = menu_create(title); |
2063 |
return ((void *) menu); |
2064 |
return ((void *) menu); |
Lines 2077-2089
Link Here
|
2077 |
return NULL; |
2078 |
return NULL; |
2078 |
} |
2079 |
} |
2079 |
if (!BEG_STRCASECMP(buff, "title ")) { |
2080 |
if (!BEG_STRCASECMP(buff, "title ")) { |
2080 |
char *title = get_word(2, buff); |
2081 |
char *title = (char *)get_word(2, (spif_charptr_t)buff); |
2081 |
|
2082 |
|
2082 |
menu_set_title(menu, title); |
2083 |
menu_set_title(menu, title); |
2083 |
FREE(title); |
2084 |
FREE(title); |
2084 |
|
2085 |
|
2085 |
} else if (!BEG_STRCASECMP(buff, "font ")) { |
2086 |
} else if (!BEG_STRCASECMP(buff, "font ")) { |
2086 |
char *name = get_word(2, buff); |
2087 |
char *name = (char *)get_word(2, (spif_charptr_t)buff); |
2087 |
|
2088 |
|
2088 |
if (!name) { |
2089 |
if (!name) { |
2089 |
print_error("Parse error in file %s, line %lu: Missing font name.\n", file_peek_path(), file_peek_line()); |
2090 |
print_error("Parse error in file %s, line %lu: Missing font name.\n", file_peek_path(), file_peek_line()); |
Lines 2131-2137
Link Here
|
2131 |
return ((void *) menu); |
2132 |
return ((void *) menu); |
2132 |
} |
2133 |
} |
2133 |
if (!BEG_STRCASECMP(buff, "text ")) { |
2134 |
if (!BEG_STRCASECMP(buff, "text ")) { |
2134 |
char *text = get_word(2, buff); |
2135 |
char *text = (char *)get_word(2, (spif_charptr_t)buff); |
2135 |
|
2136 |
|
2136 |
if (!text) { |
2137 |
if (!text) { |
2137 |
print_error("Parse error in file %s, line %lu: Missing menuitem text.\n", file_peek_path(), file_peek_line()); |
2138 |
print_error("Parse error in file %s, line %lu: Missing menuitem text.\n", file_peek_path(), file_peek_line()); |
Lines 2141-2147
Link Here
|
2141 |
FREE(text); |
2142 |
FREE(text); |
2142 |
|
2143 |
|
2143 |
} else if (!BEG_STRCASECMP(buff, "rtext ")) { |
2144 |
} else if (!BEG_STRCASECMP(buff, "rtext ")) { |
2144 |
char *rtext = get_word(2, buff); |
2145 |
char *rtext = (char *)get_word(2, (spif_charptr_t)buff); |
2145 |
|
2146 |
|
2146 |
if (!rtext) { |
2147 |
if (!rtext) { |
2147 |
print_error("Parse error in file %s, line %lu: Missing menuitem right-justified text.\n", file_peek_path(), file_peek_line()); |
2148 |
print_error("Parse error in file %s, line %lu: Missing menuitem right-justified text.\n", file_peek_path(), file_peek_line()); |
Lines 2153-2160
Link Here
|
2153 |
} else if (!BEG_STRCASECMP(buff, "icon ")) { |
2154 |
} else if (!BEG_STRCASECMP(buff, "icon ")) { |
2154 |
|
2155 |
|
2155 |
} else if (!BEG_STRCASECMP(buff, "action ")) { |
2156 |
} else if (!BEG_STRCASECMP(buff, "action ")) { |
2156 |
char *type = get_pword(2, buff); |
2157 |
char *type = (char *)get_pword(2, (spif_charptr_t)buff); |
2157 |
char *action = get_word(3, buff); |
2158 |
char *action = (char *)get_word(3, (spif_charptr_t)buff); |
2158 |
|
2159 |
|
2159 |
if (!BEG_STRCASECMP(type, "submenu ")) { |
2160 |
if (!BEG_STRCASECMP(type, "submenu ")) { |
2160 |
menuitem_set_action(curitem, MENUITEM_SUBMENU, action); |
2161 |
menuitem_set_action(curitem, MENUITEM_SUBMENU, action); |
Lines 2200-2212
Link Here
|
2200 |
return NULL; |
2201 |
return NULL; |
2201 |
} |
2202 |
} |
2202 |
if (!BEG_STRCASECMP(buff, "font ")) { |
2203 |
if (!BEG_STRCASECMP(buff, "font ")) { |
2203 |
char *font = get_word(2, buff); |
2204 |
char *font = (char *)get_word(2, (spif_charptr_t)buff); |
2204 |
|
2205 |
|
2205 |
bbar_set_font(bbar, font); |
2206 |
bbar_set_font(bbar, font); |
2206 |
FREE(font); |
2207 |
FREE(font); |
2207 |
|
2208 |
|
2208 |
} else if (!BEG_STRCASECMP(buff, "dock ")) { |
2209 |
} else if (!BEG_STRCASECMP(buff, "dock ")) { |
2209 |
char *where = get_pword(2, buff); |
2210 |
char *where = (char *)get_pword(2, (spif_charptr_t)buff); |
2210 |
|
2211 |
|
2211 |
if (!where) { |
2212 |
if (!where) { |
2212 |
print_error("Parse error in file %s, line %lu: Attribute dock requires a parameter\n", file_peek_path(), file_peek_line()); |
2213 |
print_error("Parse error in file %s, line %lu: Attribute dock requires a parameter\n", file_peek_path(), file_peek_line()); |
Lines 2222-2228
Link Here
|
2222 |
} |
2223 |
} |
2223 |
|
2224 |
|
2224 |
} else if (!BEG_STRCASECMP(buff, "visible ")) { |
2225 |
} else if (!BEG_STRCASECMP(buff, "visible ")) { |
2225 |
char *tmp = get_pword(2, buff); |
2226 |
char *tmp = (char *)get_pword(2, (spif_charptr_t)buff); |
2226 |
|
2227 |
|
2227 |
if (BOOL_OPT_ISTRUE(tmp)) { |
2228 |
if (BOOL_OPT_ISTRUE(tmp)) { |
2228 |
bbar_set_visible(bbar, 1); |
2229 |
bbar_set_visible(bbar, 1); |
Lines 2234-2240
Link Here
|
2234 |
} |
2235 |
} |
2235 |
|
2236 |
|
2236 |
} else if (!BEG_STRCASECMP(buff, "button ") || !BEG_STRCASECMP(buff, "rbutton ")) { |
2237 |
} else if (!BEG_STRCASECMP(buff, "button ") || !BEG_STRCASECMP(buff, "rbutton ")) { |
2237 |
char *text = get_pword(2, buff); |
2238 |
char *text = (char *)get_pword(2, (spif_charptr_t)buff); |
2238 |
char *icon = strcasestr(buff, "icon "); |
2239 |
char *icon = strcasestr(buff, "icon "); |
2239 |
char *action = strcasestr(buff, "action "); |
2240 |
char *action = strcasestr(buff, "action "); |
2240 |
button_t *button; |
2241 |
button_t *button; |
Lines 2242-2248
Link Here
|
2242 |
if (text == icon) { |
2243 |
if (text == icon) { |
2243 |
text = NULL; |
2244 |
text = NULL; |
2244 |
} else { |
2245 |
} else { |
2245 |
text = get_word(2, buff); |
2246 |
text = (char *)get_word(2, (spif_charptr_t)buff); |
2246 |
} |
2247 |
} |
2247 |
if (!text && !icon) { |
2248 |
if (!text && !icon) { |
2248 |
print_error("Parse error in file %s, line %lu: Missing button specifications\n", file_peek_path(), file_peek_line()); |
2249 |
print_error("Parse error in file %s, line %lu: Missing button specifications\n", file_peek_path(), file_peek_line()); |
Lines 2253-2259
Link Here
|
2253 |
if (icon) { |
2254 |
if (icon) { |
2254 |
simage_t *simg; |
2255 |
simage_t *simg; |
2255 |
|
2256 |
|
2256 |
icon = get_word(2, icon); |
2257 |
icon = (char *)get_word(2, (spif_charptr_t)icon); |
2257 |
simg = create_simage(); |
2258 |
simg = create_simage(); |
2258 |
if (load_image(icon, simg)) { |
2259 |
if (load_image(icon, simg)) { |
2259 |
button_set_icon(button, simg); |
2260 |
button_set_icon(button, simg); |
Lines 2263-2271
Link Here
|
2263 |
FREE(icon); |
2264 |
FREE(icon); |
2264 |
} |
2265 |
} |
2265 |
if (action) { |
2266 |
if (action) { |
2266 |
char *type = get_pword(2, action); |
2267 |
char *type = (char *)get_pword(2, (spif_charptr_t)action); |
2267 |
|
2268 |
|
2268 |
action = get_word(2, type); |
2269 |
action = (char *)get_word(2, (spif_charptr_t)type); |
2269 |
if (!BEG_STRCASECMP(type, "menu ")) { |
2270 |
if (!BEG_STRCASECMP(type, "menu ")) { |
2270 |
button_set_action(button, ACTION_MENU, action); |
2271 |
button_set_action(button, ACTION_MENU, action); |
2271 |
} else if (!BEG_STRCASECMP(type, "string ")) { |
2272 |
} else if (!BEG_STRCASECMP(type, "string ")) { |
Lines 2306-2314
Link Here
|
2306 |
return NULL; |
2307 |
return NULL; |
2307 |
} |
2308 |
} |
2308 |
if (!BEG_STRCASECMP(buff, "input_method ")) { |
2309 |
if (!BEG_STRCASECMP(buff, "input_method ")) { |
2309 |
RESET_AND_ASSIGN(rs_input_method, get_word(2, buff)); |
2310 |
RESET_AND_ASSIGN(rs_input_method, (char *)get_word(2, (spif_charptr_t)buff)); |
2310 |
} else if (!BEG_STRCASECMP(buff, "preedit_type ")) { |
2311 |
} else if (!BEG_STRCASECMP(buff, "preedit_type ")) { |
2311 |
RESET_AND_ASSIGN(rs_preedit_type, get_word(2, buff)); |
2312 |
RESET_AND_ASSIGN(rs_preedit_type, (char *)get_word(2, (spif_charptr_t)buff)); |
2312 |
} else { |
2313 |
} else { |
2313 |
print_error("Parse error in file %s, line %lu: Attribute \"%s\" is not valid within context xim\n", |
2314 |
print_error("Parse error in file %s, line %lu: Attribute \"%s\" is not valid within context xim\n", |
2314 |
file_peek_path(), file_peek_line(), buff); |
2315 |
file_peek_path(), file_peek_line(), buff); |
Lines 2329-2335
Link Here
|
2329 |
return NULL; |
2330 |
return NULL; |
2330 |
} |
2331 |
} |
2331 |
if (!BEG_STRCASECMP(buff, "encoding ")) { |
2332 |
if (!BEG_STRCASECMP(buff, "encoding ")) { |
2332 |
RESET_AND_ASSIGN(rs_multichar_encoding, get_word(2, buff)); |
2333 |
RESET_AND_ASSIGN(rs_multichar_encoding, (char *)get_word(2, (spif_charptr_t)buff)); |
2333 |
if (rs_multichar_encoding != NULL) { |
2334 |
if (rs_multichar_encoding != NULL) { |
2334 |
if (BEG_STRCASECMP(rs_multichar_encoding, "eucj") |
2335 |
if (BEG_STRCASECMP(rs_multichar_encoding, "eucj") |
2335 |
&& BEG_STRCASECMP(rs_multichar_encoding, "sjis") |
2336 |
&& BEG_STRCASECMP(rs_multichar_encoding, "sjis") |
Lines 2349-2358
Link Here
|
2349 |
} |
2350 |
} |
2350 |
} else if (!BEG_STRCASECMP(buff, "font ")) { |
2351 |
} else if (!BEG_STRCASECMP(buff, "font ")) { |
2351 |
|
2352 |
|
2352 |
char *tmp = get_pword(2, buff); |
2353 |
char *tmp = (char *)get_pword(2, (spif_charptr_t)buff); |
2353 |
unsigned long n; |
2354 |
unsigned long n; |
2354 |
|
2355 |
|
2355 |
if (num_words(buff) != 3) { |
2356 |
if (num_words((spif_charptr_t)buff) != 3) { |
2356 |
print_error("Parse error in file %s, line %lu: Invalid parameter list \"%s\" for attribute font\n", |
2357 |
print_error("Parse error in file %s, line %lu: Invalid parameter list \"%s\" for attribute font\n", |
2357 |
file_peek_path(), file_peek_line(), NONULL(tmp)); |
2358 |
file_peek_path(), file_peek_line(), NONULL(tmp)); |
2358 |
return NULL; |
2359 |
return NULL; |
Lines 2360-2371
Link Here
|
2360 |
if (isdigit(*tmp)) { |
2361 |
if (isdigit(*tmp)) { |
2361 |
n = strtoul(tmp, (char **) NULL, 0); |
2362 |
n = strtoul(tmp, (char **) NULL, 0); |
2362 |
if (n <= 255) { |
2363 |
if (n <= 255) { |
2363 |
eterm_font_add(&etmfonts, get_pword(2, tmp), n); |
2364 |
eterm_font_add(&etmfonts, (char *)get_pword(2, (spif_charptr_t)tmp), n); |
2364 |
} else { |
2365 |
} else { |
2365 |
print_error("Parse error in file %s, line %lu: Invalid font index %d\n", file_peek_path(), file_peek_line(), n); |
2366 |
print_error("Parse error in file %s, line %lu: Invalid font index %d\n", file_peek_path(), file_peek_line(), n); |
2366 |
} |
2367 |
} |
2367 |
} else { |
2368 |
} else { |
2368 |
tmp = get_word(1, tmp); |
2369 |
tmp = (char *)get_word(1, (spif_charptr_t)tmp); |
2369 |
print_error("Parse error in file %s, line %lu: Invalid font index \"%s\"\n", file_peek_path(), file_peek_line(), NONULL(tmp)); |
2370 |
print_error("Parse error in file %s, line %lu: Invalid font index \"%s\"\n", file_peek_path(), file_peek_line(), NONULL(tmp)); |
2370 |
FREE(tmp); |
2371 |
FREE(tmp); |
2371 |
} |
2372 |
} |
Lines 2442-2463
Link Here
|
2442 |
} else { |
2443 |
} else { |
2443 |
snprintf(path, sizeof(path), CONFIG_SEARCH_PATH); |
2444 |
snprintf(path, sizeof(path), CONFIG_SEARCH_PATH); |
2444 |
} |
2445 |
} |
2445 |
shell_expand(path); |
2446 |
shell_expand((spif_charptr_t)path); |
2446 |
} |
2447 |
} |
2447 |
if (fallback & PARSE_TRY_USER_THEME) { |
2448 |
if (fallback & PARSE_TRY_USER_THEME) { |
2448 |
if (theme && *theme && (ret = conf_parse(conf_name, *theme, path)) != NULL) { |
2449 |
if (theme && *theme && (ret = (char *)conf_parse((spif_charptr_t)conf_name, (spif_charptr_t)*theme, (spif_charptr_t)path)) != NULL) { |
2449 |
return ret; |
2450 |
return ret; |
2450 |
} |
2451 |
} |
2451 |
} |
2452 |
} |
2452 |
if (fallback & PARSE_TRY_DEFAULT_THEME) { |
2453 |
if (fallback & PARSE_TRY_DEFAULT_THEME) { |
2453 |
RESET_AND_ASSIGN(*theme, STRDUP(PACKAGE)); |
2454 |
RESET_AND_ASSIGN(*theme, STRDUP(PACKAGE)); |
2454 |
if ((ret = conf_parse(conf_name, *theme, path)) != NULL) { |
2455 |
if ((ret = (char *)conf_parse((spif_charptr_t)conf_name, (spif_charptr_t)*theme, (spif_charptr_t)path)) != NULL) { |
2455 |
return ret; |
2456 |
return ret; |
2456 |
} |
2457 |
} |
2457 |
} |
2458 |
} |
2458 |
if (fallback & PARSE_TRY_NO_THEME) { |
2459 |
if (fallback & PARSE_TRY_NO_THEME) { |
2459 |
RESET_AND_ASSIGN(*theme, NULL); |
2460 |
RESET_AND_ASSIGN(*theme, NULL); |
2460 |
return (conf_parse(conf_name, *theme, path)); |
2461 |
return ((char *)conf_parse((spif_charptr_t)conf_name, (spif_charptr_t)*theme, (spif_charptr_t)path)); |
2461 |
} |
2462 |
} |
2462 |
return NULL; |
2463 |
return NULL; |
2463 |
} |
2464 |
} |
Lines 2534-2553
Link Here
|
2534 |
conf_init_subsystem(); |
2535 |
conf_init_subsystem(); |
2535 |
|
2536 |
|
2536 |
/* Register Eterm's context parsers. */ |
2537 |
/* Register Eterm's context parsers. */ |
2537 |
conf_register_context("color", parse_color); |
2538 |
conf_register_context((spif_charptr_t)"color", (ctx_handler_t)parse_color); |
2538 |
conf_register_context("attributes", parse_attributes); |
2539 |
conf_register_context((spif_charptr_t)"attributes", (ctx_handler_t)parse_attributes); |
2539 |
conf_register_context("toggles", parse_toggles); |
2540 |
conf_register_context((spif_charptr_t)"toggles", (ctx_handler_t)parse_toggles); |
2540 |
conf_register_context("keyboard", parse_keyboard); |
2541 |
conf_register_context((spif_charptr_t)"keyboard", (ctx_handler_t)parse_keyboard); |
2541 |
conf_register_context("misc", parse_misc); |
2542 |
conf_register_context((spif_charptr_t)"misc", (ctx_handler_t)parse_misc); |
2542 |
conf_register_context("imageclasses", parse_imageclasses); |
2543 |
conf_register_context((spif_charptr_t)"imageclasses", (ctx_handler_t)parse_imageclasses); |
2543 |
conf_register_context("image", parse_image); |
2544 |
conf_register_context((spif_charptr_t)"image", (ctx_handler_t)parse_image); |
2544 |
conf_register_context("actions", parse_actions); |
2545 |
conf_register_context((spif_charptr_t)"actions", (ctx_handler_t)parse_actions); |
2545 |
conf_register_context("menu", parse_menu); |
2546 |
conf_register_context((spif_charptr_t)"menu", (ctx_handler_t)parse_menu); |
2546 |
conf_register_context("menuitem", parse_menuitem); |
2547 |
conf_register_context((spif_charptr_t)"menuitem", (ctx_handler_t)parse_menuitem); |
2547 |
conf_register_context("button_bar", parse_bbar); |
2548 |
conf_register_context((spif_charptr_t)"button_bar", (ctx_handler_t)parse_bbar); |
2548 |
conf_register_context("xim", parse_xim); |
2549 |
conf_register_context((spif_charptr_t)"xim", (ctx_handler_t)parse_xim); |
2549 |
conf_register_context("multichar", parse_multichar); |
2550 |
conf_register_context((spif_charptr_t)"multichar", (ctx_handler_t)parse_multichar); |
2550 |
conf_register_context("escreen", parse_escreen); |
2551 |
conf_register_context((spif_charptr_t)"escreen", (ctx_handler_t)parse_escreen); |
2551 |
} |
2552 |
} |
2552 |
|
2553 |
|
2553 |
/* Sync up options with our internal data after parsing options and configs */ |
2554 |
/* Sync up options with our internal data after parsing options and configs */ |
Lines 2872-2878
Link Here
|
2872 |
FREE(rs_tint); |
2873 |
FREE(rs_tint); |
2873 |
} |
2874 |
} |
2874 |
if (rs_cmod_image) { |
2875 |
if (rs_cmod_image) { |
2875 |
unsigned char n = num_words(rs_cmod_image); |
2876 |
unsigned char n = num_words((spif_charptr_t)rs_cmod_image); |
2876 |
imlib_t *iml = images[image_bg].norm->iml; |
2877 |
imlib_t *iml = images[image_bg].norm->iml; |
2877 |
|
2878 |
|
2878 |
if (iml->mod) { |
2879 |
if (iml->mod) { |
Lines 2881-2897
Link Here
|
2881 |
iml->mod = create_colormod(); |
2882 |
iml->mod = create_colormod(); |
2882 |
iml->mod->brightness = (int) strtol(rs_cmod_image, (char **) NULL, 0); |
2883 |
iml->mod->brightness = (int) strtol(rs_cmod_image, (char **) NULL, 0); |
2883 |
if (n > 1) { |
2884 |
if (n > 1) { |
2884 |
iml->mod->contrast = (int) strtol(get_pword(2, rs_cmod_image), (char **) NULL, 0); |
2885 |
iml->mod->contrast = (int) strtol((char *)get_pword(2, (spif_charptr_t)rs_cmod_image), (char **) NULL, 0); |
2885 |
} |
2886 |
} |
2886 |
if (n > 2) { |
2887 |
if (n > 2) { |
2887 |
iml->mod->gamma = (int) strtol(get_pword(3, rs_cmod_image), (char **) NULL, 0); |
2888 |
iml->mod->gamma = (int) strtol((char *)get_pword(3, (spif_charptr_t)rs_cmod_image), (char **) NULL, 0); |
2888 |
} |
2889 |
} |
2889 |
D_PIXMAP(("From image cmod string %s to brightness %d, contrast %d, and gamma %d\n", rs_cmod_image, |
2890 |
D_PIXMAP(("From image cmod string %s to brightness %d, contrast %d, and gamma %d\n", rs_cmod_image, |
2890 |
iml->mod->brightness, iml->mod->contrast, iml->mod->gamma)); |
2891 |
iml->mod->brightness, iml->mod->contrast, iml->mod->gamma)); |
2891 |
FREE(rs_cmod_image); |
2892 |
FREE(rs_cmod_image); |
2892 |
} |
2893 |
} |
2893 |
if (rs_cmod_red) { |
2894 |
if (rs_cmod_red) { |
2894 |
unsigned char n = num_words(rs_cmod_red); |
2895 |
unsigned char n = num_words((spif_charptr_t)rs_cmod_red); |
2895 |
imlib_t *iml = images[image_bg].norm->iml; |
2896 |
imlib_t *iml = images[image_bg].norm->iml; |
2896 |
|
2897 |
|
2897 |
if (iml->rmod) { |
2898 |
if (iml->rmod) { |
Lines 2900-2909
Link Here
|
2900 |
iml->rmod = create_colormod(); |
2901 |
iml->rmod = create_colormod(); |
2901 |
iml->rmod->brightness = (int) strtol(rs_cmod_red, (char **) NULL, 0); |
2902 |
iml->rmod->brightness = (int) strtol(rs_cmod_red, (char **) NULL, 0); |
2902 |
if (n > 1) { |
2903 |
if (n > 1) { |
2903 |
iml->rmod->contrast = (int) strtol(get_pword(2, rs_cmod_red), (char **) NULL, 0); |
2904 |
iml->rmod->contrast = (int) strtol((char *)get_pword(2, (spif_charptr_t)rs_cmod_red), (char **) NULL, 0); |
2904 |
} |
2905 |
} |
2905 |
if (n > 2) { |
2906 |
if (n > 2) { |
2906 |
iml->rmod->gamma = (int) strtol(get_pword(3, rs_cmod_red), (char **) NULL, 0); |
2907 |
iml->rmod->gamma = (int) strtol((char *)get_pword(3, (spif_charptr_t)rs_cmod_red), (char **) NULL, 0); |
2907 |
} |
2908 |
} |
2908 |
D_PIXMAP(("From red cmod string %s to brightness %d, contrast %d, and gamma %d\n", rs_cmod_red, |
2909 |
D_PIXMAP(("From red cmod string %s to brightness %d, contrast %d, and gamma %d\n", rs_cmod_red, |
2909 |
iml->rmod->brightness, iml->rmod->contrast, iml->rmod->gamma)); |
2910 |
iml->rmod->brightness, iml->rmod->contrast, iml->rmod->gamma)); |
Lines 2911-2917
Link Here
|
2911 |
update_cmod(iml->rmod); |
2912 |
update_cmod(iml->rmod); |
2912 |
} |
2913 |
} |
2913 |
if (rs_cmod_green) { |
2914 |
if (rs_cmod_green) { |
2914 |
unsigned char n = num_words(rs_cmod_green); |
2915 |
unsigned char n = num_words((spif_charptr_t)rs_cmod_green); |
2915 |
imlib_t *iml = images[image_bg].norm->iml; |
2916 |
imlib_t *iml = images[image_bg].norm->iml; |
2916 |
|
2917 |
|
2917 |
if (iml->gmod) { |
2918 |
if (iml->gmod) { |
Lines 2920-2929
Link Here
|
2920 |
iml->gmod = create_colormod(); |
2921 |
iml->gmod = create_colormod(); |
2921 |
iml->gmod->brightness = (int) strtol(rs_cmod_green, (char **) NULL, 0); |
2922 |
iml->gmod->brightness = (int) strtol(rs_cmod_green, (char **) NULL, 0); |
2922 |
if (n > 1) { |
2923 |
if (n > 1) { |
2923 |
iml->gmod->contrast = (int) strtol(get_pword(2, rs_cmod_green), (char **) NULL, 0); |
2924 |
iml->gmod->contrast = (int) strtol((char *)get_pword(2, (spif_charptr_t)rs_cmod_green), (char **) NULL, 0); |
2924 |
} |
2925 |
} |
2925 |
if (n > 2) { |
2926 |
if (n > 2) { |
2926 |
iml->gmod->gamma = (int) strtol(get_pword(3, rs_cmod_green), (char **) NULL, 0); |
2927 |
iml->gmod->gamma = (int) strtol((char *)get_pword(3, (spif_charptr_t)rs_cmod_green), (char **) NULL, 0); |
2927 |
} |
2928 |
} |
2928 |
D_PIXMAP(("From green cmod string %s to brightness %d, contrast %d, and gamma %d\n", rs_cmod_green, |
2929 |
D_PIXMAP(("From green cmod string %s to brightness %d, contrast %d, and gamma %d\n", rs_cmod_green, |
2929 |
iml->gmod->brightness, iml->gmod->contrast, iml->gmod->gamma)); |
2930 |
iml->gmod->brightness, iml->gmod->contrast, iml->gmod->gamma)); |
Lines 2931-2937
Link Here
|
2931 |
update_cmod(iml->gmod); |
2932 |
update_cmod(iml->gmod); |
2932 |
} |
2933 |
} |
2933 |
if (rs_cmod_blue) { |
2934 |
if (rs_cmod_blue) { |
2934 |
unsigned char n = num_words(rs_cmod_blue); |
2935 |
unsigned char n = num_words((spif_charptr_t)rs_cmod_blue); |
2935 |
imlib_t *iml = images[image_bg].norm->iml; |
2936 |
imlib_t *iml = images[image_bg].norm->iml; |
2936 |
|
2937 |
|
2937 |
if (iml->bmod) { |
2938 |
if (iml->bmod) { |
Lines 2940-2949
Link Here
|
2940 |
iml->bmod = create_colormod(); |
2941 |
iml->bmod = create_colormod(); |
2941 |
iml->bmod->brightness = (int) strtol(rs_cmod_blue, (char **) NULL, 0); |
2942 |
iml->bmod->brightness = (int) strtol(rs_cmod_blue, (char **) NULL, 0); |
2942 |
if (n > 1) { |
2943 |
if (n > 1) { |
2943 |
iml->bmod->contrast = (int) strtol(get_pword(2, rs_cmod_blue), (char **) NULL, 0); |
2944 |
iml->bmod->contrast = (int) strtol((char *)get_pword(2, (spif_charptr_t)rs_cmod_blue), (char **) NULL, 0); |
2944 |
} |
2945 |
} |
2945 |
if (n > 2) { |
2946 |
if (n > 2) { |
2946 |
iml->bmod->gamma = (int) strtol(get_pword(3, rs_cmod_blue), (char **) NULL, 0); |
2947 |
iml->bmod->gamma = (int) strtol((char *)get_pword(3, (spif_charptr_t)rs_cmod_blue), (char **) NULL, 0); |
2947 |
} |
2948 |
} |
2948 |
D_PIXMAP(("From blue cmod string %s to brightness %d, contrast %d, and gamma %d\n", rs_cmod_blue, |
2949 |
D_PIXMAP(("From blue cmod string %s to brightness %d, contrast %d, and gamma %d\n", rs_cmod_blue, |
2949 |
iml->bmod->brightness, iml->bmod->contrast, iml->bmod->gamma)); |
2950 |
iml->bmod->brightness, iml->bmod->contrast, iml->bmod->gamma)); |
Lines 2997-3024
Link Here
|
2997 |
unsigned long w, h; |
2998 |
unsigned long w, h; |
2998 |
int count; |
2999 |
int count; |
2999 |
|
3000 |
|
3000 |
count = num_words(rs_anim_pixmap_list) - 1; /* -1 for the delay */ |
3001 |
count = num_words((spif_charptr_t)rs_anim_pixmap_list) - 1; /* -1 for the delay */ |
3001 |
rs_anim_pixmaps = (char **) MALLOC(sizeof(char *) * (count + 1)); |
3002 |
rs_anim_pixmaps = (char **) MALLOC(sizeof(char *) * (count + 1)); |
3002 |
|
3003 |
|
3003 |
for (i = 0; i < count; i++) { |
3004 |
for (i = 0; i < count; i++) { |
3004 |
temp = get_word(i + 2, rs_anim_pixmap_list); /* +2 rather than +1 to account for the delay */ |
3005 |
temp = (char *)get_word(i + 2, (spif_charptr_t)rs_anim_pixmap_list); /* +2 rather than +1 to account for the delay */ |
3005 |
if (temp == NULL) |
3006 |
if (temp == NULL) |
3006 |
break; |
3007 |
break; |
3007 |
if (num_words(temp) != 3) { |
3008 |
if (num_words((spif_charptr_t)temp) != 3) { |
3008 |
if (num_words(temp) == 1) { |
3009 |
if (num_words((spif_charptr_t)temp) == 1) { |
3009 |
rs_anim_pixmaps[i] = temp; |
3010 |
rs_anim_pixmaps[i] = temp; |
3010 |
} |
3011 |
} |
3011 |
} else { |
3012 |
} else { |
3012 |
w1 = get_pword(1, temp); |
3013 |
w1 = (char *)get_pword(1, (spif_charptr_t)temp); |
3013 |
h1 = get_pword(2, temp); |
3014 |
h1 = (char *)get_pword(2, (spif_charptr_t)temp); |
3014 |
w = strtol(w1, (char **) NULL, 0); |
3015 |
w = strtol(w1, (char **) NULL, 0); |
3015 |
h = strtol(h1, (char **) NULL, 0); |
3016 |
h = strtol(h1, (char **) NULL, 0); |
3016 |
if (w || h) { |
3017 |
if (w || h) { |
3017 |
rs_anim_pixmaps[i] = get_word(3, temp); |
3018 |
rs_anim_pixmaps[i] = (char *)get_word(3, (spif_charptr_t)temp); |
3018 |
rs_anim_pixmaps[i] = (char *) REALLOC(rs_anim_pixmaps[i], strlen(rs_anim_pixmaps[i]) + 9); |
3019 |
rs_anim_pixmaps[i] = (char *) REALLOC(rs_anim_pixmaps[i], strlen(rs_anim_pixmaps[i]) + 9); |
3019 |
strcat(rs_anim_pixmaps[i], "@100x100"); |
3020 |
strcat(rs_anim_pixmaps[i], "@100x100"); |
3020 |
} else { |
3021 |
} else { |
3021 |
rs_anim_pixmaps[i] = get_word(3, temp); |
3022 |
rs_anim_pixmaps[i] = (char *)get_word(3, (spif_charptr_t)temp); |
3022 |
rs_anim_pixmaps[i] = (char *) REALLOC(rs_anim_pixmaps[i], strlen(rs_anim_pixmaps[i]) + 5); |
3023 |
rs_anim_pixmaps[i] = (char *) REALLOC(rs_anim_pixmaps[i], strlen(rs_anim_pixmaps[i]) + 5); |
3023 |
strcat(rs_anim_pixmaps[i], "@0x0"); |
3024 |
strcat(rs_anim_pixmaps[i], "@0x0"); |
3024 |
} |
3025 |
} |