Mercurial > vim
comparison src/if_xcmdsrv.c @ 7123:077ae8b63e15 v7.4.873
commit https://github.com/vim/vim/commit/b8603882b1679385b287f14c527fa61eee60a9dd
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 17 23:20:42 2015 +0200
patch 7.4.873
Problem: Compiler warning for unused variable. (Tony Mechelynck)
Solution: Remove the variable. Also fix int vs long_u mixup.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 17 Sep 2015 23:30:04 +0200 |
parents | fa95595fbc52 |
children | ad57f5b5bd6c |
comparison
equal
deleted
inserted
replaced
7122:1f3ee08cb422 | 7123:077ae8b63e15 |
---|---|
170 typedef int (*EndCond) __ARGS((void *)); | 170 typedef int (*EndCond) __ARGS((void *)); |
171 | 171 |
172 struct x_cmdqueue | 172 struct x_cmdqueue |
173 { | 173 { |
174 char_u *propInfo; | 174 char_u *propInfo; |
175 int len; | 175 long_u len; |
176 struct x_cmdqueue *next; | 176 struct x_cmdqueue *next; |
177 struct x_cmdqueue *prev; | 177 struct x_cmdqueue *prev; |
178 }; | 178 }; |
179 | 179 |
180 typedef struct x_cmdqueue x_queue_T; | 180 typedef struct x_cmdqueue x_queue_T; |
197 static void ServerWait __ARGS((Display *dpy, Window w, EndCond endCond, void *endData, int localLoop, int seconds)); | 197 static void ServerWait __ARGS((Display *dpy, Window w, EndCond endCond, void *endData, int localLoop, int seconds)); |
198 static struct ServerReply *ServerReplyFind __ARGS((Window w, enum ServerReplyOp op)); | 198 static struct ServerReply *ServerReplyFind __ARGS((Window w, enum ServerReplyOp op)); |
199 static int AppendPropCarefully __ARGS((Display *display, Window window, Atom property, char_u *value, int length)); | 199 static int AppendPropCarefully __ARGS((Display *display, Window window, Atom property, char_u *value, int length)); |
200 static int x_error_check __ARGS((Display *dpy, XErrorEvent *error_event)); | 200 static int x_error_check __ARGS((Display *dpy, XErrorEvent *error_event)); |
201 static int IsSerialName __ARGS((char_u *name)); | 201 static int IsSerialName __ARGS((char_u *name)); |
202 static void save_in_queue __ARGS((char_u *buf, int len)); | 202 static void save_in_queue __ARGS((char_u *buf, long_u len)); |
203 static void server_parse_message __ARGS((Display *dpy, char_u *propInfo, int numItems)); | 203 static void server_parse_message __ARGS((Display *dpy, char_u *propInfo, long_u numItems)); |
204 | 204 |
205 /* Private variables for the "server" functionality */ | 205 /* Private variables for the "server" functionality */ |
206 static Atom registryProperty = None; | 206 static Atom registryProperty = None; |
207 static Atom vimProperty = None; | 207 static Atom vimProperty = None; |
208 static int got_x_error = FALSE; | 208 static int got_x_error = FALSE; |
1196 * Saves x clientserver commands in a queue so that they can be called when | 1196 * Saves x clientserver commands in a queue so that they can be called when |
1197 * vim is idle. | 1197 * vim is idle. |
1198 */ | 1198 */ |
1199 static void | 1199 static void |
1200 save_in_queue(propInfo, len) | 1200 save_in_queue(propInfo, len) |
1201 char_u *propInfo; | 1201 char_u *propInfo; |
1202 int len; | 1202 long_u len; |
1203 { | 1203 { |
1204 x_queue_T *node; | 1204 x_queue_T *node; |
1205 | 1205 |
1206 node = (x_queue_T *)alloc(sizeof(x_queue_T)); | 1206 node = (x_queue_T *)alloc(sizeof(x_queue_T)); |
1207 if (node == NULL) | 1207 if (node == NULL) |
1226 * Parses queued clientserver messages. | 1226 * Parses queued clientserver messages. |
1227 */ | 1227 */ |
1228 void | 1228 void |
1229 server_parse_messages() | 1229 server_parse_messages() |
1230 { | 1230 { |
1231 char_u *p; | |
1232 x_queue_T *node; | 1231 x_queue_T *node; |
1233 | 1232 |
1234 if (!X_DISPLAY) | 1233 if (!X_DISPLAY) |
1235 return; /* cannot happen? */ | 1234 return; /* cannot happen? */ |
1236 while (head.next != NULL && head.next != &head) | 1235 while (head.next != NULL && head.next != &head) |
1260 */ | 1259 */ |
1261 static void | 1260 static void |
1262 server_parse_message(dpy, propInfo, numItems) | 1261 server_parse_message(dpy, propInfo, numItems) |
1263 Display *dpy; | 1262 Display *dpy; |
1264 char_u *propInfo; /* A string containing 0 or more X commands */ | 1263 char_u *propInfo; /* A string containing 0 or more X commands */ |
1265 int numItems; /* The size of propInfo in bytes. */ | 1264 long_u numItems; /* The size of propInfo in bytes. */ |
1266 { | 1265 { |
1267 char_u *p; | 1266 char_u *p; |
1268 int code; | 1267 int code; |
1269 char_u *tofree; | 1268 char_u *tofree; |
1270 | 1269 |