summaryrefslogtreecommitdiff
path: root/src/interfaces/odbc/psqlodbc.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-02-10 07:01:19 +0000
committerBruce Momjian <bruce@momjian.us>2001-02-10 07:01:19 +0000
commit755a87332adccd3ad8d08bd16ad490e82b009496 (patch)
treef3fb28c376384c5b671020d751f988bd32e14beb /src/interfaces/odbc/psqlodbc.c
parent505a828a661cb4ec8ff9dc3abc69db5fb939bc54 (diff)
Run pgindent over ODBC source. We couldn't do this years ago because we
weren't the master source. We are now, and it really needs it.
Diffstat (limited to 'src/interfaces/odbc/psqlodbc.c')
-rw-r--r--src/interfaces/odbc/psqlodbc.c93
1 files changed, 48 insertions, 45 deletions
diff --git a/src/interfaces/odbc/psqlodbc.c b/src/interfaces/odbc/psqlodbc.c
index c5770f9d33c..ef6345cdd2d 100644
--- a/src/interfaces/odbc/psqlodbc.c
+++ b/src/interfaces/odbc/psqlodbc.c
@@ -1,14 +1,14 @@
-/* Module: psqlodbc.c
+/* Module: psqlodbc.c
*
- * Description: This module contains the main entry point (DllMain) for the library.
- * It also contains functions to get and set global variables for the
- * driver in the registry.
+ * Description: This module contains the main entry point (DllMain) for the library.
+ * It also contains functions to get and set global variables for the
+ * driver in the registry.
*
- * Classes: n/a
+ * Classes: n/a
*
- * API functions: none
+ * API functions: none
*
- * Comments: See "notice.txt" for copyright and license information.
+ * Comments: See "notice.txt" for copyright and license information.
*
*/
@@ -35,57 +35,60 @@ GLOBAL_VALUES globals;
RETCODE SQL_API SQLDummyOrdinal(void);
#ifdef WIN32
-HINSTANCE NEAR s_hModule; /* Saved module handle. */
+HINSTANCE NEAR s_hModule; /* Saved module handle. */
/* This is where the Driver Manager attaches to this Driver */
-BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
+BOOL WINAPI
+DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
{
-WORD wVersionRequested;
-WSADATA wsaData;
+ WORD wVersionRequested;
+ WSADATA wsaData;
- switch (ul_reason_for_call) {
- case DLL_PROCESS_ATTACH:
- s_hModule = hInst; /* Save for dialog boxes */
+ switch (ul_reason_for_call)
+ {
+ case DLL_PROCESS_ATTACH:
+ s_hModule = hInst; /* Save for dialog boxes */
- /* Load the WinSock Library */
- wVersionRequested = MAKEWORD(1, 1);
+ /* Load the WinSock Library */
+ wVersionRequested = MAKEWORD(1, 1);
- if ( WSAStartup(wVersionRequested, &wsaData))
- return FALSE;
+ if (WSAStartup(wVersionRequested, &wsaData))
+ return FALSE;
- /* Verify that this is the minimum version of WinSock */
- if ( LOBYTE( wsaData.wVersion ) != 1 ||
- HIBYTE( wsaData.wVersion ) != 1 ) {
+ /* Verify that this is the minimum version of WinSock */
+ if (LOBYTE(wsaData.wVersion) != 1 ||
+ HIBYTE(wsaData.wVersion) != 1)
+ {
- WSACleanup();
- return FALSE;
- }
+ WSACleanup();
+ return FALSE;
+ }
- getGlobalDefaults(DBMS_NAME, ODBCINST_INI, FALSE);
- break;
+ getGlobalDefaults(DBMS_NAME, ODBCINST_INI, FALSE);
+ break;
- case DLL_THREAD_ATTACH:
- break;
+ case DLL_THREAD_ATTACH:
+ break;
- case DLL_PROCESS_DETACH:
+ case DLL_PROCESS_DETACH:
- WSACleanup();
+ WSACleanup();
- return TRUE;
+ return TRUE;
- case DLL_THREAD_DETACH:
- break;
+ case DLL_THREAD_DETACH:
+ break;
- default:
- break;
+ default:
+ break;
}
- return TRUE;
-
- UNREFERENCED_PARAMETER(lpReserved);
+ return TRUE;
+
+ UNREFERENCED_PARAMETER(lpReserved);
}
-#else /* not WIN32 */
+#else /* not WIN32 */
#ifndef TRUE
#define TRUE (BOOL)1
@@ -96,7 +99,7 @@ WSADATA wsaData;
#ifdef __GNUC__
-/* This function is called at library initialization time. */
+/* This function is called at library initialization time. */
static BOOL
__attribute__((constructor))
@@ -106,7 +109,7 @@ init(void)
return TRUE;
}
-#else /* not __GNUC__ */
+#else /* not __GNUC__ */
/* These two functions do shared library initialziation on UNIX, well at least
* on Linux. I don't know about other systems.
@@ -124,9 +127,9 @@ _fini(void)
return TRUE;
}
-#endif /* not __GNUC__ */
+#endif /* not __GNUC__ */
-#endif /* not WIN32 */
+#endif /* not WIN32 */
/* This function is used to cause the Driver Manager to
call functions by number rather than name, which is faster.
@@ -134,8 +137,8 @@ _fini(void)
Driver Manager do this. Also, the ordinal values of the
functions must match the value of fFunction in SQLGetFunctions()
*/
-RETCODE SQL_API SQLDummyOrdinal(void)
+RETCODE SQL_API
+SQLDummyOrdinal(void)
{
return SQL_SUCCESS;
}
-