Skip to content

Commit 5c2ff94

Browse files
Version 9.9.0
1 parent c6521d5 commit 5c2ff94

File tree

186 files changed

+7284
-9532
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+7284
-9532
lines changed

Src/BuildVC2015/papyrus.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,6 @@
11271127
<ClCompile Include="..\PPLib\Asstwrof.cpp" />
11281128
<ClCompile Include="..\PPLib\At2eat.cpp" />
11291129
<ClCompile Include="..\PPLib\Atrntmpl.cpp" />
1130-
<ClCompile Include="..\PPLib\Aturndlg.cpp" />
11311130
<ClCompile Include="..\PPLib\Autocmpl.cpp" />
11321131
<ClCompile Include="..\PPLib\Balance.cpp" />
11331132
<ClCompile Include="..\PPLib\BILL.CPP" />

Src/BuildVC2015/papyrus.vcxproj.filters

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
<ClCompile Include="..\PPLib\Asstwrof.cpp" />
4242
<ClCompile Include="..\PPLib\At2eat.cpp" />
4343
<ClCompile Include="..\PPLib\Atrntmpl.cpp" />
44-
<ClCompile Include="..\PPLib\Aturndlg.cpp" />
4544
<ClCompile Include="..\PPLib\Autocmpl.cpp" />
4645
<ClCompile Include="..\PPLib\Balance.cpp" />
4746
<ClCompile Include="..\PPLib\BILL.CPP" />

Src/BuildVC70/papyrus.vcproj

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -628,9 +628,6 @@
628628
<File
629629
RelativePath="..\PPLib\Atrntmpl.cpp">
630630
</File>
631-
<File
632-
RelativePath="..\PPLib\Aturndlg.cpp">
633-
</File>
634631
<File
635632
RelativePath="..\PPLib\Autocmpl.cpp">
636633
</File>
@@ -4029,10 +4026,10 @@
40294026
RelativePath="..\Rsrc\Bitmap\banking.bmp">
40304027
</File>
40314028
<File
4032-
RelativePath="..\Rsrc\Bitmap\Tbbutton\barcode.bmp">
4029+
RelativePath="..\Rsrc\Bitmap\BARCODE.bmp">
40334030
</File>
40344031
<File
4035-
RelativePath="..\Rsrc\Bitmap\BARCODE.bmp">
4032+
RelativePath="..\Rsrc\Bitmap\Tbbutton\barcode.bmp">
40364033
</File>
40374034
<File
40384035
RelativePath="..\Rsrc\Bitmap\barcodeprinter.bmp">
@@ -4659,10 +4656,10 @@
46594656
RelativePath="..\Rsrc\Bitmap\Tbbutton\mark.bmp">
46604657
</File>
46614658
<File
4662-
RelativePath="..\Rsrc\Bitmap\matrix.bmp">
4659+
RelativePath="..\Rsrc\Bitmap\Tbbutton\matrix.bmp">
46634660
</File>
46644661
<File
4665-
RelativePath="..\Rsrc\Bitmap\Tbbutton\matrix.bmp">
4662+
RelativePath="..\Rsrc\Bitmap\matrix.bmp">
46664663
</File>
46674664
<File
46684665
RelativePath="..\Rsrc\Bitmap\Tbbutton\membership.bmp">

Src/Db/DBDICT.CPP

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,19 +100,38 @@ int SLAPI BDictionary::Init(const char * pDataPath, const char * pTempPath)
100100
return IsValid();
101101
}
102102

103-
SLAPI BDictionary::BDictionary(const char * pPath, const char * pDataPath, const char * pTempPath) :
104-
DbProvider(DbDictionary::CreateInstance(pPath, 0), 0)
103+
SLAPI BDictionary::BDictionary(const char * pPath, const char * pDataPath, const char * pTempPath) : DbProvider(DbDictionary::CreateInstance(pPath, 0), 0)
105104
{
106105
Init(pDataPath, pTempPath);
107106
}
108107

109-
SLAPI BDictionary::BDictionary(int btrDict, const char * pPath) :
110-
DbProvider(new DbDict_Btrieve(pPath), 0)
108+
SLAPI BDictionary::BDictionary(int btrDict, const char * pPath) : DbProvider(new DbDict_Btrieve(pPath), 0)
111109
{
112110
Init(0, 0);
113111
}
114112

115-
/*virtual*/ SString & SLAPI BDictionary::MakeFileName_(const char * pTblName, SString & rFileName)
113+
//virtual
114+
int SLAPI BDictionary::GetDatabaseState(uint * pStateFlags)
115+
{
116+
int ok = 1;
117+
uint state = 0;
118+
if(DataPath.NotEmpty()) {
119+
SDirEntry de;
120+
SString wc;
121+
(wc = DataPath).SetLastSlash().CatChar('*').Dot().Cat("^^^");
122+
for(SDirec sd(wc); sd.Next(&de) > 0;) {
123+
if(de.IsFile()) {
124+
state |= dbstContinuous;
125+
break;
126+
}
127+
}
128+
}
129+
ASSIGN_PTR(pStateFlags, state);
130+
return ok;
131+
}
132+
133+
//virtual
134+
SString & SLAPI BDictionary::MakeFileName_(const char * pTblName, SString & rFileName)
116135
{
117136
SPathStruc ps(rFileName);
118137
if(ps.Dir.Empty()) {
@@ -270,15 +289,16 @@ SLAPI BDictionary::BDictionary(int btrDict, const char * pPath) :
270289
THROW(Btrieve::GetVersion(&b_major, &b_minor, &b_isnet));
271290
DBS.SetAddedMsgString("Btrieve 6.15");
272291
THROW_V(b_major >= 6, SDBERR_INCOMPATDBVER);
273-
THROW(Common_Login(pBlk));
292+
Common_Login(pBlk);
274293
CATCHZOK
275294
return ok;
276295
}
277296

278297
/*virtual*/ int SLAPI BDictionary::Logout()
279298
{
280299
Btrieve::Reset(0);
281-
return Common_Logout();
300+
Common_Logout();
301+
return 1;
282302
}
283303

284304
/*virtual*/ int SLAPI BDictionary::ProtectTable(long dbTableID, char * pResetOwnrName, char * pSetOwnrName, int clearProtection)

Src/Db/Dbf.cpp

Lines changed: 12 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// DBF.CPP
2-
// Copyright (c) A. Sobolev 1993-2001, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2014, 2015, 2016, 2017
2+
// Copyright (c) A. Sobolev 1993-2001, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2014, 2015, 2016, 2017, 2018
33
//
44
#include <db.h>
55
#pragma hdrstop
@@ -73,9 +73,8 @@ void SLAPI DBFCreateFld::Init(const char * pName, int typ, uint sz, uint prec)
7373
//
7474
// DbfRecord
7575
//
76-
SLAPI DbfRecord::DbfRecord(const DbfTable * pTbl)
76+
SLAPI DbfRecord::DbfRecord(const DbfTable * pTbl) : P_Tbl(pTbl)
7777
{
78-
P_Tbl = pTbl;
7978
P_Buffer = new char[BufSize = P_Tbl->getRecSize()];
8079
empty();
8180
}
@@ -253,20 +252,9 @@ int SLAPI DbfRecord::put(int fld, double data)
253252
return 0;
254253
}
255254

256-
int SLAPI DbfRecord::put(int fld, float data)
257-
{
258-
return put(fld, (double)data);
259-
}
260-
261-
int SLAPI DbfRecord::put(int fld, long data)
262-
{
263-
return put(fld, (double)data);
264-
}
265-
266-
int SLAPI DbfRecord::put(int fld, int data)
267-
{
268-
return put(fld, (double)data);
269-
}
255+
int SLAPI DbfRecord::put(int fld, float data) { return put(fld, (double)data); }
256+
int SLAPI DbfRecord::put(int fld, long data) { return put(fld, (double)data); }
257+
int SLAPI DbfRecord::put(int fld, int data) { return put(fld, (double)data); }
270258

271259
int SLAPI DbfRecord::put(int fld, const DBFDate * data)
272260
{
@@ -477,17 +465,9 @@ int SLAPI DbfTable::releaseBuffer()
477465
return 1;
478466
}
479467

480-
SLAPI DbfTable::DbfTable(const char * pName)
468+
SLAPI DbfTable::DbfTable(const char * pName) : P_Buffer(0), Opened(0), Mod(0), Current(0),
469+
P_Flds(0), NumFlds(0), Stream(0), BFirst(0), BLast(0), P_Name(newStr(pName))
481470
{
482-
P_Buffer = 0;
483-
Opened = 0;
484-
Mod = 0;
485-
Current = 0;
486-
P_Name = newStr(pName);
487-
P_Flds = 0;
488-
NumFlds = 0;
489-
Stream = 0;
490-
BFirst = BLast = 0;
491471
open();
492472
}
493473

@@ -618,10 +598,10 @@ static uint8 CpToLdId(SCodepage cp)
618598
return ldid;
619599
}
620600

621-
SCodepage SLAPI DbfTable::getCodePage() const
622-
{
623-
return LdIdToCp(Head.LdID);
624-
}
601+
SCodepage SLAPI DbfTable::getCodePage() const { return LdIdToCp(Head.LdID); }
602+
ulong SLAPI DbfTable::getNumRecs() const { return Head.NumRecs; }
603+
size_t SLAPI DbfTable::getRecSize() const { return Head.RecSize; }
604+
uint SLAPI DbfTable::getNumFields() const { return NumFlds; }
625605

626606
int SLAPI DbfTable::create(int aNumFlds, const DBFCreateFld * pFldDescr, SCodepage cp, int infoByte)
627607
{
@@ -631,7 +611,7 @@ int SLAPI DbfTable::create(int aNumFlds, const DBFCreateFld * pFldDescr, SCodepa
631611
// @v9.3.5 {
632612
if(!checkdate(cur_dt, 0))
633613
cur_dt = encodedate(1, 1, 2016);
634-
// } @v9.3.5
614+
// } @v9.3.5
635615
close();
636616
FILE * f = fopen(P_Name, "wb");
637617
THROW_S_S(f, SLERR_OPENFAULT, P_Name);
@@ -787,21 +767,6 @@ int FASTCALL DbfTable::getField(uint fldN, DBFF * pField) const
787767
return 0;
788768
}
789769

790-
ulong SLAPI DbfTable::getNumRecs() const
791-
{
792-
return Head.NumRecs;
793-
}
794-
795-
size_t SLAPI DbfTable::getRecSize() const
796-
{
797-
return Head.RecSize;
798-
}
799-
800-
uint SLAPI DbfTable::getNumFields() const
801-
{
802-
return NumFlds;
803-
}
804-
805770
int FASTCALL DbfTable::goToRec(ulong recNo)
806771
{
807772
if(!Opened || recNo < 1 || recNo > Head.NumRecs)

Src/Db/Dbqbrdef.cpp

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ void SLAPI DBQBrowserDef::getScrollData(long * pScrollDelta, long * pScrollPos)
8585
*pScrollPos = 500L;
8686
}
8787

88-
int SLAPI DBQBrowserDef::valid()
89-
{
90-
return !query->error;
91-
}
92-
9388
void SLAPI DBQBrowserDef::setupView()
9489
{
9590
topItem = query->P_Frame->top;
@@ -98,11 +93,6 @@ void SLAPI DBQBrowserDef::setupView()
9893
isEOQ = query->P_Frame->state & DBQuery::Frame::Bottom;
9994
}
10095

101-
int FASTCALL DBQBrowserDef::go(long p)
102-
{
103-
return step(p-curItem);
104-
}
105-
10696
int FASTCALL DBQBrowserDef::step(long d)
10797
{
10898
int r = query->step(d);
@@ -131,22 +121,9 @@ int SLAPI DBQBrowserDef::refresh()
131121
return r;
132122
}
133123

134-
long SLAPI DBQBrowserDef::getRecsCount()
135-
{
136-
return query->P_Frame->srange+1;
137-
}
138-
139-
void * FASTCALL DBQBrowserDef::getRow(long r)
140-
{
141-
return query->getRecord((uint)r);
142-
}
143-
144-
int FASTCALL DBQBrowserDef::getData(void *)
145-
{
146-
return 1;
147-
}
148-
149-
int FASTCALL DBQBrowserDef::setData(void *)
150-
{
151-
return 1;
152-
}
124+
int SLAPI DBQBrowserDef::valid() { return !query->error; }
125+
int FASTCALL DBQBrowserDef::go(long p) { return step(p-curItem); }
126+
long SLAPI DBQBrowserDef::getRecsCount() { return query->P_Frame->srange+1; }
127+
void * FASTCALL DBQBrowserDef::getRow(long r) { return query->getRecord((uint)r); }
128+
int FASTCALL DBQBrowserDef::getData(void *) { return 1; }
129+
int FASTCALL DBQBrowserDef::setData(void *) { return 1; }

0 commit comments

Comments
 (0)