From b1c39670f7bc4156bc0d42d343a22bd6ccab29ea Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Wed, 8 Oct 2008 16:26:50 +0000 Subject: [PATCH] - Fix formatting (no code changed) svn path=/trunk/; revision=36698 --- reactos/base/applications/cacls/cacls.c | 22 ++++-- reactos/base/applications/cacls/resource.h | 74 +++++++++---------- reactos/base/applications/charmap/about.c | 4 +- reactos/base/applications/charmap/charmap.c | 20 +++-- reactos/base/applications/charmap/lrgcell.c | 3 +- reactos/base/applications/charmap/map.c | 42 +++++++---- reactos/base/applications/charmap/resource.h | 28 +++---- reactos/base/applications/control/control.c | 55 +++++++++++--- reactos/base/applications/regedt32/regedt32.c | 22 +++++- 9 files changed, 175 insertions(+), 95 deletions(-) diff --git a/reactos/base/applications/cacls/cacls.c b/reactos/base/applications/cacls/cacls.c index 733882ba529..0327f7caa98 100644 --- a/reactos/base/applications/cacls/cacls.c +++ b/reactos/base/applications/cacls/cacls.c @@ -28,7 +28,8 @@ static GENERIC_MAPPING FileGenericMapping = }; -static INT +static +INT LengthOfStrResource(IN HINSTANCE hInst, IN UINT uID) { @@ -72,7 +73,8 @@ LengthOfStrResource(IN HINSTANCE hInst, } -static INT +static +INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID) @@ -106,7 +108,8 @@ AllocAndLoadString(OUT LPTSTR *lpTarget, } -static VOID +static +VOID PrintHelp(VOID) { LPTSTR szHelp; @@ -125,7 +128,8 @@ PrintHelp(VOID) } -static VOID +static +VOID PrintErrorMessage(IN DWORD dwError) { LPTSTR szError; @@ -148,7 +152,8 @@ PrintErrorMessage(IN DWORD dwError) } -static DWORD +static +DWORD LoadAndPrintString(IN HINSTANCE hInst, IN UINT uID) { @@ -170,7 +175,8 @@ LoadAndPrintString(IN HINSTANCE hInst, } -static BOOL +static +BOOL PrintFileDacl(IN LPTSTR FilePath, IN LPTSTR FileName) { @@ -507,7 +513,9 @@ PrintSpecialAccess: } -int __cdecl _tmain(int argc, const TCHAR *argv[]) +int +__cdecl +_tmain(int argc, const TCHAR *argv[]) { if (argc < 2) { diff --git a/reactos/base/applications/cacls/resource.h b/reactos/base/applications/cacls/resource.h index f8a24f331e1..71778353f10 100644 --- a/reactos/base/applications/cacls/resource.h +++ b/reactos/base/applications/cacls/resource.h @@ -1,44 +1,44 @@ #ifndef _CACLS_RESOURCE_H #define _CACLS_RESOURCE_H -#define IDS_HELP 101 -#define IDS_ABBR_CI 102 -#define IDS_ABBR_OI 103 -#define IDS_ABBR_IO 104 -#define IDS_ABBR_FULL 105 -#define IDS_ABBR_READ 106 -#define IDS_ABBR_WRITE 107 -#define IDS_ABBR_CHANGE 108 -#define IDS_ABBR_NONE 109 -#define IDS_ALLOW 110 -#define IDS_DENY 111 -#define IDS_SPECIAL_ACCESS 112 +#define IDS_HELP 101 +#define IDS_ABBR_CI 102 +#define IDS_ABBR_OI 103 +#define IDS_ABBR_IO 104 +#define IDS_ABBR_FULL 105 +#define IDS_ABBR_READ 106 +#define IDS_ABBR_WRITE 107 +#define IDS_ABBR_CHANGE 108 +#define IDS_ABBR_NONE 109 +#define IDS_ALLOW 110 +#define IDS_DENY 111 +#define IDS_SPECIAL_ACCESS 112 -#define IDS_GENERIC_READ 113 -#define IDS_GENERIC_WRITE 114 -#define IDS_GENERIC_EXECUTE 115 -#define IDS_GENERIC_ALL 116 -#define IDS_FILE_GENERIC_EXECUTE 118 -#define IDS_FILE_GENERIC_READ 119 -#define IDS_FILE_GENERIC_WRITE 120 -#define IDS_FILE_READ_DATA 121 -#define IDS_FILE_WRITE_DATA 122 -#define IDS_FILE_APPEND_DATA 123 -#define IDS_FILE_READ_EA 124 -#define IDS_FILE_WRITE_EA 125 -#define IDS_FILE_EXECUTE 126 -#define IDS_FILE_DELETE_CHILD 127 -#define IDS_FILE_READ_ATTRIBUTES 128 -#define IDS_FILE_WRITE_ATTRIBUTES 129 -#define IDS_MAXIMUM_ALLOWED 130 -#define IDS_ACCESS_SYSTEM_SECURITY 131 -#define IDS_SPECIFIC_RIGHTS_ALL 132 +#define IDS_GENERIC_READ 113 +#define IDS_GENERIC_WRITE 114 +#define IDS_GENERIC_EXECUTE 115 +#define IDS_GENERIC_ALL 116 +#define IDS_FILE_GENERIC_EXECUTE 118 +#define IDS_FILE_GENERIC_READ 119 +#define IDS_FILE_GENERIC_WRITE 120 +#define IDS_FILE_READ_DATA 121 +#define IDS_FILE_WRITE_DATA 122 +#define IDS_FILE_APPEND_DATA 123 +#define IDS_FILE_READ_EA 124 +#define IDS_FILE_WRITE_EA 125 +#define IDS_FILE_EXECUTE 126 +#define IDS_FILE_DELETE_CHILD 127 +#define IDS_FILE_READ_ATTRIBUTES 128 +#define IDS_FILE_WRITE_ATTRIBUTES 129 +#define IDS_MAXIMUM_ALLOWED 130 +#define IDS_ACCESS_SYSTEM_SECURITY 131 +#define IDS_SPECIFIC_RIGHTS_ALL 132 #define IDS_STANDARD_RIGHTS_REQUIRED 133 -#define IDS_SYNCHRONIZE 134 -#define IDS_WRITE_OWNER 135 -#define IDS_WRITE_DAC 136 -#define IDS_READ_CONTROL 137 -#define IDS_DELETE 138 -#define IDS_STANDARD_RIGHTS_ALL 139 +#define IDS_SYNCHRONIZE 134 +#define IDS_WRITE_OWNER 135 +#define IDS_WRITE_DAC 136 +#define IDS_READ_CONTROL 137 +#define IDS_DELETE 138 +#define IDS_STANDARD_RIGHTS_ALL 139 #endif /* _CACLS_RESOURCE_H */ diff --git a/reactos/base/applications/charmap/about.c b/reactos/base/applications/charmap/about.c index 464591ee1c6..e4c46f87fbf 100644 --- a/reactos/base/applications/charmap/about.c +++ b/reactos/base/applications/charmap/about.c @@ -11,7 +11,9 @@ #include -static INT_PTR CALLBACK +static +INT_PTR +CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, diff --git a/reactos/base/applications/charmap/charmap.c b/reactos/base/applications/charmap/charmap.c index 22c966ed0fa..f5b6cf458dd 100644 --- a/reactos/base/applications/charmap/charmap.c +++ b/reactos/base/applications/charmap/charmap.c @@ -14,7 +14,9 @@ HINSTANCE hInstance; /* Font-enumeration callback */ -static int CALLBACK +static +int +CALLBACK EnumFontNames(ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEXW *lpntme, DWORD FontType, @@ -55,7 +57,8 @@ EnumFontNames(ENUMLOGFONTEXW *lpelfe, /* Initialize the font-list by enumeration all system fonts */ -static VOID +static +VOID FillFontStyleComboList(HWND hwndCombo) { HDC hdc; @@ -90,7 +93,8 @@ FillFontStyleComboList(HWND hwndCombo) } -static VOID +static +VOID ChangeMapFont(HWND hDlg) { HWND hCombo; @@ -130,7 +134,8 @@ ChangeMapFont(HWND hDlg) } -static VOID +static +VOID AddCharToSelection(HWND hText, WCHAR ch) { @@ -182,7 +187,9 @@ AddCharToSelection(HWND hText, } -static BOOL CALLBACK +static +BOOL +CALLBACK DlgProc(HWND hDlg, UINT Message, WPARAM wParam, @@ -331,7 +338,8 @@ DlgProc(HWND hDlg, } -INT WINAPI +INT +WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrev, LPWSTR Cmd, diff --git a/reactos/base/applications/charmap/lrgcell.c b/reactos/base/applications/charmap/lrgcell.c index fb40e16c610..fc9af4b209d 100644 --- a/reactos/base/applications/charmap/lrgcell.c +++ b/reactos/base/applications/charmap/lrgcell.c @@ -10,7 +10,8 @@ #include -static HFONT +static +HFONT SetLrgFont(PMAP infoPtr) { LOGFONTW lf; diff --git a/reactos/base/applications/charmap/map.c b/reactos/base/applications/charmap/map.c index c6b4572a668..9254309826a 100644 --- a/reactos/base/applications/charmap/map.c +++ b/reactos/base/applications/charmap/map.c @@ -12,7 +12,8 @@ static const WCHAR szMapWndClass[] = L"FontMapWnd"; static const WCHAR szLrgCellWndClass[] = L"LrgCellWnd"; -static VOID +static +VOID TagFontToCell(PCELL pCell, WCHAR ch) { @@ -20,7 +21,8 @@ TagFontToCell(PCELL pCell, } -static VOID +static +VOID SetGrid(PMAP infoPtr) { INT x, y; @@ -42,7 +44,8 @@ SetGrid(PMAP infoPtr) } } -static VOID +static +VOID DrawActiveCell(PMAP infoPtr, HDC hdc) { @@ -55,7 +58,8 @@ DrawActiveCell(PMAP infoPtr, } -static VOID +static +VOID DrawGrid(PMAP infoPtr, HDC hdc) { @@ -77,7 +81,8 @@ DrawGrid(PMAP infoPtr, } -static VOID +static +VOID FillGrid(PMAP infoPtr, HDC hdc) { @@ -107,7 +112,8 @@ FillGrid(PMAP infoPtr, } -static BOOL +static +BOOL CreateLargeCell(PMAP infoPtr) { RECT rLarge; @@ -143,7 +149,8 @@ CreateLargeCell(PMAP infoPtr) } -static VOID +static +VOID MoveLargeCell(PMAP infoPtr) { RECT rLarge; @@ -173,7 +180,8 @@ MoveLargeCell(PMAP infoPtr) } -static VOID +static +VOID SetFont(PMAP infoPtr, LPWSTR lpFontName) { @@ -202,7 +210,8 @@ SetFont(PMAP infoPtr, } -static LRESULT +static +LRESULT NotifyParentOfSelection(PMAP infoPtr, UINT code, WCHAR ch) @@ -227,7 +236,8 @@ NotifyParentOfSelection(PMAP infoPtr, } -static VOID +static +VOID OnClick(PMAP infoPtr, WORD ptx, WORD pty) @@ -294,7 +304,8 @@ OnClick(PMAP infoPtr, } -static BOOL +static +BOOL OnCreate(PMAP infoPtr, HWND hwnd, HWND hParent) @@ -340,7 +351,8 @@ OnCreate(PMAP infoPtr, } -static VOID +static +VOID OnVScroll(PMAP infoPtr, INT Value, INT Pos) @@ -409,7 +421,8 @@ OnVScroll(PMAP infoPtr, } -static VOID +static +VOID OnPaint(PMAP infoPtr, WPARAM wParam) { @@ -451,7 +464,8 @@ OnPaint(PMAP infoPtr, } -LRESULT CALLBACK +LRESULT +CALLBACK MapWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, diff --git a/reactos/base/applications/charmap/resource.h b/reactos/base/applications/charmap/resource.h index 3f41bfbd573..b4f6ba58383 100644 --- a/reactos/base/applications/charmap/resource.h +++ b/reactos/base/applications/charmap/resource.h @@ -1,19 +1,19 @@ -#define IDC_STATIC -1 +#define IDC_STATIC -1 -#define IDI_ICON 100 +#define IDI_ICON 100 -#define IDD_CHARMAP 200 -#define IDD_ABOUTBOX 201 +#define IDD_CHARMAP 200 +#define IDD_ABOUTBOX 201 -#define IDC_FONTCOMBO 1001 -#define IDC_CMHELP 1002 -#define IDC_FONTMAP 1003 -#define IDC_TEXTBOX 1004 -#define IDC_SELECT 1005 -#define IDC_COPY 1006 -#define IDC_ADVVIEW 1007 -#define IDC_DISPLAY 1008 +#define IDC_FONTCOMBO 1001 +#define IDC_CMHELP 1002 +#define IDC_FONTMAP 1003 +#define IDC_TEXTBOX 1004 +#define IDC_SELECT 1005 +#define IDC_COPY 1006 +#define IDC_ADVVIEW 1007 +#define IDC_DISPLAY 1008 #define IDC_LICENSE_EDIT 1009 -#define IDS_LICENSE 1010 -#define IDS_ABOUT 1011 +#define IDS_LICENSE 1010 +#define IDS_ABOUT 1011 diff --git a/reactos/base/applications/control/control.c b/reactos/base/applications/control/control.c index 660c40a0073..4c5dae55731 100644 --- a/reactos/base/applications/control/control.c +++ b/reactos/base/applications/control/control.c @@ -13,7 +13,8 @@ static const TCHAR szWindowClass[] = _T("DummyControlClass"); HANDLE hProcessHeap; HINSTANCE hInst; -static INT +static +INT OpenShellFolder(LPTSTR lpFolderCLSID) { TCHAR szParameters[MAX_PATH]; @@ -23,10 +24,16 @@ OpenShellFolder(LPTSTR lpFolderCLSID) _tcscpy(szParameters, _T("/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}")); _tcscat(szParameters, lpFolderCLSID); - return (int)ShellExecute(NULL, _T("open"), _T("explorer.exe"), szParameters, NULL, SW_SHOWDEFAULT) > 32; + return (int) ShellExecute(NULL, + _T("open"), + _T("explorer.exe"), + szParameters, + NULL, + SW_SHOWDEFAULT) > 32; } -static INT +static +INT RunControlPanel(LPTSTR lpCmd) { TCHAR szParameters[MAX_PATH]; @@ -37,8 +44,12 @@ RunControlPanel(LPTSTR lpCmd) return RUNDLL(szParameters); } -int WINAPI -_tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) +int +WINAPI +_tWinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPTSTR lpCmdLine, + int nCmdShow) { HKEY hKey; @@ -71,7 +82,11 @@ _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nC else if (!_tcsicmp(lpCmdLine, _T("userpasswords2"))) return RUNDLL(_T("netplwiz.dll,UsersRunDll")); /* Dialog based advanced User Account Manager */ /* It is none of them, so look for a handler in the registry */ - if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"), 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) + if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, + _T("Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"), + 0, + KEY_QUERY_VALUE, + &hKey) == ERROR_SUCCESS) { DWORD dwIndex; @@ -82,7 +97,14 @@ _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nC TCHAR szValueName[MAX_VALUE_NAME]; /* Get the value name and data size */ - if(RegEnumValue(hKey, dwIndex, szValueName, &dwValueSize, 0, NULL, NULL, &dwDataSize) != ERROR_SUCCESS) + if(RegEnumValue(hKey, + dwIndex, + szValueName, + &dwValueSize, + 0, + NULL, + NULL, + &dwDataSize) != ERROR_SUCCESS) break; /* Check if the parameter is the value name */ @@ -91,11 +113,18 @@ _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nC LPTSTR pszData; /* Allocate memory for the data plus two more characters, so we can quote the file name if required */ - pszData = (LPTSTR) HeapAlloc(hProcessHeap, 0, dwDataSize + 2 * sizeof(TCHAR)); + pszData = (LPTSTR) HeapAlloc(hProcessHeap, + 0, + dwDataSize + 2 * sizeof(TCHAR)); ++pszData; /* This value is the one we are looking for, so get the data. It is the path to a .cpl file */ - if(RegQueryValueEx(hKey, szValueName, 0, NULL, (LPBYTE)pszData, &dwDataSize) == ERROR_SUCCESS) + if(RegQueryValueEx(hKey, + szValueName, + 0, + NULL, + (LPBYTE)pszData, + &dwDataSize) == ERROR_SUCCESS) { INT nReturnValue; @@ -108,13 +137,17 @@ _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nC } nReturnValue = RunControlPanel(pszData); - HeapFree(hProcessHeap, 0, pszData); + HeapFree(hProcessHeap, + 0, + pszData); RegCloseKey(hKey); return nReturnValue; } - HeapFree(hProcessHeap, 0, pszData); + HeapFree(hProcessHeap, + 0, + pszData); } } diff --git a/reactos/base/applications/regedt32/regedt32.c b/reactos/base/applications/regedt32/regedt32.c index 8fc8cdd15d9..74a3c06cd49 100644 --- a/reactos/base/applications/regedt32/regedt32.c +++ b/reactos/base/applications/regedt32/regedt32.c @@ -5,19 +5,33 @@ #define REGEDIT _T("regedit.exe") -int WINAPI _tWinMain(HINSTANCE hCurInst, HINSTANCE hPrevInst, - LPTSTR lpsCmdLine, int nCmdShow) +int +WINAPI +_tWinMain(HINSTANCE hCurInst, + HINSTANCE hPrevInst, + LPTSTR lpsCmdLine, + int nCmdShow) { TCHAR szPath[MAX_PATH]; if(GetWindowsDirectory(szPath, MAX_PATH)) { PathAppend(szPath, REGEDIT); - ShellExecute(NULL, NULL, szPath, lpsCmdLine, NULL, nCmdShow); + ShellExecute(NULL, + NULL, + szPath, + lpsCmdLine, + NULL, + nCmdShow); } else { - ShellExecute(NULL, NULL, REGEDIT, lpsCmdLine, NULL, nCmdShow); + ShellExecute(NULL, + NULL, + REGEDIT, + lpsCmdLine, + NULL, + nCmdShow); } return 0;