Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 92485
Collapse All | Expand All

(-)Eterm-0.9.3.orig/src/command.c (-3 / +3 lines)
Lines 3002-3010 Link Here
3002
    Xfd = XConnectionNumber(Xdisplay);
3002
    Xfd = XConnectionNumber(Xdisplay);
3003
    D_CMD(("Xfd = %d\n", Xfd));
3003
    D_CMD(("Xfd = %d\n", Xfd));
3004
    cmdbuf_ptr = cmdbuf_endp = cmdbuf_base;
3004
    cmdbuf_ptr = cmdbuf_endp = cmdbuf_base;
3005
    AT_LEAST((int) num_fds, Xfd + 1);
3005
    AT_LEAST(num_fds, Xfd + 1);
3006
    if (pipe_fd >= 0) {
3006
    if (pipe_fd >= 0) {
3007
        AT_LEAST((int) num_fds, pipe_fd + 1);
3007
        AT_LEAST(num_fds, pipe_fd + 1);
3008
    }
3008
    }
3009
    if ((cmd_fd = command_func(argv)) < 0) {
3009
    if ((cmd_fd = command_func(argv)) < 0) {
3010
        print_error("Unable to run sub-command.\n");
3010
        print_error("Unable to run sub-command.\n");
Lines 3469-3475 Link Here
3469
            register unsigned char *str;
3469
            register unsigned char *str;
3470
3470
3471
            D_CMD(("Command buffer contains %d characters.\n", cmdbuf_endp - cmdbuf_ptr));
3471
            D_CMD(("Command buffer contains %d characters.\n", cmdbuf_endp - cmdbuf_ptr));
3472
            D_VT(("\n%s\n\n", safe_print_string(cmdbuf_ptr - 1, cmdbuf_endp - cmdbuf_ptr + 1)));
3472
            D_VT(("\n%s\n\n", safe_print_string((char *)cmdbuf_ptr - 1, cmdbuf_endp - cmdbuf_ptr + 1)));
3473
3473
3474
            /*
3474
            /*
3475
             * point to the start of the string,
3475
             * point to the start of the string,
(-)Eterm-0.9.3.orig/src/events.c (-6 / +6 lines)
Lines 701-711 Link Here
701
                      } else if (action_check_modifiers(MOD_SHIFT, ev->xbutton.state)) {
701
                      } else if (action_check_modifiers(MOD_SHIFT, ev->xbutton.state)) {
702
                          scr_page(UP, 1);
702
                          scr_page(UP, 1);
703
                      } else if (action_check_modifiers(MOD_ALT, ev->xbutton.state)) {
703
                      } else if (action_check_modifiers(MOD_ALT, ev->xbutton.state)) {
704
                          tt_write("\033[5~", 4);
704
                          tt_write((unsigned char *)"\033[5~", 4);
705
                      } else if (action_check_modifiers((MOD_ALT | MOD_SHIFT), ev->xbutton.state)) {
705
                      } else if (action_check_modifiers((MOD_ALT | MOD_SHIFT), ev->xbutton.state)) {
706
                          tt_write("\033[A", 3);
706
                          tt_write((unsigned char *)"\033[A", 3);
707
                      } else if (action_check_modifiers((MOD_ALT | MOD_CTRL), ev->xbutton.state)) {
707
                      } else if (action_check_modifiers((MOD_ALT | MOD_CTRL), ev->xbutton.state)) {
708
                          tt_write("\033[5~\033[5~\033[5~\033[5~\033[5~", 20);
708
                          tt_write((unsigned char *)"\033[5~\033[5~\033[5~\033[5~\033[5~", 20);
709
                      } else {
709
                      } else {
710
                          scr_page(UP, TermWin.nrow - CONTEXT_LINES);
710
                          scr_page(UP, TermWin.nrow - CONTEXT_LINES);
711
                      }
711
                      }
Lines 717-727 Link Here
717
                      } else if (action_check_modifiers(MOD_SHIFT, ev->xbutton.state)) {
717
                      } else if (action_check_modifiers(MOD_SHIFT, ev->xbutton.state)) {
718
                          scr_page(DN, 1);
718
                          scr_page(DN, 1);
719
                      } else if (action_check_modifiers(MOD_ALT, ev->xbutton.state)) {
719
                      } else if (action_check_modifiers(MOD_ALT, ev->xbutton.state)) {
720
                          tt_write("\033[6~", 4);
720
                          tt_write((unsigned char *)"\033[6~", 4);
721
                      } else if (action_check_modifiers((MOD_ALT | MOD_SHIFT), ev->xbutton.state)) {
721
                      } else if (action_check_modifiers((MOD_ALT | MOD_SHIFT), ev->xbutton.state)) {
722
                          tt_write("\033[B", 3);
722
                          tt_write((unsigned char *)"\033[B", 3);
723
                      } else if (action_check_modifiers((MOD_ALT | MOD_CTRL), ev->xbutton.state)) {
723
                      } else if (action_check_modifiers((MOD_ALT | MOD_CTRL), ev->xbutton.state)) {
724
                          tt_write("\033[6~\033[6~\033[6~\033[6~\033[6~", 20);
724
                          tt_write((unsigned char *)"\033[6~\033[6~\033[6~\033[6~\033[6~", 20);
725
                      } else {
725
                      } else {
726
                          scr_page(DN, TermWin.nrow - CONTEXT_LINES);
726
                          scr_page(DN, TermWin.nrow - CONTEXT_LINES);
727
                      }
727
                      }
(-)Eterm-0.9.3.orig/src/font.c (-13 / +13 lines)
Lines 736-742 Link Here
736
736
737
    ASSERT_RVAL(line != NULL, 0);
737
    ASSERT_RVAL(line != NULL, 0);
738
738
739
    n = num_words(line);
739
    n = num_words((spif_charptr_t)line);
740
740
741
    if (!BEG_STRCASECMP(line, "none")) {
741
    if (!BEG_STRCASECMP(line, "none")) {
742
        MEMSET(&fshadow, 0, sizeof(fontshadow_t));
742
        MEMSET(&fshadow, 0, sizeof(fontshadow_t));
Lines 744-750 Link Here
744
        if (n != 2) {
744
        if (n != 2) {
745
            return 0;
745
            return 0;
746
        }
746
        }
747
        color = get_word(2, line);
747
        color = (char *)get_word(2, (spif_charptr_t)line);
748
        p = get_color_by_name(color, "black");
748
        p = get_color_by_name(color, "black");
749
        FREE(color);
749
        FREE(color);
750
        for (which = 0; which < 4; which++) {
750
        for (which = 0; which < 4; which++) {
Lines 753-762 Link Here
753
    } else if (!BEG_STRCASECMP(line, "shadow")) {
753
    } else if (!BEG_STRCASECMP(line, "shadow")) {
754
        if (n == 2) {
754
        if (n == 2) {
755
            which = SHADOW_BOTTOM_RIGHT;
755
            which = SHADOW_BOTTOM_RIGHT;
756
            color = get_word(2, line);
756
            color = (char *)get_word(2, (spif_charptr_t)line);
757
        } else if (n == 3) {
757
        } else if (n == 3) {
758
            color = get_word(3, line);
758
            color = (char *)get_word(3, (spif_charptr_t)line);
759
            corner = get_pword(2, line);
759
            corner = (char *)get_pword(2, (spif_charptr_t)line);
760
            which = get_corner(corner);
760
            which = get_corner(corner);
761
            if (which >= 4) {
761
            if (which >= 4) {
762
                return 0;
762
                return 0;
Lines 770-781 Link Here
770
        if (n != 3) {
770
        if (n != 3) {
771
            return 0;
771
            return 0;
772
        }
772
        }
773
        color = get_word(2, line);
773
        color = (char *)get_word(2, (spif_charptr_t)line);
774
        p = get_color_by_name(color, "black");
774
        p = get_color_by_name(color, "black");
775
        set_shadow_color_by_pixel(SHADOW_BOTTOM_RIGHT, p);
775
        set_shadow_color_by_pixel(SHADOW_BOTTOM_RIGHT, p);
776
        FREE(color);
776
        FREE(color);
777
777
778
        color = get_word(3, line);
778
        color = (char *)get_word(3, (spif_charptr_t)line);
779
        p = get_color_by_name(color, "white");
779
        p = get_color_by_name(color, "white");
780
        set_shadow_color_by_pixel(SHADOW_TOP_LEFT, p);
780
        set_shadow_color_by_pixel(SHADOW_TOP_LEFT, p);
781
        FREE(color);
781
        FREE(color);
Lines 783-794 Link Here
783
        if (n != 3) {
783
        if (n != 3) {
784
            return 0;
784
            return 0;
785
        }
785
        }
786
        color = get_word(2, line);
786
        color = (char *)get_word(2, (spif_charptr_t)line);
787
        p = get_color_by_name(color, "black");
787
        p = get_color_by_name(color, "black");
788
        set_shadow_color_by_pixel(SHADOW_TOP_LEFT, p);
788
        set_shadow_color_by_pixel(SHADOW_TOP_LEFT, p);
789
        FREE(color);
789
        FREE(color);
790
790
791
        color = get_word(3, line);
791
        color = (char *)get_word(3, (spif_charptr_t)line);
792
        p = get_color_by_name(color, "white");
792
        p = get_color_by_name(color, "white");
793
        set_shadow_color_by_pixel(SHADOW_BOTTOM_RIGHT, p);
793
        set_shadow_color_by_pixel(SHADOW_BOTTOM_RIGHT, p);
794
        FREE(color);
794
        FREE(color);
Lines 799-809 Link Here
799
            which = get_corner(line);
799
            which = get_corner(line);
800
            if (which >= 4) {
800
            if (which >= 4) {
801
                which = i;
801
                which = i;
802
                color = get_word(1, line);
802
                color = (char *)get_word(1, (spif_charptr_t)line);
803
                line = get_pword(2, line);
803
                line = (char *)get_pword(2, (spif_charptr_t)line);
804
            } else {
804
            } else {
805
                color = get_word(2, line);
805
                color = (char *)get_word(2, (spif_charptr_t)line);
806
                line = get_pword(3, line);
806
                line = (char *)get_pword(3, (spif_charptr_t)line);
807
            }
807
            }
808
            set_shadow_color_by_name(which, color);
808
            set_shadow_color_by_name(which, color);
809
            FREE(color);
809
            FREE(color);
(-)Eterm-0.9.3.orig/src/misc.c (-3 / +3 lines)
Lines 80-86 Link Here
80
80
81
    if (str && *str) {
81
    if (str && *str) {
82
82
83
        chomp(str);
83
        chomp((spif_charptr_t)str);
84
        n = strlen(str);
84
        n = strlen(str);
85
85
86
        if (!n) {
86
        if (!n) {
Lines 316-322 Link Here
316
    register unsigned char *out, *outp, *in;
316
    register unsigned char *out, *outp, *in;
317
    register unsigned long i;
317
    register unsigned long i;
318
318
319
    D_CMD(("buff == %8p \"%s\", cnt == %lu\n", buff, safe_print_string(buff, cnt), cnt));
319
    D_CMD(("buff == %8p \"%s\", cnt == %lu\n", buff, safe_print_string((char *)buff, cnt), cnt));
320
    outp = out = (unsigned char *) MALLOC(cnt * 2);
320
    outp = out = (unsigned char *) MALLOC(cnt * 2);
321
    for (i = 0, in = buff; i < cnt; i++) {
321
    for (i = 0, in = buff; i < cnt; i++) {
322
        if (*in == '\n') {
322
        if (*in == '\n') {
Lines 327-333 Link Here
327
    i = (unsigned long) (out - outp);
327
    i = (unsigned long) (out - outp);
328
    memcpy(buff, outp, i);
328
    memcpy(buff, outp, i);
329
    FREE(outp);
329
    FREE(outp);
330
    D_CMD(("buff == %8p \"%s\", i == %lu\n", buff, safe_print_string(buff, i), i));
330
    D_CMD(("buff == %8p \"%s\", i == %lu\n", buff, safe_print_string((char *)buff, i), i));
331
    return i;
331
    return i;
332
}
332
}
333
333
(-)Eterm-0.9.3.orig/src/options.c (-159 / +160 lines)
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
                    }
(-)Eterm-0.9.3.orig/src/pixmap.c (-2 / +2 lines)
Lines 824-830 Link Here
824
                        FREE(reply);
824
                        FREE(reply);
825
                    } else {
825
                    } else {
826
                        pmap = (Pixmap) strtoul(reply, (char **) NULL, 0);
826
                        pmap = (Pixmap) strtoul(reply, (char **) NULL, 0);
827
                        mask = (Pixmap) strtoul(get_pword(2, reply), (char **) NULL, 0);
827
                        mask = (Pixmap) strtoul((char *)get_pword(2, (spif_charptr_t)reply), (char **) NULL, 0);
828
                        FREE(reply);
828
                        FREE(reply);
829
                        enl_ipc_sync();
829
                        enl_ipc_sync();
830
                        if (pmap) {
830
                        if (pmap) {
Lines 1053-1059 Link Here
1053
                        Pixmap pmap, mask;
1053
                        Pixmap pmap, mask;
1054
1054
1055
                        pmap = (Pixmap) strtoul(reply, (char **) NULL, 0);
1055
                        pmap = (Pixmap) strtoul(reply, (char **) NULL, 0);
1056
                        mask = (Pixmap) strtoul(get_pword(2, reply), (char **) NULL, 0);
1056
                        mask = (Pixmap) strtoul((char *)get_pword(2, (spif_charptr_t)reply), (char **) NULL, 0);
1057
                        FREE(reply);
1057
                        FREE(reply);
1058
                        enl_ipc_sync();
1058
                        enl_ipc_sync();
1059
                        if (pmap) {
1059
                        if (pmap) {
(-)Eterm-0.9.3.orig/src/screen.c (-10 / +10 lines)
Lines 1783-1789 Link Here
1783
                    }
1783
                    }
1784
                    col--;
1784
                    col--;
1785
                    if (buffer[0] & 0x80)
1785
                    if (buffer[0] & 0x80)
1786
                        multichar_decode(buffer, len);
1786
                        multichar_decode((unsigned char *)buffer, len);
1787
                    wlen = len / 2;
1787
                    wlen = len / 2;
1788
                } else {
1788
                } else {
1789
                    if ((rend & RS_multiMask) == RS_multi1) {
1789
                    if ((rend & RS_multiMask) == RS_multi1) {
Lines 2188-2194 Link Here
2188
    for (row = 0; row < rows; row++) {
2188
    for (row = 0; row < rows; row++) {
2189
        if (screen.text[row]) {
2189
        if (screen.text[row]) {
2190
            c = screen.text[row];
2190
            c = screen.text[row];
2191
            for (s = strstr(c, str); s; s = strstr(s + 1, str)) {
2191
            for (s = strstr((char *)c, str); s; s = strstr(s + 1, str)) {
2192
                unsigned long j;
2192
                unsigned long j;
2193
2193
2194
                col = (long) s - (long) c;
2194
                col = (long) s - (long) c;
Lines 2203-2213 Link Here
2203
                    lrow = row;
2203
                    lrow = row;
2204
                }
2204
                }
2205
            }
2205
            }
2206
            for (s = screen.text[row] + cols - len + 1, k = len - 1; k; s++, k--) {
2206
            for (s = (char *)screen.text[row] + cols - len + 1, k = len - 1; k; s++, k--) {
2207
                unsigned long j;
2207
                unsigned long j;
2208
2208
2209
                if ((row < rows - 1) && !strncasecmp(s, str, k) && screen.text[row + 1]
2209
                if ((row < rows - 1) && !strncasecmp(s, str, k) && screen.text[row + 1]
2210
                    && !strncasecmp(screen.text[row + 1], str + k, len - k)) {
2210
                    && !strncasecmp((char *)screen.text[row + 1], str + k, len - k)) {
2211
                    col = (long) s - (long) c;
2211
                    col = (long) s - (long) c;
2212
                    for (i = &(screen.rend[row][cols - k]), j = 0; j < k; i++, j++) {
2212
                    for (i = &(screen.rend[row][cols - k]), j = 0; j < k; i++, j++) {
2213
                        (*i & RS_RVid) ? (*i &= ~RS_RVid) : (*i |= RS_RVid);
2213
                        (*i & RS_RVid) ? (*i &= ~RS_RVid) : (*i |= RS_RVid);
Lines 2305-2311 Link Here
2305
    buff = MALLOC(cols + 1);
2305
    buff = MALLOC(cols + 1);
2306
    for (row = 0; row < rows; row++) {
2306
    for (row = 0; row < rows; row++) {
2307
        if (screen.text[row]) {
2307
        if (screen.text[row]) {
2308
            for (src = screen.text[row], dest = buff, col = 0; col < cols; col++)
2308
            for (src = (char *)screen.text[row], dest = buff, col = 0; col < cols; col++)
2309
                *dest++ = *src++;
2309
                *dest++ = *src++;
2310
            *dest++ = '\n';
2310
            *dest++ = '\n';
2311
            *dest = 0;
2311
            *dest = 0;
Lines 2376-2382 Link Here
2376
selection_write(unsigned char *data, size_t len)
2376
selection_write(unsigned char *data, size_t len)
2377
{
2377
{
2378
    size_t num;
2378
    size_t num;
2379
    unsigned char *p, *cr = "\r";
2379
    unsigned char *p, *cr = (unsigned char *)"\r";
2380
2380
2381
    D_SELECT(("Writing %lu characters of selection data to tty.\n", len));
2381
    D_SELECT(("Writing %lu characters of selection data to tty.\n", len));
2382
    D_SELECT(("\n%s\n\n", safe_print_string((char *) data, len)));
2382
    D_SELECT(("\n%s\n\n", safe_print_string((char *) data, len)));
Lines 2453-2459 Link Here
2453
                D_SELECT(("Got string list 0x%08x with %d strings.\n", cl, size));
2453
                D_SELECT(("Got string list 0x%08x with %d strings.\n", cl, size));
2454
                for (i = 0; i < size; i++) {
2454
                for (i = 0; i < size; i++) {
2455
                    if (cl[i]) {
2455
                    if (cl[i]) {
2456
                        selection_write(cl[i], strlen(cl[i]));
2456
                        selection_write((unsigned char *)cl[i], strlen(cl[i]));
2457
                    }
2457
                    }
2458
                }
2458
                }
2459
                XFreeStringList(cl);
2459
                XFreeStringList(cl);
Lines 2480-2486 Link Here
2480
        }
2480
        }
2481
    } else {
2481
    } else {
2482
        D_SELECT(("Copying selection to cut buffer %d\n", (int) sel));
2482
        D_SELECT(("Copying selection to cut buffer %d\n", (int) sel));
2483
        XChangeProperty(Xdisplay, Xroot, sel, XA_STRING, 8, PropModeReplace, str, len);
2483
        XChangeProperty(Xdisplay, Xroot, sel, XA_STRING, 8, PropModeReplace, (unsigned char *)str, len);
2484
    }
2484
    }
2485
}
2485
}
2486
2486
Lines 2488-2494 Link Here
2488
void
2488
void
2489
selection_copy(Atom sel)
2489
selection_copy(Atom sel)
2490
{
2490
{
2491
    selection_copy_string(sel, selection.text, selection.len);
2491
    selection_copy_string(sel, (char *)selection.text, selection.len);
2492
}
2492
}
2493
2493
2494
/* Paste the specified selection from the specified buffer. */
2494
/* Paste the specified selection from the specified buffer. */
Lines 3265-3271 Link Here
3265
        XTextProperty xtextp;
3265
        XTextProperty xtextp;
3266
        char *l[1];
3266
        char *l[1];
3267
3267
3268
        *l = selection.text;
3268
        *l = (char *)selection.text;
3269
        xtextp.value = NULL;
3269
        xtextp.value = NULL;
3270
        xtextp.nitems = 0;
3270
        xtextp.nitems = 0;
3271
        if (XmbTextListToTextProperty(Xdisplay, l, 1, XCompoundTextStyle, &xtextp) == Success) {
3271
        if (XmbTextListToTextProperty(Xdisplay, l, 1, XCompoundTextStyle, &xtextp) == Success) {
(-)Eterm-0.9.3.orig/src/script.c (-9 / +9 lines)
Lines 191-197 Link Here
191
    char **tmp;
191
    char **tmp;
192
192
193
    for (tmp = params; tmp && *tmp; tmp++) {
193
    for (tmp = params; tmp && *tmp; tmp++) {
194
        tt_write(*tmp, strlen(*tmp));
194
        tt_write((unsigned char *)*tmp, strlen(*tmp));
195
    }
195
    }
196
}
196
}
197
197
Lines 214-220 Link Here
214
        if (isdigit(params[0][0]) || (params[0][0] == '-' && isdigit(params[0][1]))) {
214
        if (isdigit(params[0][0]) || (params[0][0] == '-' && isdigit(params[0][1]))) {
215
            code = (unsigned char) atoi(params[0]);
215
            code = (unsigned char) atoi(params[0]);
216
        } else {
216
        } else {
217
            tmp = join(" ", params);
217
            tmp = (char *)join((spif_charptr_t)" ", (spif_charptr_t *)params);
218
            printf("Exiting:  %s\n", tmp);
218
            printf("Exiting:  %s\n", tmp);
219
            FREE(tmp);
219
            FREE(tmp);
220
        }
220
        }
Lines 411-417 Link Here
411
    char *tmp;
411
    char *tmp;
412
412
413
    if (params && *params) {
413
    if (params && *params) {
414
        tmp = join(" ", params);
414
        tmp = (char *)join((spif_charptr_t)" ", (spif_charptr_t *)params);
415
        system_no_wait(tmp);
415
        system_no_wait(tmp);
416
        FREE(tmp);
416
        FREE(tmp);
417
    } else {
417
    } else {
Lines 431-437 Link Here
431
    char **tmp;
431
    char **tmp;
432
432
433
    for (tmp = params; tmp && *tmp; tmp++) {
433
    for (tmp = params; tmp && *tmp; tmp++) {
434
        cmd_write(*tmp, strlen(*tmp));
434
        cmd_write((unsigned char *)*tmp, strlen(*tmp));
435
    }
435
    }
436
}
436
}
437
437
Lines 448-454 Link Here
448
    int ret;
448
    int ret;
449
449
450
    if (params && *params) {
450
    if (params && *params) {
451
        tmp = join(" ", params);
451
        tmp = (char *)join((spif_charptr_t)" ", (spif_charptr_t *)params);
452
    } else {
452
    } else {
453
        tmp = NULL;
453
        tmp = NULL;
454
    }
454
    }
Lines 474-480 Link Here
474
    char *tmp;
474
    char *tmp;
475
475
476
    if (params && *params) {
476
    if (params && *params) {
477
        tmp = join(" ", params);
477
        tmp = (char *)join((spif_charptr_t)" ", (spif_charptr_t *)params);
478
        scr_refresh(DEFAULT_REFRESH);
478
        scr_refresh(DEFAULT_REFRESH);
479
        menu_dialog(NULL, tmp, 1, NULL, NULL);
479
        menu_dialog(NULL, tmp, 1, NULL, NULL);
480
        FREE(tmp);
480
        FREE(tmp);
Lines 739-745 Link Here
739
739
740
    D_SCRIPT(("Parsing:  \"%s\"\n", s));
740
    D_SCRIPT(("Parsing:  \"%s\"\n", s));
741
741
742
    token_list = split(";", s);
742
    token_list = (char **)split((spif_charptr_t)";", (spif_charptr_t)s);
743
    if (token_list == NULL) {
743
    if (token_list == NULL) {
744
        D_SCRIPT(("No tokens found; ignoring script.\n"));
744
        D_SCRIPT(("No tokens found; ignoring script.\n"));
745
        return;
745
        return;
Lines 747-753 Link Here
747
747
748
    for (i = 0; token_list[i]; i++) {
748
    for (i = 0; token_list[i]; i++) {
749
        pstr = token_list[i];
749
        pstr = token_list[i];
750
        chomp(pstr);
750
        chomp((spif_charptr_t)pstr);
751
        if (!(*pstr)) {
751
        if (!(*pstr)) {
752
            continue;
752
            continue;
753
        }
753
        }
Lines 778-784 Link Here
778
                free_array((void **) token_list, 0);
778
                free_array((void **) token_list, 0);
779
                return;
779
                return;
780
            }
780
            }
781
            param_list = split(", \t", params);
781
            param_list = (char **)split((spif_charptr_t)", \t", (spif_charptr_t)params);
782
        } else {
782
        } else {
783
            param_list = NULL;
783
            param_list = NULL;
784
        }
784
        }
(-)Eterm-0.9.3.orig/src/term.c (-29 / +29 lines)
Lines 233-252 Link Here
233
        /* Lookup the string equivalent in terms of the XIM input context. */
233
        /* Lookup the string equivalent in terms of the XIM input context. */
234
        len = XmbLookupString(xim_input_context, &ev->xkey, (char *) kbuf, sizeof(short_buf), &keysym, &status_return);
234
        len = XmbLookupString(xim_input_context, &ev->xkey, (char *) kbuf, sizeof(short_buf), &keysym, &status_return);
235
        D_TTY(("XmbLookupString() gave us len %d, keysym \"%s\" (0x%04x), and buffer \"%s\" based on the XIM input context %010p\n",
235
        D_TTY(("XmbLookupString() gave us len %d, keysym \"%s\" (0x%04x), and buffer \"%s\" based on the XIM input context %010p\n",
236
               len, XKeysymToString(keysym), keysym, safe_print_string(kbuf, len), xim_input_context));
236
               len, XKeysymToString(keysym), keysym, safe_print_string((char *)kbuf, len), xim_input_context));
237
        /* Whoops, it's too long.  Allocate a new buffer and repeat the call. */
237
        /* Whoops, it's too long.  Allocate a new buffer and repeat the call. */
238
        if (status_return == XBufferOverflow) {
238
        if (status_return == XBufferOverflow) {
239
            kbuf = (unsigned char *) MALLOC(len + 1);
239
            kbuf = (unsigned char *) MALLOC(len + 1);
240
            kbuf_alloced = 1;
240
            kbuf_alloced = 1;
241
            len = XmbLookupString(xim_input_context, &ev->xkey, (char *) kbuf, len, &keysym, &status_return);
241
            len = XmbLookupString(xim_input_context, &ev->xkey, (char *) kbuf, len, &keysym, &status_return);
242
            D_TTY(("XmbLookupString() gave us len %d, keysym \"%s\" (0x%04x), and buffer \"%s\" based on the XIM input context %010p\n",
242
            D_TTY(("XmbLookupString() gave us len %d, keysym \"%s\" (0x%04x), and buffer \"%s\" based on the XIM input context %010p\n",
243
                   len, XKeysymToString(keysym), keysym, safe_print_string(kbuf, len), xim_input_context));
243
                   len, XKeysymToString(keysym), keysym, safe_print_string((char *)kbuf, len), xim_input_context));
244
        }
244
        }
245
        valid_keysym = (status_return == XLookupKeySym) || (status_return == XLookupBoth);
245
        valid_keysym = (status_return == XLookupKeySym) || (status_return == XLookupBoth);
246
    } else {
246
    } else {
247
        /* No XIM input context.  Do it the normal way. */
247
        /* No XIM input context.  Do it the normal way. */
248
        len = XLookupString(&ev->xkey, (char *) kbuf, sizeof(short_buf), &keysym, NULL);
248
        len = XLookupString(&ev->xkey, (char *) kbuf, sizeof(short_buf), &keysym, NULL);
249
        D_TTY(("XLookupString() gave us len %d, keysym \"%s\" (0x%04x), and buffer \"%s\"\n", len, XKeysymToString(keysym), keysym, safe_print_string(kbuf, len)));
249
        D_TTY(("XLookupString() gave us len %d, keysym \"%s\" (0x%04x), and buffer \"%s\"\n", len, XKeysymToString(keysym), keysym, safe_print_string((char *)kbuf, len)));
250
        valid_keysym = 1;
250
        valid_keysym = 1;
251
    }
251
    }
252
#else /* USE_XIM */
252
#else /* USE_XIM */
Lines 478-484 Link Here
478
                  case XK_ISO_Left_Tab:
478
                  case XK_ISO_Left_Tab:
479
                      if (shft) {
479
                      if (shft) {
480
                          len = 3;
480
                          len = 3;
481
                          strcpy(kbuf, "\033[Z");
481
                          strcpy((char *)kbuf, "\033[Z");
482
                      }
482
                      }
483
                      break;
483
                      break;
484
484
Lines 487-500 Link Here
487
                      /* allow shift to override */
487
                      /* allow shift to override */
488
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
488
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
489
                          len = 3;
489
                          len = 3;
490
                          strcpy(kbuf, "\033Ow");
490
                          strcpy((char *)kbuf, "\033Ow");
491
                          break;
491
                          break;
492
                      }
492
                      }
493
                      /* -> else FALL THROUGH */
493
                      /* -> else FALL THROUGH */
494
#endif
494
#endif
495
495
496
                  case XK_Home:
496
                  case XK_Home:
497
                      len = strlen(strcpy(kbuf, KS_HOME));
497
                      len = strlen(strcpy((char *)kbuf, KS_HOME));
498
                      break;
498
                      break;
499
499
500
#ifdef XK_KP_Left
500
#ifdef XK_KP_Left
Lines 504-510 Link Here
504
                  case XK_KP_Down:     /* \033Or or standard cursor key */
504
                  case XK_KP_Down:     /* \033Or or standard cursor key */
505
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
505
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
506
                          len = 3;
506
                          len = 3;
507
                          strcpy(kbuf, "\033OZ");       /* The Z is replaced by t, x, v, or r */
507
                          strcpy((char *)kbuf, "\033OZ");       /* The Z is replaced by t, x, v, or r */
508
                          kbuf[2] = ("txvr"[keysym - XK_KP_Left]);
508
                          kbuf[2] = ("txvr"[keysym - XK_KP_Left]);
509
                          break;
509
                          break;
510
                      } else {
510
                      } else {
Lines 517-523 Link Here
517
                  case XK_Right:       /* "\033[C" */
517
                  case XK_Right:       /* "\033[C" */
518
                  case XK_Down:        /* "\033[B" */
518
                  case XK_Down:        /* "\033[B" */
519
                      len = 3;
519
                      len = 3;
520
                      strcpy(kbuf, "\033[@");
520
                      strcpy((char *)kbuf, "\033[@");
521
                      kbuf[2] = ("DACB"[keysym - XK_Left]);
521
                      kbuf[2] = ("DACB"[keysym - XK_Left]);
522
                      if (PrivateModes & PrivMode_aplCUR) {
522
                      if (PrivateModes & PrivMode_aplCUR) {
523
                          kbuf[1] = 'O';
523
                          kbuf[1] = 'O';
Lines 544-571 Link Here
544
                      /* allow shift to override */
544
                      /* allow shift to override */
545
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
545
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
546
                          len = 3;
546
                          len = 3;
547
                          strcpy(kbuf, "\033Oy");
547
                          strcpy((char *)kbuf, "\033Oy");
548
                          break;
548
                          break;
549
                      }
549
                      }
550
                      /* -> else FALL THROUGH */
550
                      /* -> else FALL THROUGH */
551
# endif /* XK_KP_Prior */
551
# endif /* XK_KP_Prior */
552
                  case XK_Prior:
552
                  case XK_Prior:
553
                      len = 4;
553
                      len = 4;
554
                      strcpy(kbuf, "\033[5~");
554
                      strcpy((char *)kbuf, "\033[5~");
555
                      break;
555
                      break;
556
# ifdef XK_KP_Next
556
# ifdef XK_KP_Next
557
                  case XK_KP_Next:
557
                  case XK_KP_Next:
558
                      /* allow shift to override */
558
                      /* allow shift to override */
559
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
559
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
560
                          len = 3;
560
                          len = 3;
561
                          strcpy(kbuf, "\033Os");
561
                          strcpy((char *)kbuf, "\033Os");
562
                          break;
562
                          break;
563
                      }
563
                      }
564
                      /* -> else FALL THROUGH */
564
                      /* -> else FALL THROUGH */
565
# endif /* XK_KP_Next */
565
# endif /* XK_KP_Next */
566
                  case XK_Next:
566
                  case XK_Next:
567
                      len = 4;
567
                      len = 4;
568
                      strcpy(kbuf, "\033[6~");
568
                      strcpy((char *)kbuf, "\033[6~");
569
                      break;
569
                      break;
570
#endif /* UNSHIFTED_SCROLLKEYS */
570
#endif /* UNSHIFTED_SCROLLKEYS */
571
571
Lines 575-592 Link Here
575
                      /* allow shift to override */
575
                      /* allow shift to override */
576
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
576
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
577
                          len = 3;
577
                          len = 3;
578
                          strcpy(kbuf, "\033Oq");
578
                          strcpy((char *)kbuf, "\033Oq");
579
                          break;
579
                          break;
580
                      }
580
                      }
581
                      /* -> else FALL THROUGH */
581
                      /* -> else FALL THROUGH */
582
#endif /* XK_KP_End */
582
#endif /* XK_KP_End */
583
                  case XK_End:
583
                  case XK_End:
584
                      len = strlen(strcpy(kbuf, KS_END));
584
                      len = strlen(strcpy((char *)kbuf, KS_END));
585
                      break;
585
                      break;
586
586
587
                  case XK_Select:
587
                  case XK_Select:
588
                      len = 4;
588
                      len = 4;
589
                      strcpy(kbuf, "\033[4~");
589
                      strcpy((char *)kbuf, "\033[4~");
590
                      break;
590
                      break;
591
591
592
#ifdef DXK_Remove
592
#ifdef DXK_Remove
Lines 594-626 Link Here
594
#endif
594
#endif
595
                  case XK_Execute:
595
                  case XK_Execute:
596
                      len = 4;
596
                      len = 4;
597
                      strcpy(kbuf, "\033[3~");
597
                      strcpy((char *)kbuf, "\033[3~");
598
                      break;
598
                      break;
599
599
600
#ifdef XK_KP_Insert
600
#ifdef XK_KP_Insert
601
                  case XK_KP_Insert:
601
                  case XK_KP_Insert:
602
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
602
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
603
                          len = 3;
603
                          len = 3;
604
                          strcpy(kbuf, "\033Op");
604
                          strcpy((char *)kbuf, "\033Op");
605
                          break;
605
                          break;
606
                      }
606
                      }
607
#endif
607
#endif
608
                  case XK_Insert:
608
                  case XK_Insert:
609
                      len = 4;
609
                      len = 4;
610
                      strcpy(kbuf, "\033[2~");
610
                      strcpy((char *)kbuf, "\033[2~");
611
                      break;
611
                      break;
612
612
613
#ifdef XK_KP_Delete
613
#ifdef XK_KP_Delete
614
                  case XK_KP_Delete:
614
                  case XK_KP_Delete:
615
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
615
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
616
                          len = 3;
616
                          len = 3;
617
                          strcpy(kbuf, "\033On");
617
                          strcpy((char *)kbuf, "\033On");
618
                          break;
618
                          break;
619
                      }
619
                      }
620
#endif
620
#endif
621
                  case XK_Delete:
621
                  case XK_Delete:
622
#ifdef KS_DELETE
622
#ifdef KS_DELETE
623
                      len = strlen(strcpy(kbuf, KS_DELETE));
623
                      len = strlen(strcpy((char *)kbuf, KS_DELETE));
624
#ifdef MULTI_CHARSET
624
#ifdef MULTI_CHARSET
625
                      if ((BITFIELD_IS_SET(eterm_options, ETERM_OPTIONS_MBYTE_CURSOR)) && scr_multi1()) {
625
                      if ((BITFIELD_IS_SET(eterm_options, ETERM_OPTIONS_MBYTE_CURSOR)) && scr_multi1()) {
626
                          memmove(kbuf + len, kbuf, len);
626
                          memmove(kbuf + len, kbuf, len);
Lines 632-653 Link Here
632
632
633
                  case XK_Menu:
633
                  case XK_Menu:
634
                      len = 5;
634
                      len = 5;
635
                      strcpy(kbuf, "\033[29~");
635
                      strcpy((char *)kbuf, "\033[29~");
636
                      break;
636
                      break;
637
                  case XK_Find:
637
                  case XK_Find:
638
                      len = 4;
638
                      len = 4;
639
                      strcpy(kbuf, "\033[1~");
639
                      strcpy((char *)kbuf, "\033[1~");
640
                      break;
640
                      break;
641
                  case XK_Help:
641
                  case XK_Help:
642
                      len = 5;
642
                      len = 5;
643
                      strcpy(kbuf, "\033[28~");
643
                      strcpy((char *)kbuf, "\033[28~");
644
                      break;
644
                      break;
645
645
646
                  case XK_KP_Enter:
646
                  case XK_KP_Enter:
647
                      /* allow shift to override */
647
                      /* allow shift to override */
648
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
648
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
649
                          len = 3;
649
                          len = 3;
650
                          strcpy(kbuf, "\033OM");
650
                          strcpy((char *)kbuf, "\033OM");
651
                      } else {
651
                      } else {
652
                          len = 1;
652
                          len = 1;
653
                          kbuf[0] = '\r';
653
                          kbuf[0] = '\r';
Lines 657-663 Link Here
657
#ifdef XK_KP_Begin
657
#ifdef XK_KP_Begin
658
                  case XK_KP_Begin:
658
                  case XK_KP_Begin:
659
                      len = 3;
659
                      len = 3;
660
                      strcpy(kbuf, "\033Ou");
660
                      strcpy((char *)kbuf, "\033Ou");
661
                      break;
661
                      break;
662
#endif /* XK_KP_Begin */
662
#endif /* XK_KP_Begin */
663
663
Lines 666-672 Link Here
666
                  case XK_KP_F3:       /* "\033OR" */
666
                  case XK_KP_F3:       /* "\033OR" */
667
                  case XK_KP_F4:       /* "\033OS" */
667
                  case XK_KP_F4:       /* "\033OS" */
668
                      len = 3;
668
                      len = 3;
669
                      strcpy(kbuf, "\033OP");
669
                      strcpy((char *)kbuf, "\033OP");
670
                      kbuf[2] += (keysym - XK_KP_F1);
670
                      kbuf[2] += (keysym - XK_KP_F1);
671
                      break;
671
                      break;
672
672
Lines 689-695 Link Here
689
                      /* allow shift to override */
689
                      /* allow shift to override */
690
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
690
                      if ((PrivateModes & PrivMode_aplKP) ? !shft : shft) {
691
                          len = 3;
691
                          len = 3;
692
                          strcpy(kbuf, "\033Oj");
692
                          strcpy((char *)kbuf, "\033Oj");
693
                          kbuf[2] += (keysym - XK_KP_Multiply);
693
                          kbuf[2] += (keysym - XK_KP_Multiply);
694
                      } else {
694
                      } else {
695
                          len = 1;
695
                          len = 1;
Lines 814-820 Link Here
814
814
815
        tt_write(&ch, 1);
815
        tt_write(&ch, 1);
816
    }
816
    }
817
    D_TTY(("After handling:  len %d, keysym \"%s\" (0x%04x), and buffer \"%s\"\n", len, XKeysymToString(keysym), keysym, safe_print_string(kbuf, len)));
817
    D_TTY(("After handling:  len %d, keysym \"%s\" (0x%04x), and buffer \"%s\"\n", len, XKeysymToString(keysym), keysym, safe_print_string((char *)kbuf, len)));
818
    tt_write(kbuf, len);        /* Send the resulting string to the child process */
818
    tt_write(kbuf, len);        /* Send the resulting string to the child process */
819
819
820
    LK_RET();
820
    LK_RET();
Lines 1259-1265 Link Here
1259
        for (i = 1; i < 7; i++) {
1259
        for (i = 1; i < 7; i++) {
1260
            string[i] = cmd_getc();
1260
            string[i] = cmd_getc();
1261
        }
1261
        }
1262
        set_window_color(idx, string);
1262
        set_window_color(idx, (char *)string);
1263
        return;
1263
        return;
1264
    } else if (ch == ';') {
1264
    } else if (ch == ';') {
1265
        unsigned long n = 0;
1265
        unsigned long n = 0;

Return to bug 92485