From 44caa6f70e81d3b98ca6fda5f494729d528d3aad Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 21 Jul 2012 11:58:22 +0000 Subject: [PATCH] 2012-07-21 13:55 UTC+0200 Viktor Szakats (vszakats syenar.net) * contrib/hbide/idemain.prg * contrib/hbmysql/tests/test.prg * contrib/hbmysql/utils/dbf2mysq.prg * contrib/hbpgsql/tests/dbf2pg.prg * examples/hbapollo/tests/test02.prg * examples/hbapollo/tests/test05.prg * examples/hbapollo/tests/test07.prg * examples/hbapollo/tests/test08.prg * examples/hbapollo/tests/test11.prg * examples/hbapollo/tests/test12.prg * examples/hbapollo/tests/test13.prg * examples/hbapollo/tests/test14.prg * examples/hbapollo/tests/test15.prg * examples/hbapollo/tests/test20.prg * examples/hbapollo/tests/test21.prg * examples/hbapollo/tests/test22.prg * examples/hbapollo/tests/test23.prg * examples/hbapollo/tests/test24.prg * examples/hbapollo/tests/test25.prg * examples/hbapollo/tests/test26.prg * examples/hbapollo/tests/test27.prg * examples/hbapollo/tests/test28.prg * examples/hbapollo/tests/test29.prg * examples/hbapollo/tests/test30.prg * examples/hbapollo/tests/test34.prg * examples/hbapollo/tests/test35.prg * examples/hbapollo/tests/test36.prg * examples/hbapollo/tests/test37.prg * examples/hbapollo/tests/test38.prg * examples/hbapollo/tests/test39.prg * examples/hbapollo/tests/test41.prg * examples/hbapollo/tests/test42.prg * examples/hbapollo/tests/test43.prg * examples/hbapollo/tests/test45.prg * examples/hbapollo/tests/test46.prg * examples/hbapollo/tests/test47.prg * examples/hbapollo/tests/test50.prg * examples/hbapollo/tests/test51.prg * examples/hbapollo/tests/test52.prg * examples/hbapollo/tests/test53.prg * examples/hbapollo/tests/test54.prg * examples/hbapollo/tests/test55.prg * examples/hbapollo/tests/test56.prg * examples/hbapollo/tests/test57.prg * examples/hbapollo/tests/test58.prg * examples/hbapollo/tests/test60.prg * examples/hbapollo/tests/test61.prg * examples/httpsrv/uhttpd.prg * tests/fsplit.prg * deleted archaic SET EPOCH commands, using SET CENTURY ON instead * use SET DATE ANSI * some formatting --- harbour/ChangeLog | 59 +++++++- harbour/contrib/hbide/idemain.prg | 1 - harbour/contrib/hbmysql/tests/test.prg | 1 - harbour/contrib/hbmysql/utils/dbf2mysq.prg | 155 ++++++++++----------- harbour/contrib/hbpgsql/tests/dbf2pg.prg | 1 - harbour/examples/hbapollo/tests/test02.prg | 5 +- harbour/examples/hbapollo/tests/test05.prg | 16 --- harbour/examples/hbapollo/tests/test07.prg | 3 +- harbour/examples/hbapollo/tests/test08.prg | 3 +- harbour/examples/hbapollo/tests/test11.prg | 2 +- harbour/examples/hbapollo/tests/test12.prg | 2 +- harbour/examples/hbapollo/tests/test13.prg | 2 +- harbour/examples/hbapollo/tests/test14.prg | 2 +- harbour/examples/hbapollo/tests/test15.prg | 2 +- harbour/examples/hbapollo/tests/test20.prg | 2 +- harbour/examples/hbapollo/tests/test21.prg | 2 +- harbour/examples/hbapollo/tests/test22.prg | 2 +- harbour/examples/hbapollo/tests/test23.prg | 2 +- harbour/examples/hbapollo/tests/test24.prg | 2 +- harbour/examples/hbapollo/tests/test25.prg | 2 +- harbour/examples/hbapollo/tests/test26.prg | 2 +- harbour/examples/hbapollo/tests/test27.prg | 2 +- harbour/examples/hbapollo/tests/test28.prg | 2 +- harbour/examples/hbapollo/tests/test29.prg | 2 +- harbour/examples/hbapollo/tests/test30.prg | 2 +- harbour/examples/hbapollo/tests/test34.prg | 2 +- harbour/examples/hbapollo/tests/test35.prg | 2 +- harbour/examples/hbapollo/tests/test36.prg | 2 +- harbour/examples/hbapollo/tests/test37.prg | 2 +- harbour/examples/hbapollo/tests/test38.prg | 2 +- harbour/examples/hbapollo/tests/test39.prg | 2 +- harbour/examples/hbapollo/tests/test41.prg | 2 +- harbour/examples/hbapollo/tests/test42.prg | 2 +- harbour/examples/hbapollo/tests/test43.prg | 2 +- harbour/examples/hbapollo/tests/test45.prg | 2 +- harbour/examples/hbapollo/tests/test46.prg | 2 +- harbour/examples/hbapollo/tests/test47.prg | 2 +- harbour/examples/hbapollo/tests/test50.prg | 2 +- harbour/examples/hbapollo/tests/test51.prg | 2 +- harbour/examples/hbapollo/tests/test52.prg | 2 +- harbour/examples/hbapollo/tests/test53.prg | 2 +- harbour/examples/hbapollo/tests/test54.prg | 4 +- harbour/examples/hbapollo/tests/test55.prg | 2 +- harbour/examples/hbapollo/tests/test56.prg | 2 +- harbour/examples/hbapollo/tests/test57.prg | 2 +- harbour/examples/hbapollo/tests/test58.prg | 2 +- harbour/examples/hbapollo/tests/test60.prg | 4 +- harbour/examples/hbapollo/tests/test61.prg | 4 +- harbour/examples/httpsrv/uhttpd.prg | 3 +- harbour/tests/fsplit.prg | 2 +- 50 files changed, 182 insertions(+), 151 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index cff02d8cdf..f935cca767 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,10 +16,65 @@ The license applies to all entries newer than 2009-04-28. */ +2012-07-21 13:55 UTC+0200 Viktor Szakats (vszakats syenar.net) + * contrib/hbide/idemain.prg + * contrib/hbmysql/tests/test.prg + * contrib/hbmysql/utils/dbf2mysq.prg + * contrib/hbpgsql/tests/dbf2pg.prg + * examples/hbapollo/tests/test02.prg + * examples/hbapollo/tests/test05.prg + * examples/hbapollo/tests/test07.prg + * examples/hbapollo/tests/test08.prg + * examples/hbapollo/tests/test11.prg + * examples/hbapollo/tests/test12.prg + * examples/hbapollo/tests/test13.prg + * examples/hbapollo/tests/test14.prg + * examples/hbapollo/tests/test15.prg + * examples/hbapollo/tests/test20.prg + * examples/hbapollo/tests/test21.prg + * examples/hbapollo/tests/test22.prg + * examples/hbapollo/tests/test23.prg + * examples/hbapollo/tests/test24.prg + * examples/hbapollo/tests/test25.prg + * examples/hbapollo/tests/test26.prg + * examples/hbapollo/tests/test27.prg + * examples/hbapollo/tests/test28.prg + * examples/hbapollo/tests/test29.prg + * examples/hbapollo/tests/test30.prg + * examples/hbapollo/tests/test34.prg + * examples/hbapollo/tests/test35.prg + * examples/hbapollo/tests/test36.prg + * examples/hbapollo/tests/test37.prg + * examples/hbapollo/tests/test38.prg + * examples/hbapollo/tests/test39.prg + * examples/hbapollo/tests/test41.prg + * examples/hbapollo/tests/test42.prg + * examples/hbapollo/tests/test43.prg + * examples/hbapollo/tests/test45.prg + * examples/hbapollo/tests/test46.prg + * examples/hbapollo/tests/test47.prg + * examples/hbapollo/tests/test50.prg + * examples/hbapollo/tests/test51.prg + * examples/hbapollo/tests/test52.prg + * examples/hbapollo/tests/test53.prg + * examples/hbapollo/tests/test54.prg + * examples/hbapollo/tests/test55.prg + * examples/hbapollo/tests/test56.prg + * examples/hbapollo/tests/test57.prg + * examples/hbapollo/tests/test58.prg + * examples/hbapollo/tests/test60.prg + * examples/hbapollo/tests/test61.prg + * examples/httpsrv/uhttpd.prg + * tests/fsplit.prg + * deleted archaic SET EPOCH commands, using SET CENTURY ON + instead + * use SET DATE ANSI + * some formatting + 2012-07-20 15:23 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/idefindreplace.prg - ! Fixed: Find action in FindInFiles was opening the source in - "Main" view before searching. It should had been if source + ! Fixed: Find action in FindInFiles was opening the source in + "Main" view before searching. It should had been if source is opened only then take it from editing instance otherwise from disk. I suspect yesterday night I was too tired. diff --git a/harbour/contrib/hbide/idemain.prg b/harbour/contrib/hbide/idemain.prg index 5d91d6f3ce..9a4af91c77 100644 --- a/harbour/contrib/hbide/idemain.prg +++ b/harbour/contrib/hbide/idemain.prg @@ -126,7 +126,6 @@ FUNCTION Main( ... ) SET DATE TO ANSI SET CENTURY ON - SET EPOCH TO 1970 QResource():registerResource_1( hbqtres_HbIde() ) diff --git a/harbour/contrib/hbmysql/tests/test.prg b/harbour/contrib/hbmysql/tests/test.prg index 7b4dbb394b..7a1648eac4 100644 --- a/harbour/contrib/hbmysql/tests/test.prg +++ b/harbour/contrib/hbmysql/tests/test.prg @@ -58,7 +58,6 @@ PROCEDURE Main( cArg ) LOCAL oQuery SET CENTURY ON - SET EPOCH TO 1960 oServer := TMySQLServer():New( "localhost", "root", "" ) IF oServer:NetErr() diff --git a/harbour/contrib/hbmysql/utils/dbf2mysq.prg b/harbour/contrib/hbmysql/utils/dbf2mysq.prg index 07b56fa7d3..c25bab9509 100644 --- a/harbour/contrib/hbmysql/utils/dbf2mysq.prg +++ b/harbour/contrib/hbmysql/utils/dbf2mysq.prg @@ -52,128 +52,127 @@ #include "inkey.ch" -procedure main(...) +PROCEDURE Main( ... ) - local cTok - local cHostName := "localhost" - local cUser := "root" - local cPassWord := "" - local cDataBase, cTable, cFile - local aDbfStruct, i - local lCreateTable := .F. - local oServer, oTable, oRecord + LOCAL cTok + LOCAL cHostName := "localhost" + LOCAL cUser := "root" + LOCAL cPassWord := "" + LOCAL cDataBase, cTable, cFile + LOCAL aDbfStruct, i + LOCAL lCreateTable := .F. + LOCAL oServer, oTable, oRecord SET CENTURY ON - SET EPOCH TO 1960 - // At present time (23/10/00) DBFCDX is default RDD and DBFNTX is + // At present time (23/10/2000) DBFCDX is default RDD and DBFNTX is // now DBF (I mean the one able to handle .dbt-s :-)) rddSetDefault( "DBF" ) - if PCount() < 6 + IF PCount() < 6 help() - quit - endif + QUIT + ENDIF i := 1 // Scan parameters and setup workings - while (i <= PCount()) + WHILE i <= PCount() - cTok := hb_PValue(i++) + cTok := hb_PValue( i ++ ) - do case - case cTok == "-h" - cHostName := hb_PValue(i++) + DO CASE + CASE cTok == "-h" + cHostName := hb_PValue( i ++ ) - case cTok == "-d" - cDataBase := hb_PValue(i++) + CASE cTok == "-d" + cDataBase := hb_PValue( i ++ ) - case cTok == "-t" - cTable := hb_PValue(i++) + CASE cTok == "-t" + cTable := hb_PValue( i ++ ) - case cTok == "-f" - cFile := hb_PValue(i++) + CASE cTok == "-f" + cFile := hb_PValue( i ++ ) - case cTok == "-u" - cUser := hb_PValue(i++) + CASE cTok == "-u" + cUser := hb_PValue( i ++ ) - case cTok == "-p" - cPassWord := hb_PValue(i++) + CASE cTok == "-p" + cPassWord := hb_PValue( i ++ ) - case cTok == "-c" + CASE cTok == "-c" lCreateTable := .T. - otherwise + OTHERWISE help() - quit - endcase - enddo + QUIT + ENDCASE + ENDDO - dbUseArea(.T.,, cFile, "dbffile",, .T.) - aDbfStruct := dbffile->(dbStruct()) + dbUseArea( .T. , , cFile, "dbffile", , .T. ) + aDbfStruct := dbffile -> ( dbStruct() ) - oServer := TMySQLServer():New(cHostName, cUser, cPassWord) - if oServer:NetErr() + oServer := TMySQLServer():New( cHostName, cUser, cPassWord ) + IF oServer:NetErr() ? oServer:Error() - quit - endif + QUIT + ENDIF - oServer:SelectDB(cDataBase) - if oServer:NetErr() + oServer:SelectDB( cDataBase ) + IF oServer:NetErr() ? oServer:Error() - quit - endif + QUIT + ENDIF - if lCreateTable - if Ascan(oServer:ListTables(), cTable) > 0 - oServer:DeleteTable(cTable) - if oServer:NetErr() + IF lCreateTable + IF AScan( oServer:ListTables(), cTable ) > 0 + oServer:DeleteTable( cTable ) + IF oServer:NetErr() ? oServer:Error() - quit - endif - endif - oServer:CreateTable(cTable, aDbfStruct) - if oServer:NetErr() + QUIT + ENDIF + ENDIF + oServer:CreateTable( cTable, aDbfStruct ) + IF oServer:NetErr() ? oServer:Error() - quit - endif - endif + QUIT + ENDIF + ENDIF // Initialize MySQL table - oTable := oServer:Query("SELECT * FROM " + cTable + " LIMIT 1") - if oTable:NetErr() - Alert(oTable:Error()) - quit - endif + oTable := oServer:Query( "SELECT * FROM " + cTable + " LIMIT 1" ) + IF oTable:NetErr() + Alert( oTable:Error() ) + QUIT + ENDIF - while !dbffile->(eof()) .AND. Inkey() != K_ESC + WHILE !dbffile -> ( EOF() ) .AND. Inkey() != K_ESC oRecord := oTable:GetBlankRow() - for i := 1 to dbffile->(FCount()) - oRecord:FieldPut(i, dbffile->(FieldGet(i))) + for i := 1 TO dbffile -> ( FCount() ) + oRecord:FieldPut( i, dbffile -> ( FieldGet(i ) ) ) next - oTable:Append(oRecord) - if oTable:NetErr() - Alert(oTable:Error()) - endif + oTable:Append( oRecord ) + IF oTable:NetErr() + Alert( oTable:Error() ) + ENDIF - dbffile->(dbSkip()) + dbffile -> ( dbSkip() ) - DevPos(Row(), 1) - if (dbffile->(RecNo()) % 100) == 0 - DevOut("imported recs: " + Str(dbffile->(RecNo()))) - endif - enddo + DevPos( Row(), 1 ) + IF ( dbffile -> ( RecNo() ) % 100 ) == 0 + DevOut( "imported recs: " + Str( dbffile -> (RecNo() ) ) ) + ENDIF + ENDDO - dbffile->(dbCloseArea()) + dbffile -> ( dbCloseArea() ) oTable:Destroy() oServer:Destroy() -return + RETURN -procedure Help() +PROCEDURE Help() ? "dbf2MySQL - dbf file to MySQL table conversion utility" ? "-h hostname (default: localhost)" @@ -186,4 +185,4 @@ procedure Help() ? "all parameters but -h -u -p -c are mandatory" ? "" -return + RETURN diff --git a/harbour/contrib/hbpgsql/tests/dbf2pg.prg b/harbour/contrib/hbpgsql/tests/dbf2pg.prg index 78ecbab750..3a89ab3ba3 100644 --- a/harbour/contrib/hbpgsql/tests/dbf2pg.prg +++ b/harbour/contrib/hbpgsql/tests/dbf2pg.prg @@ -77,7 +77,6 @@ PROCEDURE Main( ... ) SET CENTURY ON SET DATE ANSI - SET EPOCH TO 1960 SET DELETE ON rddSetDefault( "DBFDBT" ) diff --git a/harbour/examples/hbapollo/tests/test02.prg b/harbour/examples/hbapollo/tests/test02.prg index 2c5bb66195..3aca710e23 100644 --- a/harbour/examples/hbapollo/tests/test02.prg +++ b/harbour/examples/hbapollo/tests/test02.prg @@ -23,11 +23,8 @@ PROCEDURE MAIN() { "MYLOGIC", "L", 1, 0 } } LOCAL j, n := seconds(), nArea - // SET CENTURY ON - // Automatically ON woth the following date format - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI - SET( 4, ANSI ) // Set Trim On to RTRIM String Value of FieldGets // Default is OFF diff --git a/harbour/examples/hbapollo/tests/test05.prg b/harbour/examples/hbapollo/tests/test05.prg index 004908fe93..579ab26488 100644 --- a/harbour/examples/hbapollo/tests/test05.prg +++ b/harbour/examples/hbapollo/tests/test05.prg @@ -38,22 +38,6 @@ PROCEDURE MAIN() */ SET DELETED ON -/* - Determines the interpretation of date strings with only two year digits. - When such a string is converted to a date value, its year digits are - compared with the year digits of iBaseYear. If the year digits in the - date are greater than or equal to the year digits of iBaseYear, the date - is assumed to fall within the same century as iBaseYear. Otherwise, - the date is assumed to fall in the following century. - - iBaseYear specifies the base year of a 100-year period in which all dates - containing only two year digits are assumed to fall. - - The default epoch value is 1900, causing dates with no century digits - to be interpreted as falling within the twentieth century. -*/ - SET EPOCH 1950 - /* Indicates whether or not Seeks are to return True if a partial key match is made. If True, key searches made with sx_Seek must match exactly in content and length. Partial key matches will result in diff --git a/harbour/examples/hbapollo/tests/test07.prg b/harbour/examples/hbapollo/tests/test07.prg index 33782cf28d..f48fc771bd 100644 --- a/harbour/examples/hbapollo/tests/test07.prg +++ b/harbour/examples/hbapollo/tests/test07.prg @@ -16,7 +16,8 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea LOCAL nIndex - SET EPOCH 1950 + SET CENTURY ON + SET DATE ANSI IF FILE( "sixtest.nsx" ) FERASE( "sixtest.nsx" ) diff --git a/harbour/examples/hbapollo/tests/test08.prg b/harbour/examples/hbapollo/tests/test08.prg index e92e4764f2..e22cfc7bbd 100644 --- a/harbour/examples/hbapollo/tests/test08.prg +++ b/harbour/examples/hbapollo/tests/test08.prg @@ -17,7 +17,8 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea LOCAL nIndex - SET EPOCH 1950 + SET CENTURY ON + SET DATE ANSI IF FILE( "myindex.nsx" ) FERASE( "myindex.nsx" ) diff --git a/harbour/examples/hbapollo/tests/test11.prg b/harbour/examples/hbapollo/tests/test11.prg index c064d6ba88..6e559e30fe 100644 --- a/harbour/examples/hbapollo/tests/test11.prg +++ b/harbour/examples/hbapollo/tests/test11.prg @@ -19,7 +19,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea LOCAL nIndex - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI IF FILE( "sixtest.nsx" ) diff --git a/harbour/examples/hbapollo/tests/test12.prg b/harbour/examples/hbapollo/tests/test12.prg index 8c743a7ed2..0ecdfeb5c8 100644 --- a/harbour/examples/hbapollo/tests/test12.prg +++ b/harbour/examples/hbapollo/tests/test12.prg @@ -22,7 +22,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea, cPad LOCAL nIndex, cOldColor - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI // This is the usual behaviour of NSX file diff --git a/harbour/examples/hbapollo/tests/test13.prg b/harbour/examples/hbapollo/tests/test13.prg index 9838c305bf..e21635466b 100644 --- a/harbour/examples/hbapollo/tests/test13.prg +++ b/harbour/examples/hbapollo/tests/test13.prg @@ -17,7 +17,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea LOCAL nIndex - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI IF FILE( "sixtest.nsx" ) diff --git a/harbour/examples/hbapollo/tests/test14.prg b/harbour/examples/hbapollo/tests/test14.prg index 7248a59325..615ac52101 100644 --- a/harbour/examples/hbapollo/tests/test14.prg +++ b/harbour/examples/hbapollo/tests/test14.prg @@ -23,7 +23,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea, cPad LOCAL nIndex, cOldColor - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI // This is the usual behaviour of NSX file diff --git a/harbour/examples/hbapollo/tests/test15.prg b/harbour/examples/hbapollo/tests/test15.prg index 01210f8341..e5d3f33527 100644 --- a/harbour/examples/hbapollo/tests/test15.prg +++ b/harbour/examples/hbapollo/tests/test15.prg @@ -23,7 +23,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea, cPad LOCAL nIndex, cOldColor - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI // This is the usual behaviour of NSX file diff --git a/harbour/examples/hbapollo/tests/test20.prg b/harbour/examples/hbapollo/tests/test20.prg index 77c351012c..2d7a6b8d84 100644 --- a/harbour/examples/hbapollo/tests/test20.prg +++ b/harbour/examples/hbapollo/tests/test20.prg @@ -15,7 +15,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea LOCAL nOrd - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI IF FILE( "sixtest.nsx" ) diff --git a/harbour/examples/hbapollo/tests/test21.prg b/harbour/examples/hbapollo/tests/test21.prg index 9061de56a1..09d0ae30a4 100644 --- a/harbour/examples/hbapollo/tests/test21.prg +++ b/harbour/examples/hbapollo/tests/test21.prg @@ -23,7 +23,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea, cPad LOCAL nIndex, cOldColor - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI // This is the usual behaviour of NSX file diff --git a/harbour/examples/hbapollo/tests/test22.prg b/harbour/examples/hbapollo/tests/test22.prg index 577943df45..117662c9be 100644 --- a/harbour/examples/hbapollo/tests/test22.prg +++ b/harbour/examples/hbapollo/tests/test22.prg @@ -22,7 +22,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea, cPad LOCAL nIndex, cOldColor - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile STRUCT aStruct RDD SDENSX diff --git a/harbour/examples/hbapollo/tests/test23.prg b/harbour/examples/hbapollo/tests/test23.prg index f614903545..cdd8425e61 100644 --- a/harbour/examples/hbapollo/tests/test23.prg +++ b/harbour/examples/hbapollo/tests/test23.prg @@ -22,7 +22,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea, cPad LOCAL nIndex, cOldColor - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile STRUCT aStruct RDD SDENSX diff --git a/harbour/examples/hbapollo/tests/test24.prg b/harbour/examples/hbapollo/tests/test24.prg index 17d39e7fa4..2ee15e40ef 100644 --- a/harbour/examples/hbapollo/tests/test24.prg +++ b/harbour/examples/hbapollo/tests/test24.prg @@ -22,7 +22,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea, cPad LOCAL nIndex, cOldColor - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile STRUCT aStruct RDD SDENSX diff --git a/harbour/examples/hbapollo/tests/test25.prg b/harbour/examples/hbapollo/tests/test25.prg index e770f7ea9b..e1e4a57be1 100644 --- a/harbour/examples/hbapollo/tests/test25.prg +++ b/harbour/examples/hbapollo/tests/test25.prg @@ -24,7 +24,7 @@ PROCEDURE MAIN() SET DELETED ON SET COMMITLEVEL 2 - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile STRUCT aStruct RDD SDENSX diff --git a/harbour/examples/hbapollo/tests/test26.prg b/harbour/examples/hbapollo/tests/test26.prg index ca8df1210e..1d37f31f28 100644 --- a/harbour/examples/hbapollo/tests/test26.prg +++ b/harbour/examples/hbapollo/tests/test26.prg @@ -24,7 +24,7 @@ PROCEDURE MAIN() SET DELETED ON SET COMMITLEVEL 2 - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile STRUCT aStruct RDD SDENSX diff --git a/harbour/examples/hbapollo/tests/test27.prg b/harbour/examples/hbapollo/tests/test27.prg index ab32d401a9..f0b1ef580d 100644 --- a/harbour/examples/hbapollo/tests/test27.prg +++ b/harbour/examples/hbapollo/tests/test27.prg @@ -22,7 +22,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea, cPad LOCAL nIndex, cOldColor, nCount - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile STRUCT aStruct RDD SDENSX diff --git a/harbour/examples/hbapollo/tests/test28.prg b/harbour/examples/hbapollo/tests/test28.prg index 1a08e3a0fc..848b4ac64b 100644 --- a/harbour/examples/hbapollo/tests/test28.prg +++ b/harbour/examples/hbapollo/tests/test28.prg @@ -22,7 +22,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea, cPad LOCAL nIndex, cOldColor, nCount - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile STRUCT aStruct RDD SDENSX diff --git a/harbour/examples/hbapollo/tests/test29.prg b/harbour/examples/hbapollo/tests/test29.prg index 512bcd28fa..45d5a2425b 100644 --- a/harbour/examples/hbapollo/tests/test29.prg +++ b/harbour/examples/hbapollo/tests/test29.prg @@ -21,7 +21,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea, cPad LOCAL nIndex, cOldColor, nSum1, nSum2 - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile STRUCT aStruct RDD SDENSX diff --git a/harbour/examples/hbapollo/tests/test30.prg b/harbour/examples/hbapollo/tests/test30.prg index 5b6a50805c..8daf6257b9 100644 --- a/harbour/examples/hbapollo/tests/test30.prg +++ b/harbour/examples/hbapollo/tests/test30.prg @@ -21,7 +21,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea, cPad LOCAL nIndex, cOldColor, nAverage1, nAverage2 - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile STRUCT aStruct RDD SDENSX diff --git a/harbour/examples/hbapollo/tests/test34.prg b/harbour/examples/hbapollo/tests/test34.prg index f22a09ecdf..b5bbed6c23 100644 --- a/harbour/examples/hbapollo/tests/test34.prg +++ b/harbour/examples/hbapollo/tests/test34.prg @@ -21,7 +21,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea, cPad LOCAL cApplication - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI IF File( "mytext.txt" ) diff --git a/harbour/examples/hbapollo/tests/test35.prg b/harbour/examples/hbapollo/tests/test35.prg index 406ba901a3..e9bb008978 100644 --- a/harbour/examples/hbapollo/tests/test35.prg +++ b/harbour/examples/hbapollo/tests/test35.prg @@ -22,7 +22,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea, cPad LOCAL nIndex, cOldColor, nAverage1, nAverage2, cApplication - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI IF File( "mytext.txt" ) diff --git a/harbour/examples/hbapollo/tests/test36.prg b/harbour/examples/hbapollo/tests/test36.prg index 6290720e2b..6e02f1d505 100644 --- a/harbour/examples/hbapollo/tests/test36.prg +++ b/harbour/examples/hbapollo/tests/test36.prg @@ -22,7 +22,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea, cPad LOCAL nIndex, cOldColor, nAverage1, nAverage2, cApplication - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI IF File( "mytext.txt" ) diff --git a/harbour/examples/hbapollo/tests/test37.prg b/harbour/examples/hbapollo/tests/test37.prg index e08ad41281..cf9b19e0af 100644 --- a/harbour/examples/hbapollo/tests/test37.prg +++ b/harbour/examples/hbapollo/tests/test37.prg @@ -21,7 +21,7 @@ PROCEDURE MAIN() { "MYMEMO" , "M", 10, 0 } } LOCAL j, n := seconds(), nArea, cPad - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI IF File( "mytext.txt" ) diff --git a/harbour/examples/hbapollo/tests/test38.prg b/harbour/examples/hbapollo/tests/test38.prg index 752da4d634..245f2d5fa3 100644 --- a/harbour/examples/hbapollo/tests/test38.prg +++ b/harbour/examples/hbapollo/tests/test38.prg @@ -21,7 +21,7 @@ PROCEDURE MAIN() { "MYMEMO" , "M", 10, 0 } } LOCAL j, aStructure - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI IF File( "mytext.txt" ) diff --git a/harbour/examples/hbapollo/tests/test39.prg b/harbour/examples/hbapollo/tests/test39.prg index 40889b572e..4346017f30 100644 --- a/harbour/examples/hbapollo/tests/test39.prg +++ b/harbour/examples/hbapollo/tests/test39.prg @@ -20,7 +20,7 @@ PROCEDURE MAIN() { "MYNUMBER2" , "N", 8, 0 } } LOCAL j, n := seconds(), nArea, cPad - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI IF File( "myText.Txt" ) diff --git a/harbour/examples/hbapollo/tests/test41.prg b/harbour/examples/hbapollo/tests/test41.prg index d179f5d7c6..6660d70697 100644 --- a/harbour/examples/hbapollo/tests/test41.prg +++ b/harbour/examples/hbapollo/tests/test41.prg @@ -19,7 +19,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds() SX_RDDSETDEFAULT( "SDEFOX" ) - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI ? ? 'Using APPEND BLANK 10000 ... Press any key ...' diff --git a/harbour/examples/hbapollo/tests/test42.prg b/harbour/examples/hbapollo/tests/test42.prg index c1d86de8ba..661dcdef0d 100644 --- a/harbour/examples/hbapollo/tests/test42.prg +++ b/harbour/examples/hbapollo/tests/test42.prg @@ -21,7 +21,7 @@ PROCEDURE MAIN() { "MYNUMBER2" , "N", 8, 0 } } SX_RDDSETDEFAULT( "SDEFOX" ) - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile1 STRUCT aStruct diff --git a/harbour/examples/hbapollo/tests/test43.prg b/harbour/examples/hbapollo/tests/test43.prg index aabd86355d..ef4a3a47f6 100644 --- a/harbour/examples/hbapollo/tests/test43.prg +++ b/harbour/examples/hbapollo/tests/test43.prg @@ -21,7 +21,7 @@ PROCEDURE MAIN() { "MYNUMBER2" , "N", 8, 0 } } SX_RDDSETDEFAULT( "SDEFOX" ) - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile1 STRUCT aStruct diff --git a/harbour/examples/hbapollo/tests/test45.prg b/harbour/examples/hbapollo/tests/test45.prg index c3e9c69382..60bc67668a 100644 --- a/harbour/examples/hbapollo/tests/test45.prg +++ b/harbour/examples/hbapollo/tests/test45.prg @@ -29,7 +29,7 @@ PROCEDURE MAIN() { "MYNUMBER2" , "N", 8, 0 } } SX_RDDSETDEFAULT( "SDEFOX" ) - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile STRUCT aStruct diff --git a/harbour/examples/hbapollo/tests/test46.prg b/harbour/examples/hbapollo/tests/test46.prg index d356045b7f..1c9bc717c0 100644 --- a/harbour/examples/hbapollo/tests/test46.prg +++ b/harbour/examples/hbapollo/tests/test46.prg @@ -37,7 +37,7 @@ PROCEDURE MAIN() SX_RDDSETDEFAULT( "SDEFOX" ) - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile1 STRUCT aStruct1 diff --git a/harbour/examples/hbapollo/tests/test47.prg b/harbour/examples/hbapollo/tests/test47.prg index 6dba32764f..0b03b3222d 100644 --- a/harbour/examples/hbapollo/tests/test47.prg +++ b/harbour/examples/hbapollo/tests/test47.prg @@ -23,7 +23,7 @@ PROCEDURE MAIN() CLS SX_RDDSETDEFAULT( "SDEFOX" ) - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI ? diff --git a/harbour/examples/hbapollo/tests/test50.prg b/harbour/examples/hbapollo/tests/test50.prg index b72563c563..7e3c77023b 100644 --- a/harbour/examples/hbapollo/tests/test50.prg +++ b/harbour/examples/hbapollo/tests/test50.prg @@ -14,7 +14,7 @@ PROCEDURE MAIN() LOCAL cFile := "test\test.dbf" SX_RDDSETDEFAULT( "SDEFOX" ) - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI SX_COMMITLEVEL( 2 ) diff --git a/harbour/examples/hbapollo/tests/test51.prg b/harbour/examples/hbapollo/tests/test51.prg index aac167fd47..fba8859a9e 100644 --- a/harbour/examples/hbapollo/tests/test51.prg +++ b/harbour/examples/hbapollo/tests/test51.prg @@ -78,7 +78,7 @@ FUNCTION Test_1( nCommit ) LOCAL j, n := seconds(), nArea, cPad LOCAL cApplication - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile STRUCT aStruct RDD SDENTX diff --git a/harbour/examples/hbapollo/tests/test52.prg b/harbour/examples/hbapollo/tests/test52.prg index 852e6dcc91..45d063eae5 100644 --- a/harbour/examples/hbapollo/tests/test52.prg +++ b/harbour/examples/hbapollo/tests/test52.prg @@ -71,7 +71,7 @@ FUNCTION Test_1( nCommit ) LOCAL j, n := seconds(), nArea, cPad LOCAL cApplication - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile STRUCT aStruct RDD SDENTX diff --git a/harbour/examples/hbapollo/tests/test53.prg b/harbour/examples/hbapollo/tests/test53.prg index 888ece1455..2c619d0258 100644 --- a/harbour/examples/hbapollo/tests/test53.prg +++ b/harbour/examples/hbapollo/tests/test53.prg @@ -69,7 +69,7 @@ FUNCTION Test_1( nCommit ) LOCAL j, n := seconds(), nArea, cPad LOCAL cApplication - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI CREATE DBF cFile STRUCT aStruct RDD SDENTX diff --git a/harbour/examples/hbapollo/tests/test54.prg b/harbour/examples/hbapollo/tests/test54.prg index e315e11d99..a246fbe77a 100644 --- a/harbour/examples/hbapollo/tests/test54.prg +++ b/harbour/examples/hbapollo/tests/test54.prg @@ -23,9 +23,7 @@ PROCEDURE MAIN() LOCAL j, n := seconds(), nArea LOCAL aGet - // SET CENTURY ON - // Automatically ON woth the following date format - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI // Set Trim On to RTRIM String Value of FieldGets diff --git a/harbour/examples/hbapollo/tests/test55.prg b/harbour/examples/hbapollo/tests/test55.prg index 316bbb4e49..a8632ec9fe 100644 --- a/harbour/examples/hbapollo/tests/test55.prg +++ b/harbour/examples/hbapollo/tests/test55.prg @@ -26,7 +26,7 @@ PROCEDURE MAIN() // SET ERRORLEVEL 0 SET RDD SDENSXDBT - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI SET TRIM ON diff --git a/harbour/examples/hbapollo/tests/test56.prg b/harbour/examples/hbapollo/tests/test56.prg index ea820377ee..1f4d1d60bd 100644 --- a/harbour/examples/hbapollo/tests/test56.prg +++ b/harbour/examples/hbapollo/tests/test56.prg @@ -19,7 +19,7 @@ PROCEDURE MAIN() LOCAL aGet, nTagCount, aTagInfo SET RDD SDEFOX - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI SET TRIM ON diff --git a/harbour/examples/hbapollo/tests/test57.prg b/harbour/examples/hbapollo/tests/test57.prg index 6d26c5ab53..44c28e4682 100644 --- a/harbour/examples/hbapollo/tests/test57.prg +++ b/harbour/examples/hbapollo/tests/test57.prg @@ -19,7 +19,7 @@ PROCEDURE MAIN() LOCAL aGet, nTagCount, aTagInfo SET RDD SDENTX - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI SET TRIM ON diff --git a/harbour/examples/hbapollo/tests/test58.prg b/harbour/examples/hbapollo/tests/test58.prg index 8cc34ad20a..b9c2bc823f 100644 --- a/harbour/examples/hbapollo/tests/test58.prg +++ b/harbour/examples/hbapollo/tests/test58.prg @@ -21,7 +21,7 @@ PROCEDURE MAIN() LOCAL cGetRecord SET RDD SDENTX - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI SET TRIM ON diff --git a/harbour/examples/hbapollo/tests/test60.prg b/harbour/examples/hbapollo/tests/test60.prg index 3d0afd9c48..41c2c0c545 100644 --- a/harbour/examples/hbapollo/tests/test60.prg +++ b/harbour/examples/hbapollo/tests/test60.prg @@ -29,7 +29,7 @@ PROCEDURE MAIN() { "_SALARY", "N", 12, 0 } } LOCAL i, cPad - SET EPOCH 1950 + SET CENTURY ON SET DATE ANSI // Making comma delimited dummy file to append to DBF file @@ -38,7 +38,7 @@ PROCEDURE MAIN() nHandle := FCreate( "testing.txt" ) FOR i := 1 TO 100 cPad := padl( i, 5, "0" ) - FWrite( nHAndle, "First_" + cPad + "," + "Last_" + cPad + "," + str( i * 2 ) + CHR( 13 ) + CHR( 10 ) ) + FWrite( nHAndle, "First_" + cPad + "," + "Last_" + cPad + "," + str( i * 2 ) + hb_eol() ) NEXT FClose( nHandle ) diff --git a/harbour/examples/hbapollo/tests/test61.prg b/harbour/examples/hbapollo/tests/test61.prg index edec2e263a..9822894f42 100644 --- a/harbour/examples/hbapollo/tests/test61.prg +++ b/harbour/examples/hbapollo/tests/test61.prg @@ -29,8 +29,8 @@ PROCEDURE MAIN() { "_SALARY", "N", 12, 0 } } LOCAL i, cPad - SET EPOCH 1950 SET DATE ANSI + SET CENTURY ON // Making comma delimited dummy file to append to DBF file ? @@ -38,7 +38,7 @@ PROCEDURE MAIN() nHandle := FCreate( "testing.txt" ) FOR i := 1 TO 1000 cPad := padl( i, 5, "0" ) - FWrite( nHAndle, "First_" + cPad + CHR( 9 ) + "Last_" + cPad + CHR( 9 ) + str( i * 2 ) + CHR( 13 ) + CHR( 10 ) ) + FWrite( nHAndle, "First_" + cPad + CHR( 9 ) + "Last_" + cPad + CHR( 9 ) + str( i * 2 ) + hb_eol() ) NEXT FClose( nHandle ) diff --git a/harbour/examples/httpsrv/uhttpd.prg b/harbour/examples/httpsrv/uhttpd.prg index 7d1a3341cc..212bd4aaf1 100644 --- a/harbour/examples/httpsrv/uhttpd.prg +++ b/harbour/examples/httpsrv/uhttpd.prg @@ -2151,14 +2151,13 @@ STATIC PROCEDURE Help() STATIC PROCEDURE SysSettings() SET SCOREBOARD OFF SET CENTURY ON - SET DATE ITALIAN + SET DATE ANSI SET BELL OFF SET DELETED ON SET EXACT OFF SET CONFIRM ON SET ESCAPE ON SET WRAP ON - SET EPOCH TO 2000 //RDDSetDefault( "DBFCDX" ) RETURN diff --git a/harbour/tests/fsplit.prg b/harbour/tests/fsplit.prg index b6e033a092..b3cc0dcc16 100644 --- a/harbour/tests/fsplit.prg +++ b/harbour/tests/fsplit.prg @@ -36,7 +36,7 @@ FUNCTION fsplit( csource, csplit, nbyte ) // y2k compliance SET DATE ANSI - SET EPOCH TO Year( Date() ) - 50 + SET CENTURY ON // no params passed IF PCount() == 0