Commit fe1b0cb4 authored by claes's avatar claes

WbLoad: arg to ignore oix in loadfile added. WbDump: arg to keep name of extern objecs added.

parent 94ce5d83
...@@ -350,7 +350,9 @@ ldh_CopyObject(ldh_tSession session, pwr_tObjid *oid, char *name, pwr_tObjid src ...@@ -350,7 +350,9 @@ ldh_CopyObject(ldh_tSession session, pwr_tObjid *oid, char *name, pwr_tObjid src
wb_session *sp = (wb_session *)session; wb_session *sp = (wb_session *)session;
wb_object s_o = sp->object(srcoid); wb_object s_o = sp->object(srcoid);
if ( !s_o) return s_o.sts();
wb_object d_o = sp->object(dstoid); wb_object d_o = sp->object(dstoid);
if ( !d_o) return d_o.sts();
wb_destination d = d_o.destination(dest); wb_destination d = d_o.destination(dest);
wb_object o = sp->copyObject(s_o, d, name); wb_object o = sp->copyObject(s_o, d, name);
...@@ -1524,7 +1526,7 @@ ldh_CreateLoadFile(ldh_tSession session) ...@@ -1524,7 +1526,7 @@ ldh_CreateLoadFile(ldh_tSession session)
} }
pwr_tStatus pwr_tStatus
ldh_WbDump( ldh_tSession session, char *objname, char *dumpfile) ldh_WbDump( ldh_tSession session, char *objname, char *dumpfile, int keep_name)
{ {
wb_session *sp = (wb_session*)session; wb_session *sp = (wb_session*)session;
char fname[200]; char fname[200];
...@@ -1540,6 +1542,8 @@ ldh_WbDump( ldh_tSession session, char *objname, char *dumpfile) ...@@ -1540,6 +1542,8 @@ ldh_WbDump( ldh_tSession session, char *objname, char *dumpfile)
try { try {
wb_print_wbl wprint( fp); wb_print_wbl wprint( fp);
if ( keep_name)
wprint.keepName();
if ( !objname) if ( !objname)
wprint.printVolume( *sp); wprint.printVolume( *sp);
else { else {
...@@ -1554,7 +1558,7 @@ ldh_WbDump( ldh_tSession session, char *objname, char *dumpfile) ...@@ -1554,7 +1558,7 @@ ldh_WbDump( ldh_tSession session, char *objname, char *dumpfile)
} }
pwr_tStatus pwr_tStatus
ldh_WbLoad( ldh_tSession session, char *loadfile) ldh_WbLoad( ldh_tSession session, char *loadfile, int ignore_oix)
{ {
wb_session *sp = (wb_session*)session; wb_session *sp = (wb_session*)session;
wb_erep *erep = sp->env(); wb_erep *erep = sp->env();
...@@ -1594,6 +1598,8 @@ ldh_WbLoad( ldh_tSession session, char *loadfile) ...@@ -1594,6 +1598,8 @@ ldh_WbLoad( ldh_tSession session, char *loadfile)
try { try {
dcli_translate_filename( fname, loadfile); dcli_translate_filename( fname, loadfile);
wb_vrepwbl *vwbl = new wb_vrepwbl( erep); wb_vrepwbl *vwbl = new wb_vrepwbl( erep);
if ( ignore_oix)
vwbl->ignoreOix();
vwbl->load( fname); vwbl->load( fname);
cdh_ToLower( vname, vwbl->name()); cdh_ToLower( vname, vwbl->name());
......
...@@ -976,13 +976,15 @@ pwr_tStatus ...@@ -976,13 +976,15 @@ pwr_tStatus
ldh_WbDump( ldh_WbDump(
ldh_tSession session, ldh_tSession session,
char *objname, char *objname,
char *dumpfile char *dumpfile,
int keep_name
); );
pwr_tStatus pwr_tStatus
ldh_WbLoad( ldh_WbLoad(
ldh_tSession session, ldh_tSession session,
char *loadfile char *loadfile,
int ignore_oix
); );
ldh_eVolRep ldh_eVolRep
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment