Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
e642a710
Commit
e642a710
authored
Feb 27, 2003
by
lw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
b3a3df9a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
94 additions
and
22 deletions
+94
-22
wb/exe/wb_wbltest/src/os_linux/link_rule.mk
wb/exe/wb_wbltest/src/os_linux/link_rule.mk
+2
-2
wb/lib/wb/src/wb_db.cpp
wb/lib/wb/src/wb_db.cpp
+22
-8
wb/lib/wb/src/wb_dbs.cpp
wb/lib/wb/src/wb_dbs.cpp
+5
-4
wb/lib/wb/src/wb_orepdb.cpp
wb/lib/wb/src/wb_orepdb.cpp
+3
-1
wb/lib/wb/src/wb_vrepdb.cpp
wb/lib/wb/src/wb_vrepdb.cpp
+57
-5
wb/lib/wb/src/wb_vrepdb.h
wb/lib/wb/src/wb_vrepdb.h
+2
-0
wb/lib/wb/src/wb_vrepdbs.cpp
wb/lib/wb/src/wb_vrepdbs.cpp
+1
-1
wb/lib/wb/src/wb_vrepwbl.cpp
wb/lib/wb/src/wb_vrepwbl.cpp
+1
-0
wb/lib/wb/src/wb_wblnode.cpp
wb/lib/wb/src/wb_wblnode.cpp
+1
-1
No files found.
wb/exe/wb_wbltest/src/os_linux/link_rule.mk
View file @
e642a710
...
...
@@ -3,9 +3,9 @@ link_rule_mk := 1
link
=
$(ldxx)
$(linkflags)
$(domap)
-o
$(export_exe)
\
$(export_obj)
$(objects)
$(wb_msg_objs)
$(rt_msg_objs)
\
$(pwr_obj)
/rt_io_user.o
-L
/usr/X11R6/lib
\
$(pwr_obj)
/rt_io_user.o
-L
/usr/X11R6/lib
-L
/usr/local/BerkeleyDB.4.0/lib
\
-lpwr_wb
-lpwr_ge
-lpwr_rt
-lpwr_co
-lpwr_flow
-lpwr_glow
\
-lpwr_msg_dummy
-lantlr
-lImlib
-lMrm
-lXm
-lXpm
-lXt
-lX11
-lXext
-lXp
\
-lpwr_msg_dummy
-lantlr
-lImlib
-lMrm
-lXm
-lXpm
-lXt
-lX11
-lXext
-lXp
-ldb_cxx-4
.0
\
-lSM
-lICE
\
-lrpcsvc
-lpthread
-lm
-lposix1b
-lrt
...
...
wb/lib/wb/src/wb_db.cpp
View file @
e642a710
...
...
@@ -285,8 +285,10 @@ void wb_db_rbody::get(wb_db_txn *txn, size_t offset, size_t size, void *p)
m_data
.
set_doff
(
offset
);
m_data
.
set_dlen
(
size
);
m_data
.
set_data
(
p
);
m_data
.
set_ulen
(
size
);
m_data
.
set_flags
(
DB_DBT_USERMEM
|
DB_DBT_PARTIAL
);
m_db
->
m_t_rbody
->
get
(
txn
,
&
m_key
,
&
m_data
,
DB_DBT_PARTIAL
);
m_db
->
m_t_rbody
->
get
(
txn
,
&
m_key
,
&
m_data
,
0
);
}
wb_db_dbody
::
wb_db_dbody
(
wb_db
*
db
,
pwr_tOid
oid
,
size_t
size
,
void
*
p
)
:
...
...
@@ -309,6 +311,8 @@ void wb_db_dbody::get(wb_db_txn *txn, size_t offset, size_t size, void *p)
m_data
.
set_doff
(
offset
);
m_data
.
set_dlen
(
size
);
m_data
.
set_data
(
p
);
m_data
.
set_ulen
(
size
);
m_data
.
set_flags
(
DB_DBT_USERMEM
);
m_db
->
m_t_dbody
->
get
(
txn
,
&
m_key
,
&
m_data
,
DB_DBT_PARTIAL
);
}
...
...
@@ -383,11 +387,17 @@ void wb_db::openDb()
m_env
=
new
DbEnv
(
0
/*DB_CXX_NO_EXCEPTIONS*/
);
m_env
->
set_errpfx
(
"PWR db"
);
//m_env->set_cachesize(0, 256 * 1024 * 1024, 0);
#if 1
m_env
->
open
(
m_fileName
,
DB_CREATE
|
DB_INIT_LOCK
|
DB_INIT_LOG
|
DB_INIT_MPOOL
|
DB_INIT_TXN
|
DB_RECOVER
,
S_IRUSR
|
S_IWUSR
);
#else
m_env
->
open
(
m_fileName
,
DB_CREATE
|
DB_INIT_MPOOL
,
S_IRUSR
|
S_IWUSR
);
#endif
m_t_ohead
=
new
Db
(
m_env
,
0
);
m_t_rbody
=
new
Db
(
m_env
,
0
);
m_t_dbody
=
new
Db
(
m_env
,
0
);
...
...
@@ -526,19 +536,20 @@ bool wb_db::deleteOset(pwr_tStatus *sts, wb_oset *o)
bool
wb_db
::
importVolume
(
wb_export
&
e
)
{
try
{
m_env
->
txn_begin
(
0
,
(
DbTxn
**
)
&
m_txn
,
0
);
// m_env->txn_begin(0, (DbTxn **)&m_txn, 0);
m_txn
=
0
;
e
.
exportHead
(
*
this
);
e
.
exportRbody
(
*
this
);
e
.
exportDbody
(
*
this
);
e
.
exportMeta
(
*
this
);
m_txn
->
commit
(
0
);
m_env
->
txn_checkpoint
(
0
,
0
,
0
);
//
m_txn->commit(0);
//
m_env->txn_checkpoint(0, 0, 0);
return
true
;
}
catch
(
DbException
&
e
)
{
m_txn
->
abort
();
//
m_txn->abort();
printf
(
"exeption: %s
\n
"
,
e
.
what
());
return
false
;
}
...
...
@@ -553,6 +564,7 @@ bool wb_db::importHead(pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
{
wb_db_ohead
o
(
this
,
oid
,
cid
,
poid
,
boid
,
aoid
,
foid
,
loid
,
name
,
normname
,
ohTime
,
rbTime
,
dbTime
,
rbSize
,
dbSize
);
o
.
put
(
m_txn
);
printf
(
"head put: %d.%d %s
\n
"
,
oid
.
vid
,
oid
.
oix
,
name
);
wb_db_name
n
(
this
,
oid
,
poid
,
normname
);
n
.
put
(
m_txn
);
wb_db_class
c
(
this
,
cid
,
oid
);
...
...
@@ -572,6 +584,7 @@ bool wb_db::importHead(pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
bool
wb_db
::
importRbody
(
pwr_tOid
oid
,
size_t
size
,
void
*
body
)
{
wb_db_rbody
rb
(
this
,
oid
,
size
,
body
);
printf
(
"rbody size: %d.%d %d
\n
"
,
oid
.
vid
,
oid
.
oix
,
size
);
rb
.
put
(
m_txn
);
return
true
;
}
...
...
@@ -579,6 +592,7 @@ bool wb_db::importRbody(pwr_tOid oid, size_t size, void *body)
bool
wb_db
::
importDbody
(
pwr_tOid
oid
,
size_t
size
,
void
*
body
)
{
wb_db_dbody
db
(
this
,
oid
,
size
,
body
);
printf
(
"dbody size: %d.%d %d
\n
"
,
oid
.
vid
,
oid
.
oix
,
size
);
db
.
put
(
m_txn
);
return
true
;
}
...
...
wb/lib/wb/src/wb_dbs.cpp
View file @
e642a710
...
...
@@ -196,10 +196,11 @@ wb_dbs::checkObject(sOentry *oep)
oep
->
o
.
name_bt
.
rsize
=
dbs_dAlign
(
sizeof
(
dbs_sName
));
}
bool
wb_dbs
::
importHead
(
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
aoid
,
pwr_tOid
boid
,
pwr_tOid
foid
,
pwr_tOid
loid
,
const
char
*
name
,
const
char
*
normname
,
pwr_tTime
time
,
pwr_tTime
rbTime
,
pwr_tTime
dbTime
,
size_t
rbSize
,
size_t
dbSize
)
bool
wb_dbs
::
importHead
(
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
pwr_tOid
aoid
,
pwr_tOid
foid
,
pwr_tOid
loid
,
const
char
*
name
,
const
char
*
normname
,
pwr_tTime
time
,
pwr_tTime
rbTime
,
pwr_tTime
dbTime
,
size_t
rbSize
,
size_t
dbSize
)
{
sNentry
*
nep
;
sOentry
*
oep
;
...
...
wb/lib/wb/src/wb_orepdb.cpp
View file @
e642a710
...
...
@@ -98,7 +98,9 @@ pwr_tOid wb_orepdb::aoid() const
wb_name
wb_orepdb
::
longName
()
{
return
wb_name
();
pwr_tStatus
sts
;
return
m_vrep
->
longName
(
&
sts
,
(
wb_orep
*
)
this
);
}
const
char
*
wb_orepdb
::
name
()
const
...
...
wb/lib/wb/src/wb_vrepdb.cpp
View file @
e642a710
...
...
@@ -55,10 +55,38 @@ wb_srep *wb_vrepdb::newSession()
return
0
;
}
void
wb_vrepdb
::
objectName
(
pwr_tOid
oid
,
char
*
name
,
int
level
)
{
if
(
cdh_ObjidIsNull
(
oid
))
return
;
wb_db_ohead
o
(
m_db
,
m_txn
,
oid
);
if
(
o
.
oix
()
==
pwr_cNOix
)
{
strcpy
(
name
,
o
.
name
());
strcat
(
name
,
":"
);
}
else
{
objectName
(
o
.
poid
(),
name
,
level
+
1
);
strcat
(
name
,
o
.
name
());
if
(
level
>
0
)
strcat
(
name
,
"-"
);
}
}
wb_name
wb_vrepdb
::
longName
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
*
sts
=
LDH__SUCCESS
;
return
wb_name
();
char
name
[
512
];
try
{
objectName
(
o
->
oid
(),
name
,
0
);
}
catch
(
DbException
&
e
)
{
*
sts
=
LDH__NOSUCHOBJ
;
printf
(
"vrepdb: %s
\n
"
,
e
.
what
());
name
[
0
]
=
'\0'
;
}
return
wb_name
(
name
);
}
bool
wb_vrepdb
::
isOffspringOf
(
pwr_tStatus
*
sts
,
const
wb_orep
*
child
,
const
wb_orep
*
parent
)
...
...
@@ -581,7 +609,13 @@ wb_orep *wb_vrepdb::after(pwr_tStatus *sts, const wb_orep *orp)
{
*
sts
=
LDH__SUCCESS
;
try
{
m_ohead
.
get
(
m_txn
,
m_ohead
.
get
(
m_txn
,
orp
->
oid
()).
aoid
());
pwr_tOid
aoid
=
m_ohead
.
get
(
m_txn
,
orp
->
oid
()).
aoid
();
if
(
cdh_ObjidIsNull
(
aoid
))
{
*
sts
=
LDH__NO_SIBLING
;
return
0
;
}
m_ohead
.
get
(
m_txn
,
aoid
);
return
new
(
this
)
wb_orepdb
(
&
m_ohead
.
m_o
);
}
catch
(
DbException
&
e
)
{
...
...
@@ -595,7 +629,13 @@ wb_orep *wb_vrepdb::before(pwr_tStatus *sts, const wb_orep *orp)
{
*
sts
=
LDH__SUCCESS
;
try
{
m_ohead
.
get
(
m_txn
,
m_ohead
.
get
(
m_txn
,
orp
->
oid
()).
boid
());
pwr_tOid
boid
=
m_ohead
.
get
(
m_txn
,
orp
->
oid
()).
boid
();
if
(
cdh_ObjidIsNull
(
boid
))
{
*
sts
=
LDH__NO_SIBLING
;
return
0
;
}
m_ohead
.
get
(
m_txn
,
boid
);
return
new
(
this
)
wb_orepdb
(
&
m_ohead
.
m_o
);
}
catch
(
DbException
&
e
)
{
...
...
@@ -609,7 +649,13 @@ wb_orep *wb_vrepdb::first(pwr_tStatus *sts, const wb_orep *orp)
{
*
sts
=
LDH__SUCCESS
;
try
{
m_ohead
.
get
(
m_txn
,
m_ohead
.
get
(
m_txn
,
orp
->
oid
()).
foid
());
pwr_tOid
foid
=
m_ohead
.
get
(
m_txn
,
orp
->
oid
()).
foid
();
if
(
cdh_ObjidIsNull
(
foid
))
{
*
sts
=
LDH__NO_CHILD
;
return
0
;
}
m_ohead
.
get
(
m_txn
,
foid
);
return
new
(
this
)
wb_orepdb
(
&
m_ohead
.
m_o
);
}
catch
(
DbException
&
e
)
{
...
...
@@ -638,7 +684,13 @@ wb_orep *wb_vrepdb::last(pwr_tStatus *sts, const wb_orep *orp)
{
*
sts
=
LDH__SUCCESS
;
try
{
m_ohead
.
get
(
m_txn
,
m_ohead
.
get
(
m_txn
,
orp
->
oid
()).
loid
());
pwr_tOid
loid
=
m_ohead
.
get
(
m_txn
,
orp
->
oid
()).
loid
();
if
(
cdh_ObjidIsNull
(
loid
))
{
*
sts
=
LDH__NO_CHILD
;
return
0
;
}
m_ohead
.
get
(
m_txn
,
loid
);
return
new
(
this
)
wb_orepdb
(
&
m_ohead
.
m_o
);
}
catch
(
DbException
&
e
)
{
...
...
wb/lib/wb/src/wb_vrepdb.h
View file @
e642a710
...
...
@@ -110,6 +110,8 @@ public:
virtual
void
objectName
(
const
wb_orep
*
o
,
char
*
str
);
void
objectName
(
pwr_tOid
oid
,
char
*
name
,
int
level
);
void
load
();
virtual
bool
exportVolume
(
wb_import
&
e
);
...
...
wb/lib/wb/src/wb_vrepdbs.cpp
View file @
e642a710
...
...
@@ -446,7 +446,7 @@ bool wb_vrepdbs::exportHead(wb_import &i)
pwr_tStatus
sts
;
while
((
op
=
dbs_NextHead
(
&
sts
,
dbsenv
(),
op
)))
{
i
.
importHead
(
op
->
oid
,
op
->
cid
,
op
->
poid
,
op
->
aoid
,
op
->
b
oid
,
op
->
foid
,
op
->
loid
,
op
->
name
,
op
->
normname
,
i
.
importHead
(
op
->
oid
,
op
->
cid
,
op
->
poid
,
op
->
boid
,
op
->
a
oid
,
op
->
foid
,
op
->
loid
,
op
->
name
,
op
->
normname
,
op
->
time
,
op
->
rbody
.
time
,
op
->
dbody
.
time
,
op
->
rbody
.
size
,
op
->
dbody
.
size
);
}
...
...
wb/lib/wb/src/wb_vrepwbl.cpp
View file @
e642a710
#include <iostream>
#include <fstream>
#include <sys/stat.h>
...
...
wb/lib/wb/src/wb_wblnode.cpp
View file @
e642a710
...
...
@@ -1462,7 +1462,7 @@ bool wb_wblnode::exportHead(wb_import &i)
pwr_tOid
lchoid
=
o_lch
?
o_lch
->
m_oid
:
pwr_cNOid
;
wb_name
n
=
wb_name
(
name
());
i
.
importHead
(
m_oid
,
m_cid
,
fthoid
,
fwsoid
,
b
wsoid
,
fchoid
,
lchoid
,
name
(),
n
.
normName
(
cdh_mName_object
),
i
.
importHead
(
m_oid
,
m_cid
,
fthoid
,
bwsoid
,
f
wsoid
,
fchoid
,
lchoid
,
name
(),
n
.
normName
(
cdh_mName_object
),
getFileTime
(),
getFileTime
(),
getFileTime
(),
rbody_size
,
dbody_size
);
if
(
o_fch
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment