2009-03-19 12:27 UTC+0100 Viktor Szakats (harbour.01 syenar hu)

* contrib/xhb/Makefile
  + contrib/xhb/hbserv.h
  + contrib/xhb/hbserv.ch
  + contrib/xhb/trpccli.prg
  + contrib/xhb/hbrpc.ch
  + contrib/xhb/ttable.prg
  + contrib/xhb/trpc.prg
  + contrib/xhb/ttable.ch
  + contrib/xhb/hbserv.c
    + Added few components from xhb. They compile without warnings, 
      but I didn't try any of them.

  * contrib/hbqt/hbqt_qabstractbutton.cpp
  * contrib/hbqt/hbqt_qdialog.cpp
  * contrib/hbqt/hbqt.h
  * contrib/hbqt/Makefile
    + Added QT_VERSION(), QT_VERSION_STR()
    + Added QT version protection.
    ! Fixed to use forward slashes in #include filenames.
    * Changed Linux include dir autodetection.
    * Changed autodetection to look for qglobal.h.

  * contrib/rddads/tests/testmg.prg
    - Removed unnecessary lines.
This commit is contained in:
Viktor Szakats
2009-03-19 11:28:18 +00:00
parent c0b89965bf
commit 1679d18aef
15 changed files with 5813 additions and 8 deletions

View File

@@ -8,6 +8,32 @@
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-03-19 12:27 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* contrib/xhb/Makefile
+ contrib/xhb/hbserv.h
+ contrib/xhb/hbserv.ch
+ contrib/xhb/trpccli.prg
+ contrib/xhb/hbrpc.ch
+ contrib/xhb/ttable.prg
+ contrib/xhb/trpc.prg
+ contrib/xhb/ttable.ch
+ contrib/xhb/hbserv.c
+ Added few components from xhb. They compile without warnings,
but I didn't try any of them.
* contrib/hbqt/hbqt_qabstractbutton.cpp
* contrib/hbqt/hbqt_qdialog.cpp
* contrib/hbqt/hbqt.h
* contrib/hbqt/Makefile
+ Added QT_VERSION(), QT_VERSION_STR()
+ Added QT version protection.
! Fixed to use forward slashes in #include filenames.
* Changed Linux include dir autodetection.
* Changed autodetection to look for qglobal.h.
* contrib/rddads/tests/testmg.prg
- Removed unnecessary lines.
2009-03-19 09:10 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* bin/postinst.bat
- Removed generation of odbc32.lib for BCC.

View File

@@ -11,17 +11,18 @@ ifneq ($(HB_ARCHITECTURE),os2)
ifeq ($(HB_INC_QT),)
ifeq ($(HB_XBUILD),)
HB_INC_QT = /usr/include /usr/local/Trolltech/Qt-4.5.0/include /Developer/qt/include
HB_INC_QT = /usr/include/qt4 /Developer/qt/include
endif
endif
HB_INC_QT_OK += $(foreach d, $(HB_INC_QT), $(if $(wildcard $(d)/Qt/qatomic.h),$(d),))
HB_INC_QT_OK += $(foreach d, $(HB_INC_QT), $(if $(wildcard $(d)/Qt/qglobal.h),$(d),))
ifneq ($(strip $(HB_INC_QT_OK)),)
HB_USER_CFLAGS += $(foreach d, $(HB_INC_QT_OK), -I$(d))
CPP_SOURCES=\
hbqt_base.cpp \
hbqt_qdialog.cpp \
hbqt_qabstractbutton.cpp \

View File

@@ -53,7 +53,11 @@
#ifndef __HBQT_H
#define __HBQT_H
#include <QtGui\QDialog>
#include <Qt/qglobal.h>
#if QT_VERSION >= 0x040500
#include <QtGui/QDialog>
#define hbqt_par_QWidget( n ) ( ( QWidget* ) hb_parptr( n ) )
#define hbqt_par_QDialog( n ) ( ( QDialog* ) hb_parptr( n ) )
@@ -61,4 +65,6 @@
#define hbqt_par_QString( n ) ( ( QString ) hb_parc( n ) )
#define hbqt_par_WindowFlags( n ) ( ( Qt::WindowFlags ) hb_parni( n ) )
#endif
#endif /* __HBQT_H */

View File

@@ -54,7 +54,9 @@
#include "hbqt.h"
#include <QtGui\QAbstractButton>
#if QT_VERSION >= 0x040500
#include <QtGui/QAbstractButton>
/*
bool autoExclusive () const
@@ -228,3 +230,5 @@ HB_FUNC( QT_QABSTRACTBUTTON_TOGGLE )
}
/*----------------------------------------------------------------------*/
#endif

View File

@@ -54,6 +54,8 @@
#include "hbqt.h"
#if QT_VERSION >= 0x040500
/*
QDialog ( QWidget * parent = 0, Qt::WindowFlags f = 0 )
*/
@@ -143,3 +145,5 @@ HB_FUNC( QT_QDIALOG_SETRESULT )
{
hbqt_par_QDialog( 1 )->setResult( hb_parni( 2 ) );
}
#endif

View File

@@ -55,17 +55,15 @@
#include "set.ch"
#include "ads.ch"
REQUEST ADS
function Main()
local i
REQUEST ADS
rddRegister( "ADS", 1 )
rddsetdefault( "ADS" )
SET SERVER LOCAL // REMOTE
AdsSetFileType(ADS_CDX)
// use test // make this available to get some stats on open tables below
? "Advantage Database Server Management Functions in Harbour"

View File

@@ -15,6 +15,7 @@ C_SOURCES=\
hbcomprs.c \
hbcrypt.c \
hboutdbg.c \
hbserv.c \
hbsyslog.c \
hbxml.c \
xhbarr.c \
@@ -40,6 +41,9 @@ PRG_SOURCES=\
hbstruct.prg \
regexrpl.prg \
sprintf.prg \
trpc.prg \
trpccli.prg \
ttable.prg \
txml.prg \
xhbcomp.prg \
xhbmt.prg \

View File

@@ -0,0 +1,77 @@
/*
* $Id$
*/
/*
* xHarbour Project source code:
* Remote Procedure Call code
* Standard definitions
*
* Copyright 2003 Giancarlo Niccolai <giancarlo@niccolai.ws>
* www - http://www.xharbour.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.
*
*/
#ifndef RPC_CH
#define RPC_CH
#define RPC_LOOP_NONE 0
#define RPC_LOOP_SUMMARY 1
#define RPC_LOOP_ALLDATA 2
#define RPC_LOOP_CONFIRMATION 3
#define RPC_STATUS_ERROR -1
#define RPC_STATUS_NONE 0
#define RPC_STATUS_CONNECTING 1
#define RPC_STATUS_CONNECTED 2
#define RPC_STATUS_LOGGED 3
#define RPC_STATUS_WAITING 4
#define RPCS_STATUS_BUSY -2
#define RPCS_STATUS_ERROR -1
#define RPCS_STATUS_NONE 0
#define RPCS_STATUS_CHALLENGE 1
#define RPCS_STATUS_LOGGED 2
#define RPCS_STATUS_RUNNING 3
#define RPCS_STATUS_CLOSED 10
#endif

1086
harbour/contrib/xhb/hbserv.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,90 @@
/*
* $Id$
*/
/*
* xHarbour Project source code:
* The Service/Daemon support
* (Includes also signal/low level error management)
*
* Copyright 2003 Giancarlo Niccolai [gian@niccolai.ws]
* www - http://www.xharbour.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, xHarbour license gives permission for
* additional uses of the text contained in its release of xHarbour.
*
* The exception is that, if you link the xHarbour 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 xHarbour 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 with this xHarbour
* explicit exception. if you add/copy code from other sources,
* as the General public License permits, the above 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 xHarbour, it is your choice
* whether to permit this exception to apply to your modifications.
* if you do not wish that, delete this exception notice.
*
*/
#ifndef HB_SERVICE_CH
#define HB_SERVICE_CH
/* Abstract signal types */
#define HB_SIGNAL_QUIT 0x0001
#define HB_SIGNAL_INTERRUPT 0x0002
#define HB_SIGNAL_REFRESH 0x0004
#define HB_SIGNAL_MATHERR 0x0010
#define HB_SIGNAL_FAULT 0x0020
#define HB_SIGNAL_USER1 0x0040
#define HB_SIGNAL_USER2 0x0080
#define HB_SIGNAL_UNKNOWN 0xf000
#define HB_SIGNAL_ALL 0xffff
/* Signal handler return types */
#define HB_SERVICE_CONTINUE 1
#define HB_SERVICE_HANDLED 2
#define HB_SERVICE_QUIT 3
/* Index in the OS dependant signal array that is passed to the
signal handler as a parameter
1: low-level signal
2: low-level subsignal
3: low-level system error
4: address that rised the signal
5: process id of the signal riser
6: UID of the riser
*/
#define HB_SERVICE_OSSIGNAL 1
#define HB_SERVICE_OSSUBSIG 2
#define HB_SERVICE_OSERROR 3
#define HB_SERVICE_ADDRESS 4
#define HB_SERVICE_PROCESS 5
#define HB_SERVICE_UID 6
#endif

View File

@@ -0,0 +1,62 @@
/*
* $Id$
*/
/*
* xHarbour Project source code:
* The Service/Daemon support
*
* Copyright 2003 Giancarlo Niccolai [gian@niccolai.ws]
* www - http://www.xharbour.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, xHarbour license gives permission for
* additional uses of the text contained in its release of xHarbour.
*
* The exception is that, if you link the xHarbour 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 xHarbour 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 with this xHarbour
* explicit exception. if you add/copy code from other sources,
* as the General public License permits, the above 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 xHarbour, it is your choice
* whether to permit this exception to apply to your modifications.
* if you do not wish that, delete this exception notice.
*
*/
#ifndef HB_SERVICE_H
#define HB_SERVICE_H
#ifndef HB_SERVICE_CH
#include "hbserv.ch"
#endif
HB_EXTERN_BEGIN
HB_EXPORT BOOL hb_isService( void );
HB_EXPORT void hb_serviceExit( void );
HB_EXTERN_END
#endif

1628
harbour/contrib/xhb/trpc.prg Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,200 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Header file for Table,Record and Field Class
*
* Copyright 1999 {list of individual authors and e-mail addresses}
* www - http://www.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.
*
*/
#ifndef _OTABLE_CH_
// --> Network messages
#define _NET_USE_FAIL_MSG "Net Open Fail !!!"
// --> ::dbMove() constants
#define _DB_TOP -999999999999
#define _DB_BOTTOM -888888888888
#define _DB_BOF -777777777777
#define _DB_EOF -666666666666
#define NET_RECLOCK 1
#define NET_FILELOCK 2
#define NET_APPEND 3
#define NET_OPEN_MODE .T.
#define EXCLUSIVE_OPEN_MODE .F.
#define RETRY_MSG "NETWORK ERROR;Continue Attempt to Lock Record/File ?"
#define YESNO_COLOR "R/W"
#define MAX_TABLE_AREAS 680
#xcommand DEFAULT <uVar1> := <uVal1> ;
[, <uVarN> := <uValN> ] => ;
<uVar1> := If( <uVar1> == nil, <uVal1>, <uVar1> ) ;;
[ <uVarN> := If( <uVarN> == nil, <uValN>, <uVarN> ); ]
#xcommand DEFAULT <v1> TO <x1> [, <vn> TO <xn> ] ;
=> ;
IF <v1> == NIL ; <v1> := <x1> ; END ;
[; IF <vn> == NIL ; <vn> := <xn> ; END ]
// --> OOPs
#xtranslate BYNAME <V> [, <VN> ] => ::<V> := <V> [; ::<VN> := <VN> ]
#xtranslate BYNAME <V> DEFAULT <Val> => ::<V> := BYDEFAULT <V>, <Val>
#xtranslate BYDEFAULT <V>, <Val> => if( <V> == NIL, <Val>, <V> )
#xCommand NETUSE <(cDBF)> ;
[ALIAS <cAlias>] ;
[VIA <cRDD>] ;
[TIMER <nSecs>] ;
[<new: NEW>] ;
[<ro: READONLY>] ;
=> ;
netDbUse( <(cDBF)>, <(cAlias)>, <nSecs>, <cRDD>, ;
<.new.>, NET_OPEN_MODE, <.ro.> )
// --> new table object
#xCommand DEFINE TABLE <oTable> ;
[FILE <cFileDBF>] ;
[INDEX <cFileIDX>] ;
[ALIAS <cAlias>] ;
[VIA <cDriver>] ;
[PATH <cPathDBF>] ;
[<lshared: SHARED>] ;
[<lnew: NEW>] ;
[<lrdonly: READONLY>] ;
=>;
<oTable> := TableNew( ;
<(cFileDBF)>, ;
<"cAlias">, ;
<(cFileIDX)>, ;
<(cDriver)>, ;
<.lshared.>, ;
<(cPathDBF)>, ;
<.lnew.>, ;
<.lrdonly.> )
// --> new order object
#xCommand DEFINE ORDER [<oOrder>] ;
ON [KEY] <key> ;
[TAG <cTag>] ;
[LABEL <cLabel>] ;
[FOR <for>] ;
[WHILE <while>] ;
[EVAL <eval>] ;
[EVERY <every>] ;
[<unique: UNIQUE>] ;
[TO <cOrderFile>];
IN <oTable> ;
=>;
[<oOrder>:=] <oTable>:AddOrder( ;
<(cTag)>, ;
<"key">, ;
<(cLabel)>, ;
<"for">, ;
<"while">, ;
[<.unique.>], ;
<{eval}>, ;
<every>, ;
<(cOrderFile)>;
)
#xCommand ADD FIELD <cFld> DATA [<xpression,...>] TO <oObj> ;
=> ;
<oObj>:ClassAdd( <"cFld">,, {|Self| [<xpression>] },,)
#xCommand DEFINE FIELD <cFld> DATA [<xpression,...>] TO <oObj> ;
=> ;
<oObj>:ClassAdd( <"cFld">,, {|Self| [<xpression>] },,)
// --> ::undo() buffer constants
#define _WRITE_BUFFER 1
#define _DELETE_BUFFER 2
#define _RECALL_BUFFER 3
#xCommand BEGIN TRANSACTION IN <oTable> => <oTable>:SetMonitor( .T. )
#xCommand ROLLBACK <nType> ;
[STEP <n>] ;
IN <oTable> ;
=> ;
<oTable>:Undo( <nType>, [<n>] )
#xCommand END TRANSACTION IN <oTable> => <oTable>:SetMonitor( .F. )
#command SKIP in <o> => <o>:dbSkip(1)
#command SKIP <n> in <o> => <o>:dbSkip( <n> )
#command SEEK <xpr> ;
[<soft: SOFTSEEK>] ;
[<last: LAST>] in <o> ;
=> <o>:dbSeek( <xpr>, if( <.soft.>, .T., NIL ), if( <.last.>, .T., NIL ) )
#translate CSY_TYPE Character => "C"
#xtranslate CSY_TYPE Numeric => "N"
#xtranslate CSY_TYPE Date => "D"
#xtranslate CSY_TYPE Memo => "M"
#xtranslate CSY_TYPE Logical => "L"
#xtranslate CSY_TYPE Auto => "A"
#xcommand CREATE DATABASE <o> FILE <file> => <o>:=HBTable():CreateTable(<(file)>);#define _TABLE_ <o>
#xTranslate FIELD [ <oFld> ] ;
[ NAME <(cName)> ] ;
[ TYPE <cType> ] ;
[ LEN <nLen> ] ;
[ DEC <nDec> ] ;
OF <oDbf> ;
=> ;
[ <oFld> := ] _TABLE_:AddField( <(cName)>,CSY_TYPE <cType>, <nLen>, <nDec>)
#xCommand BUILD TABLE <o> => _TABLE_:Gentable()
#define _OTABLE_CH_
#endif

File diff suppressed because it is too large Load Diff