See ChangeLog entry 2000-04-11 20:00 GMT-4 David G. Holm <dholm@jsd-llc.com>

This commit is contained in:
David G. Holm
2000-04-11 23:59:54 +00:00
parent 7fde401487
commit b8483a6846
3 changed files with 29 additions and 8 deletions

View File

@@ -87,9 +87,9 @@
2000-04-11 14:30 GMT-4 David G. Holm <dholm@jsd-llc.com>
* config/w32/gcc.cf
+ Added LNK_USR_PATH and LNK_USR_LIB environment variables to specify
non-Harbour libraries. Put one or more paths in LNK_USR_PATH and one
or more base library names in LNK_USR_LIB, using spaces to separate.
+ Added LNK_USR_PATH and LNK_USR_LIB environment variables to specify
non-Harbour libraries. Put one or more paths in LNK_USR_PATH and one
or more base library names in LNK_USR_LIB, using spaces to separate.
* tests/inkeytst.prg
% Modularization and display improvements by

View File

@@ -61,6 +61,16 @@ ifneq ($(HB_SCREEN_LIB),)
LINKLIBS += $(HB_SCREEN_LIB)
endif
# Add the optional user path(s)
ifneq ($(LNK_USR_PATH),)
LINKPATHS += $(foreach path, $(LNK_USR_PATH), -L$(path))
endif
# Add the optional user libarary (or libraries)
ifneq ($(LNK_USR_LIB),)
LINKLIBS += $(foreach lib, $(LNK_USR_LIB), $(lib)$(LIB_EXT))
endif
LDFLAGS = $(LINKPATHS)
AR = tlib

View File

@@ -81,7 +81,7 @@ HB_FUNC( CTOD )
if( szDate )
{
int d_pos = 0, m_pos = 0, y_pos = 0;
int count, digit, size = strlen( hb_set.HB_SET_DATEFORMAT );
int count, digit, non_digit, size = strlen( hb_set.HB_SET_DATEFORMAT );
for( count = 0; count < size; count++ )
{
@@ -116,25 +116,36 @@ HB_FUNC( CTOD )
}
}
/* If there are non-digits at the start of the date field,
they are not to be treated as date field separators */
non_digit = 1;
size = strlen( szDate );
for( count = 0; count < size; count++ )
{
digit = szDate[ count ];
if( isdigit( digit ) )
{
/* Process the digit for the current date field */
if( d_pos == 1 )
d_value = ( d_value * 10 ) + digit - '0';
else if( m_pos == 1 )
m_value = ( m_value * 10 ) + digit - '0';
else if( y_pos == 1 )
y_value = ( y_value * 10 ) + digit - '0';
/* Treat the next non-digit as a date field separator */
non_digit = 0;
}
else if( digit != ' ' )
{
d_pos--;
m_pos--;
y_pos--;
/* Process the non-digit */
if( non_digit++ == 0 )
{
/* Only move to the next date field on the first
consecutive non-digit that is encountered */
d_pos--;
m_pos--;
y_pos--;
}
}
}