~alcinnz/fontconfig-pure

cc3a295f967085e59ef0ac3ff76cc103f8a710e7 — Adrian Cochrane 2 years ago a327c85
Break infinite loop decoding patterns from C.
2 files changed, 4 insertions(+), 7 deletions(-)

M Graphics/Text/Font/Choose/Pattern.hs
M Main.hs
M Graphics/Text/Font/Choose/Pattern.hs => Graphics/Text/Font/Choose/Pattern.hs +0 -1
@@ 111,7 111,6 @@ thawPattern pat' = allocaBytes patIter'Size $ \iter' -> do
            x <- thawPattern' pat' iter'
            ok' <- fcPatternIterNext pat' iter'
            xs <- if ok' then go iter' else return []
            xs <- go iter'
            return (x : xs)
        else return []
foreign import ccall "FcPatternIterStart" fcPatternIterStart ::

M Main.hs => Main.hs +4 -6
@@ 7,11 7,9 @@ import System.Environment (getArgs)

main :: IO ()
main = do
    print "a"
    args <- getArgs
    print "b"
    let query = nameParse $ case args of {
        [] -> "serif";
        words -> unwords words}
    print "c"
    let (name, objects) = case args of {
        [] -> ("serif", []);
        name:objects -> (name, objects)}
    let query = nameParse name
    print query