From 5f686f7ed15bbc07bd82142330045e59d1ec7f68 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 22 Jul 2012 16:08:19 +0000 Subject: [PATCH] 2012-07-22 16:09 UTC+0200 Viktor Szakats (vszakats syenar.net) * contrib/hbtip/tests/dnldftp.prg * contrib/hbtip/tests/upld_ftp.prg ! translated output to English. At the same time removed non-ASCII (accented) chars. ; TOFIX: extras/hbxlsxml which contains high 8-bit chars with unspecified codepage, which got corrupted in recent changes. ; NOTE: Please use 7-bit ASCII chars only in sources and files, or, use UTF-8 while setting in SVN: svn propset svn:mime-type "text/plain; charset=UTF-8" Other codepages are not allowed in SVN, and if you need certain high 8-bit bytes or chars, always use Chr() or hb_BChar() to create them. * extras/hbapollo/global.c * extras/hbapollo/hbapollo.hbp * extras/hbapollo/sde.c * extras/hbapollo/sxapi.h ! deleted copied sections from sde7.h 3rd party header ! replaced _sx_SysProp() with sx_SysProp() calls. It's most probably not valid, but couldn't find the nature of the hack in original implementation + generate implibs ! added hack to make it possible to link statically to Apollo libs ! disabled C warnings to silence formal warnings resulting from above hack * extras/hbapollo/tests/hbmk.hbm ! minor fix to find .hbc find no in regular location * contrib/hbhpdf/core.c * formatting --- harbour/ChangeLog | 36 ++++ harbour/contrib/hbhpdf/core.c | 2 +- harbour/contrib/hbtip/tests/dnldftp.prg | 20 +-- harbour/contrib/hbtip/tests/upld_ftp.prg | 20 +-- harbour/extras/hbapollo/global.c | 6 +- harbour/extras/hbapollo/hbapollo.hbp | 6 +- harbour/extras/hbapollo/sde.c | 2 +- harbour/extras/hbapollo/sxapi.h | 217 +---------------------- harbour/extras/hbapollo/tests/hbmk.hbm | 2 +- 9 files changed, 68 insertions(+), 243 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9e3caea5ba..e94b7c9559 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,42 @@ The license applies to all entries newer than 2009-04-28. */ +2012-07-22 16:09 UTC+0200 Viktor Szakats (vszakats syenar.net) + * contrib/hbtip/tests/dnldftp.prg + * contrib/hbtip/tests/upld_ftp.prg + ! translated output to English. At the same time removed + non-ASCII (accented) chars. + + ; TOFIX: extras/hbxlsxml which contains high 8-bit chars with + unspecified codepage, which got corrupted in recent + changes. + ; NOTE: Please use 7-bit ASCII chars only in sources and files, + or, use UTF-8 while setting in SVN: + svn propset svn:mime-type "text/plain; charset=UTF-8" + Other codepages are not allowed in SVN, and if you need + certain high 8-bit bytes or chars, always use Chr() or + hb_BChar() to create them. + + * extras/hbapollo/global.c + * extras/hbapollo/hbapollo.hbp + * extras/hbapollo/sde.c + * extras/hbapollo/sxapi.h + ! deleted copied sections from sde7.h 3rd party header + ! replaced _sx_SysProp() with sx_SysProp() calls. It's + most probably not valid, but couldn't find the nature + of the hack in original implementation + + generate implibs + ! added hack to make it possible to link statically to + Apollo libs + ! disabled C warnings to silence formal warnings resulting + from above hack + + * extras/hbapollo/tests/hbmk.hbm + ! minor fix to find .hbc find no in regular location + + * contrib/hbhpdf/core.c + * formatting + 2012-07-22 15:55 UTC+0200 Viktor Szakats (vszakats syenar.net) * contrib/hbide/idestylesheets.prg * contrib/hbide/idetags.prg diff --git a/harbour/contrib/hbhpdf/core.c b/harbour/contrib/hbhpdf/core.c index 57ec6cdb68..19c931cbc3 100644 --- a/harbour/contrib/hbhpdf/core.c +++ b/harbour/contrib/hbhpdf/core.c @@ -1328,7 +1328,7 @@ HB_FUNC( HPDF_FONT_GETBBOX ) HPDF_Box rc; PHB_ITEM info = hb_itemArrayNew( 4 ); - rc = HPDF_Font_GetBBox( ( HPDF_Font ) hb_parptr( 1 ) ); + rc = HPDF_Font_GetBBox( ( HPDF_Font ) hb_parptr( 1 ) ); hb_arraySetND( info, 1, rc.left ); hb_arraySetND( info, 2, rc.top ); diff --git a/harbour/contrib/hbtip/tests/dnldftp.prg b/harbour/contrib/hbtip/tests/dnldftp.prg index 4f762b1704..4658519b22 100644 --- a/harbour/contrib/hbtip/tests/dnldftp.prg +++ b/harbour/contrib/hbtip/tests/dnldftp.prg @@ -23,7 +23,7 @@ STATIC FUNCTION TRP20FTPEnv( cCarpeta ) LOCAL aFiles LOCAL cUrl LOCAL cStr - LOCAL lRetorno := .T. + LOCAL lRetVal := .T. LOCAL oUrl LOCAL oFTP LOCAL cUser @@ -56,26 +56,26 @@ STATIC FUNCTION TRP20FTPEnv( cCarpeta ) IF oFTP:Open( cUrl ) FOR EACH cFile IN afiles - IF !oFtp:DownloadFile( cFile[ 1 ] ) - lRetorno := .F. + IF ! oFtp:DownloadFile( cFile[ 1 ] ) + lRetVal := .F. EXIT ELSE - lRetorno := .T. + lRetVal := .T. ENDIF NEXT oFTP:Close() ELSE - cStr := "No se ha podido conectar con el servidor FTP" + " " + oURL:cServer + cStr := "Could not connect to FTP server " + oURL:cServer IF oFTP:SocketCon == NIL - cStr += hb_eol() + "Conexión no inicializada" + cStr += hb_eol() + "Connection not initialized" ELSEIF hb_InetErrorCode( oFTP:SocketCon ) == 0 - cStr += hb_eol() + "Respuesta del servidor:" + " " + oFTP:cReply + cStr += hb_eol() + "Server response:" + " " + oFTP:cReply ELSE - cStr += hb_eol() + "Error en la conexión:" + " " + hb_InetErrorDesc( oFTP:SocketCon ) + cStr += hb_eol() + "Error in connection:" + " " + hb_InetErrorDesc( oFTP:SocketCon ) ENDIF ? cStr - lRetorno := .F. + lRetVal := .F. ENDIF ENDIF - RETURN lRetorno + RETURN lRetVal diff --git a/harbour/contrib/hbtip/tests/upld_ftp.prg b/harbour/contrib/hbtip/tests/upld_ftp.prg index 5fc09a7d0f..9d5ec87efc 100644 --- a/harbour/contrib/hbtip/tests/upld_ftp.prg +++ b/harbour/contrib/hbtip/tests/upld_ftp.prg @@ -26,7 +26,7 @@ STATIC FUNCTION TRP20FTPEnv( cCarpeta ) LOCAL aFiles LOCAL cUrl LOCAL cStr - LOCAL lRetorno := .T. + LOCAL lRetVal := .T. LOCAL oUrl LOCAL oFTP LOCAL cUser @@ -58,28 +58,28 @@ STATIC FUNCTION TRP20FTPEnv( cCarpeta ) IF oFTP:Open( cUrl ) FOR EACH cFile IN afiles - ? "arquivo : " + cFile[ F_NAME ] + ? "Filename: " + cFile[ F_NAME ] IF ! oFtp:UploadFile( cFile[ F_NAME ] ) - lRetorno := .F. + lRetVal := .F. EXIT ELSE - lRetorno := .T. + lRetVal := .T. ENDIF NEXT oFTP:Close() ELSE - cStr := "No se ha podido conectar con el servidor FTP" + " " + oURL:cServer + cStr := "Could not connect to FTP server " + oURL:cServer IF oFTP:SocketCon == NIL - cStr += hb_eol() + "Conexión no inicializada" + cStr += hb_eol() + "Connection not initialized" ELSEIF hb_InetErrorCode( oFTP:SocketCon ) == 0 - cStr += hb_eol() + "Respuesta del servidor:" + " " + oFTP:cReply + cStr += hb_eol() + "Server response:" + " " + oFTP:cReply ELSE - cStr += hb_eol() + "Error en la conexión:" + " " + hb_InetErrorDesc( oFTP:SocketCon ) + cStr += hb_eol() + "Error in connection:" + " " + hb_InetErrorDesc( oFTP:SocketCon ) ENDIF ? cStr - lRetorno := .F. + lRetVal := .F. ENDIF ENDIF - RETURN lRetorno + RETURN lRetVal diff --git a/harbour/extras/hbapollo/global.c b/harbour/extras/hbapollo/global.c index e81960cbef..bc24add5af 100644 --- a/harbour/extras/hbapollo/global.c +++ b/harbour/extras/hbapollo/global.c @@ -424,10 +424,10 @@ HB_FUNC( SX_SETCENTURY ) HB_FUNC( SX_SETAUTOOPEN ) { - HB_BOOL lAuto = ! _sx_SysProp( SDE_SP_GETDISABLEAUTO, NULL ); + HB_BOOL lAuto = ! sx_SysProp( SDE_SP_GETDISABLEAUTO, NULL ); if( HB_ISLOG( 1 ) ) - _sx_SysProp( SDE_SP_SETDISABLEAUTO, ( PVOID ) ( ! hb_parl( 1 ) ) ); + sx_SysProp( SDE_SP_SETDISABLEAUTO, ( PVOID ) ( ! hb_parl( 1 ) ) ); hb_retl( lAuto ); } @@ -438,7 +438,7 @@ HB_FUNC( SX_ISAUTOOPENDISABLED ) HB_FUNC( SX_DISABLEAUTOOPEN ) { - hb_retl( _sx_SysProp( SDE_SP_SETDISABLEAUTO, ( PVOID ) 1 ) ); + hb_retl( sx_SysProp( SDE_SP_SETDISABLEAUTO, ( PVOID ) 1 ) ); } HB_FUNC( SX_SETCHRCOLLATE ) diff --git a/harbour/extras/hbapollo/hbapollo.hbp b/harbour/extras/hbapollo/hbapollo.hbp index 34b4dad72c..8c0724791b 100644 --- a/harbour/extras/hbapollo/hbapollo.hbp +++ b/harbour/extras/hbapollo/hbapollo.hbp @@ -11,16 +11,18 @@ -w3 -es2 +-warn=no + {HB_WITH_APOLLO_VER61}-depkeyhead=apollo:Sde61.h {!HB_WITH_APOLLO_VER61}-depkeyhead=apollo:Sde7.h -depcontrol=apollo:${HB_WITH_APOLLO} -depincpath=apollo:/usr/include -depincpath=apollo:/boot/common/include +-depimplibs=apollo:../sde7.dll +-depimplibs=apollo:../fts32.dll {HB_WITH_APOLLO_VER61}-cflag=-DHB_WITH_APOLLO_VER61 -{hbdyn}-cflag=_SDELIB_ - -instfile=inc:sixapi.ch -instfile=inc:unsix.ch diff --git a/harbour/extras/hbapollo/sde.c b/harbour/extras/hbapollo/sde.c index c649c85db6..092ad5d0cb 100644 --- a/harbour/extras/hbapollo/sde.c +++ b/harbour/extras/hbapollo/sde.c @@ -127,7 +127,7 @@ static void hb_sixapiRddInit( void * cargo ) /* Disable AutoOpen Index File */ if( iAutoOpenDisabled == 1 ) - _sx_SysProp( SDE_SP_SETDISABLEAUTO, ( PVOID ) 1 ); + sx_SysProp( SDE_SP_SETDISABLEAUTO, ( PVOID ) 1 ); sx_ErrorLevel( ( WORD ) i_sxApi_Error_Level ); sx_CommitLevel( ( WORD ) iCommitLevel ); diff --git a/harbour/extras/hbapollo/sxapi.h b/harbour/extras/hbapollo/sxapi.h index 4f0794e2a0..c646dd6a7c 100644 --- a/harbour/extras/hbapollo/sxapi.h +++ b/harbour/extras/hbapollo/sxapi.h @@ -47,225 +47,13 @@ #include #endif +#define _declspec(x) /* ugly hack */ #if defined( HB_WITH_APOLLO_VER61 ) #include "Sde61.h" #else #include "sde7.h" #endif - -/* ******************************************************* */ -/* SDE defines */ -/* ******************************************************* */ -#define READWRITE 0 -#define READONLY 1 -#define EXCLUSIVE 2 - -/* ********* */ -/* RDE types */ -/* ********* */ -#define SDENTX 1 -#define SDEFOX 2 -#define SDENSX 3 -#define SDENSXDBT 4 - -/* text file types */ -#define COMMA_DELIM 21 -#define SDF_FILE 22 -#define TAB_DELIM 23 -#define SPACE_DELIM 24 -#define USER_DELIM 25 - -/* OEM Source types for AppendFrom */ -#define OEMNTX 31 -#define OEMFOX 32 -#define OEMNSX 33 - -/* Outdated RDE Names */ -#define DBFNTX SDENTX -#define DBFIDX SDEFOX -#define DBFNSX SDENSX -#define DBFNSXDBT SDENSXDBT - -/* *********** */ -/* Index Types */ -/* *********** */ -#define INDEX_STANDARD 1 -#define INDEX_STANDARD_UNIQUE 2 -#define INDEX_CONDITIONAL 3 -#define INDEX_CONDITIONAL_UNIQUE 4 - -/* ************* */ -/* date types */ -/* ************* */ -#define AMERICAN 0 -#define ANSI 1 -#define BRITISH 2 -#define FRENCH 3 -#define GERMAN 4 -#define ITALIAN 5 -#define SPANISH 6 -#define WIN_DEFAULT 99 - -/* ************************************ */ -/* Data type identifiers for sx_Replace */ -/* ************************************ */ -#define R_INTEGER 1 -#define R_LONG 2 -#define R_DOUBLE 8 -#define R_JULIAN 32 -#define R_LOGICAL 128 -#define R_CHAR 1024 -#define R_DATESTR 1056 -#define R_MEMO 3072 -#define R_BITMAP 4096 -#define R_BLOBFILE 8192 -#define R_BLOBPTR 8193 -#define R_GENERAL 8195 - -/* ******************************** */ -/* sx_QueryTest Results */ -/* ******************************** */ -#define OPTIMIZE_NONE 0 -#define OPTIMIZE_PART 1 -#define OPTIMIZE_FULL 2 - -/* ******************************** */ -/* sx_EvalTest Results */ -/* ******************************** */ -#define EVAL_CHARACTER 1 -#define EVAL_NUMERIC 2 -#define EVAL_LOGICAL 3 - -/* ******************************** */ -/* sx_Index(tag) iOptions */ -/* ******************************** */ -#define IDX_NONE 0 -#define IDX_UNIQUE 1 -#define IDX_EMPTY 2 - -/* ******************************** */ -/* sx_ErrorLevel uiErrorLevels */ -/* ******************************** */ -#define ERRLEVEL_NONE 0 -#define ERRLEVEL_FATAL 1 -#define ERRLEVEL_STANDARD 2 - -/* ***************************************** */ -/* RYO HB_BOOL Operations for RYOFilterActivate */ -/* ***************************************** */ -#define RYOFILTER_NEW 1 -#define RYOFILTER_AND 2 -#define RYOFILTER_OR 3 -#define RYOFILTER_XOR 4 -#define RYOFILTER_ANDNOT 5 -#define RYOFILTER_ORNOT 6 -#define RYOFILTER_XORNOT 7 - -/* ***************************************** */ -/* Collation rule type */ -/* ***************************************** */ -#define ALPHABETICAL 0 /* usual linguistic */ -#define SPELLING 1 /* == Duden */ -#define EXPANDING 2 /* additonal groups coalltion rule */ -#define MACHINE 3 /* simple value ordering */ - -/* ***************************************** */ -/* Collation rule order */ -/* ***************************************** */ -#define DEFAULT_SET 0 /* ALPHABETICAL or duden or expanding default */ - -/* ******************************** */ -/* sx_SysProp Constants */ -/* ******************************** */ - -/* Global Task Information */ -/* Gets should always be even numbers */ -#define SDE_SP_GETSOFTSEEK 1000 /* Get the softseek flag */ -#define SDE_SP_SETSOFTSEEK 1001 /* Set the softseek flag */ -#define SDE_SP_GETEXACT 1002 /* Get the extact flag */ -#define SDE_SP_SETEXACT 1003 /* Set the extact flag */ -#define SDE_SP_GETDELETED 1006 /* Get the deleted flag */ -#define SDE_SP_PUTOBUFFER 1007 /* Write the optimistic buffer on commit */ -#define SDE_SP_GETOBUFFER 1008 /* Get the optimistic buffer flag */ -#define SDE_SP_SETOBUFFER 1009 /* Set the optimistic buffer flag */ -#define SDE_SP_GETSTRINGTYPE 1010 /* Get the stringtype flag */ -#define SDE_SP_SETSTRINGTYPE 1011 /* Set the stringtype flag */ -#define SDE_SP_GETDISABLEAUTO 1012 /* Get the disable auto open flag */ -#define SDE_SP_SETDISABLEAUTO 1013 /* Set the disable auto open flag */ -#define SDE_SP_SETOEMCOLLATE 1101 /* Set the collation sequence for OEM tables. */ -#define SDE_SP_GETOEMCOLLATE 1111 /* Get the collation sequence for OEM tables. */ -#define SDE_SP_SETCHRCOLLATE 1102 /* Set the collation sequence for Win tables. */ -#define SDE_SP_GETCHRCOLLATE 1122 /* Get the collation sequence for Win tables. */ -#define SDE_SP_SETLGTRCOLLATE 1103 /* Set the ligatures collation dimmension */ -#define SDE_SP_GETLGTRCOLLATE 1133 /* Get the ligatures collation dimmension */ -#define SDE_SP_SETSPECIALCOLLATE 1108 /* Set the international collation like DUDEN collate flag */ -#define SDE_SP_GETSPECIALCOLLATE 1109 /* Set the international collation like DUDEN collate flag */ -#define SDE_SP_GETLANGUAGECOLLATE 1110 /* Get language, according to collation done */ -#define SDE_SP_GETDUDENCOLLATE 1104 /* get the German DUDEN collate flag */ -#define SDE_SP_SETDUDENCOLLATE 1105 /* set the German DUDEN collate flag */ -#define SDE_SP_GETLIMITCASECONV 1106 /* limit case conv to A-Z, a-z if HB_TRUE */ -#define SDE_SP_SETLIMITCASECONV 1107 /* limit case conv to A-Z, a-z if HB_TRUE */ - -/* Behavior settings which bridge the differences between 1.40 and 2.00 */ -#define SDE_SP_GETADDQUERY 1300 /* Get the AddQueryFlag */ -#define SDE_SP_SETADDQUERY 1301 /* Set the AddQueryFlag */ -#define SDE_SP_GETUSECONDITIONAL 1302 /* Get the bUseConditional flag */ -#define SDE_SP_SETUSECONDITIONAL 1303 /* Get the bUseConditional flag */ -#define SDE_SP_SETWRITEBLOBHDR 1305 /* Set the bWriteBlobHdr */ -#define SDE_SP_GETQUERYRELAXFLAG 1306 /* Get flag that dictates rules of query */ -#define SDE_SP_SETQUERYRELAXFLAG 1307 /* Set flag that dictates rules of query */ - -/* WorkArea information */ -#define SDE_SP_GETDRIVER 2000 /* Get the active driver */ -#define SDE_SP_SETSTRDEFLEN 2001 /* Set the default lenght for STR, if 2nd parameter is absent and field lenght zero */ -#define SDE_SP_SETSTRDEFDEC 2002 /* Set the default decimals for STR, if 3d parameter is absent and field lenght zero */ -#define SDE_SP_SETDEFAPPEND 2003 /* Set default behavior for ordering ordering for non-unique key like FOX/Clipper */ -#define SDE_SP_SETMEMOMIXED 2004 /* Set pure Clipper's memo for NSX driver */ -#define SDE_SP_BDESPECIFIC 2005 /* Set the treatment of LIKE operator in accoring to BDE */ -#define SDE_SP_DBASEDATEHEADER 2006 /* Set the using of DBF header in according to DbaseIII+ specification */ -#define SDE_SP_SETAUTOPAD 2007 -#define SDE_SP_GETAUTOPAD 2008 - -/* Index information for current workarea */ -#define SDE_SP_GETINDEXCOUNT 3000 /* Get the number of indexes */ -#define SDE_SP_GETDESCENDING 3002 /* Get the descending flag */ -#define SDE_SP_GETEMPTY 3004 /* Get the empty index flag */ -#define NIL '\0' - -/* Verify Types */ -#define VBEG 1 /* verify at begining of string only */ -#define VEND 2 /* verify at end of string only */ -#define VAND 3 /* verify all tokens in target */ -#define VONE 4 /* don't tokenize target */ - -/* FTS File Open Modes */ -#define FTS_SHARE 0x0 /* SHARE */ -#define FTS_EXCL 0x1 /* EXCLUSIVE */ -#define FTS_RDONLY 0x2 /* READ-ONLY */ - -#define FTSifdelete FTSisdelete /* permit old name */ - -/* FTS Error Codes */ -#define FTS_CREATEFAIL -1 -#define FTS_MEMERR -2 -#define FTS_NULLPTR -3 -#define FTS_BADSEEK -4 -#define FTS_BADREAD -5 -#define FTS_BADWRITE -6 -#define FTS_RECBOUND -7 -#define FTS_ISDELETED -8 -#define FTS_NOTDELETED -9 -#define FTS_OPENERR -10 -#define FTS_INTERR -11 -#define FTS_NORECS -13 -#define FTS_BADPARMS -16 -#define FTS_NOMOREHANDLES -17 -#define FTS_BADHANDLE -18 -#define FTS_BADIHANDLE -19 -#define FTS_LOCKFAILED -20 -#define FTS_NOMORELOCKS -21 -#define FTS_CANNOTUNLOCK -22 -#define FTS_BADCOMMIT -23 +#undef _declspec #define SX_DUMMY_NUMBER 9999 @@ -287,7 +75,6 @@ typedef struct SX_DBOPENINFO HB_EXTERN_BEGIN -extern LONG _sx_SysProp( WORD uiSysItem, PVOID vpData ); extern char * _sx_randomname( const char * szPrefix ); extern PHB_ITEM _sx_FieldNames( void ); extern int _sx_CheckRDD( const char * sSetDefault ); diff --git a/harbour/extras/hbapollo/tests/hbmk.hbm b/harbour/extras/hbapollo/tests/hbmk.hbm index d8acbe34ec..a7ca888e69 100644 --- a/harbour/extras/hbapollo/tests/hbmk.hbm +++ b/harbour/extras/hbapollo/tests/hbmk.hbm @@ -2,6 +2,6 @@ # $Id$ # -hbapollo.hbc +../hbapollo.hbc -w3 -es2