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
May 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
183 discussions
Start a n
N
ew thread
[reactos] 02/09: [SYSDM][USERINIT] Rewrite a if-condition in order to fail early, and save one level of code indentation.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=89860ab543994c4d91cd9…
commit 89860ab543994c4d91cd923d2beedba34db443b2 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Wed Apr 21 18:11:17 2021 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Wed May 5 17:24:10 2021 +0200 [SYSDM][USERINIT] Rewrite a if-condition in order to fail early, and save one level of code indentation. --- base/system/userinit/livecd.c | 72 +++++++++++++++++++++---------------------- dll/cpl/sysdm/general.c | 72 +++++++++++++++++++++---------------------- 2 files changed, 72 insertions(+), 72 deletions(-) diff --git a/base/system/userinit/livecd.c b/base/system/userinit/livecd.c index e4940bcade0..40626609402 100644 --- a/base/system/userinit/livecd.c +++ b/base/system/userinit/livecd.c @@ -43,53 +43,53 @@ InitLogo(PIMGINFO pImgInfo, HWND hwndDlg) hLogo = (HBITMAP)LoadImageW(hInstance, MAKEINTRESOURCEW(IDB_ROSLOGO), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); hMask = (HBITMAP)LoadImageW(hInstance, MAKEINTRESOURCEW(IDB_ROSMASK), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); - if (hLogo != NULL && hMask != NULL) - { - GetObject(hLogo, sizeof(logoBitmap), &logoBitmap); - GetObject(hMask, sizeof(maskBitmap), &maskBitmap); + if (hLogo == NULL || hMask == NULL) + goto Cleanup; - if (logoBitmap.bmHeight != maskBitmap.bmHeight || logoBitmap.bmWidth != maskBitmap.bmWidth) - goto Cleanup; + GetObject(hLogo, sizeof(logoBitmap), &logoBitmap); + GetObject(hMask, sizeof(maskBitmap), &maskBitmap); - bmpi.bmiHeader.biSize = sizeof(BITMAPINFO); - bmpi.bmiHeader.biWidth = logoBitmap.bmWidth; - bmpi.bmiHeader.biHeight = logoBitmap.bmHeight; - bmpi.bmiHeader.biPlanes = 1; - bmpi.bmiHeader.biBitCount = 32; - bmpi.bmiHeader.biCompression = BI_RGB; - bmpi.bmiHeader.biSizeImage = 4 * logoBitmap.bmWidth * logoBitmap.bmHeight; + if (logoBitmap.bmHeight != maskBitmap.bmHeight || logoBitmap.bmWidth != maskBitmap.bmWidth) + goto Cleanup; - /* Create a premultiplied bitmap */ - hAlphaLogo = CreateDIBSection(hDC, &bmpi, DIB_RGB_COLORS, (PVOID*)&pBits, 0, 0); - if (!hAlphaLogo) - goto Cleanup; + bmpi.bmiHeader.biSize = sizeof(BITMAPINFO); + bmpi.bmiHeader.biWidth = logoBitmap.bmWidth; + bmpi.bmiHeader.biHeight = logoBitmap.bmHeight; + bmpi.bmiHeader.biPlanes = 1; + bmpi.bmiHeader.biBitCount = 32; + bmpi.bmiHeader.biCompression = BI_RGB; + bmpi.bmiHeader.biSizeImage = 4 * logoBitmap.bmWidth * logoBitmap.bmHeight; + + /* Create a premultiplied bitmap */ + hAlphaLogo = CreateDIBSection(hDC, &bmpi, DIB_RGB_COLORS, (PVOID*)&pBits, 0, 0); + if (!hAlphaLogo) + goto Cleanup; - SelectObject(hDCLogo, hLogo); - SelectObject(hDCMask, hMask); + SelectObject(hDCLogo, hLogo); + SelectObject(hDCMask, hMask); - for (line = logoBitmap.bmHeight - 1; line >= 0; line--) + for (line = logoBitmap.bmHeight - 1; line >= 0; line--) + { + for (column = 0; column < logoBitmap.bmWidth; column++) { - for (column = 0; column < logoBitmap.bmWidth; column++) - { - COLORREF alpha = GetPixel(hDCMask, column, line) & 0xFF; - COLORREF Color = GetPixel(hDCLogo, column, line); - DWORD r, g, b; + COLORREF alpha = GetPixel(hDCMask, column, line) & 0xFF; + COLORREF Color = GetPixel(hDCLogo, column, line); + DWORD r, g, b; - r = GetRValue(Color) * alpha / 255; - g = GetGValue(Color) * alpha / 255; - b = GetBValue(Color) * alpha / 255; + r = GetRValue(Color) * alpha / 255; + g = GetGValue(Color) * alpha / 255; + b = GetBValue(Color) * alpha / 255; - *pBits++ = b | (g << 8) | (r << 16) | (alpha << 24); - } + *pBits++ = b | (g << 8) | (r << 16) | (alpha << 24); } - - pImgInfo->hBitmap = hAlphaLogo; - pImgInfo->cxSource = logoBitmap.bmWidth; - pImgInfo->cySource = logoBitmap.bmHeight; - pImgInfo->iBits = logoBitmap.bmBitsPixel; - pImgInfo->iPlanes = logoBitmap.bmPlanes; } + pImgInfo->hBitmap = hAlphaLogo; + pImgInfo->cxSource = logoBitmap.bmWidth; + pImgInfo->cySource = logoBitmap.bmHeight; + pImgInfo->iBits = logoBitmap.bmBitsPixel; + pImgInfo->iPlanes = logoBitmap.bmPlanes; + Cleanup: if (hMask != NULL) DeleteObject(hMask); if (hLogo != NULL) DeleteObject(hLogo); diff --git a/dll/cpl/sysdm/general.c b/dll/cpl/sysdm/general.c index e8f38e5a6b3..d43a75cf4e7 100644 --- a/dll/cpl/sysdm/general.c +++ b/dll/cpl/sysdm/general.c @@ -78,53 +78,53 @@ static VOID InitLogo(HWND hwndDlg) hLogo = (HBITMAP)LoadImageW(hApplet, MAKEINTRESOURCEW(IDB_ROSBMP), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); hMask = (HBITMAP)LoadImageW(hApplet, MAKEINTRESOURCEW(IDB_ROSMASK), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); - if (hLogo != NULL && hMask != NULL) - { - GetObject(hLogo, sizeof(logoBitmap), &logoBitmap); - GetObject(hMask, sizeof(maskBitmap), &maskBitmap); + if (hLogo == NULL || hMask == NULL) + goto Cleanup; - if (logoBitmap.bmHeight != maskBitmap.bmHeight || logoBitmap.bmWidth != maskBitmap.bmWidth) - goto Cleanup; + GetObject(hLogo, sizeof(logoBitmap), &logoBitmap); + GetObject(hMask, sizeof(maskBitmap), &maskBitmap); - bmpi.bmiHeader.biSize = sizeof(BITMAPINFO); - bmpi.bmiHeader.biWidth = logoBitmap.bmWidth; - bmpi.bmiHeader.biHeight = logoBitmap.bmHeight; - bmpi.bmiHeader.biPlanes = 1; - bmpi.bmiHeader.biBitCount = 32; - bmpi.bmiHeader.biCompression = BI_RGB; - bmpi.bmiHeader.biSizeImage = 4 * logoBitmap.bmWidth * logoBitmap.bmHeight; + if (logoBitmap.bmHeight != maskBitmap.bmHeight || logoBitmap.bmWidth != maskBitmap.bmWidth) + goto Cleanup; - /* Create a premultiplied bitmap */ - hAlphaLogo = CreateDIBSection(hDC, &bmpi, DIB_RGB_COLORS, (PVOID*)&pBits, 0, 0); - if (!hAlphaLogo) - goto Cleanup; + bmpi.bmiHeader.biSize = sizeof(BITMAPINFO); + bmpi.bmiHeader.biWidth = logoBitmap.bmWidth; + bmpi.bmiHeader.biHeight = logoBitmap.bmHeight; + bmpi.bmiHeader.biPlanes = 1; + bmpi.bmiHeader.biBitCount = 32; + bmpi.bmiHeader.biCompression = BI_RGB; + bmpi.bmiHeader.biSizeImage = 4 * logoBitmap.bmWidth * logoBitmap.bmHeight; + + /* Create a premultiplied bitmap */ + hAlphaLogo = CreateDIBSection(hDC, &bmpi, DIB_RGB_COLORS, (PVOID*)&pBits, 0, 0); + if (!hAlphaLogo) + goto Cleanup; - SelectObject(hDCLogo, hLogo); - SelectObject(hDCMask, hMask); + SelectObject(hDCLogo, hLogo); + SelectObject(hDCMask, hMask); - for (line = logoBitmap.bmHeight - 1; line >= 0; line--) + for (line = logoBitmap.bmHeight - 1; line >= 0; line--) + { + for (column = 0; column < logoBitmap.bmWidth; column++) { - for (column = 0; column < logoBitmap.bmWidth; column++) - { - COLORREF alpha = GetPixel(hDCMask, column, line) & 0xFF; - COLORREF Color = GetPixel(hDCLogo, column, line); - DWORD r, g, b; + COLORREF alpha = GetPixel(hDCMask, column, line) & 0xFF; + COLORREF Color = GetPixel(hDCLogo, column, line); + DWORD r, g, b; - r = GetRValue(Color) * alpha / 255; - g = GetGValue(Color) * alpha / 255; - b = GetBValue(Color) * alpha / 255; + r = GetRValue(Color) * alpha / 255; + g = GetGValue(Color) * alpha / 255; + b = GetBValue(Color) * alpha / 255; - *pBits++ = b | (g << 8) | (r << 16) | (alpha << 24); - } + *pBits++ = b | (g << 8) | (r << 16) | (alpha << 24); } - - pImgInfo->hBitmap = hAlphaLogo; - pImgInfo->cxSource = logoBitmap.bmWidth; - pImgInfo->cySource = logoBitmap.bmHeight; - pImgInfo->iBits = logoBitmap.bmBitsPixel; - pImgInfo->iPlanes = logoBitmap.bmPlanes; } + pImgInfo->hBitmap = hAlphaLogo; + pImgInfo->cxSource = logoBitmap.bmWidth; + pImgInfo->cySource = logoBitmap.bmHeight; + pImgInfo->iBits = logoBitmap.bmBitsPixel; + pImgInfo->iPlanes = logoBitmap.bmPlanes; + Cleanup: if (hMask != NULL) DeleteObject(hMask); if (hLogo != NULL) DeleteObject(hLogo);
3 years, 7 months
1
0
0
0
[reactos] 01/09: [USETUP] Fix letter encoding in translation. (#3619) CORE-17545
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=33c210da37ccd1acff8e9…
commit 33c210da37ccd1acff8e909ecdf9a7156b4d5f2f Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Wed Apr 21 17:55:45 2021 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Wed May 5 17:23:57 2021 +0200 [USETUP] Fix letter encoding in translation. (#3619) CORE-17545 Fix Clang warning: base/setup/usetup/lang/de-DE.h:1099:24: warning: illegal character encoding in string literal [-Winvalid-source-encoding] "die Partition <E4>ndern, die derzeit als aktiv markiert ist.", ^~~~ --- base/setup/usetup/lang/de-DE.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/setup/usetup/lang/de-DE.h b/base/setup/usetup/lang/de-DE.h index ad8544fd8c8..10dc56e1175 100644 --- a/base/setup/usetup/lang/de-DE.h +++ b/base/setup/usetup/lang/de-DE.h @@ -1096,7 +1096,7 @@ static MUI_ENTRY deDEChangeSystemPartition[] = { 6, 19, - "die Partition �ndern, die derzeit als aktiv markiert ist.", + "die Partition \204ndern, die derzeit als aktiv markiert ist.", TEXT_STYLE_NORMAL, TEXT_ID_STATIC },
3 years, 7 months
1
0
0
0
[reactos] 01/01: [TRANSLATION] indonesian add and update apps/shell translation
by Mas Ahmad Muhammad
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fd4d8f550cb2fd2a05649…
commit fd4d8f550cb2fd2a056495c89a08d47a204f6d0d Author: Mas Ahmad Muhammad <m.charly81(a)gmail.com> AuthorDate: Mon Apr 26 21:47:12 2021 +0700 Commit: George Bișoc <george.bisoc(a)reactos.org> CommitDate: Wed May 5 11:34:28 2021 +0200 [TRANSLATION] indonesian add and update apps/shell translation --- base/applications/games/winmine/lang/id-ID.rc | 73 +++++++++++ base/applications/games/winmine/rsrc.rc | 3 + base/applications/taskmgr/lang/id-ID.rc | 2 +- dll/win32/browseui/lang/id-ID.rc | 9 +- dll/win32/comdlg32/lang/cdlg_Id.rc | 17 +-- dll/win32/msi/lang/msi_Id.rc | 178 ++++++++++++++++++++++++++ dll/win32/msi/rsrc.rc | 3 + dll/win32/netid/lang/id-ID.rc | 30 ++--- dll/win32/shell32/lang/id-ID.rc | 22 ++-- 9 files changed, 298 insertions(+), 39 deletions(-) diff --git a/base/applications/games/winmine/lang/id-ID.rc b/base/applications/games/winmine/lang/id-ID.rc new file mode 100644 index 00000000000..262f56f01ce --- /dev/null +++ b/base/applications/games/winmine/lang/id-ID.rc @@ -0,0 +1,73 @@ +LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_APPNAME "WineMine" + IDS_NOBODY "Nobody" + IDS_ABOUT "Hak cipta 2000 Joshua Thielen" +END + +IDM_WINEMINE MENU +BEGIN + POPUP "&Pilihan" + BEGIN + MENUITEM "&Baru\tF2", IDM_NEW + MENUITEM SEPARATOR + MENUITEM "Beri &Tanda Tanya", IDM_MARKQ + MENUITEM SEPARATOR + MENUITEM "&Pemula", IDM_BEGINNER + MENUITEM "Ti&ngkat Lanjut", IDM_ADVANCED + MENUITEM "&Ekspert", IDM_EXPERT + MENUITEM "&Sesuaikan...", IDM_CUSTOM + MENUITEM SEPARATOR + MENUITEM "&Keluar\tAlt+X", IDM_EXIT + END + POPUP "&Info" + BEGIN + MENUITEM "&Waktu Tercepat...", IDM_TIMES + MENUITEM "&Tentang", IDM_ABOUT + END +END + +DLG_TIMES DIALOGEX 0, 0, 160, 80 +STYLE DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP | DS_SHELLFONT +CAPTION "Waktu Tercepat" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Waktu Tercepat", -1, 10, 10, 140, 45 + LTEXT "Pemula", -1, 20, 20, 40, 8 + LTEXT "Tingkat Lanjut", -1, 20, 30, 40, 8 + LTEXT "Ekspert", -1, 20, 40, 40, 8 + LTEXT "999", IDC_TIME1, 70, 20, 15, 8 + LTEXT "999", IDC_TIME2, 70, 30, 15, 8 + LTEXT "999", IDC_TIME3, 70, 40, 15, 8 + LTEXT "", IDC_NAME1, 90, 20, 55, 8 + LTEXT "", IDC_NAME2, 90, 30, 55, 8 + LTEXT "", IDC_NAME3, 90, 40, 55, 8 + DEFPUSHBUTTON "OK", IDOK, 55, 60, 50, 15 +END + +DLG_CONGRATS DIALOGEX 0, 0, 160, 60 +STYLE DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP | DS_SHELLFONT +CAPTION "Selamat!" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Mohon masukkan nama anda", -1, 10, 10, 150, 10 + EDITTEXT IDC_EDITNAME, 25, 20, 110, 12 + DEFPUSHBUTTON "OK", IDOK, 60, 40, 40, 15 +END + +DLG_CUSTOM DIALOGEX 0, 0, 100, 100 +STYLE DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP | DS_SHELLFONT +CAPTION "Penyesuaian" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Baris", -1, 5, 5, 30, 10 + LTEXT "Kolom", -1, 5, 35, 30, 10 + LTEXT "Jebakan", -1, 5, 65, 30, 10 + EDITTEXT IDC_EDITROWS, 5, 15, 20, 12, ES_NUMBER + EDITTEXT IDC_EDITCOLS, 5, 45, 20, 12, ES_NUMBER + EDITTEXT IDC_EDITMINES, 5, 75, 20, 12, ES_NUMBER + DEFPUSHBUTTON "OK", IDOK, 40, 30, 50, 15 + PUSHBUTTON "Batal", IDCANCEL, 40, 50, 50, 15 +END diff --git a/base/applications/games/winmine/rsrc.rc b/base/applications/games/winmine/rsrc.rc index 9641baf421a..392bc97375d 100644 --- a/base/applications/games/winmine/rsrc.rc +++ b/base/applications/games/winmine/rsrc.rc @@ -81,6 +81,9 @@ IDI_MINES BITMAP "rc/mines.bmp" #ifdef LANGUAGE_HU_HU #include "lang/hu-HU.rc" #endif +#ifdef LANGUAGE_ID_ID + #include "lang/id-ID.rc" +#endif #ifdef LANGUAGE_IT_IT #include "lang/it-IT.rc" #endif diff --git a/base/applications/taskmgr/lang/id-ID.rc b/base/applications/taskmgr/lang/id-ID.rc index 8097d84b9fa..a5df46cc455 100644 --- a/base/applications/taskmgr/lang/id-ID.rc +++ b/base/applications/taskmgr/lang/id-ID.rc @@ -224,7 +224,7 @@ BEGIN EDITTEXT IDC_KERNEL_MEMORY_NONPAGED, 185, 193, 48, 8, ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP GROUPBOX "Riwayat Pemakaian CPU", IDC_CPU_USAGE_HISTORY_FRAME, 74, 5, 168, 54, 0, WS_EX_TRANSPARENT - GROUPBOX "Riwayat Pemakaian Memori", IDC_MEMORY_USAGE_HISTORY_FRAME, 74, 63, 168, 54, 0, WS_EX_TRANSPARENT + GROUPBOX "Riwayat Pemakaian MEM", IDC_MEMORY_USAGE_HISTORY_FRAME, 74, 63, 168, 54, 0, WS_EX_TRANSPARENT PUSHBUTTON "Tampilan Pemakaian CPU", IDC_CPU_USAGE_GRAPH, 12, 17, 47, 37, NOT WS_TABSTOP, WS_EX_CLIENTEDGE PUSHBUTTON "Tampilan Pemakaian MEM", IDC_MEM_USAGE_GRAPH, 12, 75, 47, 37, NOT WS_TABSTOP, WS_EX_CLIENTEDGE PUSHBUTTON "Riwayat Pemakaian CPU", IDC_CPU_USAGE_HISTORY_GRAPH, 81, 17, 153, 37, NOT WS_TABSTOP, WS_EX_CLIENTEDGE diff --git a/dll/win32/browseui/lang/id-ID.rc b/dll/win32/browseui/lang/id-ID.rc index 2ef4668ac1f..d9c0628c634 100644 --- a/dll/win32/browseui/lang/id-ID.rc +++ b/dll/win32/browseui/lang/id-ID.rc @@ -1,5 +1,6 @@ /* * Copyright 2009 Andrew Hill + * Copyright 2020-2021 Mas Ahmad Muhammad * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -122,7 +123,7 @@ BEGIN END MENUITEM "&Buka Folder", IDM_OPEN_FOLDER MENUITEM "&Tampilkan Teks", IDM_SHOW_TEXT - END + END END /* Dialogs */ @@ -345,7 +346,7 @@ END STRINGTABLE BEGIN - IDS_SEARCH_RESULTS "Search Results" + IDS_SEARCH_RESULTS "Hasil Pencarian" IDS_SEARCHINVALID "'%1' bukan folder yang sah." IDS_SEARCH_FOLDER "Mencari %s" IDS_SEARCH_FILES_FOUND "%u berkas ditemukan" @@ -357,6 +358,6 @@ END STRINGTABLE BEGIN - IDS_PARSE_ADDR_ERR_TITLE "ReactOS Explorer" - IDS_PARSE_ADDR_ERR_TEXT "ReactOS Explorer cannot find '%1'. Check the spelling and try again." + IDS_PARSE_ADDR_ERR_TITLE "Penjelajah ReactOS" + IDS_PARSE_ADDR_ERR_TEXT "Penjelajah ReactOS tidak menemukan '%1'. Cek pengejaannya dan coba lagi." END diff --git a/dll/win32/comdlg32/lang/cdlg_Id.rc b/dll/win32/comdlg32/lang/cdlg_Id.rc index 67157993c7d..b980af7edc0 100644 --- a/dll/win32/comdlg32/lang/cdlg_Id.rc +++ b/dll/win32/comdlg32/lang/cdlg_Id.rc @@ -3,6 +3,7 @@ * * Copyright 1999 Bertho Stultiens * Copyright 1999 Klaas van Gend + * Copyright 2020-2021 Mas Ahmad Muhammad * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,13 +25,13 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT STRINGTABLE { IDS_FILENOTFOUND "Berkas tidak ditemukan" - IDS_VERIFYFILE "Please verify that the correct file name was given" + IDS_VERIFYFILE "Harap verifikasi bahwa nama file yang diberikan benar" IDS_CREATEFILE "Berkas tidak tersedia.\n\ Ingin buat berkas?" IDS_OVERWRITEFILE "Berkas telah ada.\n\ Ingin mengganti berkas?" IDS_INVALID_FILENAME_TITLE "Karakter pada jalur tidak valid" - IDS_INVALID_FILENAME "A filename cannot contain any of the following characters:\n\ + IDS_INVALID_FILENAME "Nama file tidak boleh berisi salah satu karakter berikut:\n\ / : < > |" IDS_PATHNOTEXISTING "Jalur tidak tersedia" IDS_FILENOTEXISTING "Berkas tidak tersedia" @@ -60,7 +61,7 @@ Mohon masukkan ulang tepi ini." PD32_TOO_LARGE_COPIES "Jumlah salinan yang besar tidak didukung pencetak tersebut.\n\ Mohon masukkan nilai antara 1 dan %d." PD32_PRINT_ERROR "Terjadi kesalahan pencetak." - PD32_NO_DEFAULT_PRINTER "No default printer defined." + PD32_NO_DEFAULT_PRINTER "Tidak ada printer default yang ditentukan." PD32_CANT_FIND_PRINTER "Tidak bisa menemukan pencetak." PD32_OUT_OF_MEMORY "Kehabisan memori." PD32_GENERIC_ERROR "Terjadi kesalahan." @@ -138,7 +139,7 @@ STRINGTABLE IDS_SAVE_AS "Simpan Sebagai" IDS_OPEN_FILE "Buka Berkas" IDS_SELECT_FOLDER "Pilih Folder" - IDS_FONT_SIZE_INPUT "Ukuran fon has to be a number." + IDS_FONT_SIZE_INPUT "Ukuran fon harus berupa angka." } /* @@ -147,7 +148,7 @@ STRINGTABLE OPEN_FILE DIALOG 36, 24, 275, 134 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Open" +CAPTION "Buka" FONT 8, "MS Shell Dlg" { LTEXT "&Nama berkas:", stc3, 6, 6, 76, 9 @@ -230,7 +231,7 @@ FONT 8, "MS Shell Dlg" RADIOBUTTON "&Bentang", rad4, 50, 110, 50, 12 ICON "LANDSCAP", stc10, 10, 95, 32, 32 ICON "PORTRAIT", stc11, 10, 95, 32, 32 - GROUPBOX "Paper", grp3, 116, 82, 178, 50, BS_GROUPBOX + GROUPBOX "Kertas", grp3, 116, 82, 178, 50, BS_GROUPBOX LTEXT "&Ukuran", stc2, 126, 95, 35, 9 LTEXT "&Sumber", stc3, 126, 110, 35, 9 COMBOBOX cmb2, 155, 95, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP @@ -300,7 +301,7 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Ba&ntuan", pshHelp,100,166, 44, 14 PUSHBUTTON "Ta&mbahkan ke Warna Pilihan", IDC_COLOR_ADD /*1024*/, 152, 167, 144, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "&Tentukan Warna Pilihan >>", IDC_COLOR_DEFINE /*1025*/, 4, 149, 142, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "Color | Sol&id", IDC_COLOR_RES, 300,200,4,14 /* just a dummy */ + PUSHBUTTON "Warna | Sol&id", IDC_COLOR_RES, 300,200,4,14 /* just a dummy */ } @@ -500,7 +501,7 @@ FONT 8, "MS Shell Dlg" NEWFILEOPENV3ORD DIALOG 0, 0, 440, 300 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN | WS_THICKFRAME -CAPTION "Open" +CAPTION "Buka" FONT 8, "MS Shell Dlg" { LTEXT "Nama berkas:", IDC_FILENAMESTATIC, 160, 240, 60, 9, SS_RIGHT | WS_CLIPSIBLINGS diff --git a/dll/win32/msi/lang/msi_Id.rc b/dll/win32/msi/lang/msi_Id.rc new file mode 100644 index 00000000000..62c6da9810d --- /dev/null +++ b/dll/win32/msi/lang/msi_Id.rc @@ -0,0 +1,178 @@ +/* + * Indonesian resources for MSI + * + * Hakcipta 2021 Mas Ahmad Muhammad + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT + +STRINGTABLE +{ + 4 "The specified installation package could not be opened. Please check the file path and try again." + 5 "jalur %s tidak ditemukan" + 9 "Masukkan disk %s" + 10 "Windows Installer %s\n\nPenggunaan:\nmsiexec command {parameter yang dibutuhkan} [parameter opsional]\n\nMemasang produk:\n\t/i {paket|kodeproduk} [properti]\n\t/package {package|productcode} [property]\n\t/paket [properti]\nPerbaiki pemasangan:\n\t/f[p|o|e|d|c|a|u|m|s|v] {paket|kodeproduk}\npencopotan produk:\n\t/pencopotan {paket|kodeproduk} [properti]\n\t/x {paket|kodeproduk} [properti]\nIklankan produk:\n\t/j[u|m] packet [/t transform] [/g languageid]\nTerapkan patch:\n\t/p p [...] + 11 "masukkan folder yang berisi %s" + 12 "sumber pemasangan untuk fitur hilang" + 13 "drive jatingan untuk fitur hilang" + 14 "fitur dari:" + 15 "pilih folder yang berisi %s" +} + +/* Error messages */ +STRINGTABLE +{ + IDS_FATALEXIT "{{Fatal error: }}" + IDS_ERROR "{{Error [1]. }}" + IDS_WARNING "Warning [1]." + IDS_INFO "Info [1]." + IDS_INSTALLERROR "The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is [1]. {{The arguments are: [2], [3], [4]}}" + IDS_OUTOFDISKSPACE "{{Disk full: }}" + IDS_ACTIONSTART "Action [Time]: [1]. [2]" + IDS_COMMONDATA "Message type: [1], Argument: [2]{, [3]}" + IDS_INFO_ACTIONSTART "Action start [Time]: [1]." + IDS_INFO_ACTIONENDED "Action ended [Time]: [1]. Return value [2]." + IDS_INFO_LOGGINGSTART "=== Logging started: [Date] [Time] ===" + + IDS_ERR_INSERTDISK "Please insert the disk: [2]" + IDS_ERR_CABNOTFOUND "Source file not found{{(cabinet)}}: [2]. Verify that the file exists and that you can access it." +} + +/* Standard action description strings */ +STRINGTABLE +{ + IDS_DESC_ALLOCATEREGISTRYSPACE "Allocating registry space" + IDS_DESC_APPSEARCH "Searching for installed applications" + IDS_DESC_BINDIMAGE "Binding executables" + IDS_DESC_CCPSEARCH "Searching for qualifying products" + IDS_DESC_COSTFINALIZE "Computing space requirements" + IDS_DESC_COSTINITIALIZE "Computing space requirements" + IDS_DESC_CREATEFOLDERS "Creating folders" + IDS_DESC_CREATESHORTCUTS "Creating shortcuts" + IDS_DESC_DELETESERVICES "Deleting services" + IDS_DESC_DUPLICATEFILES "Creating duplicate files" + IDS_DESC_FILECOST "Computing space requirements" + IDS_DESC_FINDRELATEDPRODUCTS "Searching for related applications" + IDS_DESC_INSTALLADMINPACKAGE "Copying network install files" + IDS_DESC_INSTALLFILES "Copying new files" + IDS_DESC_INSTALLODBC "Installing ODBC components" + IDS_DESC_INSTALLSERVICES "Installing new services" + IDS_DESC_INSTALLSFPCATALOGFILE "Installing system catalog" + IDS_DESC_INSTALLVALIDATE "Validating install" + IDS_DESC_LAUNCHCONDITIONS "Evaluating launch conditions" + IDS_DESC_MIGRATEFEATURESTATES "Migrating feature states from related applications" + IDS_DESC_MOVEFILES "Moving files" + IDS_DESC_MSIPUBLISHASSEMBLIES "Publishing assembly information" + IDS_DESC_MSIUNPUBLISHASSEMBLIES "Unpublishing assembly information" + IDS_DESC_PATCHFILES "Patching files" + IDS_DESC_PROCESSCOMPONENTS "Updating component registration" + IDS_DESC_PUBLISHCOMPONENTS "Publishing Qualified Components" + IDS_DESC_PUBLISHFEATURES "Publishing Product Features" + IDS_DESC_PUBLISHPRODUCT "Publishing product information" + IDS_DESC_REGISTERCLASSINFO "Registering Class servers" + IDS_DESC_REGISTERCOMPLUS "Registering COM+ Applications and Components" + IDS_DESC_REGISTEREXTENSIONINFO "Registering extension servers" + IDS_DESC_REGISTERFONTS "Registering fonts" + IDS_DESC_REGISTERMIMEINFO "Registering MIME info" + IDS_DESC_REGISTERPRODUCT "Registering product" + IDS_DESC_REGISTERPROGIDINFO "Registering program identifiers" + IDS_DESC_REGISTERTYPELIBRARIES "Registering type libraries" + IDS_DESC_REGISTERUSER "Registering user" + IDS_DESC_REMOVEDUPLICATEFILES "Removing duplicated files" + IDS_DESC_REMOVEENVIRONMENTSTRINGS "Updating environment strings" + IDS_DESC_REMOVEEXISTINGPRODUCTS "Removing applications" + IDS_DESC_REMOVEFILES "Removing files" + IDS_DESC_REMOVEFOLDERS "Removing folders" + IDS_DESC_REMOVEINIVALUES "Removing INI files entries" + IDS_DESC_REMOVEODBC "Removing ODBC components" + IDS_DESC_REMOVEREGISTRYVALUES "Removing system registry values" + IDS_DESC_REMOVESHORTCUTS "Removing shortcuts" + IDS_DESC_RMCCPSEARCH "Searching for qualifying products" + IDS_DESC_SELFREGMODULES "Registering modules" + IDS_DESC_SELFUNREGMODULES "Unregistering modules" + IDS_DESC_SETODBCFOLDERS "Initializing ODBC directories" + IDS_DESC_STARTSERVICES "Starting services" + IDS_DESC_STOPSERVICES "Stopping services" + IDS_DESC_UNPUBLISHCOMPONENTS "Unpublishing Qualified Components" + IDS_DESC_UNPUBLISHFEATURES "Unpublishing Product Features" + IDS_DESC_UNPUBLISHPRODUCT "Unpublishing product information" + IDS_DESC_UNREGISTERCLASSINFO "Unregister Class servers" + IDS_DESC_UNREGISTERCOMPLUS "Unregistering COM+ Applications and Components" + IDS_DESC_UNREGISTEREXTENSIONINFO "Unregistering extension servers" + IDS_DESC_UNREGISTERFONTS "Unregistering fonts" + IDS_DESC_UNREGISTERMIMEINFO "Unregistering MIME info" + IDS_DESC_UNREGISTERPROGIDINFO "Unregistering program identifiers" + IDS_DESC_UNREGISTERTYPELIBRARIES "Unregistering type libraries" + IDS_DESC_WRITEENVIRONMENTSTRINGS "Updating environment strings" + IDS_DESC_WRITEINIVALUES "Writing INI files values" + IDS_DESC_WRITEREGISTRYVALUES "Writing system registry values" +} + +/* Standard action template strings */ +STRINGTABLE +{ + IDS_TEMP_ALLOCATEREGISTRYSPACE "Free space: [1]" + IDS_TEMP_APPSEARCH "Property: [1], Signature: [2]" + IDS_TEMP_BINDIMAGE "File: [1]" + IDS_TEMP_CREATEFOLDERS "Folder: [1]" + IDS_TEMP_CREATESHORTCUTS "Shortcut: [1]" + IDS_TEMP_DELETESERVICES "Service: [1]" + IDS_TEMP_DUPLICATEFILES "File: [1], Directory: [9], Size: [6]" + IDS_TEMP_FINDRELATEDPRODUCTS "Found application: [1]" + IDS_TEMP_INSTALLADMINPACKAGE "File: [1], Directory: [9], Size: [6]" + IDS_TEMP_INSTALLFILES "File: [1], Directory: [9], Size: [6]" + IDS_TEMP_INSTALLSERVICES "Service: [2]" + IDS_TEMP_INSTALLSFPCATALOGFILE "File: [1], Dependencies: [2]" + IDS_TEMP_MIGRATEFEATURESTATES "Application: [1]" + IDS_TEMP_MOVEFILES "File: [1], Directory: [9], Size: [6]" + IDS_TEMP_MSIPUBLISHASSEMBLIES "Application Context:[1], Assembly Name:[2]" + IDS_TEMP_MSIUNPUBLISHASSEMBLIES "Application Context:[1], Assembly Name:[2]" + IDS_TEMP_PATCHFILES "File: [1], Directory: [2], Size: [3]" + IDS_TEMP_PUBLISHCOMPONENTS "Component ID: [1], Qualifier: [2]" + IDS_TEMP_PUBLISHFEATURES "Feature: [1]" + IDS_TEMP_REGISTERCLASSINFO "Class Id: [1]" + IDS_TEMP_REGISTERCOMPLUS "AppId: [1]{{, AppType: [2], Users: [3], RSN: [4]}}" + IDS_TEMP_REGISTEREXTENSIONINFO "Extension: [1]" + IDS_TEMP_REGISTERFONTS "Font: [1]" + IDS_TEMP_REGISTERMIMEINFO "MIME Content Type: [1], Extension: [2]" + IDS_TEMP_REGISTERPROGIDINFO "ProgId: [1]" + IDS_TEMP_REGISTERTYPELIBRARIES "LibID: [1]" + IDS_TEMP_REMOVEDUPLICATEFILES "File: [1], Directory: [9]" + IDS_TEMP_REMOVEENVIRONMENTSTRINGS "Name: [1], Value: [2], Action [3]" + IDS_TEMP_REMOVEEXISTINGPRODUCTS "Application: [1], Command line: [2]" + IDS_TEMP_REMOVEFILES "File: [1], Directory: [9]" + IDS_TEMP_REMOVEFOLDERS "Folder: [1]" + IDS_TEMP_REMOVEINIVALUES "File: [1], Section: [2], Key: [3], Value: [4]" + IDS_TEMP_REMOVEREGISTRYVALUES "Key: [1], Name: [2]" + IDS_TEMP_REMOVESHORTCUTS "Shortcut: [1]" + IDS_TEMP_SELFREGMODULES "File: [1], Folder: [2]" + IDS_TEMP_SELFUNREGMODULES "File: [1], Folder: [2]" + IDS_TEMP_STARTSERVICES "Service: [1]" + IDS_TEMP_STOPSERVICES "Service: [1]" + IDS_TEMP_UNPUBLISHCOMPONENTS "Component ID: [1], Qualifier: [2]" + IDS_TEMP_UNPUBLISHFEATURES "Feature: [1]" + IDS_TEMP_UNREGISTERCLASSINFO "Class Id: [1]" + IDS_TEMP_UNREGISTERCOMPLUS "AppId: [1]{{, AppType: [2]}}" + IDS_TEMP_UNREGISTEREXTENSIONINFO "Extension: [1]" + IDS_TEMP_UNREGISTERFONTS "Font: [1]" + IDS_TEMP_UNREGISTERMIMEINFO "MIME Content Type: [1], Extension: [2]" + IDS_TEMP_UNREGISTERPROGIDINFO "ProgId: [1]" + IDS_TEMP_UNREGISTERTYPELIBRARIES "LibID: [1]" + IDS_TEMP_WRITEENVIRONMENTSTRINGS "Name: [1], Value: [2], Action [3]" + IDS_TEMP_WRITEINIVALUES "File: [1], Section: [2], Key: [3], Value: [4]" + IDS_TEMP_WRITEREGISTRYVALUES "Key: [1], Name: [2], Value: [3]" +} diff --git a/dll/win32/msi/rsrc.rc b/dll/win32/msi/rsrc.rc index 7a6a4cb4e47..b4635d02f39 100644 --- a/dll/win32/msi/rsrc.rc +++ b/dll/win32/msi/rsrc.rc @@ -28,6 +28,9 @@ #ifdef LANGUAGE_HU_HU #include "lang/msi_Hu.rc" #endif +#ifdef LANGUAGE_ID_ID + #include "lang/msi_Id.rc" +#endif #ifdef LANGUAGE_IT_IT #include "lang/msi_It.rc" #endif diff --git a/dll/win32/netid/lang/id-ID.rc b/dll/win32/netid/lang/id-ID.rc index f28da2396a8..6ab31a675ce 100644 --- a/dll/win32/netid/lang/id-ID.rc +++ b/dll/win32/netid/lang/id-ID.rc @@ -19,7 +19,7 @@ BEGIN PUSHBUTTON "&Ubah...", IDC_NETWORK_PROPERTY, 190, 149, 58, 15 LTEXT "", IDC_MESSAGETEXT, 7, 179, 242, 46 ICON IDI_WARNINGICO, IDC_RESTARTICON, 7, 194, 20, 20, SS_ICON | SS_REALSIZEIMAGE - LTEXT "Changes will take effect after you restart this computer.", IDC_RESTARTTEXT, 25, 195, 209, 8 + LTEXT "Perubahan akan diterapkan setelah Anda memulai ulang komputer ini.", IDC_RESTARTTEXT, 25, 195, 209, 8 END IDD_PROPPAGECOMPNAMECHENGE DIALOGEX 0, 0, 232, 222 @@ -62,24 +62,24 @@ STRINGTABLE BEGIN 1 "* Tidak diketahui *" 2 "WORKGROUP" - 3 "The following error occurred while attempting to read domain membership information:" + 3 "Kesalahan berikut terjadi saat mencoba membaca informasi keanggotaan domain:" 4 "Ubah Nama Komputer" 5 "Workgroup:" 6 "Domain:" - 7 "The domain name ""%1"" does not conform to Internet Domain Name Service specifications, although it is a legal ReactOS name. You must use ReactOS DNS server for non-standard names." - 8 "The domain name ""%1"" is not properly formatted. Periods (.) are used to separate domains. Each domain is limited to 63 characters. Example:
domain-1.reactos.org
." - 10 "The new computer name ""%1"" is too long. The name may not be longer than 63 characters." - 11 "The new computer name entered is not properly formatted. Standard names may contain letters (a-z, A-Z), numbers (0-9), and hyphens (-), but no spaces or periods (.). The name may not consist entirely of digits." - 22 "Welcome to the %1 workgroup." - 23 "Welcome to the %1 domain." - 24 "You must restart this computer for the changes to take effect." - 25 "You can change the name and the membership of this computer. Changes may affect access to network resources." + 7 "Nama domain ""%1"" tidak sesuai dengan spesifikasi Layanan Nama Domain Internet, meskipun ini adalah nama ReactOS resmi. Anda harus menggunakan server DNS ReactOS untuk nama non-standar." + 8 "Nama domain ""%1"" tidak diformat semestinya. Titik (.) digunakan sebagai pemisah domain. Setiap domain dibatasi sampai 63 karakter. Contoh:
domain-1.reactos.org
." + 10 "Nama komputer baru ""%1"" terlalu panjang. Nama tidak boleh lebih panjang dari 63 karakter." + 11 "Nama komputer baru yang dimasukkan tidak diformat dengan semestinya. nama standar bisa berupa huruf (a-z, A-Z), angka (0-9), dan tanda hubung (-), kecuali spasi atau tanda titik (.). Nama tidak boleh seluruhnya terdiri dari angka." + 22 "Selamat datang di workgroup %1." + 23 "Selamat datang di domain %1." + 24 "Anda harus memulai ulang komputer ini untuk menerapkan perubahan." + 25 "Anda bisa mengubah nama dan keanggotaan pada komputer ini. Perubahan dapat mempengaruhi akses ke sumber daya jaringan." 1021 "Catatan: Hanya Administrator yang bisa mengubah identifikasi komputer ini." - 1022 "Note: The identification of the computer cannot be changed because:" - 1029 "The new computer name ""%1"" is a number. The name may not be a number." - 1030 "The new computer name ""%1"" contains characters which are not allowed. Characters which are not allowed include ` ~ ! @ # $ %% ^ & * ( ) = + [ ] { } \\ | ; : ' "" , < > / and ?" - 1031 "The first domain of the domain name ""%1"" is a number. The first domain may not be a number." - 1032 "The domain name ""%1"" contains characters which are not allowed. Standard DNS names may contain letters (a-z, A-Z), numbers (0-9), and hyphens, but no spaces. Periods (.) are used to separate domains. Example:
domain-1.reactos.org
." + 1022 "Catatan: Identifikasi komputer tidak dapat diubah karena:" + 1029 "Nama komputer baru ""%1"" adalah angka. Nama tidak boleh berupa angka." + 1030 "Nama komputer baru ""%1"" berisi karakter yang dilarang. Karakter yang dilarang antara lain ` ~ ! @ # $ %% ^ & * ( ) = + [ ] { } \\ | ; : ' "" , < > / dan ?" + 1031 "Domain pertama pada nama domain ""%1"" adalah angka. Domain pertama tidak boleh berupa angka." + 1032 "Nama domain ""%1"" berisi karakter yang dilarang. Nama standar DNS bisa berupa huruf (a-z, A-Z), angka (0-9), dan tanda hubung, kecuali spasi. Titik (.) digunakan sebagai pemisah domains. Contoh:
domain-1.reactos.org
." 3210 "&Rincian >>" 3220 "<< &Rincian" 4000 "Informasi" diff --git a/dll/win32/shell32/lang/id-ID.rc b/dll/win32/shell32/lang/id-ID.rc index 357e39fbfa3..7004e3175df 100644 --- a/dll/win32/shell32/lang/id-ID.rc +++ b/dll/win32/shell32/lang/id-ID.rc @@ -11,7 +11,7 @@ BEGIN BEGIN MENUITEM "", -1, MFT_SEPARATOR MENUITEM "Otomatis &Urutkan", FCIDM_SHVIEW_AUTOARRANGE - MENUITEM "Align to &Grid", FCIDM_SHVIEW_ALIGNTOGRID + MENUITEM "Sejajarkan dengan &Kisi", FCIDM_SHVIEW_ALIGNTOGRID END END @@ -32,7 +32,7 @@ BEGIN BEGIN MENUITEM "", -1, MFT_SEPARATOR MENUITEM "Otomatis &Urutkan", FCIDM_SHVIEW_AUTOARRANGE - MENUITEM "Align to &Grid", FCIDM_SHVIEW_ALIGNTOGRID + MENUITEM "Sejajarkan dengan &Kisi", FCIDM_SHVIEW_ALIGNTOGRID END MENUITEM "Segarkan", FCIDM_SHVIEW_REFRESH MENUITEM "", -1, MFT_SEPARATOR @@ -201,7 +201,7 @@ END IDD_SHORTCUT_EXTENDED_PROPERTIES DIALOGEX 0, 0, 230, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Properti yang Diperpanjang" +CAPTION "Perluasan Properti" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON IDI_SHELL_EXTENDED_PROPERTIES, IDI_SHELL_EXTENDED_PROPERTIES, 5, 5, 21, 20, SS_ICON @@ -498,11 +498,11 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL IDB_DLG_BG, IDC_STATIC, "STATIC", SS_BITMAP | SS_REALSIZECONTROL, 0, 0, 208, 122 CONTROL IDB_REACTOS_FLAG, IDC_STATIC, "STATIC", SS_BITMAP, 176, 1, 32, 26 - PUSHBUTTON "&Switch User", IDC_SWITCH_USER_BUTTON, 55, 46, 22, 20, BS_OWNERDRAW | WS_DISABLED | WS_GROUP + PUSHBUTTON "&Ganti Pengguna", IDC_SWITCH_USER_BUTTON, 55, 46, 22, 20, BS_OWNERDRAW | WS_DISABLED | WS_GROUP PUSHBUTTON "&Keluar", IDC_LOG_OFF_BUTTON, 132, 46, 22, 20, BS_OWNERDRAW PUSHBUTTON "Cancel", IDCANCEL, 162, 103, 40, 12, WS_GROUP | BS_FLAT LTEXT "Keluar ReactOS", IDC_LOG_OFF_TEXT_STATIC, 4, 7, 130, 19 - CTEXT "Switch User", IDC_SWITCH_USER_STATIC, 41, 70, 51, 11 + CTEXT "Ganti Pengguna", IDC_SWITCH_USER_STATIC, 41, 70, 51, 11 CTEXT "Keluar", IDC_LOG_OFF_STATIC, 118, 70, 51, 11 END @@ -830,15 +830,15 @@ BEGIN IDS_RESTART_PROMPT "Anda ingin memulai ulang sistem?" IDS_SHUTDOWN_TITLE "Nonaktifkan" IDS_SHUTDOWN_PROMPT "Anda ingin menonaktifkan?" - + /* Format Dialog Strings */ IDS_FORMAT_TITLE "Format Disk Lokal" IDS_FORMAT_WARNING "PERINGATAN: Memformat akan menghapus SELURUH data dalam disk.\nUntuk memformat disk, klik OK. untuk keluar, klik BATAL." IDS_FORMAT_COMPLETE "Format Selesai." /* Warning format system drive dialog strings */ - IDS_NO_FORMAT_TITLE "Cannot format this volume" - IDS_NO_FORMAT "This volume cannot be formatted! It contains important system files in order for ReactOS to run." + IDS_NO_FORMAT_TITLE "Tidak bisa memformat volume ini" + IDS_NO_FORMAT "Volume ini tidak bisa diformat! Volume ini berisi berkas sistem yang penting agar ReactOS dapat berjalan." /* Run File dialog */ IDS_RUNDLG_ERROR "Tidak bisa menampilkan kotak dialog Jalankan Berkas (kesalahan internal)" @@ -1023,8 +1023,8 @@ BEGIN IDS_SYSTEMFOLDER "Folder Sistem" /* For IDD_LOG_OFF_FANCY */ - IDS_LOG_OFF_DESC "Closes your programs and ends your ReactOS session." - IDS_SWITCH_USER_DESC "Lets another user log on while your programs and files remain open.\r\n\r\n(You can also switch users by pressing the Windows logo key + L.)" + IDS_LOG_OFF_DESC "Menutup semua program dan mengakhiri sesi ReactOS anda." + IDS_SWITCH_USER_DESC "Memungkinkan pengguna lain masuk saat program dan Berkas anda masih terbuka.\r\n\r\n(Anda bisa mengganti pengguna dengan menekan tombol logo Windows + L.)" IDS_LOG_OFF_TITLE "Keluar" - IDS_SWITCH_USER_TITLE "Switch User" + IDS_SWITCH_USER_TITLE "Ganti Pengguna" END
3 years, 7 months
1
0
0
0
[reactos] 01/01: [CMDUTILS][FC] Implement FC wildcard handling (#3640)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7b27e7c4ffa2bab13f79e…
commit 7b27e7c4ffa2bab13f79ef82f3d7e80e9eacfc6d Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Wed May 5 12:23:16 2021 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Wed May 5 12:23:16 2021 +0900 [CMDUTILS][FC] Implement FC wildcard handling (#3640) Implement wildcard handling on FC (file comparison) command. And fix the bugs on zero-sized files. CORE-17500 --- base/applications/cmdutils/fc/CMakeLists.txt | 4 +- base/applications/cmdutils/fc/fc.c | 250 ++++++++++++++++++++++++--- base/applications/cmdutils/fc/text.h | 16 +- 3 files changed, 231 insertions(+), 39 deletions(-) diff --git a/base/applications/cmdutils/fc/CMakeLists.txt b/base/applications/cmdutils/fc/CMakeLists.txt index 4da877ca403..5b91a3bdc7d 100644 --- a/base/applications/cmdutils/fc/CMakeLists.txt +++ b/base/applications/cmdutils/fc/CMakeLists.txt @@ -2,6 +2,6 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils) add_executable(fc fc.c texta.c textw.c fc.rc) set_module_type(fc win32cui UNICODE) -target_link_libraries(fc conutils wine ${PSEH_LIB}) -add_importlibs(fc msvcrt user32 kernel32 ntdll) +target_link_libraries(fc conutils ${PSEH_LIB}) +add_importlibs(fc msvcrt shlwapi 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 index 9350bc1a957..5bcf81d59f6 100644 --- a/base/applications/cmdutils/fc/fc.c +++ b/base/applications/cmdutils/fc/fc.c @@ -40,6 +40,8 @@ va_end(va); } #endif +#include <strsafe.h> +#include <shlwapi.h> FCRET NoDifference(VOID) { @@ -271,21 +273,26 @@ static FCRET TextFileCompare(FILECOMPARE *pFC) ret = NoDifference(); break; } - hMapping0 = CreateFileMappingW(hFile0, NULL, PAGE_READONLY, - cb0.HighPart, cb0.LowPart, NULL); - if (hMapping0 == NULL) + if (cb0.QuadPart > 0) { - ret = CannotRead(pFC->file[0]); - break; + hMapping0 = CreateFileMappingW(hFile0, NULL, PAGE_READONLY, + cb0.HighPart, cb0.LowPart, NULL); + if (hMapping0 == NULL) + { + ret = CannotRead(pFC->file[0]); + break; + } } - hMapping1 = CreateFileMappingW(hFile1, NULL, PAGE_READONLY, - cb1.HighPart, cb1.LowPart, NULL); - if (hMapping1 == NULL) + if (cb1.QuadPart > 0) { - ret = CannotRead(pFC->file[1]); - break; + hMapping1 = CreateFileMappingW(hFile1, NULL, PAGE_READONLY, + cb1.HighPart, cb1.LowPart, NULL); + if (hMapping1 == NULL) + { + ret = CannotRead(pFC->file[1]); + break; + } } - if (fUnicode) ret = TextCompareW(pFC, &hMapping0, &cb0, &hMapping1, &cb1); else @@ -330,24 +337,210 @@ static BOOL IsBinaryExt(LPCWSTR filename) return FALSE; } -#define HasWildcard(filename) \ - ((wcschr((filename), L'*') != NULL) || (wcschr((filename), L'?') != NULL)) - static FCRET FileCompare(FILECOMPARE *pFC) { + FCRET ret; ConResPrintf(StdOut, IDS_COMPARING, pFC->file[0], pFC->file[1]); if (!(pFC->dwFlags & FLAG_L) && ((pFC->dwFlags & FLAG_B) || IsBinaryExt(pFC->file[0]) || IsBinaryExt(pFC->file[1]))) { - return BinaryFileCompare(pFC); + ret = BinaryFileCompare(pFC); + } + else + { + ret = TextFileCompare(pFC); + } + + ConPuts(StdOut, L"\n"); + return ret; +} + +/* Is it L"." or L".."? */ +#define IS_DOTS(pch) \ + ((*(pch) == L'.') && (((pch)[1] == 0) || (((pch)[1] == L'.') && ((pch)[2] == 0)))) +#define HasWildcard(filename) \ + ((wcschr((filename), L'*') != NULL) || (wcschr((filename), L'?') != NULL)) + +static inline BOOL IsTitleWild(LPCWSTR filename) +{ + LPCWSTR pch = PathFindFileNameW(filename); + return (pch && *pch == L'*' && pch[1] == L'.' && !HasWildcard(&pch[2])); +} + +static FCRET FileCompareOneSideWild(const FILECOMPARE *pFC, BOOL bWildRight) +{ + FCRET ret = FCRET_IDENTICAL; + WIN32_FIND_DATAW find; + HANDLE hFind; + WCHAR szPath[MAX_PATH]; + FILECOMPARE fc; + + hFind = FindFirstFileW(pFC->file[bWildRight], &find); + if (hFind == INVALID_HANDLE_VALUE) + { + ConResPrintf(StdErr, IDS_CANNOT_OPEN, pFC->file[bWildRight]); + ConPuts(StdOut, L"\n"); + return FCRET_CANT_FIND; + } + StringCbCopyW(szPath, sizeof(szPath), pFC->file[bWildRight]); + + fc = *pFC; + fc.file[!bWildRight] = pFC->file[!bWildRight]; + fc.file[bWildRight] = szPath; + do + { + if (IS_DOTS(find.cFileName)) + continue; + + // replace file title + PathRemoveFileSpecW(szPath); + PathAppendW(szPath, find.cFileName); + + switch (FileCompare(&fc)) + { + case FCRET_IDENTICAL: + break; + case FCRET_DIFFERENT: + if (ret != FCRET_INVALID) + ret = FCRET_DIFFERENT; + break; + default: + ret = FCRET_INVALID; + break; + } + } while (FindNextFileW(hFind, &find)); + + FindClose(hFind); + return ret; +} + +static FCRET FileCompareWildTitle(const FILECOMPARE *pFC) +{ + FCRET ret = FCRET_IDENTICAL; + WIN32_FIND_DATAW find; + HANDLE hFind; + WCHAR szPath0[MAX_PATH], szPath1[MAX_PATH]; + FILECOMPARE fc; + LPWSTR pch; + + hFind = FindFirstFileW(pFC->file[0], &find); + if (hFind == INVALID_HANDLE_VALUE) + { + ConResPrintf(StdErr, IDS_CANNOT_OPEN, pFC->file[0]); + ConPuts(StdOut, L"\n"); + return FCRET_CANT_FIND; } - return TextFileCompare(pFC); + StringCbCopyW(szPath0, sizeof(szPath0), pFC->file[0]); + StringCbCopyW(szPath1, sizeof(szPath1), pFC->file[1]); + pch = PathFindExtensionW(pFC->file[1]); + + fc = *pFC; + fc.file[0] = szPath0; + fc.file[1] = szPath1; + do + { + if (IS_DOTS(find.cFileName)) + continue; + + // replace file title + PathRemoveFileSpecW(szPath0); + PathRemoveFileSpecW(szPath1); + PathAppendW(szPath0, find.cFileName); + PathAppendW(szPath1, find.cFileName); + + // replace dot extension + PathRemoveExtensionW(szPath1); + PathAddExtensionW(szPath1, pch); + + switch (FileCompare(&fc)) + { + case FCRET_IDENTICAL: + break; + case FCRET_DIFFERENT: + if (ret != FCRET_INVALID) + ret = FCRET_DIFFERENT; + break; + default: + ret = FCRET_INVALID; + break; + } + } while (FindNextFileW(hFind, &find)); + + FindClose(hFind); + return ret; +} + +static FCRET FileCompareBothWild(const FILECOMPARE *pFC) +{ + FCRET ret = FCRET_IDENTICAL; + WIN32_FIND_DATAW find0, find1; + HANDLE hFind0, hFind1; + WCHAR szPath0[MAX_PATH], szPath1[MAX_PATH]; + FILECOMPARE fc; + + hFind0 = FindFirstFileW(pFC->file[0], &find0); + if (hFind0 == INVALID_HANDLE_VALUE) + { + ConResPrintf(StdErr, IDS_CANNOT_OPEN, pFC->file[0]); + ConPuts(StdOut, L"\n"); + return FCRET_CANT_FIND; + } + hFind1 = FindFirstFileW(pFC->file[1], &find1); + if (hFind1 == INVALID_HANDLE_VALUE) + { + CloseHandle(hFind0); + ConResPrintf(StdErr, IDS_CANNOT_OPEN, pFC->file[1]); + ConPuts(StdOut, L"\n"); + return FCRET_CANT_FIND; + } + StringCbCopyW(szPath0, sizeof(szPath0), pFC->file[0]); + StringCbCopyW(szPath1, sizeof(szPath1), pFC->file[1]); + + fc = *pFC; + fc.file[0] = szPath0; + fc.file[1] = szPath1; + do + { + while (IS_DOTS(find0.cFileName)) + { + if (!FindNextFileW(hFind0, &find0)) + goto quit; + } + while (IS_DOTS(find1.cFileName)) + { + if (!FindNextFileW(hFind1, &find1)) + goto quit; + } + + // replace file title + PathRemoveFileSpecW(szPath0); + PathRemoveFileSpecW(szPath1); + PathAppendW(szPath0, find0.cFileName); + PathAppendW(szPath1, find1.cFileName); + + switch (FileCompare(&fc)) + { + case FCRET_IDENTICAL: + break; + case FCRET_DIFFERENT: + if (ret != FCRET_INVALID) + ret = FCRET_DIFFERENT; + break; + default: + ret = FCRET_INVALID; + break; + } + } while (FindNextFileW(hFind0, &find0) && FindNextFileW(hFind1, &find1)); +quit: + CloseHandle(hFind0); + CloseHandle(hFind1); + return ret; } static FCRET WildcardFileCompare(FILECOMPARE *pFC) { - FCRET ret; + BOOL fWild0, fWild1; if (pFC->dwFlags & FLAG_HELP) { @@ -361,15 +554,24 @@ static FCRET WildcardFileCompare(FILECOMPARE *pFC) return FCRET_INVALID; } - if (HasWildcard(pFC->file[0]) || HasWildcard(pFC->file[1])) + fWild0 = HasWildcard(pFC->file[0]); + fWild1 = HasWildcard(pFC->file[1]); + if (fWild0 && fWild1) { - // TODO: wildcard - ConResPuts(StdErr, IDS_CANT_USE_WILDCARD); + if (IsTitleWild(pFC->file[0]) && IsTitleWild(pFC->file[1])) + return FileCompareWildTitle(pFC); + else + return FileCompareBothWild(pFC); } - - ret = FileCompare(pFC); - ConPuts(StdOut, L"\n"); - return ret; + else if (fWild0) + { + return FileCompareOneSideWild(pFC, FALSE); + } + else if (fWild1) + { + return FileCompareOneSideWild(pFC, TRUE); + } + return FileCompare(pFC); } int wmain(int argc, WCHAR **argv) diff --git a/base/applications/cmdutils/fc/text.h b/base/applications/cmdutils/fc/text.h index d0f2363f6f9..7a5d7382c59 100644 --- a/base/applications/cmdutils/fc/text.h +++ b/base/applications/cmdutils/fc/text.h @@ -5,16 +5,6 @@ * COPYRIGHT: Copyright 2021 Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com) */ #include "fc.h" -#include <stdio.h> - -#ifdef __REACTOS__ - #include <wine/debug.h> - WINE_DEFAULT_DEBUG_CHANNEL(fc); -#else - #define ERR /*empty*/ - #define WARN /*empty*/ - #define TRACE /*empty*/ -#endif #define IS_SPACE(ch) ((ch) == TEXT(' ') || (ch) == TEXT('\t')) @@ -297,7 +287,6 @@ ParseLines(const FILECOMPARE *pFC, HANDLE *phMapping, { bCR = (ichNext > 0) && (psz[ichNext - 1] == TEXT('\r')); cchNode = ichNext - ich - bCR; - TRACE("ich:%ld, cch:%ld, ichNext:%ld, cchNode:%ld\n", ich, cch, ichNext, cchNode); pszLine = AllocLine(&psz[ich], cchNode); node = AllocNode(pszLine, lineno++); if (!node || !ConvertNode(pFC, node)) @@ -524,10 +513,10 @@ Resync(FILECOMPARE *pFC, struct list **pptr0, struct list **pptr1) static FCRET Finalize(FILECOMPARE* pFC, struct list *ptr0, struct list* ptr1, BOOL fDifferent) { - if (!ptr0 || !ptr1) + if (!ptr0 && !ptr1) { if (fDifferent) - return FCRET_DIFFERENT; + return Different(pFC->file[0], pFC->file[1]); return NoDifference(); } else @@ -539,6 +528,7 @@ Finalize(FILECOMPARE* pFC, struct list *ptr0, struct list* ptr1, BOOL fDifferent } } +// FIXME: "cmd_apitest fc" has some failures. FCRET TextCompare(FILECOMPARE *pFC, HANDLE *phMapping0, const LARGE_INTEGER *pcb0, HANDLE *phMapping1, const LARGE_INTEGER *pcb1) {
3 years, 7 months
1
0
0
0
[reactos] 01/01: [GITHUB] Improve logic to cache RosBE build
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3644f3efca1b3b5f62170…
commit 3644f3efca1b3b5f621706fe8ff8f71c7d366caa Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Tue May 4 10:57:24 2021 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Tue May 4 16:26:20 2021 +0200 [GITHUB] Improve logic to cache RosBE build + Minor implrovements: Use cmake args instead of forcing command working directory Give specific names to artifacts - bootcd/livecd --- .github/workflows/build.yml | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cade6ce5644..f3ad5168c7d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,19 +10,22 @@ jobs: fail-fast: false runs-on: ubuntu-latest steps: - - name: Get Runner arch - id: get_native_arch + - name: Get RosBE build specifics + id: get_rosbe_spec run: | gcc -march=native -Q --help=target | grep "\-march= " | awk '{print $NF}' - echo ::set-output name=march::$(gcc -march=native -Q --help=target | grep "\-march= " | awk '{print $NF}') + echo ::set-output name=march-sha::$(gcc -march=native -Q --help=target | sha1sum | awk '{print $1}') + echo ::set-output name=git-sha::$(git ls-remote
https://github.com/zefklop/RosBE.git
| grep unix_amd64 | awk '{print $1}') + wget
https://gist.githubusercontent.com/zefklop/b2d6a0b470c70183e93d5285a03f5899…
- name: Get RosBE + id: get_rosbe uses: actions/cache@v2 with: path: RosBE-CI - key: RosBE-CI-${{runner.os}}-${{steps.get_native_arch.outputs.march}} + key: RosBE-CI-${{runner.os}}-${{steps.get_rosbe_spec.outputs.march-sha}}-${{steps.get_rosbe_spec.outputs.git-sha}}-${{hashfiles('./build_rosbe_ci.sh')}} - name: Compile RosBE + if: steps.get_rosbe.outputs.cache-hit != 'true' run: | - wget
https://gist.githubusercontent.com/zefklop/b2d6a0b470c70183e93d5285a03f5899…
chmod +x build_rosbe_ci.sh ./build_rosbe_ci.sh ${{github.workspace}}/RosBE-CI - name: Install ccache @@ -51,7 +54,9 @@ jobs: echo "CCACHE_DIR=${{github.workspace}}/ccache" >> $GITHUB_ENV echo "CCACHE_MAXSIZE=1G" >> $GITHUB_ENV echo "CCACHE_SLOPPINESS=time_macros" >> $GITHUB_ENV - echo "CCACHE_COMPILERCHECK=string:${{hashfiles('./build_rosbe_ci.sh', './RosBE-CI/git-commit')}}" >> $GITHUB_ENV + - name: Ease ccache compiler check (GCC) + if: matrix.compiler == 'gcc' + run: echo "CCACHE_COMPILERCHECK=string:${{steps.get_rosbe_spec.outputs.git-sha}}-${{hashfiles('./build_rosbe_ci.sh')}}" >> $GITHUB_ENV - name: Configure run: echo 'cmake -S ${{github.workspace}}/src -B ${{github.workspace}}/build -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-${{matrix.compiler}}.cmake -DARCH:STRING=${{matrix.arch}} -DENABLE_CCACHE=1 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 -DCLANG_VERSION=${{env.LLVM_VERSION}}' | ${{github.workspace}}/RosBE-CI/RosBE.sh . 0 ${{matrix.arch}} - name: Build @@ -63,12 +68,12 @@ jobs: - name: Upload bootcd uses: actions/upload-artifact@v2 with: - name: reactos-${{matrix.compiler}}-${{matrix.arch}}-${{github.sha}} + name: reactos-bootcd-${{matrix.compiler}}-${{matrix.arch}}-${{github.sha}} path: build/bootcd.iso - name: Upload livecd uses: actions/upload-artifact@v2 with: - name: reactos-${{matrix.compiler}}-${{matrix.arch}}-${{github.sha}} + name: reactos-livecd-${{matrix.compiler}}-${{matrix.arch}}-${{github.sha}} path: build/livecd.iso build-msvc: @@ -118,22 +123,18 @@ jobs: - name: Configure run: cmake -S src -B build -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=${{matrix.arch}} -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 -DUSE_CLANG_CL:BOOL=${{matrix.compiler == 'clang-cl'}} - name: Build - working-directory: ${{github.workspace}}\build - run: cmake --build . + run: cmake --build ${{github.workspace}}\build - name: Generate ISOs - working-directory: ${{github.workspace}}\build - run: | - cmake --build . --target bootcd - cmake --build . --target livecd + run: cmake --build ${{github.workspace}}\build --target bootcd --target livecd - name: Upload bootcd uses: actions/upload-artifact@v2 with: - name: reactos-${{matrix.compiler}}-${{matrix.arch}}-${{github.sha}} + name: reactos-bootcd-${{matrix.compiler}}-${{matrix.arch}}-${{github.sha}} path: build/bootcd.iso - name: Upload livecd uses: actions/upload-artifact@v2 with: - name: reactos-${{matrix.compiler}}-${{matrix.arch}}-${{github.sha}} + name: reactos-livecd-${{matrix.compiler}}-${{matrix.arch}}-${{github.sha}} path: build/livecd.iso build-msbuild-i386:
3 years, 7 months
1
0
0
0
[reactos] 06/06: [NTOS:MM] First shot for Working Set list support
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f421bccbcc02eb15e43c9…
commit f421bccbcc02eb15e43c9eb102266a70b5af7fbd Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Mon Apr 12 11:36:19 2021 +0200 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Tue May 4 12:02:41 2021 +0200 [NTOS:MM] First shot for Working Set list support - Initialize - Add private page (no shared page support yet) - Remove pages - Trim Yes, this is C++ in the kernel. --- ntoskrnl/include/internal/mm.h | 6 + ntoskrnl/mm/ARM3/mminit.c | 3 + ntoskrnl/mm/ARM3/procsup.c | 74 +++---- ntoskrnl/mm/ARM3/session.c | 1 - ntoskrnl/mm/ARM3/wslist.cpp | 484 +++++++++++++++++++++++++++++++++++++++++ ntoskrnl/ntos.cmake | 1 + sdk/include/ndk/mmtypes.h | 16 ++ 7 files changed, 541 insertions(+), 44 deletions(-) diff --git a/ntoskrnl/include/internal/mm.h b/ntoskrnl/include/internal/mm.h index 5eab082b3f2..2f101c97956 100644 --- a/ntoskrnl/include/internal/mm.h +++ b/ntoskrnl/include/internal/mm.h @@ -1645,6 +1645,12 @@ MmCopyVirtualMemory(IN PEPROCESS SourceProcess, IN KPROCESSOR_MODE PreviousMode, OUT PSIZE_T ReturnSize); +/* wslist.cpp ****************************************************************/ +_Requires_exclusive_lock_held_(WorkingSet->WorkingSetMutex) +VOID +NTAPI +MiInitializeWorkingSetList(_Inout_ PMMSUPPORT WorkingSet); + #ifdef __cplusplus } // extern "C" #endif diff --git a/ntoskrnl/mm/ARM3/mminit.c b/ntoskrnl/mm/ARM3/mminit.c index 9b18537f3ac..400f8965dd5 100644 --- a/ntoskrnl/mm/ARM3/mminit.c +++ b/ntoskrnl/mm/ARM3/mminit.c @@ -2139,6 +2139,9 @@ MmArmInitSystem(IN ULONG Phase, /* Initialize the user mode image list */ InitializeListHead(&MmLoadedUserImageList); + /* Initalize the Working set list */ + InitializeListHead(&MmWorkingSetExpansionHead); + /* Initialize critical section timeout value (relative time is negative) */ MmCriticalSectionTimeout.QuadPart = MmCritsectTimeoutSeconds * (-10000000LL); diff --git a/ntoskrnl/mm/ARM3/procsup.c b/ntoskrnl/mm/ARM3/procsup.c index 23981bcadf1..aa9133b1929 100644 --- a/ntoskrnl/mm/ARM3/procsup.c +++ b/ntoskrnl/mm/ARM3/procsup.c @@ -896,40 +896,6 @@ MiInsertSharedUserPageVad(VOID) } #endif -VOID -NTAPI -MiInitializeWorkingSetList(IN PEPROCESS CurrentProcess) -{ - PMMPFN Pfn1; - PMMPTE sysPte; - MMPTE tempPte; - - /* Setup some bogus list data */ - MmWorkingSetList->LastEntry = CurrentProcess->Vm.MinimumWorkingSetSize; - MmWorkingSetList->HashTable = NULL; - MmWorkingSetList->HashTableSize = 0; - MmWorkingSetList->NumberOfImageWaiters = 0; - MmWorkingSetList->Wsle = (PVOID)(ULONG_PTR)0xDEADBABEDEADBABEULL; - MmWorkingSetList->VadBitMapHint = 1; - MmWorkingSetList->HashTableStart = (PVOID)(ULONG_PTR)0xBADAB00BBADAB00BULL; - MmWorkingSetList->HighestPermittedHashAddress = (PVOID)(ULONG_PTR)0xCAFEBABECAFEBABEULL; - MmWorkingSetList->FirstFree = 1; - MmWorkingSetList->FirstDynamic = 2; - MmWorkingSetList->NextSlot = 3; - MmWorkingSetList->LastInitializedWsle = 4; - - /* The rule is that the owner process is always in the FLINK of the PDE's PFN entry */ - Pfn1 = MiGetPfnEntry(CurrentProcess->Pcb.DirectoryTableBase[0] >> PAGE_SHIFT); - ASSERT(Pfn1->u4.PteFrame == MiGetPfnEntryIndex(Pfn1)); - Pfn1->u1.Event = (PKEVENT)CurrentProcess; - - /* Map the process working set in kernel space */ - sysPte = MiReserveSystemPtes(1, SystemPteSpace); - MI_MAKE_HARDWARE_PTE_KERNEL(&tempPte, sysPte, MM_READWRITE, CurrentProcess->WorkingSetPage); - MI_WRITE_VALID_PTE(sysPte, tempPte); - CurrentProcess->Vm.VmWorkingSetList = MiPteToAddress(sysPte); -} - NTSTATUS NTAPI MmInitializeProcessAddressSpace(IN PEPROCESS Process, @@ -944,6 +910,7 @@ MmInitializeProcessAddressSpace(IN PEPROCESS Process, PMMPTE PointerPte; KIRQL OldIrql; PMMPDE PointerPde; + PMMPFN Pfn; PFN_NUMBER PageFrameNumber; UNICODE_STRING FileName; PWCHAR Source; @@ -980,6 +947,8 @@ MmInitializeProcessAddressSpace(IN PEPROCESS Process, /* On x64 the PFNs for the initial process are already set up */ if (Process != &KiInitialProcess) { #endif + /* Lock our working set */ + MiLockProcessWorkingSet(Process, PsGetCurrentThread()); /* Lock PFN database */ OldIrql = MiAcquirePfnLock(); @@ -997,7 +966,7 @@ MmInitializeProcessAddressSpace(IN PEPROCESS Process, MiInitializePfn(PageFrameNumber, PointerPte, TRUE); /* Do the same for hyperspace */ - PointerPde = MiAddressToPde((PVOID)HYPER_SPACE); + PointerPde = MiAddressToPde(HYPER_SPACE); PageFrameNumber = PFN_FROM_PTE(PointerPde); MiInitializePfn(PageFrameNumber, (PMMPTE)PointerPde, TRUE); #if (_MI_PAGING_LEVELS == 2) @@ -1019,18 +988,30 @@ MmInitializeProcessAddressSpace(IN PEPROCESS Process, ASSERT(Process->Pcb.DirectoryTableBase[1] == PageFrameNumber * PAGE_SIZE); #endif - /* Setup the PFN for the PTE for the working set */ - PointerPte = MiAddressToPte(MI_WORKING_SET_LIST); - MI_MAKE_HARDWARE_PTE(&TempPte, PointerPte, MM_READWRITE, 0); - ASSERT(PointerPte->u.Long != 0); + /* Do the same for the Working set list */ + PointerPte = MiAddressToPte(MmWorkingSetList); PageFrameNumber = PFN_FROM_PTE(PointerPte); - MI_WRITE_INVALID_PTE(PointerPte, DemandZeroPte); MiInitializePfn(PageFrameNumber, PointerPte, TRUE); - TempPte.u.Hard.PageFrameNumber = PageFrameNumber; - MI_WRITE_VALID_PTE(PointerPte, TempPte); + + /* This should be in hyper space, but not in the mapping range */ + Process->Vm.VmWorkingSetList = MmWorkingSetList; + ASSERT(((ULONG_PTR)MmWorkingSetList >= MI_MAPPING_RANGE_END) && ((ULONG_PTR)MmWorkingSetList <= HYPER_SPACE_END)); /* Now initialize the working set list */ - MiInitializeWorkingSetList(Process); + MiInitializeWorkingSetList(&Process->Vm); + + /* Map the process working set in kernel space */ + /* FIXME: there should be no need */ + PointerPte = MiReserveSystemPtes(1, SystemPteSpace); + MI_MAKE_HARDWARE_PTE_KERNEL(&TempPte, PointerPte, MM_READWRITE, Process->WorkingSetPage); + MI_WRITE_VALID_PTE(PointerPte, TempPte); + Process->Vm.VmWorkingSetList = MiPteToAddress(PointerPte); + + /* The rule is that the owner process is always in the FLINK of the PDE's PFN entry */ + Pfn = MiGetPfnEntry(Process->Pcb.DirectoryTableBase[0] >> PAGE_SHIFT); + ASSERT(Pfn->u4.PteFrame == MiGetPfnEntryIndex(Pfn)); + ASSERT(Pfn->u1.WsIndex == 0); + Pfn->u1.Event = (PKEVENT)Process; /* Sanity check */ ASSERT(Process->PhysicalVadRoot == NULL); @@ -1038,6 +1019,8 @@ MmInitializeProcessAddressSpace(IN PEPROCESS Process, /* Release PFN lock */ MiReleasePfnLock(OldIrql); + /* Release the process working set */ + MiUnlockProcessWorkingSet(Process, PsGetCurrentThread()); #ifdef _M_AMD64 } /* On x64 the PFNs for the initial process are already set up */ #endif @@ -1358,6 +1341,11 @@ MmDeleteProcessAddressSpace2(IN PEPROCESS Process) //ASSERT(Process->CommitCharge == 0); + /* Remove us from the list */ + OldIrql = MiAcquireExpansionLock(); + RemoveEntryList(&Process->Vm.WorkingSetExpansionLinks); + MiReleaseExpansionLock(OldIrql); + /* Acquire the PFN lock */ OldIrql = MiAcquirePfnLock(); diff --git a/ntoskrnl/mm/ARM3/session.c b/ntoskrnl/mm/ARM3/session.c index 898dbbbaebc..b897a491bb0 100644 --- a/ntoskrnl/mm/ARM3/session.c +++ b/ntoskrnl/mm/ARM3/session.c @@ -41,7 +41,6 @@ MiInitializeSessionWsSupport(VOID) { /* Initialize the list heads */ InitializeListHead(&MiSessionWsList); - InitializeListHead(&MmWorkingSetExpansionHead); } BOOLEAN diff --git a/ntoskrnl/mm/ARM3/wslist.cpp b/ntoskrnl/mm/ARM3/wslist.cpp new file mode 100644 index 00000000000..430e2c1a564 --- /dev/null +++ b/ntoskrnl/mm/ARM3/wslist.cpp @@ -0,0 +1,484 @@ +/* + * PROJECT: ReactOS Kernel + * LICENSE: BSD-3-Clause (
https://spdx.org/licenses/BSD-3-Clause.html
) + * FILE: ntoskrnl/mm/ARM3/wslist.cpp + * PURPOSE: Working set list management + * PROGRAMMERS: Jérôme Gardou + */ + +/* INCLUDES *******************************************************************/ +#include <ntoskrnl.h> + +#define NDEBUG +#include <debug.h> + +#define MODULE_INVOLVED_IN_ARM3 +#include "miarm.h" + +/* GLOBALS ********************************************************************/ +PMMWSL MmWorkingSetList; +KEVENT MmWorkingSetManagerEvent; + +/* LOCAL FUNCTIONS ************************************************************/ +namespace ntoskrnl +{ + +static MMPTE GetPteTemplateForWsList(PMMWSL WsList) +{ + return (WsList == MmSystemCacheWorkingSetList) ? ValidKernelPte : ValidKernelPteLocal; +} + +static ULONG GetNextPageColorForWsList(PMMWSL WsList) +{ + return (WsList == MmSystemCacheWorkingSetList) ? MI_GET_NEXT_COLOR() : MI_GET_NEXT_PROCESS_COLOR(PsGetCurrentProcess()); +} + +static void FreeWsleIndex(PMMWSL WsList, ULONG Index) +{ + PMMWSLE Wsle = WsList->Wsle; + ULONG& LastEntry = WsList->LastEntry; + ULONG& FirstFree = WsList->FirstFree; + ULONG& LastInitializedWsle = WsList->LastInitializedWsle; + + /* Erase it now */ + Wsle[Index].u1.Long = 0; + + if (Index == (LastEntry - 1)) + { + /* We're freeing the last index of our list. */ + while (Wsle[Index].u1.e1.Valid == 0) + Index--; + + /* Should we bother about the Free entries */ + if (FirstFree < Index) + { + /* Try getting the index of the last free entry */ + ASSERT(Wsle[Index + 1].u1.Free.MustBeZero == 0); + ULONG PreviousFree = Wsle[Index + 1].u1.Free.PreviousFree; + ASSERT(PreviousFree < LastEntry); + ULONG LastFree = Index + 1 - PreviousFree; +#ifdef MMWSLE_PREVIOUS_FREE_JUMP + while (Wsle[LastFree].u1.e1.Valid) + { + ASSERT(LastFree > MMWSLE_PREVIOUS_FREE_JUMP); + LastFree -= MMWSLE_PREVIOUS_FREE_JUMP; + } +#endif + /* Update */ + ASSERT(LastFree >= FirstFree); + Wsle[FirstFree].u1.Free.PreviousFree = (Index + 1 - LastFree) & MMWSLE_PREVIOUS_FREE_MASK; + Wsle[LastFree].u1.Free.NextFree = 0; + } + else + { + /* No more free entries in our array */ + FirstFree = ULONG_MAX; + } + /* This is the new size of our array */ + LastEntry = Index + 1; + /* Should we shrink the alloc? */ + while ((LastInitializedWsle - LastEntry) > (PAGE_SIZE / sizeof(MMWSLE))) + { + PMMPTE PointerPte = MiAddressToPte(Wsle + LastInitializedWsle - 1); + /* We must not free ourself! */ + ASSERT(MiPteToAddress(PointerPte) != WsList); + + PFN_NUMBER Page = PFN_FROM_PTE(PointerPte); + PMMPFN Pfn = MiGetPfnEntry(Page); + + MI_SET_PFN_DELETED(Pfn); + MiDecrementShareCount(MiGetPfnEntry(Pfn->u4.PteFrame), Pfn->u4.PteFrame); + MiDecrementShareCount(Pfn, Page); + + PointerPte->u.Long = 0; + + KeInvalidateTlbEntry(Wsle + LastInitializedWsle - 1); + LastInitializedWsle -= PAGE_SIZE / sizeof(MMWSLE); + } + return; + } + + if (FirstFree == ULONG_MAX) + { + /* We're the first one. */ + FirstFree = Index; + Wsle[FirstFree].u1.Free.PreviousFree = (LastEntry - FirstFree) & MMWSLE_PREVIOUS_FREE_MASK; + return; + } + + /* We must find where to place ourself */ + ULONG NextFree = FirstFree; + ULONG PreviousFree = 0; + while (NextFree < Index) + { + ASSERT(Wsle[NextFree].u1.Free.MustBeZero == 0); + if (Wsle[NextFree].u1.Free.NextFree == 0) + break; + PreviousFree = NextFree; + NextFree += Wsle[NextFree].u1.Free.NextFree; + } + + if (NextFree < Index) + { + /* This is actually the last free entry */ + Wsle[NextFree].u1.Free.NextFree = Index - NextFree; + Wsle[Index].u1.Free.PreviousFree = (Index - NextFree) & MMWSLE_PREVIOUS_FREE_MASK; + Wsle[FirstFree].u1.Free.PreviousFree = (LastEntry - Index) & MMWSLE_PREVIOUS_FREE_MASK; + return; + } + + if (PreviousFree == 0) + { + /* This is the first free */ + Wsle[Index].u1.Free.NextFree = FirstFree - Index; + Wsle[Index].u1.Free.PreviousFree = Wsle[FirstFree].u1.Free.PreviousFree; + Wsle[FirstFree].u1.Free.PreviousFree = (FirstFree - Index) & MMWSLE_PREVIOUS_FREE_MASK; + FirstFree = Index; + return; + } + + /* Insert */ + Wsle[PreviousFree].u1.Free.NextFree = (Index - PreviousFree); + Wsle[Index].u1.Free.PreviousFree = (Index - PreviousFree) & MMWSLE_PREVIOUS_FREE_MASK; + Wsle[Index].u1.Free.NextFree = NextFree - Index; + Wsle[NextFree].u1.Free.PreviousFree = (NextFree - Index) & MMWSLE_PREVIOUS_FREE_MASK; +} + +static ULONG GetFreeWsleIndex(PMMWSL WsList) +{ + ULONG Index; + if (WsList->FirstFree != ULONG_MAX) + { + Index = WsList->FirstFree; + ASSERT(Index < WsList->LastInitializedWsle); + MMWSLE_FREE_ENTRY& FreeWsle = WsList->Wsle[Index].u1.Free; + ASSERT(FreeWsle.MustBeZero == 0); + if (FreeWsle.NextFree != 0) + { + WsList->FirstFree += FreeWsle.NextFree; + WsList->Wsle[WsList->FirstFree].u1.Free.PreviousFree = FreeWsle.PreviousFree; + } + else + { + WsList->FirstFree = ULONG_MAX; + } + } + else + { + Index = WsList->LastEntry++; + if (Index >= WsList->LastInitializedWsle) + { + /* Grow our array */ + PMMPTE PointerPte = MiAddressToPte(&WsList->Wsle[WsList->LastInitializedWsle]); + ASSERT(PointerPte->u.Hard.Valid == 0); + MMPTE TempPte = GetPteTemplateForWsList(WsList); + TempPte.u.Hard.PageFrameNumber = MiRemoveAnyPage(GetNextPageColorForWsList(WsList)); + MiInitializePfnAndMakePteValid(TempPte.u.Hard.PageFrameNumber, PointerPte, TempPte); + WsList->LastInitializedWsle += PAGE_SIZE / sizeof(MMWSLE); + } + } + + WsList->Wsle[Index].u1.Long = 0; + return Index; +} + +static +VOID +RemoveFromWsList(PMMWSL WsList, PVOID Address) +{ + /* Make sure that we are holding the right locks. */ + ASSERT(MM_ANY_WS_LOCK_HELD(PsGetCurrentThread())); + MI_ASSERT_PFN_LOCK_HELD(); + + PMMPTE PointerPte = MiAddressToPte(Address); + + /* Make sure we are removing a paged-in address */ + ASSERT(PointerPte->u.Hard.Valid == 1); + PMMPFN Pfn1 = MiGetPfnEntry(PFN_FROM_PTE(PointerPte)); + ASSERT(Pfn1->u3.e1.PageLocation == ActiveAndValid); + + /* Shared pages not supported yet */ + ASSERT(Pfn1->u3.e1.PrototypePte == 0); + + /* Nor are "ROS PFN" */ + ASSERT(MI_IS_ROS_PFN(Pfn1) == FALSE); + + /* And we should have a valid index here */ + ASSERT(Pfn1->u1.WsIndex != 0); + + FreeWsleIndex(WsList, Pfn1->u1.WsIndex); +} + +static +ULONG +TrimWsList(PMMWSL WsList) +{ + /* This should be done under WS lock */ + ASSERT(MM_ANY_WS_LOCK_HELD(PsGetCurrentThread())); + + ULONG Ret = 0; + + /* Walk the array */ + for (ULONG i = WsList->FirstDynamic; i < WsList->LastEntry; i++) + { + MMWSLE& Entry = WsList->Wsle[i]; + if (!Entry.u1.e1.Valid) + continue; + + /* Only direct entries for now */ + ASSERT(Entry.u1.e1.Direct == 1); + + /* Check the PTE */ + PMMPTE PointerPte = MiAddressToPte(Entry.u1.VirtualAddress); + + /* This must be valid */ + ASSERT(PointerPte->u.Hard.Valid); + + /* If the PTE was accessed, simply reset and that's the end of it */ + if (PointerPte->u.Hard.Accessed) + { + Entry.u1.e1.Age = 0; + PointerPte->u.Hard.Accessed = 0; + KeInvalidateTlbEntry(Entry.u1.VirtualAddress); + continue; + } + + /* If the entry is not so old, just age it */ + if (Entry.u1.e1.Age < 3) + { + Entry.u1.e1.Age++; + continue; + } + + if ((Entry.u1.e1.LockedInMemory) || (Entry.u1.e1.LockedInWs)) + { + /* This one is locked. Next time, maybe... */ + continue; + } + + /* FIXME: Invalidating PDEs breaks legacy MMs */ + if (MI_IS_PAGE_TABLE_ADDRESS(Entry.u1.VirtualAddress)) + continue; + + /* Please put yourself aside and make place for the younger ones */ + PFN_NUMBER Page = PFN_FROM_PTE(PointerPte); + KIRQL OldIrql = MiAcquirePfnLock(); + + PMMPFN Pfn = MiGetPfnEntry(Page); + + /* Not supported yet */ + ASSERT(Pfn->u3.e1.PrototypePte == 0); + ASSERT(!MI_IS_ROS_PFN(Pfn)); + + /* FIXME: Remove this hack when possible */ + if (Pfn->Wsle.u1.e1.LockedInMemory || (Pfn->Wsle.u1.e1.LockedInWs)) + { + MiReleasePfnLock(OldIrql); + continue; + } + + /* We can remove it from the list. Save Protection first */ + ULONG Protection = Entry.u1.e1.Protection; + RemoveFromWsList(WsList, Entry.u1.VirtualAddress); + + /* Dirtify the page, if needed */ + if (PointerPte->u.Hard.Dirty) + Pfn->u3.e1.Modified = 1; + + /* Make this a transition PTE */ + MI_MAKE_TRANSITION_PTE(PointerPte, Page, Protection); + KeInvalidateTlbEntry(MiAddressToPte(PointerPte)); + + /* Drop the share count. This will take care of putting it in the standby or modified list. */ + MiDecrementShareCount(Pfn, Page); + + MiReleasePfnLock(OldIrql); + Ret++; + } + return Ret; +} + +/* GLOBAL FUNCTIONS ***********************************************************/ +extern "C" +{ + +VOID +NTAPI +MiInsertInWorkingSetList( + _Inout_ PMMSUPPORT Vm, + _In_ PVOID Address, + _In_ ULONG Protection) +{ + PMMWSL WsList = Vm->VmWorkingSetList; + + /* Make sure that we are holding the right locks. */ + ASSERT(MM_ANY_WS_LOCK_HELD(PsGetCurrentThread())); + MI_ASSERT_PFN_LOCK_HELD(); + + PMMPTE PointerPte = MiAddressToPte(Address); + + /* Make sure we are adding a paged-in address */ + ASSERT(PointerPte->u.Hard.Valid == 1); + PMMPFN Pfn1 = MiGetPfnEntry(PFN_FROM_PTE(PointerPte)); + ASSERT(Pfn1->u3.e1.PageLocation == ActiveAndValid); + + /* Shared pages not supported yet */ + ASSERT(Pfn1->u1.WsIndex == 0); + ASSERT(Pfn1->u3.e1.PrototypePte == 0); + + /* Nor are "ROS PFN" */ + ASSERT(MI_IS_ROS_PFN(Pfn1) == FALSE); + + Pfn1->u1.WsIndex = GetFreeWsleIndex(WsList); + MMWSLENTRY& NewWsle = WsList->Wsle[Pfn1->u1.WsIndex].u1.e1; + NewWsle.VirtualPageNumber = reinterpret_cast<ULONG_PTR>(Address) >> PAGE_SHIFT; + NewWsle.Protection = Protection; + NewWsle.Direct = 1; + NewWsle.Hashed = 0; + NewWsle.LockedInMemory = 0; + NewWsle.LockedInWs = 0; + NewWsle.Age = 0; + NewWsle.Valid = 1; + + Vm->WorkingSetSize += PAGE_SIZE; + if (Vm->WorkingSetSize > Vm->PeakWorkingSetSize) + Vm->PeakWorkingSetSize = Vm->WorkingSetSize; +} + +VOID +NTAPI +MiRemoveFromWorkingSetList( + _Inout_ PMMSUPPORT Vm, + _In_ PVOID Address) +{ + RemoveFromWsList(Vm->VmWorkingSetList, Address); + + Vm->WorkingSetSize -= PAGE_SIZE; +} + +_Requires_exclusive_lock_held_(WorkingSet->WorkingSetMutex) +VOID +NTAPI +MiInitializeWorkingSetList(_Inout_ PMMSUPPORT WorkingSet) +{ + PMMWSL WsList = WorkingSet->VmWorkingSetList; + + /* Initialize some fields */ + WsList->FirstFree = ULONG_MAX; + WsList->Wsle = reinterpret_cast<PMMWSLE>(WsList + 1); + WsList->LastEntry = 0; + /* The first page is already allocated */ + WsList->LastInitializedWsle = (PAGE_SIZE - sizeof(*WsList)) / sizeof(MMWSLE); + + /* Insert the address we already know: our PDE base and the Working Set List */ + if (MI_IS_PROCESS_WORKING_SET(WorkingSet)) + { + ASSERT(WorkingSet->VmWorkingSetList == MmWorkingSetList); +#if _MI_PAGING_LEVELS == 4 + MiInsertInWorkingSetList(WorkingSet, (PVOID)PXE_BASE, 0U); +#elif _MI_PAGING_LEVELS == 3 + MiInsertInWorkingSetList(WorkingSet, (PVOID)PPE_BASE, 0U); +#elif _MI_PAGING_LEVELS == 2 + MiInsertInWorkingSetList(WorkingSet, (PVOID)PDE_BASE, 0U); +#endif + } + +#if _MI_PAGING_LEVELS == 4 + MiInsertInWorkingSetList(WorkingSet, MiAddressToPpe(WorkingSet->VmWorkingSetList), 0UL); +#endif +#if _MI_PAGING_LEVELS >= 3 + MiInsertInWorkingSetList(WorkingSet, MiAddressToPde(WorkingSet->VmWorkingSetList), 0UL); +#endif + MiInsertInWorkingSetList(WorkingSet, (PVOID)MiAddressToPte(WorkingSet->VmWorkingSetList), 0UL); + MiInsertInWorkingSetList(WorkingSet, (PVOID)WorkingSet->VmWorkingSetList, 0UL); + + /* From now on, every added page can be trimmed at any time */ + WsList->FirstDynamic = WsList->LastEntry; + + /* We can add this to our list */ + ExInterlockedInsertTailList(&MmWorkingSetExpansionHead, &WorkingSet->WorkingSetExpansionLinks, &MmExpansionLock); +} + +VOID +NTAPI +MmWorkingSetManager(VOID) +{ + PLIST_ENTRY VmListEntry; + PMMSUPPORT Vm = NULL; + KIRQL OldIrql; + + OldIrql = MiAcquireExpansionLock(); + + for (VmListEntry = MmWorkingSetExpansionHead.Flink; + VmListEntry != &MmWorkingSetExpansionHead; + VmListEntry = VmListEntry->Flink) + { + BOOLEAN TrimHard = MmAvailablePages < MmMinimumFreePages; + PEPROCESS Process = NULL; + + /* Don't do anything if we have plenty of free pages. */ + if ((MmAvailablePages + MmModifiedPageListHead.Total) >= MmPlentyFreePages) + break; + + Vm = CONTAINING_RECORD(VmListEntry, MMSUPPORT, WorkingSetExpansionLinks); + + /* Let the legacy Mm System space alone */ + if (Vm == MmGetKernelAddressSpace()) + continue; + + if (MI_IS_PROCESS_WORKING_SET(Vm)) + { + Process = CONTAINING_RECORD(Vm, EPROCESS, Vm); + + /* Make sure the process is not terminating abd attach to it */ + if (!ExAcquireRundownProtection(&Process->RundownProtect)) + continue; + ASSERT(!KeIsAttachedProcess()); + KeAttachProcess(&Process->Pcb); + } + else + { + /* FIXME: Session & system space unsupported */ + continue; + } + + MiReleaseExpansionLock(OldIrql); + + /* Share-lock for now, we're only reading */ + MiLockWorkingSetShared(PsGetCurrentThread(), Vm); + + if (((Vm->WorkingSetSize > Vm->MaximumWorkingSetSize) || + (TrimHard && (Vm->WorkingSetSize > Vm->MinimumWorkingSetSize))) && + MiConvertSharedWorkingSetLockToExclusive(PsGetCurrentThread(), Vm)) + { + /* We're done */ + Vm->Flags.BeingTrimmed = 1; + + ULONG Trimmed = TrimWsList(Vm->VmWorkingSetList); + + /* We're done */ + Vm->WorkingSetSize -= Trimmed * PAGE_SIZE; + Vm->Flags.BeingTrimmed = 0; + MiUnlockWorkingSet(PsGetCurrentThread(), Vm); + } + else + { + MiUnlockWorkingSetShared(PsGetCurrentThread(), Vm); + } + + /* Lock again */ + OldIrql = MiAcquireExpansionLock(); + + if (Process) + { + KeDetachProcess(); + ExReleaseRundownProtection(&Process->RundownProtect); + } + } + + MiReleaseExpansionLock(OldIrql); +} + +} // extern "C" + +} // namespace ntoskrnl diff --git a/ntoskrnl/ntos.cmake b/ntoskrnl/ntos.cmake index dbb9f911016..6e1edf2d944 100644 --- a/ntoskrnl/ntos.cmake +++ b/ntoskrnl/ntos.cmake @@ -229,6 +229,7 @@ list(APPEND SOURCE ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/ARM3/syspte.c ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/ARM3/vadnode.c ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/ARM3/virtual.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/ARM3/wslist.cpp ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/ARM3/zeropage.c ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/balance.c ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/freelist.c diff --git a/sdk/include/ndk/mmtypes.h b/sdk/include/ndk/mmtypes.h index 3e9fabf1c02..28d6cb00006 100644 --- a/sdk/include/ndk/mmtypes.h +++ b/sdk/include/ndk/mmtypes.h @@ -831,6 +831,21 @@ typedef struct _MMWSLENTRY ULONG_PTR VirtualPageNumber: MM_PAGE_FRAME_NUMBER_SIZE; } MMWSLENTRY, *PMMWSLENTRY; +typedef struct _MMWSLE_FREE_ENTRY +{ + ULONG MustBeZero:1; +#ifdef _WIN64 + ULONG PreviousFree: 31; + LONG NextFree; +#define MMWSLE_PREVIOUS_FREE_MASK 0x7FFFFFFF +#else + ULONG PreviousFree: 11; +#define MMWSLE_PREVIOUS_FREE_MASK 0x7FF +#define MMWSLE_PREVIOUS_FREE_JUMP 0x800 + LONG NextFree: 20; +#endif +} MMWSLE_FREE_ENTRY, *PMMWSLE_FREE_ENTRY; + typedef struct _MMWSLE { union @@ -838,6 +853,7 @@ typedef struct _MMWSLE PVOID VirtualAddress; ULONG_PTR Long; MMWSLENTRY e1; + MMWSLE_FREE_ENTRY Free; } u1; } MMWSLE, *PMMWSLE;
3 years, 7 months
1
0
0
0
[reactos] 05/06: [NDK] Make kefuncs.h C++ aware
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5466fc13a3b5f5211e352…
commit 5466fc13a3b5f5211e352e7e4c5121236bf91cd7 Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Fri Mar 26 10:08:26 2021 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Tue May 4 12:02:41 2021 +0200 [NDK] Make kefuncs.h C++ aware --- sdk/include/ndk/kefuncs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sdk/include/ndk/kefuncs.h b/sdk/include/ndk/kefuncs.h index 323f9df6455..0d53714e63f 100644 --- a/sdk/include/ndk/kefuncs.h +++ b/sdk/include/ndk/kefuncs.h @@ -26,6 +26,11 @@ Author: #include <ketypes.h> #include <section_attribs.h> +#ifdef __cplusplus +extern "C" +{ +#endif + #ifndef NTOS_MODE_USER // @@ -782,3 +787,7 @@ ZwYieldExecution( VOID ); #endif + +#ifdef __cplusplus +} // extern "C" +#endif
3 years, 7 months
1
0
0
0
[reactos] 04/06: [NTOS] Make some internal headers C++ aware
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=31afbf10545d07b33d418…
commit 31afbf10545d07b33d4183d203d630fca76cff2d Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Fri Mar 26 09:32:34 2021 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Tue May 4 12:02:41 2021 +0200 [NTOS] Make some internal headers C++ aware --- ntoskrnl/include/internal/ex.h | 9 +++++++++ ntoskrnl/include/internal/i386/intrin_i.h | 19 +++++++++++++++---- ntoskrnl/include/internal/i386/ke.h | 9 +++++++++ ntoskrnl/include/internal/ke.h | 9 +++++++++ ntoskrnl/include/internal/ke_x.h | 9 +++++++++ ntoskrnl/include/internal/mm.h | 7 +++++++ ntoskrnl/mm/ARM3/miarm.h | 27 ++++++++++----------------- 7 files changed, 68 insertions(+), 21 deletions(-) diff --git a/ntoskrnl/include/internal/ex.h b/ntoskrnl/include/internal/ex.h index 3dcc38ff944..4a0e94d7da4 100644 --- a/ntoskrnl/include/internal/ex.h +++ b/ntoskrnl/include/internal/ex.h @@ -1,5 +1,10 @@ #pragma once +#ifdef __cplusplus +extern "C" +{ +#endif + /* GLOBAL VARIABLES *********************************************************/ extern RTL_TIME_ZONE_INFORMATION ExpTimeZoneInfo; @@ -1513,3 +1518,7 @@ XIPInit( #define ExfInterlockedCompareExchange64UL(Destination, Exchange, Comperand) \ (ULONGLONG)ExfInterlockedCompareExchange64((PLONGLONG)(Destination), (PLONGLONG)(Exchange), (PLONGLONG)(Comperand)) + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/ntoskrnl/include/internal/i386/intrin_i.h b/ntoskrnl/include/internal/i386/intrin_i.h index a458be957fb..4bdd8707449 100644 --- a/ntoskrnl/include/internal/i386/intrin_i.h +++ b/ntoskrnl/include/internal/i386/intrin_i.h @@ -1,12 +1,17 @@ #pragma once +#ifdef __cplusplus +extern "C" +{ +#endif + #if defined(__GNUC__) FORCEINLINE VOID __lgdt(_Out_ PVOID Descriptor) { - PVOID* desc = Descriptor; + PVOID* desc = (PVOID*)Descriptor; __asm__ __volatile__( "lgdt %0" : "=m" (*desc) @@ -18,7 +23,7 @@ FORCEINLINE VOID __sgdt(_Out_ PVOID Descriptor) { - PVOID* desc = Descriptor; + PVOID* desc = (PVOID*)Descriptor; __asm__ __volatile__( "sgdt %0" : "=m" (*desc) @@ -301,11 +306,11 @@ Ke386SaveFpuState(IN PVOID SaveArea) { if (KeI386FxsrPresent) { - __fxsave(SaveArea); + __fxsave((PFX_SAVE_AREA)SaveArea); } else { - __fnsave(SaveArea); + __fnsave((PFLOATING_SAVE_AREA)SaveArea); } } @@ -319,8 +324,14 @@ Ke386SaveFpuState(IN PVOID SaveArea) #error Unknown compiler for inline assembler #endif + #define Ke386GetGlobalDescriptorTable __sgdt #define Ke386SetGlobalDescriptorTable __lgdt #define Ke386GetLocalDescriptorTable __sldt +#ifdef __cplusplus +} // extern "C" +#endif + + /* EOF */ diff --git a/ntoskrnl/include/internal/i386/ke.h b/ntoskrnl/include/internal/i386/ke.h index 58adbf52906..71e302b4dde 100644 --- a/ntoskrnl/include/internal/i386/ke.h +++ b/ntoskrnl/include/internal/i386/ke.h @@ -4,6 +4,11 @@ #include "intrin_i.h" +#ifdef __cplusplus +extern "C" +{ +#endif + // // Thread Dispatcher Header DebugActive Mask // @@ -887,4 +892,8 @@ KiGetUserModeStackAddress(void) return &(KeGetCurrentThread()->TrapFrame->HardwareEsp); } +#ifdef __cplusplus +} // extern "C" +#endif + #endif diff --git a/ntoskrnl/include/internal/ke.h b/ntoskrnl/include/internal/ke.h index 2310d4232fe..884db0413c0 100644 --- a/ntoskrnl/include/internal/ke.h +++ b/ntoskrnl/include/internal/ke.h @@ -4,6 +4,11 @@ #include "arch/ke.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /* INTERNAL KERNEL TYPES ****************************************************/ typedef struct _WOW64_PROCESS @@ -1049,4 +1054,8 @@ KeBugCheckUnicodeToAnsi( IN ULONG Length ); +#ifdef __cplusplus +} // extern "C" +#endif + #include "ke_x.h" diff --git a/ntoskrnl/include/internal/ke_x.h b/ntoskrnl/include/internal/ke_x.h index 84cb68e2c76..5bd084d0e14 100644 --- a/ntoskrnl/include/internal/ke_x.h +++ b/ntoskrnl/include/internal/ke_x.h @@ -6,6 +6,11 @@ * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) */ +#ifdef __cplusplus +extern "C" +{ +#endif + #ifndef _M_ARM FORCEINLINE KPROCESSOR_MODE @@ -1701,3 +1706,7 @@ KiCpuIdEx( __cpuidex((INT*)CpuInfo->AsUINT32, Function, SubFunction); } #endif /* _M_IX86 || _M_AMD64 */ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/ntoskrnl/include/internal/mm.h b/ntoskrnl/include/internal/mm.h index 6f9d6f57f40..5eab082b3f2 100644 --- a/ntoskrnl/include/internal/mm.h +++ b/ntoskrnl/include/internal/mm.h @@ -2,6 +2,10 @@ #include <internal/arch/mm.h> +#ifdef __cplusplus +extern "C" { +#endif + /* TYPES *********************************************************************/ struct _EPROCESS; @@ -1641,3 +1645,6 @@ MmCopyVirtualMemory(IN PEPROCESS SourceProcess, IN KPROCESSOR_MODE PreviousMode, OUT PSIZE_T ReturnSize); +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/ntoskrnl/mm/ARM3/miarm.h b/ntoskrnl/mm/ARM3/miarm.h index 053ae8047dd..caef296e079 100644 --- a/ntoskrnl/mm/ARM3/miarm.h +++ b/ntoskrnl/mm/ARM3/miarm.h @@ -8,6 +8,10 @@ #pragma once +#ifdef __cplusplus +extern "C" { +#endif + #define MI_LOWEST_VAD_ADDRESS (PVOID)MM_LOWEST_USER_ADDRESS /* Make the code cleaner with some definitions for size multiples */ @@ -575,7 +579,6 @@ extern PMEMORY_ALLOCATION_DESCRIPTOR MxFreeDescriptor; extern MEMORY_ALLOCATION_DESCRIPTOR MxOldFreeDescriptor; extern ULONG_PTR MxPfnAllocation; extern MM_PAGED_POOL_INFO MmPagedPoolInfo; -extern RTL_BITMAP MiPfnBitMap; extern KGUARDED_MUTEX MmPagedPoolMutex; extern KGUARDED_MUTEX MmSectionCommitMutex; extern PVOID MmPagedPoolStart; @@ -627,7 +630,6 @@ extern PFN_NUMBER MmMinimumFreePages; extern PFN_NUMBER MmPlentyFreePages; extern SIZE_T MmMinimumStackCommitInBytes; extern PFN_COUNT MiExpansionPoolPagesInitialCharge; -extern PFN_NUMBER MmResidentAvailablePages; extern PFN_NUMBER MmResidentAvailableAtInit; extern ULONG MmTotalFreeSystemPtes[MaximumPtePoolTypes]; extern PFN_NUMBER MmTotalSystemDriverPages; @@ -1076,10 +1078,9 @@ MI_WS_OWNER(IN PEPROCESS Process) // FORCEINLINE BOOLEAN -MiIsRosSectionObject(IN PVOID Section) +MiIsRosSectionObject(IN PSECTION Section) { - PSECTION RosSection = Section; - return RosSection->u.Flags.filler; + return Section->u.Flags.filler; } #define MI_IS_ROS_PFN(x) ((x)->u4.AweAllocation == TRUE) @@ -1941,12 +1942,6 @@ MiCheckPdeForPagedPool( IN PVOID Address ); -VOID -NTAPI -MiInitializeNonPagedPool( - VOID -); - VOID NTAPI MiInitializeNonPagedPoolThresholds( @@ -2393,12 +2388,6 @@ MiRosUnmapViewInSystemSpace( IN PVOID MappedBase ); -POOL_TYPE -NTAPI -MmDeterminePoolType( - IN PVOID PoolAddress -); - VOID NTAPI MiMakePdeExistAndMakeValid( @@ -2450,4 +2439,8 @@ MiSynchronizeSystemPde(PMMPDE PointerPde) } #endif +#ifdef __cplusplus +} // extern "C" +#endif + /* EOF */
3 years, 7 months
1
0
0
0
[reactos] 03/06: [NTOS:MM] Introduce MI_IS_PROCESS_WORKING_SET helper function
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8df48f98760e869ec8063…
commit 8df48f98760e869ec80638c6a441e81da156fa24 Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Tue Mar 30 18:13:59 2021 +0200 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Tue May 4 12:02:41 2021 +0200 [NTOS:MM] Introduce MI_IS_PROCESS_WORKING_SET helper function --- ntoskrnl/mm/ARM3/miarm.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ntoskrnl/mm/ARM3/miarm.h b/ntoskrnl/mm/ARM3/miarm.h index 84357d1e7ea..053ae8047dd 100644 --- a/ntoskrnl/mm/ARM3/miarm.h +++ b/ntoskrnl/mm/ARM3/miarm.h @@ -664,6 +664,13 @@ extern LIST_ENTRY MmWorkingSetExpansionHead; extern KSPIN_LOCK MmExpansionLock; extern PETHREAD MiExpansionLockOwner; +FORCEINLINE +BOOLEAN +MI_IS_PROCESS_WORKING_SET(PMMSUPPORT WorkingSet) +{ + return (WorkingSet != &MmSystemCacheWs) && !WorkingSet->Flags.SessionSpace; +} + FORCEINLINE BOOLEAN MiIsMemoryTypeFree(TYPE_OF_MEMORY MemoryType)
3 years, 7 months
1
0
0
0
[reactos] 02/06: [NTOS:MM] Implement turning working set shared lock to exclusive
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6b2f05f9ddfa65d2d8371…
commit 6b2f05f9ddfa65d2d83712d992d9f4e8dfa0ca74 Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Tue Feb 23 17:21:26 2021 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Tue May 4 12:02:41 2021 +0200 [NTOS:MM] Implement turning working set shared lock to exclusive --- ntoskrnl/mm/ARM3/miarm.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/ntoskrnl/mm/ARM3/miarm.h b/ntoskrnl/mm/ARM3/miarm.h index 7de6227f5a1..84357d1e7ea 100644 --- a/ntoskrnl/mm/ARM3/miarm.h +++ b/ntoskrnl/mm/ARM3/miarm.h @@ -1398,6 +1398,46 @@ MiUnlockWorkingSetShared( KeLeaveGuardedRegion(); } +FORCEINLINE +BOOLEAN +MiConvertSharedWorkingSetLockToExclusive( + _In_ PETHREAD Thread, + _In_ PMMSUPPORT Vm) +{ + /* Sanity check: No exclusive lock. */ + ASSERT(!Thread->OwnsProcessWorkingSetExclusive); + ASSERT(!Thread->OwnsSessionWorkingSetExclusive); + ASSERT(!Thread->OwnsSystemWorkingSetExclusive); + + /* And it should have one and only one shared lock */ + ASSERT((Thread->OwnsProcessWorkingSetShared + Thread->OwnsSessionWorkingSetShared + Thread->OwnsSystemWorkingSetShared) == 1); + + /* Try. */ + if (!ExConvertPushLockSharedToExclusive(&Vm->WorkingSetMutex)) + return FALSE; + + if (Vm == &MmSystemCacheWs) + { + ASSERT(Thread->OwnsSystemWorkingSetShared); + Thread->OwnsSystemWorkingSetShared = FALSE; + Thread->OwnsSystemWorkingSetExclusive = TRUE; + } + else if (Vm->Flags.SessionSpace) + { + ASSERT(Thread->OwnsSessionWorkingSetShared); + Thread->OwnsSessionWorkingSetShared = FALSE; + Thread->OwnsSessionWorkingSetExclusive = TRUE; + } + else + { + ASSERT(Thread->OwnsProcessWorkingSetShared); + Thread->OwnsProcessWorkingSetShared = FALSE; + Thread->OwnsProcessWorkingSetExclusive = TRUE; + } + + return TRUE; +} + FORCEINLINE VOID MiUnlockProcessWorkingSetForFault(IN PEPROCESS Process,
3 years, 7 months
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
18
19
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Results per page:
10
25
50
100
200