diff options
author | mita <mita@FreeBSD.org> | 2004-08-31 15:48:18 +0800 |
---|---|---|
committer | mita <mita@FreeBSD.org> | 2004-08-31 15:48:18 +0800 |
commit | 9614f6d9a10737e8e65c0be21c28da91c3ae5755 (patch) | |
tree | 4a149b01752dcdfcc6759a82ebfc8e9dbd071724 | |
parent | 990d90c8bd27900ff80c588a37c95a4c7bae7c25 (diff) | |
download | freebsd-ports-gnome-9614f6d9a10737e8e65c0be21c28da91c3ae5755.tar.gz freebsd-ports-gnome-9614f6d9a10737e8e65c0be21c28da91c3ae5755.tar.zst freebsd-ports-gnome-9614f6d9a10737e8e65c0be21c28da91c3ae5755.zip |
Make magicpoint compatible with latest version of GCC (3.4.2).
Incompatibility was pointed out by Mr. Kennaway.
# By the way, I'm back to FreeBSD after long scilence.
-rw-r--r-- | misc/magicpoint/files/patch-mng.c | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/misc/magicpoint/files/patch-mng.c b/misc/magicpoint/files/patch-mng.c new file mode 100644 index 000000000000..8c0b020102e9 --- /dev/null +++ b/misc/magicpoint/files/patch-mng.c @@ -0,0 +1,77 @@ +--- mng.c.orig Tue Aug 31 06:03:07 2004 ++++ mng.c Tue Aug 31 06:06:28 2004 +@@ -252,6 +252,37 @@ + /* not implemented yet */ + } + ++void ++mng_window_setup(mymng, x, y, width, height) ++ mngstuff *mymng; ++ int x, y; ++ int width, height; ++{ ++ Visual *get_visual(); ++ ++ if (!mngdisplay){ ++ if ((mngdisplay = XOpenDisplay(NULL)) == NULL) { ++ fprintf(stderr, "Can't open display\n"); ++ exit(-1); ++ } ++ mngscreen = DefaultScreen(mngdisplay); ++ mngvisual = get_visual(mngdisplay, mngscreen, &depth); ++ } ++ ++ mymng->window = XCreateSimpleWindow(mngdisplay, ++ window, ++ 0, 0, ++ width, height, 0, ++ WhitePixel(display, 0), WhitePixel(display, 0)); ++ ++ XMoveWindow(mngdisplay, mymng->window, x, y); ++ XMapRaised(mngdisplay, mymng->window); ++ XFlush(mngdisplay); ++ ++ if (!gcmng) ++ gcmng = XCreateGC(mngdisplay, mymng->window, 0, 0); ++} ++ + void + mngload(mngfile, x, y, width, height) + char *mngfile; +@@ -317,36 +348,6 @@ + } + } + +-void +-mng_window_setup(mymng, x, y, width, height) +- mngstuff *mymng; +- int x, y; +- int width, height; +-{ +- Visual *get_visual(); +- +- if (!mngdisplay){ +- if ((mngdisplay = XOpenDisplay(NULL)) == NULL) { +- fprintf(stderr, "Can't open display\n"); +- exit(-1); +- } +- mngscreen = DefaultScreen(mngdisplay); +- mngvisual = get_visual(mngdisplay, mngscreen, &depth); +- } +- +- mymng->window = XCreateSimpleWindow(mngdisplay, +- window, +- 0, 0, +- width, height, 0, +- WhitePixel(display, 0), WhitePixel(display, 0)); +- +- XMoveWindow(mngdisplay, mymng->window, x, y); +- XMapRaised(mngdisplay, mymng->window); +- XFlush(mngdisplay); +- +- if (!gcmng) +- gcmng = XCreateGC(mngdisplay, mymng->window, 0, 0); +-} + + void + mngpreload(state, mngfile, width, height) |