1
- // Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
2
- //
3
- // This program is free software; you can redistribute it and/or modify
4
- // it under the terms of the GNU General Public License, version 2.0, as
5
- // published by the Free Software Foundation.
6
- //
7
- // This program is also distributed with certain software (including
8
- // but not limited to OpenSSL) that is licensed under separate terms,
9
- // as designated in a particular file or component or in included license
10
- // documentation. The authors of MySQL hereby grant you an
11
- // additional permission to link the program and your derivative works
12
- // with the separately licensed software that they have included with
13
- // MySQL.
14
- //
15
- // Without limiting anything contained in the foregoing, this file,
16
- // which is part of MySQL Connector/ODBC, is also subject to the
17
- // Universal FOSS Exception, version 1.0, a copy of which can be found at
18
- // http://oss.oracle.com/licenses/universal-foss-exception.
19
- //
20
- // This program is distributed in the hope that it will be useful, but
21
- // WITHOUT ANY WARRANTY; without even the implied warranty of
22
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23
- // See the GNU General Public License, version 2.0, for more details.
24
- //
25
- // You should have received a copy of the GNU General Public License
26
- // along with this program; if not, write to the Free Software Foundation, Inc.,
27
- // 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1
+ // Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
2
+ //
3
+ // This program is free software; you can redistribute it and/or modify
4
+ // it under the terms of the GNU General Public License, version 2.0, as
5
+ // published by the Free Software Foundation.
6
+ //
7
+ // This program is also distributed with certain software (including
8
+ // but not limited to OpenSSL) that is licensed under separate terms,
9
+ // as designated in a particular file or component or in included license
10
+ // documentation. The authors of MySQL hereby grant you an
11
+ // additional permission to link the program and your derivative works
12
+ // with the separately licensed software that they have included with
13
+ // MySQL.
14
+ //
15
+ // Without limiting anything contained in the foregoing, this file,
16
+ // which is part of MySQL Connector/ODBC, is also subject to the
17
+ // Universal FOSS Exception, version 1.0, a copy of which can be found at
18
+ // http://oss.oracle.com/licenses/universal-foss-exception.
19
+ //
20
+ // This program is distributed in the hope that it will be useful, but
21
+ // WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23
+ // See the GNU General Public License, version 2.0, for more details.
24
+ //
25
+ // You should have received a copy of the GNU General Public License
26
+ // along with this program; if not, write to the Free Software Foundation, Inc.,
27
+ // 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28
28
29
29
#ifdef UNICODE
30
- /*
30
+ /*
31
31
Unicode must be disabled, otherwise we will have lots of compiler errors
32
32
about conflicting declarations in odbcinstext.h and odbcinst.h
33
33
*/
@@ -59,7 +59,6 @@ static const char *MYODBC_OPTIONS[][3] = {
59
59
{" BIG_PACKETS" , " C" , " Allow big result set" },
60
60
{" NO_PROMPT" , " C" , " Don't prompt when connecting" },
61
61
{" DYNAMIC_CURSOR" , " C" , " Enable Dynamic Cursors" },
62
- {" NO_SCHEMA" , " C" , " Ignore schema in column specifications" },
63
62
{" NO_DEFAULT_CURSOR" , " C" , " Disable driver-provided cursor support" },
64
63
{" NO_LOCALE" , " C" , " Don't use setlocale()" },
65
64
{" PAD_SPACE" , " C" , " Pad CHAR to full length with space" },
@@ -100,17 +99,17 @@ int ODBCINSTGetProperties(HODBCINSTPROPERTY propertyList)
100
99
/* Allocate next element */
101
100
propertyList->pNext = (HODBCINSTPROPERTY)malloc (sizeof (ODBCINSTPROPERTY));
102
101
propertyList= propertyList->pNext ;
103
-
102
+
104
103
/* Reset everything to zero */
105
104
memset (propertyList, 0 , sizeof (ODBCINSTPROPERTY));
106
-
105
+
107
106
/* copy the option name */
108
- strncpy ( propertyList->szName , MYODBC_OPTIONS[i][0 ],
107
+ strncpy ( propertyList->szName , MYODBC_OPTIONS[i][0 ],
109
108
strlen (MYODBC_OPTIONS[i][0 ]));
110
-
109
+
111
110
/* We make the value always empty by default */
112
111
propertyList->szValue [0 ]= ' \0 ' ;
113
-
112
+
114
113
switch (MYODBC_OPTIONS[i][1 ][0 ])
115
114
{
116
115
/* COMBOBOX */
@@ -119,14 +118,14 @@ int ODBCINSTGetProperties(HODBCINSTPROPERTY propertyList)
119
118
120
119
/* Prepare data for the combobox */
121
120
propertyList->aPromptData = (char **)malloc (sizeof (paramsOnOff));
122
- memcpy (propertyList->aPromptData , paramsOnOff, sizeof (paramsOnOff));
121
+ memcpy (propertyList->aPromptData , paramsOnOff, sizeof (paramsOnOff));
123
122
break ;
124
123
125
124
/* FILE NAME */
126
125
case ' F' :
127
126
propertyList->nPromptType = ODBCINST_PROMPTTYPE_FILENAME;
128
127
break ;
129
-
128
+
130
129
/* TEXTBOX */
131
130
case ' T' :
132
131
default :
@@ -135,8 +134,8 @@ int ODBCINSTGetProperties(HODBCINSTPROPERTY propertyList)
135
134
136
135
/* Finally, set the help text */
137
136
propertyList->pszHelp = strdup (MYODBC_OPTIONS[i][2 ]);
138
-
137
+
139
138
}while (MYODBC_OPTIONS[++i][0 ]);
140
-
139
+
141
140
return 1 ;
142
141
}
0 commit comments