List:Commits« Previous MessageNext Message »
From:jbalint Date:May 24 2007 9:49pm
Subject:Connector/ODBC 5 commit: r940 - trunk/Driver/Setup/Library
View as plain text  
Modified:
   trunk/Driver/Setup/Library/ConfigDSNW.c
Log:
dos2unix

Modified: trunk/Driver/Setup/Library/ConfigDSNW.c
===================================================================
--- trunk/Driver/Setup/Library/ConfigDSNW.c	2007-05-24 19:19:22 UTC (rev 939)
+++ trunk/Driver/Setup/Library/ConfigDSNW.c	2007-05-24 19:49:48 UTC (rev 940)
@@ -1,99 +1,99 @@
-/*! 
-    \file     ConfigDSNW.cpp
-    \author   Jess Balint <jbalint@stripped>
-              Copyright MySQL AB 2004-2007 Released under GPL.
-    \version  Connector/ODBC v5
-    \date       2007
-    \brief    Contains the ConfigDSNW entry point.
-    \internal License  
-
-              Copyright (C) 2004-2007 MySQL AB
-
-              This program is free software; you can redistribute it and/or modify
-              it under the terms of the GNU General Public License as published by
-              the Free Software Foundation; either version 2 of the License, or
-              (at your option) any later version.
-            
-              There are special exceptions to the terms and conditions of the GPL as it
-              is applied to this software. View the full text of the exception in file
-              EXCEPTIONS in the directory of this software distribution.
-            
-              This program 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 General Public License for more details.
-            
-              You should have received a copy of the GNU General Public License
-              along with this program; if not, write to the Free Software
-              Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
-#include "MYODBCSetup.h"
-
-BOOL INSTAPI ConfigDSNW(HWND wnd, WORD req, LPCWSTR driver, LPCWSTR attrs)
-{
-    BOOL rc = TRUE;
-    DataSource *ds = ds_new();
-    int found = 0;
-    int mode = 0;
-
-    if(ds_from_kvpair(ds, attrs, 0))
-    {
-        SQLPostInstallerError(ODBC_ERROR_INVALID_KEYWORD_VALUE,
-                L"Cannot parse attribute string");
-        goto end;
-    }
-
-    ds_set_strattr(&ds->driver, driver);
-
-    /* try to lookup a datasource */
-    if((found = ds_lookup(ds)) > 0)
-    {
-        /* any >0 error will be an installer API error */
-        rc = FALSE;
-        goto end;
-    }
-
-    /* 0 means found, invert it */
-    found = !found;
-
-    switch(req)
-    {
-    /* edit a DSN */
-    case ODBC_CONFIG_DSN:
-        if(!found)
-        {
-            rc = FALSE;
-            goto end;
-        }
-        /* pass down, to "add" which will replace current contents.
-         * reset 'found' so it won't prompt to replace. */
-        found = 0;
-
-        mode = CONFIG_EDIT;
-        /* TODO handle if they rename it? delete the old one.. */
-    case ODBC_ADD_DSN:
-        if(!wnd || !MYODBCSetupDataSourceConfig(wnd, ds, mode || CONFIG_ADD))
-        {
-            rc = FALSE;
-            goto end;
-        }
-
-        if(ds_add(ds))
-        {
-            rc = FALSE;
-            goto end;
-        }
-        break;
-    case ODBC_REMOVE_DSN:
-        rc = SQLRemoveDSNFromIni(ds->name);
-        break;
-    default:
-        SQLPostInstallerError(ODBC_ERROR_INVALID_REQUEST_TYPE,
-                L"Invalid request type");
-        rc = FALSE;
-    }
-
-end:
-    return rc;
-}
-
+/*! 
+    \file     ConfigDSNW.cpp
+    \author   Jess Balint <jbalint@stripped>
+              Copyright MySQL AB 2004-2007 Released under GPL.
+    \version  Connector/ODBC v5
+    \date       2007
+    \brief    Contains the ConfigDSNW entry point.
+    \internal License  
+
+              Copyright (C) 2004-2007 MySQL AB
+
+              This program is free software; you can redistribute it and/or modify
+              it under the terms of the GNU General Public License as published by
+              the Free Software Foundation; either version 2 of the License, or
+              (at your option) any later version.
+            
+              There are special exceptions to the terms and conditions of the GPL as it
+              is applied to this software. View the full text of the exception in file
+              EXCEPTIONS in the directory of this software distribution.
+            
+              This program 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 General Public License for more details.
+            
+              You should have received a copy of the GNU General Public License
+              along with this program; if not, write to the Free Software
+              Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+#include "MYODBCSetup.h"
+
+BOOL INSTAPI ConfigDSNW(HWND wnd, WORD req, LPCWSTR driver, LPCWSTR attrs)
+{
+    BOOL rc = TRUE;
+    DataSource *ds = ds_new();
+    int found = 0;
+    int mode = 0;
+
+    if(ds_from_kvpair(ds, attrs, 0))
+    {
+        SQLPostInstallerError(ODBC_ERROR_INVALID_KEYWORD_VALUE,
+                L"Cannot parse attribute string");
+        goto end;
+    }
+
+    ds_set_strattr(&ds->driver, driver);
+
+    /* try to lookup a datasource */
+    if((found = ds_lookup(ds)) > 0)
+    {
+        /* any >0 error will be an installer API error */
+        rc = FALSE;
+        goto end;
+    }
+
+    /* 0 means found, invert it */
+    found = !found;
+
+    switch(req)
+    {
+    /* edit a DSN */
+    case ODBC_CONFIG_DSN:
+        if(!found)
+        {
+            rc = FALSE;
+            goto end;
+        }
+        /* pass down, to "add" which will replace current contents.
+         * reset 'found' so it won't prompt to replace. */
+        found = 0;
+
+        mode = CONFIG_EDIT;
+        /* TODO handle if they rename it? delete the old one.. */
+    case ODBC_ADD_DSN:
+        if(!wnd || !MYODBCSetupDataSourceConfig(wnd, ds, mode || CONFIG_ADD))
+        {
+            rc = FALSE;
+            goto end;
+        }
+
+        if(ds_add(ds))
+        {
+            rc = FALSE;
+            goto end;
+        }
+        break;
+    case ODBC_REMOVE_DSN:
+        rc = SQLRemoveDSNFromIni(ds->name);
+        break;
+    default:
+        SQLPostInstallerError(ODBC_ERROR_INVALID_REQUEST_TYPE,
+                L"Invalid request type");
+        rc = FALSE;
+    }
+
+end:
+    return rc;
+}
+

Thread
Connector/ODBC 5 commit: r940 - trunk/Driver/Setup/Libraryjbalint24 May