2000-01-22 19:15 UTC-0800 Brian Hays <bhays@abacuslaw.com>

This commit is contained in:
Brian Hays
2001-01-23 03:11:10 +00:00
parent bb91c813c0
commit d3abe7d275
4 changed files with 22 additions and 22 deletions

View File

@@ -1,3 +1,10 @@
2000-01-22 19:10 UTC-0800 Brian Hays <bhays@abacuslaw.com>
* harbour/include/hbsetup.h
+ added #define OS_EOL_LEN /* # of bytes in End of Line marker */
* source/rtl/console.c
* source/rtl/memoline.c
+ implemented OS_EOL_LEN
2000-01-22 18:00 UTC-0800 Brian Hays <bhays@abacuslaw.com>
* contrib/rdd_ads/adsfunc.c
+ added ADSRegCallBack(cbBlock) and ADSClrCallBack() to register a callback function

View File

@@ -132,7 +132,7 @@
#ifndef HB_SYMBOL_NAME_LEN
/* NOTE: For complete CA-Cl*pper compatibility you can set the maximum
symbol name to 10. Sometimes this can be useful for compiling legacy
symbol name to 10. Sometimes this can be useful for compiling legacy
code. [vszakats] */
/*
#ifdef HB_C52_STRICT
@@ -163,12 +163,14 @@
#define OS_PATH_DELIMITER '\\'
#define OS_PATH_DELIMITER_LIST "\\/:"
#define OS_OPT_DELIMITER_LIST "/-"
#define OS_EOL_LEN 2 /* # of bytes in End of Line marker */
#else
#define OS_UNIX_COMPATIBLE
#define OS_PATH_LIST_SEPARATOR ':'
#define OS_PATH_DELIMITER '/'
#define OS_PATH_DELIMITER_LIST "/"
#define OS_OPT_DELIMITER_LIST "-"
#define OS_EOL_LEN 1
#endif
#else
/* we are assuming here the DOS compatible OS */
@@ -177,6 +179,7 @@
#define OS_PATH_DELIMITER '\\'
#define OS_PATH_DELIMITER_LIST "\\/:"
#define OS_OPT_DELIMITER_LIST "/-"
#define OS_EOL_LEN 2
#endif
#ifndef _POSIX_PATH_MAX

View File

@@ -66,11 +66,7 @@
#endif
/* length of buffer for CR/LF characters */
#if defined(OS_UNIX_COMPATIBLE)
#define CRLF_BUFFER_LEN 2
#else
#define CRLF_BUFFER_LEN 3
#endif
#define CRLF_BUFFER_LEN OS_EOL_LEN + 1
static BOOL s_bInit = FALSE;
static USHORT s_uiPRow;
@@ -446,9 +442,9 @@ HB_FUNC( DISPOUT ) /* writes a single value to the screen, but is not affected b
hb_gtSetColorStr( hb_parc( 2 ) );
pszString = hb_itemString( hb_param( 1, HB_IT_ANY ), &ulLen, &bFreeReq );
hb_gtWrite( ( BYTE * ) pszString, ulLen );
if( bFreeReq )
hb_xfree( pszString );
@@ -457,9 +453,9 @@ HB_FUNC( DISPOUT ) /* writes a single value to the screen, but is not affected b
else if( hb_pcount() >= 1 )
{
pszString = hb_itemString( hb_param( 1, HB_IT_ANY ), &ulLen, &bFreeReq );
hb_gtWrite( ( BYTE * ) pszString, ulLen );
if( bFreeReq )
hb_xfree( pszString );
}
@@ -481,11 +477,11 @@ HB_FUNC( DISPOUTAT ) /* writes a single value to the screen at speficic position
hb_gtGetColorStr( szOldColor );
hb_gtSetColorStr( hb_parc( 4 ) );
pszString = hb_itemString( hb_param( 3, HB_IT_ANY ), &ulLen, &bFreeReq );
hb_gtWriteAt( hb_parni( 1 ), hb_parni( 2 ), ( BYTE * ) pszString, ulLen );
if( bFreeReq )
hb_xfree( pszString );
@@ -494,9 +490,9 @@ HB_FUNC( DISPOUTAT ) /* writes a single value to the screen at speficic position
else if( hb_pcount() >= 3 )
{
pszString = hb_itemString( hb_param( 3, HB_IT_ANY ), &ulLen, &bFreeReq );
hb_gtWriteAt( hb_parni( 1 ), hb_parni( 2 ), ( BYTE * ) pszString, ulLen );
if( bFreeReq )
hb_xfree( pszString );
}

View File

@@ -33,12 +33,6 @@
*
*/
#if defined(OS_UNIX_COMPATIBLE)
#define CRLF_LEN 1
#else
#define CRLF_LEN 2
#endif
#include "hbapi.h"
@@ -77,7 +71,7 @@ HB_FUNC( MEMOLINE )
case HB_CHAR_LF:
ulCurLength = 0;
ulLastSpace = 0;
ulLineEnd = ( ulPos >= CRLF_LEN ) ? ( ulPos - CRLF_LEN ) : ulLineBegin;
ulLineEnd = ( ulPos >= OS_EOL_LEN ) ? ( ulPos - OS_EOL_LEN ) : ulLineBegin;
ulLines++;
if( ulLines < ulLineNumber )
{