From: Matt Birkholz Date: Thu, 17 Nov 2016 23:28:40 +0000 (-0700) Subject: x11 plugin: Address warnings from new AM_CFLAGS. X-Git-Tag: mit-scheme-pucked-9.2.12~254^2 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=03a97f825763e843dca7661897c75c71bb616022;p=mit-scheme.git x11 plugin: Address warnings from new AM_CFLAGS. --- diff --git a/src/x11/x11-shim.h b/src/x11/x11-shim.h index 7b47aeee0..9162064ba 100644 --- a/src/x11/x11-shim.h +++ b/src/x11/x11-shim.h @@ -29,8 +29,6 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. /* x11base.c */ -extern struct xvisual * allocate_x_visual (Visual * visual); -extern void x_visual_deallocate (struct xvisual * xv); extern void x_close_display (struct xdisplay * xd); extern void x_close_all_displays (void); extern int x_window_set_input_hint (struct xwindow * xw, int input_hint); @@ -47,7 +45,6 @@ extern unsigned long x_modifier_mask_to_bucky_bits (unsigned int mask, extern struct xdisplay * x_open_display (char * display_name); extern void x_display_get_size (struct xdisplay * xd, long screen, int * results); -extern void x_close_window (struct xwindow * xw); extern int x_set_default_font (struct xdisplay * xd, const char * name); extern int x_display_descriptor (struct xdisplay * xd); extern long x_max_request_size (struct xdisplay * xd); @@ -126,7 +123,7 @@ extern int x_get_window_property (struct xdisplay * xd, extern int x_change_property (struct xdisplay * wd, Window window, Atom property, Atom type, int format, int mode, - char * data, unsigned long dlen); + unsigned char * data, unsigned long dlen); extern void x_delete_property (struct xdisplay * xd, Window window, Atom property); extern void x_set_selection_owner (struct xdisplay * xd, @@ -217,7 +214,7 @@ extern void x_graphics_fill_polygon (struct xwindow * xw, XPoint * points); extern struct ximage * x_create_image (struct xwindow * xw, uint width, uint height); -extern int x_bytes_into_image (char * vector, int length, +extern int x_bytes_into_image (unsigned char * vector, int length, struct ximage * ximage); extern long x_get_pixel_from_image (struct ximage * xi, int x, int y); extern int x_set_pixel_in_image (struct ximage * xi, @@ -269,7 +266,7 @@ extern int xterm_write_char (struct xwindow * xw, int c, unsigned int hl); extern int xterm_write_substring (struct xwindow * xw, unsigned int x, unsigned int y, - char * string, unsigned int start, + unsigned char * string, unsigned int start, unsigned int end, unsigned int hl); extern int xterm_clear_rectangle (struct xwindow * xw, unsigned int x_start, unsigned int x_end, diff --git a/src/x11/x11.cdecl b/src/x11/x11.cdecl index 1209092c7..4a644e06c 100644 --- a/src/x11/x11.cdecl +++ b/src/x11/x11.cdecl @@ -599,7 +599,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (type Atom) (format int) (mode int) - (data (* char)) + (data (* uchar)) (dlen ulong)) (extern void @@ -818,7 +818,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (extern int x_bytes_into_image - (vector (* char)) (length int) (ximage (* (struct ximage)))) + (vector (* uchar)) (length int) (ximage (* (struct ximage)))) (extern long x_get_pixel_from_image @@ -946,7 +946,9 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. xterm_write_substring (xw (* (struct xwindow))) (x uint) (y uint) - (string (* char)) (start uint) (end uint) + (string (* uchar)) + (start uint) + (end uint) (hl uint)) (extern int diff --git a/src/x11/x11base.c b/src/x11/x11base.c index e187a4147..08c905c8b 100644 --- a/src/x11/x11base.c +++ b/src/x11/x11base.c @@ -51,7 +51,6 @@ static const char * x_default_font = 0; static void initialize_once (void); -static void move_window (struct xwindow *, int, int); static void check_expected_move (struct xwindow *); /* Allocation Tables */ @@ -111,15 +110,6 @@ allocate_table_index (struct allocation_table * table, void * item) return (length); } -static void * -allocation_item (unsigned int num, struct allocation_table * table) -{ - void * item; - if ((num < 0) || (num >= table->length)) - return (NULL); - return ((table->items) [num]); -} - static struct xwindow * x_window_to_xw (Display * display, Window window) { @@ -1783,7 +1773,7 @@ x_get_window_property (struct xdisplay * xd, Window window, Atom property, int x_change_property (struct xdisplay * xd, Window window, Atom property, Atom type, int format, int mode, - char * data, unsigned long dlen) + unsigned char * data, unsigned long dlen) { Display * display = (XD_DISPLAY (xd)); diff --git a/src/x11/x11graph.c b/src/x11/x11graph.c index a250536ae..c6a5bb547 100644 --- a/src/x11/x11graph.c +++ b/src/x11/x11graph.c @@ -804,7 +804,7 @@ x_create_image (struct xwindow * xw, uint width, uint height) } int -x_bytes_into_image (char * vector, int length, struct ximage *ximage) +x_bytes_into_image (unsigned char * vector, int length, struct ximage *ximage) { XImage * image = (XI_IMAGE (ximage)); unsigned long width = (image -> width); @@ -813,11 +813,12 @@ x_bytes_into_image (char * vector, int length, struct ximage *ximage) unsigned long x; unsigned long y; if (length != (width * height)) - return (0); + return (1); vscan = vector; for (y = 0; (y < height); y += 1) for (x = 0; (x < width); x += 1) XPutPixel (image, x, y, ((unsigned long) (*vscan++))); + return (0); } long diff --git a/src/x11/x11term.c b/src/x11/x11term.c index c36a8ccba..aad7edd60 100644 --- a/src/x11/x11term.c +++ b/src/x11/x11term.c @@ -626,7 +626,8 @@ xterm_write_char (struct xwindow * xw, unsigned int x, unsigned int y, int xterm_write_substring (struct xwindow * xw, unsigned int x, unsigned int y, - char * string, unsigned int start, unsigned int end, + unsigned char * string, + unsigned int start, unsigned int end, unsigned int hl) { unsigned int length, index; @@ -807,6 +808,7 @@ xterm_scroll_lines_up (struct xwindow * xw, } } } + return (0); } static void @@ -872,6 +874,7 @@ xterm_scroll_lines_down (struct xwindow * xw, } } } + return (0); } int @@ -883,7 +886,6 @@ xterm_save_contents (struct xwindow * xw, char * contents) { unsigned int x_length; - unsigned int string_length; if (x_end >= ((XW_X_CSIZE (xw)) + 1)) return (1); @@ -894,7 +896,6 @@ xterm_save_contents (struct xwindow * xw, if (y_start >= (y_end + 1)) return (4); x_length = (x_end - x_start); - string_length = (2 * x_length * (y_end - y_start)); { char * string_scan = contents; @@ -912,6 +913,7 @@ xterm_save_contents (struct xwindow * xw, } } } + return (0); } int