ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
April 2021
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
21 participants
173 discussions
Start a n
N
ew thread
[reactos] 01/01: [WINLOGON] Update Russian (ru-RU) translation
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=58a39285716f47f88842a…
commit 58a39285716f47f88842a55a03a4a4df33b79a83 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Sun Apr 25 20:22:45 2021 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Sun Apr 25 20:22:45 2021 +0300 [WINLOGON] Update Russian (ru-RU) translation Addendum to 7ca90b50, 9a6d4bf0, ec2bfa2e and 5f033392. --- base/system/winlogon/lang/ru-RU.rc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/base/system/winlogon/lang/ru-RU.rc b/base/system/winlogon/lang/ru-RU.rc index ef07f8c90e4..c1fd78e6510 100644 --- a/base/system/winlogon/lang/ru-RU.rc +++ b/base/system/winlogon/lang/ru-RU.rc @@ -22,14 +22,14 @@ END IDD_SYSSHUTDOWN DIALOGEX 50, 50, 180, 140 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_VISIBLE | WS_CAPTION | WS_POPUP -CAPTION "System Shutdown" +CAPTION "Завершение работы системы" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_WARNING, IDC_SYSSHUTDOWNICON, 6, 7, 18, 20 - LTEXT "A system shutdown has been initiated. Please save all your work and terminate your session. All unsaved work will be lost when the system shuts down.", -1, 38, 7, 135, 40 - LTEXT "The system shuts down in:", -1, 38, 50, 90, 8 + LTEXT "Система завершает работу. Сохраните все данные и выйдите из системы. Все несохранённые данные будут утеряны, как только система завершит работу.", -1, 38, 7, 135, 40 + LTEXT "Время до отключения:", -1, 38, 50, 90, 8 LTEXT "00:00:00", IDC_SYSSHUTDOWNTIMELEFT, 132, 50, 41, 8 - LTEXT "Message:", -1, 38, 65, 135, 8 + LTEXT "Сообщение:", -1, 38, 65, 135, 8 EDITTEXT IDC_SYSSHUTDOWNMESSAGE, 34, 75, 139, 58, ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP, WS_EX_STATICEDGE END @@ -44,14 +44,14 @@ BEGIN IDS_RUNNINGLOGONSCRIPTS "Выполняются скрипты входа в систему..." IDS_LOADINGYOURPERSONALSETTINGS "Загружаются персональные настройки..." IDS_CLOSINGNETWORKCONNECTIONS "Отключаются сетевые соединения..." - IDS_REACTOSISRESTARTING "Restarting..." - IDS_REACTOSISSHUTTINGDOWN "Shutting down..." + IDS_REACTOSISRESTARTING "Перезагрузка..." + IDS_REACTOSISSHUTTINGDOWN "Завершение работы..." IDS_PREPARETOSTANDBY "Подготовка к переходу в режим ожидания..." IDS_PREPARETOHIBERNATE "Подготовка к переходу в спящий режим..." IDS_SAVEYOURSETTINGS "Сохраняются настройки..." IDS_REACTOSISSTARTINGUP "ReactOS загружается..." IDS_TIMEOUTSHORTFORMAT "%02d:%02d:%02d" - IDS_TIMEOUTLONGFORMAT "%d days" + IDS_TIMEOUTLONGFORMAT "%d дней" END STRINGTABLE
3 years, 8 months
1
0
0
0
[reactos] 01/01: [MMSYS] Implement ShowAudioPropertySheet() and ShowFullControlPanel()
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9cdd53ffebd1df0e07916…
commit 9cdd53ffebd1df0e079165f62562197ef4ae9d2c Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun Apr 25 19:04:11 2021 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sun Apr 25 19:04:35 2021 +0200 [MMSYS] Implement ShowAudioPropertySheet() and ShowFullControlPanel() --- dll/cpl/mmsys/mmsys.c | 81 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 63 insertions(+), 18 deletions(-) diff --git a/dll/cpl/mmsys/mmsys.c b/dll/cpl/mmsys/mmsys.c index b77b390c25d..9662476b686 100644 --- a/dll/cpl/mmsys/mmsys.c +++ b/dll/cpl/mmsys/mmsys.c @@ -163,15 +163,6 @@ ShowMMCPLPropertySheet(HWND hwnd, return TRUE; } -VOID WINAPI -ShowAudioPropertySheet(HWND hwnd, - HINSTANCE hInstance, - LPTSTR lpszCmd, - int nCmdShow) -{ - DPRINT1("ShowAudioPropertySheet() stubs\n"); -} - VOID WINAPI mmseRunOnceW(HWND hwnd, HINSTANCE hInstance, @@ -208,15 +199,6 @@ MediaPropPageProvider(LPVOID Info, return TRUE; } -VOID WINAPI -ShowFullControlPanel(HWND hwnd, - HINSTANCE hInstance, - LPSTR lpszCmd, - int nCmdShow) -{ - DPRINT1("ShowFullControlPanel() stubs\n"); -} - VOID InstallSystemSoundLabels(HKEY hKey) { @@ -807,6 +789,69 @@ CPlApplet(HWND hwndCpl, return FALSE; } +VOID WINAPI +ShowAudioPropertySheet(HWND hwnd, + HINSTANCE hInstance, + LPTSTR lpszCmd, + int nCmdShow) +{ + PROPSHEETPAGE psp[1]; + PROPSHEETHEADER psh; + TCHAR Caption[256]; + + DPRINT("ShowAudioPropertySheet()\n"); + + LoadString(hApplet, IDS_CPLNAME, Caption, _countof(Caption)); + + psh.dwSize = sizeof(PROPSHEETHEADER); + psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE | PSH_USEICONID | PSH_USECALLBACK; + psh.hwndParent = hwnd; + psh.hInstance = hInstance; + psh.pszIcon = MAKEINTRESOURCEW(IDI_CPLICON); + psh.pszCaption = Caption; + psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE); + psh.nStartPage = 0; + psh.ppsp = psp; + psh.pfnCallback = PropSheetProc; + + InitPropSheetPage(&psp[0], IDD_AUDIO,AudioDlgProc); + + PropertySheet(&psh); +} + +VOID WINAPI +ShowFullControlPanel(HWND hwnd, + HINSTANCE hInstance, + LPSTR lpszCmd, + int nCmdShow) +{ + PROPSHEETPAGE psp[5]; + PROPSHEETHEADER psh; + TCHAR Caption[256]; + + DPRINT("ShowFullControlPanel()\n"); + + LoadString(hApplet, IDS_CPLNAME, Caption, _countof(Caption)); + + psh.dwSize = sizeof(PROPSHEETHEADER); + psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE | PSH_USEICONID | PSH_USECALLBACK; + psh.hwndParent = hwnd; + psh.hInstance = hInstance; + psh.pszIcon = MAKEINTRESOURCEW(IDI_CPLICON); + psh.pszCaption = Caption; + psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE); + psh.nStartPage = 0; + psh.ppsp = psp; + psh.pfnCallback = PropSheetProc; + + InitPropSheetPage(&psp[0], IDD_VOLUME,VolumeDlgProc); + InitPropSheetPage(&psp[1], IDD_SOUNDS,SoundsDlgProc); + InitPropSheetPage(&psp[2], IDD_AUDIO,AudioDlgProc); + InitPropSheetPage(&psp[3], IDD_VOICE,VoiceDlgProc); + InitPropSheetPage(&psp[4], IDD_HARDWARE,HardwareDlgProc); + + PropertySheet(&psh); +} BOOL WINAPI DllMain(HINSTANCE hinstDLL,
3 years, 8 months
1
0
0
0
[reactos] 01/01: [WIN32SS][NTUSER] Fix an integer underflow within scrollbar info setting
by George Bișoc
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ffea5152e607512f09efd…
commit ffea5152e607512f09efdb0bd02499e481877f59 Author: George Bișoc <george.bisoc(a)reactos.org> AuthorDate: Sun Apr 25 15:56:39 2021 +0200 Commit: George Bișoc <george.bisoc(a)reactos.org> CommitDate: Sun Apr 25 15:56:39 2021 +0200 [WIN32SS][NTUSER] Fix an integer underflow within scrollbar info setting Thanks goes to I_Kill_Bugs for the patch (and partly to Kyle Katarn for the PR) and Hermes for tweaking the patch code. Had to make a commit myself as the PR author's account is deleted. Signed-off by: I_Kill_Bugs (original patch author) Signed-off by: Kyle Katarn <contact(a)kcsoftwares.com> Signed-off by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> --- win32ss/user/ntuser/scrollbar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32ss/user/ntuser/scrollbar.c b/win32ss/user/ntuser/scrollbar.c index ece40873a49..75d499b25e6 100644 --- a/win32ss/user/ntuser/scrollbar.c +++ b/win32ss/user/ntuser/scrollbar.c @@ -597,7 +597,7 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) if (lpsi->fMask & (SIF_RANGE | SIF_PAGE | SIF_DISABLENOSCROLL)) { new_flags = Window->pSBInfo->WSBflags; - if (Info->nMin >= (int)(Info->nMax - max(Info->nPage - 1, 0))) + if (Info->nMin + (int)max(Info->nPage, 1) > Info->nMax) { /* Hide or disable scroll-bar */ if (lpsi->fMask & SIF_DISABLENOSCROLL)
3 years, 8 months
1
0
0
0
[reactos] 01/01: [SDK][INCLUDE] Fix offsetof and CCSIZEOF_STRUCT for Clang-CL build (#3624)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=66f6abfc4ad866aa56bcb…
commit 66f6abfc4ad866aa56bcb1fe057ce18d13cc51e9 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Apr 25 13:38:22 2021 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Apr 25 13:38:22 2021 +0900 [SDK][INCLUDE] Fix offsetof and CCSIZEOF_STRUCT for Clang-CL build (#3624) Clang-CL was failing with "error: function declaration cannot have variably modified type". This PR will fix the Clang-CL build. CORE-17547 --- sdk/include/crt/stddef.h | 18 +++++++++++++++--- sdk/include/psdk/commctrl.h | 4 ++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/sdk/include/crt/stddef.h b/sdk/include/crt/stddef.h index 97a519ea88e..b5210fb9e92 100644 --- a/sdk/include/crt/stddef.h +++ b/sdk/include/crt/stddef.h @@ -377,10 +377,22 @@ typedef __WCHAR_TYPE__ wchar_t; #ifndef offsetof /* Offset of member MEMBER in a struct of type TYPE. */ -#if defined(__GNUC__) -#define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER) +#if defined(__GNUC__) || defined(__clang__) || defined(_CRT_USE_BUILTIN_OFFSETOF) +# define offsetof(TYPE,MEMBER) __builtin_offsetof(TYPE,MEMBER) #else -#define offsetof(TYPE, MEMBER) ((size_t)&(((TYPE *)0)->MEMBER)) +# ifdef __cplusplus +# ifdef _WIN64 +# define offsetof(TYPE,MEMBER) ((::size_t)(ptrdiff_t)&reinterpret_cast<const volatile char&>((((TYPE*)0)->MEMBER))) +# else +# define offsetof(TYPE,MEMBER) ((::size_t)&reinterpret_cast<const volatile char&>((((TYPE*)0)->MEMBER))) +# endif +# else +# ifdef _WIN64 +# define offsetof(TYPE,MEMBER) ((size_t)(ptrdiff_t)&(((TYPE*)0)->MEMBER)) +# else +# define offsetof(TYPE,MEMBER) ((size_t)&(((TYPE*)0)->MEMBER)) +# endif +# endif #endif #endif /* !offsetof */ diff --git a/sdk/include/psdk/commctrl.h b/sdk/include/psdk/commctrl.h index 942d07c0883..845fd3061cb 100644 --- a/sdk/include/psdk/commctrl.h +++ b/sdk/include/psdk/commctrl.h @@ -147,7 +147,11 @@ extern "C" { #define NM_THEMECHANGED (NM_FIRST-22) #ifndef CCSIZEOF_STRUCT +#if defined(__clang__) /* Clang-CL fails without this workaround. See CORE-17547 */ +#define CCSIZEOF_STRUCT(structname,member) (__builtin_offsetof(structname,member) + sizeof(((structname*)0)->member)) +#else #define CCSIZEOF_STRUCT(structname,member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0))))+sizeof(((structname*)0)->member)) +#endif #endif typedef struct tagNMTOOLTIPSCREATED {
3 years, 8 months
1
0
0
0
[reactos] 01/01: [CMDUTILS][FC] Initial implement FC command (#3622)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8bf471105e2d0bbb3c1d9…
commit 8bf471105e2d0bbb3c1d913647e5ce88d9b3d0d4 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Apr 25 13:06:13 2021 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Apr 25 13:06:13 2021 +0900 [CMDUTILS][FC] Initial implement FC command (#3622) Implement FC (file comparison) command. As a starting point, we support binary mode comparison at first. Text mode comparison and wildcard are not supported yet. CORE-17500 --- base/applications/cmdutils/CMakeLists.txt | 1 + base/applications/cmdutils/fc/CMakeLists.txt | 7 + base/applications/cmdutils/fc/fc.c | 496 +++++++++++++++++++++++++++ base/applications/cmdutils/fc/fc.rc | 12 + base/applications/cmdutils/fc/lang/en-US.rc | 41 +++ base/applications/cmdutils/fc/resource.h | 13 + 6 files changed, 570 insertions(+) diff --git a/base/applications/cmdutils/CMakeLists.txt b/base/applications/cmdutils/CMakeLists.txt index 43b10eb6c73..f1cd0b9fd1d 100644 --- a/base/applications/cmdutils/CMakeLists.txt +++ b/base/applications/cmdutils/CMakeLists.txt @@ -8,6 +8,7 @@ add_subdirectory(cscript) add_subdirectory(dbgprint) add_subdirectory(doskey) add_subdirectory(eventcreate) +add_subdirectory(fc) add_subdirectory(find) add_subdirectory(fsutil) add_subdirectory(help) diff --git a/base/applications/cmdutils/fc/CMakeLists.txt b/base/applications/cmdutils/fc/CMakeLists.txt new file mode 100644 index 00000000000..fec64446ae1 --- /dev/null +++ b/base/applications/cmdutils/fc/CMakeLists.txt @@ -0,0 +1,7 @@ +include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils) + +add_executable(fc fc.c fc.rc) +set_module_type(fc win32cui UNICODE) +target_link_libraries(fc conutils ${PSEH_LIB}) +add_importlibs(fc msvcrt user32 kernel32) +add_cd_file(TARGET fc DESTINATION reactos/system32 FOR all) diff --git a/base/applications/cmdutils/fc/fc.c b/base/applications/cmdutils/fc/fc.c new file mode 100644 index 00000000000..1697219c6cb --- /dev/null +++ b/base/applications/cmdutils/fc/fc.c @@ -0,0 +1,496 @@ +/* + * PROJECT: ReactOS FC Command + * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) + * PURPOSE: Comparing files + * COPYRIGHT: Copyright 2021 Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com) + */ +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <windef.h> +#include <winbase.h> +#include <winuser.h> +#include <winnls.h> +#include <conutils.h> +#include "resource.h" + +// See also:
https://stackoverflow.com/questions/33125766/compare-files-with-a-cmd
+typedef enum FCRET { // return code of FC command + FCRET_INVALID = -1, FCRET_IDENTICAL = 0, FCRET_DIFFERENT = 1, FCRET_CANT_FIND = 2 +} FCRET; + +#ifdef _WIN64 + #define MAX_VIEW_SIZE (256 * 1024 * 1024) // 256 MB +#else + #define MAX_VIEW_SIZE (64 * 1024 * 1024) // 64 MB +#endif + +#define FLAG_A (1 << 0) +#define FLAG_B (1 << 1) +#define FLAG_C (1 << 2) +#define FLAG_L (1 << 3) +#define FLAG_LBn (1 << 4) +#define FLAG_N (1 << 5) +#define FLAG_OFFLINE (1 << 6) +#define FLAG_T (1 << 7) +#define FLAG_U (1 << 8) +#define FLAG_W (1 << 9) +#define FLAG_nnnn (1 << 10) +#define FLAG_HELP (1 << 11) + +typedef struct FILECOMPARE { + DWORD dwFlags; // FLAG_... + INT n, nnnn; + LPCWSTR file1, file2; +} FILECOMPARE; + +static FCRET NoDifference(VOID) +{ + ConResPuts(StdOut, IDS_NO_DIFFERENCE); + return FCRET_IDENTICAL; +} + +static FCRET Different(LPCWSTR file1, LPCWSTR file2) +{ + ConResPrintf(StdOut, IDS_DIFFERENT, file1, file2); + return FCRET_DIFFERENT; +} + +static FCRET LongerThan(LPCWSTR file1, LPCWSTR file2) +{ + ConResPrintf(StdOut, IDS_LONGER_THAN, file1, file2); + return FCRET_DIFFERENT; +} + +static FCRET OutOfMemory(VOID) +{ + ConResPuts(StdErr, IDS_OUT_OF_MEMORY); + return FCRET_INVALID; +} + +static FCRET CannotRead(LPCWSTR file) +{ + ConResPrintf(StdErr, IDS_CANNOT_READ, file); + return FCRET_INVALID; +} + +static FCRET InvalidSwitch(VOID) +{ + ConResPuts(StdErr, IDS_INVALID_SWITCH); + return FCRET_INVALID; +} + +static HANDLE DoOpenFileForInput(LPCWSTR file) +{ + HANDLE hFile = CreateFileW(file, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); + if (hFile == INVALID_HANDLE_VALUE) + { + ConResPrintf(StdErr, IDS_CANNOT_OPEN, file); + } + return hFile; +} + +static FCRET BinaryFileCompare(FILECOMPARE *pFC) +{ + FCRET ret; + HANDLE hFile1, hFile2, hMapping1 = NULL, hMapping2 = NULL; + LPBYTE pb1 = NULL, pb2 = NULL; + LARGE_INTEGER ib, cb1, cb2, cbCommon; + DWORD cbView, ibView; + BOOL fDifferent = FALSE; + + hFile1 = DoOpenFileForInput(pFC->file1); + if (hFile1 == INVALID_HANDLE_VALUE) + return FCRET_CANT_FIND; + hFile2 = DoOpenFileForInput(pFC->file2); + if (hFile2 == INVALID_HANDLE_VALUE) + { + CloseHandle(hFile1); + return FCRET_CANT_FIND; + } + + do + { + if (_wcsicmp(pFC->file1, pFC->file2) == 0) + { + ret = NoDifference(); + break; + } + if (!GetFileSizeEx(hFile1, &cb1)) + { + ret = CannotRead(pFC->file1); + break; + } + if (!GetFileSizeEx(hFile2, &cb2)) + { + ret = CannotRead(pFC->file2); + break; + } + cbCommon.QuadPart = min(cb1.QuadPart, cb2.QuadPart); + if (cbCommon.QuadPart > 0) + { + hMapping1 = CreateFileMappingW(hFile1, NULL, PAGE_READONLY, + cb1.HighPart, cb1.LowPart, NULL); + if (hMapping1 == NULL) + { + ret = CannotRead(pFC->file1); + break; + } + hMapping2 = CreateFileMappingW(hFile2, NULL, PAGE_READONLY, + cb2.HighPart, cb2.LowPart, NULL); + if (hMapping2 == NULL) + { + ret = CannotRead(pFC->file2); + break; + } + + ret = FCRET_IDENTICAL; + for (ib.QuadPart = 0; ib.QuadPart < cbCommon.QuadPart; ) + { + cbView = (DWORD)min(cbCommon.QuadPart - ib.QuadPart, MAX_VIEW_SIZE); + pb1 = MapViewOfFile(hMapping1, FILE_MAP_READ, ib.HighPart, ib.LowPart, cbView); + pb2 = MapViewOfFile(hMapping2, FILE_MAP_READ, ib.HighPart, ib.LowPart, cbView); + if (!pb1 || !pb2) + { + ret = OutOfMemory(); + break; + } + for (ibView = 0; ibView < cbView; ++ib.QuadPart, ++ibView) + { + if (pb1[ibView] == pb2[ibView]) + continue; + + fDifferent = TRUE; + if (cbCommon.QuadPart > MAXDWORD) + { + ConPrintf(StdOut, L"%016I64X: %02X %02X\n", ib.QuadPart, + pb1[ibView], pb2[ibView]); + } + else + { + ConPrintf(StdOut, L"%08lX: %02X %02X\n", ib.LowPart, + pb1[ibView], pb2[ibView]); + } + } + UnmapViewOfFile(pb1); + UnmapViewOfFile(pb2); + pb1 = pb2 = NULL; + } + if (ret != FCRET_IDENTICAL) + break; + } + + if (cb1.QuadPart < cb2.QuadPart) + ret = LongerThan(pFC->file2, pFC->file1); + else if (cb1.QuadPart > cb2.QuadPart) + ret = LongerThan(pFC->file1, pFC->file2); + else if (fDifferent) + ret = Different(pFC->file1, pFC->file2); + else + ret = NoDifference(); + } while (0); + + UnmapViewOfFile(pb1); + UnmapViewOfFile(pb2); + CloseHandle(hMapping1); + CloseHandle(hMapping2); + CloseHandle(hFile1); + CloseHandle(hFile2); + return ret; +} + +static FCRET +UnicodeTextCompare(FILECOMPARE *pFC, HANDLE hMapping1, const LARGE_INTEGER *pcb1, + HANDLE hMapping2, const LARGE_INTEGER *pcb2) +{ + FCRET ret; + BOOL fIgnoreCase = !!(pFC->dwFlags & FLAG_C); + DWORD dwCmpFlags = (fIgnoreCase ? NORM_IGNORECASE : 0); + LPCWSTR psz1, psz2; + LARGE_INTEGER cch1 = { .QuadPart = pcb1->QuadPart / sizeof(WCHAR) }; + LARGE_INTEGER cch2 = { .QuadPart = pcb1->QuadPart / sizeof(WCHAR) }; + + do + { + psz1 = MapViewOfFile(hMapping1, FILE_MAP_READ, 0, 0, pcb1->LowPart); + psz2 = MapViewOfFile(hMapping2, FILE_MAP_READ, 0, 0, pcb2->LowPart); + if (!psz1 || !psz2) + { + ret = OutOfMemory(); + break; + } + if (cch1.QuadPart < MAXLONG && cch2.QuadPart < MAXLONG) + { + if (CompareStringW(0, dwCmpFlags, psz1, cch1.LowPart, + psz2, cch2.LowPart) == CSTR_EQUAL) + { + ret = NoDifference(); + break; + } + } + // TODO: compare each lines + // TODO: large file support + ret = Different(pFC->file1, pFC->file2); + } while (0); + + UnmapViewOfFile(psz1); + UnmapViewOfFile(psz2); + return ret; +} + +static FCRET +AnsiTextCompare(FILECOMPARE *pFC, HANDLE hMapping1, const LARGE_INTEGER *pcb1, + HANDLE hMapping2, const LARGE_INTEGER *pcb2) +{ + FCRET ret; + BOOL fIgnoreCase = !!(pFC->dwFlags & FLAG_C); + DWORD dwCmpFlags = (fIgnoreCase ? NORM_IGNORECASE : 0); + LPSTR psz1, psz2; + + do + { + psz1 = MapViewOfFile(hMapping1, FILE_MAP_READ, 0, 0, pcb1->LowPart); + psz2 = MapViewOfFile(hMapping2, FILE_MAP_READ, 0, 0, pcb2->LowPart); + if (!psz1 || !psz2) + { + ret = OutOfMemory(); + break; + } + if (pcb1->QuadPart < MAXLONG && pcb2->QuadPart < MAXLONG) + { + if (CompareStringA(0, dwCmpFlags, psz1, pcb1->LowPart, + psz2, pcb2->LowPart) == CSTR_EQUAL) + { + ret = NoDifference(); + break; + } + } + // TODO: compare each lines + // TODO: large file support + ret = Different(pFC->file1, pFC->file2); + } while (0); + + UnmapViewOfFile(psz1); + UnmapViewOfFile(psz2); + return ret; +} + +static FCRET TextFileCompare(FILECOMPARE *pFC) +{ + FCRET ret; + HANDLE hFile1, hFile2, hMapping1 = NULL, hMapping2 = NULL; + LARGE_INTEGER cb1, cb2; + BOOL fUnicode = !!(pFC->dwFlags & FLAG_U); + + hFile1 = DoOpenFileForInput(pFC->file1); + if (hFile1 == INVALID_HANDLE_VALUE) + return FCRET_CANT_FIND; + hFile2 = DoOpenFileForInput(pFC->file2); + if (hFile2 == INVALID_HANDLE_VALUE) + { + CloseHandle(hFile1); + return FCRET_CANT_FIND; + } + + do + { + if (_wcsicmp(pFC->file1, pFC->file2) == 0) + { + ret = NoDifference(); + break; + } + if (!GetFileSizeEx(hFile1, &cb1)) + { + ret = CannotRead(pFC->file1); + break; + } + if (!GetFileSizeEx(hFile2, &cb2)) + { + ret = CannotRead(pFC->file2); + break; + } + if (cb1.QuadPart == 0 && cb2.QuadPart == 0) + { + ret = NoDifference(); + break; + } + hMapping1 = CreateFileMappingW(hFile1, NULL, PAGE_READONLY, + cb1.HighPart, cb1.LowPart, NULL); + if (hMapping1 == NULL) + { + ret = CannotRead(pFC->file1); + break; + } + hMapping2 = CreateFileMappingW(hFile2, NULL, PAGE_READONLY, + cb2.HighPart, cb2.LowPart, NULL); + if (hMapping2 == NULL) + { + ret = CannotRead(pFC->file2); + break; + } + + if (fUnicode) + ret = UnicodeTextCompare(pFC, hMapping1, &cb1, hMapping2, &cb2); + else + ret = AnsiTextCompare(pFC, hMapping1, &cb1, hMapping2, &cb2); + } while (0); + + CloseHandle(hMapping1); + CloseHandle(hMapping2); + CloseHandle(hFile1); + CloseHandle(hFile2); + return ret; +} + +static BOOL IsBinaryExt(LPCWSTR filename) +{ + // Don't change this array. This is by design. + // See also:
https://docs.microsoft.com/en-us/windows-server/administration/windows-comm…
+ static const LPCWSTR s_exts[] = { L"EXE", L"COM", L"SYS", L"OBJ", L"LIB", L"BIN" }; + size_t iext; + LPCWSTR pch, ext, pch1 = wcsrchr(filename, L'\\'), pch2 = wcsrchr(filename, L'/'); + if (!pch1 && !pch2) + pch = filename; + else if (!pch1 && pch2) + pch = pch2; + else if (pch1 && !pch2) + pch = pch1; + else if (pch1 < pch2) + pch = pch2; + else + pch = pch1; + + ext = wcsrchr(pch, L'.'); + if (ext) + { + ++ext; + for (iext = 0; iext < _countof(s_exts); ++iext) + { + if (_wcsicmp(ext, s_exts[iext]) == 0) + return TRUE; + } + } + return FALSE; +} + +#define HasWildcard(filename) \ + ((wcschr((filename), L'*') != NULL) || (wcschr((filename), L'?') != NULL)) + +static FCRET FileCompare(FILECOMPARE *pFC) +{ + ConResPrintf(StdOut, IDS_COMPARING, pFC->file1, pFC->file2); + + if (!(pFC->dwFlags & FLAG_L) && + ((pFC->dwFlags & FLAG_B) || IsBinaryExt(pFC->file1) || IsBinaryExt(pFC->file2))) + { + return BinaryFileCompare(pFC); + } + return TextFileCompare(pFC); +} + +static FCRET WildcardFileCompare(FILECOMPARE *pFC) +{ + if (pFC->dwFlags & FLAG_HELP) + { + ConResPuts(StdOut, IDS_USAGE); + return FCRET_INVALID; + } + + if (!pFC->file1 || !pFC->file2) + { + ConResPuts(StdErr, IDS_NEEDS_FILES); + return FCRET_INVALID; + } + + if (HasWildcard(pFC->file1) || HasWildcard(pFC->file2)) + { + // TODO: wildcard + ConResPuts(StdErr, IDS_CANT_USE_WILDCARD); + } + + return FileCompare(pFC); +} + +int wmain(int argc, WCHAR **argv) +{ + FILECOMPARE fc = { .dwFlags = 0, .n = 100, .nnnn = 2 }; + wchar_t *endptr; + INT i; + + /* Initialize the Console Standard Streams */ + ConInitStdStreams(); + + for (i = 1; i < argc; ++i) + { + if (argv[i][0] != L'/') + { + if (!fc.file1) + fc.file1 = argv[i]; + else if (!fc.file2) + fc.file2 = argv[i]; + else + return InvalidSwitch(); + continue; + } + switch (towupper(argv[i][1])) + { + case L'A': + fc.dwFlags |= FLAG_A; + break; + case L'B': + fc.dwFlags |= FLAG_B; + break; + case L'C': + fc.dwFlags |= FLAG_C; + break; + case L'L': + if (_wcsicmp(argv[i], L"/L") == 0) + { + fc.dwFlags |= FLAG_L; + } + else if (towupper(argv[i][2]) == L'B') + { + if (iswdigit(argv[i][3])) + { + fc.dwFlags |= FLAG_LBn; + fc.n = wcstoul(&argv[i][3], &endptr, 10); + if (endptr == NULL || *endptr != 0) + return InvalidSwitch(); + } + else + { + return InvalidSwitch(); + } + } + break; + case L'N': + fc.dwFlags |= FLAG_N; + break; + case L'O': + if (_wcsicmp(argv[i], L"/OFF") == 0 || _wcsicmp(argv[i], L"/OFFLINE") == 0) + { + fc.dwFlags |= FLAG_OFFLINE; + } + break; + case L'T': + fc.dwFlags |= FLAG_T; + break; + case L'W': + fc.dwFlags |= FLAG_W; + break; + case L'0': case L'1': case L'2': case L'3': case L'4': + case L'5': case L'6': case L'7': case L'8': case L'9': + fc.nnnn = wcstoul(&argv[i][1], &endptr, 10); + if (endptr == NULL || *endptr != 0) + return InvalidSwitch(); + fc.dwFlags |= FLAG_nnnn; + break; + case L'?': + fc.dwFlags |= FLAG_HELP; + break; + default: + return InvalidSwitch(); + } + } + return WildcardFileCompare(&fc); +} diff --git a/base/applications/cmdutils/fc/fc.rc b/base/applications/cmdutils/fc/fc.rc new file mode 100644 index 00000000000..322c3678dee --- /dev/null +++ b/base/applications/cmdutils/fc/fc.rc @@ -0,0 +1,12 @@ +#include <windef.h> +#include "resource.h" + +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS FC Command" +#define REACTOS_STR_INTERNAL_NAME "fc" +#define REACTOS_STR_ORIGINAL_FILENAME "fc.exe" +#include <reactos/version.rc> + +#pragma code_page(65001) /* UTF-8 */ +#ifdef LANGUAGE_EN_US + #include "lang/en-US.rc" +#endif diff --git a/base/applications/cmdutils/fc/lang/en-US.rc b/base/applications/cmdutils/fc/lang/en-US.rc new file mode 100644 index 00000000000..6c8516297b3 --- /dev/null +++ b/base/applications/cmdutils/fc/lang/en-US.rc @@ -0,0 +1,41 @@ +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +STRINGTABLE +BEGIN + IDS_USAGE "Compares two files or sets of files and displays the differences between\n\ +them\n\ +\n\ +FC [/A] [/C] [/L] [/LBn] [/N] [/OFF[LINE]] [/T] [/U] [/W] [/nnnn]\n\ + [drive1:][path1]filename1 [drive2:][path2]filename2\n\ +FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\ +\n\ + /A Displays only first and last lines for each set of differences.\n\ + /B Performs a binary comparison.\n\ + /C Disregards the case of letters.\n\ + /L Compares files as ASCII text.\n\ + /LBn Sets the maximum consecutive mismatches to the specified\n\ + number of lines (default: 100).\n\ + /N Displays the line numbers on an ASCII comparison.\n\ + /OFF[LINE] Doesn't skip files with offline attribute set.\n\ + /T Doesn't expand tabs to spaces (default: expand).\n\ + /U Compare files as UNICODE text files.\n\ + /W Compresses white space (tabs and spaces) for comparison.\n\ + /nnnn Specifies the number of consecutive lines that must match\n\ + after a mismatch (default: 2).\n\ + [drive1:][path1]filename1\n\ + Specifies the first file or set of files to compare.\n\ + [drive2:][path2]filename2\n\ + Specifies the second file or set of files to compare.\n" + IDS_NO_DIFFERENCE "FC: no differences encountered\n" + IDS_LONGER_THAN "FC: %ls longer than %ls\n" + IDS_COMPARING "Comparing files %ls and %ls\n" + IDS_OUT_OF_MEMORY "FC: Out of memory\n" + IDS_CANNOT_READ "FC: cannot read from %ls\n" + IDS_INVALID_SWITCH "FC: Invalid Switch\n" + IDS_CANNOT_OPEN "FC: cannot open %ls - No such file or folder\n" + IDS_NEEDS_FILES "FC: Insufficient number of file specifications\n" + IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n" + IDS_DIFFERENT "FC: File %ls and %ls are different\n" + IDS_TOO_LARGE "FC: File %ls too large\n" + IDS_RESYNCH_FAILED "Resynch failed. Files are too different." +END diff --git a/base/applications/cmdutils/fc/resource.h b/base/applications/cmdutils/fc/resource.h new file mode 100644 index 00000000000..45f8e032bd8 --- /dev/null +++ b/base/applications/cmdutils/fc/resource.h @@ -0,0 +1,13 @@ +#define IDS_USAGE 1000 +#define IDS_NO_DIFFERENCE 1001 +#define IDS_LONGER_THAN 1002 +#define IDS_COMPARING 1003 +#define IDS_OUT_OF_MEMORY 1004 +#define IDS_CANNOT_READ 1005 +#define IDS_INVALID_SWITCH 1006 +#define IDS_CANNOT_OPEN 1007 +#define IDS_NEEDS_FILES 1008 +#define IDS_CANT_USE_WILDCARD 1009 +#define IDS_DIFFERENT 1010 +#define IDS_TOO_LARGE 1011 +#define IDS_RESYNCH_FAILED 1012
3 years, 8 months
1
0
0
0
[reactos] 01/01: [TRANSLATION][CACLS] Add Serbian translation (#859)
by alexpavlovic
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=db269c85e6ab54431c033…
commit db269c85e6ab54431c03373592f84048f26316f4 Author: alexpavlovic <alexpavlovic2013(a)gmail.com> AuthorDate: Sat Apr 24 20:38:20 2021 +0200 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Apr 24 20:38:20 2021 +0200 [TRANSLATION][CACLS] Add Serbian translation (#859) --- base/applications/cacls/cacls.rc | 3 + base/applications/cacls/lang/sr-SP.rc | 149 ++++++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+) diff --git a/base/applications/cacls/cacls.rc b/base/applications/cacls/cacls.rc index f9d6d186587..f6ea0b53f03 100644 --- a/base/applications/cacls/cacls.rc +++ b/base/applications/cacls/cacls.rc @@ -75,6 +75,9 @@ #ifdef LANGUAGE_SQ_AL #include "lang/sq-AL.rc" #endif +#ifdef LANGUAGE_SR_SP + #include "lang/sr-SP.rc" +#endif #ifdef LANGUAGE_TR_TR #include "lang/tr-TR.rc" #endif diff --git a/base/applications/cacls/lang/sr-SP.rc b/base/applications/cacls/lang/sr-SP.rc new file mode 100644 index 00000000000..026dd091950 --- /dev/null +++ b/base/applications/cacls/lang/sr-SP.rc @@ -0,0 +1,149 @@ +LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_CYRILLIC + +STRINGTABLE +BEGIN + IDS_HELP "Прикажи или измени листе за управљање приступима фајловима.\n\ + (access control lists ACLs)\n\n\ +CACLS имефајла [/T] [/E] [/C] [/G корисник:дозвола [...]] [/R корисник [...]]\n\ + [/P корисник:дозвола [...]] [/D корисник [...]]\n\ + имефајла Прикажи листе приступа.\n\ + /T Измени листе приступа задатих фајлова у\n\ + текућем и свим поддиректоријумима.\n\ + /E Измени постојећу листу приступа уместо да је замениш.\n\ + /C Настави након грешке о забрањеном приступу.\n\ + /G корисник:дозвола Додели наведена права корисничког приступа.\n\ + Дозвола може бити: R Читање\n\ + W Писање\n\ + C Измена (писање)\n\ + F Потпуно управљање\n\ + /R корисник Повуци дозволе приступа наведеног корисника\n\ + (исправно једино уз /E).\n\ + /P корисник:дозвола Замени дозволе приступа наведеног корисника.\n\ + Дозвола може бити: N Без приступа\n\ + R Читање\n\ + W Писање\n\ + C Измена (писање)\n\ + F Потпуно управљање\n\ + /D корисник Онемогући приступ наведеном кориснику.\n\ +У команди се могу користити џокер знаци ради задавања више од једног фајла.\n\ +У команди се може навести више од једног корисника.\n\n\ +Скраћенице:\n\ + CI - Наслеђивање по контејнерима (Container Inherit).\n\ + Нови упис (ACE) наслеђују директоријуми.\n\ + OI - Наслеђивање по објекту (Object Inherit).\n\ + Нови упис (ACE) наслеђују фајлови.\n\ + IO - Само наслеђивање (Inherit Only).\n\ + Упис не важи за текући фајл/директоријум.\n" + IDS_ABBR_CI "(CI)" + IDS_ABBR_OI "(OI)" + IDS_ABBR_IO "(IO)" + IDS_ABBR_FULL "F" + IDS_ABBR_READ "R" + IDS_ABBR_WRITE "W" + IDS_ABBR_CHANGE "C" + IDS_ABBR_NONE "N" + IDS_ALLOW "" + IDS_DENY "(DENY)" + IDS_SPECIAL_ACCESS "(special access:)" + IDS_GENERIC_READ "GENERIC_READ" + IDS_GENERIC_WRITE "GENERIC_WRITE" + IDS_GENERIC_EXECUTE "GENERIC_EXECUTE" + IDS_GENERIC_ALL "GENERIC_ALL" + IDS_FILE_GENERIC_EXECUTE "FILE_GENERIC_EXECUTE" + IDS_FILE_GENERIC_READ "FILE_GENERIC_READ" + IDS_FILE_GENERIC_WRITE "FILE_GENERIC_WRITE" + IDS_FILE_READ_DATA "FILE_READ_DATA" + IDS_FILE_WRITE_DATA "FILE_WRITE_DATA" + IDS_FILE_APPEND_DATA "FILE_APPEND_DATA" + IDS_FILE_READ_EA "FILE_READ_EA" + IDS_FILE_WRITE_EA "FILE_WRITE_EA" + IDS_FILE_EXECUTE "FILE_EXECUTE" + IDS_FILE_DELETE_CHILD "FILE_DELETE_CHILD" + IDS_FILE_READ_ATTRIBUTES "FILE_READ_ATTRIBUTES" + IDS_FILE_WRITE_ATTRIBUTES "FILE_WRITE_ATTRIBUTES" + IDS_MAXIMUM_ALLOWED "MAXIMUM_ALLOWED" + IDS_ACCESS_SYSTEM_SECURITY "ACCESS_SYSTEM_SECURITY" + IDS_SPECIFIC_RIGHTS_ALL "SPECIFIC_RIGHTS_ALL" + IDS_STANDARD_RIGHTS_REQUIRED "STANDARD_RIGHTS_REQUIRED" + IDS_SYNCHRONIZE "SYNCHRONIZE" + IDS_WRITE_OWNER "WRITE_OWNER" + IDS_WRITE_DAC "WRITE_DAC" + IDS_READ_CONTROL "READ_CONTROL" + IDS_DELETE "DELETE" + IDS_STANDARD_RIGHTS_ALL "STANDARD_RIGHTS_ALL" +END + +LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_LATIN + +STRINGTABLE +BEGIN + IDS_HELP "Prikaži ili izmeni liste za upravljanje pristupima fajlovima.\n\ + (access control lists ACLs)\n\n\ +CACLS imefajla [/T] [/E] [/C] [/G korisnik:dozvola [...]] [/R korisnik [...]]\n\ + [/P korisnik:dozvola [...]] [/D korisnik [...]]\n\ + imefajla Prikaži liste pristupa.\n\ + /T Izmeni liste pristupa zadatih fajlova u\n\ + tekućem i svim poddirektorijumima.\n\ + /E Izmeni postojeću listu pristupa umesto da je zameniš.\n\ + /C Nastavi nakon greške o zabranjenom pristupu.\n\ + /G korisnik:dozvola Dodeli navedena prava korisničkog pristupa.\n\ + Dozvola može biti: R Čitanje\n\ + W Pisanje\n\ + C Izmena (pisanje)\n\ + F Potpuno upravljanje\n\ + /R korisnik Povuci dozvole pristupa navedenog korisnika\n\ + (ispravno jedino uz /E).\n\ + /P korisnik:dozvola Zameni dozvole pristupa navedenog korisnika.\n\ + Dozvola može biti: N Bez pristupa\n\ + R Čitanje\n\ + W Pisanje\n\ + C Izmena (pisanje)\n\ + F Potpuno upravljanje\n\ + /D korisnik Onemogući pristup navedenom korisniku.\n\ +U komandi se mogu koristiti džoker znaci radi zadavanja više od jednog fajla.\n\ +U komandi se može navesti više od jednog korisnika.\n\n\ +Skraćenice:\n\ + CI - Nasleđivanje po kontejnerima (Container Inherit).\n\ + Novi upis (ACE) nasleđuju direktorijumi.\n\ + OI - Nasleđivanje po objektu (Object Inherit).\n\ + Novi upis (ACE) nasleđuju fajlovi.\n\ + IO - Samo nasleđivanje (Inherit Only).\n\ + Upis ne važi za tekući fajl/direktorijum.\n" + IDS_ABBR_CI "(CI)" + IDS_ABBR_OI "(OI)" + IDS_ABBR_IO "(IO)" + IDS_ABBR_FULL "F" + IDS_ABBR_READ "R" + IDS_ABBR_WRITE "W" + IDS_ABBR_CHANGE "C" + IDS_ABBR_NONE "N" + IDS_ALLOW "" + IDS_DENY "(DENY)" + IDS_SPECIAL_ACCESS "(special access:)" + IDS_GENERIC_READ "GENERIC_READ" + IDS_GENERIC_WRITE "GENERIC_WRITE" + IDS_GENERIC_EXECUTE "GENERIC_EXECUTE" + IDS_GENERIC_ALL "GENERIC_ALL" + IDS_FILE_GENERIC_EXECUTE "FILE_GENERIC_EXECUTE" + IDS_FILE_GENERIC_READ "FILE_GENERIC_READ" + IDS_FILE_GENERIC_WRITE "FILE_GENERIC_WRITE" + IDS_FILE_READ_DATA "FILE_READ_DATA" + IDS_FILE_WRITE_DATA "FILE_WRITE_DATA" + IDS_FILE_APPEND_DATA "FILE_APPEND_DATA" + IDS_FILE_READ_EA "FILE_READ_EA" + IDS_FILE_WRITE_EA "FILE_WRITE_EA" + IDS_FILE_EXECUTE "FILE_EXECUTE" + IDS_FILE_DELETE_CHILD "FILE_DELETE_CHILD" + IDS_FILE_READ_ATTRIBUTES "FILE_READ_ATTRIBUTES" + IDS_FILE_WRITE_ATTRIBUTES "FILE_WRITE_ATTRIBUTES" + IDS_MAXIMUM_ALLOWED "MAXIMUM_ALLOWED" + IDS_ACCESS_SYSTEM_SECURITY "ACCESS_SYSTEM_SECURITY" + IDS_SPECIFIC_RIGHTS_ALL "SPECIFIC_RIGHTS_ALL" + IDS_STANDARD_RIGHTS_REQUIRED "STANDARD_RIGHTS_REQUIRED" + IDS_SYNCHRONIZE "SYNCHRONIZE" + IDS_WRITE_OWNER "WRITE_OWNER" + IDS_WRITE_DAC "WRITE_DAC" + IDS_READ_CONTROL "READ_CONTROL" + IDS_DELETE "DELETE" + IDS_STANDARD_RIGHTS_ALL "STANDARD_RIGHTS_ALL" +END
3 years, 8 months
1
0
0
0
[reactos] 01/01: [REACTOS] InitImageList(): Fix error checks
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=db416e3914271a96cdc84…
commit db416e3914271a96cdc84b0e82df0bff34ce52c7 Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> AuthorDate: Thu Nov 12 01:22:46 2020 +0100 Commit: George Bișoc <george.bisoc(a)reactos.org> CommitDate: Sat Apr 24 20:35:48 2021 +0200 [REACTOS] InitImageList(): Fix error checks And simplify code a bit. --- base/applications/mscutils/servman/misc.c | 3 +-- dll/cpl/mmsys/sounds.c | 3 +-- modules/rosapps/applications/imagesoft/misc.c | 24 +++++++++++++++++++----- modules/rostests/winetests/GUI/misc.c | 5 +++-- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/base/applications/mscutils/servman/misc.c b/base/applications/mscutils/servman/misc.c index e41f3183e0e..d34fcfca9a1 100644 --- a/base/applications/mscutils/servman/misc.c +++ b/base/applications/mscutils/servman/misc.c @@ -247,8 +247,7 @@ InitImageList(UINT StartResource, LR_LOADTRANSPARENT); if (hImage == NULL) { - ImageList_Destroy(himl); - himl = NULL; + ret = -1; break; } diff --git a/dll/cpl/mmsys/sounds.c b/dll/cpl/mmsys/sounds.c index 89df8727728..b59814d92a1 100644 --- a/dll/cpl/mmsys/sounds.c +++ b/dll/cpl/mmsys/sounds.c @@ -1056,8 +1056,7 @@ InitImageList(UINT StartResource, LR_LOADTRANSPARENT); if (hImage == NULL) { - ImageList_Destroy(himl); - himl = NULL; + ret = -1; break; } diff --git a/modules/rosapps/applications/imagesoft/misc.c b/modules/rosapps/applications/imagesoft/misc.c index f71f95f6eb0..4b72006152f 100644 --- a/modules/rosapps/applications/imagesoft/misc.c +++ b/modules/rosapps/applications/imagesoft/misc.c @@ -374,11 +374,11 @@ ToolbarInsertSpaceForControl(HWND hWndToolbar, HIMAGELIST InitImageList(UINT NumImages, UINT StartResource) { + UINT EndResource = StartResource + NumImages - 1; HBITMAP hBitmap; HIMAGELIST hImageList; - UINT i, k; - INT Ret; - DBG_UNREFERENCED_LOCAL_VARIABLE(Ret); + UINT i; + INT Ret = 0; /* Create the toolbar icon image list */ hImageList = ImageList_Create(TB_BMP_WIDTH, @@ -386,11 +386,11 @@ InitImageList(UINT NumImages, UINT StartResource) ILC_MASK | ILC_COLOR24, NumImages, 0); - if (! hImageList) + if (hImageList == NULL) return NULL; /* Add all icons to the image list */ - for (i = StartResource, k = 0; k < NumImages; i++, k++) + for (i = StartResource; i <= EndResource; i++) { hBitmap = LoadImage(hInstance, MAKEINTRESOURCE(i), @@ -398,12 +398,26 @@ InitImageList(UINT NumImages, UINT StartResource) TB_BMP_WIDTH, TB_BMP_HEIGHT, LR_LOADTRANSPARENT); + if (hBitmap == NULL) + { + Ret = -1; + break; + } Ret = ImageList_AddMasked(hImageList, hBitmap, RGB(255, 255, 254)); DeleteObject(hBitmap); + + if (Ret == -1) + break; + } + + if (Ret == -1) + { + ImageList_Destroy(hImageList); + hImageList = NULL; } return hImageList; diff --git a/modules/rostests/winetests/GUI/misc.c b/modules/rostests/winetests/GUI/misc.c index 7830f277315..dfe436b7735 100644 --- a/modules/rostests/winetests/GUI/misc.c +++ b/modules/rostests/winetests/GUI/misc.c @@ -249,10 +249,11 @@ InitImageList(UINT StartResource, Ret = ImageList_AddIcon(hImageList, hIcon); - if (Ret == -1) - goto fail; DestroyIcon(hIcon); + + if (Ret == -1) + goto fail; } return hImageList;
3 years, 8 months
1
0
0
0
[reactos] 01/01: [USRMGR] Increase name sizes to 'UNLEN + 1'
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a120d67d0e71856306c4d…
commit a120d67d0e71856306c4dc41ecaac5fd541c9049 Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> AuthorDate: Wed Jun 24 20:41:44 2020 +0200 Commit: George Bișoc <george.bisoc(a)reactos.org> CommitDate: Sat Apr 24 20:30:58 2021 +0200 [USRMGR] Increase name sizes to 'UNLEN + 1' --- dll/cpl/usrmgr/groupprops.c | 12 ++++++------ dll/cpl/usrmgr/groups.c | 14 +++++++------- dll/cpl/usrmgr/userprops.c | 12 ++++++------ dll/cpl/usrmgr/users.c | 18 +++++++++--------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/dll/cpl/usrmgr/groupprops.c b/dll/cpl/usrmgr/groupprops.c index f888beb36ae..2ae227ae512 100644 --- a/dll/cpl/usrmgr/groupprops.c +++ b/dll/cpl/usrmgr/groupprops.c @@ -155,7 +155,7 @@ AddSelectedUsersToGroup(HWND hwndDlg, HWND hwndLV; INT nSelectedItems; INT nItem; - TCHAR szUserName[UNLEN]; + TCHAR szUserName[UNLEN + 1]; BOOL bResult = FALSE; LOCALGROUP_MEMBERS_INFO_3 memberInfo; NET_API_STATUS status; @@ -172,7 +172,7 @@ AddSelectedUsersToGroup(HWND hwndDlg, ListView_GetItemText(hwndLV, nItem, 0, szUserName, - UNLEN); + UNLEN + 1); DebugPrintf(_TEXT("Selected user: %s"), szUserName); @@ -310,7 +310,7 @@ static VOID RemoveUserFromGroup(HWND hwndDlg, PGENERAL_GROUP_DATA pGroupData) { - TCHAR szUserName[UNLEN]; + TCHAR szUserName[UNLEN + 1]; TCHAR szText[256]; LOCALGROUP_MEMBERS_INFO_3 memberInfo; HWND hwndLV; @@ -326,7 +326,7 @@ RemoveUserFromGroup(HWND hwndDlg, ListView_GetItemText(hwndLV, nItem, 0, szUserName, - UNLEN); + UNLEN + 1); /* Display a warning message because the remove operation cannot be reverted */ wsprintf(szText, TEXT("Do you really want to remove the user \"%s\" from the group \"%s\"?"), @@ -612,7 +612,7 @@ GroupProperties(HWND hwndDlg) { PROPSHEETPAGE psp[1]; PROPSHEETHEADER psh; - TCHAR szGroupName[UNLEN]; + TCHAR szGroupName[UNLEN + 1]; INT nItem; HWND hwndLV; @@ -625,7 +625,7 @@ GroupProperties(HWND hwndDlg) ListView_GetItemText(hwndLV, nItem, 0, szGroupName, - UNLEN); + UNLEN + 1); ZeroMemory(&psh, sizeof(PROPSHEETHEADER)); psh.dwSize = sizeof(PROPSHEETHEADER); diff --git a/dll/cpl/usrmgr/groups.c b/dll/cpl/usrmgr/groups.c index 73ce4e1368d..44423038b84 100644 --- a/dll/cpl/usrmgr/groups.c +++ b/dll/cpl/usrmgr/groups.c @@ -90,7 +90,7 @@ UpdateGroupsList(HWND hwndListView) static VOID UpdateGroupProperties(HWND hwndDlg) { - TCHAR szGroupName[UNLEN]; + TCHAR szGroupName[UNLEN + 1]; INT iItem; HWND hwndLV; PLOCALGROUP_INFO_1 pGroupInfo = NULL; @@ -104,7 +104,7 @@ UpdateGroupProperties(HWND hwndDlg) ListView_GetItemText(hwndLV, iItem, 0, szGroupName, - UNLEN); + UNLEN + 1); NetLocalGroupGetInfo(NULL, szGroupName, 1, (LPBYTE*)&pGroupInfo); @@ -254,7 +254,7 @@ GroupRename(HWND hwndDlg) static BOOL GroupDelete(HWND hwndDlg) { - TCHAR szGroupName[UNLEN]; + TCHAR szGroupName[UNLEN + 1]; TCHAR szText[256]; INT nItem; HWND hwndLV; @@ -269,7 +269,7 @@ GroupDelete(HWND hwndDlg) ListView_GetItemText(hwndLV, nItem, 0, szGroupName, - UNLEN); + UNLEN + 1); /* Display a warning message, because the delete operation cannot be reverted */ wsprintf(szText, TEXT("Dou you really want to delete the user group \"%s\"?"), szGroupName); @@ -336,8 +336,8 @@ OnGroupsPageBeginLabelEdit(LPNMLVDISPINFO pnmv) static BOOL OnGroupsPageEndLabelEdit(LPNMLVDISPINFO pnmv) { - TCHAR szOldGroupName[UNLEN]; - TCHAR szNewGroupName[UNLEN]; + TCHAR szOldGroupName[UNLEN + 1]; + TCHAR szNewGroupName[UNLEN + 1]; LOCALGROUP_INFO_0 lgrpi0; NET_API_STATUS status; @@ -349,7 +349,7 @@ OnGroupsPageEndLabelEdit(LPNMLVDISPINFO pnmv) ListView_GetItemText(pnmv->hdr.hwndFrom, pnmv->item.iItem, 0, szOldGroupName, - UNLEN); + UNLEN + 1); /* Leave, if the user canceled the edit action */ if (pnmv->item.pszText == NULL) diff --git a/dll/cpl/usrmgr/userprops.c b/dll/cpl/usrmgr/userprops.c index 44a3abcb40b..37819c52be8 100644 --- a/dll/cpl/usrmgr/userprops.c +++ b/dll/cpl/usrmgr/userprops.c @@ -316,7 +316,7 @@ static VOID RemoveGroupFromUser(HWND hwndDlg, PMEMBERSHIP_USER_DATA pUserData) { - TCHAR szGroupName[UNLEN]; + TCHAR szGroupName[UNLEN + 1]; TCHAR szText[256]; LOCALGROUP_MEMBERS_INFO_3 memberInfo; HWND hwndLV; @@ -332,7 +332,7 @@ RemoveGroupFromUser(HWND hwndDlg, ListView_GetItemText(hwndLV, nItem, 0, szGroupName, - UNLEN); + UNLEN + 1); /* Display a warning message because the remove operation cannot be reverted */ wsprintf(szText, TEXT("Do you really want to remove the user \"%s\" from the group \"%s\"?"), @@ -441,7 +441,7 @@ AddSelectedGroupsToUser(HWND hwndDlg, { HWND hwndLV; INT nItem; - TCHAR szGroupName[UNLEN]; + TCHAR szGroupName[UNLEN + 1]; BOOL bResult = FALSE; BOOL bFound; DWORD i; @@ -459,7 +459,7 @@ AddSelectedGroupsToUser(HWND hwndDlg, ListView_GetItemText(hwndLV, nItem, 0, szGroupName, - UNLEN); + UNLEN + 1); bFound = FALSE; for (i = 0; i < pUserData->dwGroupCount; i++) @@ -902,7 +902,7 @@ UserProperties(HWND hwndDlg) { PROPSHEETPAGE psp[3]; PROPSHEETHEADER psh; - TCHAR szUserName[UNLEN]; + TCHAR szUserName[UNLEN + 1]; INT nItem; HWND hwndLV; @@ -915,7 +915,7 @@ UserProperties(HWND hwndDlg) ListView_GetItemText(hwndLV, nItem, 0, szUserName, - UNLEN); + UNLEN + 1); ZeroMemory(&psh, sizeof(PROPSHEETHEADER)); psh.dwSize = sizeof(PROPSHEETHEADER); diff --git a/dll/cpl/usrmgr/users.c b/dll/cpl/usrmgr/users.c index c137e66ce49..084743e72f8 100644 --- a/dll/cpl/usrmgr/users.c +++ b/dll/cpl/usrmgr/users.c @@ -109,7 +109,7 @@ ChangePasswordDlgProc(HWND hwndDlg, static VOID UserChangePassword(HWND hwndDlg) { - TCHAR szUserName[UNLEN]; + TCHAR szUserName[UNLEN + 1]; USER_INFO_1003 user; INT nItem; HWND hwndLV; @@ -126,7 +126,7 @@ UserChangePassword(HWND hwndDlg) ListView_GetItemText(hwndLV, nItem, 0, szUserName, - UNLEN); + UNLEN + 1); if (DialogBoxParam(hApplet, MAKEINTRESOURCE(IDD_CHANGE_PASSWORD), @@ -386,7 +386,7 @@ UserRename(HWND hwndDlg) static BOOL UserDelete(HWND hwndDlg) { - TCHAR szUserName[UNLEN]; + TCHAR szUserName[UNLEN + 1]; TCHAR szText[256]; INT nItem; HWND hwndLV; @@ -401,7 +401,7 @@ UserDelete(HWND hwndDlg) ListView_GetItemText(hwndLV, nItem, 0, szUserName, - UNLEN); + UNLEN + 1); /* Display a warning message because the delete operation cannot be reverted */ wsprintf(szText, TEXT("Do you really want to delete the user \"%s\"?"), szUserName); @@ -550,8 +550,8 @@ OnBeginLabelEdit(LPNMLVDISPINFO pnmv) static BOOL OnEndLabelEdit(LPNMLVDISPINFO pnmv) { - TCHAR szOldUserName[UNLEN]; - TCHAR szNewUserName[UNLEN]; + TCHAR szOldUserName[UNLEN + 1]; + TCHAR szNewUserName[UNLEN + 1]; USER_INFO_0 useri0; NET_API_STATUS status; @@ -563,7 +563,7 @@ OnEndLabelEdit(LPNMLVDISPINFO pnmv) ListView_GetItemText(pnmv->hdr.hwndFrom, pnmv->item.iItem, 0, szOldUserName, - UNLEN); + UNLEN + 1); /* Leave, if the user canceled the edit action */ if (pnmv->item.pszText == NULL) @@ -649,7 +649,7 @@ OnNotify(HWND hwndDlg, PUSER_DATA pUserData, NMHDR *phdr) static VOID UpdateUserProperties(HWND hwndDlg) { - TCHAR szUserName[UNLEN]; + TCHAR szUserName[UNLEN + 1]; INT iItem; HWND hwndLV; PUSER_INFO_2 pUserInfo = NULL; @@ -664,7 +664,7 @@ UpdateUserProperties(HWND hwndDlg) ListView_GetItemText(hwndLV, iItem, 0, szUserName, - UNLEN); + UNLEN + 1); NetUserGetInfo(NULL, szUserName, 2, (LPBYTE*)&pUserInfo);
3 years, 8 months
1
0
0
0
[reactos] 01/01: [COMCTL32] Fix an incorrect returned value for ImageList_Remove
by George Bișoc
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1cf1892b14b53a586b45e…
commit 1cf1892b14b53a586b45e6b7da81fa9ec57977e9 Author: George Bișoc <george.bisoc(a)reactos.org> AuthorDate: Sat Apr 24 20:13:56 2021 +0200 Commit: George Bișoc <george.bisoc(a)reactos.org> CommitDate: Sat Apr 24 20:13:56 2021 +0200 [COMCTL32] Fix an incorrect returned value for ImageList_Remove Thanks goes to Kyle Katarn. Had to make a commit myself due to author's account being deleted. Signed-off-by: Kyle Katarn <contact(a)kcsoftwares.com> --- dll/win32/comctl32/imagelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/comctl32/imagelist.c b/dll/win32/comctl32/imagelist.c index b97adaa90d7..78407dfdd94 100644 --- a/dll/win32/comctl32/imagelist.c +++ b/dll/win32/comctl32/imagelist.c @@ -4196,7 +4196,7 @@ ImageList_Remove (HIMAGELIST himl, INT i) { IImageList2* piml = IImageList2_from_impl(himl); if (!piml) - return -1; + return FALSE; return (piml->lpVtbl->Remove(piml, i) == S_OK) ? TRUE : FALSE; }
3 years, 8 months
1
0
0
0
[reactos] 01/01: Fix start logo resource
by Abdulganiev Rafael
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=48d9c07894d5fa3cebe64…
commit 48d9c07894d5fa3cebe6437a2b9ec5ae3fdc7a9a Author: Abdulganiev Rafael <abdulganiev.rafael(a)gmail.com> AuthorDate: Mon Sep 23 16:32:30 2019 +0400 Commit: George Bișoc <george.bisoc(a)reactos.org> CommitDate: Sat Apr 24 18:17:41 2021 +0200 Fix start logo resource --- .../mizu.msstyles/bitmaps/NORMAL_STARTBUTTON.bmp | Bin 10350 -> 10352 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/media/themes/Mizu/mizu.msstyles/bitmaps/NORMAL_STARTBUTTON.bmp b/media/themes/Mizu/mizu.msstyles/bitmaps/NORMAL_STARTBUTTON.bmp index 35a7477ae42..dad1e96e151 100644 Binary files a/media/themes/Mizu/mizu.msstyles/bitmaps/NORMAL_STARTBUTTON.bmp and b/media/themes/Mizu/mizu.msstyles/bitmaps/NORMAL_STARTBUTTON.bmp differ
3 years, 8 months
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
18
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Results per page:
10
25
50
100
200