- Fix formatting (no code changed)
authorDmitry Chapyshev <dmitry@reactos.org>
Wed, 8 Oct 2008 16:26:50 +0000 (16:26 +0000)
committerDmitry Chapyshev <dmitry@reactos.org>
Wed, 8 Oct 2008 16:26:50 +0000 (16:26 +0000)
svn path=/trunk/; revision=36698

reactos/base/applications/cacls/cacls.c
reactos/base/applications/cacls/resource.h
reactos/base/applications/charmap/about.c
reactos/base/applications/charmap/charmap.c
reactos/base/applications/charmap/lrgcell.c
reactos/base/applications/charmap/map.c
reactos/base/applications/charmap/resource.h
reactos/base/applications/control/control.c
reactos/base/applications/regedt32/regedt32.c

index 733882b..0327f7c 100644 (file)
@@ -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)
     {
index f8a24f3..7177835 100644 (file)
@@ -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 */
index 464591e..e4c46f8 100644 (file)
@@ -11,7 +11,9 @@
 #include <precomp.h>\r
 \r
 \r
-static INT_PTR CALLBACK\r
+static\r
+INT_PTR\r
+CALLBACK\r
 AboutDialogProc(HWND hDlg,\r
                 UINT message,\r
                 WPARAM wParam,\r
index 22c966e..f5b6cf4 100644 (file)
@@ -14,7 +14,9 @@
 HINSTANCE hInstance;\r
 \r
 /* Font-enumeration callback */\r
-static int CALLBACK\r
+static\r
+int\r
+CALLBACK\r
 EnumFontNames(ENUMLOGFONTEXW *lpelfe,\r
               NEWTEXTMETRICEXW *lpntme,\r
               DWORD FontType,\r
@@ -55,7 +57,8 @@ EnumFontNames(ENUMLOGFONTEXW *lpelfe,
 \r
 \r
 /* Initialize the font-list by enumeration all system fonts */\r
-static VOID\r
+static\r
+VOID\r
 FillFontStyleComboList(HWND hwndCombo)\r
 {\r
     HDC hdc;\r
@@ -90,7 +93,8 @@ FillFontStyleComboList(HWND hwndCombo)
 }\r
 \r
 \r
-static VOID\r
+static\r
+VOID\r
 ChangeMapFont(HWND hDlg)\r
 {\r
     HWND hCombo;\r
@@ -130,7 +134,8 @@ ChangeMapFont(HWND hDlg)
 }\r
 \r
 \r
-static VOID\r
+static\r
+VOID\r
 AddCharToSelection(HWND hText,\r
                    WCHAR ch)\r
 {\r
@@ -182,7 +187,9 @@ AddCharToSelection(HWND hText,
 }\r
 \r
 \r
-static BOOL CALLBACK\r
+static\r
+BOOL\r
+CALLBACK\r
 DlgProc(HWND hDlg,\r
         UINT Message,\r
         WPARAM wParam,\r
@@ -331,7 +338,8 @@ DlgProc(HWND hDlg,
 }\r
 \r
 \r
-INT WINAPI\r
+INT\r
+WINAPI\r
 wWinMain(HINSTANCE hInst,\r
          HINSTANCE hPrev,\r
          LPWSTR Cmd,\r
index fb40e16..fc9af4b 100644 (file)
@@ -10,7 +10,8 @@
 #include <precomp.h>\r
 \r
 \r
-static HFONT\r
+static\r
+HFONT\r
 SetLrgFont(PMAP infoPtr)\r
 {\r
     LOGFONTW lf;\r
index c6b4572..9254309 100644 (file)
@@ -12,7 +12,8 @@
 static const WCHAR szMapWndClass[] = L"FontMapWnd";\r
 static const WCHAR szLrgCellWndClass[] = L"LrgCellWnd";\r
 \r
-static VOID\r
+static\r
+VOID\r
 TagFontToCell(PCELL pCell,\r
               WCHAR ch)\r
 {\r
@@ -20,7 +21,8 @@ TagFontToCell(PCELL pCell,
 }\r
 \r
 \r
-static VOID\r
+static\r
+VOID\r
 SetGrid(PMAP infoPtr)\r
 {\r
     INT x, y;\r
@@ -42,7 +44,8 @@ SetGrid(PMAP infoPtr)
     }\r
 }\r
 \r
-static VOID\r
+static\r
+VOID\r
 DrawActiveCell(PMAP infoPtr,\r
                HDC hdc)\r
 {\r
@@ -55,7 +58,8 @@ DrawActiveCell(PMAP infoPtr,
 }\r
 \r
 \r
-static VOID\r
+static\r
+VOID\r
 DrawGrid(PMAP infoPtr,\r
          HDC hdc)\r
 {\r
@@ -77,7 +81,8 @@ DrawGrid(PMAP infoPtr,
 }\r
 \r
 \r
-static VOID\r
+static\r
+VOID\r
 FillGrid(PMAP infoPtr,\r
          HDC hdc)\r
 {\r
@@ -107,7 +112,8 @@ FillGrid(PMAP infoPtr,
 }\r
 \r
 \r
-static BOOL\r
+static\r
+BOOL\r
 CreateLargeCell(PMAP infoPtr)\r
 {\r
     RECT rLarge;\r
@@ -143,7 +149,8 @@ CreateLargeCell(PMAP infoPtr)
 }\r
 \r
 \r
-static VOID\r
+static\r
+VOID\r
 MoveLargeCell(PMAP infoPtr)\r
 {\r
     RECT rLarge;\r
@@ -173,7 +180,8 @@ MoveLargeCell(PMAP infoPtr)
 }\r
 \r
 \r
-static VOID\r
+static\r
+VOID\r
 SetFont(PMAP infoPtr,\r
         LPWSTR lpFontName)\r
 {\r
@@ -202,7 +210,8 @@ SetFont(PMAP infoPtr,
 }\r
 \r
 \r
-static LRESULT\r
+static\r
+LRESULT\r
 NotifyParentOfSelection(PMAP infoPtr,\r
                         UINT code,\r
                         WCHAR ch)\r
@@ -227,7 +236,8 @@ NotifyParentOfSelection(PMAP infoPtr,
 }\r
 \r
 \r
-static VOID\r
+static\r
+VOID\r
 OnClick(PMAP infoPtr,\r
         WORD ptx,\r
         WORD pty)\r
@@ -294,7 +304,8 @@ OnClick(PMAP infoPtr,
 }\r
 \r
 \r
-static BOOL\r
+static\r
+BOOL\r
 OnCreate(PMAP infoPtr,\r
          HWND hwnd,\r
          HWND hParent)\r
@@ -340,7 +351,8 @@ OnCreate(PMAP infoPtr,
 }\r
 \r
 \r
-static VOID\r
+static\r
+VOID\r
 OnVScroll(PMAP infoPtr,\r
           INT Value,\r
           INT Pos)\r
@@ -409,7 +421,8 @@ OnVScroll(PMAP infoPtr,
 }\r
 \r
 \r
-static VOID\r
+static\r
+VOID\r
 OnPaint(PMAP infoPtr,\r
         WPARAM wParam)\r
 {\r
@@ -451,7 +464,8 @@ OnPaint(PMAP infoPtr,
 }\r
 \r
 \r
-LRESULT CALLBACK\r
+LRESULT\r
+CALLBACK\r
 MapWndProc(HWND hwnd,\r
            UINT uMsg,\r
            WPARAM wParam,\r
index 3f41bfb..b4f6ba5 100644 (file)
@@ -1,19 +1,19 @@
-#define IDC_STATIC -1\r
+#define IDC_STATIC       -1\r
 \r
-#define IDI_ICON 100\r
+#define IDI_ICON         100\r
 \r
-#define IDD_CHARMAP 200\r
-#define IDD_ABOUTBOX 201\r
+#define IDD_CHARMAP      200\r
+#define IDD_ABOUTBOX     201\r
 \r
-#define IDC_FONTCOMBO 1001\r
-#define IDC_CMHELP 1002\r
-#define IDC_FONTMAP 1003\r
-#define IDC_TEXTBOX 1004\r
-#define IDC_SELECT 1005\r
-#define IDC_COPY 1006\r
-#define IDC_ADVVIEW 1007\r
-#define IDC_DISPLAY 1008\r
+#define IDC_FONTCOMBO    1001\r
+#define IDC_CMHELP       1002\r
+#define IDC_FONTMAP      1003\r
+#define IDC_TEXTBOX      1004\r
+#define IDC_SELECT       1005\r
+#define IDC_COPY         1006\r
+#define IDC_ADVVIEW      1007\r
+#define IDC_DISPLAY      1008\r
 #define IDC_LICENSE_EDIT 1009\r
 \r
-#define IDS_LICENSE 1010\r
-#define IDS_ABOUT   1011\r
+#define IDS_LICENSE      1010\r
+#define IDS_ABOUT        1011\r
index 660c40a..4c5dae5 100644 (file)
@@ -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);
             }
         }
 
index 8fc8cdd..74a3c06 100644 (file)
@@ -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;