Mercurial > vim
comparison src/sound.c @ 19049:e47b04b01793 v8.2.0085
patch 8.2.0085: dead code in builtin functions
Commit: https://github.com/vim/vim/commit/3d8a513b46b586cb5d2893e7f28c5f51c4dfdc17
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 4 16:13:49 2020 +0100
patch 8.2.0085: dead code in builtin functions
Problem: Dead code in builtin functions.
Solution: Clean up the code.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 04 Jan 2020 16:15:03 +0100 |
parents | 5594967b38c5 |
children | 237dace53473 |
comparison
equal
deleted
inserted
replaced
19048:7b6a4712b11f | 19049:e47b04b01793 |
---|---|
349 void | 349 void |
350 f_sound_playevent(typval_T *argvars, typval_T *rettv) | 350 f_sound_playevent(typval_T *argvars, typval_T *rettv) |
351 { | 351 { |
352 WCHAR *wp; | 352 WCHAR *wp; |
353 | 353 |
354 rettv->v_type = VAR_NUMBER; | |
355 rettv->vval.v_number = 0; | |
356 | |
357 wp = enc_to_utf16(tv_get_string(&argvars[0]), NULL); | 354 wp = enc_to_utf16(tv_get_string(&argvars[0]), NULL); |
358 if (wp == NULL) | 355 if (wp == NULL) |
359 return; | 356 return; |
360 | 357 |
361 PlaySoundW(wp, NULL, SND_ASYNC | SND_ALIAS); | 358 PlaySoundW(wp, NULL, SND_ASYNC | SND_ALIAS); |
373 WCHAR *wp; | 370 WCHAR *wp; |
374 soundcb_T *soundcb; | 371 soundcb_T *soundcb; |
375 char buf[32]; | 372 char buf[32]; |
376 MCIERROR err; | 373 MCIERROR err; |
377 | 374 |
378 rettv->v_type = VAR_NUMBER; | |
379 rettv->vval.v_number = 0; | |
380 | |
381 esc = vim_strsave_shellescape(tv_get_string(&argvars[0]), FALSE, FALSE); | 375 esc = vim_strsave_shellescape(tv_get_string(&argvars[0]), FALSE, FALSE); |
382 | 376 |
383 len = STRLEN(esc) + 5 + 18 + 1; | 377 len = STRLEN(esc) + 5 + 18 + 1; |
384 p = alloc(len); | 378 p = alloc(len); |
385 if (p == NULL) | 379 if (p == NULL) |