X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fballoon_help.c;h=5001c7d9f8543752208b21e394d0cb5716f9ffd9;hb=7809a0afe735c5f3e27be40be2978c16d6ff3a1d;hp=8efbbeb5691bde5d3840ff3d15d27a8886e1d4b5;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git.1 diff --git a/src/balloon_help.c b/src/balloon_help.c index 8efbbeb..5001c7d 100644 --- a/src/balloon_help.c +++ b/src/balloon_help.c @@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA. */ #include #include #include +#include #include #include @@ -43,7 +44,7 @@ Boston, MA 02111-1307, USA. */ #include "balloon_help.h" -#ifndef WINDOWSNT +#ifndef max #define max(x,y) (x>y?x:y) #endif @@ -82,7 +83,7 @@ static Pixmap b_mask; static int b_maskWidth, b_maskHeight; static GC b_maskGC; -static CONST char* b_text; +static const char* b_text; static int b_width, b_height; static XtIntervalId b_timer; @@ -213,7 +214,7 @@ grow_pixmap_mask (int width, int height) ============================================================================*/ static void -text_extent (XFontStruct* fontStruct, CONST char* text, int len, +text_extent (XFontStruct* fontStruct, const char* text, int len, int* width, int* height) { XCharStruct extent; @@ -226,13 +227,13 @@ text_extent (XFontStruct* fontStruct, CONST char* text, int len, } static void -get_text_size (Display* dpy, XFontStruct* fontStruct, CONST char* text, +get_text_size (Display* dpy, XFontStruct* fontStruct, const char* text, int* max_width, int* max_height) { int width; int height; - CONST char* start; - CONST char* end; + const char* start; + const char* end; *max_width = *max_height = 0; @@ -256,10 +257,10 @@ get_text_size (Display* dpy, XFontStruct* fontStruct, CONST char* text, static void draw_text (Display* dpy, Window win, GC gc, XFontStruct* fontStruct, - int x, int y, CONST char* text) + int x, int y, const char* text) { - CONST char* start; - CONST char* end; + const char* start; + const char* end; int font_height; y += fontStruct->ascent; @@ -537,7 +538,7 @@ balloon_help_set_delay (unsigned long milliseconds) } void -balloon_help_show (CONST char* text) +balloon_help_show (const char* text) { assert (b_dpy != NULL);