aboutsummaryrefslogtreecommitdiff
path: root/src/util/winproc.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-15 21:54:06 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-15 21:54:06 +0000
commit5746309cb4be2073d550ad7a6885e918631dbc38 (patch)
tree89455bc4aadf977816b38df13f990372cd81d71a /src/util/winproc.c
parent6fd3e715cae09fa6e657c96f1c6f9711ee51f42f (diff)
downloadgnunet-5746309cb4be2073d550ad7a6885e918631dbc38.tar.gz
gnunet-5746309cb4be2073d550ad7a6885e918631dbc38.zip
indentation
Diffstat (limited to 'src/util/winproc.c')
-rw-r--r--src/util/winproc.c105
1 files changed, 56 insertions, 49 deletions
diff --git a/src/util/winproc.c b/src/util/winproc.c
index 4fa3ab484..9594c5d6f 100644
--- a/src/util/winproc.c
+++ b/src/util/winproc.c
@@ -100,8 +100,9 @@ GNInitWinEnv ()
100 /* Function to get CPU usage under Win NT */ 100 /* Function to get CPU usage under Win NT */
101 if (hNTDLL) 101 if (hNTDLL)
102 { 102 {
103 GNNtQuerySystemInformation = (TNtQuerySystemInformation) 103 GNNtQuerySystemInformation =
104 GetProcAddress (hNTDLL, "NtQuerySystemInformation"); 104 (TNtQuerySystemInformation) GetProcAddress (hNTDLL,
105 "NtQuerySystemInformation");
105 } 106 }
106 else 107 else
107 { 108 {
@@ -113,13 +114,13 @@ GNInitWinEnv ()
113 if (hIphlpapi) 114 if (hIphlpapi)
114 { 115 {
115 GNGetIfEntry = (TGetIfEntry) GetProcAddress (hIphlpapi, "GetIfEntry"); 116 GNGetIfEntry = (TGetIfEntry) GetProcAddress (hIphlpapi, "GetIfEntry");
116 GNGetIpAddrTable = (TGetIpAddrTable) GetProcAddress (hIphlpapi, 117 GNGetIpAddrTable =
117 "GetIpAddrTable"); 118 (TGetIpAddrTable) GetProcAddress (hIphlpapi, "GetIpAddrTable");
118 GNGetIfTable = (TGetIfTable) GetProcAddress (hIphlpapi, "GetIfTable"); 119 GNGetIfTable = (TGetIfTable) GetProcAddress (hIphlpapi, "GetIfTable");
119 GNGetBestInterface = (TGetBestInterface) GetProcAddress (hIphlpapi, 120 GNGetBestInterface =
120 "GetBestInterface"); 121 (TGetBestInterface) GetProcAddress (hIphlpapi, "GetBestInterface");
121 GGetAdaptersInfo = (TGetAdaptersInfo) GetProcAddress (hIphlpapi, 122 GGetAdaptersInfo =
122 "GetAdaptersInfo"); 123 (TGetAdaptersInfo) GetProcAddress (hIphlpapi, "GetAdaptersInfo");
123 } 124 }
124 else 125 else
125 { 126 {
@@ -134,51 +135,57 @@ GNInitWinEnv ()
134 hAdvapi = LoadLibrary ("advapi32.dll"); 135 hAdvapi = LoadLibrary ("advapi32.dll");
135 if (hAdvapi) 136 if (hAdvapi)
136 { 137 {
137 GNOpenSCManager = (TOpenSCManager) 138 GNOpenSCManager =
138 GetProcAddress (hAdvapi, "OpenSCManagerA"); 139 (TOpenSCManager) GetProcAddress (hAdvapi, "OpenSCManagerA");
139 GNCreateService = (TCreateService) 140 GNCreateService =
140 GetProcAddress (hAdvapi, "CreateServiceA"); 141 (TCreateService) GetProcAddress (hAdvapi, "CreateServiceA");
141 GNCloseServiceHandle = (TCloseServiceHandle) 142 GNCloseServiceHandle =
142 GetProcAddress (hAdvapi, "CloseServiceHandle"); 143 (TCloseServiceHandle) GetProcAddress (hAdvapi, "CloseServiceHandle");
143 GNDeleteService = (TDeleteService) 144 GNDeleteService =
144 GetProcAddress (hAdvapi, "DeleteService"); 145 (TDeleteService) GetProcAddress (hAdvapi, "DeleteService");
145 GNRegisterServiceCtrlHandler = (TRegisterServiceCtrlHandler) 146 GNRegisterServiceCtrlHandler =
146 GetProcAddress (hAdvapi, "RegisterServiceCtrlHandlerA"); 147 (TRegisterServiceCtrlHandler) GetProcAddress (hAdvapi,
147 GNSetServiceStatus = (TSetServiceStatus) 148 "RegisterServiceCtrlHandlerA");
148 GetProcAddress (hAdvapi, "SetServiceStatus"); 149 GNSetServiceStatus =
149 GNStartServiceCtrlDispatcher = (TStartServiceCtrlDispatcher) 150 (TSetServiceStatus) GetProcAddress (hAdvapi, "SetServiceStatus");
150 GetProcAddress (hAdvapi, "StartServiceCtrlDispatcherA"); 151 GNStartServiceCtrlDispatcher =
151 GNControlService = (TControlService) 152 (TStartServiceCtrlDispatcher) GetProcAddress (hAdvapi,
152 GetProcAddress (hAdvapi, "ControlService"); 153 "StartServiceCtrlDispatcherA");
154 GNControlService =
155 (TControlService) GetProcAddress (hAdvapi, "ControlService");
153 GNOpenService = (TOpenService) GetProcAddress (hAdvapi, "OpenServiceA"); 156 GNOpenService = (TOpenService) GetProcAddress (hAdvapi, "OpenServiceA");
154 157
155 GNLsaOpenPolicy = (TLsaOpenPolicy) 158 GNLsaOpenPolicy =
156 GetProcAddress (hAdvapi, "LsaOpenPolicy"); 159 (TLsaOpenPolicy) GetProcAddress (hAdvapi, "LsaOpenPolicy");
157 GNLsaAddAccountRights = (TLsaAddAccountRights) 160 GNLsaAddAccountRights =
158 GetProcAddress (hAdvapi, "LsaAddAccountRights"); 161 (TLsaAddAccountRights) GetProcAddress (hAdvapi, "LsaAddAccountRights");
159 GNLsaRemoveAccountRights = (TLsaRemoveAccountRights) 162 GNLsaRemoveAccountRights =
160 GetProcAddress (hAdvapi, "LsaRemoveAccountRights"); 163 (TLsaRemoveAccountRights) GetProcAddress (hAdvapi,
164 "LsaRemoveAccountRights");
161 GNLsaClose = (TLsaClose) GetProcAddress (hAdvapi, "LsaClose"); 165 GNLsaClose = (TLsaClose) GetProcAddress (hAdvapi, "LsaClose");
162 GNLookupAccountName = (TLookupAccountName) 166 GNLookupAccountName =
163 GetProcAddress (hAdvapi, "LookupAccountNameA"); 167 (TLookupAccountName) GetProcAddress (hAdvapi, "LookupAccountNameA");
164 168
165 GNGetFileSecurity = (TGetFileSecurity) 169 GNGetFileSecurity =
166 GetProcAddress (hAdvapi, "GetFileSecurityA"); 170 (TGetFileSecurity) GetProcAddress (hAdvapi, "GetFileSecurityA");
167 GNInitializeSecurityDescriptor = (TInitializeSecurityDescriptor) 171 GNInitializeSecurityDescriptor =
168 GetProcAddress (hAdvapi, "InitializeSecurityDescriptor"); 172 (TInitializeSecurityDescriptor) GetProcAddress (hAdvapi,
169 GNGetSecurityDescriptorDacl = (TGetSecurityDescriptorDacl) 173 "InitializeSecurityDescriptor");
170 GetProcAddress (hAdvapi, "GetSecurityDescriptorDacl"); 174 GNGetSecurityDescriptorDacl =
171 GNGetAclInformation = (TGetAclInformation) 175 (TGetSecurityDescriptorDacl) GetProcAddress (hAdvapi,
172 GetProcAddress (hAdvapi, "GetAclInformation"); 176 "GetSecurityDescriptorDacl");
173 GNInitializeAcl = (TInitializeAcl) 177 GNGetAclInformation =
174 GetProcAddress (hAdvapi, "InitializeAcl"); 178 (TGetAclInformation) GetProcAddress (hAdvapi, "GetAclInformation");
179 GNInitializeAcl =
180 (TInitializeAcl) GetProcAddress (hAdvapi, "InitializeAcl");
175 GNGetAce = (TGetAce) GetProcAddress (hAdvapi, "GetAce"); 181 GNGetAce = (TGetAce) GetProcAddress (hAdvapi, "GetAce");
176 GNEqualSid = (TEqualSid) GetProcAddress (hAdvapi, "EqualSid"); 182 GNEqualSid = (TEqualSid) GetProcAddress (hAdvapi, "EqualSid");
177 GNAddAce = (TAddAce) GetProcAddress (hAdvapi, "AddAce"); 183 GNAddAce = (TAddAce) GetProcAddress (hAdvapi, "AddAce");
178 GNAddAccessAllowedAce = (TAddAccessAllowedAce) 184 GNAddAccessAllowedAce =
179 GetProcAddress (hAdvapi, "AddAccessAllowedAce"); 185 (TAddAccessAllowedAce) GetProcAddress (hAdvapi, "AddAccessAllowedAce");
180 GNSetNamedSecurityInfo = (TSetNamedSecurityInfo) 186 GNSetNamedSecurityInfo =
181 GetProcAddress (hAdvapi, "SetNamedSecurityInfoA"); 187 (TSetNamedSecurityInfo) GetProcAddress (hAdvapi,
188 "SetNamedSecurityInfoA");
182 } 189 }
183 else 190 else
184 { 191 {
@@ -215,8 +222,8 @@ GNInitWinEnv ()
215 if (hNetapi) 222 if (hNetapi)
216 { 223 {
217 GNNetUserAdd = (TNetUserAdd) GetProcAddress (hNetapi, "NetUserAdd"); 224 GNNetUserAdd = (TNetUserAdd) GetProcAddress (hNetapi, "NetUserAdd");
218 GNNetUserSetInfo = (TNetUserSetInfo) 225 GNNetUserSetInfo =
219 GetProcAddress (hNetapi, "NetUserSetInfo"); 226 (TNetUserSetInfo) GetProcAddress (hNetapi, "NetUserSetInfo");
220 } 227 }
221 else 228 else
222 { 229 {