diff options
| author | Kenichi Handa | 2010-10-15 09:43:23 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-10-15 09:43:23 +0900 |
| commit | e6673d01cab4b7a380367749e8401e66f14b5cd7 (patch) | |
| tree | f877128a1b0d883560773e3c663f4a3df71a3ead /src | |
| parent | c4186f9c7721ae00452f8378bb7d6be375881c62 (diff) | |
| parent | 9d4f32e88a1b642070f0adb41df04a0846c31970 (diff) | |
| download | emacs-e6673d01cab4b7a380367749e8401e66f14b5cd7.tar.gz emacs-e6673d01cab4b7a380367749e8401e66f14b5cd7.zip | |
merge emacs-23
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32.c | 290 | ||||
| -rw-r--r-- | src/w32console.c | 28 | ||||
| -rw-r--r-- | src/w32fns.c | 7 | ||||
| -rw-r--r-- | src/w32font.c | 18 | ||||
| -rw-r--r-- | src/w32heap.c | 2 | ||||
| -rw-r--r-- | src/w32inevt.c | 4 | ||||
| -rw-r--r-- | src/w32menu.c | 21 | ||||
| -rw-r--r-- | src/w32proc.c | 37 | ||||
| -rw-r--r-- | src/w32select.c | 38 | ||||
| -rw-r--r-- | src/w32term.c | 32 | ||||
| -rw-r--r-- | src/w32uniscribe.c | 15 | ||||
| -rw-r--r-- | src/w32xfns.c | 5 |
12 files changed, 248 insertions, 249 deletions
| @@ -315,8 +315,8 @@ is_windows_9x () | |||
| 315 | if (g_b_init_is_windows_9x == 0) | 315 | if (g_b_init_is_windows_9x == 0) |
| 316 | { | 316 | { |
| 317 | g_b_init_is_windows_9x = 1; | 317 | g_b_init_is_windows_9x = 1; |
| 318 | ZeroMemory(&os_ver, sizeof(OSVERSIONINFO)); | 318 | ZeroMemory (&os_ver, sizeof (OSVERSIONINFO)); |
| 319 | os_ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); | 319 | os_ver.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); |
| 320 | if (GetVersionEx (&os_ver)) | 320 | if (GetVersionEx (&os_ver)) |
| 321 | { | 321 | { |
| 322 | s_b_ret = (os_ver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS); | 322 | s_b_ret = (os_ver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS); |
| @@ -334,7 +334,7 @@ w32_get_internal_run_time () | |||
| 334 | if (get_process_times_fn) | 334 | if (get_process_times_fn) |
| 335 | { | 335 | { |
| 336 | FILETIME create, exit, kernel, user; | 336 | FILETIME create, exit, kernel, user; |
| 337 | HANDLE proc = GetCurrentProcess(); | 337 | HANDLE proc = GetCurrentProcess (); |
| 338 | if ((*get_process_times_fn) (proc, &create, &exit, &kernel, &user)) | 338 | if ((*get_process_times_fn) (proc, &create, &exit, &kernel, &user)) |
| 339 | { | 339 | { |
| 340 | LARGE_INTEGER user_int, kernel_int, total; | 340 | LARGE_INTEGER user_int, kernel_int, total; |
| @@ -367,10 +367,10 @@ w32_get_internal_run_time () | |||
| 367 | 367 | ||
| 368 | /* ** The wrapper functions ** */ | 368 | /* ** The wrapper functions ** */ |
| 369 | 369 | ||
| 370 | BOOL WINAPI open_process_token ( | 370 | BOOL WINAPI |
| 371 | HANDLE ProcessHandle, | 371 | open_process_token (HANDLE ProcessHandle, |
| 372 | DWORD DesiredAccess, | 372 | DWORD DesiredAccess, |
| 373 | PHANDLE TokenHandle) | 373 | PHANDLE TokenHandle) |
| 374 | { | 374 | { |
| 375 | static OpenProcessToken_Proc s_pfn_Open_Process_Token = NULL; | 375 | static OpenProcessToken_Proc s_pfn_Open_Process_Token = NULL; |
| 376 | HMODULE hm_advapi32 = NULL; | 376 | HMODULE hm_advapi32 = NULL; |
| @@ -397,12 +397,12 @@ BOOL WINAPI open_process_token ( | |||
| 397 | ); | 397 | ); |
| 398 | } | 398 | } |
| 399 | 399 | ||
| 400 | BOOL WINAPI get_token_information ( | 400 | BOOL WINAPI |
| 401 | HANDLE TokenHandle, | 401 | get_token_information (HANDLE TokenHandle, |
| 402 | TOKEN_INFORMATION_CLASS TokenInformationClass, | 402 | TOKEN_INFORMATION_CLASS TokenInformationClass, |
| 403 | LPVOID TokenInformation, | 403 | LPVOID TokenInformation, |
| 404 | DWORD TokenInformationLength, | 404 | DWORD TokenInformationLength, |
| 405 | PDWORD ReturnLength) | 405 | PDWORD ReturnLength) |
| 406 | { | 406 | { |
| 407 | static GetTokenInformation_Proc s_pfn_Get_Token_Information = NULL; | 407 | static GetTokenInformation_Proc s_pfn_Get_Token_Information = NULL; |
| 408 | HMODULE hm_advapi32 = NULL; | 408 | HMODULE hm_advapi32 = NULL; |
| @@ -431,14 +431,14 @@ BOOL WINAPI get_token_information ( | |||
| 431 | ); | 431 | ); |
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | BOOL WINAPI lookup_account_sid ( | 434 | BOOL WINAPI |
| 435 | LPCTSTR lpSystemName, | 435 | lookup_account_sid (LPCTSTR lpSystemName, |
| 436 | PSID Sid, | 436 | PSID Sid, |
| 437 | LPTSTR Name, | 437 | LPTSTR Name, |
| 438 | LPDWORD cbName, | 438 | LPDWORD cbName, |
| 439 | LPTSTR DomainName, | 439 | LPTSTR DomainName, |
| 440 | LPDWORD cbDomainName, | 440 | LPDWORD cbDomainName, |
| 441 | PSID_NAME_USE peUse) | 441 | PSID_NAME_USE peUse) |
| 442 | { | 442 | { |
| 443 | static LookupAccountSid_Proc s_pfn_Lookup_Account_Sid = NULL; | 443 | static LookupAccountSid_Proc s_pfn_Lookup_Account_Sid = NULL; |
| 444 | HMODULE hm_advapi32 = NULL; | 444 | HMODULE hm_advapi32 = NULL; |
| @@ -469,8 +469,8 @@ BOOL WINAPI lookup_account_sid ( | |||
| 469 | ); | 469 | ); |
| 470 | } | 470 | } |
| 471 | 471 | ||
| 472 | PSID_IDENTIFIER_AUTHORITY WINAPI get_sid_identifier_authority ( | 472 | PSID_IDENTIFIER_AUTHORITY WINAPI |
| 473 | PSID pSid) | 473 | get_sid_identifier_authority (PSID pSid) |
| 474 | { | 474 | { |
| 475 | static GetSidIdentifierAuthority_Proc s_pfn_Get_Sid_Identifier_Authority = NULL; | 475 | static GetSidIdentifierAuthority_Proc s_pfn_Get_Sid_Identifier_Authority = NULL; |
| 476 | HMODULE hm_advapi32 = NULL; | 476 | HMODULE hm_advapi32 = NULL; |
| @@ -493,9 +493,8 @@ PSID_IDENTIFIER_AUTHORITY WINAPI get_sid_identifier_authority ( | |||
| 493 | return (s_pfn_Get_Sid_Identifier_Authority (pSid)); | 493 | return (s_pfn_Get_Sid_Identifier_Authority (pSid)); |
| 494 | } | 494 | } |
| 495 | 495 | ||
| 496 | PDWORD WINAPI get_sid_sub_authority ( | 496 | PDWORD WINAPI |
| 497 | PSID pSid, | 497 | get_sid_sub_authority (PSID pSid, DWORD n) |
| 498 | DWORD n) | ||
| 499 | { | 498 | { |
| 500 | static GetSidSubAuthority_Proc s_pfn_Get_Sid_Sub_Authority = NULL; | 499 | static GetSidSubAuthority_Proc s_pfn_Get_Sid_Sub_Authority = NULL; |
| 501 | static DWORD zero = 0U; | 500 | static DWORD zero = 0U; |
| @@ -519,8 +518,8 @@ PDWORD WINAPI get_sid_sub_authority ( | |||
| 519 | return (s_pfn_Get_Sid_Sub_Authority (pSid, n)); | 518 | return (s_pfn_Get_Sid_Sub_Authority (pSid, n)); |
| 520 | } | 519 | } |
| 521 | 520 | ||
| 522 | PUCHAR WINAPI get_sid_sub_authority_count ( | 521 | PUCHAR WINAPI |
| 523 | PSID pSid) | 522 | get_sid_sub_authority_count (PSID pSid) |
| 524 | { | 523 | { |
| 525 | static GetSidSubAuthorityCount_Proc s_pfn_Get_Sid_Sub_Authority_Count = NULL; | 524 | static GetSidSubAuthorityCount_Proc s_pfn_Get_Sid_Sub_Authority_Count = NULL; |
| 526 | static UCHAR zero = 0U; | 525 | static UCHAR zero = 0U; |
| @@ -544,12 +543,12 @@ PUCHAR WINAPI get_sid_sub_authority_count ( | |||
| 544 | return (s_pfn_Get_Sid_Sub_Authority_Count (pSid)); | 543 | return (s_pfn_Get_Sid_Sub_Authority_Count (pSid)); |
| 545 | } | 544 | } |
| 546 | 545 | ||
| 547 | BOOL WINAPI get_file_security ( | 546 | BOOL WINAPI |
| 548 | LPCTSTR lpFileName, | 547 | get_file_security (LPCTSTR lpFileName, |
| 549 | SECURITY_INFORMATION RequestedInformation, | 548 | SECURITY_INFORMATION RequestedInformation, |
| 550 | PSECURITY_DESCRIPTOR pSecurityDescriptor, | 549 | PSECURITY_DESCRIPTOR pSecurityDescriptor, |
| 551 | DWORD nLength, | 550 | DWORD nLength, |
| 552 | LPDWORD lpnLengthNeeded) | 551 | LPDWORD lpnLengthNeeded) |
| 553 | { | 552 | { |
| 554 | static GetFileSecurity_Proc s_pfn_Get_File_Security = NULL; | 553 | static GetFileSecurity_Proc s_pfn_Get_File_Security = NULL; |
| 555 | HMODULE hm_advapi32 = NULL; | 554 | HMODULE hm_advapi32 = NULL; |
| @@ -574,10 +573,10 @@ BOOL WINAPI get_file_security ( | |||
| 574 | lpnLengthNeeded)); | 573 | lpnLengthNeeded)); |
| 575 | } | 574 | } |
| 576 | 575 | ||
| 577 | BOOL WINAPI get_security_descriptor_owner ( | 576 | BOOL WINAPI |
| 578 | PSECURITY_DESCRIPTOR pSecurityDescriptor, | 577 | get_security_descriptor_owner (PSECURITY_DESCRIPTOR pSecurityDescriptor, |
| 579 | PSID *pOwner, | 578 | PSID *pOwner, |
| 580 | LPBOOL lpbOwnerDefaulted) | 579 | LPBOOL lpbOwnerDefaulted) |
| 581 | { | 580 | { |
| 582 | static GetSecurityDescriptorOwner_Proc s_pfn_Get_Security_Descriptor_Owner = NULL; | 581 | static GetSecurityDescriptorOwner_Proc s_pfn_Get_Security_Descriptor_Owner = NULL; |
| 583 | HMODULE hm_advapi32 = NULL; | 582 | HMODULE hm_advapi32 = NULL; |
| @@ -601,10 +600,10 @@ BOOL WINAPI get_security_descriptor_owner ( | |||
| 601 | lpbOwnerDefaulted)); | 600 | lpbOwnerDefaulted)); |
| 602 | } | 601 | } |
| 603 | 602 | ||
| 604 | BOOL WINAPI get_security_descriptor_group ( | 603 | BOOL WINAPI |
| 605 | PSECURITY_DESCRIPTOR pSecurityDescriptor, | 604 | get_security_descriptor_group (PSECURITY_DESCRIPTOR pSecurityDescriptor, |
| 606 | PSID *pGroup, | 605 | PSID *pGroup, |
| 607 | LPBOOL lpbGroupDefaulted) | 606 | LPBOOL lpbGroupDefaulted) |
| 608 | { | 607 | { |
| 609 | static GetSecurityDescriptorGroup_Proc s_pfn_Get_Security_Descriptor_Group = NULL; | 608 | static GetSecurityDescriptorGroup_Proc s_pfn_Get_Security_Descriptor_Group = NULL; |
| 610 | HMODULE hm_advapi32 = NULL; | 609 | HMODULE hm_advapi32 = NULL; |
| @@ -628,8 +627,8 @@ BOOL WINAPI get_security_descriptor_group ( | |||
| 628 | lpbGroupDefaulted)); | 627 | lpbGroupDefaulted)); |
| 629 | } | 628 | } |
| 630 | 629 | ||
| 631 | BOOL WINAPI is_valid_sid ( | 630 | BOOL WINAPI |
| 632 | PSID sid) | 631 | is_valid_sid (PSID sid) |
| 633 | { | 632 | { |
| 634 | static IsValidSid_Proc s_pfn_Is_Valid_Sid = NULL; | 633 | static IsValidSid_Proc s_pfn_Is_Valid_Sid = NULL; |
| 635 | HMODULE hm_advapi32 = NULL; | 634 | HMODULE hm_advapi32 = NULL; |
| @@ -652,9 +651,8 @@ BOOL WINAPI is_valid_sid ( | |||
| 652 | return (s_pfn_Is_Valid_Sid (sid)); | 651 | return (s_pfn_Is_Valid_Sid (sid)); |
| 653 | } | 652 | } |
| 654 | 653 | ||
| 655 | BOOL WINAPI equal_sid ( | 654 | BOOL WINAPI |
| 656 | PSID sid1, | 655 | equal_sid (PSID sid1, PSID sid2) |
| 657 | PSID sid2) | ||
| 658 | { | 656 | { |
| 659 | static EqualSid_Proc s_pfn_Equal_Sid = NULL; | 657 | static EqualSid_Proc s_pfn_Equal_Sid = NULL; |
| 660 | HMODULE hm_advapi32 = NULL; | 658 | HMODULE hm_advapi32 = NULL; |
| @@ -677,8 +675,8 @@ BOOL WINAPI equal_sid ( | |||
| 677 | return (s_pfn_Equal_Sid (sid1, sid2)); | 675 | return (s_pfn_Equal_Sid (sid1, sid2)); |
| 678 | } | 676 | } |
| 679 | 677 | ||
| 680 | DWORD WINAPI get_length_sid ( | 678 | DWORD WINAPI |
| 681 | PSID sid) | 679 | get_length_sid (PSID sid) |
| 682 | { | 680 | { |
| 683 | static GetLengthSid_Proc s_pfn_Get_Length_Sid = NULL; | 681 | static GetLengthSid_Proc s_pfn_Get_Length_Sid = NULL; |
| 684 | HMODULE hm_advapi32 = NULL; | 682 | HMODULE hm_advapi32 = NULL; |
| @@ -701,10 +699,8 @@ DWORD WINAPI get_length_sid ( | |||
| 701 | return (s_pfn_Get_Length_Sid (sid)); | 699 | return (s_pfn_Get_Length_Sid (sid)); |
| 702 | } | 700 | } |
| 703 | 701 | ||
| 704 | BOOL WINAPI copy_sid ( | 702 | BOOL WINAPI |
| 705 | DWORD destlen, | 703 | copy_sid (DWORD destlen, PSID dest, PSID src) |
| 706 | PSID dest, | ||
| 707 | PSID src) | ||
| 708 | { | 704 | { |
| 709 | static CopySid_Proc s_pfn_Copy_Sid = NULL; | 705 | static CopySid_Proc s_pfn_Copy_Sid = NULL; |
| 710 | HMODULE hm_advapi32 = NULL; | 706 | HMODULE hm_advapi32 = NULL; |
| @@ -733,8 +729,8 @@ BOOL WINAPI copy_sid ( | |||
| 733 | supported in Windows NT / 2k / XP | 729 | supported in Windows NT / 2k / XP |
| 734 | */ | 730 | */ |
| 735 | 731 | ||
| 736 | void WINAPI get_native_system_info ( | 732 | void WINAPI |
| 737 | LPSYSTEM_INFO lpSystemInfo) | 733 | get_native_system_info (LPSYSTEM_INFO lpSystemInfo) |
| 738 | { | 734 | { |
| 739 | static GetNativeSystemInfo_Proc s_pfn_Get_Native_System_Info = NULL; | 735 | static GetNativeSystemInfo_Proc s_pfn_Get_Native_System_Info = NULL; |
| 740 | if (is_windows_9x () != TRUE) | 736 | if (is_windows_9x () != TRUE) |
| @@ -753,10 +749,10 @@ void WINAPI get_native_system_info ( | |||
| 753 | lpSystemInfo->dwNumberOfProcessors = -1; | 749 | lpSystemInfo->dwNumberOfProcessors = -1; |
| 754 | } | 750 | } |
| 755 | 751 | ||
| 756 | BOOL WINAPI get_system_times( | 752 | BOOL WINAPI |
| 757 | LPFILETIME lpIdleTime, | 753 | get_system_times (LPFILETIME lpIdleTime, |
| 758 | LPFILETIME lpKernelTime, | 754 | LPFILETIME lpKernelTime, |
| 759 | LPFILETIME lpUserTime) | 755 | LPFILETIME lpUserTime) |
| 760 | { | 756 | { |
| 761 | static GetSystemTimes_Proc s_pfn_Get_System_times = NULL; | 757 | static GetSystemTimes_Proc s_pfn_Get_System_times = NULL; |
| 762 | if (is_windows_9x () == TRUE) | 758 | if (is_windows_9x () == TRUE) |
| @@ -1691,7 +1687,7 @@ init_environment (char ** argv) | |||
| 1691 | for (p = modname; *p; p++) | 1687 | for (p = modname; *p; p++) |
| 1692 | if (*p == '\\') *p = '/'; | 1688 | if (*p == '\\') *p = '/'; |
| 1693 | 1689 | ||
| 1694 | _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname); | 1690 | _snprintf (buf, sizeof (buf)-1, "emacs_dir=%s", modname); |
| 1695 | _putenv (strdup (buf)); | 1691 | _putenv (strdup (buf)); |
| 1696 | } | 1692 | } |
| 1697 | /* Handle running emacs from the build directory: src/oo-spd/i386/ */ | 1693 | /* Handle running emacs from the build directory: src/oo-spd/i386/ */ |
| @@ -1715,7 +1711,7 @@ init_environment (char ** argv) | |||
| 1715 | for (p = modname; *p; p++) | 1711 | for (p = modname; *p; p++) |
| 1716 | if (*p == '\\') *p = '/'; | 1712 | if (*p == '\\') *p = '/'; |
| 1717 | 1713 | ||
| 1718 | _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname); | 1714 | _snprintf (buf, sizeof (buf)-1, "emacs_dir=%s", modname); |
| 1719 | _putenv (strdup (buf)); | 1715 | _putenv (strdup (buf)); |
| 1720 | } | 1716 | } |
| 1721 | } | 1717 | } |
| @@ -1743,12 +1739,12 @@ init_environment (char ** argv) | |||
| 1743 | char buf1[SET_ENV_BUF_SIZE], buf2[SET_ENV_BUF_SIZE]; | 1739 | char buf1[SET_ENV_BUF_SIZE], buf2[SET_ENV_BUF_SIZE]; |
| 1744 | 1740 | ||
| 1745 | if (dwType == REG_EXPAND_SZ) | 1741 | if (dwType == REG_EXPAND_SZ) |
| 1746 | ExpandEnvironmentStrings ((LPSTR) lpval, buf1, sizeof(buf1)); | 1742 | ExpandEnvironmentStrings ((LPSTR) lpval, buf1, sizeof (buf1)); |
| 1747 | else if (dwType == REG_SZ) | 1743 | else if (dwType == REG_SZ) |
| 1748 | strcpy (buf1, lpval); | 1744 | strcpy (buf1, lpval); |
| 1749 | if (dwType == REG_EXPAND_SZ || dwType == REG_SZ) | 1745 | if (dwType == REG_EXPAND_SZ || dwType == REG_SZ) |
| 1750 | { | 1746 | { |
| 1751 | _snprintf (buf2, sizeof(buf2)-1, "%s=%s", env_vars[i].name, | 1747 | _snprintf (buf2, sizeof (buf2)-1, "%s=%s", env_vars[i].name, |
| 1752 | buf1); | 1748 | buf1); |
| 1753 | _putenv (strdup (buf2)); | 1749 | _putenv (strdup (buf2)); |
| 1754 | } | 1750 | } |
| @@ -2091,7 +2087,7 @@ GetCachedVolumeInformation (char * root_dir) | |||
| 2091 | involve network access, and so is extremely quick). */ | 2087 | involve network access, and so is extremely quick). */ |
| 2092 | 2088 | ||
| 2093 | /* Map drive letter to UNC if remote. */ | 2089 | /* Map drive letter to UNC if remote. */ |
| 2094 | if ( isalpha( root_dir[0] ) && !fixed[ DRIVE_INDEX( root_dir[0] ) ] ) | 2090 | if ( isalpha (root_dir[0]) && !fixed[ DRIVE_INDEX (root_dir[0]) ] ) |
| 2095 | { | 2091 | { |
| 2096 | char remote_name[ 256 ]; | 2092 | char remote_name[ 256 ]; |
| 2097 | char drive[3] = { root_dir[0], ':' }; | 2093 | char drive[3] = { root_dir[0], ':' }; |
| @@ -2490,8 +2486,8 @@ open_unc_volume (const char *path) | |||
| 2490 | nr.lpComment = NULL; | 2486 | nr.lpComment = NULL; |
| 2491 | nr.lpProvider = NULL; | 2487 | nr.lpProvider = NULL; |
| 2492 | 2488 | ||
| 2493 | result = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_DISK, | 2489 | result = WNetOpenEnum (RESOURCE_GLOBALNET, RESOURCETYPE_DISK, |
| 2494 | RESOURCEUSAGE_CONNECTABLE, &nr, &henum); | 2490 | RESOURCEUSAGE_CONNECTABLE, &nr, &henum); |
| 2495 | 2491 | ||
| 2496 | if (result == NO_ERROR) | 2492 | if (result == NO_ERROR) |
| 2497 | return henum; | 2493 | return henum; |
| @@ -2667,7 +2663,7 @@ sys_creat (const char * path, int mode) | |||
| 2667 | } | 2663 | } |
| 2668 | 2664 | ||
| 2669 | FILE * | 2665 | FILE * |
| 2670 | sys_fopen(const char * path, const char * mode) | 2666 | sys_fopen (const char * path, const char * mode) |
| 2671 | { | 2667 | { |
| 2672 | int fd; | 2668 | int fd; |
| 2673 | int oflag; | 2669 | int oflag; |
| @@ -2754,7 +2750,7 @@ sys_link (const char * old, const char * new) | |||
| 2754 | 2750 | ||
| 2755 | data.wid.dwStreamId = BACKUP_LINK; | 2751 | data.wid.dwStreamId = BACKUP_LINK; |
| 2756 | data.wid.dwStreamAttributes = 0; | 2752 | data.wid.dwStreamAttributes = 0; |
| 2757 | data.wid.Size.LowPart = wlen * sizeof(WCHAR); | 2753 | data.wid.Size.LowPart = wlen * sizeof (WCHAR); |
| 2758 | data.wid.Size.HighPart = 0; | 2754 | data.wid.Size.HighPart = 0; |
| 2759 | data.wid.dwStreamNameSize = 0; | 2755 | data.wid.dwStreamNameSize = 0; |
| 2760 | 2756 | ||
| @@ -2980,7 +2976,7 @@ convert_time (FILETIME ft) | |||
| 2980 | 2976 | ||
| 2981 | if (!init) | 2977 | if (!init) |
| 2982 | { | 2978 | { |
| 2983 | initialize_utc_base(); | 2979 | initialize_utc_base (); |
| 2984 | init = 1; | 2980 | init = 1; |
| 2985 | } | 2981 | } |
| 2986 | 2982 | ||
| @@ -3167,7 +3163,7 @@ get_name_and_id (PSECURITY_DESCRIPTOR psd, const char *fname, | |||
| 3167 | char name[UNLEN+1]; | 3163 | char name[UNLEN+1]; |
| 3168 | DWORD name_len = sizeof (name); | 3164 | DWORD name_len = sizeof (name); |
| 3169 | char domain[1024]; | 3165 | char domain[1024]; |
| 3170 | DWORD domain_len = sizeof(domain); | 3166 | DWORD domain_len = sizeof (domain); |
| 3171 | char *mp = NULL; | 3167 | char *mp = NULL; |
| 3172 | int use_dflt = 0; | 3168 | int use_dflt = 0; |
| 3173 | int result; | 3169 | int result; |
| @@ -3213,10 +3209,9 @@ get_name_and_id (PSECURITY_DESCRIPTOR psd, const char *fname, | |||
| 3213 | } | 3209 | } |
| 3214 | 3210 | ||
| 3215 | static void | 3211 | static void |
| 3216 | get_file_owner_and_group ( | 3212 | get_file_owner_and_group (PSECURITY_DESCRIPTOR psd, |
| 3217 | PSECURITY_DESCRIPTOR psd, | 3213 | const char *fname, |
| 3218 | const char *fname, | 3214 | struct stat *st) |
| 3219 | struct stat *st) | ||
| 3220 | { | 3215 | { |
| 3221 | int dflt_usr = 0, dflt_grp = 0; | 3216 | int dflt_usr = 0, dflt_grp = 0; |
| 3222 | 3217 | ||
| @@ -3642,9 +3637,8 @@ utime (const char *name, struct utimbuf *times) | |||
| 3642 | 3637 | ||
| 3643 | /* Helper wrapper functions. */ | 3638 | /* Helper wrapper functions. */ |
| 3644 | 3639 | ||
| 3645 | HANDLE WINAPI create_toolhelp32_snapshot( | 3640 | HANDLE WINAPI |
| 3646 | DWORD Flags, | 3641 | create_toolhelp32_snapshot (DWORD Flags, DWORD Ignored) |
| 3647 | DWORD Ignored) | ||
| 3648 | { | 3642 | { |
| 3649 | static CreateToolhelp32Snapshot_Proc s_pfn_Create_Toolhelp32_Snapshot = NULL; | 3643 | static CreateToolhelp32Snapshot_Proc s_pfn_Create_Toolhelp32_Snapshot = NULL; |
| 3650 | 3644 | ||
| @@ -3662,9 +3656,8 @@ HANDLE WINAPI create_toolhelp32_snapshot( | |||
| 3662 | return (s_pfn_Create_Toolhelp32_Snapshot (Flags, Ignored)); | 3656 | return (s_pfn_Create_Toolhelp32_Snapshot (Flags, Ignored)); |
| 3663 | } | 3657 | } |
| 3664 | 3658 | ||
| 3665 | BOOL WINAPI process32_first( | 3659 | BOOL WINAPI |
| 3666 | HANDLE hSnapshot, | 3660 | process32_first (HANDLE hSnapshot, LPPROCESSENTRY32 lppe) |
| 3667 | LPPROCESSENTRY32 lppe) | ||
| 3668 | { | 3661 | { |
| 3669 | static Process32First_Proc s_pfn_Process32_First = NULL; | 3662 | static Process32First_Proc s_pfn_Process32_First = NULL; |
| 3670 | 3663 | ||
| @@ -3682,9 +3675,8 @@ BOOL WINAPI process32_first( | |||
| 3682 | return (s_pfn_Process32_First (hSnapshot, lppe)); | 3675 | return (s_pfn_Process32_First (hSnapshot, lppe)); |
| 3683 | } | 3676 | } |
| 3684 | 3677 | ||
| 3685 | BOOL WINAPI process32_next( | 3678 | BOOL WINAPI |
| 3686 | HANDLE hSnapshot, | 3679 | process32_next (HANDLE hSnapshot, LPPROCESSENTRY32 lppe) |
| 3687 | LPPROCESSENTRY32 lppe) | ||
| 3688 | { | 3680 | { |
| 3689 | static Process32Next_Proc s_pfn_Process32_Next = NULL; | 3681 | static Process32Next_Proc s_pfn_Process32_Next = NULL; |
| 3690 | 3682 | ||
| @@ -3702,11 +3694,11 @@ BOOL WINAPI process32_next( | |||
| 3702 | return (s_pfn_Process32_Next (hSnapshot, lppe)); | 3694 | return (s_pfn_Process32_Next (hSnapshot, lppe)); |
| 3703 | } | 3695 | } |
| 3704 | 3696 | ||
| 3705 | BOOL WINAPI open_thread_token ( | 3697 | BOOL WINAPI |
| 3706 | HANDLE ThreadHandle, | 3698 | open_thread_token (HANDLE ThreadHandle, |
| 3707 | DWORD DesiredAccess, | 3699 | DWORD DesiredAccess, |
| 3708 | BOOL OpenAsSelf, | 3700 | BOOL OpenAsSelf, |
| 3709 | PHANDLE TokenHandle) | 3701 | PHANDLE TokenHandle) |
| 3710 | { | 3702 | { |
| 3711 | static OpenThreadToken_Proc s_pfn_Open_Thread_Token = NULL; | 3703 | static OpenThreadToken_Proc s_pfn_Open_Thread_Token = NULL; |
| 3712 | HMODULE hm_advapi32 = NULL; | 3704 | HMODULE hm_advapi32 = NULL; |
| @@ -3736,8 +3728,8 @@ BOOL WINAPI open_thread_token ( | |||
| 3736 | ); | 3728 | ); |
| 3737 | } | 3729 | } |
| 3738 | 3730 | ||
| 3739 | BOOL WINAPI impersonate_self ( | 3731 | BOOL WINAPI |
| 3740 | SECURITY_IMPERSONATION_LEVEL ImpersonationLevel) | 3732 | impersonate_self (SECURITY_IMPERSONATION_LEVEL ImpersonationLevel) |
| 3741 | { | 3733 | { |
| 3742 | static ImpersonateSelf_Proc s_pfn_Impersonate_Self = NULL; | 3734 | static ImpersonateSelf_Proc s_pfn_Impersonate_Self = NULL; |
| 3743 | HMODULE hm_advapi32 = NULL; | 3735 | HMODULE hm_advapi32 = NULL; |
| @@ -3759,7 +3751,8 @@ BOOL WINAPI impersonate_self ( | |||
| 3759 | return s_pfn_Impersonate_Self (ImpersonationLevel); | 3751 | return s_pfn_Impersonate_Self (ImpersonationLevel); |
| 3760 | } | 3752 | } |
| 3761 | 3753 | ||
| 3762 | BOOL WINAPI revert_to_self (void) | 3754 | BOOL WINAPI |
| 3755 | revert_to_self (void) | ||
| 3763 | { | 3756 | { |
| 3764 | static RevertToSelf_Proc s_pfn_Revert_To_Self = NULL; | 3757 | static RevertToSelf_Proc s_pfn_Revert_To_Self = NULL; |
| 3765 | HMODULE hm_advapi32 = NULL; | 3758 | HMODULE hm_advapi32 = NULL; |
| @@ -3781,10 +3774,10 @@ BOOL WINAPI revert_to_self (void) | |||
| 3781 | return s_pfn_Revert_To_Self (); | 3774 | return s_pfn_Revert_To_Self (); |
| 3782 | } | 3775 | } |
| 3783 | 3776 | ||
| 3784 | BOOL WINAPI get_process_memory_info ( | 3777 | BOOL WINAPI |
| 3785 | HANDLE h_proc, | 3778 | get_process_memory_info (HANDLE h_proc, |
| 3786 | PPROCESS_MEMORY_COUNTERS mem_counters, | 3779 | PPROCESS_MEMORY_COUNTERS mem_counters, |
| 3787 | DWORD bufsize) | 3780 | DWORD bufsize) |
| 3788 | { | 3781 | { |
| 3789 | static GetProcessMemoryInfo_Proc s_pfn_Get_Process_Memory_Info = NULL; | 3782 | static GetProcessMemoryInfo_Proc s_pfn_Get_Process_Memory_Info = NULL; |
| 3790 | HMODULE hm_psapi = NULL; | 3783 | HMODULE hm_psapi = NULL; |
| @@ -3807,10 +3800,8 @@ BOOL WINAPI get_process_memory_info ( | |||
| 3807 | return s_pfn_Get_Process_Memory_Info (h_proc, mem_counters, bufsize); | 3800 | return s_pfn_Get_Process_Memory_Info (h_proc, mem_counters, bufsize); |
| 3808 | } | 3801 | } |
| 3809 | 3802 | ||
| 3810 | BOOL WINAPI get_process_working_set_size ( | 3803 | BOOL WINAPI |
| 3811 | HANDLE h_proc, | 3804 | get_process_working_set_size (HANDLE h_proc, DWORD *minrss, DWORD *maxrss) |
| 3812 | DWORD *minrss, | ||
| 3813 | DWORD *maxrss) | ||
| 3814 | { | 3805 | { |
| 3815 | static GetProcessWorkingSetSize_Proc | 3806 | static GetProcessWorkingSetSize_Proc |
| 3816 | s_pfn_Get_Process_Working_Set_Size = NULL; | 3807 | s_pfn_Get_Process_Working_Set_Size = NULL; |
| @@ -3833,8 +3824,8 @@ BOOL WINAPI get_process_working_set_size ( | |||
| 3833 | return s_pfn_Get_Process_Working_Set_Size (h_proc, minrss, maxrss); | 3824 | return s_pfn_Get_Process_Working_Set_Size (h_proc, minrss, maxrss); |
| 3834 | } | 3825 | } |
| 3835 | 3826 | ||
| 3836 | BOOL WINAPI global_memory_status ( | 3827 | BOOL WINAPI |
| 3837 | MEMORYSTATUS *buf) | 3828 | global_memory_status (MEMORYSTATUS *buf) |
| 3838 | { | 3829 | { |
| 3839 | static GlobalMemoryStatus_Proc s_pfn_Global_Memory_Status = NULL; | 3830 | static GlobalMemoryStatus_Proc s_pfn_Global_Memory_Status = NULL; |
| 3840 | 3831 | ||
| @@ -3856,8 +3847,8 @@ BOOL WINAPI global_memory_status ( | |||
| 3856 | return s_pfn_Global_Memory_Status (buf); | 3847 | return s_pfn_Global_Memory_Status (buf); |
| 3857 | } | 3848 | } |
| 3858 | 3849 | ||
| 3859 | BOOL WINAPI global_memory_status_ex ( | 3850 | BOOL WINAPI |
| 3860 | MEMORY_STATUS_EX *buf) | 3851 | global_memory_status_ex (MEMORY_STATUS_EX *buf) |
| 3861 | { | 3852 | { |
| 3862 | static GlobalMemoryStatusEx_Proc s_pfn_Global_Memory_Status_Ex = NULL; | 3853 | static GlobalMemoryStatusEx_Proc s_pfn_Global_Memory_Status_Ex = NULL; |
| 3863 | 3854 | ||
| @@ -3992,8 +3983,8 @@ process_times (h_proc, ctime, etime, stime, utime, ttime, pcpu) | |||
| 3992 | 3983 | ||
| 3993 | if (!h_proc | 3984 | if (!h_proc |
| 3994 | || !get_process_times_fn | 3985 | || !get_process_times_fn |
| 3995 | || !(*get_process_times_fn)(h_proc, &ft_creation, &ft_exit, | 3986 | || !(*get_process_times_fn) (h_proc, &ft_creation, &ft_exit, |
| 3996 | &ft_kernel, &ft_user)) | 3987 | &ft_kernel, &ft_user)) |
| 3997 | return 0; | 3988 | return 0; |
| 3998 | 3989 | ||
| 3999 | GetSystemTimeAsFileTime (&ft_current); | 3990 | GetSystemTimeAsFileTime (&ft_current); |
| @@ -4435,34 +4426,34 @@ init_winsock (int load_now) | |||
| 4435 | if ((pfn_##fn = (void *) GetProcAddress (winsock_lib, #fn)) == NULL) \ | 4426 | if ((pfn_##fn = (void *) GetProcAddress (winsock_lib, #fn)) == NULL) \ |
| 4436 | goto fail; | 4427 | goto fail; |
| 4437 | 4428 | ||
| 4438 | LOAD_PROC( WSAStartup ); | 4429 | LOAD_PROC (WSAStartup); |
| 4439 | LOAD_PROC( WSASetLastError ); | 4430 | LOAD_PROC (WSASetLastError); |
| 4440 | LOAD_PROC( WSAGetLastError ); | 4431 | LOAD_PROC (WSAGetLastError); |
| 4441 | LOAD_PROC( WSAEventSelect ); | 4432 | LOAD_PROC (WSAEventSelect); |
| 4442 | LOAD_PROC( WSACreateEvent ); | 4433 | LOAD_PROC (WSACreateEvent); |
| 4443 | LOAD_PROC( WSACloseEvent ); | 4434 | LOAD_PROC (WSACloseEvent); |
| 4444 | LOAD_PROC( socket ); | 4435 | LOAD_PROC (socket); |
| 4445 | LOAD_PROC( bind ); | 4436 | LOAD_PROC (bind); |
| 4446 | LOAD_PROC( connect ); | 4437 | LOAD_PROC (connect); |
| 4447 | LOAD_PROC( ioctlsocket ); | 4438 | LOAD_PROC (ioctlsocket); |
| 4448 | LOAD_PROC( recv ); | 4439 | LOAD_PROC (recv); |
| 4449 | LOAD_PROC( send ); | 4440 | LOAD_PROC (send); |
| 4450 | LOAD_PROC( closesocket ); | 4441 | LOAD_PROC (closesocket); |
| 4451 | LOAD_PROC( shutdown ); | 4442 | LOAD_PROC (shutdown); |
| 4452 | LOAD_PROC( htons ); | 4443 | LOAD_PROC (htons); |
| 4453 | LOAD_PROC( ntohs ); | 4444 | LOAD_PROC (ntohs); |
| 4454 | LOAD_PROC( inet_addr ); | 4445 | LOAD_PROC (inet_addr); |
| 4455 | LOAD_PROC( gethostname ); | 4446 | LOAD_PROC (gethostname); |
| 4456 | LOAD_PROC( gethostbyname ); | 4447 | LOAD_PROC (gethostbyname); |
| 4457 | LOAD_PROC( getservbyname ); | 4448 | LOAD_PROC (getservbyname); |
| 4458 | LOAD_PROC( getpeername ); | 4449 | LOAD_PROC (getpeername); |
| 4459 | LOAD_PROC( WSACleanup ); | 4450 | LOAD_PROC (WSACleanup); |
| 4460 | LOAD_PROC( setsockopt ); | 4451 | LOAD_PROC (setsockopt); |
| 4461 | LOAD_PROC( listen ); | 4452 | LOAD_PROC (listen); |
| 4462 | LOAD_PROC( getsockname ); | 4453 | LOAD_PROC (getsockname); |
| 4463 | LOAD_PROC( accept ); | 4454 | LOAD_PROC (accept); |
| 4464 | LOAD_PROC( recvfrom ); | 4455 | LOAD_PROC (recvfrom); |
| 4465 | LOAD_PROC( sendto ); | 4456 | LOAD_PROC (sendto); |
| 4466 | #undef LOAD_PROC | 4457 | #undef LOAD_PROC |
| 4467 | 4458 | ||
| 4468 | /* specify version 1.1 of winsock */ | 4459 | /* specify version 1.1 of winsock */ |
| @@ -4607,7 +4598,7 @@ struct { | |||
| 4607 | }; | 4598 | }; |
| 4608 | 4599 | ||
| 4609 | char * | 4600 | char * |
| 4610 | sys_strerror(int error_no) | 4601 | sys_strerror (int error_no) |
| 4611 | { | 4602 | { |
| 4612 | int i; | 4603 | int i; |
| 4613 | static char unknown_msg[40]; | 4604 | static char unknown_msg[40]; |
| @@ -4619,7 +4610,7 @@ sys_strerror(int error_no) | |||
| 4619 | if (_wsa_errlist[i].errnum == error_no) | 4610 | if (_wsa_errlist[i].errnum == error_no) |
| 4620 | return _wsa_errlist[i].msg; | 4611 | return _wsa_errlist[i].msg; |
| 4621 | 4612 | ||
| 4622 | sprintf(unknown_msg, "Unidentified error: %d", error_no); | 4613 | sprintf (unknown_msg, "Unidentified error: %d", error_no); |
| 4623 | return unknown_msg; | 4614 | return unknown_msg; |
| 4624 | } | 4615 | } |
| 4625 | 4616 | ||
| @@ -4638,7 +4629,7 @@ sys_strerror(int error_no) | |||
| 4638 | int socket_to_fd (SOCKET s); | 4629 | int socket_to_fd (SOCKET s); |
| 4639 | 4630 | ||
| 4640 | int | 4631 | int |
| 4641 | sys_socket(int af, int type, int protocol) | 4632 | sys_socket (int af, int type, int protocol) |
| 4642 | { | 4633 | { |
| 4643 | SOCKET s; | 4634 | SOCKET s; |
| 4644 | 4635 | ||
| @@ -4841,7 +4832,7 @@ sys_gethostname (char * name, int namelen) | |||
| 4841 | } | 4832 | } |
| 4842 | 4833 | ||
| 4843 | struct hostent * | 4834 | struct hostent * |
| 4844 | sys_gethostbyname(const char * name) | 4835 | sys_gethostbyname (const char * name) |
| 4845 | { | 4836 | { |
| 4846 | struct hostent * host; | 4837 | struct hostent * host; |
| 4847 | 4838 | ||
| @@ -4859,7 +4850,7 @@ sys_gethostbyname(const char * name) | |||
| 4859 | } | 4850 | } |
| 4860 | 4851 | ||
| 4861 | struct servent * | 4852 | struct servent * |
| 4862 | sys_getservbyname(const char * name, const char * proto) | 4853 | sys_getservbyname (const char * name, const char * proto) |
| 4863 | { | 4854 | { |
| 4864 | struct servent * serv; | 4855 | struct servent * serv; |
| 4865 | 4856 | ||
| @@ -5014,7 +5005,7 @@ sys_accept (int s, struct sockaddr * addr, int * addrlen) | |||
| 5014 | 5005 | ||
| 5015 | int | 5006 | int |
| 5016 | sys_recvfrom (int s, char * buf, int len, int flags, | 5007 | sys_recvfrom (int s, char * buf, int len, int flags, |
| 5017 | struct sockaddr * from, int * fromlen) | 5008 | struct sockaddr * from, int * fromlen) |
| 5018 | { | 5009 | { |
| 5019 | if (winsock_lib == NULL) | 5010 | if (winsock_lib == NULL) |
| 5020 | { | 5011 | { |
| @@ -5075,7 +5066,7 @@ fcntl (int s, int cmd, int options) | |||
| 5075 | unsigned long nblock = 1; | 5066 | unsigned long nblock = 1; |
| 5076 | int rc = pfn_ioctlsocket (SOCK_HANDLE (s), FIONBIO, &nblock); | 5067 | int rc = pfn_ioctlsocket (SOCK_HANDLE (s), FIONBIO, &nblock); |
| 5077 | if (rc == SOCKET_ERROR) | 5068 | if (rc == SOCKET_ERROR) |
| 5078 | set_errno(); | 5069 | set_errno (); |
| 5079 | /* Keep track of the fact that we set this to non-blocking. */ | 5070 | /* Keep track of the fact that we set this to non-blocking. */ |
| 5080 | fd_info[s].flags |= FILE_NDELAY; | 5071 | fd_info[s].flags |= FILE_NDELAY; |
| 5081 | return rc; | 5072 | return rc; |
| @@ -5512,8 +5503,8 @@ sys_read (int fd, char * buffer, unsigned int count) | |||
| 5512 | int res = pfn_recv (SOCK_HANDLE (fd), buffer, count, 0); | 5503 | int res = pfn_recv (SOCK_HANDLE (fd), buffer, count, 0); |
| 5513 | if (res == SOCKET_ERROR) | 5504 | if (res == SOCKET_ERROR) |
| 5514 | { | 5505 | { |
| 5515 | DebPrint(("sys_read.recv failed with error %d on socket %ld\n", | 5506 | DebPrint (("sys_read.recv failed with error %d on socket %ld\n", |
| 5516 | pfn_WSAGetLastError (), SOCK_HANDLE (fd))); | 5507 | pfn_WSAGetLastError (), SOCK_HANDLE (fd))); |
| 5517 | set_errno (); | 5508 | set_errno (); |
| 5518 | return -1; | 5509 | return -1; |
| 5519 | } | 5510 | } |
| @@ -5669,8 +5660,8 @@ sys_write (int fd, const void * buffer, unsigned int count) | |||
| 5669 | 5660 | ||
| 5670 | if (nchars == SOCKET_ERROR) | 5661 | if (nchars == SOCKET_ERROR) |
| 5671 | { | 5662 | { |
| 5672 | DebPrint(("sys_write.send failed with error %d on socket %ld\n", | 5663 | DebPrint (("sys_write.send failed with error %d on socket %ld\n", |
| 5673 | pfn_WSAGetLastError (), SOCK_HANDLE (fd))); | 5664 | pfn_WSAGetLastError (), SOCK_HANDLE (fd))); |
| 5674 | set_errno (); | 5665 | set_errno (); |
| 5675 | } | 5666 | } |
| 5676 | } | 5667 | } |
| @@ -5857,7 +5848,8 @@ init_ntproc () | |||
| 5857 | shutdown_handler ensures that buffers' autosave files are | 5848 | shutdown_handler ensures that buffers' autosave files are |
| 5858 | up to date when the user logs off, or the system shuts down. | 5849 | up to date when the user logs off, or the system shuts down. |
| 5859 | */ | 5850 | */ |
| 5860 | BOOL WINAPI shutdown_handler(DWORD type) | 5851 | BOOL WINAPI |
| 5852 | shutdown_handler (DWORD type) | ||
| 5861 | { | 5853 | { |
| 5862 | /* Ctrl-C and Ctrl-Break are already suppressed, so don't handle them. */ | 5854 | /* Ctrl-C and Ctrl-Break are already suppressed, so don't handle them. */ |
| 5863 | if (type == CTRL_CLOSE_EVENT /* User closes console window. */ | 5855 | if (type == CTRL_CLOSE_EVENT /* User closes console window. */ |
| @@ -5916,14 +5908,15 @@ globals_of_w32 () | |||
| 5916 | console apps. This actually applies to Emacs in both console and | 5908 | console apps. This actually applies to Emacs in both console and |
| 5917 | GUI modes, since we had to fool windows into thinking emacs is a | 5909 | GUI modes, since we had to fool windows into thinking emacs is a |
| 5918 | console application to get console mode to work. */ | 5910 | console application to get console mode to work. */ |
| 5919 | SetConsoleCtrlHandler(shutdown_handler, TRUE); | 5911 | SetConsoleCtrlHandler (shutdown_handler, TRUE); |
| 5920 | 5912 | ||
| 5921 | /* "None" is the default group name on standalone workstations. */ | 5913 | /* "None" is the default group name on standalone workstations. */ |
| 5922 | strcpy (dflt_group_name, "None"); | 5914 | strcpy (dflt_group_name, "None"); |
| 5923 | } | 5915 | } |
| 5924 | 5916 | ||
| 5925 | /* For make-serial-process */ | 5917 | /* For make-serial-process */ |
| 5926 | int serial_open (char *port) | 5918 | int |
| 5919 | serial_open (char *port) | ||
| 5927 | { | 5920 | { |
| 5928 | HANDLE hnd; | 5921 | HANDLE hnd; |
| 5929 | child_process *cp; | 5922 | child_process *cp; |
| @@ -5962,8 +5955,7 @@ int serial_open (char *port) | |||
| 5962 | 5955 | ||
| 5963 | /* For serial-process-configure */ | 5956 | /* For serial-process-configure */ |
| 5964 | void | 5957 | void |
| 5965 | serial_configure (struct Lisp_Process *p, | 5958 | serial_configure (struct Lisp_Process *p, Lisp_Object contact) |
| 5966 | Lisp_Object contact) | ||
| 5967 | { | 5959 | { |
| 5968 | Lisp_Object childp2 = Qnil; | 5960 | Lisp_Object childp2 = Qnil; |
| 5969 | Lisp_Object tem = Qnil; | 5961 | Lisp_Object tem = Qnil; |
diff --git a/src/w32console.c b/src/w32console.c index c10f2181e7d..303299898d9 100644 --- a/src/w32console.c +++ b/src/w32console.c | |||
| @@ -286,7 +286,7 @@ w32con_insert_glyphs (struct frame *f, register struct glyph *start, register in | |||
| 286 | } | 286 | } |
| 287 | } | 287 | } |
| 288 | 288 | ||
| 289 | extern unsigned char *encode_terminal_code P_ ((struct glyph *, int, | 289 | extern unsigned char *encode_terminal_code P_ ((struct glyph *, int, |
| 290 | struct coding_system *)); | 290 | struct coding_system *)); |
| 291 | 291 | ||
| 292 | static void | 292 | static void |
| @@ -438,7 +438,7 @@ w32con_reset_terminal_modes (struct terminal *t) | |||
| 438 | FillConsoleOutputCharacter (cur_screen, ' ', n, dest, &r); | 438 | FillConsoleOutputCharacter (cur_screen, ' ', n, dest, &r); |
| 439 | /* Now that the screen is clear, put the cursor at the top. */ | 439 | /* Now that the screen is clear, put the cursor at the top. */ |
| 440 | SetConsoleCursorPosition (cur_screen, dest); | 440 | SetConsoleCursorPosition (cur_screen, dest); |
| 441 | 441 | ||
| 442 | #ifdef USE_SEPARATE_SCREEN | 442 | #ifdef USE_SEPARATE_SCREEN |
| 443 | SetConsoleActiveScreenBuffer (prev_screen); | 443 | SetConsoleActiveScreenBuffer (prev_screen); |
| 444 | #else | 444 | #else |
| @@ -562,19 +562,19 @@ initialize_w32_display (struct terminal *term) | |||
| 562 | 562 | ||
| 563 | term->rif = 0; /* No window based redisplay on the console. */ | 563 | term->rif = 0; /* No window based redisplay on the console. */ |
| 564 | term->cursor_to_hook = w32con_move_cursor; | 564 | term->cursor_to_hook = w32con_move_cursor; |
| 565 | term->raw_cursor_to_hook = w32con_move_cursor; | 565 | term->raw_cursor_to_hook = w32con_move_cursor; |
| 566 | term->clear_to_end_hook = w32con_clear_to_end; | 566 | term->clear_to_end_hook = w32con_clear_to_end; |
| 567 | term->clear_frame_hook = w32con_clear_frame; | 567 | term->clear_frame_hook = w32con_clear_frame; |
| 568 | term->clear_end_of_line_hook = w32con_clear_end_of_line; | 568 | term->clear_end_of_line_hook = w32con_clear_end_of_line; |
| 569 | term->ins_del_lines_hook = w32con_ins_del_lines; | 569 | term->ins_del_lines_hook = w32con_ins_del_lines; |
| 570 | term->insert_glyphs_hook = w32con_insert_glyphs; | 570 | term->insert_glyphs_hook = w32con_insert_glyphs; |
| 571 | term->write_glyphs_hook = w32con_write_glyphs; | 571 | term->write_glyphs_hook = w32con_write_glyphs; |
| 572 | term->delete_glyphs_hook = w32con_delete_glyphs; | 572 | term->delete_glyphs_hook = w32con_delete_glyphs; |
| 573 | term->ring_bell_hook = w32_sys_ring_bell; | 573 | term->ring_bell_hook = w32_sys_ring_bell; |
| 574 | term->reset_terminal_modes_hook = w32con_reset_terminal_modes; | 574 | term->reset_terminal_modes_hook = w32con_reset_terminal_modes; |
| 575 | term->set_terminal_modes_hook = w32con_set_terminal_modes; | 575 | term->set_terminal_modes_hook = w32con_set_terminal_modes; |
| 576 | term->set_terminal_window_hook = w32con_set_terminal_window; | 576 | term->set_terminal_window_hook = w32con_set_terminal_window; |
| 577 | term->update_begin_hook = w32con_update_begin; | 577 | term->update_begin_hook = w32con_update_begin; |
| 578 | term->update_end_hook = w32con_update_end; | 578 | term->update_end_hook = w32con_update_end; |
| 579 | 579 | ||
| 580 | term->read_socket_hook = w32_console_read_socket; | 580 | term->read_socket_hook = w32_console_read_socket; |
| @@ -618,8 +618,8 @@ initialize_w32_display (struct terminal *term) | |||
| 618 | 618 | ||
| 619 | /* Respect setting of LINES and COLUMNS environment variables. */ | 619 | /* Respect setting of LINES and COLUMNS environment variables. */ |
| 620 | { | 620 | { |
| 621 | char * lines = getenv("LINES"); | 621 | char * lines = getenv ("LINES"); |
| 622 | char * columns = getenv("COLUMNS"); | 622 | char * columns = getenv ("COLUMNS"); |
| 623 | 623 | ||
| 624 | if (lines != NULL && columns != NULL) | 624 | if (lines != NULL && columns != NULL) |
| 625 | { | 625 | { |
diff --git a/src/w32fns.c b/src/w32fns.c index e27e7fecdc6..61dd8b9ee1f 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -245,7 +245,7 @@ struct MONITOR_INFO | |||
| 245 | }; | 245 | }; |
| 246 | 246 | ||
| 247 | /* Reportedly, VS 6 does not have this in its headers. */ | 247 | /* Reportedly, VS 6 does not have this in its headers. */ |
| 248 | #if defined(_MSC_VER) && _MSC_VER < 1300 | 248 | #if defined (_MSC_VER) && _MSC_VER < 1300 |
| 249 | DECLARE_HANDLE(HMONITOR); | 249 | DECLARE_HANDLE(HMONITOR); |
| 250 | #endif | 250 | #endif |
| 251 | 251 | ||
| @@ -1941,7 +1941,6 @@ x_set_title (f, name, old_name) | |||
| 1941 | } | 1941 | } |
| 1942 | } | 1942 | } |
| 1943 | 1943 | ||
| 1944 | |||
| 1945 | void x_set_scroll_bar_default_width (f) | 1944 | void x_set_scroll_bar_default_width (f) |
| 1946 | struct frame *f; | 1945 | struct frame *f; |
| 1947 | { | 1946 | { |
| @@ -3169,7 +3168,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 3169 | wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam); | 3168 | wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam); |
| 3170 | /* Get buffer size. */ | 3169 | /* Get buffer size. */ |
| 3171 | size = get_composition_string_fn (context, GCS_RESULTSTR, buffer, 0); | 3170 | size = get_composition_string_fn (context, GCS_RESULTSTR, buffer, 0); |
| 3172 | buffer = alloca(size); | 3171 | buffer = alloca (size); |
| 3173 | size = get_composition_string_fn (context, GCS_RESULTSTR, | 3172 | size = get_composition_string_fn (context, GCS_RESULTSTR, |
| 3174 | buffer, size); | 3173 | buffer, size); |
| 3175 | release_ime_context_fn (hwnd, context); | 3174 | release_ime_context_fn (hwnd, context); |
| @@ -4007,7 +4006,6 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 4007 | return DefWindowProc (hwnd, msg, wParam, lParam); | 4006 | return DefWindowProc (hwnd, msg, wParam, lParam); |
| 4008 | } | 4007 | } |
| 4009 | 4008 | ||
| 4010 | |||
| 4011 | /* The most common default return code for handled messages is 0. */ | 4009 | /* The most common default return code for handled messages is 0. */ |
| 4012 | return 0; | 4010 | return 0; |
| 4013 | } | 4011 | } |
| @@ -4460,7 +4458,6 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 4460 | x_default_parameter (f, parameters, Qright_fringe, Qnil, | 4458 | x_default_parameter (f, parameters, Qright_fringe, Qnil, |
| 4461 | "rightFringe", "RightFringe", RES_TYPE_NUMBER); | 4459 | "rightFringe", "RightFringe", RES_TYPE_NUMBER); |
| 4462 | 4460 | ||
| 4463 | |||
| 4464 | /* Init faces before x_default_parameter is called for scroll-bar | 4461 | /* Init faces before x_default_parameter is called for scroll-bar |
| 4465 | parameters because that function calls x_set_scroll_bar_width, | 4462 | parameters because that function calls x_set_scroll_bar_width, |
| 4466 | which calls change_frame_size, which calls Fset_window_buffer, | 4463 | which calls change_frame_size, which calls Fset_window_buffer, |
diff --git a/src/w32font.c b/src/w32font.c index e38e1a56fb8..679f17329ab 100644 --- a/src/w32font.c +++ b/src/w32font.c | |||
| @@ -568,7 +568,7 @@ w32font_draw (s, from, to, x, y, with_background) | |||
| 568 | 568 | ||
| 569 | /* Save clip region for later restoration. */ | 569 | /* Save clip region for later restoration. */ |
| 570 | orig_clip = CreateRectRgn (0, 0, 0, 0); | 570 | orig_clip = CreateRectRgn (0, 0, 0, 0); |
| 571 | if (!GetClipRgn(s->hdc, orig_clip)) | 571 | if (!GetClipRgn (s->hdc, orig_clip)) |
| 572 | { | 572 | { |
| 573 | DeleteObject (orig_clip); | 573 | DeleteObject (orig_clip); |
| 574 | orig_clip = NULL; | 574 | orig_clip = NULL; |
| @@ -1833,7 +1833,7 @@ w32_registry (w32_charset, font_type) | |||
| 1833 | return font_type == TRUETYPE_FONTTYPE ? Qiso10646_1 : Qunknown; | 1833 | return font_type == TRUETYPE_FONTTYPE ? Qiso10646_1 : Qunknown; |
| 1834 | 1834 | ||
| 1835 | charset = w32_to_x_charset (w32_charset, NULL); | 1835 | charset = w32_to_x_charset (w32_charset, NULL); |
| 1836 | return font_intern_prop (charset, strlen(charset), 1); | 1836 | return font_intern_prop (charset, strlen (charset), 1); |
| 1837 | } | 1837 | } |
| 1838 | 1838 | ||
| 1839 | static int | 1839 | static int |
| @@ -1847,7 +1847,7 @@ w32_decode_weight (fnweight) | |||
| 1847 | if (fnweight >= FW_NORMAL) return 100; | 1847 | if (fnweight >= FW_NORMAL) return 100; |
| 1848 | if (fnweight >= FW_LIGHT) return 50; | 1848 | if (fnweight >= FW_LIGHT) return 50; |
| 1849 | if (fnweight >= FW_EXTRALIGHT) return 40; | 1849 | if (fnweight >= FW_EXTRALIGHT) return 40; |
| 1850 | if (fnweight > FW_THIN) return 20; | 1850 | if (fnweight > FW_THIN) return 20; |
| 1851 | return 0; | 1851 | return 0; |
| 1852 | } | 1852 | } |
| 1853 | 1853 | ||
| @@ -1862,7 +1862,7 @@ w32_encode_weight (n) | |||
| 1862 | if (n >= 100) return FW_NORMAL; | 1862 | if (n >= 100) return FW_NORMAL; |
| 1863 | if (n >= 50) return FW_LIGHT; | 1863 | if (n >= 50) return FW_LIGHT; |
| 1864 | if (n >= 40) return FW_EXTRALIGHT; | 1864 | if (n >= 40) return FW_EXTRALIGHT; |
| 1865 | if (n >= 20) return FW_THIN; | 1865 | if (n >= 20) return FW_THIN; |
| 1866 | return 0; | 1866 | return 0; |
| 1867 | } | 1867 | } |
| 1868 | 1868 | ||
| @@ -1873,9 +1873,9 @@ w32_to_fc_weight (n) | |||
| 1873 | int n; | 1873 | int n; |
| 1874 | { | 1874 | { |
| 1875 | if (n >= FW_EXTRABOLD) return intern ("black"); | 1875 | if (n >= FW_EXTRABOLD) return intern ("black"); |
| 1876 | if (n >= FW_BOLD) return intern ("bold"); | 1876 | if (n >= FW_BOLD) return intern ("bold"); |
| 1877 | if (n >= FW_SEMIBOLD) return intern ("demibold"); | 1877 | if (n >= FW_SEMIBOLD) return intern ("demibold"); |
| 1878 | if (n >= FW_NORMAL) return intern ("medium"); | 1878 | if (n >= FW_NORMAL) return intern ("medium"); |
| 1879 | return intern ("light"); | 1879 | return intern ("light"); |
| 1880 | } | 1880 | } |
| 1881 | 1881 | ||
| @@ -1966,7 +1966,6 @@ fill_in_logfont (f, logfont, font_spec) | |||
| 1966 | logfont->lfPitchAndFamily = family | DEFAULT_PITCH; | 1966 | logfont->lfPitchAndFamily = family | DEFAULT_PITCH; |
| 1967 | } | 1967 | } |
| 1968 | 1968 | ||
| 1969 | |||
| 1970 | /* Set pitch based on the spacing property. */ | 1969 | /* Set pitch based on the spacing property. */ |
| 1971 | tmp = AREF (font_spec, FONT_SPACING_INDEX); | 1970 | tmp = AREF (font_spec, FONT_SPACING_INDEX); |
| 1972 | if (INTEGERP (tmp)) | 1971 | if (INTEGERP (tmp)) |
| @@ -2317,7 +2316,8 @@ w32font_full_name (font, font_obj, pixel_size, name, nbytes) | |||
| 2317 | is written. If the buffer is not large enough to contain the name, | 2316 | is written. If the buffer is not large enough to contain the name, |
| 2318 | the function returns -1, otherwise it returns the number of bytes | 2317 | the function returns -1, otherwise it returns the number of bytes |
| 2319 | written to FCNAME. */ | 2318 | written to FCNAME. */ |
| 2320 | static int logfont_to_fcname(font, pointsize, fcname, size) | 2319 | static int |
| 2320 | logfont_to_fcname (font, pointsize, fcname, size) | ||
| 2321 | LOGFONT* font; | 2321 | LOGFONT* font; |
| 2322 | int pointsize; | 2322 | int pointsize; |
| 2323 | char *fcname; | 2323 | char *fcname; |
diff --git a/src/w32heap.c b/src/w32heap.c index 440388c6eab..f3e3d3b9b90 100644 --- a/src/w32heap.c +++ b/src/w32heap.c | |||
| @@ -279,7 +279,7 @@ round_heap (unsigned long align) | |||
| 279 | sbrk (need_to_alloc); | 279 | sbrk (need_to_alloc); |
| 280 | } | 280 | } |
| 281 | 281 | ||
| 282 | #if (_MSC_VER >= 1000 && _MSC_VER < 1300 && !defined(USE_CRT_DLL)) | 282 | #if (_MSC_VER >= 1000 && _MSC_VER < 1300 && !defined (USE_CRT_DLL)) |
| 283 | 283 | ||
| 284 | /* MSVC 4.2 invokes these functions from mainCRTStartup to initialize | 284 | /* MSVC 4.2 invokes these functions from mainCRTStartup to initialize |
| 285 | a heap via HeapCreate. They are normally defined by the runtime, | 285 | a heap via HeapCreate. They are normally defined by the runtime, |
diff --git a/src/w32inevt.c b/src/w32inevt.c index 864b3b3f0bb..3aaad6b016a 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -582,8 +582,8 @@ w32_console_mouse_position (FRAME_PTR *f, | |||
| 582 | *part = 0; | 582 | *part = 0; |
| 583 | SELECTED_FRAME ()->mouse_moved = 0; | 583 | SELECTED_FRAME ()->mouse_moved = 0; |
| 584 | 584 | ||
| 585 | XSETINT(*x, movement_pos.X); | 585 | XSETINT (*x, movement_pos.X); |
| 586 | XSETINT(*y, movement_pos.Y); | 586 | XSETINT (*y, movement_pos.Y); |
| 587 | *time = movement_time; | 587 | *time = movement_time; |
| 588 | 588 | ||
| 589 | UNBLOCK_INPUT; | 589 | UNBLOCK_INPUT; |
diff --git a/src/w32menu.c b/src/w32menu.c index 73fba8108c6..82536c984b4 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -99,7 +99,7 @@ static int is_simple_dialog P_ ((Lisp_Object)); | |||
| 99 | static Lisp_Object simple_dialog_show P_ ((FRAME_PTR, Lisp_Object, Lisp_Object)); | 99 | static Lisp_Object simple_dialog_show P_ ((FRAME_PTR, Lisp_Object, Lisp_Object)); |
| 100 | #endif | 100 | #endif |
| 101 | 101 | ||
| 102 | void w32_free_menu_strings P_((HWND)); | 102 | void w32_free_menu_strings P_ ((HWND)); |
| 103 | 103 | ||
| 104 | 104 | ||
| 105 | /* This is set nonzero after the user activates the menu bar, and set | 105 | /* This is set nonzero after the user activates the menu bar, and set |
| @@ -1026,7 +1026,7 @@ w32_dialog_show (f, keymaps, title, header, error) | |||
| 1026 | Lisp_Object title, header; | 1026 | Lisp_Object title, header; |
| 1027 | char **error; | 1027 | char **error; |
| 1028 | { | 1028 | { |
| 1029 | int i, nb_buttons=0; | 1029 | int i, nb_buttons = 0; |
| 1030 | char dialog_name[6]; | 1030 | char dialog_name[6]; |
| 1031 | int menu_item_selection; | 1031 | int menu_item_selection; |
| 1032 | 1032 | ||
| @@ -1127,7 +1127,7 @@ w32_dialog_show (f, keymaps, title, header, error) | |||
| 1127 | /* Frame title: 'Q' = Question, 'I' = Information. | 1127 | /* Frame title: 'Q' = Question, 'I' = Information. |
| 1128 | Can also have 'E' = Error if, one day, we want | 1128 | Can also have 'E' = Error if, one day, we want |
| 1129 | a popup for errors. */ | 1129 | a popup for errors. */ |
| 1130 | if (NILP(header)) | 1130 | if (NILP (header)) |
| 1131 | dialog_name[0] = 'Q'; | 1131 | dialog_name[0] = 'Q'; |
| 1132 | else | 1132 | else |
| 1133 | dialog_name[0] = 'I'; | 1133 | dialog_name[0] = 'I'; |
| @@ -1213,7 +1213,8 @@ w32_dialog_show (f, keymaps, title, header, error) | |||
| 1213 | anywhere in Emacs that uses the other specific dialog choices that | 1213 | anywhere in Emacs that uses the other specific dialog choices that |
| 1214 | MessageBox provides. */ | 1214 | MessageBox provides. */ |
| 1215 | 1215 | ||
| 1216 | static int is_simple_dialog (contents) | 1216 | static int |
| 1217 | is_simple_dialog (contents) | ||
| 1217 | Lisp_Object contents; | 1218 | Lisp_Object contents; |
| 1218 | { | 1219 | { |
| 1219 | Lisp_Object options = XCDR (contents); | 1220 | Lisp_Object options = XCDR (contents); |
| @@ -1249,7 +1250,8 @@ static int is_simple_dialog (contents) | |||
| 1249 | return !(CONSP (options)); | 1250 | return !(CONSP (options)); |
| 1250 | } | 1251 | } |
| 1251 | 1252 | ||
| 1252 | static Lisp_Object simple_dialog_show (f, contents, header) | 1253 | static Lisp_Object |
| 1254 | simple_dialog_show (f, contents, header) | ||
| 1253 | FRAME_PTR f; | 1255 | FRAME_PTR f; |
| 1254 | Lisp_Object contents, header; | 1256 | Lisp_Object contents, header; |
| 1255 | { | 1257 | { |
| @@ -1328,7 +1330,6 @@ name_is_separator (name) | |||
| 1328 | return (*name == '\0' || start + 2 == name); | 1330 | return (*name == '\0' || start + 2 == name); |
| 1329 | } | 1331 | } |
| 1330 | 1332 | ||
| 1331 | |||
| 1332 | /* Indicate boundary between left and right. */ | 1333 | /* Indicate boundary between left and right. */ |
| 1333 | static int | 1334 | static int |
| 1334 | add_left_right_boundary (HMENU menu) | 1335 | add_left_right_boundary (HMENU menu) |
| @@ -1712,7 +1713,8 @@ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_ | |||
| 1712 | #endif /* HAVE_MENUS */ | 1713 | #endif /* HAVE_MENUS */ |
| 1713 | } | 1714 | } |
| 1714 | 1715 | ||
| 1715 | void syms_of_w32menu () | 1716 | void |
| 1717 | syms_of_w32menu () | ||
| 1716 | { | 1718 | { |
| 1717 | globals_of_w32menu (); | 1719 | globals_of_w32menu (); |
| 1718 | 1720 | ||
| @@ -1734,9 +1736,10 @@ void syms_of_w32menu () | |||
| 1734 | variable initialized is 0 and directly from main when initialized | 1736 | variable initialized is 0 and directly from main when initialized |
| 1735 | is non zero. | 1737 | is non zero. |
| 1736 | */ | 1738 | */ |
| 1737 | void globals_of_w32menu () | 1739 | void |
| 1740 | globals_of_w32menu () | ||
| 1738 | { | 1741 | { |
| 1739 | /* See if Get/SetMenuItemInfo functions are available. */ | 1742 | /* See if Get/SetMenuItemInfo functions are available. */ |
| 1740 | HMODULE user32 = GetModuleHandle ("user32.dll"); | 1743 | HMODULE user32 = GetModuleHandle ("user32.dll"); |
| 1741 | get_menu_item_info = (GetMenuItemInfoA_Proc) GetProcAddress (user32, "GetMenuItemInfoA"); | 1744 | get_menu_item_info = (GetMenuItemInfoA_Proc) GetProcAddress (user32, "GetMenuItemInfoA"); |
| 1742 | set_menu_item_info = (SetMenuItemInfoA_Proc) GetProcAddress (user32, "SetMenuItemInfoA"); | 1745 | set_menu_item_info = (SetMenuItemInfoA_Proc) GetProcAddress (user32, "SetMenuItemInfoA"); |
diff --git a/src/w32proc.c b/src/w32proc.c index 9d4d58f1230..07ee0300cfb 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -46,7 +46,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 46 | #include <windows.h> | 46 | #include <windows.h> |
| 47 | #ifdef __GNUC__ | 47 | #ifdef __GNUC__ |
| 48 | /* This definition is missing from mingw32 headers. */ | 48 | /* This definition is missing from mingw32 headers. */ |
| 49 | extern BOOL WINAPI IsValidLocale(LCID, DWORD); | 49 | extern BOOL WINAPI IsValidLocale (LCID, DWORD); |
| 50 | #endif | 50 | #endif |
| 51 | 51 | ||
| 52 | #ifdef HAVE_LANGINFO_CODESET | 52 | #ifdef HAVE_LANGINFO_CODESET |
| @@ -167,7 +167,7 @@ new_child (void) | |||
| 167 | child_process *cp; | 167 | child_process *cp; |
| 168 | DWORD id; | 168 | DWORD id; |
| 169 | 169 | ||
| 170 | for (cp = child_procs+(child_proc_count-1); cp >= child_procs; cp--) | 170 | for (cp = child_procs + (child_proc_count-1); cp >= child_procs; cp--) |
| 171 | if (!CHILD_ACTIVE (cp)) | 171 | if (!CHILD_ACTIVE (cp)) |
| 172 | goto Initialise; | 172 | goto Initialise; |
| 173 | if (child_proc_count == MAX_CHILDREN) | 173 | if (child_proc_count == MAX_CHILDREN) |
| @@ -175,7 +175,7 @@ new_child (void) | |||
| 175 | cp = &child_procs[child_proc_count++]; | 175 | cp = &child_procs[child_proc_count++]; |
| 176 | 176 | ||
| 177 | Initialise: | 177 | Initialise: |
| 178 | memset (cp, 0, sizeof(*cp)); | 178 | memset (cp, 0, sizeof (*cp)); |
| 179 | cp->fd = -1; | 179 | cp->fd = -1; |
| 180 | cp->pid = -1; | 180 | cp->pid = -1; |
| 181 | cp->procinfo.hProcess = NULL; | 181 | cp->procinfo.hProcess = NULL; |
| @@ -267,7 +267,7 @@ find_child_pid (DWORD pid) | |||
| 267 | { | 267 | { |
| 268 | child_process *cp; | 268 | child_process *cp; |
| 269 | 269 | ||
| 270 | for (cp = child_procs+(child_proc_count-1); cp >= child_procs; cp--) | 270 | for (cp = child_procs + (child_proc_count-1); cp >= child_procs; cp--) |
| 271 | if (CHILD_ACTIVE (cp) && pid == cp->pid) | 271 | if (CHILD_ACTIVE (cp) && pid == cp->pid) |
| 272 | return cp; | 272 | return cp; |
| 273 | return NULL; | 273 | return NULL; |
| @@ -398,7 +398,7 @@ create_child (char *exe, char *cmdline, char *env, int is_gui_app, | |||
| 398 | return TRUE; | 398 | return TRUE; |
| 399 | 399 | ||
| 400 | EH_Fail: | 400 | EH_Fail: |
| 401 | DebPrint (("create_child.CreateProcess failed: %ld\n", GetLastError());); | 401 | DebPrint (("create_child.CreateProcess failed: %ld\n", GetLastError ());); |
| 402 | return FALSE; | 402 | return FALSE; |
| 403 | } | 403 | } |
| 404 | 404 | ||
| @@ -494,7 +494,7 @@ sys_wait (int *status) | |||
| 494 | } | 494 | } |
| 495 | else | 495 | else |
| 496 | { | 496 | { |
| 497 | for (cp = child_procs+(child_proc_count-1); cp >= child_procs; cp--) | 497 | for (cp = child_procs + (child_proc_count-1); cp >= child_procs; cp--) |
| 498 | /* some child_procs might be sockets; ignore them */ | 498 | /* some child_procs might be sockets; ignore them */ |
| 499 | if (CHILD_ACTIVE (cp) && cp->procinfo.hProcess | 499 | if (CHILD_ACTIVE (cp) && cp->procinfo.hProcess |
| 500 | && (cp->fd < 0 || (fd_info[cp->fd].flags & FILE_AT_EOF) != 0)) | 500 | && (cp->fd < 0 || (fd_info[cp->fd].flags & FILE_AT_EOF) != 0)) |
| @@ -891,7 +891,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp) | |||
| 891 | escape_char = is_cygnus_app ? '"' : '\\'; | 891 | escape_char = is_cygnus_app ? '"' : '\\'; |
| 892 | } | 892 | } |
| 893 | 893 | ||
| 894 | /* Cygwin apps needs quoting a bit more often */ | 894 | /* Cygwin apps needs quoting a bit more often. */ |
| 895 | if (escape_char == '"') | 895 | if (escape_char == '"') |
| 896 | sepchars = "\r\n\t\f '"; | 896 | sepchars = "\r\n\t\f '"; |
| 897 | 897 | ||
| @@ -1241,7 +1241,7 @@ sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, | |||
| 1241 | count_children: | 1241 | count_children: |
| 1242 | /* Add handles of child processes. */ | 1242 | /* Add handles of child processes. */ |
| 1243 | nc = 0; | 1243 | nc = 0; |
| 1244 | for (cp = child_procs+(child_proc_count-1); cp >= child_procs; cp--) | 1244 | for (cp = child_procs + (child_proc_count-1); cp >= child_procs; cp--) |
| 1245 | /* Some child_procs might be sockets; ignore them. Also some | 1245 | /* Some child_procs might be sockets; ignore them. Also some |
| 1246 | children may have died already, but we haven't finished reading | 1246 | children may have died already, but we haven't finished reading |
| 1247 | the process output; ignore them too. */ | 1247 | the process output; ignore them too. */ |
| @@ -1719,7 +1719,7 @@ also loaded immediately if not already loaded. If winsock is loaded, | |||
| 1719 | the winsock local hostname is returned (since this may be different from | 1719 | the winsock local hostname is returned (since this may be different from |
| 1720 | the value of `system-name' and should supplant it), otherwise t is | 1720 | the value of `system-name' and should supplant it), otherwise t is |
| 1721 | returned to indicate winsock support is present. */) | 1721 | returned to indicate winsock support is present. */) |
| 1722 | (load_now) | 1722 | (load_now) |
| 1723 | Lisp_Object load_now; | 1723 | Lisp_Object load_now; |
| 1724 | { | 1724 | { |
| 1725 | int have_winsock; | 1725 | int have_winsock; |
| @@ -1797,7 +1797,7 @@ DEFUN ("w32-long-file-name", Fw32_long_file_name, Sw32_long_file_name, | |||
| 1797 | doc: /* Return the long file name version of the full path of FILENAME. | 1797 | doc: /* Return the long file name version of the full path of FILENAME. |
| 1798 | If FILENAME does not exist, return nil. | 1798 | If FILENAME does not exist, return nil. |
| 1799 | All path elements in FILENAME are converted to their long names. */) | 1799 | All path elements in FILENAME are converted to their long names. */) |
| 1800 | (filename) | 1800 | (filename) |
| 1801 | Lisp_Object filename; | 1801 | Lisp_Object filename; |
| 1802 | { | 1802 | { |
| 1803 | char longname[ MAX_PATH ]; | 1803 | char longname[ MAX_PATH ]; |
| @@ -1835,7 +1835,7 @@ PRIORITY should be one of the symbols high, normal, or low; | |||
| 1835 | any other symbol will be interpreted as normal. | 1835 | any other symbol will be interpreted as normal. |
| 1836 | 1836 | ||
| 1837 | If successful, the return value is t, otherwise nil. */) | 1837 | If successful, the return value is t, otherwise nil. */) |
| 1838 | (process, priority) | 1838 | (process, priority) |
| 1839 | Lisp_Object process, priority; | 1839 | Lisp_Object process, priority; |
| 1840 | { | 1840 | { |
| 1841 | HANDLE proc_handle = GetCurrentProcess (); | 1841 | HANDLE proc_handle = GetCurrentProcess (); |
| @@ -1881,7 +1881,8 @@ If successful, the return value is t, otherwise nil. */) | |||
| 1881 | 1881 | ||
| 1882 | #ifdef HAVE_LANGINFO_CODESET | 1882 | #ifdef HAVE_LANGINFO_CODESET |
| 1883 | /* Emulation of nl_langinfo. Used in fns.c:Flocale_info. */ | 1883 | /* Emulation of nl_langinfo. Used in fns.c:Flocale_info. */ |
| 1884 | char *nl_langinfo (nl_item item) | 1884 | char * |
| 1885 | nl_langinfo (nl_item item) | ||
| 1885 | { | 1886 | { |
| 1886 | /* Conversion of Posix item numbers to their Windows equivalents. */ | 1887 | /* Conversion of Posix item numbers to their Windows equivalents. */ |
| 1887 | static const LCTYPE w32item[] = { | 1888 | static const LCTYPE w32item[] = { |
| @@ -2009,13 +2010,14 @@ human-readable form. */) | |||
| 2009 | return make_number (GetThreadLocale ()); | 2010 | return make_number (GetThreadLocale ()); |
| 2010 | } | 2011 | } |
| 2011 | 2012 | ||
| 2012 | DWORD int_from_hex (char * s) | 2013 | DWORD |
| 2014 | int_from_hex (char * s) | ||
| 2013 | { | 2015 | { |
| 2014 | DWORD val = 0; | 2016 | DWORD val = 0; |
| 2015 | static char hex[] = "0123456789abcdefABCDEF"; | 2017 | static char hex[] = "0123456789abcdefABCDEF"; |
| 2016 | char * p; | 2018 | char * p; |
| 2017 | 2019 | ||
| 2018 | while (*s && (p = strchr(hex, *s)) != NULL) | 2020 | while (*s && (p = strchr (hex, *s)) != NULL) |
| 2019 | { | 2021 | { |
| 2020 | unsigned digit = p - hex; | 2022 | unsigned digit = p - hex; |
| 2021 | if (digit > 15) | 2023 | if (digit > 15) |
| @@ -2030,7 +2032,8 @@ DWORD int_from_hex (char * s) | |||
| 2030 | function isn't given a context pointer. */ | 2032 | function isn't given a context pointer. */ |
| 2031 | Lisp_Object Vw32_valid_locale_ids; | 2033 | Lisp_Object Vw32_valid_locale_ids; |
| 2032 | 2034 | ||
| 2033 | BOOL CALLBACK enum_locale_fn (LPTSTR localeNum) | 2035 | BOOL CALLBACK |
| 2036 | enum_locale_fn (LPTSTR localeNum) | ||
| 2034 | { | 2037 | { |
| 2035 | DWORD id = int_from_hex (localeNum); | 2038 | DWORD id = int_from_hex (localeNum); |
| 2036 | Vw32_valid_locale_ids = Fcons (make_number (id), Vw32_valid_locale_ids); | 2039 | Vw32_valid_locale_ids = Fcons (make_number (id), Vw32_valid_locale_ids); |
| @@ -2095,7 +2098,8 @@ If successful, the new locale id is returned, otherwise nil. */) | |||
| 2095 | function isn't given a context pointer. */ | 2098 | function isn't given a context pointer. */ |
| 2096 | Lisp_Object Vw32_valid_codepages; | 2099 | Lisp_Object Vw32_valid_codepages; |
| 2097 | 2100 | ||
| 2098 | BOOL CALLBACK enum_codepage_fn (LPTSTR codepageNum) | 2101 | BOOL CALLBACK |
| 2102 | enum_codepage_fn (LPTSTR codepageNum) | ||
| 2099 | { | 2103 | { |
| 2100 | DWORD id = atoi (codepageNum); | 2104 | DWORD id = atoi (codepageNum); |
| 2101 | Vw32_valid_codepages = Fcons (make_number (id), Vw32_valid_codepages); | 2105 | Vw32_valid_codepages = Fcons (make_number (id), Vw32_valid_codepages); |
| @@ -2271,6 +2275,7 @@ If successful, the new layout id is returned, otherwise nil. */) | |||
| 2271 | } | 2275 | } |
| 2272 | 2276 | ||
| 2273 | 2277 | ||
| 2278 | void | ||
| 2274 | syms_of_ntproc () | 2279 | syms_of_ntproc () |
| 2275 | { | 2280 | { |
| 2276 | DEFSYM (Qhigh, "high"); | 2281 | DEFSYM (Qhigh, "high"); |
diff --git a/src/w32select.c b/src/w32select.c index 2da4b333c2a..25abacbc75d 100644 --- a/src/w32select.c +++ b/src/w32select.c | |||
| @@ -30,7 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | * (CF_UNICODETEXT), when a well-known console codepage is given, they | 30 | * (CF_UNICODETEXT), when a well-known console codepage is given, they |
| 31 | * apply to the console version of the clipboard data (CF_OEMTEXT), | 31 | * apply to the console version of the clipboard data (CF_OEMTEXT), |
| 32 | * else they apply to the normal 8-bit text clipboard (CF_TEXT). | 32 | * else they apply to the normal 8-bit text clipboard (CF_TEXT). |
| 33 | * | 33 | * |
| 34 | * When pasting (getting data from the OS), the clipboard format that | 34 | * When pasting (getting data from the OS), the clipboard format that |
| 35 | * matches the {next-}selection-coding-system is retrieved. If | 35 | * matches the {next-}selection-coding-system is retrieved. If |
| 36 | * Unicode is requested, but not available, 8-bit text (CF_TEXT) is | 36 | * Unicode is requested, but not available, 8-bit text (CF_TEXT) is |
| @@ -45,13 +45,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 45 | * | 45 | * |
| 46 | * Scenarios to use the facilities for customizing the selection | 46 | * Scenarios to use the facilities for customizing the selection |
| 47 | * coding system are: | 47 | * coding system are: |
| 48 | * | 48 | * |
| 49 | * ;; Generally use KOI8-R instead of the russian MS codepage for | 49 | * ;; Generally use KOI8-R instead of the russian MS codepage for |
| 50 | * ;; the 8-bit clipboard. | 50 | * ;; the 8-bit clipboard. |
| 51 | * (set-selection-coding-system 'koi8-r-dos) | 51 | * (set-selection-coding-system 'koi8-r-dos) |
| 52 | * | 52 | * |
| 53 | * Or | 53 | * Or |
| 54 | * | 54 | * |
| 55 | * ;; Create a special clipboard copy function that uses codepage | 55 | * ;; Create a special clipboard copy function that uses codepage |
| 56 | * ;; 1253 (Greek) to copy Greek text to a specific non-Unicode | 56 | * ;; 1253 (Greek) to copy Greek text to a specific non-Unicode |
| 57 | * ;; application. | 57 | * ;; application. |
| @@ -71,7 +71,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 71 | * types should be supported is also moved to Lisp, functionality | 71 | * types should be supported is also moved to Lisp, functionality |
| 72 | * could be expanded to CF_HTML, CF_RTF and maybe other types. | 72 | * could be expanded to CF_HTML, CF_RTF and maybe other types. |
| 73 | */ | 73 | */ |
| 74 | 74 | ||
| 75 | #include <config.h> | 75 | #include <config.h> |
| 76 | #include <setjmp.h> | 76 | #include <setjmp.h> |
| 77 | #include "lisp.h" | 77 | #include "lisp.h" |
| @@ -220,11 +220,11 @@ convert_to_handle_as_coded (Lisp_Object coding_system) | |||
| 220 | unsigned char *dst = NULL; | 220 | unsigned char *dst = NULL; |
| 221 | struct coding_system coding; | 221 | struct coding_system coding; |
| 222 | 222 | ||
| 223 | ONTRACE (fprintf (stderr, "convert_to_handle_as_coded: %s\n", | 223 | ONTRACE (fprintf (stderr, "convert_to_handle_as_coded: %s\n", |
| 224 | SDATA (SYMBOL_NAME (coding_system)))); | 224 | SDATA (SYMBOL_NAME (coding_system)))); |
| 225 | 225 | ||
| 226 | setup_windows_coding_system (coding_system, &coding); | 226 | setup_windows_coding_system (coding_system, &coding); |
| 227 | coding.dst_bytes = SBYTES(current_text) * 2; | 227 | coding.dst_bytes = SBYTES (current_text) * 2; |
| 228 | coding.destination = (unsigned char *) xmalloc (coding.dst_bytes); | 228 | coding.destination = (unsigned char *) xmalloc (coding.dst_bytes); |
| 229 | encode_coding_object (&coding, current_text, 0, 0, | 229 | encode_coding_object (&coding, current_text, 0, 0, |
| 230 | SCHARS (current_text), SBYTES (current_text), Qnil); | 230 | SCHARS (current_text), SBYTES (current_text), Qnil); |
| @@ -290,7 +290,7 @@ render (Lisp_Object oformat) | |||
| 290 | 290 | ||
| 291 | if (SetClipboardData (format, htext) == NULL) | 291 | if (SetClipboardData (format, htext) == NULL) |
| 292 | { | 292 | { |
| 293 | GlobalFree(htext); | 293 | GlobalFree (htext); |
| 294 | return Qnil; | 294 | return Qnil; |
| 295 | } | 295 | } |
| 296 | 296 | ||
| @@ -314,7 +314,7 @@ render_locale (void) | |||
| 314 | 314 | ||
| 315 | if ((lcid_ptr = (LCID *) GlobalLock (hlocale)) == NULL) | 315 | if ((lcid_ptr = (LCID *) GlobalLock (hlocale)) == NULL) |
| 316 | { | 316 | { |
| 317 | GlobalFree(hlocale); | 317 | GlobalFree (hlocale); |
| 318 | return Qnil; | 318 | return Qnil; |
| 319 | } | 319 | } |
| 320 | 320 | ||
| @@ -323,7 +323,7 @@ render_locale (void) | |||
| 323 | 323 | ||
| 324 | if (SetClipboardData (CF_LOCALE, hlocale) == NULL) | 324 | if (SetClipboardData (CF_LOCALE, hlocale) == NULL) |
| 325 | { | 325 | { |
| 326 | GlobalFree(hlocale); | 326 | GlobalFree (hlocale); |
| 327 | return Qnil; | 327 | return Qnil; |
| 328 | } | 328 | } |
| 329 | 329 | ||
| @@ -380,7 +380,7 @@ render_all (void) | |||
| 380 | automatic conversions anywhere else, so to get consistent | 380 | automatic conversions anywhere else, so to get consistent |
| 381 | results, we probably don't want to rely on it here either. */ | 381 | results, we probably don't want to rely on it here either. */ |
| 382 | 382 | ||
| 383 | render_locale(); | 383 | render_locale (); |
| 384 | 384 | ||
| 385 | if (current_clipboard_type == CF_UNICODETEXT) | 385 | if (current_clipboard_type == CF_UNICODETEXT) |
| 386 | render (make_number (CF_TEXT)); | 386 | render (make_number (CF_TEXT)); |
| @@ -514,7 +514,7 @@ setup_config (void) | |||
| 514 | && EQ (cfg_coding_system, dos_coding_system)) | 514 | && EQ (cfg_coding_system, dos_coding_system)) |
| 515 | return; | 515 | return; |
| 516 | cfg_coding_system = dos_coding_system; | 516 | cfg_coding_system = dos_coding_system; |
| 517 | 517 | ||
| 518 | /* Set some sensible fallbacks */ | 518 | /* Set some sensible fallbacks */ |
| 519 | cfg_codepage = ANSICP; | 519 | cfg_codepage = ANSICP; |
| 520 | cfg_lcid = LOCALE_NEUTRAL; | 520 | cfg_lcid = LOCALE_NEUTRAL; |
| @@ -583,7 +583,7 @@ enum_locale_callback (/*const*/ char* loc_string) | |||
| 583 | cfg_clipboard_type = CF_TEXT; | 583 | cfg_clipboard_type = CF_TEXT; |
| 584 | return FALSE; /* Stop enumeration */ | 584 | return FALSE; /* Stop enumeration */ |
| 585 | } | 585 | } |
| 586 | 586 | ||
| 587 | /* Is the wanted codepage the OEM codepage for this locale? */ | 587 | /* Is the wanted codepage the OEM codepage for this locale? */ |
| 588 | codepage = cp_from_locale (lcid, CF_OEMTEXT); | 588 | codepage = cp_from_locale (lcid, CF_OEMTEXT); |
| 589 | if (codepage == cfg_codepage) | 589 | if (codepage == cfg_codepage) |
| @@ -704,7 +704,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, | |||
| 704 | current_lcid = cfg_lcid; | 704 | current_lcid = cfg_lcid; |
| 705 | current_num_nls = 0; | 705 | current_num_nls = 0; |
| 706 | current_requires_encoding = 0; | 706 | current_requires_encoding = 0; |
| 707 | 707 | ||
| 708 | BLOCK_INPUT; | 708 | BLOCK_INPUT; |
| 709 | 709 | ||
| 710 | /* Check for non-ASCII characters. While we are at it, count the | 710 | /* Check for non-ASCII characters. While we are at it, count the |
| @@ -744,7 +744,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, | |||
| 744 | /* If we have something non-ASCII we may want to set a locale. We | 744 | /* If we have something non-ASCII we may want to set a locale. We |
| 745 | do that directly (non-delayed), as it's just a small bit. */ | 745 | do that directly (non-delayed), as it's just a small bit. */ |
| 746 | if (ok) | 746 | if (ok) |
| 747 | ok = !NILP(render_locale()); | 747 | ok = !NILP (render_locale ()); |
| 748 | 748 | ||
| 749 | if (ok) | 749 | if (ok) |
| 750 | { | 750 | { |
| @@ -753,7 +753,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, | |||
| 753 | /* If for some reason we don't have a clipboard_owner, we | 753 | /* If for some reason we don't have a clipboard_owner, we |
| 754 | just set the text format as chosen by the configuration | 754 | just set the text format as chosen by the configuration |
| 755 | and than forget about the whole thing. */ | 755 | and than forget about the whole thing. */ |
| 756 | ok = !NILP(render (make_number (current_clipboard_type))); | 756 | ok = !NILP (render (make_number (current_clipboard_type))); |
| 757 | current_text = Qnil; | 757 | current_text = Qnil; |
| 758 | current_coding_system = Qnil; | 758 | current_coding_system = Qnil; |
| 759 | } | 759 | } |
| @@ -884,7 +884,7 @@ DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data, | |||
| 884 | struct coding_system coding; | 884 | struct coding_system coding; |
| 885 | Lisp_Object coding_system = Qnil; | 885 | Lisp_Object coding_system = Qnil; |
| 886 | Lisp_Object dos_coding_system; | 886 | Lisp_Object dos_coding_system; |
| 887 | 887 | ||
| 888 | /* `next-selection-coding-system' should override everything, | 888 | /* `next-selection-coding-system' should override everything, |
| 889 | even when the locale passed by the system disagrees. The | 889 | even when the locale passed by the system disagrees. The |
| 890 | only exception is when `next-selection-coding-system' | 890 | only exception is when `next-selection-coding-system' |
| @@ -1027,7 +1027,7 @@ the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. | |||
| 1027 | \(Those are literal upper-case symbol names, since that's what X expects.) | 1027 | \(Those are literal upper-case symbol names, since that's what X expects.) |
| 1028 | For convenience, the symbol nil is the same as `PRIMARY', | 1028 | For convenience, the symbol nil is the same as `PRIMARY', |
| 1029 | and t is the same as `SECONDARY'. */) | 1029 | and t is the same as `SECONDARY'. */) |
| 1030 | (selection) | 1030 | (selection) |
| 1031 | Lisp_Object selection; | 1031 | Lisp_Object selection; |
| 1032 | { | 1032 | { |
| 1033 | CHECK_SYMBOL (selection); | 1033 | CHECK_SYMBOL (selection); |
| @@ -1076,7 +1076,7 @@ syms_of_w32select () | |||
| 1076 | When sending or receiving text via cut_buffer, selection, and | 1076 | When sending or receiving text via cut_buffer, selection, and |
| 1077 | clipboard, the text is encoded or decoded by this coding system. | 1077 | clipboard, the text is encoded or decoded by this coding system. |
| 1078 | The default value is the current system default encoding on 9x/Me and | 1078 | The default value is the current system default encoding on 9x/Me and |
| 1079 | `utf-16le-dos' (Unicode) on NT/W2K/XP. */); | 1079 | `utf-16le-dos' (Unicode) on NT/W2K/XP. */); |
| 1080 | /* The actual value is set dynamically in the dumped Emacs, see | 1080 | /* The actual value is set dynamically in the dumped Emacs, see |
| 1081 | below. */ | 1081 | below. */ |
| 1082 | Vselection_coding_system = Qnil; | 1082 | Vselection_coding_system = Qnil; |
diff --git a/src/w32term.c b/src/w32term.c index 801c56bf994..bda7438f78a 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -325,8 +325,9 @@ XChangeGC (void * ignore, XGCValues* gc, unsigned long mask, | |||
| 325 | gc->font = xgcv->font; | 325 | gc->font = xgcv->font; |
| 326 | } | 326 | } |
| 327 | 327 | ||
| 328 | XGCValues *XCreateGC (void * ignore, Window window, unsigned long mask, | 328 | XGCValues * |
| 329 | XGCValues *xgcv) | 329 | XCreateGC (void * ignore, Window window, unsigned long mask, |
| 330 | XGCValues *xgcv) | ||
| 330 | { | 331 | { |
| 331 | XGCValues *gc = (XGCValues *) xmalloc (sizeof (XGCValues)); | 332 | XGCValues *gc = (XGCValues *) xmalloc (sizeof (XGCValues)); |
| 332 | bzero (gc, sizeof (XGCValues)); | 333 | bzero (gc, sizeof (XGCValues)); |
| @@ -338,7 +339,7 @@ XGCValues *XCreateGC (void * ignore, Window window, unsigned long mask, | |||
| 338 | 339 | ||
| 339 | void | 340 | void |
| 340 | XGetGCValues (void* ignore, XGCValues *gc, | 341 | XGetGCValues (void* ignore, XGCValues *gc, |
| 341 | unsigned long mask, XGCValues *xgcv) | 342 | unsigned long mask, XGCValues *xgcv) |
| 342 | { | 343 | { |
| 343 | XChangeGC (ignore, xgcv, mask, gc); | 344 | XChangeGC (ignore, xgcv, mask, gc); |
| 344 | } | 345 | } |
| @@ -920,7 +921,7 @@ w32_set_terminal_modes (struct terminal *term) | |||
| 920 | { | 921 | { |
| 921 | } | 922 | } |
| 922 | 923 | ||
| 923 | /* This is called when exiting or suspending Emacs. Exiting will make | 924 | /* This is called when exiting or suspending Emacs. Exiting will make |
| 924 | the W32 windows go away, and suspending requires no action. */ | 925 | the W32 windows go away, and suspending requires no action. */ |
| 925 | 926 | ||
| 926 | static void | 927 | static void |
| @@ -2410,7 +2411,7 @@ x_draw_glyph_string (s) | |||
| 2410 | 2411 | ||
| 2411 | /* Draw strike-through. */ | 2412 | /* Draw strike-through. */ |
| 2412 | if (s->face->strike_through_p | 2413 | if (s->face->strike_through_p |
| 2413 | && !FONT_TEXTMETRIC(s->font).tmStruckOut) | 2414 | && !FONT_TEXTMETRIC (s->font).tmStruckOut) |
| 2414 | { | 2415 | { |
| 2415 | unsigned long h = 1; | 2416 | unsigned long h = 1; |
| 2416 | unsigned long dy = (s->height - h) / 2; | 2417 | unsigned long dy = (s->height - h) / 2; |
| @@ -2889,7 +2890,8 @@ x_get_keysym_name (keysym) | |||
| 2889 | return value; | 2890 | return value; |
| 2890 | } | 2891 | } |
| 2891 | 2892 | ||
| 2892 | static int codepage_for_locale(LCID locale) | 2893 | static int |
| 2894 | codepage_for_locale (LCID locale) | ||
| 2893 | { | 2895 | { |
| 2894 | char cp[20]; | 2896 | char cp[20]; |
| 2895 | 2897 | ||
| @@ -3388,7 +3390,7 @@ w32_set_scroll_bar_thumb (bar, portion, position, whole) | |||
| 3388 | BLOCK_INPUT; | 3390 | BLOCK_INPUT; |
| 3389 | si.cbSize = sizeof (si); | 3391 | si.cbSize = sizeof (si); |
| 3390 | si.fMask = SIF_POS | SIF_PAGE; | 3392 | si.fMask = SIF_POS | SIF_PAGE; |
| 3391 | GetScrollInfo(w, SB_CTL, &si); | 3393 | GetScrollInfo (w, SB_CTL, &si); |
| 3392 | near_bottom_p = si.nPos + si.nPage >= range; | 3394 | near_bottom_p = si.nPos + si.nPage >= range; |
| 3393 | UNBLOCK_INPUT; | 3395 | UNBLOCK_INPUT; |
| 3394 | if (!near_bottom_p) | 3396 | if (!near_bottom_p) |
| @@ -4284,7 +4286,7 @@ w32_read_socket (sd, expected, hold_quit) | |||
| 4284 | temp_index = 0; | 4286 | temp_index = 0; |
| 4285 | temp_buffer[temp_index++] = msg.msg.wParam; | 4287 | temp_buffer[temp_index++] = msg.msg.wParam; |
| 4286 | inev.kind = MULTIMEDIA_KEY_EVENT; | 4288 | inev.kind = MULTIMEDIA_KEY_EVENT; |
| 4287 | inev.code = GET_APPCOMMAND_LPARAM(msg.msg.lParam); | 4289 | inev.code = GET_APPCOMMAND_LPARAM (msg.msg.lParam); |
| 4288 | inev.modifiers = msg.dwModifiers; | 4290 | inev.modifiers = msg.dwModifiers; |
| 4289 | XSETFRAME (inev.frame_or_window, f); | 4291 | XSETFRAME (inev.frame_or_window, f); |
| 4290 | inev.timestamp = msg.msg.time; | 4292 | inev.timestamp = msg.msg.time; |
| @@ -4332,7 +4334,7 @@ w32_read_socket (sd, expected, hold_quit) | |||
| 4332 | selected now and last mouse movement event was | 4334 | selected now and last mouse movement event was |
| 4333 | not in it. Minibuffer window will be selected | 4335 | not in it. Minibuffer window will be selected |
| 4334 | only when it is active. */ | 4336 | only when it is active. */ |
| 4335 | if (WINDOWP(window) | 4337 | if (WINDOWP (window) |
| 4336 | && !EQ (window, last_window) | 4338 | && !EQ (window, last_window) |
| 4337 | && !EQ (window, selected_window) | 4339 | && !EQ (window, selected_window) |
| 4338 | /* For click-to-focus window managers | 4340 | /* For click-to-focus window managers |
| @@ -4346,7 +4348,7 @@ w32_read_socket (sd, expected, hold_quit) | |||
| 4346 | inev.frame_or_window = window; | 4348 | inev.frame_or_window = window; |
| 4347 | } | 4349 | } |
| 4348 | 4350 | ||
| 4349 | last_window=window; | 4351 | last_window = window; |
| 4350 | } | 4352 | } |
| 4351 | if (!note_mouse_movement (f, &msg.msg)) | 4353 | if (!note_mouse_movement (f, &msg.msg)) |
| 4352 | help_echo_string = previous_help_echo_string; | 4354 | help_echo_string = previous_help_echo_string; |
| @@ -5485,8 +5487,8 @@ x_set_window_size (f, change_gravity, cols, rows) | |||
| 5485 | rect.right = pixelwidth; | 5487 | rect.right = pixelwidth; |
| 5486 | rect.bottom = pixelheight; | 5488 | rect.bottom = pixelheight; |
| 5487 | 5489 | ||
| 5488 | AdjustWindowRect(&rect, f->output_data.w32->dwStyle, | 5490 | AdjustWindowRect (&rect, f->output_data.w32->dwStyle, |
| 5489 | FRAME_EXTERNAL_MENU_BAR (f)); | 5491 | FRAME_EXTERNAL_MENU_BAR (f)); |
| 5490 | 5492 | ||
| 5491 | my_set_window_pos (FRAME_W32_WINDOW (f), | 5493 | my_set_window_pos (FRAME_W32_WINDOW (f), |
| 5492 | NULL, | 5494 | NULL, |
| @@ -5739,8 +5741,8 @@ x_make_frame_visible (f) | |||
| 5739 | 5741 | ||
| 5740 | /* Adjust vertical window position in order to avoid being | 5742 | /* Adjust vertical window position in order to avoid being |
| 5741 | covered by a task bar placed at the bottom of the desktop. */ | 5743 | covered by a task bar placed at the bottom of the desktop. */ |
| 5742 | SystemParametersInfo(SPI_GETWORKAREA, 0, &workarea_rect, 0); | 5744 | SystemParametersInfo (SPI_GETWORKAREA, 0, &workarea_rect, 0); |
| 5743 | GetWindowRect(FRAME_W32_WINDOW(f), &window_rect); | 5745 | GetWindowRect (FRAME_W32_WINDOW (f), &window_rect); |
| 5744 | if (window_rect.bottom > workarea_rect.bottom | 5746 | if (window_rect.bottom > workarea_rect.bottom |
| 5745 | && window_rect.top > workarea_rect.top) | 5747 | && window_rect.top > workarea_rect.top) |
| 5746 | f->top_pos = max (window_rect.top | 5748 | f->top_pos = max (window_rect.top |
| @@ -6310,7 +6312,7 @@ x_delete_display (dpyinfo) | |||
| 6310 | } | 6312 | } |
| 6311 | dpyinfo->color_list = NULL; | 6313 | dpyinfo->color_list = NULL; |
| 6312 | if (dpyinfo->palette) | 6314 | if (dpyinfo->palette) |
| 6313 | DeleteObject(dpyinfo->palette); | 6315 | DeleteObject (dpyinfo->palette); |
| 6314 | } | 6316 | } |
| 6315 | xfree (dpyinfo->w32_id_name); | 6317 | xfree (dpyinfo->w32_id_name); |
| 6316 | 6318 | ||
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 9cd1ac6426c..6d75aa27f8a 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c | |||
| @@ -175,7 +175,7 @@ uniscribe_otf_capability (font) | |||
| 175 | 175 | ||
| 176 | f = XFRAME (selected_frame); | 176 | f = XFRAME (selected_frame); |
| 177 | context = get_frame_dc (f); | 177 | context = get_frame_dc (f); |
| 178 | old_font = SelectObject (context, FONT_HANDLE(font)); | 178 | old_font = SelectObject (context, FONT_HANDLE (font)); |
| 179 | 179 | ||
| 180 | features = otf_features (context, "GSUB"); | 180 | features = otf_features (context, "GSUB"); |
| 181 | XSETCAR (capability, features); | 181 | XSETCAR (capability, features); |
| @@ -287,7 +287,7 @@ uniscribe_shape (lgstring) | |||
| 287 | passed in. */ | 287 | passed in. */ |
| 288 | f = XFRAME (selected_frame); | 288 | f = XFRAME (selected_frame); |
| 289 | context = get_frame_dc (f); | 289 | context = get_frame_dc (f); |
| 290 | old_font = SelectObject (context, FONT_HANDLE(font)); | 290 | old_font = SelectObject (context, FONT_HANDLE (font)); |
| 291 | 291 | ||
| 292 | result = ScriptShape (context, &(uniscribe_font->cache), | 292 | result = ScriptShape (context, &(uniscribe_font->cache), |
| 293 | chars + items[i].iCharPos, nchars_in_run, | 293 | chars + items[i].iCharPos, nchars_in_run, |
| @@ -322,7 +322,7 @@ uniscribe_shape (lgstring) | |||
| 322 | /* Cache not complete... */ | 322 | /* Cache not complete... */ |
| 323 | f = XFRAME (selected_frame); | 323 | f = XFRAME (selected_frame); |
| 324 | context = get_frame_dc (f); | 324 | context = get_frame_dc (f); |
| 325 | old_font = SelectObject (context, FONT_HANDLE(font)); | 325 | old_font = SelectObject (context, FONT_HANDLE (font)); |
| 326 | 326 | ||
| 327 | result = ScriptPlace (context, &(uniscribe_font->cache), | 327 | result = ScriptPlace (context, &(uniscribe_font->cache), |
| 328 | glyphs, nglyphs, attributes, &(items[i].a), | 328 | glyphs, nglyphs, attributes, &(items[i].a), |
| @@ -397,7 +397,7 @@ uniscribe_shape (lgstring) | |||
| 397 | /* Cache incomplete... */ | 397 | /* Cache incomplete... */ |
| 398 | f = XFRAME (selected_frame); | 398 | f = XFRAME (selected_frame); |
| 399 | context = get_frame_dc (f); | 399 | context = get_frame_dc (f); |
| 400 | old_font = SelectObject (context, FONT_HANDLE(font)); | 400 | old_font = SelectObject (context, FONT_HANDLE (font)); |
| 401 | result = ScriptGetGlyphABCWidth (context, | 401 | result = ScriptGetGlyphABCWidth (context, |
| 402 | &(uniscribe_font->cache), | 402 | &(uniscribe_font->cache), |
| 403 | glyphs[j], &char_metric); | 403 | glyphs[j], &char_metric); |
| @@ -509,7 +509,7 @@ uniscribe_encode_char (font, c) | |||
| 509 | the frame. */ | 509 | the frame. */ |
| 510 | f = XFRAME (selected_frame); | 510 | f = XFRAME (selected_frame); |
| 511 | context = get_frame_dc (f); | 511 | context = get_frame_dc (f); |
| 512 | old_font = SelectObject (context, FONT_HANDLE(font)); | 512 | old_font = SelectObject (context, FONT_HANDLE (font)); |
| 513 | result = ScriptShape (context, &(uniscribe_font->cache), | 513 | result = ScriptShape (context, &(uniscribe_font->cache), |
| 514 | ch, len, 2, &(items[0].a), | 514 | ch, len, 2, &(items[0].a), |
| 515 | glyphs, clusters, attrs, &nglyphs); | 515 | glyphs, clusters, attrs, &nglyphs); |
| @@ -650,7 +650,8 @@ static char* NOTHING = " "; | |||
| 650 | /* Check if font supports the otf script/language/features specified. | 650 | /* Check if font supports the otf script/language/features specified. |
| 651 | OTF_SPEC is in the format | 651 | OTF_SPEC is in the format |
| 652 | (script lang [(gsub_feature ...)|nil] [(gpos_feature ...)]?) */ | 652 | (script lang [(gsub_feature ...)|nil] [(gpos_feature ...)]?) */ |
| 653 | int uniscribe_check_otf (font, otf_spec) | 653 | int |
| 654 | uniscribe_check_otf (font, otf_spec) | ||
| 654 | LOGFONT *font; | 655 | LOGFONT *font; |
| 655 | Lisp_Object otf_spec; | 656 | Lisp_Object otf_spec; |
| 656 | { | 657 | { |
| @@ -947,7 +948,7 @@ struct font_driver uniscribe_font_driver = | |||
| 947 | NULL, /* get_outline */ | 948 | NULL, /* get_outline */ |
| 948 | NULL, /* free_outline */ | 949 | NULL, /* free_outline */ |
| 949 | NULL, /* anchor_point */ | 950 | NULL, /* anchor_point */ |
| 950 | uniscribe_otf_capability, /* Defined so (font-get FONTOBJ :otf) works. */ | 951 | uniscribe_otf_capability, /* Defined so (font-get FONTOBJ :otf) works. */ |
| 951 | NULL, /* otf_drive - use shape instead. */ | 952 | NULL, /* otf_drive - use shape instead. */ |
| 952 | NULL, /* start_for_frame */ | 953 | NULL, /* start_for_frame */ |
| 953 | NULL, /* end_for_frame */ | 954 | NULL, /* end_for_frame */ |
diff --git a/src/w32xfns.c b/src/w32xfns.c index d77eb6b68ea..7e2a3704dff 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c | |||
| @@ -216,7 +216,7 @@ get_next_msg (lpmsg, bWait) | |||
| 216 | if (!UnionRect (&(lpmsg->rect), &(lpmsg->rect), | 216 | if (!UnionRect (&(lpmsg->rect), &(lpmsg->rect), |
| 217 | &(lpCur->w32msg.rect))) | 217 | &(lpCur->w32msg.rect))) |
| 218 | { | 218 | { |
| 219 | SetRectEmpty(&(lpmsg->rect)); | 219 | SetRectEmpty (&(lpmsg->rect)); |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | myfree (lpCur); | 222 | myfree (lpCur); |
| @@ -414,7 +414,6 @@ XParseGeometry (string, x, y, width, height) | |||
| 414 | return (0); | 414 | return (0); |
| 415 | strind = nextCharacter; | 415 | strind = nextCharacter; |
| 416 | mask |= YNegative; | 416 | mask |= YNegative; |
| 417 | |||
| 418 | } | 417 | } |
| 419 | else | 418 | else |
| 420 | { | 419 | { |
| @@ -428,7 +427,7 @@ XParseGeometry (string, x, y, width, height) | |||
| 428 | } | 427 | } |
| 429 | } | 428 | } |
| 430 | 429 | ||
| 431 | /* If strind isn't at the end of the string the it's an invalid | 430 | /* If strind isn't at the end of the string then it's an invalid |
| 432 | geometry specification. */ | 431 | geometry specification. */ |
| 433 | 432 | ||
| 434 | if (*strind != '\0') return (0); | 433 | if (*strind != '\0') return (0); |