ADS RDD files
This commit is contained in:
1561
harbour/contrib/rdd_ads/ace.h
Normal file
1561
harbour/contrib/rdd_ads/ace.h
Normal file
File diff suppressed because it is too large
Load Diff
46
harbour/contrib/rdd_ads/ads.ch
Normal file
46
harbour/contrib/rdd_ads/ads.ch
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* Header file for Advantage Database Server RDD
|
||||
*
|
||||
* Copyright 2000 Alexander S.Kresin <alex@belacy.belgorod.su>
|
||||
* 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 of the License, or
|
||||
* (at your option) any later version, with one exception:
|
||||
*
|
||||
* The exception is that if you link the Harbour Runtime Library (HRL)
|
||||
* and/or the Harbour Virtual Machine (HVM) 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 HRL
|
||||
* and/or HVM code into it.
|
||||
*
|
||||
* 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 program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
||||
* their web site at http://www.gnu.org/).
|
||||
*
|
||||
*/
|
||||
|
||||
/* Supported file types */
|
||||
#define ADS_NTX 1
|
||||
#define ADS_CDX 2
|
||||
#define ADS_ADT 3
|
||||
|
||||
#command SET FILETYPE TO <x:NTX,CDX,ADT> ;
|
||||
=> AdsSetFileType( if( upper( <(x)> ) == "NTX", 1, ;
|
||||
if( upper( <(x)> ) == "CDX", 2, 3 ) ) )
|
||||
|
||||
#command SET SERVER LOCAL => AdsSetServerType ( 1 )
|
||||
#command SET SERVER REMOTE => AdsSetServerType ( 2 )
|
||||
47
harbour/contrib/rdd_ads/ads0.prg
Normal file
47
harbour/contrib/rdd_ads/ads0.prg
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* Advantage Database Server RDD
|
||||
*
|
||||
* Copyright 1999 Alexander Kresin <alex@belacy.belgorod.su>
|
||||
* 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 of the License, or
|
||||
* (at your option) any later version, with one exception:
|
||||
*
|
||||
* The exception is that if you link the Harbour Runtime Library (HRL)
|
||||
* and/or the Harbour Virtual Machine (HVM) 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 HRL
|
||||
* and/or HVM code into it.
|
||||
*
|
||||
* 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 program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
||||
* their web site at http://www.gnu.org/).
|
||||
*
|
||||
*/
|
||||
|
||||
#include "error.ch"
|
||||
#include "rddsys.ch"
|
||||
|
||||
ANNOUNCE ADS
|
||||
|
||||
init procedure ADSInit
|
||||
|
||||
REQUEST _ADS
|
||||
|
||||
rddRegister( "ADS", RDT_FULL )
|
||||
|
||||
return
|
||||
1084
harbour/contrib/rdd_ads/ads1.c
Normal file
1084
harbour/contrib/rdd_ads/ads1.c
Normal file
File diff suppressed because it is too large
Load Diff
72
harbour/contrib/rdd_ads/adsfunc.c
Normal file
72
harbour/contrib/rdd_ads/adsfunc.c
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* Advantage Database Server RDD ( additional functions )
|
||||
*
|
||||
* Copyright 2000 Alexander Kresin <alex@belacy.belgorod.su>
|
||||
* 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 of the License, or
|
||||
* (at your option) any later version, with one exception:
|
||||
*
|
||||
* The exception is that if you link the Harbour Runtime Library (HRL)
|
||||
* and/or the Harbour Virtual Machine (HVM) 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 HRL
|
||||
* and/or HVM code into it.
|
||||
*
|
||||
* 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 program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
||||
* their web site at http://www.gnu.org/).
|
||||
*
|
||||
*/
|
||||
|
||||
#include "windows.h"
|
||||
#include "extend.h"
|
||||
#include "init.h"
|
||||
#include "itemapi.h"
|
||||
#include "rddsys.ch"
|
||||
#include "langapi.h"
|
||||
#include "dates.h"
|
||||
#include "errorapi.h"
|
||||
#include "rddads.h"
|
||||
|
||||
int adsFileType = ADS_CDX;
|
||||
|
||||
HARBOUR HB_ADSSETFILETYPE( void )
|
||||
{
|
||||
int fileType, oldType = adsFileType;
|
||||
if( hb_pcount() > 0 )
|
||||
{
|
||||
fileType = hb_parni( 1 );
|
||||
if( fileType>0 && fileType<4 )
|
||||
adsFileType = fileType;
|
||||
}
|
||||
hb_retni( oldType );
|
||||
return;
|
||||
}
|
||||
|
||||
HARBOUR HB_ADSSETSERVERTYPE( void )
|
||||
{
|
||||
int servType;
|
||||
if( hb_pcount() > 0 )
|
||||
{
|
||||
servType = hb_parni( 1 );
|
||||
if( servType>0 && servType<3 )
|
||||
AdsSetServerType( servType );
|
||||
}
|
||||
hb_ret();
|
||||
return;
|
||||
}
|
||||
1
harbour/contrib/rdd_ads/make_rdd.bat
Normal file
1
harbour/contrib/rdd_ads/make_rdd.bat
Normal file
@@ -0,0 +1 @@
|
||||
make -frddads.b32 > make.err
|
||||
23
harbour/contrib/rdd_ads/rddads.b32
Normal file
23
harbour/contrib/rdd_ads/rddads.b32
Normal file
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# makefile for Borland C/C++ 32 bits
|
||||
# Building of rddads.lib - RDD for Advantage Database Server
|
||||
|
||||
.path.lib = ..\..\lib\b32
|
||||
|
||||
lib\b32\rdd.lib : ads0.obj ads1.obj adsfunc.obj
|
||||
|
||||
ads0.c : ads0.prg
|
||||
|
||||
ads1.obj : ads1.c
|
||||
ads0.obj : ads0.c
|
||||
adsfunc.obj : adsfunc.c
|
||||
|
||||
.c.obj :
|
||||
bcc32 -c -O2 -I..\..\include -o$@ -v $<
|
||||
tlib ..\..\lib\b32\rddads.lib -+$@,,
|
||||
|
||||
.prg.c:
|
||||
..\..\bin\harbour $< /n /i..\..\include
|
||||
51
harbour/contrib/rdd_ads/rddads.h
Normal file
51
harbour/contrib/rdd_ads/rddads.h
Normal file
@@ -0,0 +1,51 @@
|
||||
#include "rddapi.h"
|
||||
#include "ace.h"
|
||||
|
||||
/*
|
||||
* ADS WORKAREA
|
||||
* --------
|
||||
* The Workarea Structure of Advantage Database Server RDD
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
typedef struct _ADSAREA_
|
||||
{
|
||||
struct _RDDFUNCS * lprfsHost; /* Virtual method table for this workarea */
|
||||
USHORT uiArea; /* The number assigned to this workarea */
|
||||
void * atomAlias; /* Pointer to the alias symbol for this workarea */
|
||||
USHORT uiFieldExtent; /* Total number of fields allocated */
|
||||
USHORT uiFieldCount; /* Total number of fields used */
|
||||
LPFIELD lpFields; /* Pointer to an array of fields */
|
||||
void * lpFieldExtents; /* Void ptr for additional field properties */
|
||||
PHB_ITEM valResult; /* All purpose result holder */
|
||||
BOOL fTop; /* TRUE if "top" */
|
||||
BOOL fBottom; /* TRUE if "bottom" */
|
||||
BOOL fBof; /* TRUE if "bof" */
|
||||
BOOL fEof; /* TRUE if "eof" */
|
||||
BOOL fFound; /* TRUE if "found" */
|
||||
DBSCOPEINFO dbsi; /* Info regarding last LOCATE */
|
||||
DBFILTERINFO dbfi; /* Filter in effect */
|
||||
LPDBORDERCONDINFO lpdbOrdCondInfo;
|
||||
LPDBRELINFO lpdbRelations; /* Parent/Child relationships used */
|
||||
USHORT uiParents; /* Number of parents for this area */
|
||||
USHORT heap;
|
||||
USHORT heapSize;
|
||||
USHORT rddID;
|
||||
LPFILEINFO lpDataInfo; /* Data files used by this workarea */
|
||||
LPINDEXINFO lpIndexInfo; /* Indexes used by this workarea */
|
||||
LPDBEXTENDINFO lpExtendInfo; /* Additional properties */
|
||||
|
||||
/*
|
||||
* ADS's additions to the workarea structure
|
||||
*
|
||||
* Warning: The above section MUST match WORKAREA exactly! Any
|
||||
* additions to the structure MUST be added below, as in this
|
||||
* example.
|
||||
*/
|
||||
|
||||
ADSHANDLE hTable;
|
||||
ADSHANDLE hOrdCurrent;
|
||||
} ADSAREA;
|
||||
|
||||
typedef ADSAREA far * ADSAREAP;
|
||||
Reference in New Issue
Block a user