TDBC

Check-in [e007b127fb]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix 06f1692bbe: cross compilation with native mingw compiler in Cygwin environment. Remove a few end-of-line spaces.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e007b127fb416d8c4f27601e1151f0bfd5b61f9d
User & Date: jan.nijtmans 2015-10-05 10:57:14.918
Context
2015-10-05
11:51
re-generate "configure" using latest TEA. check-in: 9f74690834 user: jan.nijtmans tags: trunk
10:57
Fix 06f1692bbe: cross compilation with native mingw compiler in Cygwin environment. Remove a few end-of-line spaces. check-in: e007b127fb user: jan.nijtmans tags: trunk
2015-07-08
14:24
[6af4223559964a82]: if "package require tdbc::*" fails to load a DLL, it should clean up. Suggested by aspect check-in: 105afc59f2 user: jan.nijtmans tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to configure.ac.
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# Finally, substitute all of the various values into the Makefile.
# You may alternatively have a special pkgIndex.tcl.in or other files
# which require substituting th AC variables in.  Include these here.
#--------------------------------------------------------------------

# Develop a fully qualified path for the package source dir
eval tdbc_SRC_DIR="${srcdir}"
tdbc_SRC_DIR=`cd "${tdbc_SRC_DIR}"; pwd`
AC_SUBST(tdbc_SRC_DIR)

# Develop -I specifications for the build and installed directories where
# tdbc.h may be found.
TEAX_INCLUDE_LINE(tdbc_INCLUDE_SPEC, [${includedir}])
TEAX_INCLUDE_LINE(tdbc_BUILD_INCLUDE_SPEC, [${tdbc_SRC_DIR}/generic])

# Develop a fully qualified path for where .tcl files for the tdbc package
# appear at run time.
eval tdbc_LIB_DIR="${libdir}/${PACKAGE_NAME}${PACKAGE_VERSION}"
tdbc_LIB_DIR=`cd "${tdbc_LIB_DIR}"; pwd`
AC_SUBST(tdbc_LIB_DIR)

# Make the export configuration for the TDBC package

TEA_EXPORT_CONFIG([tdbc])

# Set up to produce Makefile from Makefile.in and tdbcConfig.sh from







|










|







183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# Finally, substitute all of the various values into the Makefile.
# You may alternatively have a special pkgIndex.tcl.in or other files
# which require substituting th AC variables in.  Include these here.
#--------------------------------------------------------------------

# Develop a fully qualified path for the package source dir
eval tdbc_SRC_DIR="${srcdir}"
tdbc_SRC_DIR=`cd "${tdbc_SRC_DIR}"; $CYGPATH $(pwd)`
AC_SUBST(tdbc_SRC_DIR)

# Develop -I specifications for the build and installed directories where
# tdbc.h may be found.
TEAX_INCLUDE_LINE(tdbc_INCLUDE_SPEC, [${includedir}])
TEAX_INCLUDE_LINE(tdbc_BUILD_INCLUDE_SPEC, [${tdbc_SRC_DIR}/generic])

# Develop a fully qualified path for where .tcl files for the tdbc package
# appear at run time.
eval tdbc_LIB_DIR="${libdir}/${PACKAGE_NAME}${PACKAGE_VERSION}"
tdbc_LIB_DIR=`cd "${tdbc_LIB_DIR}"; $CYGPATH $(pwd)`
AC_SUBST(tdbc_LIB_DIR)

# Make the export configuration for the TDBC package

TEA_EXPORT_CONFIG([tdbc])

# Set up to produce Makefile from Makefile.in and tdbcConfig.sh from
Changes to generic/tdbcStubLib.c.
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
	if (stubsPtr->epoch != epoch) {
	    errorMsg = "mismatched epoch number";
	} else if (stubsPtr->revision < revision) {
	    errorMsg = "Stubs table provides too early a revision";
	} else {

	    /* Everything is ok. Return the package information */
	    
	    tdbcStubsPtr = stubsPtr;
	    return actualVersion;
	}
    }

    /* Try to explain what went wrong when a mismatched version is found. */








|







83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
	if (stubsPtr->epoch != epoch) {
	    errorMsg = "mismatched epoch number";
	} else if (stubsPtr->revision < revision) {
	    errorMsg = "Stubs table provides too early a revision";
	} else {

	    /* Everything is ok. Return the package information */

	    tdbcStubsPtr = stubsPtr;
	    return actualVersion;
	}
    }

    /* Try to explain what went wrong when a mismatched version is found. */

Changes to generic/tdbcTokenize.c.
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 *-----------------------------------------------------------------------------
 *
 * Tdbc_TokenizeSql --
 *
 *	Tokenizes a SQL statement.
 *
 * Results:
 *	Returns a zero-reference Tcl object that gives the statement in 
 *	tokenized form, or NULL if an error occurs.
 *
 * Side effects:
 *	If an error occurs, and 'interp' is not NULL, stores an error
 *	message in the interpreter result.
 *
 * This is demonstration code for a TCL command that will extract







|







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 *-----------------------------------------------------------------------------
 *
 * Tdbc_TokenizeSql --
 *
 *	Tokenizes a SQL statement.
 *
 * Results:
 *	Returns a zero-reference Tcl object that gives the statement in
 *	tokenized form, or NULL if an error occurs.
 *
 * Side effects:
 *	If an error occurs, and 'interp' is not NULL, stores an error
 *	message in the interpreter result.
 *
 * This is demonstration code for a TCL command that will extract
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
            ** is a host parameter. A name following a doubled colon '::'
	    ** is also not a host parameter.
            */
	    case ':': {
		if (i > 0 && zSql[i-1] == ':') break;
	    }
		/* fallthru */
	    
            case '$':
            case '@': {
                if (i>0 && (isalnum((unsigned char)(zSql[i-1]))
			    || zSql[i-1]=='_')) break;
                if (!isalnum((unsigned char)(zSql[i+1]))
		    && zSql[i+1]!='_') break;
                if (i>0 ){







|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
            ** is a host parameter. A name following a doubled colon '::'
	    ** is also not a host parameter.
            */
	    case ':': {
		if (i > 0 && zSql[i-1] == ':') break;
	    }
		/* fallthru */

            case '$':
            case '@': {
                if (i>0 && (isalnum((unsigned char)(zSql[i-1]))
			    || zSql[i-1]=='_')) break;
                if (!isalnum((unsigned char)(zSql[i+1]))
		    && zSql[i+1]!='_') break;
                if (i>0 ){
210
211
212
213
214
215
216
217
218
	return TCL_ERROR;
    }

    /* Return the tokenized statement */

    Tcl_SetObjResult(interp, retval);
    return TCL_OK;
    
}







|

210
211
212
213
214
215
216
217
218
	return TCL_ERROR;
    }

    /* Return the tokenized statement */

    Tcl_SetObjResult(interp, retval);
    return TCL_OK;

}