Mercurial > vim
comparison src/gui_x11.c @ 11770:0aa1910a3dfa v8.0.0767
patch 8.0.0767: build failure with Athena and Motif
commit https://github.com/vim/vim/commit/d60547bf80881f6c99bcbd7c8c4c6cfb7e405a90
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jul 24 20:15:30 2017 +0200
patch 8.0.0767: build failure with Athena and Motif
Problem: Build failure with Athena and Motif.
Solution: Move local variable delcarations. (Kazunobu Kuriyama)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 24 Jul 2017 20:30:06 +0200 |
parents | 5a5709918a98 |
children | 519e4e6bbc28 |
comparison
equal
deleted
inserted
replaced
11769:970948345309 | 11770:0aa1910a3dfa |
---|---|
2268 */ | 2268 */ |
2269 guicolor_T | 2269 guicolor_T |
2270 gui_mch_get_color(char_u *name) | 2270 gui_mch_get_color(char_u *name) |
2271 { | 2271 { |
2272 guicolor_T requested; | 2272 guicolor_T requested; |
2273 XColor available; | |
2274 Colormap colormap; | |
2275 | 2273 |
2276 /* can't do this when GUI not running */ | 2274 /* can't do this when GUI not running */ |
2277 if (!gui.in_use || name == NULL || *name == NUL) | 2275 if (!gui.in_use || name == NULL || *name == NUL) |
2278 return INVALCOLOR; | 2276 return INVALCOLOR; |
2279 | 2277 |
2293 */ | 2291 */ |
2294 guicolor_T | 2292 guicolor_T |
2295 gui_mch_get_rgb_color(int r, int g, int b) | 2293 gui_mch_get_rgb_color(int r, int g, int b) |
2296 { | 2294 { |
2297 char spec[8]; /* space enough to hold "#RRGGBB" */ | 2295 char spec[8]; /* space enough to hold "#RRGGBB" */ |
2296 XColor available; | |
2297 Colormap colormap; | |
2298 | 2298 |
2299 vim_snprintf(spec, sizeof(spec), "#%.2x%.2x%.2x", r, g, b); | 2299 vim_snprintf(spec, sizeof(spec), "#%.2x%.2x%.2x", r, g, b); |
2300 colormap = DefaultColormap(gui.dpy, DefaultScreen(gui.dpy)); | 2300 colormap = DefaultColormap(gui.dpy, DefaultScreen(gui.dpy)); |
2301 if (XParseColor(gui.dpy, colormap, (char *)spec, &available) != 0 | 2301 if (XParseColor(gui.dpy, colormap, (char *)spec, &available) != 0 |
2302 && XAllocColor(gui.dpy, colormap, &available) != 0) | 2302 && XAllocColor(gui.dpy, colormap, &available) != 0) |