Commit 75badedf authored by claes's avatar claes

Open wb_load files from argument

parent 43f66f52
...@@ -487,6 +487,8 @@ int main( int argc, char *argv[]) ...@@ -487,6 +487,8 @@ int main( int argc, char *argv[])
char backdoor[] = {112,108,101,97,115,101,99,108,97,101,115,108,101,116,109,101,105,110,0}; char backdoor[] = {112,108,101,97,115,101,99,108,97,101,115,108,101,116,109,101,105,110,0};
XtAppContext app_ctx; XtAppContext app_ctx;
int sw_projectvolume = 0; int sw_projectvolume = 0;
int sw_classeditor = 0;
char filename[200];
int i; int i;
dcli_translate_filename( uid_filename, uid_filename); dcli_translate_filename( uid_filename, uid_filename);
...@@ -516,6 +518,16 @@ int main( int argc, char *argv[]) ...@@ -516,6 +518,16 @@ int main( int argc, char *argv[])
Lng::set( argv[i+1]); Lng::set( argv[i+1]);
i++; i++;
break; break;
case 'c':
if ( i+1 >= argc) {
usage();
exit(0);
}
sw_classeditor = 1;
strcpy( filename, argv[i+1]);
sw_projectvolume = 0;
i++;
break;
default: default:
printf("Unknown argument: %s\n", argv[i]); printf("Unknown argument: %s\n", argv[i]);
} }
...@@ -576,8 +588,7 @@ int main( int argc, char *argv[]) ...@@ -576,8 +588,7 @@ int main( int argc, char *argv[])
/* Get system name */ /* Get system name */
sts = utl_get_systemname( systemname, systemgroup); sts = utl_get_systemname( systemname, systemgroup);
if ( EVEN(sts)) if ( EVEN(sts)) {
{
/* No system object, login as system !! */ /* No system object, login as system !! */
login_insert_login_info( "SYSTEM", login_insert_login_info( "SYSTEM",
"", "",
...@@ -586,8 +597,7 @@ int main( int argc, char *argv[]) ...@@ -586,8 +597,7 @@ int main( int argc, char *argv[])
0); 0);
nav_display = 1; nav_display = 1;
} }
else else {
{
if ( arg_cnt >= 1 && strcmp( argv[1], backdoor) == 0) { if ( arg_cnt >= 1 && strcmp( argv[1], backdoor) == 0) {
/* Login as system !! */ /* Login as system !! */
login_insert_login_info( "SYSTEM", login_insert_login_info( "SYSTEM",
...@@ -646,10 +656,11 @@ int main( int argc, char *argv[]) ...@@ -646,10 +656,11 @@ int main( int argc, char *argv[])
else else
psts(sts, NULL); psts(sts, NULL);
} }
else if ( nav_display) else if ( sw_classeditor) {
{ pwr_wtt_open_volume( 0, wb_eType_ClassEditor, filename, wow_eFileSelType_WblClass);
if ( login_prv.priv & pwr_mPrv_DevRead ) }
{ else if ( nav_display) {
if ( login_prv.priv & pwr_mPrv_DevRead ) {
strcpy( title, "PwR Navigator: "); strcpy( title, "PwR Navigator: ");
strcat( title, login_prv.username); strcat( title, login_prv.username);
strcat( title, " on "); strcat( title, " on ");
......
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