diff options
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/web2c/window/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/window/trap.c | 30 | ||||
-rw-r--r-- | Build/source/texk/web2c/window/x11-Xlib.c | 31 | ||||
-rw-r--r-- | Build/source/texk/web2c/window/x11-Xt.c | 57 |
4 files changed, 80 insertions, 43 deletions
diff --git a/Build/source/texk/web2c/window/ChangeLog b/Build/source/texk/web2c/window/ChangeLog index f4cbc778bfc..8140985601c 100644 --- a/Build/source/texk/web2c/window/ChangeLog +++ b/Build/source/texk/web2c/window/ChangeLog @@ -1,3 +1,8 @@ +2009-06-12 Peter Breitenlohner <peb@mppmu.mpg.de> + + * Makefile.am (AM_CFLAGS): enable compiler warnings. + * trap.c, x11-Xlib.c, x11-Xt.c: use ANSI C prototypes. + 2008-02-29 Peter Breitenlohner <peb@mppmu.mpg.de> * x11-Xt.c: remove unused preprocessor stuff (FOIL...). diff --git a/Build/source/texk/web2c/window/trap.c b/Build/source/texk/web2c/window/trap.c index 45d7f833fec..79dda11cb3c 100644 --- a/Build/source/texk/web2c/window/trap.c +++ b/Build/source/texk/web2c/window/trap.c @@ -7,36 +7,46 @@ /* No #ifdef for the whole file, because we always want to support this. */ +boolean mf_trap_initscreen(void); +void mf_trap_updatescreen(void); +void mf_trap_blankrectangle(screencol left, + screencol right, + screenrow top, + screenrow bottom); +void mf_trap_paintrow(screenrow row, + pixelcolor init_color, + transspec transition_vector, + screencol vector_size); /* This returns true if we can do window operations, else false. */ boolean -mf_trap_initscreen P1H(void) +mf_trap_initscreen(void) { return 1; } void -mf_trap_updatescreen P1H(void) +mf_trap_updatescreen(void) { fputs ("Calling UPDATESCREEN\n", logfile); } void -mf_trap_blankrectangle P4C(screencol, left, - screencol, right, - screenrow, top, - screenrow, bottom) +mf_trap_blankrectangle(screencol left, + screencol right, + screenrow top, + screenrow bottom) { fprintf (logfile, "\nCalling BLANKRECTANGLE(%ld,%ld,%ld,%ld)\n", (long)left, (long)right, (long)top, (long)bottom); } void -mf_trap_paintrow P4C(screenrow, row, - pixelcolor, init_color, - transspec, transition_vector, - screencol, vector_size) +mf_trap_paintrow(screenrow row, + pixelcolor init_color, + transspec transition_vector, + screencol vector_size) { unsigned k; diff --git a/Build/source/texk/web2c/window/x11-Xlib.c b/Build/source/texk/web2c/window/x11-Xlib.c index 52612cbf840..1d7b9f93940 100644 --- a/Build/source/texk/web2c/window/x11-Xlib.c +++ b/Build/source/texk/web2c/window/x11-Xlib.c @@ -74,11 +74,22 @@ static XWMHints wm_hints = { #define DEFAULT_X_POSITION 0 #define DEFAULT_Y_POSITION 0 +int mf_x11_initscreen(void); +void mf_x11_updatescreen(void); +void mf_x11_blankrectangle(screencol left, + screencol right, + screenrow top, + screenrow bottom); +void mf_x11_paintrow(screenrow row, + pixelcolor init_color, + transspec transition_vector, + screencol vector_size); + /* Return 1 (i.e., true) if display opened successfully, else 0. */ int -mf_x11_initscreen() +mf_x11_initscreen(void) { char *geometry; int geometry_found = 0; @@ -224,7 +235,7 @@ mf_x11_initscreen() buffer) */ void -mf_x11_updatescreen() +mf_x11_updatescreen(void) { XFlush(my_display); } @@ -235,10 +246,10 @@ reset the foreground to black because we always set it at the beginning of paintrow (below). */ void -mf_x11_blankrectangle P4C(screencol, left, - screencol, right, - screenrow, top, - screenrow, bottom) +mf_x11_blankrectangle(screencol left, + screencol right, + screenrow top, + screenrow bottom) { XSetForeground(my_display, my_gc, white); XFillRectangle(my_display, my_window, my_gc, @@ -253,10 +264,10 @@ mf_x11_blankrectangle P4C(screencol, left, able to do something here with drawing many lines. */ void -mf_x11_paintrow P4C(screenrow, row, - pixelcolor, init_color, - transspec, tvect, - register screencol, vector_size) +mf_x11_paintrow(screenrow row, + pixelcolor init_color, + transspec tvect, + screencol vector_size) { register int color, col; diff --git a/Build/source/texk/web2c/window/x11-Xt.c b/Build/source/texk/web2c/window/x11-Xt.c index 00f9f0924c4..46c442e2828 100644 --- a/Build/source/texk/web2c/window/x11-Xt.c +++ b/Build/source/texk/web2c/window/x11-Xt.c @@ -78,16 +78,27 @@ static XrmOptionDescRec mf_optiondesclist[] { "-bg", "background", XrmoptionSepArg, (XPointer) NULL }, }; -static void mf_events (); -static void mf_mapstatus (); -static void mf_newpixmap P2H(unsigned int, unsigned int); -static void mf_redraw (); -static void mf_repaint (); +int mf_x11_initscreen(void); +void mf_x11_updatescreen(void); +void mf_x11_blankrectangle(screencol left, + screencol right, + screenrow top, + screenrow bottom); +void mf_x11_paintrow(screenrow row, + pixelcolor init_color, + transspec transition_vector, + screencol vector_size); + +static void mf_events(void); +static void mf_mapstatus(Widget w, XtPointer data, XEvent *ev); +static void mf_newpixmap(unsigned int width, unsigned int height); +static void mf_redraw(void); +static void mf_repaint(Widget w, XtPointer data, XEvent *ev); /* Return 1 if display opened successfully, else 0. */ int -mf_x11_initscreen () +mf_x11_initscreen (void) { XSetWindowAttributes xwa; Widget mf_toplevel; @@ -135,9 +146,9 @@ mf_x11_initscreen () mf_app = XtWidgetToApplicationContext (mf_canvas); XtAddEventHandler (mf_canvas, (Cardinal) ExposureMask, True, - mf_repaint, NULL); + (XtEventHandler) mf_repaint, NULL); XtAddEventHandler (mf_canvas, (Cardinal) StructureNotifyMask, True, - mf_mapstatus, NULL); + (XtEventHandler) mf_mapstatus, NULL); XtRealizeWidget (mf_toplevel); @@ -170,7 +181,7 @@ mf_x11_initscreen () } void -mf_x11_updatescreen () +mf_x11_updatescreen (void) { mf_events (); mf_redraw (); @@ -184,10 +195,10 @@ mf_x11_updatescreen () void -mf_x11_blankrectangle P4C(screencol, left, - screencol, right, - screenrow, top, - screenrow, bottom) +mf_x11_blankrectangle(screencol left, + screencol right, + screenrow top, + screenrow bottom) { XFillRectangle (mf_display, mf_pixmap, mf_egc, (int) left, (int) top, (int) (right - left + 1), (int) (bottom - top + 1)); @@ -195,10 +206,10 @@ mf_x11_blankrectangle P4C(screencol, left, } void -mf_x11_paintrow P4C(screenrow, row, - pixelcolor, init_color, - transspec, tvect, - register screencol, vector_size) +mf_x11_paintrow(screenrow row, + pixelcolor init_color, + transspec tvect, + screencol vector_size) { GC gc; int col; @@ -225,7 +236,7 @@ mf_x11_paintrow P4C(screenrow, row, #ifdef MF_XT_DEBUG static void -mf_checkextent P3C(int, x1, int, x2, int, y) +mf_checkextent(int x1, int x2, int y) { if (x1 < mf_min_x) mf_min_x = x1; @@ -245,7 +256,7 @@ mf_checkextent P3C(int, x1, int, x2, int, y) #endif /* MF_XT_DEBUG */ static void -mf_events () +mf_events (void) { XEvent event; @@ -260,7 +271,7 @@ mf_events () } static void -mf_newpixmap P2C(unsigned int, width, unsigned int, height) +mf_newpixmap(unsigned int width, unsigned int height) { XGCValues gcv; Pixmap newpixmap; @@ -310,7 +321,7 @@ mf_newpixmap P2C(unsigned int, width, unsigned int, height) } static void -mf_repaint P3C(Widget, w, XtPointer, data, XEvent*, ev) +mf_repaint(Widget w, XtPointer data, XEvent *ev) { if (!mf_mapped || !ev || ev->type != Expose) return; @@ -330,7 +341,7 @@ mf_repaint P3C(Widget, w, XtPointer, data, XEvent*, ev) static void -mf_mapstatus P3C(Widget, w, XtPointer, data, XEvent*, ev) +mf_mapstatus(Widget w, XtPointer data, XEvent *ev) { switch (ev->type) { @@ -351,7 +362,7 @@ mf_mapstatus P3C(Widget, w, XtPointer, data, XEvent*, ev) static void -mf_redraw () +mf_redraw (void) { XCopyPlane (mf_display, mf_pixmap, mf_window, mf_cgc, 0, 0, mf_x11_resources.mf_width, mf_x11_resources.mf_height, |