diff -r 2fa3bb7785ee -r 7f29a65aa1e4 tools/pas2c/Pas2C.hs --- a/tools/pas2c/Pas2C.hs Sun Feb 09 19:00:13 2014 +0100 +++ b/tools/pas2c/Pas2C.hs Mon Feb 10 00:43:03 2014 +0400 @@ -1140,6 +1140,7 @@ a -> error $ "Getting element of " ++ show a ++ "\nReference: " ++ show ae case t of BTString -> return $ r <> text ".s" <> brackets e + BTAString -> return $ r <> text ".s" <> brackets e _ -> return $ r <> brackets e ref2C (SimpleReference name) = id2C IOLookup name ref2C rf@(RecordField (Dereference ref1) ref2) = do @@ -1202,6 +1203,7 @@ ("pchar", BTAString) -> ref2C $ FunCall [expr] (SimpleReference (Identifier "_pcharA" $ BTPointerTo BTChar)) ("shortstring", BTAString) -> ref2C $ FunCall [expr] (SimpleReference (Identifier "astr2str" $ BTString)) ("shortstring", BTPointerTo _) -> ref2C $ FunCall [expr] (SimpleReference (Identifier "pchar2str" $ BTString)) + ("ansistring", BTPointerTo _) -> ref2C $ FunCall [expr] (SimpleReference (Identifier "pchar2astr" $ BTAString)) ("ansistring", BTString) -> ref2C $ FunCall [expr] (SimpleReference (Identifier "str2astr" $ BTAString)) (a, _) -> do e <- expr2C expr