To: vim_dev@googlegroups.com Subject: Patch 8.2.4945 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4945 Problem: Inconsistent use of white space. Solution: Use Tabs and Spaces consistently. Files: src/os_amiga.c, src/if_py_both.h, src/os_win32.c, src/os_mswin.c, src/os_vms.c, src/os_vms_conf.h *** ../vim-8.2.4944/src/os_amiga.c 2022-02-13 12:13:13.606245312 +0000 --- src/os_amiga.c 2022-05-09 19:12:32.920125277 +0100 *************** *** 677,684 **** if (pwd != NULL && pwd->pw_name && len > 0) { ! vim_strncpy(s, (char_u *)pwd->pw_name, len - 1); ! return OK; } #endif *s = NUL; --- 677,684 ---- if (pwd != NULL && pwd->pw_name && len > 0) { ! vim_strncpy(s, (char_u *)pwd->pw_name, len - 1); ! return OK; } #endif *s = NUL; *************** *** 897,913 **** BPTR seg = LoadSeg(name); if (seg && GetSegListInfoTags(seg, GSLI_Native, NULL, TAG_DONE) != ! GetSegListInfoTags(seg, GSLI_68KHUNK, NULL, TAG_DONE)) { ! // Test if file permissions allow execution. ! struct ExamineData *exd = ExamineObjectTags(EX_StringNameInput, name); ! exe = (exd && !(exd->Protection & EXDF_NO_EXECUTE)) ? 1 : 0; ! FreeDosObject(DOS_EXAMINEDATA, exd); } else { ! exe = 0; } UnLoadSeg(seg); --- 897,913 ---- BPTR seg = LoadSeg(name); if (seg && GetSegListInfoTags(seg, GSLI_Native, NULL, TAG_DONE) != ! GetSegListInfoTags(seg, GSLI_68KHUNK, NULL, TAG_DONE)) { ! // Test if file permissions allow execution. ! struct ExamineData *exd = ExamineObjectTags(EX_StringNameInput, name); ! exe = (exd && !(exd->Protection & EXDF_NO_EXECUTE)) ? 1 : 0; ! FreeDosObject(DOS_EXAMINEDATA, exd); } else { ! exe = 0; } UnLoadSeg(seg); *************** *** 915,935 **** // Search for executable in path if applicable. if (!exe && use_path) { ! // Save current working dir. ! BPTR cwd = GetCurrentDir(); ! struct PathNode *head = DupCmdPathList(NULL); ! ! // For each entry, recur to check for executable. ! for(struct PathNode *tail = head; !exe && tail; ! tail = (struct PathNode *) BADDR(tail->pn_Next)) ! { ! SetCurrentDir(tail->pn_Lock); ! exe = mch_can_exe(name, path, 0); ! } ! ! // Go back to where we were. ! FreeCmdPathList(head); ! SetCurrentDir(cwd); } #endif return exe; --- 915,935 ---- // Search for executable in path if applicable. if (!exe && use_path) { ! // Save current working dir. ! BPTR cwd = GetCurrentDir(); ! struct PathNode *head = DupCmdPathList(NULL); ! ! // For each entry, recur to check for executable. ! for(struct PathNode *tail = head; !exe && tail; ! tail = (struct PathNode *) BADDR(tail->pn_Next)) ! { ! SetCurrentDir(tail->pn_Lock); ! exe = mch_can_exe(name, path, 0); ! } ! ! // Go back to where we were. ! FreeCmdPathList(head); ! SetCurrentDir(cwd); } #endif return exe; *************** *** 1052,1089 **** mch_get_shellsize(void) { if (!term_console) ! return FAIL; if (raw_in && raw_out) { ! // Save current console mode. ! int old_tmode = cur_tmode; ! char ctrl[] = "\x9b""0 q"; ! ! // Set RAW mode. ! mch_settmode(TMODE_RAW); ! ! // Write control sequence to console. ! if (Write(raw_out, ctrl, sizeof(ctrl)) == sizeof(ctrl)) ! { ! char scan[] = "\x9b""1;1;%d;%d r", ! answ[sizeof(scan) + 8] = { '\0' }; ! ! // Read return sequence from input. ! if (Read(raw_in, answ, sizeof(answ) - 1) > 0) ! { ! // Parse result and set Vim globals. ! if (sscanf(answ, scan, &Rows, &Columns) == 2) ! { ! // Restore console mode. ! mch_settmode(old_tmode); ! return OK; ! } ! } ! } ! // Restore console mode. ! mch_settmode(old_tmode); } // I/O error. Default size fallback. --- 1052,1089 ---- mch_get_shellsize(void) { if (!term_console) ! return FAIL; if (raw_in && raw_out) { ! // Save current console mode. ! int old_tmode = cur_tmode; ! char ctrl[] = "\x9b""0 q"; ! ! // Set RAW mode. ! mch_settmode(TMODE_RAW); ! ! // Write control sequence to console. ! if (Write(raw_out, ctrl, sizeof(ctrl)) == sizeof(ctrl)) ! { ! char scan[] = "\x9b""1;1;%d;%d r", ! answ[sizeof(scan) + 8] = { '\0' }; ! ! // Read return sequence from input. ! if (Read(raw_in, answ, sizeof(answ) - 1) > 0) ! { ! // Parse result and set Vim globals. ! if (sscanf(answ, scan, &Rows, &Columns) == 2) ! { ! // Restore console mode. ! mch_settmode(old_tmode); ! return OK; ! } ! } ! } ! // Restore console mode. ! mch_settmode(old_tmode); } // I/O error. Default size fallback. *** ../vim-8.2.4944/src/if_py_both.h 2022-03-27 20:04:16.025188554 +0100 --- src/if_py_both.h 2022-05-09 19:16:16.408057158 +0100 *************** *** 6954,6960 **** { // find_module() is deprecated, this may stop working in some later // version. ! ADD_OBJECT(m, "_find_module", py_find_module); } Py_DECREF(imp); --- 6954,6960 ---- { // find_module() is deprecated, this may stop working in some later // version. ! ADD_OBJECT(m, "_find_module", py_find_module); } Py_DECREF(imp); *** ../vim-8.2.4944/src/os_win32.c 2022-05-07 20:01:10.062731687 +0100 --- src/os_win32.c 2022-05-09 19:13:36.432108489 +0100 *************** *** 1200,1207 **** static int g_nMouseClick = -1; // mouse status static int g_xMouse; // mouse x coordinate static int g_yMouse; // mouse y coordinate ! static DWORD g_cmodein = 0; // Original console input mode ! static DWORD g_cmodeout = 0; // Original console output mode /* * Enable or disable mouse input --- 1200,1207 ---- static int g_nMouseClick = -1; // mouse status static int g_xMouse; // mouse x coordinate static int g_yMouse; // mouse y coordinate ! static DWORD g_cmodein = 0; // Original console input mode ! static DWORD g_cmodeout = 0; // Original console output mode /* * Enable or disable mouse input *************** *** 1925,1931 **** // to get and still room in the buffer (up to two bytes for a char and // three bytes for a modifier). while ((typeaheadlen == 0 || WaitForChar(0L, FALSE)) ! && typeaheadlen + 5 + TYPEAHEADSPACE <= TYPEAHEADLEN) { if (typebuf_changed(tb_change_cnt)) { --- 1925,1931 ---- // to get and still room in the buffer (up to two bytes for a char and // three bytes for a modifier). while ((typeaheadlen == 0 || WaitForChar(0L, FALSE)) ! && typeaheadlen + 5 + TYPEAHEADSPACE <= TYPEAHEADLEN) { if (typebuf_changed(tb_change_cnt)) { *************** *** 6615,6621 **** p = sp; // If restoreFG and FG are connected, the restoreFG can be ! // omitted. if (sgrn2((sp = sgrnc(p, 39)), 38)) p = sp; --- 6615,6621 ---- p = sp; // If restoreFG and FG are connected, the restoreFG can be ! // omitted. if (sgrn2((sp = sgrnc(p, 39)), 38)) p = sp; *************** *** 7337,7346 **** typedef NTSTATUS (NTAPI *PfnNtClose)( HANDLE Handle); typedef NTSTATUS (NTAPI *PfnNtSetEaFile)( ! HANDLE FileHandle, ! PIO_STATUS_BLOCK IoStatusBlock, ! PVOID Buffer, ! ULONG Length); typedef NTSTATUS (NTAPI *PfnNtQueryEaFile)( HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, --- 7337,7346 ---- typedef NTSTATUS (NTAPI *PfnNtClose)( HANDLE Handle); typedef NTSTATUS (NTAPI *PfnNtSetEaFile)( ! HANDLE FileHandle, ! PIO_STATUS_BLOCK IoStatusBlock, ! PVOID Buffer, ! ULONG Length); typedef NTSTATUS (NTAPI *PfnNtQueryEaFile)( HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, *************** *** 7352,7361 **** PULONG EaIndex, BOOLEAN RestartScan); typedef NTSTATUS (NTAPI *PfnNtQueryInformationFile)( ! HANDLE FileHandle, ! PIO_STATUS_BLOCK IoStatusBlock, ! PVOID FileInformation, ! ULONG Length, FILE_INFORMATION_CLASS FileInformationClass); typedef VOID (NTAPI *PfnRtlInitUnicodeString)( PUNICODE_STRING DestinationString, --- 7352,7361 ---- PULONG EaIndex, BOOLEAN RestartScan); typedef NTSTATUS (NTAPI *PfnNtQueryInformationFile)( ! HANDLE FileHandle, ! PIO_STATUS_BLOCK IoStatusBlock, ! PVOID FileInformation, ! ULONG Length, FILE_INFORMATION_CLASS FileInformationClass); typedef VOID (NTAPI *PfnRtlInitUnicodeString)( PUNICODE_STRING DestinationString, *** ../vim-8.2.4944/src/os_mswin.c 2022-05-05 20:18:12.404138485 +0100 --- src/os_mswin.c 2022-05-09 19:12:45.796122062 +0100 *************** *** 515,527 **** char_u * resolve_appexeclink(char_u *fname) { ! DWORD attr = 0; ! int idx; ! WCHAR *p, *end, *wname; // The buffer size is arbitrarily chosen to be "big enough" (TM), the // ceiling should be around 16k. ! char_u buf[4096]; ! DWORD buf_len = sizeof(buf); REPARSE_DATA_BUFFER *rb = (REPARSE_DATA_BUFFER *)buf; wname = enc_to_utf16(fname, NULL); --- 515,527 ---- char_u * resolve_appexeclink(char_u *fname) { ! DWORD attr = 0; ! int idx; ! WCHAR *p, *end, *wname; // The buffer size is arbitrarily chosen to be "big enough" (TM), the // ceiling should be around 16k. ! char_u buf[4096]; ! DWORD buf_len = sizeof(buf); REPARSE_DATA_BUFFER *rb = (REPARSE_DATA_BUFFER *)buf; wname = enc_to_utf16(fname, NULL); *** ../vim-8.2.4944/src/os_vms.c 2021-01-04 09:47:21.698153964 +0000 --- src/os_vms.c 2022-05-09 19:13:02.888117635 +0100 *************** *** 672,678 **** else if (strchr(instring,'"') == NULL) // password in the path? { // Seems it is a regular file, let guess that it is pure Unix fspec ! if ( (strchr(instring,'[') == NULL) && (strchr(instring,'<') == NULL) && (strchr(instring,']') == NULL) && (strchr(instring,'>') == NULL) && (strchr(instring,':') == NULL) ) { --- 672,678 ---- else if (strchr(instring,'"') == NULL) // password in the path? { // Seems it is a regular file, let guess that it is pure Unix fspec ! if ( (strchr(instring,'[') == NULL) && (strchr(instring,'<') == NULL) && (strchr(instring,']') == NULL) && (strchr(instring,'>') == NULL) && (strchr(instring,':') == NULL) ) { *** ../vim-8.2.4944/src/os_vms_conf.h 2021-01-04 09:47:21.694153978 +0000 --- src/os_vms_conf.h 2022-05-09 19:16:58.848041711 +0100 *************** *** 208,214 **** // GUI support defines #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) ! #define X_INCLUDE_GRP_H // To use getgrgid #define XUSE_MTSAFE_API #define HAVE_X11 #define WANT_X11 --- 208,214 ---- // GUI support defines #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) ! #define X_INCLUDE_GRP_H // To use getgrgid #define XUSE_MTSAFE_API #define HAVE_X11 #define WANT_X11 *** ../vim-8.2.4944/src/version.c 2022-05-12 18:45:14.782530647 +0100 --- src/version.c 2022-05-12 20:34:58.475655551 +0100 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4945, /**/ -- hundred-and-one symptoms of being an internet addict: 180. You maintain more than six e-mail addresses. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///