X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Text%2FRegex%2FPosix.hsc;h=1035518752b238f1a64d324b3f3631c55c640fec;hb=9fa9bc17072a58c0bae2cce4764d38677e96ac29;hp=414a5c134c61d8e5f48561f2802d90d981de6f22;hpb=ba54d1a5466a3dc2b3f47c5a0216c914b12dfb66;p=ghc-base.git diff --git a/Text/Regex/Posix.hsc b/Text/Regex/Posix.hsc index 414a5c1..1035518 100644 --- a/Text/Regex/Posix.hsc +++ b/Text/Regex/Posix.hsc @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- +-- | -- Module : Text.Regex.Posix -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/core/LICENSE) @@ -8,7 +8,7 @@ -- Stability : experimental -- Portability : non-portable (only on platforms that provide POSIX regexps) -- --- $Id: Posix.hsc,v 1.4 2002/02/13 11:52:42 simonmar Exp $ +-- $Id: Posix.hsc,v 1.7 2002/04/24 16:31:47 simonmar Exp $ -- -- Interface to the POSIX regular expression library. -- ToDo: should have an interface using PackedStrings. @@ -32,6 +32,7 @@ module Text.Regex.Posix ( regNewline -- (flag to regcomp) '.' doesn't match newline ) where +#include #include "regex.h" import Prelude @@ -145,12 +146,12 @@ unpack string p_match = do type CRegex = () type CRegMatch = () -foreign import "regcomp" unsafe +foreign import ccall unsafe "regcomp" c_regcomp :: Ptr CRegex -> CString -> CInt -> IO CInt -foreign import "regfree" unsafe +foreign import ccall unsafe "regfree" c_regfree :: Ptr CRegex -> IO () -foreign import "regexec" unsafe +foreign import ccall unsafe "regexec" c_regexec :: Ptr CRegex -> CString -> CSize -> Ptr CRegMatch -> CInt -> IO CInt