comparison src/os_unix.c @ 13244:ac42c4b11dbc v8.0.1496

patch 8.0.1496: clearing a pointer takes two lines commit https://github.com/vim/vim/commit/d23a823669d93fb2a570a039173eefe4856ac806 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 10 18:45:26 2018 +0100 patch 8.0.1496: clearing a pointer takes two lines Problem: Clearing a pointer takes two lines. Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi, closes #2629)
author Christian Brabandt <cb@256bit.org>
date Sat, 10 Feb 2018 19:00:07 +0100
parents 1bdc12630fc0
children 0bc67f4e2947
comparison
equal deleted inserted replaced
13243:899b19739188 13244:ac42c4b11dbc
369 #if defined(ECHOE) && defined(ICANON) && (defined(HAVE_TERMIO_H) || defined(HAVE_TERMIOS_H)) && !defined(__NeXT__) 369 #if defined(ECHOE) && defined(ICANON) && (defined(HAVE_TERMIO_H) || defined(HAVE_TERMIOS_H)) && !defined(__NeXT__)
370 # define NEW_TTY_SYSTEM 370 # define NEW_TTY_SYSTEM
371 #endif 371 #endif
372 372
373 /* 373 /*
374 * Write s[len] to the screen. 374 * Write s[len] to the screen (stdout).
375 */ 375 */
376 void 376 void
377 mch_write(char_u *s, int len) 377 mch_write(char_u *s, int len)
378 { 378 {
379 ignored = (int)write(1, (char *)s, len); 379 ignored = (int)write(1, (char *)s, len);
1309 1309
1310 # ifdef FEAT_TITLE 1310 # ifdef FEAT_TITLE
1311 /* 1311 /*
1312 * Set oldtitle to NULL, so the current title is obtained again. 1312 * Set oldtitle to NULL, so the current title is obtained again.
1313 */ 1313 */
1314 vim_free(oldtitle); 1314 VIM_CLEAR(oldtitle);
1315 oldtitle = NULL;
1316 # endif 1315 # endif
1317 settmode(TMODE_RAW); 1316 settmode(TMODE_RAW);
1318 need_check_timestamps = TRUE; 1317 need_check_timestamps = TRUE;
1319 did_check_timestamps = FALSE; 1318 did_check_timestamps = FALSE;
1320 #else 1319 #else
3259 # endif 3258 # endif
3260 ) 3259 )
3261 XCloseDisplay(x11_display); 3260 XCloseDisplay(x11_display);
3262 # endif 3261 # endif
3263 # if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK) 3262 # if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
3264 vim_free(signal_stack); 3263 VIM_CLEAR(signal_stack);
3265 signal_stack = NULL;
3266 # endif 3264 # endif
3267 # ifdef FEAT_TITLE 3265 # ifdef FEAT_TITLE
3268 vim_free(oldtitle); 3266 vim_free(oldtitle);
3269 vim_free(oldicon); 3267 vim_free(oldicon);
3270 # endif 3268 # endif
6763 vim_free(buffer); 6761 vim_free(buffer);
6764 *num_file = j; 6762 *num_file = j;
6765 6763
6766 if (*num_file == 0) /* rejected all entries */ 6764 if (*num_file == 0) /* rejected all entries */
6767 { 6765 {
6768 vim_free(*file); 6766 VIM_CLEAR(*file);
6769 *file = NULL;
6770 goto notfound; 6767 goto notfound;
6771 } 6768 }
6772 6769
6773 return OK; 6770 return OK;
6774 6771