From 83c724ee05216be8ddccbd20c45eb87a3c380420 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 10 Nov 2009 17:54:53 +0000 Subject: [PATCH] 2009-11-10 18:54 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * tests/cpinfo.prg + Avoiding memowrit() since it will append a Chr(26) which may cause problems. --- harbour/ChangeLog | 5 +++++ harbour/tests/cpinfo.prg | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 45e184b04e..4598513e0b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-10 18:54 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * tests/cpinfo.prg + + Avoiding memowrit() since it will append a Chr(26) which + may cause problems. + 2009-11-10 18:24 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/tests/cpinfo.prg * harbour/include/hbapicdp.h diff --git a/harbour/tests/cpinfo.prg b/harbour/tests/cpinfo.prg index 99a8246a33..3d44025761 100644 --- a/harbour/tests/cpinfo.prg +++ b/harbour/tests/cpinfo.prg @@ -15,6 +15,7 @@ * */ +#include "fileio.ch" proc main( cdp, info, unicode ) local cUp, cLo, cUp2, cLo2, cOrd, cOrd2, c, i, a @@ -33,7 +34,7 @@ proc main( cdp, info, unicode ) #endif if !empty( cdp ) - memowrit( "cp" + lower( cdp ) + ".c", genCP( cdp, info, unicode ) ) + my_memowrit( "cp" + lower( cdp ) + ".c", genCP( cdp, info, unicode ) ) endif a := array( 256 ) @@ -406,3 +407,12 @@ func a2def( a ) cData += iif( i == 1, "", "," ) + ltrim( str( a[ i ] ) ) next return cData + +static func my_memowrit( fname, data ) + local f := fcreate( fname ) + local r := .f. + if f != F_ERROR + r := ( fwrite( f, data ) == Len( data ) ) + fclose( f ) + endif +return r