2009-12-05 18:38 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* contrib/hbide/hbide.prg
    - Deleted non __HARBOUR__ #if branch. Please tell me if I'm 
      wrong but hbide doesn't work anywhere else than Harbour.
    * IF() -> IIF().

  * contrib/hbide/hbide.env
    - Deleted windows-only stuff.
    - Deleted HB_COMPILER and HB_PLATFORM envvars. These are not required.
    * HB_INC_* -> HB_WITH_* although I don't understand why this is needed here.
      It probably should be deleted completely.
    ; NOTE: IMO this whole file is very much non-portable and it's not the 
            IDEs job to configure local environment. We have INSTALL to guide 
            users and hard coding any part of that information into setting 
            files is not good.

  * contrib/hbide/idestylesheets.prg
    % Optimized.

  * contrib/hbide/ideparseexpr.c
    ! Changed to use '\0' instead of 0.
This commit is contained in:
Viktor Szakats
2009-12-05 17:38:37 +00:00
parent 14552ab56f
commit 765d52eb90
5 changed files with 80 additions and 76 deletions

View File

@@ -17,6 +17,28 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-12-05 18:38 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbide/hbide.prg
- Deleted non __HARBOUR__ #if branch. Please tell me if I'm
wrong but hbide doesn't work anywhere else than Harbour.
* IF() -> IIF().
* contrib/hbide/hbide.env
- Deleted windows-only stuff.
- Deleted HB_COMPILER and HB_PLATFORM envvars. These are not required.
* HB_INC_* -> HB_WITH_* although I don't understand why this is needed here.
It probably should be deleted completely.
; NOTE: IMO this whole file is very much non-portable and it's not the
IDEs job to configure local environment. We have INSTALL to guide
users and hard coding any part of that information into setting
files is not good.
* contrib/hbide/idestylesheets.prg
% Optimized.
* contrib/hbide/ideparseexpr.c
! Changed to use '\0' instead of 0.
2009-12-05 15:33 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbide/ideparseexpr.c
! Fixed to not contain non-ANSI comments.

View File

@@ -1,14 +1,10 @@
[ MinGW 4.4.1 ]
SET PATH=e:\harbour;e:\harbour\bin;c:\harbour-11\mingw\bin;c:\qt\2009.01\qt\bin;%PATH%
set HB_ARCHITECTURE=win
set HB_COMPILER=mingw
set HB_INSTALL_PREFIX=e:\harbour
set HB_INC_QT=c:\qt\2009.01\qt\include
set HB_USER_PRGFLAGS=-gc3 -d__HB_WINDEBUG__ -d__HB_DEBUG__
set HB_USER_CFLAGS=-D__HB_WINDEBUG__ -D__HB_DEBUG__ -DHB_FM_STATISTICS
set HB_USER_PRGFLAGS=-gc3 -d__HB_DEBUG__
set HB_USER_CFLAGS=-D__HB_DEBUG__
[ Visual Studio 8 ]
@@ -16,12 +12,7 @@ call "%ProgramFiles%\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86
set PATH=e:\harbour;e:\harbour\bin;c:\harbour-11\mingw\bin;c:\qt\2009.01\qt\bin;%PATH%
set HB_ARCHITECTURE=win
set HB_COMPILER=msvc
set HB_INSTALL_PREFIX=e:\harbour
set HB_INC_QT=c:\qt\2009.01\qt\include
set HB_USER_PRGFLAGS=-gc3
set HB_USER_CFLAGS=-DHB_FM_STATISTICS

set HB_USER_CFLAGS=

View File

@@ -74,11 +74,7 @@
#include "set.ch"
#include "hbclass.ch"
#ifdef __HARBOUR__
#define UNU( x ) HB_SYMBOL_UNUSED( x )
#else
#define UNU( x ) ( x := x )
#endif
#define UNU( x ) HB_SYMBOL_UNUSED( x )
/*----------------------------------------------------------------------*/
@@ -394,9 +390,9 @@ METHOD HbIde:saveConfig()
txt_:= {}
aadd( txt_, "[HBIDE]" )
aadd( txt_, "MainWindowGeometry = " + PosAndSize( ::oDlg:oWidget ) )
aadd( txt_, "ProjectTreeVisible = " + IF( ::lProjTreeVisible, "YES", "NO" ) )
aadd( txt_, "ProjectTreeVisible = " + IIF( ::lProjTreeVisible, "YES", "NO" ) )
aadd( txt_, "ProjectTreeGeometry = " + PosAndSize( ::oProjTree:oWidget ) )
aadd( txt_, "FunctionListVisible = " + IF( ::lDockRVisible, "YES", "NO" ) )
aadd( txt_, "FunctionListVisible = " + IIF( ::lDockRVisible, "YES", "NO" ) )
aadd( txt_, "FunctionListGeometry = " + PosAndSize( ::oFuncList:oWidget ) )
aadd( txt_, "RecentTabIndex = " + hb_ntos( ::qTabWidget:currentIndex() ) )
aadd( txt_, "CurrentProject = " + "" )
@@ -534,7 +530,7 @@ METHOD HbIde:convertSelection( cKey )
nLen := len( cBuffer )
FOR i := 1 TO nLen
c := substr( cBuffer, i, 1 )
s += IF( isUpper( c ), lower( c ), upper( c ) )
s += IIF( isUpper( c ), lower( c ), upper( c ) )
NEXT
cBuffer := s
ENDCASE
@@ -597,7 +593,7 @@ METHOD HbIde:setTabImage( oTab, qEdit, nPos, lFirst, qDocument )
::qTabWidget:setTabIcon( nIndex, s_resPath + iif( lModified, "tabmodified.png", "tabunmodified.png" ) )
::oSBar:getItem( 7 ):caption := IF( lModified, "Modified", " " )
::oSBar:getItem( 7 ):caption := IIF( lModified, "Modified", " " )
IF lFirst
lFirst := .f.
@@ -922,9 +918,9 @@ METHOD HbIde:dispEditInfo()
::oSBar:getItem( 4 ):caption := "Col " + hb_ntos( ::qCursor:columnNumber()+1 )
::oSBar:getItem( 5 ):caption := IF( qEdit:overwriteMode(), " ", "Ins" )
::oSBar:getItem( 5 ):caption := IIF( qEdit:overwriteMode(), " ", "Ins" )
::oSBar:getItem( 7 ):caption := IF( qDoc:isModified(), "Modified", " " )
::oSBar:getItem( 7 ):caption := IIF( qDoc:isModified(), "Modified", " " )
::oSBar:getItem( 9 ):caption := "Stream"
::oSBar:getItem( 10 ):caption := "Edit"

View File

@@ -83,7 +83,7 @@ static int s_lendouble = HB_SIZEOFARRAY( s_adouble );
/*----------------------------------------------------------------------*/
static HB_SIZE linearfind( const char** array, const char* cText, HB_SIZE lenarray, HB_SIZE lentext, HB_BOOL bMatchCase )
static HB_SIZE linearfind( const char ** array, const char * cText, HB_SIZE lenarray, HB_SIZE lentext, HB_BOOL bMatchCase )
{
HB_SIZE i;
@@ -159,8 +159,8 @@ static int _GetWord( const char * cText, HB_BOOL lHonorSpacing, char * cWord, in
char csingle[ 2 ];
char cdouble[ 3 ];
csingle[ 1 ] = 0;
cdouble[ 2 ] = 0;
csingle[ 1 ] = '\0';
cdouble[ 2 ] = '\0';
ch = cText[ 0 ];
@@ -181,7 +181,7 @@ static int _GetWord( const char * cText, HB_BOOL lHonorSpacing, char * cWord, in
{
ch = cText[ npos ];
cWord[ wordlen++ ] = ch;
npos ++;
npos++;
}
}
else
@@ -203,7 +203,7 @@ static int _GetWord( const char * cText, HB_BOOL lHonorSpacing, char * cWord, in
while( ( npos < maxlen ) && ch == ' ' )
{
cWord[ wordlen++ ] = ch;
npos ++;
npos++;
ch = cText[ npos ];
}
@@ -216,7 +216,7 @@ static int _GetWord( const char * cText, HB_BOOL lHonorSpacing, char * cWord, in
else /* operators, punctuation */
{
cWord[ wordlen++ ]= ch;
npos ++;
npos++;
ch = cText[ npos ];
if( maxlen > npos )
{
@@ -225,7 +225,7 @@ static int _GetWord( const char * cText, HB_BOOL lHonorSpacing, char * cWord, in
if( linearfind( s_adouble, cdouble, s_lendouble, 2, HB_TRUE ) ) /* if( (cWord + ch) $ s_adouble) //aScan( s_adouble, cWord + ch ) > 0 */
{
cWord[ wordlen++ ] = ch;
npos ++;
npos++;
}
}
}
@@ -233,7 +233,7 @@ static int _GetWord( const char * cText, HB_BOOL lHonorSpacing, char * cWord, in
}
}
cWord[ wordlen ] = 0;
cWord[ wordlen ] = '\0';
*pnpos = npos;
return wordlen;
@@ -262,7 +262,7 @@ HB_FUNC( PARSEXPR )
char NextWord[ MAX_LINE_LEN + 1 ];
NextWord[ 0 ] = 0;
NextWord[ 0 ] = '\0';
while( ( wordlen = _GetWord( c, lHonorSpacing, NextWord, &lenprocessed ) ) != 0 )
{
@@ -297,7 +297,7 @@ HB_FUNC( PARSEXPR )
if( lKeepComments )
{
strncpy( NextWord + wordlen, c, npos + 1 );
NextWord[ wordlen + npos + 1 ] = 0;
NextWord[ wordlen + npos + 1 ] = '\0';
lenwords++;
hb_arrayAdd( aExpr, hb_itemPutC( element, NextWord ) );
}

View File

@@ -69,54 +69,49 @@
/*----------------------------------------------------------------------*/
FUNCTION GetStyleSheet( cWidget )
LOCAL s, txt_:={}
DO CASE
CASE cWidget == "QListView"
aadd( txt_, " " )
aadd( txt_, " QListView { " )
aadd( txt_, " alternate-background-color: yellow; " )
aadd( txt_, " } " )
aadd( txt_, " " )
aadd( txt_, " QListView { " )
aadd( txt_, " show-decoration-selected: 1; " )
aadd( txt_, " } " )
aadd( txt_, " " )
aadd( txt_, " QListView::item:alternate { " )
aadd( txt_, " background: #EEEEEE; " )
aadd( txt_, " } " )
aadd( txt_, " " )
aadd( txt_, " QListView::item:selected { " )
aadd( txt_, " border: 1px solid #6a6ea9; " )
aadd( txt_, " } " )
aadd( txt_, " " )
aadd( txt_, " QListView::item:selected:!active { " )
aadd( txt_, " background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, " )
aadd( txt_, " stop: 0 #ABAFE5, stop: 1 #8588B2); " )
aadd( txt_, " } " )
aadd( txt_, " " )
aadd( txt_, " QListView::item:selected:active { " )
aadd( txt_, " background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, " )
aadd( txt_, " stop: 0 #6a6ea9, stop: 1 #888dd9); " )
aadd( txt_, " } " )
aadd( txt_, " " )
aadd( txt_, " QListView::item:hover { " )
aadd( txt_, " background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, " )
aadd( txt_, " stop: 0 #FAFBFE, stop: 1 #DCDEF1); " )
aadd( txt_, "} " )
aadd( txt_, " " )
aadd( txt_, " QListView { " )
aadd( txt_, " background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, " )
aadd( txt_, " stop: 0 #8588B2, stop: 1 #DCDEF1); " )
aadd( txt_, "} " )
aadd( txt_, " " )
RETURN "" +;
" QListView {" +;
" alternate-background-color: yellow;" +;
" }" +;
"" +;
" QListView {" +;
" show-decoration-selected: 1;" +;
" }" +;
"" +;
" QListView::item:alternate {" +;
" background: #EEEEEE;" +;
" }" +;
"" +;
" QListView::item:selected {" +;
" border: 1px solid #6a6ea9;" +;
" }" +;
"" +;
" QListView::item:selected:!active {" +;
" background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1," +;
" stop: 0 #ABAFE5, stop: 1 #8588B2);" +;
" }" +;
"" +;
" QListView::item:selected:active {" +;
" background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1," +;
" stop: 0 #6a6ea9, stop: 1 #888dd9);" +;
" }" +;
"" +;
" QListView::item:hover {" +;
" background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1," +;
" stop: 0 #FAFBFE, stop: 1 #DCDEF1);" +;
"}" +;
"" +;
" QListView {" +;
" background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0," +;
" stop: 0 #8588B2, stop: 1 #DCDEF1);" +;
"}"
ENDCASE
s := ""
aeval( txt_, {|e| s += e + chr( 13 )+chr( 10 ) } )
RETURN s
RETURN ""
/*----------------------------------------------------------------------*/