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...> - 2004-04-11 16:21:45
|
Update of /cvsroot/htoolkit/HSQL/RPM In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7001/RPM Log Message: Directory /cvsroot/htoolkit/HSQL/RPM added to the repository |
From: <kr_...@us...> - 2004-04-11 16:13:40
|
Update of /cvsroot/htoolkit/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5070 Modified Files: Makefile config.mk.in configure.ac Log Message: The previous version of HSQL was installed in the GHC/Hugs directory. The new version will be installed in separated directory. This simplifies creation of binary installations. Index: Makefile =================================================================== RCS file: /cvsroot/htoolkit/HSQL/Makefile,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Makefile 10 Apr 2004 17:58:42 -0000 1.14 --- Makefile 11 Apr 2004 16:00:00 -0000 1.15 *************** *** 146,151 **** install-ghc: $(HSQLLib) $(HI_SRC) docs $(INSTALL) $(HSQLLib) $(GHC_DIR)/libHSsql.a - $(INSTALL) -d $(GHC_DIR)/imports/Database for i in $(patsubst $(BUILDDIR)/%,%,$(HI_SRC)); do \ $(INSTALL) -d $(GHC_DIR)/imports/`dirname $$i`; \ --- 146,151 ---- install-ghc: $(HSQLLib) $(HI_SRC) docs + $(INSTALL) -d $(GHC_DIR) $(INSTALL) $(HSQLLib) $(GHC_DIR)/libHSsql.a for i in $(patsubst $(BUILDDIR)/%,%,$(HI_SRC)); do \ $(INSTALL) -d $(GHC_DIR)/imports/`dirname $$i`; \ *************** *** 155,160 **** $(GHC_PKG) -u -g -i hsql.pkg if test -f $(DOCDIR)/index.html; then \ ! $(INSTALL) -d $(GHC_DIR)/doc/html/libraries/hsql; \ ! $(INSTALL) -c $(DOCDIR)/* $(GHC_DIR)/doc/html/libraries/hsql; \ fi --- 155,160 ---- $(GHC_PKG) -u -g -i hsql.pkg if test -f $(DOCDIR)/index.html; then \ ! $(INSTALL) -d $(DOC_DIR); \ ! $(INSTALL) -c $(DOCDIR)/* $(DOC_DIR); \ fi Index: config.mk.in =================================================================== RCS file: /cvsroot/htoolkit/HSQL/config.mk.in,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** config.mk.in 26 Jan 2004 13:02:02 -0000 1.3 --- config.mk.in 11 Apr 2004 16:00:00 -0000 1.4 *************** *** 1,26 **** ! WithODBC=@WithODBC@ ! WithPostgreSQL=@WithPostgreSQL@ ! WithMySQL=@WithMySQL@ ! WithSQLite=@WithSQLite@ ! ! SO_EXT = @SO_EXT@ ! ! WIN32=@WIN32@ ! ! AR = @AR@ ! LD = @LD@ ! INSTALL = @INSTALL@ ! ! CPPFLAGS = @CPPFLAGS@ ! LDFLAGS = @LDFLAGS@ ! ! HSC2HS = @HSC2HS@ ! HADDOCK = @HADDOCK@ ! ! GHC = @GHC@ ! GHC_DIR = @GHC_DIR@ ! GHC_PKG = @GHC_PKG@ ! ! HUGS = @HUGS@ ! HUGS_DIR = @HUGS_DIR@ ! FFIHUGS = @FFIHUGS@ --- 1,28 ---- ! WithODBC=@WithODBC@ ! WithPostgreSQL=@WithPostgreSQL@ ! WithMySQL=@WithMySQL@ ! WithSQLite=@WithSQLite@ ! ! SO_EXT = @SO_EXT@ ! ! WIN32=@WIN32@ ! ! AR = @AR@ ! LD = @LD@ ! INSTALL = @INSTALL@ ! ! CPPFLAGS = @CPPFLAGS@ ! LDFLAGS = @LDFLAGS@ ! ! HSC2HS = @HSC2HS@ ! ! HADDOCK = @HADDOCK@ ! DOC_DIR = @DOC_DIR@ ! ! GHC = @GHC@ ! GHC_DIR = @GHC_DIR@ ! GHC_PKG = @GHC_PKG@ ! ! HUGS = @HUGS@ ! HUGS_DIR = @HUGS_DIR@ ! FFIHUGS = @FFIHUGS@ Index: configure.ac =================================================================== RCS file: /cvsroot/htoolkit/HSQL/configure.ac,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** configure.ac 10 Apr 2004 17:58:42 -0000 1.15 --- configure.ac 11 Apr 2004 16:00:00 -0000 1.16 *************** *** 69,93 **** fi ! AC_SUBST(GHC) ! ! dnl *********************************************** ! dnl GHC directory ! dnl *********************************************** ! AC_ARG_WITH(ghc-dir, ! [ --with-ghc-dir=<ghc directory> ! Install GHC libraries in the given GHC directory (default is "ghc --print-libdir") ! ], ! [GHC_DIR="$withval"], ! [if test "$GHC" != ""; then ! GHC_DIR=`$GHC --print-libdir` ! fi] ! ) ! ! if test "$GHC" != ""; then ! if test "$GHC_DIR" = "" || test ! -d $GHC_DIR; then ! AC_MSG_ERROR([GHC_DIR $GHC_DIR does not exist]) ! fi fi AC_SUBST(GHC_DIR) --- 69,79 ---- fi ! if test "x$prefix" != xNONE; then ! GHC_DIR="$prefix/lib/HSQL/GHC" ! else ! GHC_DIR="$ac_default_prefix/lib/HSQL/Hugs" fi + AC_SUBST(GHC) AC_SUBST(GHC_DIR) *************** *** 142,145 **** --- 128,137 ---- fi + if test "x$prefix" != xNONE; then + HUGS_DIR="$prefix/lib/HSQL/Hugs" + else + HUGS_DIR="$ac_default_prefix/lib/HSQL/Hugs" + fi + case $ac_cv_target_alias in i[[3456]]86-*-cygwin*|i[[3456]]86-*-mingw32*) *************** *** 149,178 **** AC_SUBST(HUGS) - AC_SUBST(SO_EXT) - - dnl *********************************************** - dnl Hugs directory - dnl *********************************************** - AC_ARG_WITH(hugs-dir, - [ --with-hugs-dir=<hugs directory> - Install Hugs libraries in the given Hugs directory (default is the Hugs libraries directory) - ], - [HUGS_DIR="$withval"], - [if test "$HUGS" != ""; then - case $ac_cv_target_alias in - i[[3456]]86-*-cygwin*|i[[3456]]86-*-mingw32*) - HUGS_DIR=$(dirname $HUGS);; - *) HUGS_DIR=$(dirname $HUGS)/../lib/hugs;; - esac - fi] - ) - - if test "$HUGS" != ""; then - if test "$HUGS_DIR" = "" || test ! -d $HUGS_DIR; then - AC_MSG_ERROR([HUGS_DIR $HUGS_DIR does not exist]) - fi - fi - AC_SUBST(HUGS_DIR) dnl *********************************************** --- 141,146 ---- AC_SUBST(HUGS) AC_SUBST(HUGS_DIR) + AC_SUBST(SO_EXT) dnl *********************************************** *************** *** 210,214 **** --- 178,189 ---- fi + if test "x$prefix" != xNONE; then + DOC_DIR="$prefix/doc/HSQL" + else + DOC_DIR="$ac_default_prefix/doc/HSQL" + fi + AC_SUBST(HADDOCK) + AC_SUBST(DOC_DIR) dnl *********************************************** *************** *** 351,355 **** ;; NO) ! AC_CHECK_LIB(mysql,mysql_init,,AC_MSG_ERROR([libmysql.a library not found])) ;; esac --- 326,330 ---- ;; NO) ! AC_CHECK_LIB(mysqlclient,mysql_init,,AC_MSG_ERROR([libmysql.a library not found])) ;; esac |
From: <kr_...@us...> - 2004-04-11 10:20:21
|
Update of /cvsroot/htoolkit/HSQL/src/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5791/src/HSQL Modified Files: MySQL.hsc Log Message: Remove the include of windows.h it is required only under Windows and is really included from HsMySQL.h Index: MySQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/MySQL.hsc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MySQL.hsc 9 Apr 2004 20:24:05 -0000 1.5 --- MySQL.hsc 11 Apr 2004 10:06:43 -0000 1.6 *************** *** 1,218 **** ! ----------------------------------------------------------------------------------------- ! {-| Module : Database.HSQL.MySQL ! Copyright : (c) Krasimir Angelov 2003 ! License : BSD-style ! ! Maintainer : ka2...@ya... ! Stability : provisional ! Portability : portable ! ! The module provides interface to MySQL database ! -} ! ----------------------------------------------------------------------------------------- ! ! #include <config.h> ! ! module Database.HSQL.MySQL(connect, module Database.HSQL) where ! ! import Database.HSQL ! import Database.HSQL.Types ! import Data.Dynamic ! import Data.Bits ! import Data.Char ! import Foreign ! import Foreign.C ! import Control.Monad(when,unless) ! import Control.Exception (throwDyn, finally) import Control.Concurrent.MVar ! import System.Time ! import System.IO.Unsafe ! import Text.ParserCombinators.ReadP ! import Text.Read ! ! #include <windows.h> ! #include <HsMySQL.h> ! ! type MYSQL = Ptr () ! type MYSQL_RES = Ptr () ! type MYSQL_FIELD = Ptr () ! type MYSQL_ROW = Ptr CString ! type MYSQL_LENGTHS = Ptr CULong ! ! #if defined(_WIN32_) ! #let CALLCONV = "stdcall" ! #else ! #let CALLCONV = "ccall" ! #endif ! ! 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 ! foreign import #{CALLCONV} "HsMySQL.h mysql_free_result" mysql_free_result :: MYSQL_RES -> IO () ! foreign import #{CALLCONV} "HsMySQL.h mysql_fetch_row" mysql_fetch_row :: MYSQL_RES -> IO MYSQL_ROW ! foreign import #{CALLCONV} "HsMySQL.h mysql_fetch_lengths" mysql_fetch_lengths :: MYSQL_RES -> IO MYSQL_LENGTHS ! 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 ! ! ----------------------------------------------------------------------------------------- ! -- routines for handling exceptions ! ----------------------------------------------------------------------------------------- ! ! handleSqlError :: MYSQL -> IO a ! handleSqlError pMYSQL = do ! errno <- mysql_errno pMYSQL ! errMsg <- mysql_error pMYSQL >>= peekCString ! throwDyn (SqlError "" errno errMsg) ! ! ----------------------------------------------------------------------------------------- ! -- Connect/Disconnect ! ----------------------------------------------------------------------------------------- ! ! -- | Makes a new connection to the database server. ! connect :: String -- ^ Server name ! -> String -- ^ Database name ! -> String -- ^ User identifier ! -> String -- ^ Authentication string (password) ! -> IO Connection ! connect server database user authentication = do ! pMYSQL <- mysql_init nullPtr ! pServer <- newCString server ! pDatabase <- newCString database ! pUser <- newCString user ! pAuthentication <- newCString authentication ! res <- mysql_real_connect pMYSQL pServer pUser pAuthentication pDatabase 0 nullPtr 0 ! free pServer ! free pDatabase ! free pUser ! free pAuthentication ! when (res == nullPtr) (handleSqlError pMYSQL) ! refFalse <- newMVar False ! let connection = Connection ! { connDisconnect = mysql_close pMYSQL ! , connExecute = execute pMYSQL ! , connQuery = query connection pMYSQL ! , connTables = tables connection pMYSQL ! , connDescribe = describe connection pMYSQL ! , connBeginTransaction = execute pMYSQL "begin" ! , connCommitTransaction = execute pMYSQL "commit" ! , connRollbackTransaction = execute pMYSQL "rollback" ! , connClosed = refFalse ! } ! return connection ! where ! execute :: MYSQL -> String -> IO () ! execute pMYSQL query = do ! res <- withCString query (mysql_query pMYSQL) ! when (res /= 0) (handleSqlError pMYSQL) ! ! withStatement :: Connection -> MYSQL -> MYSQL_RES -> IO Statement ! withStatement conn pMYSQL pRes = do ! currRow <- newMVar (nullPtr, nullPtr) ! refFalse <- newMVar False ! if (pRes == nullPtr) ! then do ! errno <- mysql_errno pMYSQL ! when (errno /= 0) (handleSqlError pMYSQL) ! return (Statement ! { stmtConn = conn ! , stmtClose = return () ! , stmtFetch = fetch pRes currRow ! , stmtGetCol = getColValue currRow ! , stmtFields = [] ! , stmtClosed = refFalse ! }) ! else do ! fieldDefs <- getFieldDefs pRes ! return (Statement ! { stmtConn = conn ! , stmtClose = mysql_free_result pRes ! , stmtFetch = fetch pRes currRow ! , stmtGetCol = getColValue currRow ! , stmtFields = fieldDefs ! , stmtClosed = refFalse ! }) ! where ! getFieldDefs pRes = do ! pField <- mysql_fetch_field pRes ! if pField == nullPtr ! then return [] ! else do ! name <- (#peek MYSQL_FIELD, name) pField >>= peekCString ! (dataType :: Int) <- (#peek MYSQL_FIELD, type) pField ! (columnSize :: Int) <- (#peek MYSQL_FIELD, length) pField ! (flags :: Int) <- (#peek MYSQL_FIELD, flags) pField ! (decimalDigits :: Int) <- (#peek MYSQL_FIELD, decimals) pField ! let sqlType = mkSqlType dataType columnSize decimalDigits ! defs <- getFieldDefs pRes ! return ((name,sqlType,(flags .&. (#const NOT_NULL_FLAG)) == 0):defs) ! ! mkSqlType :: Int -> Int -> Int -> SqlType ! mkSqlType (#const FIELD_TYPE_STRING) size _ = SqlChar size ! mkSqlType (#const FIELD_TYPE_VAR_STRING) size _ = SqlVarChar size ! mkSqlType (#const FIELD_TYPE_DECIMAL) size prec = SqlNumeric size prec ! mkSqlType (#const FIELD_TYPE_SHORT) _ _ = SqlSmallInt ! mkSqlType (#const FIELD_TYPE_INT24) _ _ = SqlMedInt ! mkSqlType (#const FIELD_TYPE_LONG) _ _ = SqlInteger ! mkSqlType (#const FIELD_TYPE_FLOAT) _ _ = SqlReal ! mkSqlType (#const FIELD_TYPE_DOUBLE) _ _ = SqlDouble ! mkSqlType (#const FIELD_TYPE_TINY) _ _ = SqlTinyInt ! mkSqlType (#const FIELD_TYPE_LONGLONG) _ _ = SqlBigInt ! mkSqlType (#const FIELD_TYPE_DATE) _ _ = SqlDate ! mkSqlType (#const FIELD_TYPE_TIME) _ _ = SqlTime ! mkSqlType (#const FIELD_TYPE_TIMESTAMP) _ _ = SqlTimeStamp ! mkSqlType (#const FIELD_TYPE_DATETIME) _ _ = SqlDateTime ! mkSqlType (#const FIELD_TYPE_YEAR) _ _ = SqlYear ! mkSqlType (#const FIELD_TYPE_BLOB) _ _ = SqlBLOB ! mkSqlType (#const FIELD_TYPE_SET) _ _ = SqlSET ! mkSqlType (#const FIELD_TYPE_ENUM) _ _ = SqlENUM ! mkSqlType tp _ _ = SqlUnknown tp ! ! query :: Connection -> MYSQL -> String -> IO Statement ! query conn pMYSQL query = do ! 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 ! fetch pRes currRow ! | pRes == nullPtr = return False ! | otherwise = modifyMVar currRow $ \(pRow, pLengths) -> do ! pRow <- mysql_fetch_row pRes ! pLengths <- mysql_fetch_lengths pRes ! return ((pRow, pLengths), pRow /= nullPtr) ! ! getColValue :: MVar (MYSQL_ROW, MYSQL_LENGTHS) -> Int -> FieldDef -> (SqlType -> CString -> Int -> IO (Maybe a)) -> IO (Maybe a) ! getColValue currRow colNumber (name,sqlType,nullable) f = do ! (row, lengths) <- readMVar currRow ! pValue <- peekElemOff row colNumber ! len <- fmap fromIntegral (peekElemOff lengths colNumber) ! if pValue == nullPtr ! then return Nothing ! else do ! mv <- f sqlType pValue len ! case mv of ! Just v -> return (Just v) ! Nothing -> throwDyn (SqlBadTypeCast name sqlType) ! ! tables :: Connection -> MYSQL -> IO [String] ! tables conn pMYSQL = do ! pRes <- mysql_list_tables pMYSQL nullPtr ! stmt <- withStatement conn pMYSQL pRes ! -- SQLTables returns: ! -- Column name # Type ! -- Tables_in_xx 0 VARCHAR ! collectRows (\stmt -> do ! mb_v <- stmtGetCol stmt 0 ("Tables", SqlVarChar 0, False) fromNonNullSqlCStringLen ! return (case mb_v of { Nothing -> ""; Just a -> a })) stmt ! ! describe :: Connection -> MYSQL -> String -> IO [FieldDef] ! describe conn pMYSQL table = do ! pRes <- withCString table (\table -> mysql_list_fields pMYSQL table nullPtr) ! stmt <- withStatement conn pMYSQL pRes ! return (getFieldsTypes stmt) --- 1,217 ---- ! ----------------------------------------------------------------------------------------- ! {-| Module : Database.HSQL.MySQL ! Copyright : (c) Krasimir Angelov 2003 ! License : BSD-style ! ! Maintainer : ka2...@ya... ! Stability : provisional ! Portability : portable ! ! The module provides interface to MySQL database ! -} ! ----------------------------------------------------------------------------------------- ! ! #include <config.h> ! ! module Database.HSQL.MySQL(connect, module Database.HSQL) where ! ! import Database.HSQL ! import Database.HSQL.Types ! import Data.Dynamic ! import Data.Bits ! import Data.Char ! import Foreign ! import Foreign.C ! import Control.Monad(when,unless) ! import Control.Exception (throwDyn, finally) import Control.Concurrent.MVar ! import System.Time ! import System.IO.Unsafe ! import Text.ParserCombinators.ReadP ! import Text.Read ! ! #include <HsMySQL.h> ! ! type MYSQL = Ptr () ! type MYSQL_RES = Ptr () ! type MYSQL_FIELD = Ptr () ! type MYSQL_ROW = Ptr CString ! type MYSQL_LENGTHS = Ptr CULong ! ! #if defined(_WIN32_) ! #let CALLCONV = "stdcall" ! #else ! #let CALLCONV = "ccall" ! #endif ! ! 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 ! foreign import #{CALLCONV} "HsMySQL.h mysql_free_result" mysql_free_result :: MYSQL_RES -> IO () ! foreign import #{CALLCONV} "HsMySQL.h mysql_fetch_row" mysql_fetch_row :: MYSQL_RES -> IO MYSQL_ROW ! foreign import #{CALLCONV} "HsMySQL.h mysql_fetch_lengths" mysql_fetch_lengths :: MYSQL_RES -> IO MYSQL_LENGTHS ! 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 ! ! ----------------------------------------------------------------------------------------- ! -- routines for handling exceptions ! ----------------------------------------------------------------------------------------- ! ! handleSqlError :: MYSQL -> IO a ! handleSqlError pMYSQL = do ! errno <- mysql_errno pMYSQL ! errMsg <- mysql_error pMYSQL >>= peekCString ! throwDyn (SqlError "" errno errMsg) ! ! ----------------------------------------------------------------------------------------- ! -- Connect/Disconnect ! ----------------------------------------------------------------------------------------- ! ! -- | Makes a new connection to the database server. ! connect :: String -- ^ Server name ! -> String -- ^ Database name ! -> String -- ^ User identifier ! -> String -- ^ Authentication string (password) ! -> IO Connection ! connect server database user authentication = do ! pMYSQL <- mysql_init nullPtr ! pServer <- newCString server ! pDatabase <- newCString database ! pUser <- newCString user ! pAuthentication <- newCString authentication ! res <- mysql_real_connect pMYSQL pServer pUser pAuthentication pDatabase 0 nullPtr 0 ! free pServer ! free pDatabase ! free pUser ! free pAuthentication ! when (res == nullPtr) (handleSqlError pMYSQL) ! refFalse <- newMVar False ! let connection = Connection ! { connDisconnect = mysql_close pMYSQL ! , connExecute = execute pMYSQL ! , connQuery = query connection pMYSQL ! , connTables = tables connection pMYSQL ! , connDescribe = describe connection pMYSQL ! , connBeginTransaction = execute pMYSQL "begin" ! , connCommitTransaction = execute pMYSQL "commit" ! , connRollbackTransaction = execute pMYSQL "rollback" ! , connClosed = refFalse ! } ! return connection ! where ! execute :: MYSQL -> String -> IO () ! execute pMYSQL query = do ! res <- withCString query (mysql_query pMYSQL) ! when (res /= 0) (handleSqlError pMYSQL) ! ! withStatement :: Connection -> MYSQL -> MYSQL_RES -> IO Statement ! withStatement conn pMYSQL pRes = do ! currRow <- newMVar (nullPtr, nullPtr) ! refFalse <- newMVar False ! if (pRes == nullPtr) ! then do ! errno <- mysql_errno pMYSQL ! when (errno /= 0) (handleSqlError pMYSQL) ! return (Statement ! { stmtConn = conn ! , stmtClose = return () ! , stmtFetch = fetch pRes currRow ! , stmtGetCol = getColValue currRow ! , stmtFields = [] ! , stmtClosed = refFalse ! }) ! else do ! fieldDefs <- getFieldDefs pRes ! return (Statement ! { stmtConn = conn ! , stmtClose = mysql_free_result pRes ! , stmtFetch = fetch pRes currRow ! , stmtGetCol = getColValue currRow ! , stmtFields = fieldDefs ! , stmtClosed = refFalse ! }) ! where ! getFieldDefs pRes = do ! pField <- mysql_fetch_field pRes ! if pField == nullPtr ! then return [] ! else do ! name <- (#peek MYSQL_FIELD, name) pField >>= peekCString ! (dataType :: Int) <- (#peek MYSQL_FIELD, type) pField ! (columnSize :: Int) <- (#peek MYSQL_FIELD, length) pField ! (flags :: Int) <- (#peek MYSQL_FIELD, flags) pField ! (decimalDigits :: Int) <- (#peek MYSQL_FIELD, decimals) pField ! let sqlType = mkSqlType dataType columnSize decimalDigits ! defs <- getFieldDefs pRes ! return ((name,sqlType,(flags .&. (#const NOT_NULL_FLAG)) == 0):defs) ! ! mkSqlType :: Int -> Int -> Int -> SqlType ! mkSqlType (#const FIELD_TYPE_STRING) size _ = SqlChar size ! mkSqlType (#const FIELD_TYPE_VAR_STRING) size _ = SqlVarChar size ! mkSqlType (#const FIELD_TYPE_DECIMAL) size prec = SqlNumeric size prec ! mkSqlType (#const FIELD_TYPE_SHORT) _ _ = SqlSmallInt ! mkSqlType (#const FIELD_TYPE_INT24) _ _ = SqlMedInt ! mkSqlType (#const FIELD_TYPE_LONG) _ _ = SqlInteger ! mkSqlType (#const FIELD_TYPE_FLOAT) _ _ = SqlReal ! mkSqlType (#const FIELD_TYPE_DOUBLE) _ _ = SqlDouble ! mkSqlType (#const FIELD_TYPE_TINY) _ _ = SqlTinyInt ! mkSqlType (#const FIELD_TYPE_LONGLONG) _ _ = SqlBigInt ! mkSqlType (#const FIELD_TYPE_DATE) _ _ = SqlDate ! mkSqlType (#const FIELD_TYPE_TIME) _ _ = SqlTime ! mkSqlType (#const FIELD_TYPE_TIMESTAMP) _ _ = SqlTimeStamp ! mkSqlType (#const FIELD_TYPE_DATETIME) _ _ = SqlDateTime ! mkSqlType (#const FIELD_TYPE_YEAR) _ _ = SqlYear ! mkSqlType (#const FIELD_TYPE_BLOB) _ _ = SqlBLOB ! mkSqlType (#const FIELD_TYPE_SET) _ _ = SqlSET ! mkSqlType (#const FIELD_TYPE_ENUM) _ _ = SqlENUM ! mkSqlType tp _ _ = SqlUnknown tp ! ! query :: Connection -> MYSQL -> String -> IO Statement ! query conn pMYSQL query = do ! 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 ! fetch pRes currRow ! | pRes == nullPtr = return False ! | otherwise = modifyMVar currRow $ \(pRow, pLengths) -> do ! pRow <- mysql_fetch_row pRes ! pLengths <- mysql_fetch_lengths pRes ! return ((pRow, pLengths), pRow /= nullPtr) ! ! getColValue :: MVar (MYSQL_ROW, MYSQL_LENGTHS) -> Int -> FieldDef -> (SqlType -> CString -> Int -> IO (Maybe a)) -> IO (Maybe a) ! getColValue currRow colNumber (name,sqlType,nullable) f = do ! (row, lengths) <- readMVar currRow ! pValue <- peekElemOff row colNumber ! len <- fmap fromIntegral (peekElemOff lengths colNumber) ! if pValue == nullPtr ! then return Nothing ! else do ! mv <- f sqlType pValue len ! case mv of ! Just v -> return (Just v) ! Nothing -> throwDyn (SqlBadTypeCast name sqlType) ! ! tables :: Connection -> MYSQL -> IO [String] ! tables conn pMYSQL = do ! pRes <- mysql_list_tables pMYSQL nullPtr ! stmt <- withStatement conn pMYSQL pRes ! -- SQLTables returns: ! -- Column name # Type ! -- Tables_in_xx 0 VARCHAR ! collectRows (\stmt -> do ! mb_v <- stmtGetCol stmt 0 ("Tables", SqlVarChar 0, False) fromNonNullSqlCStringLen ! return (case mb_v of { Nothing -> ""; Just a -> a })) stmt ! ! describe :: Connection -> MYSQL -> String -> IO [FieldDef] ! describe conn pMYSQL table = do ! pRes <- withCString table (\table -> mysql_list_fields pMYSQL table nullPtr) ! stmt <- withStatement conn pMYSQL pRes ! return (getFieldsTypes stmt) |
From: <kr_...@us...> - 2004-04-10 20:02:44
|
Update of /cvsroot/htoolkit/HSQL/NSIS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6709 Added Files: hsql_installer.nsi Log Message: Added installer script for Windows --- NEW FILE: hsql_installer.nsi --- ; Script generated by the HM NIS Edit Script Wizard. ; HM NIS Edit Wizard helper defines !define PRODUCT_NAME "HSQL" !define PRODUCT_VERSION "1.4" !define PRODUCT_PUBLISHER "Krasimir Angelov" !define PRODUCT_WEB_SITE "http://htoolkit.sourceforge.net" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" !define PRODUCT_UNINST_ROOT_KEY "HKLM" !define REQUIRED_GHC_VERSION "6.2.1" ; Path to the HSQL build directory: !define HSQL_PATH ".." ; MUI 1.67 compatible ------ !include "MUI.nsh" ; MUI Settings !define MUI_ABORTWARNING !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" ; Welcome page !insertmacro MUI_PAGE_WELCOME ; License page !insertmacro MUI_PAGE_LICENSE "${HSQL_PATH}\LICENSE" ; Settings !insertmacro MUI_PAGE_COMPONENTS ; Directory page !insertmacro MUI_PAGE_DIRECTORY ;Startmenu Var STARTMENU_FOLDER !insertmacro MUI_PAGE_STARTMENU PRODUCT_NAME $STARTMENU_FOLDER ; Instfiles page !insertmacro MUI_PAGE_INSTFILES ; Finish page !insertmacro MUI_PAGE_FINISH ; Uninstaller pages !insertmacro MUI_UNPAGE_INSTFILES ; Language files !insertmacro MUI_LANGUAGE "English" ; MUI end ------ !include "StrFunc.nsh" ${StrRep} Var GHCDIR Var DOCS Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" OutFile "${PRODUCT_NAME}-${PRODUCT_VERSION}.exe" InstallDir "c:\HToolkit\HSQL" ShowInstDetails show ShowUnInstDetails show Section "HSQL for GHC-${REQUIRED_GHC_VERSION}" SEC01 ReadRegStr $GHCDIR HKLM "SOFTWARE\Haskell\GHC\ghc-${REQUIRED_GHC_VERSION}" "InstallDir" StrCmp $GHCDIR "" GetDir Ok IfErrors +1 Ok GetDir: MessageBox MB_ICONEXCLAMATION "Couldn't find GHC" StrCpy $GHCDIR $R9 StrCmp $GHCDIR "" Cancel Ok Cancel: Abort "Couldn't find GHC" Ok: SetOverwrite ifnewer SetOutPath "$INSTDIR\GHC" File /r "${HSQL_PATH}\hsql.pkg.in" File /r "${HSQL_PATH}\build\libHSsql.a" File /r "${HSQL_PATH}\mingw32lib\liblibmysql.a" File /r "${HSQL_PATH}\mingw32lib\liblibpq.a" File /r "${HSQL_PATH}\mingw32lib\libsqlite.a" SetOutPath "$INSTDIR\GHC\imports" File /r "${HSQL_PATH}\build\*.hi" ; Fix the hsql.pkg-file Call fixPkg StrCpy $R0 "$GHCDIR\bin\ghc-pkg -u -g -i $\"$INSTDIR\GHC\hsql.pkg$\"" ExecWait $R0 SectionEnd Section "HSQL for Hugs" SEC02 SetOutPath "$INSTDIR\Hugs\libraries" File /r "${HSQL_PATH}\build\*.hs" File /r "${HSQL_PATH}\build\*.dll" SectionEnd Section "Documentation" SEC03 StrCpy $DOCS "yes" SetOverwrite ifnewer SetOutPath "$INSTDIR\doc" File /r "${HSQL_PATH}\doc\*.html" File /r "${HSQL_PATH}\doc\*.gif" File /r "${HSQL_PATH}\doc\*.css" SectionEnd Section "Examples" SEC04 SetOverwrite ifnewer SetOutPath "$INSTDIR\examples" File /r "${HSQL_PATH}\examples\*.hs" SectionEnd Section -DLL SetOverwrite ifnewer SetOutPath "$SYSDIR" File /r "${HSQL_PATH}\mingw32lib\*.dll" SectionEnd Section -AdditionalIcons WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" StrCmp $DOCS "yes" +1 +2 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Documentation.lnk" "$INSTDIR\doc\index.html" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\uninst.exe" SectionEnd Section -Post WriteUninstaller "$INSTDIR\uninst.exe" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "StartMenu" "$STARTMENU_FOLDER" SectionEnd ; Component descriptions !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $(DESC_Section1) !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} $(DESC_Section2) !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $(DESC_Section3) !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $(DESC_Section4) !insertmacro MUI_FUNCTION_DESCRIPTION_END LangString DESC_Section1 ${LANG_ENGLISH} "Install HSQL for GHC" LangString DESC_Section2 ${LANG_ENGLISH} "Install HSQL for Hugs" LangString DESC_Section3 ${LANG_ENGLISH} "Install HSQL with documentation" LangString DESC_Section4 ${LANG_ENGLISH} "Install HSQL examples" Function fixPkg ; Fix the hsql.pkg file to the right paths ; in order to be able to add the hsql package to ghc. clearErrors FileOpen $0 "$INSTDIR\GHC\hsql.pkg.in" "r" GetTempFileName $R0 FileOpen $1 $R0 "w" loop: FileRead $0 $2 IfErrors done ${StrRep} $R1 $2 "@GHC_DIR@" "$INSTDIR/GHC" ${StrRep} $R1 $R1 "@LIB_DIRS@" "$\"$INSTDIR/GHC$\"" ${StrRep} $R1 $R1 "@DEP_LIBS@" "$\"sqlite$\", $\"libpq$\", $\"odbc32$\", $\"libmysql$\"" ${StrRep} $R1 $R1 "\" "/" FileWrite $1 $R1 Goto loop done: FileClose $0 FileClose $1 CopyFiles /SILENT $R0 "$INSTDIR\GHC\hsql.pkg" Delete $R0 FunctionEnd Function un.onUninstSuccess HideWindow MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." FunctionEnd Function un.onInit MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 Abort FunctionEnd Section Uninstall ; Remove HSQL from statmenu ReadRegStr $STARTMENU_FOLDER ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "StartMenu" ifErrors +2 +1 RMDir /r "$SMPROGRAMS\$STARTMENU_FOLDER" RMDir /r "$INSTDIR" ; Remove hsql package from ghc ReadRegStr $GHCDIR HKLM "SOFTWARE\Haskell\GHC\ghc-${REQUIRED_GHC_VERSION}" "InstallDir" ifErrors +1 +3 MessageBox MB_ICONEXCLAMATION "Unable to remove hsql lib files from the ghc folder" goto end StrCpy $R0 "$\"$GHCDIR\bin\ghc-pkg$\" -r hsql" ExecWait $R0 end: DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" SetAutoClose true SectionEnd |
From: <kr_...@us...> - 2004-04-10 19:59:43
|
Update of /cvsroot/htoolkit/HSQL/NSIS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6141/NSIS Log Message: Directory /cvsroot/htoolkit/HSQL/NSIS added to the repository |
From: <kr_...@us...> - 2004-04-10 19:56:55
|
Update of /cvsroot/htoolkit/HSQL/mingw32lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5166 Added Files: Makefile libmysql.def libpqdll.def sqlite.def Log Message: The *.def files are added to simplify creation of *.a libraries under Windows --- NEW FILE: Makefile --- all: liblibmysql.a liblibpq.a libsqlite.a liblibmysql.a: libmysql.def dlltool --input-def libmysql.def --dllname libmysql.dll --output-lib liblibmysql.a -k liblibpq.a: libpqdll.def dlltool --input-def libpqdll.def --dllname libpq.dll --output-lib liblibpq.a -k libsqlite.a: sqlite.def dlltool --input-def sqlite.def --dllname sqlite.dll --output-lib libsqlite.a -k --- NEW FILE: libmysql.def --- LIBRARY LIBMYSQL.DLL EXPORTS _dig_vec bmove_upp delete_dynamic init_dynamic_array insert_dynamic int2str is_prefix list_add list_delete max_allowed_packet my_casecmp my_end my_init my_malloc my_memdup my_no_flags_free my_realloc my_strdup my_thread_end my_thread_init myodbc_remove_escape@8 mysql_affected_rows@4 mysql_change_user@16 mysql_character_set_name@4 mysql_close@4 mysql_connect@16 mysql_create_db@8 mysql_data_seek@12 mysql_debug@4 mysql_drop_db@8 mysql_dump_debug_info@4 mysql_eof@4 mysql_errno@4 mysql_error@4 mysql_escape_string@12 mysql_fetch_field@4 mysql_fetch_field_direct@8 mysql_fetch_fields@4 mysql_fetch_lengths@4 mysql_fetch_row@4 mysql_field_count@4 mysql_field_seek@8 mysql_field_tell@4 mysql_free_result@4 mysql_get_client_info@0 mysql_get_host_info@4 mysql_get_proto_info@4 mysql_get_server_info@4 mysql_info@4 mysql_init@4 mysql_insert_id@4 mysql_kill@8 mysql_list_dbs@8 mysql_list_fields@12 mysql_list_processes@4 mysql_list_tables@8 mysql_num_fields@4 mysql_num_rows@4 mysql_odbc_escape_string@28 mysql_options@12 mysql_ping@4 mysql_query@8 mysql_read_query_result@4 mysql_real_connect@32 mysql_real_escape_string@16 mysql_real_query@12 mysql_refresh@8 mysql_row_seek@8 mysql_row_tell@4 mysql_select_db@8 mysql_send_query@12 mysql_shutdown@4 mysql_stat@4 mysql_store_result@4 mysql_thread_id@4 mysql_thread_safe@0 mysql_use_result@4 net_buffer_length set_dynamic strcend strdup_root strfill strinstr strmake strmov strxmov mysql_ssl_cipher@4 mysql_ssl_clear@4 mysql_ssl_set@20 --- NEW FILE: libpqdll.def --- ; DEF file for MS VC++ LIBRARY LIBPQ DESCRIPTION "PostgreSQL Client Library" EXPORTS PQconnectdb @ 1 PQsetdbLogin @ 2 PQconndefaults @ 3 PQfinish @ 4 PQreset @ 5 PQrequestCancel @ 6 PQdb @ 7 PQuser @ 8 PQpass @ 9 PQhost @ 10 PQport @ 11 PQtty @ 12 PQoptions @ 13 PQstatus @ 14 PQerrorMessage @ 15 PQsocket @ 16 PQbackendPID @ 17 PQtrace @ 18 PQuntrace @ 19 PQsetNoticeProcessor @ 20 PQexec @ 21 PQnotifies @ 22 PQsendQuery @ 23 PQgetResult @ 24 PQisBusy @ 25 PQconsumeInput @ 26 PQgetline @ 27 PQputline @ 28 PQgetlineAsync @ 29 PQputnbytes @ 30 PQendcopy @ 31 PQfn @ 32 PQresultStatus @ 33 PQntuples @ 34 PQnfields @ 35 PQbinaryTuples @ 36 PQfname @ 37 PQfnumber @ 38 PQftype @ 39 PQfsize @ 40 PQfmod @ 41 PQcmdStatus @ 42 PQoidStatus @ 43 PQcmdTuples @ 44 PQgetvalue @ 45 PQgetlength @ 46 PQgetisnull @ 47 PQclear @ 48 PQmakeEmptyPGresult @ 49 PQprint @ 50 PQdisplayTuples @ 51 PQprintTuples @ 52 lo_open @ 53 lo_close @ 54 lo_read @ 55 lo_write @ 56 lo_lseek @ 57 lo_creat @ 58 lo_tell @ 59 lo_unlink @ 60 lo_import @ 61 lo_export @ 62 pgresStatus @ 63 PQmblen @ 64 PQresultErrorMessage @ 65 PQresStatus @ 66 termPQExpBuffer @ 67 appendPQExpBufferChar @ 68 initPQExpBuffer @ 69 resetPQExpBuffer @ 70 PQoidValue @ 71 PQclientEncoding @ 72 PQenv2encoding @ 73 appendBinaryPQExpBuffer @ 74 appendPQExpBufferStr @ 75 destroyPQExpBuffer @ 76 createPQExpBuffer @ 77 PQconninfoFree @ 78 PQconnectPoll @ 79 PQconnectStart @ 80 PQflush @ 81 PQisnonblocking @ 82 PQresetPoll @ 83 PQresetStart @ 84 PQsetClientEncoding @ 85 PQsetnonblocking @ 86 PQfreeNotify @ 87 PQescapeString @ 88 PQescapeBytea @ 89 printfPQExpBuffer @ 90 appendPQExpBuffer @ 91 pg_encoding_to_char @ 92 pg_utf_mblen @ 93 PQunescapeBytea @ 94 PQfreemem @ 95 PQtransactionStatus @ 96 PQparameterStatus @ 97 PQprotocolVersion @ 98 PQsetErrorVerbosity @ 99 PQsetNoticeReceiver @ 100 PQexecParams @ 101 PQsendQueryParams @ 102 PQputCopyData @ 103 PQputCopyEnd @ 104 PQgetCopyData @ 105 PQresultErrorField @ 106 PQftable @ 107 PQftablecol @ 108 PQfformat @ 109 PQexecPrepared @ 110 PQsendQueryPrepared @ 111 --- NEW FILE: sqlite.def --- EXPORTS sqlite_open sqlite_close sqlite_exec sqlite_last_insert_rowid sqlite_error_string sqlite_interrupt sqlite_complete sqlite_busy_handler sqlite_busy_timeout sqlite_get_table sqlite_free_table sqlite_mprintf sqlite_vmprintf sqlite_exec_printf sqlite_exec_vprintf sqlite_get_table_printf sqlite_get_table_vprintf sqlite_freemem sqlite_libversion sqlite_libencoding sqlite_changes sqlite_create_function sqlite_create_aggregate sqlite_function_type sqlite_user_data sqlite_aggregate_context sqlite_aggregate_count sqlite_set_result_string sqlite_set_result_int sqlite_set_result_double sqlite_set_result_error sqliteMalloc sqliteFree sqliteRealloc sqlite_set_authorizer sqlite_trace sqlite_compile sqlite_step sqlite_finalize |
From: <kr_...@us...> - 2004-04-10 19:51:24
|
Update of /cvsroot/htoolkit/HSQL/mingw32lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4079/mingw32lib Log Message: Directory /cvsroot/htoolkit/HSQL/mingw32lib added to the repository |
From: <kr_...@us...> - 2004-04-10 18:12:26
|
Update of /cvsroot/htoolkit/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19310 Modified Files: Makefile configure.ac Log Message: Support for PostgreSQL under Windows Index: Makefile =================================================================== RCS file: /cvsroot/htoolkit/HSQL/Makefile,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Makefile 22 Feb 2004 11:58:30 -0000 1.13 --- Makefile 10 Apr 2004 17:58:42 -0000 1.14 *************** *** 64,68 **** FFIHUGS_FLAGS = $(patsubst %, +L"%", $(CPPFLAGS)) ifeq "$(WIN32)" "YES" ! FFIHUGS_FLAGS += $(patsubst %, +L"%", $(patsubst -l%, %.lib, $(LDFLAGS)) $(HsODBC_o)) else FFIHUGS_FLAGS += $(patsubst %, +L"%", $(LDFLAGS)) --- 64,69 ---- FFIHUGS_FLAGS = $(patsubst %, +L"%", $(CPPFLAGS)) ifeq "$(WIN32)" "YES" ! ODBC_FFIHUGS_FLAGS = +L"$(HsODBC_o)" ! FFIHUGS_FLAGS += $(patsubst %, +L"%", $(patsubst -l%, %.lib, $(LDFLAGS))) else FFIHUGS_FLAGS += $(patsubst %, +L"%", $(LDFLAGS)) *************** *** 101,105 **** @: %.$(SO_EXT): %.hs ! $(FFIHUGS) -98 +G -P$(BUILDDIR): $(FFIHUGS_FLAGS) $< %.raw-hs : %.hs $(GHC) -Iincludes $(CPPFLAGS) -D__HADDOCK__ -E -cpp $< -o $<.tmp && sed -e 's/^#.*//' <$<.tmp >$@ --- 102,106 ---- @: %.$(SO_EXT): %.hs ! $(FFIHUGS) -98 +G -P$(BUILDDIR): $(FFIHUGS_FLAGS) $($(*F)_FFIHUGS_FLAGS) $< %.raw-hs : %.hs $(GHC) -Iincludes $(CPPFLAGS) -D__HADDOCK__ -E -cpp $< -o $<.tmp && sed -e 's/^#.*//' <$<.tmp >$@ Index: configure.ac =================================================================== RCS file: /cvsroot/htoolkit/HSQL/configure.ac,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** configure.ac 9 Apr 2004 20:24:05 -0000 1.14 --- configure.ac 10 Apr 2004 17:58:42 -0000 1.15 *************** *** 277,302 **** if test $WithPostgreSQL = YES; then ! AC_PATH_PROG(PG_CONFIG, pg_config) ! if test "$PG_CONFIG" = "" || test ! -f $PG_CONFIG; then ! AC_MSG_ERROR([pg_config is required to build PostgreSQL binding]) ! fi ! incdir=`$PG_CONFIG --includedir` ! incdir_server=`$PG_CONFIG --includedir-server` ! case $ac_cv_target_alias in ! i[[3456]]86-*-cygwin*|i[[3456]]86-*-mingw32*) ! LDFLAGS="$LDFLAGS -L$(cygpath -m `$PG_CONFIG --libdir`)" ! incdir=$(cygpath -m $incdir) ! CPPFLAGS="$CPPFLAGS -I$(cygpath -m /usr/include) -I$incdir -I$incdir_server" ! ;; ! *) LDFLAGS="$LDFLAGS -L`$PG_CONFIG --libdir`" ! CPPFLAGS="$CPPFLAGS -I$incdir -I$incdir_server" ! ;; esac AC_CHECK_HEADER(libpq-fe.h,,AC_MSG_ERROR([libpq-fe.h header not found])) AC_CHECK_HEADER(postgres.h,,AC_MSG_ERROR([postgres.h header not found])) ! AC_CHECK_LIB(pq,PQsetdbLogin,,AC_MSG_ERROR([libpq.a library not found])) fi --- 277,310 ---- if test $WithPostgreSQL = YES; then ! if test $WIN32 = NO; then ! AC_PATH_PROG(PG_CONFIG, pg_config) ! if test "$PG_CONFIG" = "" || test ! -f $PG_CONFIG; then ! AC_MSG_ERROR([pg_config is required to build PostgreSQL binding]) ! fi ! incdir=`$PG_CONFIG --includedir` ! incdir_server=`$PG_CONFIG --includedir-server` ! case $ac_cv_target_alias in ! i[[3456]]86-*-cygwin*|i[[3456]]86-*-mingw32*) ! LDFLAGS="$LDFLAGS -L$(cygpath -m `$PG_CONFIG --libdir`)" ! incdir=$(cygpath -m $incdir) ! CPPFLAGS="$CPPFLAGS -I$(cygpath -m /usr/include) -I$incdir -I$incdir_server" ! ;; ! *) LDFLAGS="$LDFLAGS -L`$PG_CONFIG --libdir`" ! CPPFLAGS="$CPPFLAGS -I$incdir -I$incdir_server" ! ;; esac + else + CPPFLAGS="$CPPFLAGS -D_MSC_VER" + fi AC_CHECK_HEADER(libpq-fe.h,,AC_MSG_ERROR([libpq-fe.h header not found])) AC_CHECK_HEADER(postgres.h,,AC_MSG_ERROR([postgres.h header not found])) ! ! 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 |
From: <kr_...@us...> - 2004-04-10 18:10:25
|
Update of /cvsroot/htoolkit/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19048 Added Files: LICENSE Log Message: Added BSD LICENSE description --- NEW FILE: LICENSE --- Copyright (c) 2003, Krasimir Angelov All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the HToolkit nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
From: <kr_...@us...> - 2004-04-09 20:37:27
|
Update of /cvsroot/htoolkit/HSQL/src/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8632/src/HSQL Modified Files: MySQL.hsc Added Files: HsMySQL.h Log Message: Added support for MySQL under Windows --- NEW FILE: HsMySQL.h --- #ifndef HsMySQL #define HsMySQL #if defined(_WIN32_) #include <windows.h> #endif #include <mysql.h> #endif Index: MySQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/MySQL.hsc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MySQL.hsc 10 Feb 2004 11:30:52 -0000 1.4 --- MySQL.hsc 9 Apr 2004 20:24:05 -0000 1.5 *************** *** 31,35 **** import Text.Read ! #include <mysql.h> type MYSQL = Ptr () --- 31,36 ---- import Text.Read ! #include <windows.h> ! #include <HsMySQL.h> type MYSQL = Ptr () *************** *** 39,58 **** type MYSQL_LENGTHS = Ptr CULong ! foreign import ccall "mysql.h mysql_init" mysql_init :: MYSQL -> IO MYSQL ! foreign import ccall "mysql.h mysql_real_connect" mysql_real_connect :: MYSQL -> CString -> CString -> CString -> CString -> Int -> CString -> Int -> IO MYSQL ! foreign import ccall "mysql.h mysql_close" mysql_close :: MYSQL -> IO () ! foreign import ccall "mysql.h mysql_errno" mysql_errno :: MYSQL -> IO Int ! foreign import ccall "mysql.h mysql_error" mysql_error :: MYSQL -> IO CString ! foreign import ccall "mysql.h mysql_query" mysql_query :: MYSQL -> CString -> IO Int ! foreign import ccall "mysql.h mysql_use_result" mysql_use_result :: MYSQL -> IO MYSQL_RES ! foreign import ccall "mysql.h mysql_fetch_field" mysql_fetch_field :: MYSQL_RES -> IO MYSQL_FIELD ! foreign import ccall "mysql.h mysql_free_result" mysql_free_result :: MYSQL_RES -> IO () ! foreign import ccall "mysql.h mysql_fetch_row" mysql_fetch_row :: MYSQL_RES -> IO MYSQL_ROW ! foreign import ccall "mysql.h mysql_fetch_lengths" mysql_fetch_lengths :: MYSQL_RES -> IO MYSQL_LENGTHS ! foreign import ccall "mysql.h mysql_list_tables" mysql_list_tables :: MYSQL -> CString -> IO MYSQL_RES ! foreign import ccall "mysql.h mysql_list_fields" mysql_list_fields :: MYSQL -> CString -> CString -> IO MYSQL_RES ! foreign import ccall "stdlib.h atoi" c_atoi :: CString -> IO Int ! foreign import ccall "stdlib.h strtoll" c_strtoll :: CString -> Ptr CString -> Int -> IO Int64 ----------------------------------------------------------------------------------------- --- 40,62 ---- type MYSQL_LENGTHS = Ptr CULong ! #if defined(_WIN32_) ! #let CALLCONV = "stdcall" ! #else ! #let CALLCONV = "ccall" ! #endif ! 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 ! foreign import #{CALLCONV} "HsMySQL.h mysql_free_result" mysql_free_result :: MYSQL_RES -> IO () ! foreign import #{CALLCONV} "HsMySQL.h mysql_fetch_row" mysql_fetch_row :: MYSQL_RES -> IO MYSQL_ROW ! foreign import #{CALLCONV} "HsMySQL.h mysql_fetch_lengths" mysql_fetch_lengths :: MYSQL_RES -> IO MYSQL_LENGTHS ! 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 ----------------------------------------------------------------------------------------- |
From: <kr_...@us...> - 2004-04-09 20:37:27
|
Update of /cvsroot/htoolkit/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8632 Modified Files: configure.ac Log Message: Added support for MySQL under Windows Index: configure.ac =================================================================== RCS file: /cvsroot/htoolkit/HSQL/configure.ac,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** configure.ac 15 Feb 2004 10:48:41 -0000 1.13 --- configure.ac 9 Apr 2004 20:24:05 -0000 1.14 *************** *** 228,233 **** --- 228,236 ---- case $ac_cv_target_alias in i[[3456]]86-*-cygwin*|i[[3456]]86-*-mingw32*) + AC_CHECK_HEADER(windows.h) CFLAGS="$CFLAGS -mno-cygwin" CPPFLAGS="$CPPFLAGS -D_WIN32_" + ac_includes_default="$ac_includes_default + #include <windows.h>" WIN32=YES ;; *************** *** 244,266 **** if test $WithODBC = YES; then ! case $ac_cv_target_alias in ! i[[3456]]86-*-cygwin*|i[[3456]]86-*-mingw32*) ! AC_COMPILE_IFELSE( ! [ ! #include <windows.h> ! #include <sqlext.h> ! ! int main() ! { ! SQLAllocEnv (NULL); ! return 0; ! } ! ], ! [LIBS="${LIBS} -lodbc32"], ! AC_MSG_ERROR([sqlext.h and libodbc required to build ODBC building.])) ! ;; ! *) AC_CHECK_HEADER(sqlext.h,,AC_MSG_ERROR([sqlext.h and libodbc required to build ODBC building.])) ! AC_CHECK_LIB(odbc,SQLAllocEnv,,AC_MSG_ERROR([sqlext.h and libodbc required to build ODBC building.])) ! ;; esac --- 247,270 ---- 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( ! [ ! #include <windows.h> ! #include <sqlext.h> ! ! int main() ! { ! SQLAllocEnv (NULL); ! return 0; ! } ! ], ! [LIBS="${LIBS} -lodbc32"], ! 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.])) ! ;; esac *************** *** 302,322 **** if test $WithMySQL = YES; then ! AC_PATH_PROG(MYSQL_CONFIG, mysql_config) ! ! if test "$MYSQL_CONFIG" = "" || test ! -f $MYSQL_CONFIG; then ! AC_MSG_ERROR([mysql_config is required to build MySQL binding]) ! fi ! ! LDFLAGS="$LDFLAGS `$MYSQL_CONFIG --libs`" ! for mysql_opt in `$MYSQL_CONFIG --cflags` ! do ! case $mysql_opt in ! -I*) ! CPPFLAGS="$CPPFLAGS ${mysql_opt}";; ! esac ! done ! AC_CHECK_HEADER(mysql.h,, AC_MSG_ERROR([mysql.h header not found])) fi --- 306,349 ---- if test $WithMySQL = YES; then ! if test $WIN32 = NO; then ! AC_PATH_PROG(MYSQL_CONFIG, mysql_config) ! ! if test "$MYSQL_CONFIG" = "" || test ! -f $MYSQL_CONFIG; then ! AC_MSG_ERROR([mysql_config is required to build MySQL binding]) ! fi ! ! LDFLAGS="$LDFLAGS `$MYSQL_CONFIG --libs`" ! ! for mysql_opt in `$MYSQL_CONFIG --cflags` ! do ! case $mysql_opt in ! -I*) ! CPPFLAGS="$CPPFLAGS ${mysql_opt}";; ! esac ! done ! fi ! AC_CHECK_HEADER(mysql.h,, AC_MSG_ERROR([mysql.h header not found])) ! ! case $WIN32 in ! YES) ! AC_COMPILE_IFELSE( ! [ ! #include <windows.h> ! #include <mysql.h> ! int main () ! { ! mysql_init (NULL); ! return 0; ! } ! ], ! [LIBS="${LIBS} -llibmysql"], ! AC_MSG_ERROR([liblibmysql.a library not found])) ! ;; ! NO) ! AC_CHECK_LIB(mysql,mysql_init,,AC_MSG_ERROR([libmysql.a library not found])) ! ;; ! esac fi |
From: <br...@us...> - 2004-03-31 16:24:35
|
Update of /cvsroot/htoolkit/HSQL/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7770/src Modified Files: HSQL.hsc Log Message: Added conversion of SqlBigInt to Int. MySQL makes the result of some aggregate functions SqlBigInt, and it seems reasonable that the user should be able to uses those as Int. Index: HSQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL.hsc,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** HSQL.hsc 26 Feb 2004 20:52:06 -0000 1.11 --- HSQL.hsc 31 Mar 2004 16:12:46 -0000 1.12 *************** *** 198,201 **** --- 198,202 ---- if sqlType==SqlInteger || sqlType==SqlMedInt || sqlType==SqlTinyInt || sqlType==SqlSmallInt + || sqlType==SqlBigInt then do val <- c_atoi cstr *************** *** 208,211 **** --- 209,213 ---- fromSqlValue SqlTinyInt s = Just (read s) fromSqlValue SqlSmallInt s = Just (read s) + fromSqlValue SqlBigInt s = Just (read s) fromSqlValue _ _ = Nothing |
From: <kr_...@us...> - 2004-03-09 15:31:32
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8675/src/cbits/Win32 Modified Files: Window.c Log Message: Support for Tab/Shift+Tab for modal dialogs Index: Window.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** Window.c 25 Nov 2003 14:12:22 -0000 1.62 --- Window.c 9 Mar 2004 15:06:22 -0000 1.63 *************** *** 1071,1074 **** --- 1071,1077 ---- while (IsWindow(window) && GetMessage(&msg, NULL, 0, 0) != 0) { + if (IsDialogMessage(window, &msg)) + continue; + TranslateMessage(&msg); DispatchMessage(&msg); |
From: <kr_...@us...> - 2004-03-09 15:01:02
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30566/src/cbits/Win32 Modified Files: ListBox.c Log Message: bugfix Index: ListBox.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ListBox.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ListBox.c 22 Feb 2004 22:20:25 -0000 1.9 --- ListBox.c 9 Mar 2004 14:35:53 -0000 1.10 *************** *** 162,166 **** "LISTBOX", NULL, ! WS_CHILD | WS_VSCROLL | WS_BORDER | LBS_NOTIFY | WS_TABSTOP | (multisel ? LBS_EXTENDEDSEL : 0), 0,0,0,0, window, --- 162,166 ---- "LISTBOX", NULL, ! WS_CHILD | WS_VSCROLL | WS_BORDER | WS_TABSTOP | LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | (multisel ? LBS_EXTENDEDSEL : 0), 0,0,0,0, window, |
From: <br...@us...> - 2004-02-28 20:27:22
|
Update of /cvsroot/htoolkit/HSQL/src/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20618 Modified Files: ODBC.hsc Log Message: Changed malloc / mallocBytes / free / newCString to alloca / allocaBytes / withCString where possible. Used SQL_NTS instead of calculating string length. Index: ODBC.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/ODBC.hsc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ODBC.hsc 28 Feb 2004 19:26:46 -0000 1.9 --- ODBC.hsc 28 Feb 2004 20:09:50 -0000 1.10 *************** *** 89,97 **** | res == (#const SQL_STILL_EXECUTING) = throwDyn SqlStillExecuting | res == (#const SQL_NEED_DATA) = throwDyn SqlNeedData ! | res == (#const SQL_ERROR) = do ! pState <- mallocBytes 256 ! pNative <- malloc ! pMsg <- mallocBytes 256 ! pTextLen <- malloc res <- sqlGetDiagRec handleType handle 1 pState pNative pMsg 256 pTextLen e <- if res == (#const SQL_NO_DATA) --- 89,98 ---- | 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) *************** *** 102,109 **** msg <- peekCString pMsg return (SqlError {seState=state, seNativeError=fromIntegral native, seErrorMsg=msg}) - free pState - free pNative - free pMsg - free pTextLen throwDyn e | otherwise = error (show res) --- 103,106 ---- *************** *** 115,123 **** {-# NOINLINE myEnvironment #-} myEnvironment :: HENVRef ! myEnvironment = unsafePerformIO $ do ! (phEnv :: Ptr HENV) <- malloc res <- sqlAllocEnv phEnv hEnv <- peek phEnv - free phEnv handleSqlResult 0 nullPtr res newForeignPtr sqlFreeEnv_p hEnv --- 112,118 ---- {-# NOINLINE myEnvironment #-} myEnvironment :: HENVRef ! myEnvironment = unsafePerformIO $ alloca $ \ (phEnv :: Ptr HENV) -> do res <- sqlAllocEnv phEnv hEnv <- peek phEnv handleSqlResult 0 nullPtr res newForeignPtr sqlFreeEnv_p hEnv *************** *** 132,144 **** -> String -- ^ Authentication string (password) -> IO Connection -- ^ the returned value represents the new connection ! connect server user authentication = connectHelper $ \hDBC -> do ! pServer <- newCString server ! pUser <- newCString user ! pAuthentication <- newCString authentication ! res <- sqlConnect hDBC pServer (length server) pUser (length user) pAuthentication (length authentication) ! free pServer ! free pUser ! free pAuthentication ! return res -- | 'driverConnect' is an alternative to 'connect'. It supports data sources that --- 127,135 ---- -> String -- ^ Authentication string (password) -> IO Connection -- ^ the returned value represents the new connection ! connect server user authentication = connectHelper $ \hDBC -> ! withCString server $ \pServer -> ! withCString user $ \pUser -> ! withCString authentication $ \pAuthentication -> ! sqlConnect hDBC pServer (#const SQL_NTS) pUser (#const SQL_NTS) pAuthentication (#const SQL_NTS) -- | 'driverConnect' is an alternative to 'connect'. It supports data sources that *************** *** 147,167 **** driverConnect :: String -- ^ Connection string -> IO Connection -- ^ the returned value represents the new connection ! driverConnect connString = connectHelper $ \hDBC -> do ! pConnString <- newCString connString ! pOutConnString <- mallocBytes 1024 ! pLen <- malloc ! res <- sqlDriverConnect hDBC nullPtr pConnString (fromIntegral (length connString)) pOutConnString 1024 pLen (#const SQL_DRIVER_NOPROMPT) ! free pLen ! free pOutConnString ! free pConnString ! return res connectHelper :: (HDBC -> IO SQLRETURN) -> IO Connection connectHelper connectFunction = withForeignPtr myEnvironment $ \hEnv -> do ! (phDBC :: Ptr HDBC) <- malloc ! res <- sqlAllocConnect hEnv phDBC ! hDBC <- peek phDBC ! free phDBC ! handleSqlResult (#const SQL_HANDLE_ENV) hEnv res res <- connectFunction hDBC handleSqlResult (#const SQL_HANDLE_DBC) hDBC res --- 138,153 ---- driverConnect :: String -- ^ Connection string -> IO Connection -- ^ the returned value represents the new connection ! driverConnect connString = connectHelper $ \hDBC -> ! withCString connString $ \pConnString -> ! allocaBytes 1024 $ \pOutConnString -> ! alloca $ \pLen -> ! sqlDriverConnect hDBC nullPtr pConnString (#const SQL_NTS) pOutConnString 1024 pLen (#const SQL_DRIVER_NOPROMPT) connectHelper :: (HDBC -> IO SQLRETURN) -> IO Connection connectHelper connectFunction = withForeignPtr myEnvironment $ \hEnv -> do ! hDBC <- alloca $ \ (phDBC :: Ptr HDBC) -> do ! res <- sqlAllocConnect hEnv phDBC ! handleSqlResult (#const SQL_HANDLE_ENV) hEnv res ! peek phDBC res <- connectFunction hDBC handleSqlResult (#const SQL_HANDLE_DBC) hDBC res *************** *** 186,222 **** execute :: HDBC -> String -> IO () ! execute hDBC query = do ! pFIELD <- mallocBytes (#const sizeof(FIELD)) ! res <- sqlAllocStmt hDBC ((#ptr FIELD, hSTMT) pFIELD) ! unless (sqlSuccess res) (free pFIELD) handleSqlResult (#const SQL_HANDLE_DBC) hDBC res ! hSTMT <- (#peek FIELD, hSTMT) pFIELD ! let handleResult res = do ! unless (sqlSuccess res) (free pFIELD) ! handleSqlResult (#const SQL_HANDLE_STMT) hSTMT res ! pQuery <- newCString query ! res <- sqlExecDirect hSTMT pQuery (length query) ! free pQuery ! handleResult res ! sqlFreeStmt hSTMT (#const SQL_DROP) >>= handleSqlResult (#const SQL_HANDLE_STMT) hSTMT ! free pFIELD ! stmtBufferSize = 256 withStatement :: Connection -> HDBC -> (HSTMT -> IO SQLRETURN) -> IO Statement ! withStatement connection hDBC f = do ! pFIELD <- mallocBytes (#const sizeof(FIELD)) res <- sqlAllocStmt hDBC ((#ptr FIELD, hSTMT) pFIELD) - unless (sqlSuccess res) (free pFIELD) handleSqlResult (#const SQL_HANDLE_DBC) hDBC res hSTMT <- (#peek FIELD, hSTMT) pFIELD ! let handleResult res = do ! unless (sqlSuccess res) (free pFIELD) ! 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 - free pFIELD buffer <- mallocBytes (fromIntegral stmtBufferSize) refFalse <- newMVar False --- 172,199 ---- execute :: HDBC -> String -> IO () ! execute hDBC query = allocaBytes (#const sizeof(HSTMT)) $ ! \pStmt -> do ! res <- sqlAllocStmt hDBC pStmt handleSqlResult (#const SQL_HANDLE_DBC) hDBC res ! hSTMT <- peek pStmt ! withCStringLen query $ \(pQuery,len) -> do ! res <- sqlExecDirect hSTMT pQuery len ! handleSqlResult (#const SQL_HANDLE_STMT) hSTMT res ! res <- sqlFreeStmt hSTMT (#const SQL_DROP) ! handleSqlResult (#const SQL_HANDLE_STMT) hSTMT res ! stmtBufferSize = 256 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 hSTMT <- (#peek FIELD, hSTMT) pFIELD ! 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 *************** *** 236,240 **** | otherwise = do res <- sqlDescribeCol hSTMT n ((#ptr FIELD, fieldName) pFIELD) (#const FIELD_NAME_LENGTH) ((#ptr FIELD, NameLength) pFIELD) ((#ptr FIELD, DataType) pFIELD) ((#ptr FIELD, ColumnSize) pFIELD) ((#ptr FIELD, DecimalDigits) pFIELD) ((#ptr FIELD, Nullable) pFIELD) - unless (sqlSuccess res) (free pFIELD) handleSqlResult (#const SQL_HANDLE_STMT) hSTMT res name <- peekCString ((#ptr FIELD, fieldName) pFIELD) --- 213,216 ---- |
From: <br...@us...> - 2004-02-28 19:44:20
|
Update of /cvsroot/htoolkit/HSQL/src/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10379 Modified Files: ODBC.hsc Log Message: Fixed a statement handle leak. This would cause programs to leak about 10k / statement. Earlier, SQLFreeStmt was called with Option = SQL_CLOSE (0) which just closes the cursor and discards the results, but doesn't free the statement. Now SQLFreeStmt is called with Option = (SQL_DROP) (1), which frees the statement. Index: ODBC.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/ODBC.hsc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ODBC.hsc 24 Feb 2004 08:45:20 -0000 1.8 --- ODBC.hsc 28 Feb 2004 19:26:46 -0000 1.9 *************** *** 199,203 **** free pQuery handleResult res ! sqlFreeStmt hSTMT 0 >>= handleSqlResult (#const SQL_HANDLE_STMT) hSTMT free pFIELD --- 199,203 ---- free pQuery handleResult res ! sqlFreeStmt hSTMT (#const SQL_DROP) >>= handleSqlResult (#const SQL_HANDLE_STMT) hSTMT free pFIELD *************** *** 378,380 **** closeStatement hSTMT buffer = do free buffer ! sqlFreeStmt hSTMT 0 >>= handleSqlResult (#const SQL_HANDLE_STMT) hSTMT --- 378,380 ---- closeStatement hSTMT buffer = do free buffer ! sqlFreeStmt hSTMT (#const SQL_DROP) >>= handleSqlResult (#const SQL_HANDLE_STMT) hSTMT |
From: <br...@us...> - 2004-02-26 21:08:07
|
Update of /cvsroot/htoolkit/HSQL/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24935/src Modified Files: HSQL.hsc Log Message: added conversion of SqlDecimal to Double Index: HSQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL.hsc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** HSQL.hsc 25 Feb 2004 09:51:32 -0000 1.10 --- HSQL.hsc 26 Feb 2004 20:52:06 -0000 1.11 *************** *** 265,268 **** --- 265,269 ---- instance SqlBind Double where + fromSqlValue (SqlDecimal _ _) s = Just (read s) fromSqlValue (SqlNumeric _ _) s = Just (read s) fromSqlValue SqlDouble s = Just (read s) |
From: <kr_...@us...> - 2004-02-25 13:12:11
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11268/src/cbits/Win32 Modified Files: Frame.c StatusBar.c Log Message: bugfix Index: Frame.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Frame.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Frame.c 18 Nov 2003 18:03:41 -0000 1.22 --- Frame.c 25 Feb 2004 12:57:11 -0000 1.23 *************** *** 144,148 **** RelayoutFrameBars(); RefreshStatusBarIndicators(); ! break; case WM_COMMAND: if (lParam == 0) --- 144,148 ---- RelayoutFrameBars(); RefreshStatusBarIndicators(); ! return 0; case WM_COMMAND: if (lParam == 0) Index: StatusBar.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/StatusBar.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** StatusBar.c 22 Nov 2003 09:35:42 -0000 1.5 --- StatusBar.c 25 Feb 2004 12:57:11 -0000 1.6 *************** *** 87,90 **** --- 87,93 ---- RECT rect; + if (!pData || !pData->hStatusBar) + return; + GetClientRect(pData->hStatusBar, &rect); |
From: <kr_...@us...> - 2004-02-25 11:02:27
|
Update of /cvsroot/htoolkit/HSQL/src/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19986/src/HSQL Modified Files: Types.hs Log Message: Added custon instance for Show SqlError. The new instance converts the SqlError value to user readable string. Index: Types.hs =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/Types.hs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Types.hs 10 Feb 2004 11:30:52 -0000 1.5 --- Types.hs 25 Feb 2004 10:47:16 -0000 1.6 *************** *** 84,88 **** | SqlUnsupportedOperation | SqlClosedHandle - deriving Show sqlErrorTc :: TyCon --- 84,87 ---- *************** *** 92,95 **** --- 91,105 ---- typeOf _ = mkAppTy sqlErrorTc [] + instance Show SqlError where + showsPrec _ (SqlError{seErrorMsg=msg}) = showString msg + showsPrec _ SqlNoData = showString "No data" + showsPrec _ SqlInvalidHandle = showString "Invalid handle" + showsPrec _ SqlStillExecuting = showString "Stlll executing" + showsPrec _ SqlNeedData = showString "Need data" + showsPrec _ (SqlBadTypeCast name tp) = showString ("The type of " ++ name ++ " field can't be converted to " ++ show tp ++ " type") + showsPrec _ (SqlFetchNull name) = showString ("The value of " ++ name ++ " field is null") + showsPrec _ (SqlUnknownField name) = showString ("Unknown field name: " ++ name) + showsPrec _ SqlUnsupportedOperation = showString "Unsupported operation" + showsPrec _ SqlClosedHandle = showString "The referenced handle is already closed" -- | A 'Connection' type represents a connection to a database, through which you can operate on the it. |
From: <kr_...@us...> - 2004-02-25 10:06:25
|
Update of /cvsroot/htoolkit/HSQL/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9065/src Modified Files: HSQL.hsc Log Message: export toSqlValue function Index: HSQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL.hsc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** HSQL.hsc 22 Feb 2004 11:57:54 -0000 1.9 --- HSQL.hsc 25 Feb 2004 09:51:32 -0000 1.10 *************** *** 28,32 **** -- * Retrieving Statement values and types ! , FieldDef, SqlType(..), SqlBind , getFieldValueMB -- :: SqlBind a => Statement -> String -> IO (Maybe a) , getFieldValue -- :: SqlBind a => Statement -> String -> IO a --- 28,32 ---- -- * Retrieving Statement values and types ! , FieldDef, SqlType(..), SqlBind, toSqlValue , getFieldValueMB -- :: SqlBind a => Statement -> String -> IO (Maybe a) , getFieldValue -- :: SqlBind a => Statement -> String -> IO a |
From: <kr_...@us...> - 2004-02-24 08:59:26
|
Update of /cvsroot/htoolkit/HSQL/src/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22171/src/HSQL Modified Files: ODBC.hsc Log Message: Added driverConnect function Index: ODBC.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/ODBC.hsc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ODBC.hsc 10 Feb 2004 11:30:52 -0000 1.7 --- ODBC.hsc 24 Feb 2004 08:45:20 -0000 1.8 *************** *** 12,16 **** ----------------------------------------------------------------------------------------- ! module Database.HSQL.ODBC(connect, module Database.HSQL) where import Database.HSQL --- 12,16 ---- ----------------------------------------------------------------------------------------- ! module Database.HSQL.ODBC(connect, driverConnect, module Database.HSQL) where import Database.HSQL *************** *** 59,62 **** --- 59,63 ---- foreign import #{CALLCONV} "HsODBC.h SQLFreeConnect" sqlFreeConnect:: HDBC -> IO SQLRETURN foreign import #{CALLCONV} "HsODBC.h SQLConnect" sqlConnect :: HDBC -> CString -> Int -> CString -> Int -> CString -> Int -> IO SQLRETURN + foreign import #{CALLCONV} "HsODBC.h SQLDriverConnect" sqlDriverConnect :: HDBC -> Ptr () -> CString -> SQLSMALLINT -> CString -> SQLSMALLINT -> Ptr SQLSMALLINT -> SQLUSMALLINT -> IO SQLRETURN foreign import #{CALLCONV} "HsODBC.h SQLDisconnect" sqlDisconnect :: HDBC -> IO SQLRETURN foreign import #{CALLCONV} "HsODBC.h SQLAllocStmt" sqlAllocStmt :: HDBC -> Ptr HSTMT -> IO SQLRETURN *************** *** 131,140 **** -> String -- ^ Authentication string (password) -> IO Connection -- ^ the returned value represents the new connection ! connect server user authentication = withForeignPtr myEnvironment $ \hEnv -> do ! (phDBC :: Ptr HDBC) <- malloc ! res <- sqlAllocConnect hEnv phDBC ! hDBC <- peek phDBC ! free phDBC ! handleSqlResult (#const SQL_HANDLE_ENV) hEnv res pServer <- newCString server pUser <- newCString user --- 132,136 ---- -> String -- ^ Authentication string (password) -> IO Connection -- ^ the returned value represents the new connection ! connect server user authentication = connectHelper $ \hDBC -> do pServer <- newCString server pUser <- newCString user *************** *** 144,147 **** --- 140,168 ---- free pUser free pAuthentication + return res + + -- | 'driverConnect' is an alternative to 'connect'. It supports data sources that + -- require more connection information than the three arguments in 'connect' + -- and data sources that are not defined in the system information. + driverConnect :: String -- ^ Connection string + -> IO Connection -- ^ the returned value represents the new connection + driverConnect connString = connectHelper $ \hDBC -> do + pConnString <- newCString connString + pOutConnString <- mallocBytes 1024 + pLen <- malloc + res <- sqlDriverConnect hDBC nullPtr pConnString (fromIntegral (length connString)) pOutConnString 1024 pLen (#const SQL_DRIVER_NOPROMPT) + free pLen + free pOutConnString + free pConnString + return res + + connectHelper :: (HDBC -> IO SQLRETURN) -> IO Connection + connectHelper connectFunction = withForeignPtr myEnvironment $ \hEnv -> do + (phDBC :: Ptr HDBC) <- malloc + res <- sqlAllocConnect hEnv phDBC + hDBC <- peek phDBC + free phDBC + handleSqlResult (#const SQL_HANDLE_ENV) hEnv res + res <- connectFunction hDBC handleSqlResult (#const SQL_HANDLE_DBC) hDBC res refFalse <- newMVar False |
From: <kr_...@us...> - 2004-02-22 22:33:26
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11977/src/cbits/Win32 Modified Files: ListBox.c Log Message: Use bitmaps to get better look of checked list box Index: ListBox.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ListBox.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ListBox.c 25 Nov 2003 14:12:22 -0000 1.8 --- ListBox.c 22 Feb 2004 22:20:25 -0000 1.9 *************** *** 3,7 **** #include "Handlers_stub.h" #include <windowsx.h> ! void DrawCheckListBoxItem(LPDRAWITEMSTRUCT lpDIS) { --- 3,47 ---- #include "Handlers_stub.h" #include <windowsx.h> ! ! static unsigned char bits[] = ! {0x42,0x4D,0x52,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x28,0x00, ! 0x00,0x00,0x21,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x00,0x00, ! 0x00,0x00,0xDC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00, ! 0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x80, ! 0x00,0x00,0x00,0x80,0x80,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x80, ! 0x00,0x00,0xC0,0xC0,0xC0,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0xFF,0x00,0x00,0xFF, ! 0x00,0x00,0x00,0xFF,0xFF,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF, ! 0x00,0x00,0xFF,0xFF,0xFF,0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88, ! 0x88,0x88,0x88,0x88,0x88,0x88,0x80,0x00,0x00,0x00,0x8F,0xFF,0xFF,0xFF,0xFF,0x88, ! 0xFF,0xFF,0xFF,0xFF,0xF8,0x87,0x77,0x77,0x77,0x77,0x80,0x00,0x00,0x00,0x8F,0xFF, ! 0xFF,0xFF,0xFF,0x88,0xFF,0xF0,0xFF,0xFF,0xF8,0x87,0x77,0x87,0x77,0x77,0x80,0x00, ! 0x00,0x00,0x8F,0xFF,0xFF,0xFF,0xFF,0x88,0xFF,0x00,0x0F,0xFF,0xF8,0x87,0x78,0x88, ! 0x77,0x77,0x80,0x00,0x00,0x00,0x8F,0xFF,0xFF,0xFF,0xFF,0x88,0xF0,0x00,0x00,0xFF, ! 0xF8,0x87,0x88,0x88,0x87,0x77,0x80,0x00,0x00,0x00,0x8F,0xFF,0xFF,0xFF,0xFF,0x88, ! 0xF0,0x0F,0x00,0x0F,0xF8,0x87,0x88,0x78,0x88,0x77,0x80,0x00,0x00,0x00,0x8F,0xFF, ! 0xFF,0xFF,0xFF,0x88,0xF0,0xFF,0xF0,0x00,0xF8,0x87,0x87,0x77,0x88,0x87,0x80,0x00, ! 0x00,0x00,0x8F,0xFF,0xFF,0xFF,0xFF,0x88,0xFF,0xFF,0xFF,0x00,0xF8,0x87,0x77,0x77, ! 0x78,0x87,0x80,0x00,0x00,0x00,0x8F,0xFF,0xFF,0xFF,0xFF,0x88,0xFF,0xFF,0xFF,0xF0, ! 0xF8,0x87,0x77,0x77,0x77,0x87,0x80,0x00,0x00,0x00,0x8F,0xFF,0xFF,0xFF,0xFF,0x88, ! 0xFF,0xFF,0xFF,0xFF,0xF8,0x87,0x77,0x77,0x77,0x77,0x80,0x00,0x00,0x00,0x88,0x88, ! 0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x80,0x00, ! 0x00,0x00 ! }; ! ! static HBITMAP GetCheckListBitmap(HDC hDC) ! { ! static HBITMAP hCheckListBitmap = NULL; ! ! if (!hCheckListBitmap) ! { ! BITMAPINFO *lpbmi = (BITMAPINFO *) (bits+sizeof(BITMAPFILEHEADER)); ! VOID *lpbInit = bits+((BITMAPFILEHEADER *) bits)->bfOffBits; ! ! hCheckListBitmap = CreateDIBitmap(hDC,&lpbmi->bmiHeader,CBM_INIT,lpbInit,lpbmi,DIB_RGB_COLORS); ! } ! ! return hCheckListBitmap; ! } ! void DrawCheckListBoxItem(LPDRAWITEMSTRUCT lpDIS) { *************** *** 16,21 **** --- 56,64 ---- int nTextLen; LPCSTR lpszText; + HDC hMemDC; + int nItemData; cyItem = SendMessage(lpDIS->hwndItem, LB_GETITEMHEIGHT, lpDIS->itemID, 0); + nItemData = SendMessage(lpDIS->hwndItem, LB_GETITEMDATA, lpDIS->itemID, 0); fDisabled = !IsWindowEnabled(lpDIS->hwndItem); *************** *** 48,66 **** ETO_OPAQUE, &lpDIS->rcItem, lpszText, nTextLen, NULL); ! Rectangle(lpDIS->hDC, 1, lpDIS->rcItem.top+1, cyItem-1, lpDIS->rcItem.top+cyItem-1); ! ! if (SendMessage(lpDIS->hwndItem, LB_GETITEMDATA, lpDIS->itemID, 0) > 0) ! { ! HPEN hPen, hOldPen; ! ! hPen = CreatePen(PS_SOLID, 2, newTextColor); ! hOldPen = SelectObject(lpDIS->hDC, hPen); ! ! MoveToEx(lpDIS->hDC, 3, lpDIS->rcItem.top+cyItem/2-1, NULL); ! LineTo(lpDIS->hDC, cyItem/2, lpDIS->rcItem.top+cyItem-4); ! LineTo(lpDIS->hDC, cyItem-4, lpDIS->rcItem.top+3); ! ! SelectObject(lpDIS->hDC, hOldPen); ! } rfree(lpszText); --- 91,100 ---- ETO_OPAQUE, &lpDIS->rcItem, lpszText, nTextLen, NULL); ! hMemDC = CreateCompatibleDC(lpDIS->hDC); ! SelectObject(hMemDC, GetCheckListBitmap(lpDIS->hDC)); ! BitBlt(lpDIS->hDC, 1, lpDIS->rcItem.top+(cyItem-11)/2, 11, 11, ! hMemDC, (nItemData <= 0) ? 0 : 11, 0, ! SRCCOPY); ! DeleteDC(hMemDC); rfree(lpszText); *************** *** 107,111 **** handleControlCommand(hWnd); ! SendMessage(hWnd, LB_GETITEMRECT, nIndex, (LPARAM)&rect); rect.right = rect.left + cyItem; --- 141,145 ---- handleControlCommand(hWnd); ! SendMessage(hWnd, LB_GETITEMRECT, nIndex, (LPARAM)&rect); rect.right = rect.left + cyItem; |
From: <br...@us...> - 2004-02-22 12:11:21
|
Update of /cvsroot/htoolkit/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1115 Modified Files: Makefile Log Message: removed haddock import directive for files that are not always available Index: Makefile =================================================================== RCS file: /cvsroot/htoolkit/HSQL/Makefile,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile 11 Feb 2004 19:05:41 -0000 1.12 --- Makefile 22 Feb 2004 11:58:30 -0000 1.13 *************** *** 139,143 **** docs : $(HS_PPS) mkdir -p $(DOCDIR) ! $(HADDOCK) -h -o $(DOCDIR) $(HS_PPS) -ihttp://www.haskell.org/ghc/docs/latest/html/libraries/base,/usr/share/ghc-6.2/html/libraries/base/base.haddock --- 139,143 ---- docs : $(HS_PPS) mkdir -p $(DOCDIR) ! $(HADDOCK) -h -o $(DOCDIR) $(HS_PPS) |
From: <br...@us...> - 2004-02-22 12:10:32
|
Update of /cvsroot/htoolkit/HSQL/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1002/src Modified Files: HSQL.hsc Log Message: inTransaction now does rollback on all exceptions, not just SqlErrors Index: HSQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL.hsc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** HSQL.hsc 11 Feb 2004 19:05:41 -0000 1.8 --- HSQL.hsc 22 Feb 2004 11:57:54 -0000 1.9 *************** *** 58,61 **** --- 58,62 ---- ) where + import Prelude hiding (catch) import Foreign import Foreign.C *************** *** 66,70 **** import System.IO.Unsafe(unsafePerformIO) import Control.Monad(when,unless,mplus) ! import Control.Exception (throwDyn, catchDyn, dynExceptions, Exception(..), finally) import Control.Concurrent.MVar import Text.ParserCombinators.ReadP --- 67,71 ---- import System.IO.Unsafe(unsafePerformIO) import Control.Monad(when,unless,mplus) ! import Control.Exception (throwDyn, catchDyn, dynExceptions, Exception(..), finally, catch, throwIO) import Control.Concurrent.MVar import Text.ParserCombinators.ReadP *************** *** 144,150 **** inTransaction conn action = do checkHandle (connClosed conn) (connBeginTransaction conn) ! r <- catchSql (action conn) (\err -> do checkHandle (connClosed conn) (connRollbackTransaction conn) ! throwDyn err) checkHandle (connClosed conn) (connCommitTransaction conn) return r --- 145,151 ---- inTransaction conn action = do checkHandle (connClosed conn) (connBeginTransaction conn) ! r <- catch (action conn) (\err -> do checkHandle (connClosed conn) (connRollbackTransaction conn) ! throwIO err) checkHandle (connClosed conn) (connCommitTransaction conn) return r |
From: <kr_...@us...> - 2004-02-22 10:42:33
|
Update of /cvsroot/htoolkit/port/src/Port In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18909/src/Port Modified Files: Types.hs Log Message: Make the package compatible with GHC-6.2 Index: Types.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port/Types.hs,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** Types.hs 16 Nov 2003 13:25:20 -0000 1.34 --- Types.hs 22 Feb 2004 10:29:56 -0000 1.35 *************** *** 854,858 **** fromCBitmap :: BitmapHandle -> IO Bitmap fromCBitmap bh ! = do bm <- newForeignPtr bh osDeleteBitmap return (Bitmap bm) foreign import ccall "&osDeleteBitmap" osDeleteBitmap :: FinalizerPtr BH --- 854,858 ---- fromCBitmap :: BitmapHandle -> IO Bitmap fromCBitmap bh ! = do bm <- newForeignPtr osDeleteBitmap bh return (Bitmap bm) foreign import ccall "&osDeleteBitmap" osDeleteBitmap :: FinalizerPtr BH *************** *** 940,944 **** fromCFont :: FontDef -> FontHandle -> IO Font fromCFont fontdef handle ! = do fhandle <- newForeignPtr handle osDeleteFont return (Font fhandle fontdef) foreign import ccall "&osDeleteFont" osDeleteFont :: FinalizerPtr FH --- 940,944 ---- fromCFont :: FontDef -> FontHandle -> IO Font fromCFont fontdef handle ! = do fhandle <- newForeignPtr osDeleteFont handle return (Font fhandle fontdef) foreign import ccall "&osDeleteFont" osDeleteFont :: FinalizerPtr FH |