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
4709dc30
Commit
4709dc30
authored
Apr 04, 2003
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
a2237ffd
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
138 additions
and
23 deletions
+138
-23
wb/exe/wb_wbltest/src/os_linux/link_rule.mk
wb/exe/wb_wbltest/src/os_linux/link_rule.mk
+2
-1
wb/lib/wb/src/wb_erep.cpp
wb/lib/wb/src/wb_erep.cpp
+2
-1
wb/lib/wb/src/wb_ldh.cpp
wb/lib/wb/src/wb_ldh.cpp
+81
-7
wb/lib/wb/src/wb_ldh.h
wb/lib/wb/src/wb_ldh.h
+19
-5
wb/lib/wb/src/wb_volume.h
wb/lib/wb/src/wb_volume.h
+1
-0
wb/lib/wb/src/wb_vrep.h
wb/lib/wb/src/wb_vrep.h
+1
-0
wb/lib/wb/src/wb_vrepdb.cpp
wb/lib/wb/src/wb_vrepdb.cpp
+3
-1
wb/lib/wb/src/wb_vrepdb.h
wb/lib/wb/src/wb_vrepdb.h
+1
-0
wb/lib/wb/src/wb_vrepdbs.h
wb/lib/wb/src/wb_vrepdbs.h
+1
-0
wb/lib/wb/src/wb_vrepmem.h
wb/lib/wb/src/wb_vrepmem.h
+1
-0
wb/lib/wb/src/wb_vrepwbl.h
wb/lib/wb/src/wb_vrepwbl.h
+1
-0
wb/lib/wb/src/wb_wnav.cpp
wb/lib/wb/src/wb_wnav.cpp
+3
-3
wb/lib/wb/src/wb_wnav_command.cpp
wb/lib/wb/src/wb_wnav_command.cpp
+14
-3
wb/lib/wb/src/wb_wtt.cpp
wb/lib/wb/src/wb_wtt.cpp
+8
-2
No files found.
wb/exe/wb_wbltest/src/os_linux/link_rule.mk
View file @
4709dc30
ifndef
link_rule_mk
link_rule_mk
:=
1
...
...
@@ -6,7 +7,7 @@ link = $(ldxx) $(linkflags) $(domap) -o $(export_exe) \
$(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
-ldb_cxx-4
.0
\
-lSM
-lICE
\
-l
Xmu
-l
SM
-lICE
\
-lrpcsvc
-lpthread
-lm
-lposix1b
-lrt
endif
wb/lib/wb/src/wb_erep.cpp
View file @
4709dc30
...
...
@@ -536,12 +536,13 @@ void wb_erep::loadMeta( pwr_tStatus *status)
// Load db for this volume
strcpy
(
vname
,
"$pwrp_db/"
);
strcat
(
vname
,
vol_array
[
0
]);
cdh_ToLower
(
vname
,
vname
);
strcat
(
vname
,
".db"
);
dcli_translate_filename
(
vname
,
vname
);
wb_vrepdb
*
vrepdb
=
new
wb_vrepdb
(
this
,
vname
);
vrepdb
->
name
(
vol_array
[
0
]);
addDb
s
(
&
sts
,
vrepdb
);
addDb
(
&
sts
,
vrepdb
);
vol_cnt
++
;
}
}
...
...
wb/lib/wb/src/wb_ldh.cpp
View file @
4709dc30
...
...
@@ -39,6 +39,9 @@ This module contains the API-routines to the Local Data Handler, LDH. */
#include "wb_volume.h"
#include "wb_error.h"
#include "wb_vrepmem.h"
#include "wb_vrepwbl.h"
#include "wb_vrepdbs.h"
#include "wb_db.h"
#include "wb_print_wbl.h"
#include "pwr_baseclasses.h"
#include <X11/Intrinsic.h>
...
...
@@ -1383,9 +1386,13 @@ ldh_SyntaxCheck(ldh_tSession session, int *errorcount, int *warningcount)
pwr_tStatus
ldh_CopyObjectTrees
(
ldh_tSession
session
,
pwr_sAttrRef
*
arp
,
pwr_tOid
doid
,
ldh_eDest
dest
,
pwr_tBoolean
self
)
{
//wb_session *sp = (wb_session*)session
;
pwr_tStatus
sts
;
return
LDH__NYI
;
sts
=
ldh_Copy
(
session
,
arp
,
0
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ldh_Paste
(
session
,
doid
,
dest
,
0
,
0
);
return
sts
;
}
...
...
@@ -1456,15 +1463,15 @@ ldh_CreateLoadFile(ldh_tSession session)
}
pwr_tStatus
ldh_WbDump
(
ldh_tSession
session
,
char
*
objname
,
char
*
dumpfile
)
ldh_WbDump
(
ldh_tSession
session
,
char
*
objname
,
char
*
dumpfile
)
{
wb_session
*
sp
=
(
wb_session
*
)
session
;
char
fname
[
200
];
if
(
sp
->
type
()
==
ldh_eVolRep_Wbl
||
sp
->
cid
()
==
pwr_eClass_ClassVolume
)
return
LDH__NYI
;
dcli_translate_filename
(
fname
,
dumpfile
);
ofstream
fp
(
fname
);
if
(
!
fp
)
return
LDH__FILEOPEN
;
...
...
@@ -1484,6 +1491,73 @@ ldh_WbDump (
return
LDH__SUCCESS
;
}
pwr_tStatus
ldh_WbLoad
(
ldh_tSession
session
,
char
*
loadfile
)
{
wb_session
*
sp
=
(
wb_session
*
)
session
;
wb_erep
*
erep
=
sp
->
env
();
char
fname
[
200
];
char
db_name
[
200
];
char
vname
[
32
];
if
(
strstr
(
loadfile
,
".dbs"
))
{
// Load vrepdbs
try
{
dcli_translate_filename
(
fname
,
loadfile
);
wb_vrepdbs
*
vdbs
=
new
wb_vrepdbs
(
erep
,
fname
);
vdbs
->
load
();
wb_db
db
(
vdbs
->
vid
());
cdh_ToLower
(
vname
,
vdbs
->
name
());
strcpy
(
db_name
,
"$pwrp_db/"
);
strcat
(
db_name
,
vname
);
strcat
(
db_name
,
".db"
);
dcli_translate_filename
(
db_name
,
db_name
);
db
.
create
(
vdbs
->
vid
(),
vdbs
->
cid
(),
vdbs
->
name
(),
db_name
);
db
.
importVolume
(
*
vdbs
);
db
.
close
();
delete
vdbs
;
}
catch
(
wb_error
&
e
)
{
return
e
.
sts
();
}
}
else
if
(
strstr
(
loadfile
,
".wb_load"
)
||
strstr
(
loadfile
,
".wb_dmp"
))
{
// load vrepwbl
try
{
dcli_translate_filename
(
fname
,
loadfile
);
wb_vrepwbl
*
vwbl
=
new
wb_vrepwbl
(
erep
);
vwbl
->
load
(
fname
);
wb_db
db
(
vwbl
->
vid
());
cdh_ToLower
(
vname
,
vwbl
->
name
());
strcpy
(
db_name
,
"$pwrp_db/"
);
strcat
(
db_name
,
vname
);
strcat
(
db_name
,
".db"
);
dcli_translate_filename
(
db_name
,
db_name
);
db
.
create
(
vwbl
->
vid
(),
vwbl
->
cid
(),
vwbl
->
name
(),
db_name
);
db
.
importVolume
(
*
vwbl
);
db
.
close
();
delete
vwbl
;
}
catch
(
wb_error
&
e
)
{
return
e
.
sts
();
}
}
else
return
LDH__NYI
;
return
LDH__SUCCESS
;
}
ldh_eVolRep
ldh_VolRepType
(
ldh_tSession
session
)
{
return
((
wb_session
*
)
session
)
->
type
();
}
#endif
...
...
wb/lib/wb/src/wb_ldh.h
View file @
4709dc30
...
...
@@ -63,6 +63,13 @@ typedef pwr_tStatus (*ldh_tSessionCb) (void *, ldh_sEvent *);
typedef
union
ldh_m_MenuFlags
ldh_mMenuFlags
;
typedef
enum
{
ldh_eVolRep_Db
,
ldh_eVolRep_Dbs
,
ldh_eVolRep_Wbl
,
ldh_eVolRep_Mem
}
ldh_eVolRep
;
typedef
enum
{
ldh_eAccess__
=
0
,
ldh_eAccess_ReadOnly
,
...
...
@@ -442,11 +449,7 @@ pwr_tStatus ldh_CopyObject (
pwr_tStatus
ldh_CopyObjectTrees
(
ldh_tSession
Session
,
#if 0 // def __cplusplus
pwr_sAttrRef (*AttrRef)[1],
#else
pwr_sAttrRef
*
AttrRef
,
#endif
pwr_tObjid
destobject
,
ldh_eDest
dest
,
pwr_tBoolean
Self
...
...
@@ -956,11 +959,22 @@ ldh_CreateLoadFile(
pwr_tStatus
ldh_WbDump
(
ldh_tSes
Context
ldhses
,
ldh_tSes
sion
session
,
char
*
objname
,
char
*
dumpfile
);
pwr_tStatus
ldh_WbLoad
(
ldh_tSession
session
,
char
*
loadfile
);
ldh_eVolRep
ldh_VolRepType
(
ldh_tSession
session
);
#ifdef __cplusplus
}
#endif
...
...
wb/lib/wb/src/wb_volume.h
View file @
4709dc30
...
...
@@ -43,6 +43,7 @@ public:
pwr_tVid
vid
()
const
{
return
m_vrep
->
vid
();}
pwr_tCid
cid
()
const
{
return
m_vrep
->
cid
();}
const
char
*
name
()
const
{
return
m_vrep
->
name
();}
ldh_eVolRep
type
()
const
{
return
m_vrep
->
type
();}
wb_volume
next
()
const
;
...
...
wb/lib/wb/src/wb_vrep.h
View file @
4709dc30
...
...
@@ -43,6 +43,7 @@ public:
virtual
void
unref
()
=
0
;
virtual
wb_vrep
*
ref
()
=
0
;
virtual
ldh_eVolRep
type
()
const
=
0
;
virtual
wb_erep
*
erep
()
=
0
;
virtual
wb_vrep
*
next
()
=
0
;
...
...
wb/lib/wb/src/wb_vrepdb.cpp
View file @
4709dc30
...
...
@@ -42,7 +42,9 @@ wb_erep *wb_vrepdb::erep()
wb_vrep
*
wb_vrepdb
::
next
()
{
return
0
;
pwr_tStatus
sts
;
return
m_erep
->
nextVolume
(
&
sts
,
m_db
->
vid
());
}
wb_merep
*
wb_vrepdb
::
merep
()
const
...
...
wb/lib/wb/src/wb_vrepdb.h
View file @
4709dc30
...
...
@@ -27,6 +27,7 @@ public:
virtual
void
unref
();
virtual
wb_vrep
*
ref
();
virtual
ldh_eVolRep
type
()
const
{
return
ldh_eVolRep_Db
;}
virtual
wb_erep
*
erep
();
virtual
wb_merep
*
merep
()
const
;
...
...
wb/lib/wb/src/wb_vrepdbs.h
View file @
4709dc30
...
...
@@ -30,6 +30,7 @@ public:
virtual
void
unref
();
virtual
wb_vrep
*
ref
();
virtual
ldh_eVolRep
type
()
const
{
return
ldh_eVolRep_Dbs
;}
virtual
wb_erep
*
erep
()
;
virtual
pwr_tOid
oid
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
pwr_cNOid
;}
...
...
wb/lib/wb/src/wb_vrepmem.h
View file @
4709dc30
...
...
@@ -117,6 +117,7 @@ public:
wb_vrepmem
(
wb_erep
*
erep
,
pwr_tVid
vid
);
~
wb_vrepmem
();
virtual
ldh_eVolRep
type
()
const
{
return
ldh_eVolRep_Mem
;}
pwr_tVid
vid
()
const
{
return
m_vid
;}
pwr_tCid
cid
()
const
{
return
m_cid
;}
...
...
wb/lib/wb/src/wb_vrepwbl.h
View file @
4709dc30
...
...
@@ -42,6 +42,7 @@ public:
wb_vrep
(
vid
),
m_erep
(
erep
),
m_merep
(
erep
->
merep
()),
m_nRef
(
0
),
root_object
(
0
),
error_cnt
(
0
),
file_cnt
(
0
),
next_oix
(
0
),
volume_node
(
0
)
{}
~
wb_vrepwbl
();
virtual
ldh_eVolRep
type
()
const
{
return
ldh_eVolRep_Wbl
;}
pwr_tVid
vid
()
const
{
return
m_vid
;}
pwr_tCid
cid
()
const
{
return
m_cid
;}
...
...
wb/lib/wb/src/wb_wnav.cpp
View file @
4709dc30
...
...
@@ -1761,7 +1761,7 @@ static int wnav_brow_cb( FlowCtx *ctx, flow_tEvent event)
0
,
classid
,
((
WItemObject
*
)
item
)
->
objid
,
destcode
);
if
(
EVEN
(
sts
))
wnav
->
message
(
'
E
'
,
wnav_get_message
(
sts
));
wnav
->
message
(
'
'
,
wnav_get_message
(
sts
));
break
;
default:
;
...
...
@@ -1772,7 +1772,7 @@ static int wnav_brow_cb( FlowCtx *ctx, flow_tEvent event)
sts
=
ldh_CreateObject
(
wnav
->
ldhses
,
&
objid
,
0
,
classid
,
pwr_cNObjid
,
ldh_eDest_IntoLast
);
if
(
EVEN
(
sts
))
wnav
->
message
(
'
E
'
,
wnav_get_message
(
sts
));
wnav
->
message
(
'
'
,
wnav_get_message
(
sts
));
}
}
else
...
...
@@ -1794,7 +1794,7 @@ static int wnav_brow_cb( FlowCtx *ctx, flow_tEvent event)
sts
=
ldh_MoveObject
(
wnav
->
ldhses
,
sel_list
->
Objid
,
item
->
objid
,
destcode
);
if
(
EVEN
(
sts
))
{
wnav
->
message
(
'
E
'
,
wnav_get_message
(
sts
));
wnav
->
message
(
'
'
,
wnav_get_message
(
sts
));
return
sts
;
}
// Unselect moved object
...
...
wb/lib/wb/src/wb_wnav_command.cpp
View file @
4709dc30
...
...
@@ -273,7 +273,7 @@ dcli_tCmdTable wnav_command_table[] = {
{
"WB"
,
&
wnav_wb_func
,
{
"dcli_arg1"
,
"/OUTPUT"
,
"/HIERARCHY"
,
{
"dcli_arg1"
,
"/OUTPUT"
,
"/HIERARCHY"
,
"/LOADFILE"
,
""
}
},
{
...
...
@@ -3916,8 +3916,19 @@ static int wnav_wb_func( void *client_data,
}
else
if
(
strncmp
(
arg1_str
,
"LOAD"
,
strlen
(
arg1_str
))
==
0
)
{
wnav
->
message
(
'E'
,
"Not yet implemented"
);
return
LDH__NYI
;
pwr_tStatus
sts
;
char
loadfilestr
[
80
];
if
(
EVEN
(
dcli_get_qualifier
(
"/LOADFILE"
,
loadfilestr
)))
{
wnav
->
message
(
'E'
,
"Qualifer required"
);
return
WNAV__QUAL
;
}
sts
=
ldh_WbLoad
(
wnav
->
ldhses
,
loadfilestr
);
if
(
EVEN
(
sts
))
wnav
->
message
(
' '
,
wnav_get_message
(
sts
));
return
sts
;
}
else
{
...
...
wb/lib/wb/src/wb_wtt.cpp
View file @
4709dc30
...
...
@@ -295,6 +295,9 @@ void Wtt::menu_setup()
XtSetValues
(
menu_utilities_w
,
sensitive
,
1
);
XtSetValues
(
menu_openplc_w
,
sensitive
,
1
);
XtSetValues
(
menu_compile_w
,
sensitive
,
1
);
if
(
ldh_VolRepType
(
ldhses
)
==
ldh_eVolRep_Dbs
)
XtSetValues
(
menu_createload_w
,
nosensitive
,
1
);
else
XtSetValues
(
menu_createload_w
,
sensitive
,
1
);
XtSetValues
(
menu_createboot_w
,
sensitive
,
1
);
XtSetValues
(
menu_distribute_w
,
sensitive
,
1
);
...
...
@@ -333,6 +336,9 @@ void Wtt::menu_setup()
XtSetValues
(
menu_utilities_w
,
sensitive
,
1
);
XtSetValues
(
menu_openplc_w
,
nosensitive
,
1
);
XtSetValues
(
menu_compile_w
,
nosensitive
,
1
);
if
(
ldh_VolRepType
(
ldhses
)
==
ldh_eVolRep_Dbs
)
XtSetValues
(
menu_createload_w
,
nosensitive
,
1
);
else
XtSetValues
(
menu_createload_w
,
sensitive
,
1
);
XtSetValues
(
menu_createboot_w
,
sensitive
,
1
);
XtSetValues
(
menu_distribute_w
,
sensitive
,
1
);
...
...
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