2002-03-13 13:25 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su>

This commit is contained in:
Alexander S.Kresin
2002-03-13 10:21:31 +00:00
parent cc0669d00d
commit 92c853f1b6
5 changed files with 61 additions and 12 deletions

View File

@@ -7,6 +7,14 @@
For example:
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2002-03-14 14:00 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su>
* source/rdd/dbfntx/dbfntx1.c
! bug fixed in seeking, reported by Mikhail Malyh
2002-03-14 11:12 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su>
* source/rdd/dbcmd.c
! bug fixed, reported by Mikhail Malyh.
It was related to COPY FIELDS ... TO command
2002-03-13 14:07 UTC-0800 Ron Pinkas <ron@ronpinkas.com>
* source/compiler/harbour.slx

View File

@@ -11,15 +11,8 @@ _______________________________________________________________________
Topic Responsible developer(s)
=================================== =========================
TEXT/ENDTEXT support ???
DBFCDX support Ryszard Glab
Fixing internal HVM/RTL handling of string ???
items (Clipper passes a pointer to the same
allocated memory instead of creating
string copies)
Remove #pragma pack() tricks ???
from rdd .h files.

View File

@@ -66,6 +66,10 @@
#include "hbpp.h"
#include "hbcomp.h"
static int strncmp_nocase( char* s1, char* s2, int n );
extern BOOL hb_ppInsideTextBlock;
BOOL hb_pp_bInline = FALSE;
static char s_szLine[ HB_PP_STR_SIZE ];
@@ -110,6 +114,35 @@ int hb_pp_Internal( FILE * handl_o, char * sOut )
break;
}
if( hb_ppInsideTextBlock )
{
char cQuote;
int i;
if( !strncmp_nocase( s_szLine,"ENDTEXT",7 ) && *(s_szLine+7) <= ' ' )
{
hb_ppInsideTextBlock = FALSE;
strcpy( s_szLine,"__TextRestore()" );
break;
}
if( !strchr( s_szLine,'\"' ) )
cQuote = '\"';
else if( !strchr( s_szLine,'\'' ) )
cQuote = '\'';
else
cQuote = '[';
s_szLine[ lens++ ] = ( cQuote == '[' )? ']':cQuote;
s_szLine[ lens++ ] = ')';
s_szLine[ lens ] = '\0';
for( i=lens;i>=0;i-- )
*( s_szLine+i+6 ) = *( s_szLine+i );
s_szLine[0] = 'Q'; s_szLine[1] = 'O'; s_szLine[2] = 'u';
s_szLine[3] = 't'; s_szLine[4] = '('; s_szLine[5] = cQuote;
break;
}
if( s_szLine[ lens - 1 ] == ';' )
{
lContinue = 1;
@@ -171,6 +204,12 @@ int hb_pp_Internal( FILE * handl_o, char * sOut )
hb_pp_LastOutLine = hb_comp_iLine;
*/
hb_pp_ParseExpression( ptr, s_szOutLine );
if( !strncmp( ptr,"text QOut;",10 ) )
{
/* printf( "\ntext QOut %d\n",strlen(ptr) ); */
memcpy( ptr, ptr+10, strlen(ptr)-9 );
hb_ppInsideTextBlock = TRUE;
}
}
else
*s_szLine = '\0';
@@ -333,3 +372,11 @@ int hb_pp_ReadRules( void )
}
}
static int strncmp_nocase( char* s1, char* s2, int n )
{
int i;
for( i=0;i<n;i++,s1++,s2++ )
if( toupper(*s1) != *s2 )
return ( toupper(*s1) - *s2 );
return 0;
}

View File

@@ -184,6 +184,7 @@ static char s_prevchar;
int * hb_pp_aCondCompile = NULL;
int hb_pp_nCondCompile = 0;
BOOL hb_ppInsideTextBlock = FALSE;
char * hb_pp_STD_CH = NULL;
@@ -3082,7 +3083,7 @@ int hb_pp_RdStr( FILE * handl_i, char * buffer, int maxlen, BOOL lDropSpaces, ch
break;
case '/':
if( readed>0 && buffer[readed-1] == '/' )
if( readed>0 && buffer[readed-1] == '/' && !hb_ppInsideTextBlock )
{
maxlen = 0;
readed--;
@@ -3090,7 +3091,7 @@ int hb_pp_RdStr( FILE * handl_i, char * buffer, int maxlen, BOOL lDropSpaces, ch
break;
case '*':
if( readed > 0 && buffer[readed-1] == '/' )
if( readed > 0 && buffer[readed-1] == '/' && !hb_ppInsideTextBlock )
{
s_ParseState = STATE_COMMENT;
readed--;

View File

@@ -188,9 +188,9 @@ void hb_pp_Table( void )
static COMMANDS sC___64 = {0,"?","[ \1A10]","QOut( \1A00 )",&sC___63 };
static COMMANDS sC___65 = {0,"?","? [ \1A10]","QQOut( \1A00 )",&sC___64 };
static COMMANDS sC___66 = {0,"EJECT","","__Eject()",&sC___65 };
static COMMANDS sC___67 = {0,"TEXT","","text QOut, QQOut",&sC___66 };
static COMMANDS sC___68 = {0,"TEXT","TO FILE \1A40","__TextSave( \1A30 ) ; text QOut, __TextRestore",&sC___67 };
static COMMANDS sC___69 = {0,"TEXT","TO PRINTER","__TextSave('PRINTER') ; text QOut, __TextRestore",&sC___68 };
static COMMANDS sC___67 = {0,"TEXT","","text QOut;",&sC___66 };
static COMMANDS sC___68 = {0,"TEXT","TO FILE \1A40","text QOut; __TextSave( \1A30 )",&sC___67 };
static COMMANDS sC___69 = {0,"TEXT","TO PRINTER","text QOut;__TextSave('PRINTER')",&sC___68 };
static COMMANDS sC___70 = {0,"CLS","","Scroll() ; SetPos(0,0)",&sC___69 };
static COMMANDS sC___71 = {0,"CLEAR","SCREEN","CLS",&sC___70 };
static COMMANDS sC___72 = {0,"@","\1A00, \1B00","Scroll( \1A00, \1B00, \1A00 ) ; SetPos( \1A00, \1B00 )",&sC___71 };