2008-10-08 01:31 UTC+0200 Viktor Szakats (harbour.01 syenar hu)

* source/compiler/gencc.c
    * Trick to avoid MSVC -W4 warnings in -gc3 compiled C code, 
      when compiled string literal contained certain high (> 127) 
      chars followed by a digit. Thanks Przemek.
      NOTE: I've checked and hexadecimal format has even more 
            such problems.
This commit is contained in:
Viktor Szakats
2008-10-07 23:34:32 +00:00
parent 77b3d1b628
commit e4e144bb83
2 changed files with 11 additions and 1 deletions

View File

@@ -8,6 +8,14 @@
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2008-10-08 01:31 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/compiler/gencc.c
* Trick to avoid MSVC -W4 warnings in -gc3 compiled C code,
when compiled string literal contained certain high (> 127)
chars followed by a digit. Thanks Przemek.
NOTE: I've checked and hexadecimal format has even more
such problems.
2008-10-07 21:27 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/runner.c
* harbour/source/vm/codebloc.c

View File

@@ -66,7 +66,9 @@ void hb_compGenCString( FILE * yyc, BYTE * pText, ULONG ulLen )
if( uchr == '"' || uchr == '\\' || uchr == '?' )
fprintf( yyc, "\\%c", uchr );
else if( uchr < ( BYTE ) ' ' || uchr >= 127 )
fprintf( yyc, "\\%03o", uchr );
fprintf( yyc, "\\%03o%s", uchr, ulPos < ulLen - 1 &&
pText[ ulPos + 1 ] >= ( BYTE ) '0' &&
pText[ ulPos + 1 ] <= ( BYTE ) '9' ? "\" \"" : "" );
else
fprintf( yyc, "%c", uchr );
}