You can subscribe to this list here.
2003 |
Jan
(30) |
Feb
(20) |
Mar
(151) |
Apr
(86) |
May
(23) |
Jun
(25) |
Jul
(107) |
Aug
(141) |
Sep
(55) |
Oct
(85) |
Nov
(65) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(22) |
Feb
(18) |
Mar
(3) |
Apr
(16) |
May
(69) |
Jun
(3) |
Jul
(1) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(6) |
Dec
(1) |
2005 |
Jan
(2) |
Feb
(16) |
Mar
|
Apr
|
May
|
Jun
(47) |
Jul
(1) |
Aug
|
Sep
(6) |
Oct
(4) |
Nov
|
Dec
(34) |
2006 |
Jan
(39) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(4) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2008 |
Jan
|
Feb
|
Mar
(26) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(5) |
Aug
(2) |
Sep
(8) |
Oct
(8) |
Nov
(22) |
Dec
(30) |
2009 |
Jan
(10) |
Feb
(13) |
Mar
(14) |
Apr
(14) |
May
(32) |
Jun
(25) |
Jul
(36) |
Aug
(10) |
Sep
(2) |
Oct
|
Nov
|
Dec
(10) |
2010 |
Jan
(9) |
Feb
(4) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: <kr_...@us...> - 2005-02-01 13:04:18
|
Update of /cvsroot/htoolkit/HSQL/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26145/HSQL Added Files: HSQL.cabal Setup.lhs Log Message: Add cabalized version of HSQL --- NEW FILE: HSQL.cabal --- name: hsql version: 1.5 license: BSD3 author: Krasimir Angelov <ka2...@ya...> category: Database description: Simple library for database access from Haskell. exposed-modules: Database.HSQL, Database.HSQL.Types build-depends: base extensions: ForeignFunctionInterface, TypeSynonymInstances, CPP --- NEW FILE: Setup.lhs --- #! runghc \begin{code} import Distribution.Simple main = defaultMain \end{code} |
From: <kr_...@us...> - 2005-02-01 13:00:32
|
Update of /cvsroot/htoolkit/HSQL/SQLite/Database/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25565/HSQL Log Message: Directory /cvsroot/htoolkit/HSQL/SQLite/Database/HSQL added to the repository |
From: <kr_...@us...> - 2005-02-01 13:00:05
|
Update of /cvsroot/htoolkit/HSQL/SQLite/Database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25394/Database Log Message: Directory /cvsroot/htoolkit/HSQL/SQLite/Database added to the repository |
From: <kr_...@us...> - 2005-02-01 12:58:42
|
Update of /cvsroot/htoolkit/HSQL/SQLite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25209/SQLite Log Message: Directory /cvsroot/htoolkit/HSQL/SQLite added to the repository |
From: <kr_...@us...> - 2005-02-01 12:57:50
|
Update of /cvsroot/htoolkit/HSQL/HSQL/Database/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25047/HSQL Log Message: Directory /cvsroot/htoolkit/HSQL/HSQL/Database/HSQL added to the repository |
From: <kr_...@us...> - 2005-02-01 12:56:57
|
Update of /cvsroot/htoolkit/HSQL/HSQL/Database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24869/Database Log Message: Directory /cvsroot/htoolkit/HSQL/HSQL/Database added to the repository |
From: <kr_...@us...> - 2005-02-01 12:55:56
|
Update of /cvsroot/htoolkit/HSQL/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24685/HSQL Log Message: Directory /cvsroot/htoolkit/HSQL/HSQL added to the repository |
From: <kr_...@us...> - 2005-02-01 12:54:28
|
Update of /cvsroot/htoolkit/HSQL/ODBC/Database/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24390/HSQL Log Message: Directory /cvsroot/htoolkit/HSQL/ODBC/Database/HSQL added to the repository |
From: <kr_...@us...> - 2005-02-01 12:53:46
|
Update of /cvsroot/htoolkit/HSQL/ODBC/Database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24179/Database Log Message: Directory /cvsroot/htoolkit/HSQL/ODBC/Database added to the repository |
From: <kr_...@us...> - 2005-01-31 11:01:46
|
Update of /cvsroot/htoolkit/HSQL/src/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3618 Modified Files: ODBC.hsc Log Message: Some fixes for MSSQL and add support for ODBC debuging Index: ODBC.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/ODBC.hsc,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ODBC.hsc 4 Nov 2004 12:50:29 -0000 1.12 --- ODBC.hsc 31 Jan 2005 11:01:30 -0000 1.13 *************** *** 26,29 **** --- 26,32 ---- import System.IO.Unsafe import System.Time + #ifdef ODBC_DEBUG + import Debug.Trace + #endif #include <time.h> *************** *** 83,112 **** ----------------------------------------------------------------------------------------- - sqlSuccess :: SQLRETURN -> Bool - sqlSuccess res = - (res == (#const SQL_SUCCESS)) || (res == (#const SQL_SUCCESS_WITH_INFO)) || (res == (#const SQL_NO_DATA)) - handleSqlResult :: SQLSMALLINT -> SQLHANDLE -> SQLRETURN -> IO () handleSqlResult handleType handle res ! | sqlSuccess res = return () | res == (#const SQL_INVALID_HANDLE) = throwDyn SqlInvalidHandle | res == (#const SQL_STILL_EXECUTING) = throwDyn SqlStillExecuting | res == (#const SQL_NEED_DATA) = throwDyn SqlNeedData ! | res == (#const SQL_ERROR) = ! allocaBytes 256 $ \pState -> ! alloca $ \pNative -> ! allocaBytes 256 $ \pMsg -> ! alloca $ \pTextLen -> ! do ! res <- sqlGetDiagRec handleType handle 1 pState pNative pMsg 256 pTextLen ! e <- if res == (#const SQL_NO_DATA) ! then return SqlNoData ! else do ! state <- peekCString pState ! native <- peek pNative ! msg <- peekCString pMsg ! return (SqlError {seState=state, seNativeError=fromIntegral native, seErrorMsg=msg}) ! throwDyn e | otherwise = error (show res) ----------------------------------------------------------------------------------------- --- 86,120 ---- ----------------------------------------------------------------------------------------- handleSqlResult :: SQLSMALLINT -> SQLHANDLE -> SQLRETURN -> IO () handleSqlResult handleType handle res ! | res == (#const SQL_SUCCESS) || res == (#const SQL_NO_DATA) = return () ! | res == (#const SQL_SUCCESS_WITH_INFO) = do ! #ifdef ODBC_DEBUG ! e <- getDiagRec ! trace (show e) $ return () ! #else ! return () ! #endif | res == (#const SQL_INVALID_HANDLE) = throwDyn SqlInvalidHandle | res == (#const SQL_STILL_EXECUTING) = throwDyn SqlStillExecuting | res == (#const SQL_NEED_DATA) = throwDyn SqlNeedData ! | res == (#const SQL_ERROR) = do ! e <- getDiagRec ! throwDyn e | otherwise = error (show res) + where + getDiagRec = + allocaBytes 256 $ \pState -> + alloca $ \pNative -> + allocaBytes 256 $ \pMsg -> + alloca $ \pTextLen -> do + res <- sqlGetDiagRec handleType handle 1 pState pNative pMsg 256 pTextLen + if res == (#const SQL_NO_DATA) + then return SqlNoData + else do + state <- peekCString pState + native <- peek pNative + msg <- peekCString pMsg + return (SqlError {seState=state, seNativeError=fromIntegral native, seErrorMsg=msg}) ----------------------------------------------------------------------------------------- *************** *** 198,201 **** --- 206,210 ---- #if defined(MSSQL_ODBC) sqlSetStmtAttr hSTMT (#const SQL_ATTR_ROW_ARRAY_SIZE) 2 (#const SQL_IS_INTEGER) + sqlSetStmtAttr hSTMT (#const SQL_ATTR_CURSOR_TYPE) (#const SQL_CURSOR_STATIC) (#const SQL_IS_INTEGER) #endif f hSTMT >>= handleResult *************** *** 220,227 **** if count == 0 then do res <- sqlMoreResults hSTMT ! if res == (#const SQL_SUCCESS) ! then moveToFirstResult hSTMT pFIELD ! else return [] else getFieldDefs hSTMT pFIELD 1 count --- 229,241 ---- if count == 0 then do + #if defined(MSSQL_ODBC) + sqlSetStmtAttr hSTMT (#const SQL_ATTR_ROW_ARRAY_SIZE) 2 (#const SQL_IS_INTEGER) + sqlSetStmtAttr hSTMT (#const SQL_ATTR_CURSOR_TYPE) (#const SQL_CURSOR_STATIC) (#const SQL_IS_INTEGER) + #endif res <- sqlMoreResults hSTMT ! handleSqlResult (#const SQL_HANDLE_STMT) hSTMT res ! if res == (#const SQL_NO_DATA) ! then return [] ! else moveToFirstResult hSTMT pFIELD else getFieldDefs hSTMT pFIELD 1 count |
From: <kr_...@us...> - 2005-01-09 10:55:42
|
Update of /cvsroot/htoolkit/HSQL/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30942/src Modified Files: HSQL.hsc Log Message: _WIN32_ instead of WIN32 Index: HSQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL.hsc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** HSQL.hsc 3 Nov 2004 06:15:16 -0000 1.16 --- HSQL.hsc 9 Jan 2005 10:55:31 -0000 1.17 *************** *** 188,192 **** foreign import ccall "stdlib.h atoi" c_atoi :: CString -> IO Int ! #ifdef WIN32 foreign import ccall "stdlib.h _atoi64" c_atoi64 :: CString -> IO Int64 #else --- 188,192 ---- foreign import ccall "stdlib.h atoi" c_atoi :: CString -> IO Int ! #ifdef _WIN32_ foreign import ccall "stdlib.h _atoi64" c_atoi64 :: CString -> IO Int64 #else |
From: <kr_...@us...> - 2004-12-15 14:40:04
|
Update of /cvsroot/htoolkit/HSQL/src/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5700/src/HSQL Modified Files: PostgreSQL.hsc Log Message: Add Filter for dropped columns in describe Index: PostgreSQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/PostgreSQL.hsc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PostgreSQL.hsc 10 Feb 2004 11:30:52 -0000 1.9 --- PostgreSQL.hsc 15 Dec 2004 14:39:56 -0000 1.10 *************** *** 192,196 **** ("select attname, atttypid, atttypmod, attnotnull " ++ "from pg_attribute as cols join pg_class as ts on cols.attrelid=ts.oid " ++ ! "where cols.attnum > 0 and ts.relname='"++table++"'") collectRows getColumnInfo stmt where --- 192,198 ---- ("select attname, atttypid, atttypmod, attnotnull " ++ "from pg_attribute as cols join pg_class as ts on cols.attrelid=ts.oid " ++ ! "where cols.attnum > 0 and ts.relname="++toSqlValue table++ ! " and cols.attisdropped = False ") ! collectRows getColumnInfo stmt where |
From: <kr_...@us...> - 2004-11-06 08:28:31
|
Update of /cvsroot/htoolkit/HSQL/src/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30320/src/HSQL Modified Files: MySQL.hsc Log Message: Partial support for multiple results Index: MySQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/MySQL.hsc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MySQL.hsc 11 Apr 2004 10:06:43 -0000 1.6 --- MySQL.hsc 6 Nov 2004 08:26:15 -0000 1.7 *************** *** 46,54 **** foreign import #{CALLCONV} "HsMySQL.h mysql_init" mysql_init :: MYSQL -> IO MYSQL ! foreign import #{CALLCONV} "HsMySQL.h mysql_real_connect" mysql_real_connect :: MYSQL -> CString -> CString -> CString -> CString -> Int -> CString -> Int -> IO MYSQL foreign import #{CALLCONV} "HsMySQL.h mysql_close" mysql_close :: MYSQL -> IO () ! foreign import #{CALLCONV} "HsMySQL.h mysql_errno" mysql_errno :: MYSQL -> IO Int foreign import #{CALLCONV} "HsMySQL.h mysql_error" mysql_error :: MYSQL -> IO CString ! foreign import #{CALLCONV} "HsMySQL.h mysql_query" mysql_query :: MYSQL -> CString -> IO Int foreign import #{CALLCONV} "HsMySQL.h mysql_use_result" mysql_use_result :: MYSQL -> IO MYSQL_RES foreign import #{CALLCONV} "HsMySQL.h mysql_fetch_field" mysql_fetch_field :: MYSQL_RES -> IO MYSQL_FIELD --- 46,54 ---- foreign import #{CALLCONV} "HsMySQL.h mysql_init" mysql_init :: MYSQL -> IO MYSQL ! foreign import #{CALLCONV} "HsMySQL.h mysql_real_connect" mysql_real_connect :: MYSQL -> CString -> CString -> CString -> CString -> CInt -> CString -> CInt -> IO MYSQL foreign import #{CALLCONV} "HsMySQL.h mysql_close" mysql_close :: MYSQL -> IO () ! foreign import #{CALLCONV} "HsMySQL.h mysql_errno" mysql_errno :: MYSQL -> IO CInt foreign import #{CALLCONV} "HsMySQL.h mysql_error" mysql_error :: MYSQL -> IO CString ! foreign import #{CALLCONV} "HsMySQL.h mysql_query" mysql_query :: MYSQL -> CString -> IO CInt foreign import #{CALLCONV} "HsMySQL.h mysql_use_result" mysql_use_result :: MYSQL -> IO MYSQL_RES foreign import #{CALLCONV} "HsMySQL.h mysql_fetch_field" mysql_fetch_field :: MYSQL_RES -> IO MYSQL_FIELD *************** *** 58,61 **** --- 58,64 ---- foreign import #{CALLCONV} "HsMySQL.h mysql_list_tables" mysql_list_tables :: MYSQL -> CString -> IO MYSQL_RES foreign import #{CALLCONV} "HsMySQL.h mysql_list_fields" mysql_list_fields :: MYSQL -> CString -> CString -> IO MYSQL_RES + foreign import #{CALLCONV} "HsMySQL.h mysql_next_result" mysql_next_result :: MYSQL -> IO CInt + + ----------------------------------------------------------------------------------------- *************** *** 67,71 **** errno <- mysql_errno pMYSQL errMsg <- mysql_error pMYSQL >>= peekCString ! throwDyn (SqlError "" errno errMsg) ----------------------------------------------------------------------------------------- --- 70,74 ---- errno <- mysql_errno pMYSQL errMsg <- mysql_error pMYSQL >>= peekCString ! throwDyn (SqlError "" (fromIntegral errno) errMsg) ----------------------------------------------------------------------------------------- *************** *** 85,89 **** pUser <- newCString user pAuthentication <- newCString authentication ! res <- mysql_real_connect pMYSQL pServer pUser pAuthentication pDatabase 0 nullPtr 0 free pServer free pDatabase --- 88,92 ---- pUser <- newCString user pAuthentication <- newCString authentication ! res <- mysql_real_connect pMYSQL pServer pUser pAuthentication pDatabase 0 nullPtr (#const CLIENT_MULTI_STATEMENTS) free pServer free pDatabase *************** *** 176,181 **** res <- withCString query (mysql_query pMYSQL) when (res /= 0) (handleSqlError pMYSQL) ! pRes <- mysql_use_result pMYSQL withStatement conn pMYSQL pRes fetch :: MYSQL_RES -> MVar (MYSQL_ROW, MYSQL_LENGTHS) -> IO Bool --- 179,195 ---- res <- withCString query (mysql_query pMYSQL) when (res /= 0) (handleSqlError pMYSQL) ! pRes <- getFirstResult pMYSQL withStatement conn pMYSQL pRes + where + getFirstResult :: MYSQL -> IO MYSQL_RES + getFirstResult pMYSQL = do + pRes <- mysql_use_result pMYSQL + if pRes == nullPtr + then do + res <- mysql_next_result pMYSQL + if res == 0 + then getFirstResult pMYSQL + else return nullPtr + else return pRes fetch :: MYSQL_RES -> MVar (MYSQL_ROW, MYSQL_LENGTHS) -> IO Bool |
From: <kr_...@us...> - 2004-11-04 12:50:40
|
Update of /cvsroot/htoolkit/HSQL/src/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19504/src/HSQL Modified Files: HsODBC.h ODBC.hsc Log Message: Workaround for MSSQL driver Index: HsODBC.h =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/HsODBC.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HsODBC.h 26 Jan 2004 12:57:52 -0000 1.2 --- HsODBC.h 4 Nov 2004 12:50:29 -0000 1.3 *************** *** 27,29 **** --- 27,38 ---- #endif + #if defined(_WIN32_) + // By default the MSSQL driver doesn't allow to have multiple + // opened statements in the same time. There is a workaround + // for this but the consequence might be a litle bit slow-down. + // If you don't want to use MSSQL and the performance penalty + // is significant you can try to comment the following line. + #define MSSQL_ODBC + #endif + #endif Index: ODBC.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/ODBC.hsc,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ODBC.hsc 1 Nov 2004 09:55:41 -0000 1.11 --- ODBC.hsc 4 Nov 2004 12:50:29 -0000 1.12 *************** *** 75,78 **** --- 75,81 ---- foreign import #{CALLCONV} "HsODBC.h SQLColumns" sqlColumns :: HSTMT -> CString -> SQLSMALLINT -> CString -> SQLSMALLINT -> CString -> SQLSMALLINT -> CString -> SQLSMALLINT -> IO SQLRETURN foreign import #{CALLCONV} "HsODBC.h SQLMoreResults" sqlMoreResults :: HSTMT -> IO SQLRETURN + #if defined(MSSQL_ODBC) + foreign import #{CALLCONV} "HsODBC.h SQLSetStmtAttr" sqlSetStmtAttr :: HSTMT -> SQLINTEGER -> SQLINTEGER -> SQLINTEGER -> IO SQLRETURN + #endif ----------------------------------------------------------------------------------------- *************** *** 193,196 **** --- 196,202 ---- hSTMT <- (#peek FIELD, hSTMT) pFIELD let handleResult res = handleSqlResult (#const SQL_HANDLE_STMT) hSTMT res + #if defined(MSSQL_ODBC) + sqlSetStmtAttr hSTMT (#const SQL_ATTR_ROW_ARRAY_SIZE) 2 (#const SQL_IS_INTEGER) + #endif f hSTMT >>= handleResult fields <- moveToFirstResult hSTMT pFIELD |
From: <kr_...@us...> - 2004-11-03 06:15:29
|
Update of /cvsroot/htoolkit/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31742 Modified Files: Makefile Log Message: GHC-6.3 compatibility Index: Makefile =================================================================== RCS file: /cvsroot/htoolkit/HSQL/Makefile,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Makefile 29 Jul 2004 16:46:57 -0000 1.16 --- Makefile 3 Nov 2004 06:15:16 -0000 1.17 *************** *** 93,97 **** mkdir -p $(basename $<)_split rm -f $(basename $<)_split/* ! $(GHC) $< -O -c -i$(BUILDDIR) -fglasgow-exts -split-objs $(CPPFLAGS) -package-name hsql $(LD) -r -o $@ $(basename $<)_split/*.o @# create dependency file --- 93,97 ---- mkdir -p $(basename $<)_split rm -f $(basename $<)_split/* ! $(GHC) $< -O -c -i$(BUILDDIR) -fglasgow-exts -split-objs $(CPPFLAGS) -cpp -package-name hsql $(LD) -r -o $@ $(basename $<)_split/*.o @# create dependency file *************** *** 140,144 **** docs : $(HS_PPS) mkdir -p $(DOCDIR) ! $(HADDOCK) -h -o $(DOCDIR) $(HS_PPS) --- 140,144 ---- docs : $(HS_PPS) mkdir -p $(DOCDIR) ! $(HADDOCK) -h -o $(DOCDIR) --html-help=mshelp2 --package=hsql --use-index=doc-index.html --use-contents=index.html --dump-interface=doc/hsql.haddock $(HS_PPS) |
From: <kr_...@us...> - 2004-11-03 06:15:29
|
Update of /cvsroot/htoolkit/HSQL/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31742/src Modified Files: HSQL.hsc Log Message: GHC-6.3 compatibility Index: HSQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL.hsc,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** HSQL.hsc 11 Jun 2004 09:38:04 -0000 1.15 --- HSQL.hsc 3 Nov 2004 06:15:16 -0000 1.16 *************** *** 295,299 **** --- 295,303 ---- (#poke struct tm,tm_isdst) p_tm (-1 :: CInt) t <- mktime p_tm + #if __GLASGOW_HASKELL__ >= 603 + return (TOD (fromIntegral (fromEnum t) + fromIntegral (tz-currTZ)) 0) + #else return (TOD (fromIntegral t + fromIntegral (tz-currTZ)) 0) + #endif foreign import ccall unsafe mktime :: Ptr () -> IO CTime |
From: <kr_...@us...> - 2004-11-03 06:15:29
|
Update of /cvsroot/htoolkit/HSQL/src/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31742/src/HSQL Modified Files: Types.hs Log Message: GHC-6.3 compatibility Index: Types.hs =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/Types.hs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Types.hs 25 Feb 2004 10:47:16 -0000 1.6 --- Types.hs 3 Nov 2004 06:15:16 -0000 1.7 *************** *** 84,93 **** --- 84,98 ---- | SqlUnsupportedOperation | SqlClosedHandle + #ifdef __GLASGOW_HASKELL__ + deriving Typeable + #endif sqlErrorTc :: TyCon sqlErrorTc = mkTyCon "Database.HSQL.SqlError" + #ifndef __GLASGOW_HASKELL__ instance Typeable SqlError where typeOf _ = mkAppTy sqlErrorTc [] + #endif instance Show SqlError where |
From: <kr_...@us...> - 2004-11-01 09:55:51
|
Update of /cvsroot/htoolkit/HSQL/src/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14257 Modified Files: ODBC.hsc Log Message: Limited support for batch queries. Now we can safely execute queries like: insert into T(..) values (..); select @@identity Index: ODBC.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/ODBC.hsc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ODBC.hsc 28 Feb 2004 20:09:50 -0000 1.10 --- ODBC.hsc 1 Nov 2004 09:55:41 -0000 1.11 *************** *** 74,77 **** --- 74,78 ---- foreign import #{CALLCONV} "HsODBC.h SQLTables" sqlTables :: HSTMT -> CString -> SQLSMALLINT -> CString -> SQLSMALLINT -> CString -> SQLSMALLINT -> CString -> SQLSMALLINT -> IO SQLRETURN foreign import #{CALLCONV} "HsODBC.h SQLColumns" sqlColumns :: HSTMT -> CString -> SQLSMALLINT -> CString -> SQLSMALLINT -> CString -> SQLSMALLINT -> CString -> SQLSMALLINT -> IO SQLRETURN + foreign import #{CALLCONV} "HsODBC.h SQLMoreResults" sqlMoreResults :: HSTMT -> IO SQLRETURN ----------------------------------------------------------------------------------------- *************** *** 187,191 **** withStatement :: Connection -> HDBC -> (HSTMT -> IO SQLRETURN) -> IO Statement withStatement connection hDBC f = ! allocaBytes (#const sizeof(FIELD)) $ \pFIELD -> do res <- sqlAllocStmt hDBC ((#ptr FIELD, hSTMT) pFIELD) handleSqlResult (#const SQL_HANDLE_DBC) hDBC res --- 188,192 ---- withStatement :: Connection -> HDBC -> (HSTMT -> IO SQLRETURN) -> IO Statement withStatement connection hDBC f = ! allocaBytes (#const sizeof(FIELD)) $ \pFIELD -> do res <- sqlAllocStmt hDBC ((#ptr FIELD, hSTMT) pFIELD) handleSqlResult (#const SQL_HANDLE_DBC) hDBC res *************** *** 193,199 **** let handleResult res = handleSqlResult (#const SQL_HANDLE_STMT) hSTMT res f hSTMT >>= handleResult ! sqlNumResultCols hSTMT ((#ptr FIELD, fieldsCount) pFIELD) >>= handleResult ! count <- (#peek FIELD, fieldsCount) pFIELD ! fields <- getFieldDefs hSTMT pFIELD 1 count buffer <- mallocBytes (fromIntegral stmtBufferSize) refFalse <- newMVar False --- 194,198 ---- let handleResult res = handleSqlResult (#const SQL_HANDLE_STMT) hSTMT res f hSTMT >>= handleResult ! fields <- moveToFirstResult hSTMT pFIELD buffer <- mallocBytes (fromIntegral stmtBufferSize) refFalse <- newMVar False *************** *** 208,211 **** --- 207,224 ---- return statement where + moveToFirstResult :: HSTMT -> Ptr a -> IO [FieldDef] + moveToFirstResult hSTMT pFIELD = do + res <- sqlNumResultCols hSTMT ((#ptr FIELD, fieldsCount) pFIELD) + handleSqlResult (#const SQL_HANDLE_STMT) hSTMT res + count <- (#peek FIELD, fieldsCount) pFIELD + if count == 0 + then do + res <- sqlMoreResults hSTMT + if res == (#const SQL_SUCCESS) + then moveToFirstResult hSTMT pFIELD + else return [] + else + getFieldDefs hSTMT pFIELD 1 count + getFieldDefs :: HSTMT -> Ptr a -> SQLUSMALLINT -> SQLUSMALLINT -> IO [FieldDef] getFieldDefs hSTMT pFIELD n count |
From: <kr_...@us...> - 2004-09-13 11:12:45
|
Update of /cvsroot/htoolkit/HSQL/src/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25888 Modified Files: SQLite.hsc Log Message: Replace Int with CInt in all FFI calls Index: SQLite.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/SQLite.hsc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SQLite.hsc 10 Feb 2004 11:30:52 -0000 1.2 --- SQLite.hsc 13 Sep 2004 11:12:36 -0000 1.3 *************** *** 28,39 **** type SQLite = Ptr () ! foreign import ccall sqlite_open :: CString -> Int -> Ptr CString -> IO SQLite foreign import ccall sqlite_close :: SQLite -> IO () ! foreign import ccall sqlite_exec :: SQLite -> CString -> FunPtr () -> Ptr () -> Ptr CString -> IO Int ! foreign import ccall sqlite_get_table :: SQLite -> CString -> Ptr (Ptr CString) -> Ptr Int -> Ptr Int -> Ptr CString -> IO Int foreign import ccall sqlite_free_table :: Ptr CString -> IO () foreign import ccall sqlite_freemem :: CString -> IO () ! foreign import ccall "strlen" strlen :: CString -> IO Int ----------------------------------------------------------------------------------------- --- 28,39 ---- type SQLite = Ptr () ! foreign import ccall sqlite_open :: CString -> CInt -> Ptr CString -> IO SQLite foreign import ccall sqlite_close :: SQLite -> IO () ! foreign import ccall sqlite_exec :: SQLite -> CString -> FunPtr () -> Ptr () -> Ptr CString -> IO CInt ! foreign import ccall sqlite_get_table :: SQLite -> CString -> Ptr (Ptr CString) -> Ptr CInt -> Ptr CInt -> Ptr CString -> IO CInt foreign import ccall sqlite_free_table :: Ptr CString -> IO () foreign import ccall sqlite_freemem :: CString -> IO () ! foreign import ccall "strlen" strlen :: CString -> IO CInt ----------------------------------------------------------------------------------------- *************** *** 41,45 **** ----------------------------------------------------------------------------------------- ! handleSqlResult :: Int -> Ptr CString -> IO () handleSqlResult res ppMsg | res == (#const SQLITE_OK) = return () --- 41,45 ---- ----------------------------------------------------------------------------------------- ! handleSqlResult :: CInt -> Ptr CString -> IO () handleSqlResult res ppMsg | res == (#const SQLITE_OK) = return () *************** *** 48,52 **** msg <- peekCString pMsg sqlite_freemem pMsg ! throwDyn (SqlError "E" res msg) ----------------------------------------------------------------------------------------- --- 48,52 ---- msg <- peekCString pMsg sqlite_freemem pMsg ! throwDyn (SqlError "E" (fromIntegral res) msg) ----------------------------------------------------------------------------------------- *************** *** 105,110 **** handleSqlResult res ppMsg pResult <- peek ppResult ! rows <- peek pnRow ! columns <- peek pnColumn defs <- getFieldDefs pResult 0 columns refFalse <- newMVar False --- 105,110 ---- handleSqlResult res ppMsg pResult <- peek ppResult ! rows <- fmap fromIntegral (peek pnRow) ! columns <- fmap fromIntegral (peek pnColumn) defs <- getFieldDefs pResult 0 columns refFalse <- newMVar False *************** *** 153,157 **** else do strLen <- strlen pStr ! mb_value <- f sqlType pStr strLen case mb_value of Just v -> return (Just v) --- 153,157 ---- else do strLen <- strlen pStr ! mb_value <- f sqlType pStr (fromIntegral strLen) case mb_value of Just v -> return (Just v) |
From: <kr_...@us...> - 2004-08-24 12:30:09
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15481/src/cbits/Win32 Modified Files: Util.c Log Message: Bugfix: TranslateMDISysAccel was called in SDI mode instead of in MDI Index: Util.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Util.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** Util.c 15 May 2004 06:45:45 -0000 1.33 --- Util.c 24 Aug 2004 12:29:54 -0000 1.34 *************** *** 310,314 **** while (GetMessage(&msg, NULL, 0, 0) != 0) { ! if ((pFrameData->DocumentInterface != 1 || !TranslateMDISysAccel(pFrameData->hClientWnd, &msg)) && !TranslateAccelerator(pFrameData->hClientWnd, getAccelTableFromMap(pFrameData->pActionsMap), &msg)) { --- 310,314 ---- while (GetMessage(&msg, NULL, 0, 0) != 0) { ! if ((pFrameData->DocumentInterface != 2 || !TranslateMDISysAccel(pFrameData->hClientWnd, &msg)) && !TranslateAccelerator(pFrameData->hClientWnd, getAccelTableFromMap(pFrameData->pActionsMap), &msg)) { |
From: <kr_...@us...> - 2004-08-24 08:15:27
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6226/src/cbits/Win32 Modified Files: Frame.c Log Message: bugfix: MaskBlt works only under WinNT+ so use BitBlt instead Index: Frame.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Frame.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Frame.c 23 Aug 2004 19:45:43 -0000 1.32 --- Frame.c 24 Aug 2004 08:15:12 -0000 1.33 *************** *** 93,96 **** --- 93,173 ---- } + void DrawMenuItemCheck(HDC hdc, ActionHandle action, RECT rcFrame, BOOL bSelected) + { + HBITMAP bmAndObject, bmAndBack, bmAndMem; + HBITMAP bmObjectOld, bmBackOld, bmMemOld; + HDC hdcObj, hdcBack, hdcMem; + POINT ptSize; + RECT rc; + + ptSize.x = rcFrame.right - rcFrame.left; + ptSize.y = rcFrame.bottom - rcFrame.top; + + rc.left = 0; + rc.top = 0; + rc.right = ptSize.x; + rc.bottom= ptSize.y; + + // Create some DCs to hold temporary data. + hdcMem = CreateCompatibleDC(hdc); + hdcBack = CreateCompatibleDC(hdc); + hdcObj = CreateCompatibleDC(hdc); + + // Create a bitmap for each DC. DCs are required for a number of + // GDI functions. + + // Monochrome DC + bmAndObject = CreateBitmap(ptSize.x, ptSize.y, 1, 1, NULL); + bmAndBack = CreateBitmap(ptSize.x, ptSize.y, 1, 1, NULL); + + bmAndMem = CreateCompatibleBitmap(hdc, ptSize.x, ptSize.y); + + // Each DC must select a bitmap object to store pixel data. + bmObjectOld = SelectObject(hdcObj, bmAndObject); + bmBackOld = SelectObject(hdcBack, bmAndBack); + bmMemOld = SelectObject(hdcMem, bmAndMem); + + // Set proper mapping mode. + SetMapMode(hdcObj, GetMapMode(hdc)); + + switch (action->type) + { + case ACTION_CHECK: + DrawFrameControl(hdcObj, &rc, DFC_MENU, DFCS_MENUCHECK); + break; + case ACTION_RADIO: + DrawFrameControl(hdcObj, &rc, DFC_MENU, DFCS_MENUBULLET); + break; + } + + // Create the inverse of the object. + BitBlt(hdcBack, 0, 0, ptSize.x, ptSize.y, hdcObj, 0, 0, NOTSRCCOPY); + + // Copy the background of the main DC to the destination. + BitBlt(hdcMem, 0, 0, ptSize.x, ptSize.y, hdc, rcFrame.left, rcFrame.top, SRCCOPY); + + // Mask out the places where the bitmap will be placed. + BitBlt(hdcMem, 0, 0, ptSize.x, ptSize.y, hdcObj, 0, 0, SRCAND); + + if (bSelected) + { + // XOR the bitmap with the background on the destination DC. + BitBlt(hdcMem, 0, 0, ptSize.x, ptSize.y, hdcBack, 0, 0, SRCPAINT); + } + + // Copy the destination to the screen. + BitBlt(hdc, rcFrame.left, rcFrame.top, ptSize.x, ptSize.y, hdcMem, 0, 0, SRCCOPY); + + // Delete the memory bitmaps. + DeleteObject(SelectObject(hdcMem, bmMemOld)); + DeleteObject(SelectObject(hdcBack, bmBackOld)); + DeleteObject(SelectObject(hdcObj, bmObjectOld)); + + // Delete the memory DCs. + DeleteDC(hdcMem); + DeleteDC(hdcBack); + DeleteDC(hdcObj); + } + void SaveWindowState(HWND hWnd) { *************** *** 324,328 **** { long lDims; ! RECT rcFrame, rcBox, rcFill, rc; POINT pt; WORD wCheckWidth, wCheckHeight; --- 401,405 ---- { long lDims; ! RECT rcFrame, rcBox, rc; POINT pt; WORD wCheckWidth, wCheckHeight; *************** *** 369,382 **** SetBkMode(lpDIS->hDC,TRANSPARENT); ! // Add some spacing before drawing the text and hi-lite ! rcFill.left = lpDIS->rcItem.left; ! rcFill.top = lpDIS->rcItem.top-1; ! rcFill.right = lpDIS->rcItem.right; ! rcFill.bottom= lpDIS->rcItem.bottom; ! ! if ((lpDIS->itemState & ODS_SELECTED) && (lpDIS->itemState & ODS_CHECKED)) ! rcFill.left+=wWidth+Spacing; ! ! FillRect(lpDIS->hDC, &rcFill, hFillBrush); rc = lpDIS->rcItem; --- 446,450 ---- SetBkMode(lpDIS->hDC,TRANSPARENT); ! FillRect(lpDIS->hDC, &lpDIS->rcItem, hFillBrush); rc = lpDIS->rcItem; *************** *** 405,450 **** { if (action->checked) ! { ! HDC hMemDC; ! HBITMAP hBmp; ! RECT rc; ! ! hMemDC = CreateCompatibleDC(lpDIS->hDC); ! hBmp = CreateCompatibleBitmap(hMemDC, ! rcFrame.right-rcFrame.left, rcFrame.bottom-rcFrame.top); ! ! SelectObject(hMemDC, hBmp); ! ! rc.left = 0; ! rc.top = 0; ! rc.right = rcFrame.right-rcFrame.left; ! rc.bottom= rcFrame.bottom-rcFrame.top; ! ! switch (action->type) ! { ! case ACTION_CHECK: ! DrawFrameControl(hMemDC, &rc, DFC_MENU, DFCS_MENUCHECK); ! break; ! case ACTION_RADIO: ! DrawFrameControl(hMemDC, &rc, DFC_MENU, DFCS_MENUBULLET); ! break; ! } ! ! SelectObject(lpDIS->hDC, hFillBrush); ! ! MaskBlt(lpDIS->hDC, ! rcFrame.left, ! rcFrame.top, ! rcFrame.right-rcFrame.left, ! rcFrame.bottom-rcFrame.top, ! hMemDC, ! 0, 0, ! hBmp, ! 0, 0, ! MAKEROP4(SRCAND, (lpDIS->itemState & ODS_SELECTED) ? WHITENESS : BLACKNESS)); ! ! DeleteObject(hBmp); ! DeleteDC(hMemDC); ! } } --- 473,477 ---- { if (action->checked) ! DrawMenuItemCheck(lpDIS->hDC, action, rcFrame, (lpDIS->itemState & ODS_SELECTED)); } |
From: <kr_...@us...> - 2004-08-23 19:46:10
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11907/src/cbits/Win32 Modified Files: ActionsMap.c Frame.c ToolBar.c Log Message: Fixed ActionsMap processing Index: ActionsMap.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ActionsMap.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ActionsMap.c 25 May 2004 20:40:40 -0000 1.2 --- ActionsMap.c 23 Aug 2004 19:45:43 -0000 1.3 *************** *** 105,117 **** { int nHash; ! ActionHandle child, *prev; nHash = (action->id >> 4) % HASH_TABLE_SIZE; prev = &(pMap->HashTable[nHash]); - child = pMap->HashTable[nHash]; ! while (child) { ! if (child == action) { *prev = action->next; --- 105,116 ---- { int nHash; ! ActionHandle *prev; nHash = (action->id >> 4) % HASH_TABLE_SIZE; prev = &(pMap->HashTable[nHash]); ! while (*prev) { ! if (*prev == action) { *prev = action->next; *************** *** 119,124 **** } ! prev = &child->next; ! child = child->next; } --- 118,122 ---- } ! prev = &(*prev)->next; } *************** *** 133,137 **** MenuHandle newMenuHandle(ActionsMap *pMap, MenuHandle parent, int pos, MENU_TYPE type, ActionHandle action) { ! MenuHandle handle, child, *prev; handle = malloc(sizeof(struct MenuHandle)); --- 131,135 ---- MenuHandle newMenuHandle(ActionsMap *pMap, MenuHandle parent, int pos, MENU_TYPE type, ActionHandle action) { ! MenuHandle handle, *prev; handle = malloc(sizeof(struct MenuHandle)); *************** *** 154,187 **** { if (parent) - { - child = parent->children; prev = &parent->children; - } else - { - child = pMap->menus; prev = &pMap->menus; - } } else - { - child = pMap->popupMenus; prev = &pMap->popupMenus; - } if (pos < 0) ! while (child) ! { ! prev = &child->sibling; ! child = child->sibling; ! } else ! while (child && pos > 0) { ! prev = &child->sibling; ! child = child->sibling; pos--; } ! handle->sibling = child; *prev = handle; --- 152,172 ---- { if (parent) prev = &parent->children; else prev = &pMap->menus; } else prev = &pMap->popupMenus; if (pos < 0) ! while (*prev) ! prev = &(*prev)->sibling; else ! while (*prev && pos > 0) { ! prev = &(*prev)->sibling; pos--; } ! handle->sibling = *prev; *prev = handle; *************** *** 191,195 **** void deleteMenuHandle(ActionsMap *pMap, MenuHandle handle) { ! MenuHandle child, *prev; while (handle->children) --- 176,180 ---- void deleteMenuHandle(ActionsMap *pMap, MenuHandle handle) { ! MenuHandle *prev; while (handle->children) *************** *** 199,223 **** { if (handle->parent) - { prev = &handle->parent->children; - child = handle->parent->children; - } else - { prev = &pMap->menus; - child = pMap->menus; - } } else - { prev = &pMap->popupMenus; - child = pMap->popupMenus; - } ! while (child != handle) ! { ! prev = &child->sibling; ! child = child->sibling; ! } *prev = handle->sibling; --- 184,196 ---- { if (handle->parent) prev = &handle->parent->children; else prev = &pMap->menus; } else prev = &pMap->popupMenus; ! while (*prev != handle) ! prev = &(*prev)->sibling; *prev = handle->sibling; *************** *** 225,234 **** { prev = &handle->action->menuProxies; ! child = handle->action->menuProxies; ! while (child != handle) ! { ! prev = &child->nextInAction; ! child = child->nextInAction; ! } *prev = handle->nextInAction; } --- 198,203 ---- { prev = &handle->action->menuProxies; ! while (*prev != handle) ! prev = &(*prev)->nextInAction; *prev = handle->nextInAction; } Index: Frame.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Frame.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Frame.c 25 May 2004 20:52:40 -0000 1.31 --- Frame.c 23 Aug 2004 19:45:43 -0000 1.32 *************** *** 139,144 **** return 0; case WM_DESTROY: - osDestroyAllActions(); - // destroy all popup menus while (pData->pActionsMap->popupMenus) --- 139,142 ---- *************** *** 149,152 **** --- 147,152 ---- osDestroyMenu(pData->pActionsMap->menus); + osDestroyAllActions(); + // clear StatusBar context stack while (pData->statusContexts) Index: ToolBar.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ToolBar.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** ToolBar.c 25 May 2004 21:00:19 -0000 1.24 --- ToolBar.c 23 Aug 2004 19:45:43 -0000 1.25 *************** *** 709,726 **** case WM_DESTROY: { - int i, nButtons; TBBUTTON tbb; ! nButtons = (int) SendMessage(hWnd, TB_BUTTONCOUNT, 0, 0); ! for (i = 0; i < nButtons; i++) ! { ! if (SendMessage(hWnd, TB_GETBUTTON, i, (LPARAM)&tbb) && (tbb.fsStyle & TBSTYLE_SEP) == 0) { ! handleToolDestroy((ToolHandle *) tbb.dwData); ! free((ToolHandle *) tbb.dwData); } - } handleWindowDestroy(hWnd); } --- 709,732 ---- case WM_DESTROY: { TBBUTTON tbb; + while (SendMessage(hWnd, TB_GETBUTTON, 0, (LPARAM)&tbb)) + { + ToolHandle toolItem = (ToolHandle) tbb.dwData; + ToolHandle *prevToolRef; ! handleToolDestroy(toolItem); ! SendMessage(toolItem->hToolBar, TB_DELETEBUTTON, 0, 0); ! ! if (toolItem->action) { ! prevToolRef = &toolItem->action->toolProxies; ! while (*prevToolRef != toolItem) ! prevToolRef = &(*prevToolRef)->nextInAction; ! *prevToolRef = toolItem->nextInAction; } + free(toolItem); + } handleWindowDestroy(hWnd); } *************** *** 900,906 **** for (i = 0; i < nButtons; i++) { ! if (SendMessage(toolItem->hToolBar, TB_GETBUTTON, i, (LPARAM)&tbb) && (tbb.fsStyle & TBSTYLE_SEP) == 0) { ! if (((ToolHandle *) tbb.dwData) == toolItem) return i; } --- 906,912 ---- for (i = 0; i < nButtons; i++) { ! if (SendMessage(toolItem->hToolBar, TB_GETBUTTON, i, (LPARAM)&tbb)) { ! if (((ToolHandle) tbb.dwData) == toolItem) return i; } *************** *** 912,916 **** void osDestroyToolItem(ToolHandle toolItem) { ! ToolHandle prevTool; handleToolDestroy(toolItem); --- 918,922 ---- void osDestroyToolItem(ToolHandle toolItem) { ! ToolHandle *prevToolRef; handleToolDestroy(toolItem); *************** *** 920,930 **** if (toolItem->action) { ! prevTool = toolItem->action->toolProxies; ! while (prevTool->nextInAction != toolItem) ! prevTool = prevTool->nextInAction; ! if (prevTool) ! prevTool->nextInAction = toolItem->nextInAction; ! else ! toolItem->action->toolProxies = toolItem->nextInAction; } --- 926,933 ---- if (toolItem->action) { ! prevToolRef = &toolItem->action->toolProxies; ! while (*prevToolRef != toolItem) ! prevToolRef = &(*prevToolRef)->nextInAction; ! *prevToolRef = toolItem->nextInAction; } |
From: <br...@us...> - 2004-07-29 16:47:12
|
Update of /cvsroot/htoolkit/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9885 Modified Files: Makefile configure.ac Log Message: Fixed --disable-<backend> to not enable that backend. Index: Makefile =================================================================== RCS file: /cvsroot/htoolkit/HSQL/Makefile,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Makefile 11 Apr 2004 16:00:00 -0000 1.15 --- Makefile 29 Jul 2004 16:46:57 -0000 1.16 *************** *** 30,46 **** HSC_SRC += HSQL.hsc ! ifeq "$(WithODBC)" "YES" HSC_SRC += HSQL/ODBC.hsc endif ! ifeq "$(WithPostgreSQL)" "YES" HSC_SRC += HSQL/PostgreSQL.hsc endif ! ifeq "$(WithMySQL)" "YES" HSC_SRC += HSQL/MySQL.hsc endif ! ifeq "$(WithSQLite)" "YES" HSC_SRC += HSQL/SQLite.hsc endif --- 30,46 ---- HSC_SRC += HSQL.hsc ! ifeq "$(WithODBC)" "yes" HSC_SRC += HSQL/ODBC.hsc endif ! ifeq "$(WithPostgreSQL)" "yes" HSC_SRC += HSQL/PostgreSQL.hsc endif ! ifeq "$(WithMySQL)" "yes" HSC_SRC += HSQL/MySQL.hsc endif ! ifeq "$(WithSQLite)" "yes" HSC_SRC += HSQL/SQLite.hsc endif *************** *** 52,57 **** HS_DEPS = $(patsubst %.hs,%.d, $(HS_SRC)) ! ifeq "$(WithODBC)" "YES" ! ifeq "$(WIN32)" "YES" HsODBC_o = $(HOUTDIR)/HSQL/HsODBC.o endif --- 52,57 ---- HS_DEPS = $(patsubst %.hs,%.d, $(HS_SRC)) ! ifeq "$(WithODBC)" "yes" ! ifeq "$(WIN32)" "yes" HsODBC_o = $(HOUTDIR)/HSQL/HsODBC.o endif *************** *** 63,67 **** FFIHUGS_FLAGS = $(patsubst %, +L"%", $(CPPFLAGS)) ! ifeq "$(WIN32)" "YES" ODBC_FFIHUGS_FLAGS = +L"$(HsODBC_o)" FFIHUGS_FLAGS += $(patsubst %, +L"%", $(patsubst -l%, %.lib, $(LDFLAGS))) --- 63,67 ---- FFIHUGS_FLAGS = $(patsubst %, +L"%", $(CPPFLAGS)) ! ifeq "$(WIN32)" "yes" ODBC_FFIHUGS_FLAGS = +L"$(HsODBC_o)" FFIHUGS_FLAGS += $(patsubst %, +L"%", $(patsubst -l%, %.lib, $(LDFLAGS))) *************** *** 118,122 **** done $(AR) -q $(HSQLLib) $(HsODBC_o) ! genclean: distclean rm -rf configure autom4te.cache --- 118,122 ---- done $(AR) -q $(HSQLLib) $(HsODBC_o) ! genclean: distclean rm -rf configure autom4te.cache Index: configure.ac =================================================================== RCS file: /cvsroot/htoolkit/HSQL/configure.ac,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** configure.ac 26 Apr 2004 16:28:40 -0000 1.18 --- configure.ac 29 Jul 2004 16:46:57 -0000 1.19 *************** *** 9,17 **** dnl *********************************************** AC_ARG_ENABLE(odbc, ! [ --enable-odbc ! Build an ODBC binding for Haskell. ! ], ! [WithODBC=YES], ! [WithODBC=NO] ) AC_SUBST(WithODBC) --- 9,16 ---- dnl *********************************************** AC_ARG_ENABLE(odbc, ! AC_HELP_STRING([--enable-odbc], ! [Build the HSQL ODBC binding. (default=no)]), ! [WithODBC="$enableval"], ! [WithODBC=no] ) AC_SUBST(WithODBC) *************** *** 21,29 **** dnl *********************************************** AC_ARG_ENABLE(postgres, ! [ --enable-postgres ! Build a PostgreSQL binding for Haskell. ! ], ! [WithPostgreSQL=YES], ! [WithPostgreSQL=NO] ) AC_SUBST(WithPostgreSQL) --- 20,27 ---- dnl *********************************************** AC_ARG_ENABLE(postgres, ! AC_HELP_STRING([--enable-postgres], ! [Build the HSQL PostgreSQL binding. (default=no)]), ! [WithPostgreSQL="$enableval"], ! [WithPostgreSQL=no] ) AC_SUBST(WithPostgreSQL) *************** *** 33,41 **** dnl *********************************************** AC_ARG_ENABLE(mysql, ! [ --enable-mysql ! Build a MySQL binding for Haskell. ! ], ! [WithMySQL=YES], ! [WithMySQL=NO] ) AC_SUBST(WithMySQL) --- 31,38 ---- dnl *********************************************** AC_ARG_ENABLE(mysql, ! AC_HELP_STRING([--enable-mysql], ! [Build the HSQL MySQL binding. (default=no)]), ! [WithMySQL="$enableval"], ! [WithMySQL=no] ) AC_SUBST(WithMySQL) *************** *** 45,53 **** dnl *********************************************** AC_ARG_ENABLE(sqlite, ! [ --enable-sqlite ! Build a SQLite binding for Haskell. ! ], ! [WithSQLite=YES], ! [WithSQLite=NO] ) AC_SUBST(WithSQLite) --- 42,49 ---- dnl *********************************************** AC_ARG_ENABLE(sqlite, ! AC_HELP_STRING([--enable-sqlite], ! [Build the HSQL SQLite binding. (default=no)]), ! [WithSQLite="$enableval"], ! [WithSQLite=no] ) AC_SUBST(WithSQLite) *************** *** 208,214 **** ac_includes_default="$ac_includes_default #include <windows.h>" ! WIN32=YES ;; ! *) WIN32=NO ;; esac --- 204,210 ---- ac_includes_default="$ac_includes_default #include <windows.h>" ! WIN32=yes ;; ! *) WIN32=no ;; esac *************** *** 221,228 **** ! if test $WithODBC = YES; then AC_CHECK_HEADER(sqlext.h,,AC_MSG_ERROR([sqlext.h and libodbc required to build ODBC building.])) case $WIN32 in ! YES) AC_COMPILE_IFELSE( [ --- 217,224 ---- ! if test $WithODBC = yes; then AC_CHECK_HEADER(sqlext.h,,AC_MSG_ERROR([sqlext.h and libodbc required to build ODBC building.])) case $WIN32 in ! yes) AC_COMPILE_IFELSE( [ *************** *** 239,243 **** AC_MSG_ERROR([sqlext.h and libodbc required to build ODBC building.])) ;; ! NO) AC_CHECK_LIB(odbc,SQLAllocEnv,,AC_MSG_ERROR([sqlext.h and libodbc required to build ODBC building.])) ;; --- 235,239 ---- AC_MSG_ERROR([sqlext.h and libodbc required to build ODBC building.])) ;; ! no) AC_CHECK_LIB(odbc,SQLAllocEnv,,AC_MSG_ERROR([sqlext.h and libodbc required to build ODBC building.])) ;; *************** *** 251,256 **** dnl *********************************************** ! if test $WithPostgreSQL = YES; then ! if test $WIN32 = NO; then AC_PATH_PROG(PG_CONFIG, pg_config) --- 247,252 ---- dnl *********************************************** ! if test $WithPostgreSQL = yes; then ! if test $WIN32 = no; then AC_PATH_PROG(PG_CONFIG, pg_config) *************** *** 279,284 **** case $WIN32 in ! YES) AC_CHECK_LIB(libpq,PQsetdbLogin,,AC_MSG_ERROR([liblibpq.a library not found]));; ! NO) AC_CHECK_LIB(pq, PQsetdbLogin,,AC_MSG_ERROR([libpq.a library not found]));; esac fi --- 275,280 ---- case $WIN32 in ! yes) AC_CHECK_LIB(libpq,PQsetdbLogin,,AC_MSG_ERROR([liblibpq.a library not found]));; ! no) AC_CHECK_LIB(pq, PQsetdbLogin,,AC_MSG_ERROR([libpq.a library not found]));; esac fi *************** *** 288,293 **** dnl *********************************************** ! if test $WithMySQL = YES; then ! if test $WIN32 = NO; then AC_PATH_PROG(MYSQL_CONFIG, mysql_config) --- 284,289 ---- dnl *********************************************** ! if test $WithMySQL = yes; then ! if test $WIN32 = no; then AC_PATH_PROG(MYSQL_CONFIG, mysql_config) *************** *** 310,314 **** case $WIN32 in ! YES) AC_COMPILE_IFELSE( [ --- 306,310 ---- case $WIN32 in ! yes) AC_COMPILE_IFELSE( [ *************** *** 325,329 **** AC_MSG_ERROR([liblibmysql.a library not found])) ;; ! NO) AC_CHECK_LIB(mysqlclient,mysql_init,,AC_MSG_ERROR([libmysql.a library not found])) ;; --- 321,325 ---- AC_MSG_ERROR([liblibmysql.a library not found])) ;; ! no) AC_CHECK_LIB(mysqlclient,mysql_init,,AC_MSG_ERROR([libmysql.a library not found])) ;; *************** *** 337,341 **** dnl *********************************************** ! if test $WithSQLite = YES; then AC_CHECK_HEADER(sqlite.h,, AC_MSG_ERROR([sqlite.h header not found])) AC_CHECK_LIB(sqlite,sqlite_open,,AC_MSG_ERROR([sqlite.h and libsqlite required to build SQLite building.])) --- 333,337 ---- dnl *********************************************** ! if test $WithSQLite = yes; then AC_CHECK_HEADER(sqlite.h,, AC_MSG_ERROR([sqlite.h header not found])) AC_CHECK_LIB(sqlite,sqlite_open,,AC_MSG_ERROR([sqlite.h and libsqlite required to build SQLite building.])) |
From: <kr_...@us...> - 2004-06-12 16:57:38
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17418/src/cbits/GTK Modified Files: Frame.c Log Message: bugfix Index: Frame.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Frame.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Frame.c 8 May 2004 09:21:09 -0000 1.14 --- Frame.c 12 Jun 2004 16:57:29 -0000 1.15 *************** *** 65,69 **** static void frame_destroy_handler(GtkWidget *widget, GdkEvent *event, gpointer user_data) { - handleProcessDestroy(); if (gDocumentInterface == 1) free(gWindowName); --- 65,68 ---- |
From: <br...@us...> - 2004-06-11 09:38:22
|
Update of /cvsroot/htoolkit/HSQL/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17340/src Modified Files: HSQL.hsc Log Message: Allow converting SqlText values to numeric and date values to support SQLite which reports the types of all columns as SqlText. Index: HSQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL.hsc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** HSQL.hsc 31 May 2004 12:30:15 -0000 1.14 --- HSQL.hsc 11 Jun 2004 09:38:04 -0000 1.15 *************** *** 211,214 **** --- 211,215 ---- fromSqlValue SqlBigInt s = Just (read s) fromSqlValue SqlDouble s = Just (truncate (read s :: Double)) + fromSqlValue SqlText s = Just (read s) fromSqlValue _ _ = Nothing *************** *** 235,238 **** --- 236,240 ---- fromSqlValue SqlBigInt s = Just (read s) fromSqlValue SqlDouble s = Just (truncate (read s :: Double)) + fromSqlValue SqlText s = Just (read s) fromSqlValue _ s = Nothing *************** *** 246,249 **** --- 248,252 ---- fromSqlValue SqlBigInt s = Just (read s) fromSqlValue SqlDouble s = Just (truncate (read s :: Double)) + fromSqlValue SqlText s = Just (read s) fromSqlValue _ _ = Nothing *************** *** 275,278 **** --- 278,282 ---- fromSqlValue SqlReal s = Just (read s) fromSqlValue SqlFloat s = Just (read s) + fromSqlValue SqlText s = Just (read s) fromSqlValue _ _ = Nothing *************** *** 304,307 **** --- 308,336 ---- f_read f s = case readP_to_S f s of {[(x,_)] -> Just x} + readHMS :: ReadP (Int, Int, Int) + readHMS = do + hour <- readDecP + char ':' + minutes <- readDecP + char ':' + seconds <- readDecP + return (hour, minutes, seconds) + + readYMD :: ReadP (Int, Int, Int) + readYMD = do + year <- readDecP + char '-' + month <- readDecP + char '-' + day <- readDecP + return (year, month, day) + + readDateTime :: ReadP (Int, Int, Int, Int, Int, Int) + readDateTime = do + (year, month, day) <- readYMD + skipSpaces + (hour, minutes, seconds) <- readHMS + return (year, month, day, hour, minutes, seconds) + instance SqlBind ClockTime where fromSqlValue SqlTimeTZ s = f_read getTimeTZ s *************** *** 309,320 **** getTimeTZ :: ReadP ClockTime getTimeTZ = do ! hour <- readDecP ! char ':' ! minutes <- readDecP ! char ':' ! seconds <- readDecP ! (char '.' >> readDecP) `mplus` (return 0) ! tz <- parseTZ ! return (mkClockTime 1970 1 1 hour minutes seconds (tz*3600)) fromSqlValue SqlTime s = f_read getTime s --- 338,345 ---- getTimeTZ :: ReadP ClockTime getTimeTZ = do ! (hour, minutes, seconds) <- readHMS ! (char '.' >> readDecP) `mplus` (return 0) ! tz <- parseTZ ! return (mkClockTime 1970 1 1 hour minutes seconds (tz*3600)) fromSqlValue SqlTime s = f_read getTime s *************** *** 322,331 **** getTime :: ReadP ClockTime getTime = do ! hour <- readDecP ! char ':' ! minutes <- readDecP ! char ':' ! seconds <- readDecP ! return (mkClockTime 1970 1 1 hour minutes seconds currTZ) fromSqlValue SqlDate s = f_read getDate s --- 347,352 ---- getTime :: ReadP ClockTime getTime = do ! (hour, minutes, seconds) <- readHMS ! return (mkClockTime 1970 1 1 hour minutes seconds currTZ) fromSqlValue SqlDate s = f_read getDate s *************** *** 333,342 **** getDate :: ReadP ClockTime getDate = do ! year <- readDecP ! char '-' ! month <- readDecP ! char '-' ! day <- readDecP ! return (mkClockTime year month day 0 0 0 currTZ) fromSqlValue SqlDateTimeTZ s = f_read getDateTimeTZ s --- 354,359 ---- getDate :: ReadP ClockTime getDate = do ! (year, month, day) <- readYMD ! return (mkClockTime year month day 0 0 0 currTZ) fromSqlValue SqlDateTimeTZ s = f_read getDateTimeTZ s *************** *** 344,358 **** getDateTimeTZ :: ReadP ClockTime getDateTimeTZ = do ! year <- readDecP ! char '-' ! month <- readDecP ! char '-' ! day <- readDecP ! skipSpaces ! hour <- readDecP ! char ':' ! minutes <- readDecP ! char ':' ! seconds <- readDecP char '.' >> readDecP -- ) `mplus` (return 0) tz <- parseTZ --- 361,365 ---- getDateTimeTZ :: ReadP ClockTime getDateTimeTZ = do ! (year, month, day, hour, minutes, seconds) <- readDateTime char '.' >> readDecP -- ) `mplus` (return 0) tz <- parseTZ *************** *** 362,380 **** -- to be the MySQL driver. MySQL (at least 4.1) uses the same format for datetime and -- timestamp columns. ! fromSqlValue t s | t == SqlDateTime || t == SqlTimeStamp = f_read getDateTime s where getDateTime :: ReadP ClockTime getDateTime = do ! year <- readDecP ! char '-' ! month <- readDecP ! char '-' ! day <- readDecP ! skipSpaces ! hour <- readDecP ! char ':' ! minutes <- readDecP ! char ':' ! seconds <- readDecP return (mkClockTime year month day hour minutes seconds currTZ) --- 369,378 ---- -- to be the MySQL driver. MySQL (at least 4.1) uses the same format for datetime and -- timestamp columns. ! -- Allow SqlText to support SQLite, which reports everything as SqlText ! fromSqlValue t s | t == SqlDateTime || t == SqlTimeStamp || t == SqlText = f_read getDateTime s where getDateTime :: ReadP ClockTime getDateTime = do ! (year, month, day, hour, minutes, seconds) <- readDateTime return (mkClockTime year month day hour minutes seconds currTZ) |