From f603cc52090eb41f409a2be23f16a65eae7b4a2f Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Wed, 29 Apr 2009 17:19:47 +0000 Subject: [PATCH] 2009-04-29 19:27 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/compiler/genc.c ! respect \ escaping in C strings when #pragma dump C code is scanned for static Harbour functions --- harbour/ChangeLog | 5 +++++ harbour/source/compiler/genc.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 540ae4599b..7388fe348d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -18,6 +18,11 @@ past entries belonging to these authors: Viktor Szakats. */ +2009-04-29 19:27 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/compiler/genc.c + ! respect \ escaping in C strings when #pragma dump C code is scanned + for static Harbour functions + 2009-04-29 15:57 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/ChangeLog * corrected automatically added ChangeLog entry in my last commit diff --git a/harbour/source/compiler/genc.c b/harbour/source/compiler/genc.c index a150cd9622..a5d3c043a8 100644 --- a/harbour/source/compiler/genc.c +++ b/harbour/source/compiler/genc.c @@ -111,11 +111,17 @@ static void hb_compDumpFindCFunc( HB_COMP_DECL ) { do { ++pszCCode; } while( *pszCCode && *pszCCode != '\n' ); } - else if( ch == '"' ) + else if( ch == '"' || ch == '\'' ) { while( *pszCCode ) { - if( *pszCCode++ == '"' ) + if( *pszCCode == '\\' ) + { + pszCCode++; + if( *pszCCode ) + pszCCode++; + } + else if( *pszCCode++ == ch ) break; } }