-----------------------------------------------------------------------------
---
+-- |
-- Module : Text.Regex.Posix
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/core/LICENSE)
-- Stability : experimental
-- Portability : non-portable (only on platforms that provide POSIX regexps)
--
--- $Id: Posix.hsc,v 1.3 2001/09/13 11:39:58 simonmar Exp $
---
-- Interface to the POSIX regular expression library.
--- ToDo: detect regex library with configure.
-- ToDo: should have an interface using PackedStrings.
--
-----------------------------------------------------------------------------
regNewline -- (flag to regcomp) '.' doesn't match newline
) where
+#include <sys/types.h>
#include "regex.h"
import Prelude
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