diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8d550e9d2c..2924e0353a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,16 @@ +19990621-19:09 CET Victor Szel + ! source/rtl/asort.prg + source/rtl/objfunc.prg + Got rid of the references to Default() + + Added msgcz852.c, msgczkam.c, msgyu852.c to + source/rtl/natmsg/ + source/rtl/msgxxx.c + posted by Davor Siklic + + Added cgi.ch to tests/working/hscript/, too. + + source/rtl/environ.c + Added patch posted by + Dave Pearson + 19990622-00:22 Ryszard Glab * config/prg.cf * config/test.cf @@ -19,7 +32,7 @@ Mon Jun 21 12:14:15 1999 Gonzalo A. Diethelm 19990621-13:27 CET Victor Szel * source/compiler/harbour.y - GCC warning fixed. + GCC warnings fixed. * source/contrib/genobj.c removed, as suggested by "Antonio Linares" diff --git a/harbour/source/rtl/asort.prg b/harbour/source/rtl/asort.prg index 743ca41574..23a3e69d4e 100644 --- a/harbour/source/rtl/asort.prg +++ b/harbour/source/rtl/asort.prg @@ -9,11 +9,20 @@ // function aSort( aIn, nStart, nCount, bBlock ) - nStart := Default( nStart, 1 ) - QuickSort( aIn, ; - nStart, ; - Default( nCount, Len(aIn) - nStart + 1 ), ; - Default( bBlock, {| x, y | x < y } ) ) + IF !(ValType(nStart) == "N") + nStart := 1 + ENDIF + + IF !(ValType(nCount) == "N") + nCount := Len(aIn) - nStart + 1 + ENDIF + + IF !(ValType(bBlock) == "B") + bBlock := {| x, y | x < y } + ENDIF + + QuickSort( aIn, nStart, nCount, bBlock ) + return aIn diff --git a/harbour/source/rtl/environ.c b/harbour/source/rtl/environ.c index 2dd10efb7d..006191386f 100644 --- a/harbour/source/rtl/environ.c +++ b/harbour/source/rtl/environ.c @@ -14,6 +14,10 @@ #include #endif +#if defined(__GNUC__) && !defined(__DJGPP__) + #include +#endif + #ifdef __WATCOMC__ #include #if defined(__386__) && !defined(__WINDOWS_386__) @@ -67,6 +71,20 @@ HARBOUR HB_OS(void) #if defined(__GNUC__) && !defined(__DJGPP__) + struct utsname un; + + uname( &un ); + + sprintf( version, "%s %s", un.sysname, un.release ); + + /* DAP: Currently, OS() is coded with the expection that the operating + system plays the major/minor version number game. Not all operating + systems work like that. So, we do a little bit of mucking around + because we've managed to work out version[] on our own. */ + + hb_os = ""; + hb_osmajor = -2; + #else /* TODO: add MSVC support but MSVC cannot detect any OS except Windows! */ @@ -179,6 +197,7 @@ HARBOUR HB_OS(void) if (!hb_os) strcpy (version, "Unknown"); else if (hb_osmajor == -1) strcpy (version, hb_os); + else if (hb_osmajor == -2 ) { /* NOP */ } else sprintf (version, "%s %d.%02d%c", hb_os, hb_osmajor, hb_osminor, hb_osletter); hb_retc (version); } diff --git a/harbour/source/rtl/msgxxx.c b/harbour/source/rtl/msgxxx.c index 6c23ef08a9..07ed44d85c 100644 --- a/harbour/source/rtl/msgxxx.c +++ b/harbour/source/rtl/msgxxx.c @@ -32,4 +32,10 @@ #include "natmsg/msgita.c" #elif (HB_LANGUAGE == FRE) #include "natmsg/msgfre.c" +#elif (HB_LANGUAGE == CZ852) +#include "natmsg/msgcz852.c" +#elif (HB_LANGUAGE == CZKAM) +#include "natmsg/msgczkam.c" +#elif (HB_LANGUAGE == YU852) +#include "natmsg/msgyu852.c" #endif diff --git a/harbour/source/rtl/natmsg/msgcz852.c b/harbour/source/rtl/natmsg/msgcz852.c new file mode 100644 index 0000000000..e09252f912 --- /dev/null +++ b/harbour/source/rtl/natmsg/msgcz852.c @@ -0,0 +1,33 @@ +/* + * $Id$ + */ + +/* Czech language module (2 char. ISO language code: CZ) */ +/* Codepage: Latin II - 852 */ + +char *hb_monthsname[ 12 ] = +{ + "leden", + "£nor", + "býezen", + "duben", + "kvØten", + "Ÿerven", + "Ÿervenec", + "srpen", + "z ý¡", + "ý¡jen", + "listopad", + "prosinec" +}; + +char *hb_daysname[ 7 ] = +{ + "nedØle", + "pondØl¡", + "£terì", + "stýeda", + "Ÿtvrtek", + "p tek", + "sobota" +}; diff --git a/harbour/source/rtl/natmsg/msgczkam.c b/harbour/source/rtl/natmsg/msgczkam.c new file mode 100644 index 0000000000..bfe0491ace --- /dev/null +++ b/harbour/source/rtl/natmsg/msgczkam.c @@ -0,0 +1,33 @@ +/* + * $Id$ + */ + +/* Czech language module (2 char. ISO language code: CZ) */ +/* Codepage: Czech - Kamenickych (CS2) */ + +char *hb_monthsname[ 12 ] = +{ + "leden", + "£nor", + "b©ezen", + "duben", + "kvˆten", + "‡erven", + "‡ervenec", + "srpen", + "z ©¡", + "©¡jen", + "listopad", + "prosinec" +}; + +char *hb_daysname[ 7 ] = +{ + "nedˆle", + "pondˆl¡", + "£ter˜", + "st©eda", + "‡tvrtek", + "p tek", + "sobota" +}; diff --git a/harbour/source/rtl/natmsg/msgyu852.c b/harbour/source/rtl/natmsg/msgyu852.c new file mode 100644 index 0000000000..90aa88c750 --- /dev/null +++ b/harbour/source/rtl/natmsg/msgyu852.c @@ -0,0 +1,33 @@ +/* + * $Id$ + */ + +/* Serbian language module (2 char. ISO language code: YU) */ +/* Codepage: Latin II - 852 */ + +char *hb_monthsname[ 12 ] = +{ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" +}; + +char *hb_daysname[ 7 ] = +{ + "nedelja", + "ponedeljak", + "utorak", + "sreda", + "Ÿetvrtak", + "petak", + "subota" +}; diff --git a/harbour/source/rtl/objfunc.prg b/harbour/source/rtl/objfunc.prg index 310dfaacf5..6ae2c56b28 100644 --- a/harbour/source/rtl/objfunc.prg +++ b/harbour/source/rtl/objfunc.prg @@ -46,7 +46,10 @@ function aOData( oObject, lDataMethod ) local nLen := Len( aInfo ) local lFoundDM // Found DATA ? - lDataMethod := Default( lDataMethod, .T. ) + IF !(ValType(lDataMethod) == "L") + lDataMethod := .T. + ENDIF + do while n <= nLen .and. Substr( aInfo[ n ], 1, 1 ) != "_" /* If in range and no set function found yet ( set functions begin with a */ @@ -95,7 +98,10 @@ function aOGet( oObject, aExcept ) local cSymbol local n - aExcept := Default( aExcept, {} ) + IF !(ValType(aExcept) == "A") + aExcept := {} + ENDIF + for n := 1 to nLen cSymbol := aDataSymbol[ n ] if Empty( aScan( aExcept, cSymbol ) )