diff --git a/harbour/ChangeLog b/harbour/ChangeLog index da50962741..1c3ca17439 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,29 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2003-01-20 00:20 UTC+0100 Martin Vogel + * contrib/libct/Makefile + * contrib/libct/Makefile.bc + * contrib/libct/Makefile.vc + * contrib/libct/readme.txt + * contrib/libct/ctflist.txt + * contrib/libct/tests/Makefile + + contrib/libct/dattim2.prg + + contrib/libct/tests/datetime.prg + + addmonth(),ctodow(),ctomonth(),daysinmonth(),daystomonth(),dmy(), + doy(),isleap(),lastdayom(),ntocdow(),ntocmonth(),quarter(),week() + Thanks to Alan Secker for providing these + functions and the test program; small enhancements, mostly making + the functions interational, docu headers etc. added by me :-) + * contrib/libct/pos1.c + * interpretation of parameter in posalpha(),poslower(),posupper() and + posrange() corrected; thanks to Guenther Steiner + for reporting this bug + + * include/hblang.ch + + added constant definitions accessing language specific string via HB_LANG_MESSAGE() + + 2002-11-01 16:20 UTC-0300 Walter Negro * include/hbexprb.c ! Fix assign to array_at. diff --git a/harbour/contrib/libct/Makefile b/harbour/contrib/libct/Makefile index 2876ab5522..c74cee5e98 100644 --- a/harbour/contrib/libct/Makefile +++ b/harbour/contrib/libct/Makefile @@ -65,6 +65,7 @@ PRG_SOURCES= \ ct.prg \ ctmisc.prg \ datetime.prg \ + dattime2.prg \ invertwin.prg \ numconv.prg \ screen2.prg \ diff --git a/harbour/contrib/libct/ctflist.txt b/harbour/contrib/libct/ctflist.txt index be19607d91..39fcd5df4d 100644 --- a/harbour/contrib/libct/ctflist.txt +++ b/harbour/contrib/libct/ctflist.txt @@ -449,23 +449,23 @@ TOF ;N; ;2.5 date & time functions ;========================= ; -ADDMONTH ;N; +ADDMONTH ;S; BOM ;S; BOQ ;S; BOY ;S; -CTODOW ;N; -CTOMONTH ;N; -DMY ;N; -DOY ;N; +CTODOW ;S; +CTOMONTH ;S; +DMY ;S; +DOY ;S; EOM ;S; EOQ ;S; EOY ;S; -ISLEAP ;N; -LASTDAYOM ;N; -MDY ;N; -NTOCDOW ;N; -NTOCMONTH ;N; -QUARTER ;N; +ISLEAP ;S; +LASTDAYOM ;S; +MDY ;S; +NTOCDOW ;S; +NTOCMONTH ;S; +QUARTER ;S; SECTOTIME ;N; SETDATE ;N; SETTIME ;N; @@ -474,7 +474,7 @@ STOD ;S; TIMETOSEC ;N; TIMEVALID ;N; WAITPERIOD ;N; -WEEK ;N; +WEEK ;S; WOM ;N; ; ; diff --git a/harbour/contrib/libct/makefile.bc b/harbour/contrib/libct/makefile.bc index 42ccf05636..386b5477b9 100644 --- a/harbour/contrib/libct/makefile.bc +++ b/harbour/contrib/libct/makefile.bc @@ -149,6 +149,7 @@ TOOLS_LIB_OBJS = \ $(OBJ_DIR)\ct.obj \ $(OBJ_DIR)\ctmisc.obj \ $(OBJ_DIR)\datetime.obj \ + $(OBJ_DIR)\dattime2.obj \ $(OBJ_DIR)\invertwin.obj \ $(OBJ_DIR)\numconv.obj \ $(OBJ_DIR)\screen2.obj \ @@ -415,6 +416,13 @@ $(OBJ_DIR)\datetime.obj : $(OBJ_DIR)\datetime.c $(CC) $(CLIBFLAGS) -o$@ $** tlib $(TOOLS_LIB) $(ARFLAGS) -+$@,, +$(OBJ_DIR)\dattime2.c : $(TOOLS_DIR)\dattime2.prg + $(HARBOUR_EXE) $(HARBOURFLAGS) $** -o$@ + +$(OBJ_DIR)\dattime2.obj : $(OBJ_DIR)\dattime2.c + $(CC) $(CLIBFLAGS) -o$@ $** + tlib $(TOOLS_LIB) $(ARFLAGS) -+$@,, + $(OBJ_DIR)\invertwin.c : $(TOOLS_DIR)\invertwin.prg $(HARBOUR_EXE) $(HARBOURFLAGS) $** -o$@ diff --git a/harbour/contrib/libct/makefile.vc b/harbour/contrib/libct/makefile.vc index 5fd9521afd..593811f255 100644 --- a/harbour/contrib/libct/makefile.vc +++ b/harbour/contrib/libct/makefile.vc @@ -168,6 +168,7 @@ TOOLS_LIB_OBJS = \ $(OBJ_DIR)\ct.obj \ $(OBJ_DIR)\ctmisc.obj \ $(OBJ_DIR)\datetime.obj \ + $(OBJ_DIR)\dattime2.obj \ $(OBJ_DIR)\invertwin.obj \ $(OBJ_DIR)\numconv.obj \ $(OBJ_DIR)\screen2.obj \ @@ -237,6 +238,7 @@ CLEAN: -@if exist $(OBJ_DIR)\ct.* del $(OBJ_DIR)\ct.* -@if exist $(OBJ_DIR)\ctmisc.* del $(OBJ_DIR)\ctmisc.* -@if exist $(OBJ_DIR)\datetime.* del $(OBJ_DIR)\datetime.* + -@if exist $(OBJ_DIR)\dattime2.* del $(OBJ_DIR)\dattime2.* -@if exist $(OBJ_DIR)\invertwin.* del $(OBJ_DIR)\invertwin.* -@if exist $(OBJ_DIR)\numconv.* del $(OBJ_DIR)\numconv.* -@if exist $(OBJ_DIR)\screen2.* del $(OBJ_DIR)\screen2.* diff --git a/harbour/contrib/libct/pos1.c b/harbour/contrib/libct/pos1.c index 579463e5f8..4952156d16 100644 --- a/harbour/contrib/libct/pos1.c +++ b/harbour/contrib/libct/pos1.c @@ -156,7 +156,7 @@ static void do_pos1 (int iSwitch) }; break; } - if ((iMode && iDoRet) || (!iMode && !iDoRet)) + if ((iMode && !iDoRet) || (!iMode && iDoRet)) { hb_retnl (puc-pcString+1); return; diff --git a/harbour/contrib/libct/readme.txt b/harbour/contrib/libct/readme.txt index c16cf8c150..079542c156 100644 --- a/harbour/contrib/libct/readme.txt +++ b/harbour/contrib/libct/readme.txt @@ -55,6 +55,10 @@ Martin Vogel + CTEXIT() library exit function ++ DAYSINMONTH() Returns the number of days in month + ++ DAYSTOMONTH() Total number of days from first of Jan to beginning of nMonth. + + NUMANDX() \ + NUMORX() | + NUMXORX() |- equivalents to NUMAND(),... functions, but working @@ -88,6 +92,9 @@ Martin Vogel * TOKENUPPER() New 4th parameter +* WEEK() New 2nd parameter ; week() function can either return + "simple week number" of week number defined by ISO 6801 + + WORDREM() remove double characters from a string diff --git a/harbour/contrib/libct/tests/Makefile b/harbour/contrib/libct/tests/Makefile index 270a8f6c56..7d29091a32 100644 --- a/harbour/contrib/libct/tests/Makefile +++ b/harbour/contrib/libct/tests/Makefile @@ -66,6 +66,7 @@ PRG_SOURCES=\ csetatmu.prg \ csetarge.prg \ csetref.prg \ + datetime.prg \ expomant.prg \ finan.prg \ math.prg \ diff --git a/harbour/include/hblang.ch b/harbour/include/hblang.ch index 861c60b7cd..ea2453b7d0 100644 --- a/harbour/include/hblang.ch +++ b/harbour/include/hblang.ch @@ -4,7 +4,7 @@ /* * Harbour Project source code: - * Header file for Class commands + * Header file for language API (Harbour Level) * * Copyright 2001-2002 Viktor Szakats * www - http://www.harbour-project.org @@ -53,7 +53,15 @@ #ifndef HB_LANG_CH_ #define HB_LANG_CH_ -/* Dummy define for start */ -#define HB_I_( x ) x +#define HB_LANG_ITEM_BASE_ID 0 +#define HB_LANG_ITEM_BASE_MONTH 6 +#define HB_LANG_ITEM_BASE_DAY 18 +#define HB_LANG_ITEM_BASE_NATMSG 25 +#define HB_LANG_ITEM_BASE_ERRDESC 38 +#define HB_LANG_ITEM_BASE_ERRINTR 89 +#define HB_LANG_ITEM_BASE_TEXT 114 +#define HB_LANG_ITEM_MAX_ 117 + +#translate HB_LANG_REQUEST => REQUEST HB_LANG_ #endif /* HB_LANG_CH_ */