From 5c7a07b0baea873077e96c80062ffbe55d9e7366 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 15 Jul 2010 05:14:56 +0000 Subject: [PATCH] 2010-07-15 07:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbdoc2/hbdoc2.prg * contrib/hbdoc2/hbdoc2.hbp - contrib/hbdoc2/genhbd.prg - Deleted .hbd geneation from hbdoc2. This tool will have to redesigned to use core hbdoc load/save functions, etetc. ; Patches by Tamas Tevesz: * src/pp/ppcore.c ! Fixed very old bad type on one of the PP error msgs. * contrib/gtwvg/wvgwin.c * contrib/gtwvg/wvgwing.c * contrib/hbwin/win_shell.c * Cleanups after recent changes. --- harbour/ChangeLog | 28 +++++-- harbour/contrib/gtwvg/wvgwin.c | 24 ------ harbour/contrib/gtwvg/wvgwing.c | 19 +++-- harbour/contrib/hbdoc2/genhbd.prg | 134 ------------------------------ harbour/contrib/hbdoc2/hbdoc2.hbp | 1 - harbour/contrib/hbdoc2/hbdoc2.prg | 2 +- harbour/contrib/hbwin/win_shell.c | 11 ++- harbour/src/pp/ppcore.c | 2 +- 8 files changed, 43 insertions(+), 178 deletions(-) delete mode 100644 harbour/contrib/hbdoc2/genhbd.prg diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 25b46754db..956579d4dc 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,11 +16,29 @@ The license applies to all entries newer than 2009-04-28. */ +2010-07-15 07:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbdoc2/hbdoc2.prg + * contrib/hbdoc2/hbdoc2.hbp + - contrib/hbdoc2/genhbd.prg + - Deleted .hbd geneation from hbdoc2. This tool will + have to redesigned to use core hbdoc load/save functions, + etetc. + + ; Patches by Tamas Tevesz: + + * src/pp/ppcore.c + ! Fixed very old bad type on one of the PP error msgs. + + * contrib/gtwvg/wvgwin.c + * contrib/gtwvg/wvgwing.c + * contrib/hbwin/win_shell.c + * Cleanups after recent changes. + 2010-07-14 18:06 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/hbqt_hbqplaintextedit.cpp ! Fixed: a nasty bug in :paintEvent plus its subsidiaries. The bug went unnoticed on Windows by some reasons unknown, - though it is documented in Qt help. This is repoted by + though it is documented in Qt help. This is repoted by Antonio Linares when he was testing hbIDE on OSX. * contrib/hbxbp/xbpbrowse.prg @@ -29,19 +47,19 @@ * contrib/hbide/idebrowse.prg * contrib/hbide/idesaveload.prg + Implemented: indexed table navigation. Current implementation - only supports structural indexes in DBFCDX. Click on some - table header, point to "Index" ideDBU toolbar icon and click + only supports structural indexes in DBFCDX. Click on some + table header, point to "Index" ideDBU toolbar icon and click on drop-down list of index tags and expressions, select one and this index will become the active one. + Implemented: search feature on indesed tables, only for string fields. While staying inside a browser, press CTRL+F (Find), - provide serach string, and there you will be. + provide serach string, and there you will be. + Titlebar now holds the various facts about the navigation. Tooltip on the titlebar holds the table's full path. - TODO: after settling all actions, a left-side toolbar will + TODO: after settling all actions, a left-side toolbar will hold them as icons. One toolbar only for all panels and browsers. If you have better ideas please forward. diff --git a/harbour/contrib/gtwvg/wvgwin.c b/harbour/contrib/gtwvg/wvgwin.c index 4d4bf33c7d..c74e8f6c93 100644 --- a/harbour/contrib/gtwvg/wvgwin.c +++ b/harbour/contrib/gtwvg/wvgwin.c @@ -74,30 +74,6 @@ /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ -#if defined( __BORLANDC__ ) -# if !defined( NONAMELESSUNION ) -# define NONAMELESSUNION -# endif -# if defined( DUMMYUNIONNAME ) -# undef DUMMYUNIONNAME -# endif -# if defined( DUMMYUNIONNAME2 ) -# undef DUMMYUNIONNAME2 -# endif -# if defined( DUMMYUNIONNAME3 ) -# undef DUMMYUNIONNAME3 -# endif -# if defined( DUMMYUNIONNAME4 ) -# undef DUMMYUNIONNAME4 -# endif -# if defined( DUMMYUNIONNAME5 ) -# undef DUMMYUNIONNAME5 -# endif -# define HB_WIN_V_UNION( x, y, z ) ((x).y.z) -#else -# define HB_WIN_V_UNION( x, y, z ) ((x).z) -#endif - #include "gtwvg.h" #include "hbwapi.h" diff --git a/harbour/contrib/gtwvg/wvgwing.c b/harbour/contrib/gtwvg/wvgwing.c index aac978b82a..e4f5135070 100644 --- a/harbour/contrib/gtwvg/wvgwing.c +++ b/harbour/contrib/gtwvg/wvgwing.c @@ -93,9 +93,6 @@ # if defined( DUMMYUNIONNAME5 ) # undef DUMMYUNIONNAME5 # endif -# define HB_WIN_V_UNION( x, y, z ) ((x).y.z) -#else -# define HB_WIN_V_UNION( x, y, z ) ((x).z) #endif #include "gtwvg.h" @@ -103,6 +100,12 @@ #include +#if defined( NONAMELESSUNION ) +# define HB_WIN_V_UNION( x, z ) ((x).DUMMYUNIONNAME.z) +#else +# define HB_WIN_V_UNION( x, z ) ((x).z) +#endif + #if !defined( GCLP_HBRBACKGROUND ) # define GCLP_HBRBACKGROUND -10 #endif @@ -709,15 +712,15 @@ HB_FUNC( WVG_TREEVIEW_ADDITEM ) LPTSTR text = HB_TCHAR_CONVTO( hb_parcx( 3 ) ); tvis.hInsertAfter = TVI_LAST; - HB_WIN_V_UNION( tvis, u, item.mask ) = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE; - HB_WIN_V_UNION( tvis, u, item.cchTextMax ) = MAX_PATH + 1; - HB_WIN_V_UNION( tvis, u, item.stateMask ) = TVIS_BOLD | TVIS_CUT | TVIS_DROPHILITED | + HB_WIN_V_UNION( tvis, item.mask ) = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE; + HB_WIN_V_UNION( tvis, item.cchTextMax ) = MAX_PATH + 1; + HB_WIN_V_UNION( tvis, item.stateMask ) = TVIS_BOLD | TVIS_CUT | TVIS_DROPHILITED | TVIS_EXPANDEDONCE | TVIS_SELECTED | TVIS_EXPANDPARTIAL | TVIS_OVERLAYMASK | TVIS_STATEIMAGEMASK | TVIS_USERMASK; - HB_WIN_V_UNION( tvis, u, item.state ) = 0; /* TVI_BOLD */ + HB_WIN_V_UNION( tvis, item.state ) = 0; /* TVI_BOLD */ tvis.hParent = HB_ISNUM( 2 ) ? ( HTREEITEM ) wvg_parhandle( 2 ) : NULL; - HB_WIN_V_UNION( tvis, u, item.pszText ) = text; + HB_WIN_V_UNION( tvis, item.pszText ) = text; hb_retnint( ( HB_PTRDIFF ) TreeView_InsertItem( wvg_parhwnd( 1 ), &tvis ) ); diff --git a/harbour/contrib/hbdoc2/genhbd.prg b/harbour/contrib/hbdoc2/genhbd.prg deleted file mode 100644 index e99441801e..0000000000 --- a/harbour/contrib/hbdoc2/genhbd.prg +++ /dev/null @@ -1,134 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * Document generator - HBFDB output - * - * Copyright 2010 Viktor Szakats (harbour 01 syenar hu) - * www - http://harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. - * - */ - -#include "hbclass.ch" -#include "inkey.ch" -#include "fileio.ch" -#include "hbdoc2.ch" - -CLASS GenerateHBD FROM TPLGenerate -HIDDEN: - -PROTECTED: - -EXPORTED: - METHOD NewIndex( cFolder, cFilename, cTitle ) - METHOD NewDocument( cFolder, cFilename, cTitle ) - METHOD AddEntry( oEntry ) - METHOD AddIndex( oEntry ) HIDDEN - METHOD BeginSection( cSection, cFilename ) - METHOD EndSection( cSection, cFilename ) - METHOD Generate() - - METHOD WriteEntry( cCaption, cEntry, lPreformatted ) HIDDEN - - VAR aProto INIT {} - VAR cFileName INIT "out" - -ENDCLASS - -METHOD NewDocument( cFolder, cFilename, cTitle ) CLASS GenerateHBD - HB_SYMBOL_UNUSED( cFolder ) - HB_SYMBOL_UNUSED( cTitle ) - - ::cFileName := cFileName - - RETURN self - -METHOD NewIndex( cFolder, cFilename, cTitle ) CLASS GenerateHBD - HB_SYMBOL_UNUSED( cFolder ) - HB_SYMBOL_UNUSED( cFileName ) - HB_SYMBOL_UNUSED( cTitle ) - RETURN self - -METHOD BeginSection( cSection, cFilename ) CLASS GenerateHBD - HB_SYMBOL_UNUSED( cSection ) - HB_SYMBOL_UNUSED( cFileName ) - RETURN self - -METHOD EndSection( cSection, cFilename ) CLASS GenerateHBD - HB_SYMBOL_UNUSED( cSection ) - HB_SYMBOL_UNUSED( cFilename ) - RETURN self - -METHOD AddIndex( oEntry ) CLASS GenerateHBD - HB_SYMBOL_UNUSED( oEntry ) - RETURN self - -METHOD AddEntry( oEntry ) CLASS GenerateHBD - LOCAL idx - - HB_SYMBOL_UNUSED( oEntry ) - - FOR idx := 1 TO Len( oEntry:Fields ) - IF oEntry:Fields[ idx ][ 1 ] == "SYNTAX" - AAdd( ::aProto, oEntry:&( oEntry:Fields[ idx ][ 1 ] ) ) - ENDIF - NEXT - - RETURN self - -METHOD Generate() CLASS GenerateHBD - LOCAL cDir, cName - - hb_FNameSplit( ::cFileName, @cDir, @cName ) - - hb_MemoWrit( hb_FNameMerge( cDir, cName, ".hbd" ), hb_serialize( ::aProto ) ) - - RETURN self - -METHOD PROCEDURE WriteEntry( cCaption, cEntry, lPreformatted ) CLASS GenerateHBD - HB_SYMBOL_UNUSED( cCaption ) - HB_SYMBOL_UNUSED( cEntry ) - HB_SYMBOL_UNUSED( lPreformatted ) - - RETURN diff --git a/harbour/contrib/hbdoc2/hbdoc2.hbp b/harbour/contrib/hbdoc2/hbdoc2.hbp index 6119e8ae0f..609f85206d 100644 --- a/harbour/contrib/hbdoc2/hbdoc2.hbp +++ b/harbour/contrib/hbdoc2/hbdoc2.hbp @@ -12,7 +12,6 @@ hbdoc2.prg -genhbd.prg gentpl.prg gentxt.prg genhtml.prg diff --git a/harbour/contrib/hbdoc2/hbdoc2.prg b/harbour/contrib/hbdoc2/hbdoc2.prg index 78dca5bc61..12a083bb2b 100644 --- a/harbour/contrib/hbdoc2/hbdoc2.prg +++ b/harbour/contrib/hbdoc2/hbdoc2.prg @@ -136,7 +136,7 @@ PROCEDURE Main( ... ) /* internal settings, values, etc */ ; "PATH_SEPARATOR", hb_ps(), ; "DELIMITER", "$", ; - "format-list", { "text", "ascii", "html", "html2", "xml", "hbd", "rtf", "hpc", "ngi", "os2", "chm", "ch2", "pdf", "trf", "doc", "dbf", "all" }, ; + "format-list", { "text", "ascii", "html", "html2", "xml", "rtf", "hpc", "ngi", "os2", "chm", "ch2", "pdf", "trf", "doc", "dbf", "all" }, ; "hbextern.ch", {}, ; "in hbextern", {}, ; "not in hbextern", {}, ; diff --git a/harbour/contrib/hbwin/win_shell.c b/harbour/contrib/hbwin/win_shell.c index 1543ace59b..bf30b8c6ad 100644 --- a/harbour/contrib/hbwin/win_shell.c +++ b/harbour/contrib/hbwin/win_shell.c @@ -76,13 +76,16 @@ # if defined( DUMMYUNIONNAME5 ) # undef DUMMYUNIONNAME5 # endif -# define HB_WIN_V_UNION( x, y, z ) ((x).y.z) -#else -# define HB_WIN_V_UNION( x, y, z ) ((x).z) #endif #include +#if defined( NONAMELESSUNION ) +# define HB_WIN_V_UNION( x, z ) ((x).DUMMYUNIONNAME.z) +#else +# define HB_WIN_V_UNION( x, z ) ((x).z) +#endif + /* WIN_ShellNotifyIcon( [], [], [], [], [], [], [], [], [], [] ) -> */ @@ -109,7 +112,7 @@ HB_FUNC( WIN_SHELLNOTIFYICON ) { if( HB_ITEMCOPYSTR( hb_param( 7, HB_IT_ANY ), tnid.szInfo, HB_SIZEOFARRAY( tnid.szInfo ) ) > 0 ) tnid.uFlags |= NIF_INFO; - HB_WIN_V_UNION( tnid, u, uTimeout ) = ( UINT ) hb_parni( 8 ); + HB_WIN_V_UNION( tnid, uTimeout ) = ( UINT ) hb_parni( 8 ); if( HB_ITEMCOPYSTR( hb_param( 9, HB_IT_ANY ), tnid.szInfoTitle, HB_SIZEOFARRAY( tnid.szInfoTitle ) ) > 0 ) tnid.uFlags |= NIF_INFO; tnid.dwInfoFlags = ( DWORD ) hb_parnl( 10 ); diff --git a/harbour/src/pp/ppcore.c b/harbour/src/pp/ppcore.c index 9cf17d115c..6f93164bea 100644 --- a/harbour/src/pp/ppcore.c +++ b/harbour/src/pp/ppcore.c @@ -124,7 +124,7 @@ static const char * hb_pp_szErrors[] = "Empty optional clause in #translate/#command", /* C2065 */ "Unclosed optional clause in #translate/#command", /* C2066 */ "Error in #ifdef", /* C2068 */ - "#endif does not match #endif", /* C2069 */ + "#endif does not match #ifdef", /* C2069 */ "#else does not match #ifdef", /* C2070 */ "Error in #undef", /* C2071 */ "Ambiguous match pattern in #translate/#command", /* C2072 */