Mercurial > vim
comparison src/ex_cmds2.c @ 18051:d1e77015f60b v8.1.2021
patch 8.1.2021: some global functions can be local to the file
Commit: https://github.com/vim/vim/commit/840d16fd36bfd1a9fac8200e3dc016b1e3f9c328
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 10 21:27:18 2019 +0200
patch 8.1.2021: some global functions can be local to the file
Problem: Some global functions can be local to the file.
Solution: Add "static". (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/4917)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 10 Sep 2019 21:30:06 +0200 |
parents | 5c8906f653f5 |
children | 8f05b3cf8557 |
comparison
equal
deleted
inserted
replaced
18050:dd9de94583a5 | 18051:d1e77015f60b |
---|---|
258 } | 258 } |
259 | 259 |
260 /* | 260 /* |
261 * Find a timer by ID. Returns NULL if not found; | 261 * Find a timer by ID. Returns NULL if not found; |
262 */ | 262 */ |
263 timer_T * | 263 static timer_T * |
264 find_timer(long id) | 264 find_timer(long id) |
265 { | 265 { |
266 timer_T *timer; | 266 timer_T *timer; |
267 | 267 |
268 if (id >= 0) | 268 if (id >= 0) |
289 remove_timer(timer); | 289 remove_timer(timer); |
290 free_timer(timer); | 290 free_timer(timer); |
291 } | 291 } |
292 } | 292 } |
293 | 293 |
294 void | 294 static void |
295 stop_all_timers(void) | 295 stop_all_timers(void) |
296 { | 296 { |
297 timer_T *timer; | 297 timer_T *timer; |
298 timer_T *timer_next; | 298 timer_T *timer_next; |
299 | 299 |
302 timer_next = timer->tr_next; | 302 timer_next = timer->tr_next; |
303 stop_timer(timer); | 303 stop_timer(timer); |
304 } | 304 } |
305 } | 305 } |
306 | 306 |
307 void | 307 static void |
308 add_timer_info(typval_T *rettv, timer_T *timer) | 308 add_timer_info(typval_T *rettv, timer_T *timer) |
309 { | 309 { |
310 list_T *list = rettv->vval.v_list; | 310 list_T *list = rettv->vval.v_list; |
311 dict_T *dict = dict_alloc(); | 311 dict_T *dict = dict_alloc(); |
312 dictitem_T *di; | 312 dictitem_T *di; |
336 else | 336 else |
337 put_callback(&timer->tr_callback, &di->di_tv); | 337 put_callback(&timer->tr_callback, &di->di_tv); |
338 } | 338 } |
339 } | 339 } |
340 | 340 |
341 void | 341 static void |
342 add_timer_info_all(typval_T *rettv) | 342 add_timer_info_all(typval_T *rettv) |
343 { | 343 { |
344 timer_T *timer; | 344 timer_T *timer; |
345 | 345 |
346 for (timer = first_timer; timer != NULL; timer = timer->tr_next) | 346 for (timer = first_timer; timer != NULL; timer = timer->tr_next) |