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.
This commit is contained in:
Viktor Szakats
2009-11-10 17:54:53 +00:00
parent b7a1bda9c0
commit 83c724ee05
2 changed files with 16 additions and 1 deletions

View File

@@ -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

View File

@@ -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